From 5526c6263bcb6e9be56a7e1b30c55e79f5dde24d Mon Sep 17 00:00:00 2001
From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com>
Date: Sun, 15 Dec 2024 22:31:34 -0800
Subject: [PATCH] [Automation] Generate Fluent Lite from TypeSpec
deviceregistry (#43409)
* [Automation] External Change
* [Automation] Generate Fluent Lite from TypeSpec deviceregistry
---
.../CHANGELOG.md | 372 ++++-
.../README.md | 13 +-
.../SAMPLE.md | 1271 +++++++++++++++-
.../pom.xml | 15 +-
.../deviceregistry/DeviceRegistryManager.java | 113 +-
.../fluent/BillingContainersClient.java | 64 +
...va => DeviceRegistryManagementClient.java} | 46 +-
...DiscoveredAssetEndpointProfilesClient.java | 281 ++++
.../fluent/DiscoveredAssetsClient.java | 271 ++++
.../fluent/SchemaRegistriesClient.java | 271 ++++
.../fluent/SchemaVersionsClient.java | 147 ++
.../deviceregistry/fluent/SchemasClient.java | 137 ++
.../fluent/models/BillingContainerInner.java | 172 +++
.../DiscoveredAssetEndpointProfileInner.java | 234 +++
.../fluent/models/DiscoveredAssetInner.java | 231 +++
.../models/OperationStatusResultInner.java | 17 +
.../fluent/models/SchemaInner.java | 166 ++
.../fluent/models/SchemaRegistryInner.java | 224 +++
.../fluent/models/SchemaVersionInner.java | 166 ++
.../AssetEndpointProfilesClientImpl.java | 10 +-
.../implementation/AssetsClientImpl.java | 10 +-
.../implementation/BillingContainerImpl.java | 54 +
.../BillingContainersClientImpl.java | 359 +++++
.../implementation/BillingContainersImpl.java | 66 +
...eviceRegistryManagementClientBuilder.java} | 40 +-
...> DeviceRegistryManagementClientImpl.java} | 112 +-
.../DiscoveredAssetEndpointProfileImpl.java | 197 +++
...overedAssetEndpointProfilesClientImpl.java | 1337 +++++++++++++++++
.../DiscoveredAssetEndpointProfilesImpl.java | 160 ++
.../implementation/DiscoveredAssetImpl.java | 193 +++
.../DiscoveredAssetsClientImpl.java | 1296 ++++++++++++++++
.../implementation/DiscoveredAssetsImpl.java | 147 ++
.../OperationStatusClientImpl.java | 10 +-
.../OperationStatusResultImpl.java | 4 +
.../implementation/OperationsClientImpl.java | 10 +-
.../implementation/SchemaImpl.java | 106 ++
.../SchemaRegistriesClientImpl.java | 1294 ++++++++++++++++
.../implementation/SchemaRegistriesImpl.java | 146 ++
.../implementation/SchemaRegistryImpl.java | 198 +++
.../implementation/SchemaVersionImpl.java | 112 ++
.../SchemaVersionsClientImpl.java | 797 ++++++++++
.../implementation/SchemaVersionsImpl.java | 186 +++
.../implementation/SchemasClientImpl.java | 731 +++++++++
.../implementation/SchemasImpl.java | 160 ++
.../models/BillingContainerListResult.java | 114 ++
...coveredAssetEndpointProfileListResult.java | 116 ++
.../models/DiscoveredAssetListResult.java | 114 ++
.../models/SchemaListResult.java | 112 ++
.../models/SchemaRegistryListResult.java | 113 ++
.../models/SchemaVersionListResult.java | 112 ++
.../AssetEndpointProfileProperties.java | 132 +-
.../models/AssetEndpointProfileStatus.java | 87 ++
.../AssetEndpointProfileStatusError.java | 100 ++
.../AssetEndpointProfileUpdateProperties.java | 76 +-
.../models/AssetProperties.java | 236 +--
.../deviceregistry/models/AssetStatus.java | 49 +-
.../models/AssetStatusDataset.java | 103 ++
.../models/AssetStatusError.java | 2 -
.../models/AssetStatusEvent.java | 103 ++
.../models/AssetUpdateProperties.java | 161 +-
...uthentication.java => Authentication.java} | 64 +-
.../models/AuthenticationMethod.java | 56 +
.../models/BillingContainer.java | 62 +
.../models/BillingContainerProperties.java | 82 +
.../models/BillingContainers.java | 57 +
.../deviceregistry/models/DataPoint.java | 154 +-
.../deviceregistry/models/DataPointBase.java | 169 +++
.../models/DataPointObservabilityMode.java | 66 +
.../models/DataPointsObservabilityMode.java | 66 -
.../deviceregistry/models/Dataset.java | 197 +++
.../models/DiscoveredAsset.java | 285 ++++
.../DiscoveredAssetEndpointProfile.java | 285 ++++
...coveredAssetEndpointProfileProperties.java | 289 ++++
.../DiscoveredAssetEndpointProfileUpdate.java | 130 ++
...dAssetEndpointProfileUpdateProperties.java | 255 ++++
.../DiscoveredAssetEndpointProfiles.java | 163 ++
.../models/DiscoveredAssetProperties.java | 571 +++++++
.../models/DiscoveredAssetUpdate.java | 126 ++
.../DiscoveredAssetUpdateProperties.java | 508 +++++++
.../models/DiscoveredAssets.java | 158 ++
.../models/DiscoveredDataPoint.java | 202 +++
.../models/DiscoveredDataset.java | 199 +++
.../models/DiscoveredEvent.java | 231 +++
.../deviceregistry/models/Event.java | 159 +-
.../deviceregistry/models/EventBase.java | 198 +++
.../models/EventObservabilityMode.java | 51 +
.../models/EventsObservabilityMode.java | 51 -
.../deviceregistry/models/Format.java | 51 +
.../models/MessageSchemaReference.java | 114 ++
.../models/OperationStatusResult.java | 8 +
.../deviceregistry/models/OwnCertificate.java | 150 --
.../models/ProvisioningState.java | 5 +
.../deviceregistry/models/Schema.java | 137 ++
.../models/SchemaProperties.java | 251 ++++
.../models/SchemaRegistries.java | 158 ++
.../deviceregistry/models/SchemaRegistry.java | 299 ++++
.../models/SchemaRegistryProperties.java | 224 +++
.../models/SchemaRegistryUpdate.java | 157 ++
.../SchemaRegistryUpdateProperties.java | 122 ++
.../deviceregistry/models/SchemaType.java | 46 +
.../deviceregistry/models/SchemaVersion.java | 138 ++
.../models/SchemaVersionProperties.java | 179 +++
.../deviceregistry/models/SchemaVersions.java | 154 ++
.../deviceregistry/models/Schemas.java | 147 ++
.../models/SystemAssignedServiceIdentity.java | 140 ++
.../SystemAssignedServiceIdentityType.java | 51 +
.../deviceregistry/models/Topic.java | 130 ++
.../models/TopicRetainType.java | 51 +
.../models/TransportAuthentication.java | 114 --
.../models/UserAuthenticationMode.java | 56 -
.../models/UsernamePasswordCredentials.java | 60 +-
.../models/X509Credentials.java | 30 +-
.../proxy-config.json | 2 +-
...ndpointProfilesCreateOrReplaceSamples.java | 35 +-
.../AssetEndpointProfilesDeleteSamples.java | 2 +-
...ointProfilesGetByResourceGroupSamples.java | 17 +-
...intProfilesListByResourceGroupSamples.java | 2 +-
.../AssetEndpointProfilesListSamples.java | 2 +-
.../AssetEndpointProfilesUpdateSamples.java | 2 +-
.../AssetsCreateOrReplaceSamples.java | 248 ++-
.../generated/AssetsDeleteSamples.java | 2 +-
.../AssetsGetByResourceGroupSamples.java | 4 +-
.../AssetsListByResourceGroupSamples.java | 2 +-
.../generated/AssetsListSamples.java | 2 +-
.../generated/AssetsUpdateSamples.java | 2 +-
.../BillingContainersGetSamples.java | 22 +
.../BillingContainersListSamples.java | 23 +
...ndpointProfilesCreateOrReplaceSamples.java | 58 +
...redAssetEndpointProfilesDeleteSamples.java | 24 +
...ointProfilesGetByResourceGroupSamples.java | 25 +
...intProfilesListByResourceGroupSamples.java | 24 +
...veredAssetEndpointProfilesListSamples.java | 23 +
...redAssetEndpointProfilesUpdateSamples.java | 41 +
...iscoveredAssetsCreateOrReplaceSamples.java | 88 ++
.../DiscoveredAssetsDeleteSamples.java | 22 +
...overedAssetsGetByResourceGroupSamples.java | 23 +
...veredAssetsListByResourceGroupSamples.java | 23 +
.../DiscoveredAssetsListSamples.java | 23 +
.../DiscoveredAssetsUpdateSamples.java | 34 +
.../generated/OperationStatusGetSamples.java | 2 +-
.../generated/OperationsListSamples.java | 2 +-
...chemaRegistriesCreateOrReplaceSamples.java | 50 +
.../SchemaRegistriesDeleteSamples.java | 22 +
...maRegistriesGetByResourceGroupSamples.java | 23 +
...aRegistriesListByResourceGroupSamples.java | 23 +
.../SchemaRegistriesListSamples.java | 23 +
.../SchemaRegistriesUpdateSamples.java | 46 +
.../SchemaVersionsCreateOrReplaceSamples.java | 30 +
.../SchemaVersionsDeleteSamples.java | 24 +
.../generated/SchemaVersionsGetSamples.java | 24 +
.../SchemaVersionsListBySchemaSamples.java | 24 +
.../SchemasCreateOrReplaceSamples.java | 48 +
.../generated/SchemasDeleteSamples.java | 23 +
.../generated/SchemasGetSamples.java | 23 +
.../SchemasListBySchemaRegistrySamples.java | 24 +
.../generated/AssetStatusDatasetTests.java | 17 +
.../generated/AssetStatusEventTests.java | 17 +
.../generated/BillingContainerInnerTests.java | 17 +
.../BillingContainerListResultTests.java | 19 +
.../BillingContainerPropertiesTests.java | 16 +
...ingContainersGetWithResponseMockTests.java | 36 +
.../BillingContainersListMockTests.java | 36 +
.../generated/DataPointBaseTests.java | 32 +
.../generated/DataPointTests.java | 31 +-
.../generated/DatasetTests.java | 56 +
...coveredAssetEndpointProfileInnerTests.java | 73 +
...edAssetEndpointProfileListResultTests.java | 31 +
...edAssetEndpointProfilePropertiesTests.java | 44 +
...tEndpointProfileUpdatePropertiesTests.java | 45 +
...overedAssetEndpointProfileUpdateTests.java | 66 +
...pointProfilesCreateOrReplaceMockTests.java | 78 +
...tByResourceGroupWithResponseMockTests.java | 50 +
...tProfilesListByResourceGroupMockTests.java | 50 +
...redAssetEndpointProfilesListMockTests.java | 50 +
.../generated/DiscoveredDataPointTests.java | 36 +
.../generated/DiscoveredDatasetTests.java | 66 +
.../generated/DiscoveredEventTests.java | 43 +
.../generated/EventBaseTests.java | 39 +
.../deviceregistry/generated/EventTests.java | 38 +-
.../generated/ExtendedLocationTests.java | 12 +-
.../MessageSchemaReferenceTests.java | 17 +
.../generated/OperationDisplayTests.java | 5 -
.../generated/OperationInnerTests.java | 7 -
.../generated/OperationListResultTests.java | 6 -
...erationStatusGetWithResponseMockTests.java | 59 -
.../OperationStatusResultInnerTests.java | 40 -
.../generated/OperationsListMockTests.java | 9 +-
.../generated/SchemaInnerTests.java | 55 +
.../generated/SchemaListResultTests.java | 26 +
.../generated/SchemaPropertiesTests.java | 55 +
...emaRegistriesCreateOrReplaceMockTests.java | 70 +
...tByResourceGroupWithResponseMockTests.java | 46 +
...egistriesListByResourceGroupMockTests.java | 47 +
.../SchemaRegistriesListMockTests.java | 46 +
.../generated/SchemaRegistryInnerTests.java | 63 +
.../SchemaRegistryListResultTests.java | 27 +
.../SchemaRegistryPropertiesTests.java | 35 +
.../SchemaRegistryUpdatePropertiesTests.java | 29 +
.../generated/SchemaRegistryUpdateTests.java | 55 +
.../generated/SchemaVersionInnerTests.java | 30 +
.../SchemaVersionListResultTests.java | 21 +
.../SchemaVersionPropertiesTests.java | 29 +
...sCreateOrReplaceWithResponseMockTests.java | 43 +
...maVersionsDeleteWithResponseMockTests.java | 34 +
...chemaVersionsGetWithResponseMockTests.java | 41 +
.../SchemaVersionsListBySchemaMockTests.java | 40 +
...sCreateOrReplaceWithResponseMockTests.java | 66 +
.../SchemasDeleteWithResponseMockTests.java | 33 +
.../SchemasGetWithResponseMockTests.java | 45 +
.../SchemasListBySchemaRegistryMockTests.java | 45 +
.../SystemAssignedServiceIdentityTests.java | 28 +
.../deviceregistry/generated/TopicTests.java | 27 +
.../generated/X509CredentialsTests.java | 25 -
.../tsp-location.yaml | 6 +-
214 files changed, 23418 insertions(+), 1458 deletions(-)
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/BillingContainersClient.java
rename sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/{DeviceRegistryClient.java => DeviceRegistryManagementClient.java} (57%)
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/DiscoveredAssetEndpointProfilesClient.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/DiscoveredAssetsClient.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/SchemaRegistriesClient.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/SchemaVersionsClient.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/SchemasClient.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/BillingContainerInner.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/DiscoveredAssetEndpointProfileInner.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/DiscoveredAssetInner.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/SchemaInner.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/SchemaRegistryInner.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/SchemaVersionInner.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/BillingContainerImpl.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/BillingContainersClientImpl.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/BillingContainersImpl.java
rename sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/{DeviceRegistryClientBuilder.java => DeviceRegistryManagementClientBuilder.java} (67%)
rename sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/{DeviceRegistryClientImpl.java => DeviceRegistryManagementClientImpl.java} (74%)
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/DiscoveredAssetEndpointProfileImpl.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/DiscoveredAssetEndpointProfilesClientImpl.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/DiscoveredAssetEndpointProfilesImpl.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/DiscoveredAssetImpl.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/DiscoveredAssetsClientImpl.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/DiscoveredAssetsImpl.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/SchemaImpl.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/SchemaRegistriesClientImpl.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/SchemaRegistriesImpl.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/SchemaRegistryImpl.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/SchemaVersionImpl.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/SchemaVersionsClientImpl.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/SchemaVersionsImpl.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/SchemasClientImpl.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/SchemasImpl.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/models/BillingContainerListResult.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/models/DiscoveredAssetEndpointProfileListResult.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/models/DiscoveredAssetListResult.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/models/SchemaListResult.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/models/SchemaRegistryListResult.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/models/SchemaVersionListResult.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/AssetEndpointProfileStatus.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/AssetEndpointProfileStatusError.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/AssetStatusDataset.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/AssetStatusEvent.java
rename sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/{UserAuthentication.java => Authentication.java} (66%)
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/AuthenticationMethod.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/BillingContainer.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/BillingContainerProperties.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/BillingContainers.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/DataPointBase.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/DataPointObservabilityMode.java
delete mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/DataPointsObservabilityMode.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/Dataset.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/DiscoveredAsset.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/DiscoveredAssetEndpointProfile.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/DiscoveredAssetEndpointProfileProperties.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/DiscoveredAssetEndpointProfileUpdate.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/DiscoveredAssetEndpointProfileUpdateProperties.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/DiscoveredAssetEndpointProfiles.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/DiscoveredAssetProperties.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/DiscoveredAssetUpdate.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/DiscoveredAssetUpdateProperties.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/DiscoveredAssets.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/DiscoveredDataPoint.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/DiscoveredDataset.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/DiscoveredEvent.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/EventBase.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/EventObservabilityMode.java
delete mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/EventsObservabilityMode.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/Format.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/MessageSchemaReference.java
delete mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/OwnCertificate.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/Schema.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/SchemaProperties.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/SchemaRegistries.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/SchemaRegistry.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/SchemaRegistryProperties.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/SchemaRegistryUpdate.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/SchemaRegistryUpdateProperties.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/SchemaType.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/SchemaVersion.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/SchemaVersionProperties.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/SchemaVersions.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/Schemas.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/SystemAssignedServiceIdentity.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/SystemAssignedServiceIdentityType.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/Topic.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/TopicRetainType.java
delete mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/TransportAuthentication.java
delete mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/models/UserAuthenticationMode.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/samples/java/com/azure/resourcemanager/deviceregistry/generated/BillingContainersGetSamples.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/samples/java/com/azure/resourcemanager/deviceregistry/generated/BillingContainersListSamples.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/samples/java/com/azure/resourcemanager/deviceregistry/generated/DiscoveredAssetEndpointProfilesCreateOrReplaceSamples.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/samples/java/com/azure/resourcemanager/deviceregistry/generated/DiscoveredAssetEndpointProfilesDeleteSamples.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/samples/java/com/azure/resourcemanager/deviceregistry/generated/DiscoveredAssetEndpointProfilesGetByResourceGroupSamples.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/samples/java/com/azure/resourcemanager/deviceregistry/generated/DiscoveredAssetEndpointProfilesListByResourceGroupSamples.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/samples/java/com/azure/resourcemanager/deviceregistry/generated/DiscoveredAssetEndpointProfilesListSamples.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/samples/java/com/azure/resourcemanager/deviceregistry/generated/DiscoveredAssetEndpointProfilesUpdateSamples.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/samples/java/com/azure/resourcemanager/deviceregistry/generated/DiscoveredAssetsCreateOrReplaceSamples.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/samples/java/com/azure/resourcemanager/deviceregistry/generated/DiscoveredAssetsDeleteSamples.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/samples/java/com/azure/resourcemanager/deviceregistry/generated/DiscoveredAssetsGetByResourceGroupSamples.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/samples/java/com/azure/resourcemanager/deviceregistry/generated/DiscoveredAssetsListByResourceGroupSamples.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/samples/java/com/azure/resourcemanager/deviceregistry/generated/DiscoveredAssetsListSamples.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/samples/java/com/azure/resourcemanager/deviceregistry/generated/DiscoveredAssetsUpdateSamples.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/samples/java/com/azure/resourcemanager/deviceregistry/generated/SchemaRegistriesCreateOrReplaceSamples.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/samples/java/com/azure/resourcemanager/deviceregistry/generated/SchemaRegistriesDeleteSamples.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/samples/java/com/azure/resourcemanager/deviceregistry/generated/SchemaRegistriesGetByResourceGroupSamples.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/samples/java/com/azure/resourcemanager/deviceregistry/generated/SchemaRegistriesListByResourceGroupSamples.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/samples/java/com/azure/resourcemanager/deviceregistry/generated/SchemaRegistriesListSamples.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/samples/java/com/azure/resourcemanager/deviceregistry/generated/SchemaRegistriesUpdateSamples.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/samples/java/com/azure/resourcemanager/deviceregistry/generated/SchemaVersionsCreateOrReplaceSamples.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/samples/java/com/azure/resourcemanager/deviceregistry/generated/SchemaVersionsDeleteSamples.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/samples/java/com/azure/resourcemanager/deviceregistry/generated/SchemaVersionsGetSamples.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/samples/java/com/azure/resourcemanager/deviceregistry/generated/SchemaVersionsListBySchemaSamples.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/samples/java/com/azure/resourcemanager/deviceregistry/generated/SchemasCreateOrReplaceSamples.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/samples/java/com/azure/resourcemanager/deviceregistry/generated/SchemasDeleteSamples.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/samples/java/com/azure/resourcemanager/deviceregistry/generated/SchemasGetSamples.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/samples/java/com/azure/resourcemanager/deviceregistry/generated/SchemasListBySchemaRegistrySamples.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/AssetStatusDatasetTests.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/AssetStatusEventTests.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/BillingContainerInnerTests.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/BillingContainerListResultTests.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/BillingContainerPropertiesTests.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/BillingContainersGetWithResponseMockTests.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/BillingContainersListMockTests.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/DataPointBaseTests.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/DatasetTests.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/DiscoveredAssetEndpointProfileInnerTests.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/DiscoveredAssetEndpointProfileListResultTests.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/DiscoveredAssetEndpointProfilePropertiesTests.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/DiscoveredAssetEndpointProfileUpdatePropertiesTests.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/DiscoveredAssetEndpointProfileUpdateTests.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/DiscoveredAssetEndpointProfilesCreateOrReplaceMockTests.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/DiscoveredAssetEndpointProfilesGetByResourceGroupWithResponseMockTests.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/DiscoveredAssetEndpointProfilesListByResourceGroupMockTests.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/DiscoveredAssetEndpointProfilesListMockTests.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/DiscoveredDataPointTests.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/DiscoveredDatasetTests.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/DiscoveredEventTests.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/EventBaseTests.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/MessageSchemaReferenceTests.java
delete mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/OperationStatusGetWithResponseMockTests.java
delete mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/OperationStatusResultInnerTests.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaInnerTests.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaListResultTests.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaPropertiesTests.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaRegistriesCreateOrReplaceMockTests.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaRegistriesGetByResourceGroupWithResponseMockTests.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaRegistriesListByResourceGroupMockTests.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaRegistriesListMockTests.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaRegistryInnerTests.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaRegistryListResultTests.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaRegistryPropertiesTests.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaRegistryUpdatePropertiesTests.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaRegistryUpdateTests.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaVersionInnerTests.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaVersionListResultTests.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaVersionPropertiesTests.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaVersionsCreateOrReplaceWithResponseMockTests.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaVersionsDeleteWithResponseMockTests.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaVersionsGetWithResponseMockTests.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemaVersionsListBySchemaMockTests.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemasCreateOrReplaceWithResponseMockTests.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemasDeleteWithResponseMockTests.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemasGetWithResponseMockTests.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SchemasListBySchemaRegistryMockTests.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/SystemAssignedServiceIdentityTests.java
create mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/TopicTests.java
delete mode 100644 sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/test/java/com/azure/resourcemanager/deviceregistry/generated/X509CredentialsTests.java
diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/CHANGELOG.md b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/CHANGELOG.md
index 4f189d7621beb..7368b17e8e72a 100644
--- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/CHANGELOG.md
+++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/CHANGELOG.md
@@ -1,14 +1,378 @@
# Release History
-## 1.0.0-beta.2 (Unreleased)
+## 1.0.0-beta.2 (2024-12-16)
-### Features Added
+- Azure Resource Manager Device Registry client library for Java. This package contains Microsoft Azure SDK for Device Registry Management SDK. Microsoft.DeviceRegistry Resource Provider management API. 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.EventsObservabilityMode` was removed
+
+#### `models.OwnCertificate` was removed
+
+#### `models.UserAuthentication` was removed
+
+#### `models.UserAuthenticationMode` was removed
+
+#### `models.TransportAuthentication` was removed
+
+#### `implementation.models.PagedOperation` was removed
+
+#### `models.DataPointsObservabilityMode` was removed
+
+#### `models.Event` was modified
+
+* `eventNotifier()` was removed
+* `withObservabilityMode(models.EventsObservabilityMode)` was removed
+* `capabilityId()` was removed
+* `withCapabilityId(java.lang.String)` was removed
+* `eventConfiguration()` was removed
+* `name()` was removed
+* `models.EventsObservabilityMode observabilityMode()` -> `models.EventObservabilityMode observabilityMode()`
+
+#### `models.AssetProperties` was modified
+
+* `defaultDataPointsConfiguration()` was removed
+* `withAssetType(java.lang.String)` was removed
+* `assetType()` was removed
+* `java.lang.Integer version()` -> `java.lang.Long version()`
+* `withDefaultDataPointsConfiguration(java.lang.String)` was removed
+* `dataPoints()` was removed
+* `withAssetEndpointProfileUri(java.lang.String)` was removed
+* `assetEndpointProfileUri()` was removed
+* `withDataPoints(java.util.List)` was removed
+
+#### `models.X509Credentials` was modified
+
+* `withCertificateReference(java.lang.String)` was removed
+* `certificateReference()` was removed
+
+#### `models.AssetStatus` was modified
+
+* `java.lang.Integer version()` -> `java.lang.Long version()`
+
+#### `models.OperationStatusResult` was modified
+
+* `java.lang.Integer percentComplete()` -> `java.lang.Double percentComplete()`
+
+#### `DeviceRegistryManager` was modified
+
+* `fluent.DeviceRegistryClient serviceClient()` -> `fluent.DeviceRegistryManagementClient serviceClient()`
+
+#### `models.AssetEndpointProfileProperties` was modified
+
+* `transportAuthentication()` was removed
+* `userAuthentication()` was removed
+* `withTransportAuthentication(models.TransportAuthentication)` was removed
+* `withUserAuthentication(models.UserAuthentication)` was removed
+
+#### `models.AssetUpdateProperties` was modified
+
+* `withDefaultDataPointsConfiguration(java.lang.String)` was removed
+* `assetType()` was removed
+* `dataPoints()` was removed
+* `withAssetType(java.lang.String)` was removed
+* `defaultDataPointsConfiguration()` was removed
+* `withDataPoints(java.util.List)` was removed
+
+#### `models.UsernamePasswordCredentials` was modified
+
+* `usernameReference()` was removed
+* `withPasswordReference(java.lang.String)` was removed
+* `withUsernameReference(java.lang.String)` was removed
+* `passwordReference()` was removed
+
+#### `models.AssetEndpointProfileUpdateProperties` was modified
+
+* `userAuthentication()` was removed
+* `withUserAuthentication(models.UserAuthentication)` was removed
+* `withTransportAuthentication(models.TransportAuthentication)` was removed
+* `transportAuthentication()` was removed
+
+#### `models.DataPoint` was modified
+
+* `withCapabilityId(java.lang.String)` was removed
+* `dataSource()` was removed
+* `capabilityId()` was removed
+* `dataPointConfiguration()` was removed
+* `withObservabilityMode(models.DataPointsObservabilityMode)` was removed
+* `models.DataPointsObservabilityMode observabilityMode()` -> `models.DataPointObservabilityMode observabilityMode()`
+* `name()` was removed
+
+### Features Added
+
+* `models.AssetEndpointProfileStatus` was added
+
+* `models.DiscoveredEvent` was added
+
+* `models.Dataset` was added
+
+* `models.Schema` was added
+
+* `models.DataPointObservabilityMode` was added
+
+* `models.Authentication` was added
+
+* `models.DiscoveredAsset$Definition` was added
+
+* `models.SchemaProperties` was added
+
+* `models.DiscoveredAsset$DefinitionStages` was added
+
+* `models.DiscoveredAssets` was added
+
+* `implementation.models.SchemaListResult` was added
+
+* `models.SystemAssignedServiceIdentityType` was added
+
+* `models.SchemaRegistry$Definition` was added
+
+* `models.AuthenticationMethod` was added
+
+* `implementation.models.DiscoveredAssetEndpointProfileListResult` was added
+
+* `models.DataPointBase` was added
+
+* `models.EventBase` was added
+
+* `implementation.models.OperationListResult` was added
+
+* `models.DiscoveredAssetEndpointProfile$Definition` was added
+
+* `models.SchemaVersion` was added
+
+* `models.DiscoveredDataPoint` was added
+
+* `models.Schema$DefinitionStages` was added
+
+* `models.Format` was added
+
+* `models.EventObservabilityMode` was added
+
+* `models.TopicRetainType` was added
+
+* `models.SchemaRegistryUpdateProperties` was added
+
+* `models.DiscoveredAssetEndpointProfile` was added
+
+* `models.SystemAssignedServiceIdentity` was added
+
+* `models.SchemaRegistryProperties` was added
+
+* `models.DiscoveredAssetEndpointProfile$DefinitionStages` was added
+
+* `models.DiscoveredAssetEndpointProfiles` was added
+
+* `models.SchemaVersion$DefinitionStages` was added
+
+* `models.SchemaVersionProperties` was added
+
+* `models.AssetStatusDataset` was added
+
+* `implementation.models.SchemaVersionListResult` was added
+
+* `models.DiscoveredAssetProperties` was added
+
+* `models.DiscoveredAssetEndpointProfile$UpdateStages` was added
+
+* `models.DiscoveredAssetEndpointProfileProperties` was added
+
+* `models.AssetEndpointProfileStatusError` was added
+
+* `models.SchemaRegistry$UpdateStages` was added
+
+* `models.DiscoveredAssetEndpointProfileUpdateProperties` was added
+
+* `models.BillingContainer` was added
+
+* `models.AssetStatusEvent` was added
+
+* `models.DiscoveredAsset$Update` was added
+
+* `models.BillingContainerProperties` was added
+
+* `implementation.models.SchemaRegistryListResult` was added
+
+* `models.DiscoveredAssetUpdateProperties` was added
+
+* `models.SchemaRegistry$Update` was added
+
+* `models.SchemaType` was added
+
+* `models.SchemaRegistries` was added
+
+* `models.SchemaRegistryUpdate` was added
+
+* `models.DiscoveredAsset$UpdateStages` was added
+
+* `models.Schema$Definition` was added
+
+* `models.SchemaVersion$Definition` was added
+
+* `models.Schemas` was added
+
+* `models.BillingContainers` was added
+
+* `models.DiscoveredAssetEndpointProfile$Update` was added
+
+* `models.SchemaRegistry$DefinitionStages` was added
+
+* `models.SchemaVersions` was added
+
+* `models.MessageSchemaReference` was added
+
+* `models.DiscoveredAssetUpdate` was added
+
+* `models.DiscoveredAssetEndpointProfileUpdate` was added
+
+* `models.SchemaRegistry` was added
+
+* `implementation.models.BillingContainerListResult` was added
+
+* `implementation.models.DiscoveredAssetListResult` was added
+
+* `models.DiscoveredDataset` was added
+
+* `models.Topic` was added
+
+* `models.DiscoveredAsset` was added
+
+#### `models.Event` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `withEventConfiguration(java.lang.String)` was added
+* `withTopic(models.Topic)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+* `withName(java.lang.String)` was added
+* `withObservabilityMode(models.EventObservabilityMode)` was added
+* `withEventNotifier(java.lang.String)` was added
+
+#### `models.AssetProperties` was modified
+
+* `defaultTopic()` was added
+* `withDefaultTopic(models.Topic)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+* `discoveredAssetRefs()` was added
+* `withDiscoveredAssetRefs(java.util.List)` was added
+* `assetEndpointProfileRef()` was added
+* `withDefaultDatasetsConfiguration(java.lang.String)` was added
+* `datasets()` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+* `withDatasets(java.util.List)` was added
+* `withAssetEndpointProfileRef(java.lang.String)` was added
+* `defaultDatasetsConfiguration()` was added
+
+#### `models.X509Credentials` was modified
+
+* `certificateSecretName()` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+* `withCertificateSecretName(java.lang.String)` was added
+
+#### `implementation.models.AssetListResult` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.AssetStatus` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `events()` was added
+* `datasets()` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.OperationStatusResult` was modified
+
+* `resourceId()` was added
+
+#### `models.AssetStatusError` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.AssetUpdate` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `DeviceRegistryManager` was modified
+
+* `discoveredAssets()` was added
+* `schemaRegistries()` was added
+* `billingContainers()` was added
+* `discoveredAssetEndpointProfiles()` was added
+* `schemas()` was added
+* `schemaVersions()` was added
+
+#### `models.AssetEndpointProfileProperties` was modified
+
+* `discoveredAssetEndpointProfileRef()` was added
+* `withEndpointProfileType(java.lang.String)` was added
+* `endpointProfileType()` was added
+* `status()` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+* `withDiscoveredAssetEndpointProfileRef(java.lang.String)` was added
+* `withAuthentication(models.Authentication)` was added
+* `authentication()` was added
+
+#### `models.AssetUpdateProperties` was modified
+
+* `defaultDatasetsConfiguration()` was added
+* `withDefaultTopic(models.Topic)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+* `defaultTopic()` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+* `datasets()` was added
+* `withDefaultDatasetsConfiguration(java.lang.String)` was added
+* `withDatasets(java.util.List)` was added
+
+#### `models.UsernamePasswordCredentials` was modified
+
+* `withUsernameSecretName(java.lang.String)` was added
+* `passwordSecretName()` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+* `usernameSecretName()` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+* `withPasswordSecretName(java.lang.String)` was added
+
+#### `models.ExtendedLocation` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.AssetEndpointProfileUpdateProperties` was modified
+
+* `endpointProfileType()` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+* `withAuthentication(models.Authentication)` was added
+* `authentication()` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+* `withEndpointProfileType(java.lang.String)` was added
+
+#### `models.AssetEndpointProfileUpdate` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.OperationDisplay` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.DataPoint` was modified
+
+* `withDataPointConfiguration(java.lang.String)` was added
+* `withObservabilityMode(models.DataPointObservabilityMode)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+* `withName(java.lang.String)` was added
+* `withDataSource(java.lang.String)` was added
+
+#### `implementation.models.AssetEndpointProfileListResult` was modified
-### Other Changes
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
## 1.0.0-beta.1 (2024-04-26)
diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/README.md b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/README.md
index 92dc385be4a97..de2739da6ed84 100644
--- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/README.md
+++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/README.md
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
com.azure.resourcemanager
azure-resourcemanager-deviceregistry
- 1.0.0-beta.1
+ 1.0.0-beta.2
```
[//]: # ({x-version-update-end})
@@ -45,15 +45,11 @@ Azure Management Libraries require a `TokenCredential` implementation for authen
### Authentication
-By default, Microsoft Entra ID token authentication depends on correct configuration of the following environment variables.
+Microsoft Entra ID token authentication relies on the [credential class][azure_identity_credentials] from [Azure Identity][azure_identity] package.
-- `AZURE_CLIENT_ID` for Azure client ID.
-- `AZURE_TENANT_ID` for Azure tenant ID.
-- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate.
+Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable.
-In addition, Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable.
-
-With above configuration, `azure` client can be authenticated using the following code:
+Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code:
```java
AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
@@ -97,6 +93,7 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/
[azure_subscription]: https://azure.microsoft.com/free/
[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity
+[azure_identity_credentials]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/identity/azure-identity#credentials
[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty
[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md
[design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md
diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/SAMPLE.md b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/SAMPLE.md
index 39981bf8d4132..79279e2d46d70 100644
--- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/SAMPLE.md
+++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/SAMPLE.md
@@ -19,6 +19,29 @@
- [ListByResourceGroup](#assets_listbyresourcegroup)
- [Update](#assets_update)
+## BillingContainers
+
+- [Get](#billingcontainers_get)
+- [List](#billingcontainers_list)
+
+## DiscoveredAssetEndpointProfiles
+
+- [CreateOrReplace](#discoveredassetendpointprofiles_createorreplace)
+- [Delete](#discoveredassetendpointprofiles_delete)
+- [GetByResourceGroup](#discoveredassetendpointprofiles_getbyresourcegroup)
+- [List](#discoveredassetendpointprofiles_list)
+- [ListByResourceGroup](#discoveredassetendpointprofiles_listbyresourcegroup)
+- [Update](#discoveredassetendpointprofiles_update)
+
+## DiscoveredAssets
+
+- [CreateOrReplace](#discoveredassets_createorreplace)
+- [Delete](#discoveredassets_delete)
+- [GetByResourceGroup](#discoveredassets_getbyresourcegroup)
+- [List](#discoveredassets_list)
+- [ListByResourceGroup](#discoveredassets_listbyresourcegroup)
+- [Update](#discoveredassets_update)
+
## OperationStatus
- [Get](#operationstatus_get)
@@ -26,13 +49,36 @@
## Operations
- [List](#operations_list)
+
+## SchemaRegistries
+
+- [CreateOrReplace](#schemaregistries_createorreplace)
+- [Delete](#schemaregistries_delete)
+- [GetByResourceGroup](#schemaregistries_getbyresourcegroup)
+- [List](#schemaregistries_list)
+- [ListByResourceGroup](#schemaregistries_listbyresourcegroup)
+- [Update](#schemaregistries_update)
+
+## SchemaVersions
+
+- [CreateOrReplace](#schemaversions_createorreplace)
+- [Delete](#schemaversions_delete)
+- [Get](#schemaversions_get)
+- [ListBySchema](#schemaversions_listbyschema)
+
+## Schemas
+
+- [CreateOrReplace](#schemas_createorreplace)
+- [Delete](#schemas_delete)
+- [Get](#schemas_get)
+- [ListBySchemaRegistry](#schemas_listbyschemaregistry)
### AssetEndpointProfiles_CreateOrReplace
```java
import com.azure.resourcemanager.deviceregistry.models.AssetEndpointProfileProperties;
+import com.azure.resourcemanager.deviceregistry.models.Authentication;
+import com.azure.resourcemanager.deviceregistry.models.AuthenticationMethod;
import com.azure.resourcemanager.deviceregistry.models.ExtendedLocation;
-import com.azure.resourcemanager.deviceregistry.models.UserAuthentication;
-import com.azure.resourcemanager.deviceregistry.models.UserAuthenticationMode;
import java.util.HashMap;
import java.util.Map;
@@ -41,9 +87,33 @@ import java.util.Map;
*/
public final class AssetEndpointProfilesCreateOrReplaceSamples {
/*
- * x-ms-original-file:
- * specification/deviceregistry/DeviceRegistry.Management/examples/2023-11-01-preview/Create_AssetEndpointProfile.
- * json
+ * x-ms-original-file: 2024-09-01-preview/Create_AssetEndpointProfile_With_DiscoveredAepRef.json
+ */
+ /**
+ * Sample code: Create_AssetEndpointProfile_With_DiscoveredAepRef.
+ *
+ * @param manager Entry point to DeviceRegistryManager.
+ */
+ public static void createAssetEndpointProfileWithDiscoveredAepRef(
+ com.azure.resourcemanager.deviceregistry.DeviceRegistryManager manager) {
+ manager.assetEndpointProfiles()
+ .define("my-assetendpointprofile")
+ .withRegion("West Europe")
+ .withExistingResourceGroup("myResourceGroup")
+ .withExtendedLocation(new ExtendedLocation().withType("CustomLocation")
+ .withName(
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1"))
+ .withTags(mapOf("site", "building-1"))
+ .withProperties(
+ new AssetEndpointProfileProperties().withTargetAddress("https://www.example.com/myTargetAddress")
+ .withEndpointProfileType("myEndpointProfileType")
+ .withAuthentication(new Authentication().withMethod(AuthenticationMethod.ANONYMOUS))
+ .withDiscoveredAssetEndpointProfileRef("discoveredAssetEndpointProfile1"))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: 2024-09-01-preview/Create_AssetEndpointProfile.json
*/
/**
* Sample code: Create_AssetEndpointProfile.
@@ -62,7 +132,8 @@ public final class AssetEndpointProfilesCreateOrReplaceSamples {
.withTags(mapOf("site", "building-1"))
.withProperties(
new AssetEndpointProfileProperties().withTargetAddress("https://www.example.com/myTargetAddress")
- .withUserAuthentication(new UserAuthentication().withMode(UserAuthenticationMode.ANONYMOUS)))
+ .withEndpointProfileType("myEndpointProfileType")
+ .withAuthentication(new Authentication().withMethod(AuthenticationMethod.ANONYMOUS)))
.create();
}
@@ -88,9 +159,7 @@ public final class AssetEndpointProfilesCreateOrReplaceSamples {
*/
public final class AssetEndpointProfilesDeleteSamples {
/*
- * x-ms-original-file:
- * specification/deviceregistry/DeviceRegistry.Management/examples/2023-11-01-preview/Delete_AssetEndpointProfile.
- * json
+ * x-ms-original-file: 2024-09-01-preview/Delete_AssetEndpointProfile.json
*/
/**
* Sample code: Delete_AssetEndpointProfile.
@@ -113,8 +182,7 @@ public final class AssetEndpointProfilesDeleteSamples {
*/
public final class AssetEndpointProfilesGetByResourceGroupSamples {
/*
- * x-ms-original-file:
- * specification/deviceregistry/DeviceRegistry.Management/examples/2023-11-01-preview/Get_AssetEndpointProfile.json
+ * x-ms-original-file: 2024-09-01-preview/Get_AssetEndpointProfile.json
*/
/**
* Sample code: Get_AssetEndpointProfile.
@@ -126,6 +194,21 @@ public final class AssetEndpointProfilesGetByResourceGroupSamples {
.getByResourceGroupWithResponse("myResourceGroup", "my-assetendpointprofile",
com.azure.core.util.Context.NONE);
}
+
+ /*
+ * x-ms-original-file: 2024-09-01-preview/Get_AssetEndpointProfile_With_SyncStatus.json
+ */
+ /**
+ * Sample code: Get_AssetEndpointProfile_With_SyncStatus.
+ *
+ * @param manager Entry point to DeviceRegistryManager.
+ */
+ public static void
+ getAssetEndpointProfileWithSyncStatus(com.azure.resourcemanager.deviceregistry.DeviceRegistryManager manager) {
+ manager.assetEndpointProfiles()
+ .getByResourceGroupWithResponse("myResourceGroup", "my-assetendpointprofile",
+ com.azure.core.util.Context.NONE);
+ }
}
```
@@ -137,8 +220,7 @@ public final class AssetEndpointProfilesGetByResourceGroupSamples {
*/
public final class AssetEndpointProfilesListSamples {
/*
- * x-ms-original-file: specification/deviceregistry/DeviceRegistry.Management/examples/2023-11-01-preview/
- * List_AssetEndpointProfiles_Subscription.json
+ * x-ms-original-file: 2024-09-01-preview/List_AssetEndpointProfiles_Subscription.json
*/
/**
* Sample code: List_AssetEndpointProfiles_Subscription.
@@ -160,8 +242,7 @@ public final class AssetEndpointProfilesListSamples {
*/
public final class AssetEndpointProfilesListByResourceGroupSamples {
/*
- * x-ms-original-file: specification/deviceregistry/DeviceRegistry.Management/examples/2023-11-01-preview/
- * List_AssetEndpointProfiles_ResourceGroup.json
+ * x-ms-original-file: 2024-09-01-preview/List_AssetEndpointProfiles_ResourceGroup.json
*/
/**
* Sample code: List_AssetEndpointProfiles_ResourceGroup.
@@ -186,9 +267,7 @@ import com.azure.resourcemanager.deviceregistry.models.AssetEndpointProfileUpdat
*/
public final class AssetEndpointProfilesUpdateSamples {
/*
- * x-ms-original-file:
- * specification/deviceregistry/DeviceRegistry.Management/examples/2023-11-01-preview/Update_AssetEndpointProfile.
- * json
+ * x-ms-original-file: 2024-09-01-preview/Update_AssetEndpointProfile.json
*/
/**
* Sample code: Update_AssetEndpointProfile.
@@ -214,10 +293,13 @@ public final class AssetEndpointProfilesUpdateSamples {
```java
import com.azure.resourcemanager.deviceregistry.models.AssetProperties;
import com.azure.resourcemanager.deviceregistry.models.DataPoint;
-import com.azure.resourcemanager.deviceregistry.models.DataPointsObservabilityMode;
+import com.azure.resourcemanager.deviceregistry.models.DataPointObservabilityMode;
+import com.azure.resourcemanager.deviceregistry.models.Dataset;
import com.azure.resourcemanager.deviceregistry.models.Event;
-import com.azure.resourcemanager.deviceregistry.models.EventsObservabilityMode;
+import com.azure.resourcemanager.deviceregistry.models.EventObservabilityMode;
import com.azure.resourcemanager.deviceregistry.models.ExtendedLocation;
+import com.azure.resourcemanager.deviceregistry.models.Topic;
+import com.azure.resourcemanager.deviceregistry.models.TopicRetainType;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
@@ -227,8 +309,205 @@ import java.util.Map;
*/
public final class AssetsCreateOrReplaceSamples {
/*
- * x-ms-original-file: specification/deviceregistry/DeviceRegistry.Management/examples/2023-11-01-preview/
- * Create_Asset_Without_DisplayName.json
+ * x-ms-original-file: 2024-09-01-preview/Create_Asset_With_DiscoveredAssetRef.json
+ */
+ /**
+ * Sample code: Create_Asset_With_DiscoveredAssetRefs.
+ *
+ * @param manager Entry point to DeviceRegistryManager.
+ */
+ public static void
+ createAssetWithDiscoveredAssetRefs(com.azure.resourcemanager.deviceregistry.DeviceRegistryManager manager) {
+ manager.assets()
+ .define("my-asset")
+ .withRegion("West Europe")
+ .withExistingResourceGroup("myResourceGroup")
+ .withExtendedLocation(new ExtendedLocation().withType("CustomLocation")
+ .withName(
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1"))
+ .withTags(mapOf("site", "building-1"))
+ .withProperties(new AssetProperties().withEnabled(true)
+ .withExternalAssetId("8ZBA6LRHU0A458969")
+ .withDisplayName("AssetDisplayName")
+ .withDescription("This is a sample Asset")
+ .withAssetEndpointProfileRef("myAssetEndpointProfile")
+ .withManufacturer("Contoso")
+ .withManufacturerUri("https://www.contoso.com/manufacturerUri")
+ .withModel("ContosoModel")
+ .withProductCode("fakeTokenPlaceholder")
+ .withHardwareRevision("1.0")
+ .withSoftwareRevision("2.0")
+ .withDocumentationUri("https://www.example.com/manual")
+ .withSerialNumber("64-103816-519918-8")
+ .withDiscoveredAssetRefs(Arrays.asList("discoveredAsset1", "discoveredAsset2"))
+ .withDefaultDatasetsConfiguration(
+ "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}")
+ .withDefaultEventsConfiguration("{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}")
+ .withDefaultTopic(new Topic().withPath("/path/defaultTopic").withRetain(TopicRetainType.KEEP))
+ .withDatasets(Arrays.asList(new Dataset().withName("dataset1")
+ .withDatasetConfiguration("{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}")
+ .withTopic(new Topic().withPath("/path/dataset1").withRetain(TopicRetainType.KEEP))
+ .withDataPoints(Arrays.asList(
+ new DataPoint().withName("dataPoint1")
+ .withDataSource("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1")
+ .withDataPointConfiguration(
+ "{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}")
+ .withObservabilityMode(DataPointObservabilityMode.COUNTER),
+ new DataPoint().withName("dataPoint2")
+ .withDataSource("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2")
+ .withDataPointConfiguration(
+ "{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}")
+ .withObservabilityMode(DataPointObservabilityMode.NONE)))))
+ .withEvents(
+ Arrays
+ .asList(
+ new Event().withName("event1")
+ .withEventNotifier("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3")
+ .withEventConfiguration(
+ "{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}")
+ .withTopic(new Topic().withPath("/path/event1").withRetain(TopicRetainType.KEEP))
+ .withObservabilityMode(EventObservabilityMode.NONE),
+ new Event().withName("event2")
+ .withEventNotifier("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4")
+ .withEventConfiguration(
+ "{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}")
+ .withObservabilityMode(EventObservabilityMode.LOG))))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: 2024-09-01-preview/Create_Asset_Without_ExternalAssetId.json
+ */
+ /**
+ * Sample code: Create_Asset_Without_ExternalAssetId.
+ *
+ * @param manager Entry point to DeviceRegistryManager.
+ */
+ public static void
+ createAssetWithoutExternalAssetId(com.azure.resourcemanager.deviceregistry.DeviceRegistryManager manager) {
+ manager.assets()
+ .define("my-asset")
+ .withRegion("West Europe")
+ .withExistingResourceGroup("myResourceGroup")
+ .withExtendedLocation(new ExtendedLocation().withType("CustomLocation")
+ .withName(
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1"))
+ .withTags(mapOf("site", "building-1"))
+ .withProperties(new AssetProperties().withEnabled(true)
+ .withDisplayName("AssetDisplayName")
+ .withDescription("This is a sample Asset")
+ .withAssetEndpointProfileRef("myAssetEndpointProfile")
+ .withManufacturer("Contoso")
+ .withManufacturerUri("https://www.contoso.com/manufacturerUri")
+ .withModel("ContosoModel")
+ .withProductCode("fakeTokenPlaceholder")
+ .withHardwareRevision("1.0")
+ .withSoftwareRevision("2.0")
+ .withDocumentationUri("https://www.example.com/manual")
+ .withSerialNumber("64-103816-519918-8")
+ .withDefaultDatasetsConfiguration(
+ "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}")
+ .withDefaultEventsConfiguration("{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}")
+ .withDefaultTopic(new Topic().withPath("/path/defaultTopic").withRetain(TopicRetainType.KEEP))
+ .withDatasets(Arrays.asList(new Dataset().withName("dataset1")
+ .withDatasetConfiguration("{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}")
+ .withTopic(new Topic().withPath("/path/dataset1").withRetain(TopicRetainType.KEEP))
+ .withDataPoints(Arrays.asList(
+ new DataPoint().withName("dataPoint1")
+ .withDataSource("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1")
+ .withDataPointConfiguration(
+ "{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}")
+ .withObservabilityMode(DataPointObservabilityMode.COUNTER),
+ new DataPoint().withName("dataPoint2")
+ .withDataSource("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2")
+ .withDataPointConfiguration(
+ "{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}")
+ .withObservabilityMode(DataPointObservabilityMode.NONE)))))
+ .withEvents(
+ Arrays
+ .asList(
+ new Event().withName("event1")
+ .withEventNotifier("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3")
+ .withEventConfiguration(
+ "{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}")
+ .withTopic(new Topic().withPath("/path/event1").withRetain(TopicRetainType.KEEP))
+ .withObservabilityMode(EventObservabilityMode.NONE),
+ new Event().withName("event2")
+ .withEventNotifier("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4")
+ .withEventConfiguration(
+ "{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}")
+ .withObservabilityMode(EventObservabilityMode.LOG))))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: 2024-09-01-preview/Create_Asset_With_ExternalAssetId.json
+ */
+ /**
+ * Sample code: Create_Asset_With_ExternalAssetId.
+ *
+ * @param manager Entry point to DeviceRegistryManager.
+ */
+ public static void
+ createAssetWithExternalAssetId(com.azure.resourcemanager.deviceregistry.DeviceRegistryManager manager) {
+ manager.assets()
+ .define("my-asset")
+ .withRegion("West Europe")
+ .withExistingResourceGroup("myResourceGroup")
+ .withExtendedLocation(new ExtendedLocation().withType("CustomLocation")
+ .withName(
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1"))
+ .withTags(mapOf("site", "building-1"))
+ .withProperties(new AssetProperties().withEnabled(true)
+ .withExternalAssetId("8ZBA6LRHU0A458969")
+ .withDisplayName("AssetDisplayName")
+ .withDescription("This is a sample Asset")
+ .withAssetEndpointProfileRef("myAssetEndpointProfile")
+ .withManufacturer("Contoso")
+ .withManufacturerUri("https://www.contoso.com/manufacturerUri")
+ .withModel("ContosoModel")
+ .withProductCode("fakeTokenPlaceholder")
+ .withHardwareRevision("1.0")
+ .withSoftwareRevision("2.0")
+ .withDocumentationUri("https://www.example.com/manual")
+ .withSerialNumber("64-103816-519918-8")
+ .withDefaultDatasetsConfiguration(
+ "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}")
+ .withDefaultEventsConfiguration("{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}")
+ .withDefaultTopic(new Topic().withPath("/path/defaultTopic").withRetain(TopicRetainType.KEEP))
+ .withDatasets(Arrays.asList(new Dataset().withName("dataset1")
+ .withDatasetConfiguration("{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}")
+ .withTopic(new Topic().withPath("/path/dataset1").withRetain(TopicRetainType.KEEP))
+ .withDataPoints(Arrays.asList(
+ new DataPoint().withName("dataPoint1")
+ .withDataSource("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1")
+ .withDataPointConfiguration(
+ "{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}")
+ .withObservabilityMode(DataPointObservabilityMode.COUNTER),
+ new DataPoint().withName("dataPoint2")
+ .withDataSource("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2")
+ .withDataPointConfiguration(
+ "{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}")
+ .withObservabilityMode(DataPointObservabilityMode.NONE)))))
+ .withEvents(
+ Arrays
+ .asList(
+ new Event().withName("event1")
+ .withEventNotifier("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3")
+ .withEventConfiguration(
+ "{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}")
+ .withTopic(new Topic().withPath("/path/event1").withRetain(TopicRetainType.KEEP))
+ .withObservabilityMode(EventObservabilityMode.NONE),
+ new Event().withName("event2")
+ .withEventNotifier("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4")
+ .withEventConfiguration(
+ "{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}")
+ .withObservabilityMode(EventObservabilityMode.LOG))))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: 2024-09-01-preview/Create_Asset_Without_DisplayName.json
*/
/**
* Sample code: Create_Asset_Without_DisplayName.
@@ -245,11 +524,10 @@ public final class AssetsCreateOrReplaceSamples {
.withName(
"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1"))
.withTags(mapOf("site", "building-1"))
- .withProperties(new AssetProperties().withAssetType("MyAssetType")
- .withEnabled(true)
+ .withProperties(new AssetProperties().withEnabled(true)
.withExternalAssetId("8ZBA6LRHU0A458969")
.withDescription("This is a sample Asset")
- .withAssetEndpointProfileUri("https://www.example.com/myAssetEndpointProfile")
+ .withAssetEndpointProfileRef("myAssetEndpointProfile")
.withManufacturer("Contoso")
.withManufacturerUri("https://www.contoso.com/manufacturerUri")
.withModel("ContosoModel")
@@ -258,29 +536,38 @@ public final class AssetsCreateOrReplaceSamples {
.withSoftwareRevision("2.0")
.withDocumentationUri("https://www.example.com/manual")
.withSerialNumber("64-103816-519918-8")
- .withDefaultDataPointsConfiguration(
+ .withDefaultDatasetsConfiguration(
"{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}")
.withDefaultEventsConfiguration("{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}")
- .withDataPoints(Arrays.asList(
- new DataPoint().withDataSource("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1")
- .withCapabilityId("dtmi:com:example:Thermostat:__temperature;1")
- .withObservabilityMode(DataPointsObservabilityMode.COUNTER)
- .withDataPointConfiguration(
- "{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}"),
- new DataPoint().withDataSource("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2")
- .withCapabilityId("dtmi:com:example:Thermostat:__pressure;1")
- .withObservabilityMode(DataPointsObservabilityMode.NONE)
- .withDataPointConfiguration(
- "{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}")))
- .withEvents(Arrays.asList(
- new Event().withEventNotifier("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3")
- .withCapabilityId("dtmi:com:example:Thermostat:__temperature;1")
- .withObservabilityMode(EventsObservabilityMode.NONE)
- .withEventConfiguration("{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}"),
- new Event().withEventNotifier("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4")
- .withCapabilityId("dtmi:com:example:Thermostat:__pressure;1")
- .withObservabilityMode(EventsObservabilityMode.LOG)
- .withEventConfiguration("{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}"))))
+ .withDefaultTopic(new Topic().withPath("/path/defaultTopic").withRetain(TopicRetainType.KEEP))
+ .withDatasets(Arrays.asList(new Dataset().withName("dataset1")
+ .withDatasetConfiguration("{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}")
+ .withTopic(new Topic().withPath("/path/dataset1").withRetain(TopicRetainType.KEEP))
+ .withDataPoints(Arrays.asList(
+ new DataPoint().withName("dataPoint1")
+ .withDataSource("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1")
+ .withDataPointConfiguration(
+ "{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}")
+ .withObservabilityMode(DataPointObservabilityMode.COUNTER),
+ new DataPoint().withName("dataPoint2")
+ .withDataSource("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2")
+ .withDataPointConfiguration(
+ "{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}")
+ .withObservabilityMode(DataPointObservabilityMode.NONE)))))
+ .withEvents(
+ Arrays
+ .asList(
+ new Event().withName("event1")
+ .withEventNotifier("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3")
+ .withEventConfiguration(
+ "{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}")
+ .withTopic(new Topic().withPath("/path/event1").withRetain(TopicRetainType.KEEP))
+ .withObservabilityMode(EventObservabilityMode.NONE),
+ new Event().withName("event2")
+ .withEventNotifier("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4")
+ .withEventConfiguration(
+ "{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}")
+ .withObservabilityMode(EventObservabilityMode.LOG))))
.create();
}
@@ -306,8 +593,7 @@ public final class AssetsCreateOrReplaceSamples {
*/
public final class AssetsDeleteSamples {
/*
- * x-ms-original-file:
- * specification/deviceregistry/DeviceRegistry.Management/examples/2023-11-01-preview/Delete_Asset.json
+ * x-ms-original-file: 2024-09-01-preview/Delete_Asset.json
*/
/**
* Sample code: Delete_Asset.
@@ -328,8 +614,20 @@ public final class AssetsDeleteSamples {
*/
public final class AssetsGetByResourceGroupSamples {
/*
- * x-ms-original-file:
- * specification/deviceregistry/DeviceRegistry.Management/examples/2023-11-01-preview/Get_Asset.json
+ * x-ms-original-file: 2024-09-01-preview/Get_Asset_With_SyncStatus.json
+ */
+ /**
+ * Sample code: Get_Asset_With_SyncStatus.
+ *
+ * @param manager Entry point to DeviceRegistryManager.
+ */
+ public static void getAssetWithSyncStatus(com.azure.resourcemanager.deviceregistry.DeviceRegistryManager manager) {
+ manager.assets()
+ .getByResourceGroupWithResponse("myResourceGroup", "my-asset", com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: 2024-09-01-preview/Get_Asset.json
*/
/**
* Sample code: Get_Asset.
@@ -351,8 +649,7 @@ public final class AssetsGetByResourceGroupSamples {
*/
public final class AssetsListSamples {
/*
- * x-ms-original-file:
- * specification/deviceregistry/DeviceRegistry.Management/examples/2023-11-01-preview/List_Assets_Subscription.json
+ * x-ms-original-file: 2024-09-01-preview/List_Assets_Subscription.json
*/
/**
* Sample code: List_Assets_Subscription.
@@ -373,8 +670,7 @@ public final class AssetsListSamples {
*/
public final class AssetsListByResourceGroupSamples {
/*
- * x-ms-original-file:
- * specification/deviceregistry/DeviceRegistry.Management/examples/2023-11-01-preview/List_Assets_ResourceGroup.json
+ * x-ms-original-file: 2024-09-01-preview/List_Assets_ResourceGroup.json
*/
/**
* Sample code: List_Assets_ResourceGroup.
@@ -398,8 +694,7 @@ import com.azure.resourcemanager.deviceregistry.models.AssetUpdateProperties;
*/
public final class AssetsUpdateSamples {
/*
- * x-ms-original-file:
- * specification/deviceregistry/DeviceRegistry.Management/examples/2023-11-01-preview/Update_Asset.json
+ * x-ms-original-file: 2024-09-01-preview/Update_Asset.json
*/
/**
* Sample code: Update_Asset.
@@ -417,47 +712,877 @@ public final class AssetsUpdateSamples {
}
```
-### OperationStatus_Get
+### BillingContainers_Get
```java
/**
- * Samples for OperationStatus Get.
+ * Samples for BillingContainers Get.
*/
-public final class OperationStatusGetSamples {
+public final class BillingContainersGetSamples {
/*
- * x-ms-original-file:
- * specification/deviceregistry/DeviceRegistry.Management/examples/2023-11-01-preview/Get_OperationStatus.json
+ * x-ms-original-file: 2024-09-01-preview/Get_BillingContainer.json
*/
/**
- * Sample code: Get_OperationStatus.
+ * Sample code: Get_BillingContainer.
*
* @param manager Entry point to DeviceRegistryManager.
*/
- public static void getOperationStatus(com.azure.resourcemanager.deviceregistry.DeviceRegistryManager manager) {
- manager.operationStatus()
- .getWithResponse("testLocation", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", com.azure.core.util.Context.NONE);
+ public static void getBillingContainer(com.azure.resourcemanager.deviceregistry.DeviceRegistryManager manager) {
+ manager.billingContainers().getWithResponse("my-billingContainer", com.azure.core.util.Context.NONE);
}
}
```
-### Operations_List
+### BillingContainers_List
```java
/**
- * Samples for Operations List.
+ * Samples for BillingContainers List.
*/
-public final class OperationsListSamples {
+public final class BillingContainersListSamples {
/*
- * x-ms-original-file:
- * specification/deviceregistry/DeviceRegistry.Management/examples/2023-11-01-preview/List_Operations.json
+ * x-ms-original-file: 2024-09-01-preview/List_BillingContainers_Subscription.json
*/
/**
- * Sample code: List_Operations.
+ * Sample code: List_BillingContainers_Subscription.
*
* @param manager Entry point to DeviceRegistryManager.
*/
- public static void listOperations(com.azure.resourcemanager.deviceregistry.DeviceRegistryManager manager) {
- manager.operations().list(com.azure.core.util.Context.NONE);
+ public static void
+ listBillingContainersSubscription(com.azure.resourcemanager.deviceregistry.DeviceRegistryManager manager) {
+ manager.billingContainers().list(com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### DiscoveredAssetEndpointProfiles_CreateOrReplace
+
+```java
+import com.azure.resourcemanager.deviceregistry.models.AuthenticationMethod;
+import com.azure.resourcemanager.deviceregistry.models.DiscoveredAssetEndpointProfileProperties;
+import com.azure.resourcemanager.deviceregistry.models.ExtendedLocation;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Samples for DiscoveredAssetEndpointProfiles CreateOrReplace.
+ */
+public final class DiscoveredAssetEndpointProfilesCreateOrReplaceSamples {
+ /*
+ * x-ms-original-file: 2024-09-01-preview/Create_DiscoveredAssetEndpointProfile.json
+ */
+ /**
+ * Sample code: Create_DiscoveredAssetEndpointProfile.
+ *
+ * @param manager Entry point to DeviceRegistryManager.
+ */
+ public static void
+ createDiscoveredAssetEndpointProfile(com.azure.resourcemanager.deviceregistry.DeviceRegistryManager manager) {
+ manager.discoveredAssetEndpointProfiles()
+ .define("my-discoveredassetendpointprofile")
+ .withRegion("West Europe")
+ .withExistingResourceGroup("myResourceGroup")
+ .withExtendedLocation(new ExtendedLocation().withType("CustomLocation")
+ .withName(
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1"))
+ .withTags(mapOf("site", "building-1"))
+ .withProperties(new DiscoveredAssetEndpointProfileProperties()
+ .withTargetAddress("https://www.example.com/myTargetAddress")
+ .withAdditionalConfiguration("{\"foo\": \"bar\"}")
+ .withSupportedAuthenticationMethods(Arrays.asList(AuthenticationMethod.ANONYMOUS,
+ AuthenticationMethod.CERTIFICATE, AuthenticationMethod.USERNAME_PASSWORD))
+ .withEndpointProfileType("myEndpointProfileType")
+ .withDiscoveryId("11111111-1111-1111-1111-111111111111")
+ .withVersion(73766L))
+ .create();
+ }
+
+ // Use "Map.of" if available
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### DiscoveredAssetEndpointProfiles_Delete
+
+```java
+/**
+ * Samples for DiscoveredAssetEndpointProfiles Delete.
+ */
+public final class DiscoveredAssetEndpointProfilesDeleteSamples {
+ /*
+ * x-ms-original-file: 2024-09-01-preview/Delete_DiscoveredAssetEndpointProfile.json
+ */
+ /**
+ * Sample code: Delete_DiscoveredAssetEndpointProfile.
+ *
+ * @param manager Entry point to DeviceRegistryManager.
+ */
+ public static void
+ deleteDiscoveredAssetEndpointProfile(com.azure.resourcemanager.deviceregistry.DeviceRegistryManager manager) {
+ manager.discoveredAssetEndpointProfiles()
+ .delete("myResourceGroup", "my-discoveredassetendpointprofile", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### DiscoveredAssetEndpointProfiles_GetByResourceGroup
+
+```java
+/**
+ * Samples for DiscoveredAssetEndpointProfiles GetByResourceGroup.
+ */
+public final class DiscoveredAssetEndpointProfilesGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: 2024-09-01-preview/Get_DiscoveredAssetEndpointProfile.json
+ */
+ /**
+ * Sample code: Get_DiscoveredAssetEndpointProfile.
+ *
+ * @param manager Entry point to DeviceRegistryManager.
+ */
+ public static void
+ getDiscoveredAssetEndpointProfile(com.azure.resourcemanager.deviceregistry.DeviceRegistryManager manager) {
+ manager.discoveredAssetEndpointProfiles()
+ .getByResourceGroupWithResponse("myResourceGroup", "my-discoveredassetendpointprofile",
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### DiscoveredAssetEndpointProfiles_List
+
+```java
+/**
+ * Samples for DiscoveredAssetEndpointProfiles List.
+ */
+public final class DiscoveredAssetEndpointProfilesListSamples {
+ /*
+ * x-ms-original-file: 2024-09-01-preview/List_DiscoveredAssetEndpointProfiles_Subscription.json
+ */
+ /**
+ * Sample code: List_DiscoveredAssetEndpointProfiles_Subscription.
+ *
+ * @param manager Entry point to DeviceRegistryManager.
+ */
+ public static void listDiscoveredAssetEndpointProfilesSubscription(
+ com.azure.resourcemanager.deviceregistry.DeviceRegistryManager manager) {
+ manager.discoveredAssetEndpointProfiles().list(com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### DiscoveredAssetEndpointProfiles_ListByResourceGroup
+
+```java
+/**
+ * Samples for DiscoveredAssetEndpointProfiles ListByResourceGroup.
+ */
+public final class DiscoveredAssetEndpointProfilesListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: 2024-09-01-preview/List_DiscoveredAssetEndpointProfiles_ResourceGroup.json
+ */
+ /**
+ * Sample code: List_DiscoveredAssetEndpointProfiles_ResourceGroup.
+ *
+ * @param manager Entry point to DeviceRegistryManager.
+ */
+ public static void listDiscoveredAssetEndpointProfilesResourceGroup(
+ com.azure.resourcemanager.deviceregistry.DeviceRegistryManager manager) {
+ manager.discoveredAssetEndpointProfiles()
+ .listByResourceGroup("myResourceGroup", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### DiscoveredAssetEndpointProfiles_Update
+
+```java
+import com.azure.resourcemanager.deviceregistry.models.AuthenticationMethod;
+import com.azure.resourcemanager.deviceregistry.models.DiscoveredAssetEndpointProfile;
+import com.azure.resourcemanager.deviceregistry.models.DiscoveredAssetEndpointProfileUpdateProperties;
+import java.util.Arrays;
+
+/**
+ * Samples for DiscoveredAssetEndpointProfiles Update.
+ */
+public final class DiscoveredAssetEndpointProfilesUpdateSamples {
+ /*
+ * x-ms-original-file: 2024-09-01-preview/Update_DiscoveredAssetEndpointProfile.json
+ */
+ /**
+ * Sample code: Update_DiscoveredAssetEndpointProfile.
+ *
+ * @param manager Entry point to DeviceRegistryManager.
+ */
+ public static void
+ updateDiscoveredAssetEndpointProfile(com.azure.resourcemanager.deviceregistry.DeviceRegistryManager manager) {
+ DiscoveredAssetEndpointProfile resource = manager.discoveredAssetEndpointProfiles()
+ .getByResourceGroupWithResponse("myResourceGroup", "my-discoveredassetendpointprofile",
+ com.azure.core.util.Context.NONE)
+ .getValue();
+ resource.update()
+ .withProperties(new DiscoveredAssetEndpointProfileUpdateProperties()
+ .withTargetAddress("https://www.example.com/myTargetAddress")
+ .withAdditionalConfiguration("{\"foo\": \"bar\"}")
+ .withSupportedAuthenticationMethods(
+ Arrays.asList(AuthenticationMethod.ANONYMOUS, AuthenticationMethod.CERTIFICATE))
+ .withEndpointProfileType("myEndpointProfileType")
+ .withDiscoveryId("11111111-1111-1111-1111-111111111111")
+ .withVersion(73766L))
+ .apply();
+ }
+}
+```
+
+### DiscoveredAssets_CreateOrReplace
+
+```java
+import com.azure.resourcemanager.deviceregistry.models.DiscoveredAssetProperties;
+import com.azure.resourcemanager.deviceregistry.models.DiscoveredDataPoint;
+import com.azure.resourcemanager.deviceregistry.models.DiscoveredDataset;
+import com.azure.resourcemanager.deviceregistry.models.DiscoveredEvent;
+import com.azure.resourcemanager.deviceregistry.models.ExtendedLocation;
+import com.azure.resourcemanager.deviceregistry.models.Topic;
+import com.azure.resourcemanager.deviceregistry.models.TopicRetainType;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Samples for DiscoveredAssets CreateOrReplace.
+ */
+public final class DiscoveredAssetsCreateOrReplaceSamples {
+ /*
+ * x-ms-original-file: 2024-09-01-preview/Create_DiscoveredAsset.json
+ */
+ /**
+ * Sample code: Create_DiscoveredAsset.
+ *
+ * @param manager Entry point to DeviceRegistryManager.
+ */
+ public static void createDiscoveredAsset(com.azure.resourcemanager.deviceregistry.DeviceRegistryManager manager) {
+ manager.discoveredAssets()
+ .define("my-discoveredasset")
+ .withRegion("West Europe")
+ .withExistingResourceGroup("myResourceGroup")
+ .withExtendedLocation(new ExtendedLocation().withType("CustomLocation")
+ .withName(
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1"))
+ .withTags(mapOf("site", "building-1"))
+ .withProperties(new DiscoveredAssetProperties().withAssetEndpointProfileRef("myAssetEndpointProfile")
+ .withDiscoveryId("11111111-1111-1111-1111-111111111111")
+ .withVersion(73766L)
+ .withManufacturer("Contoso")
+ .withManufacturerUri("https://www.contoso.com/manufacturerUri")
+ .withModel("ContosoModel")
+ .withProductCode("fakeTokenPlaceholder")
+ .withHardwareRevision("1.0")
+ .withSoftwareRevision("2.0")
+ .withDocumentationUri("https://www.example.com/manual")
+ .withSerialNumber("64-103816-519918-8")
+ .withDefaultDatasetsConfiguration(
+ "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}")
+ .withDefaultEventsConfiguration("{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}")
+ .withDefaultTopic(new Topic().withPath("/path/defaultTopic").withRetain(TopicRetainType.KEEP))
+ .withDatasets(Arrays.asList(new DiscoveredDataset().withName("dataset1")
+ .withDatasetConfiguration("{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}")
+ .withTopic(new Topic().withPath("/path/dataset1").withRetain(TopicRetainType.KEEP))
+ .withDataPoints(Arrays.asList(
+ new DiscoveredDataPoint().withName("dataPoint1")
+ .withDataSource("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1")
+ .withDataPointConfiguration(
+ "{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}"),
+ new DiscoveredDataPoint().withName("dataPoint2")
+ .withDataSource("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2")
+ .withDataPointConfiguration(
+ "{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}")))))
+ .withEvents(Arrays.asList(
+ new DiscoveredEvent().withName("event1")
+ .withEventNotifier("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3")
+ .withEventConfiguration("{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}")
+ .withTopic(new Topic().withPath("/path/event1").withRetain(TopicRetainType.KEEP)),
+ new DiscoveredEvent().withName("event2")
+ .withEventNotifier("nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4")
+ .withEventConfiguration("{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}"))))
+ .create();
+ }
+
+ // Use "Map.of" if available
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### DiscoveredAssets_Delete
+
+```java
+/**
+ * Samples for DiscoveredAssets Delete.
+ */
+public final class DiscoveredAssetsDeleteSamples {
+ /*
+ * x-ms-original-file: 2024-09-01-preview/Delete_DiscoveredAsset.json
+ */
+ /**
+ * Sample code: Delete_DiscoveredAsset.
+ *
+ * @param manager Entry point to DeviceRegistryManager.
+ */
+ public static void deleteDiscoveredAsset(com.azure.resourcemanager.deviceregistry.DeviceRegistryManager manager) {
+ manager.discoveredAssets().delete("myResourceGroup", "my-discoveredasset", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### DiscoveredAssets_GetByResourceGroup
+
+```java
+/**
+ * Samples for DiscoveredAssets GetByResourceGroup.
+ */
+public final class DiscoveredAssetsGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: 2024-09-01-preview/Get_DiscoveredAsset.json
+ */
+ /**
+ * Sample code: Get_DiscoveredAsset.
+ *
+ * @param manager Entry point to DeviceRegistryManager.
+ */
+ public static void getDiscoveredAsset(com.azure.resourcemanager.deviceregistry.DeviceRegistryManager manager) {
+ manager.discoveredAssets()
+ .getByResourceGroupWithResponse("myResourceGroup", "my-discoveredasset", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### DiscoveredAssets_List
+
+```java
+/**
+ * Samples for DiscoveredAssets List.
+ */
+public final class DiscoveredAssetsListSamples {
+ /*
+ * x-ms-original-file: 2024-09-01-preview/List_DiscoveredAssets_Subscription.json
+ */
+ /**
+ * Sample code: List_DiscoveredAssets_Subscription.
+ *
+ * @param manager Entry point to DeviceRegistryManager.
+ */
+ public static void
+ listDiscoveredAssetsSubscription(com.azure.resourcemanager.deviceregistry.DeviceRegistryManager manager) {
+ manager.discoveredAssets().list(com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### DiscoveredAssets_ListByResourceGroup
+
+```java
+/**
+ * Samples for DiscoveredAssets ListByResourceGroup.
+ */
+public final class DiscoveredAssetsListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: 2024-09-01-preview/List_DiscoveredAssets_ResourceGroup.json
+ */
+ /**
+ * Sample code: List_DiscoveredAssets_ResourceGroup.
+ *
+ * @param manager Entry point to DeviceRegistryManager.
+ */
+ public static void
+ listDiscoveredAssetsResourceGroup(com.azure.resourcemanager.deviceregistry.DeviceRegistryManager manager) {
+ manager.discoveredAssets().listByResourceGroup("myResourceGroup", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### DiscoveredAssets_Update
+
+```java
+import com.azure.resourcemanager.deviceregistry.models.DiscoveredAsset;
+import com.azure.resourcemanager.deviceregistry.models.DiscoveredAssetUpdateProperties;
+import com.azure.resourcemanager.deviceregistry.models.Topic;
+import com.azure.resourcemanager.deviceregistry.models.TopicRetainType;
+
+/**
+ * Samples for DiscoveredAssets Update.
+ */
+public final class DiscoveredAssetsUpdateSamples {
+ /*
+ * x-ms-original-file: 2024-09-01-preview/Update_DiscoveredAsset.json
+ */
+ /**
+ * Sample code: Update_DiscoveredAsset.
+ *
+ * @param manager Entry point to DeviceRegistryManager.
+ */
+ public static void updateDiscoveredAsset(com.azure.resourcemanager.deviceregistry.DeviceRegistryManager manager) {
+ DiscoveredAsset resource = manager.discoveredAssets()
+ .getByResourceGroupWithResponse("myResourceGroup", "my-discoveredasset", com.azure.core.util.Context.NONE)
+ .getValue();
+ resource.update()
+ .withProperties(
+ new DiscoveredAssetUpdateProperties().withDocumentationUri("https://www.example.com/manual-2")
+ .withDefaultTopic(new Topic().withPath("/path/defaultTopic").withRetain(TopicRetainType.NEVER)))
+ .apply();
+ }
+}
+```
+
+### OperationStatus_Get
+
+```java
+/**
+ * Samples for OperationStatus Get.
+ */
+public final class OperationStatusGetSamples {
+ /*
+ * x-ms-original-file: 2024-09-01-preview/Get_OperationStatus.json
+ */
+ /**
+ * Sample code: Get_OperationStatus.
+ *
+ * @param manager Entry point to DeviceRegistryManager.
+ */
+ public static void getOperationStatus(com.azure.resourcemanager.deviceregistry.DeviceRegistryManager manager) {
+ manager.operationStatus()
+ .getWithResponse("testLocation", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### Operations_List
+
+```java
+/**
+ * Samples for Operations List.
+ */
+public final class OperationsListSamples {
+ /*
+ * x-ms-original-file: 2024-09-01-preview/List_Operations.json
+ */
+ /**
+ * Sample code: List_Operations.
+ *
+ * @param manager Entry point to DeviceRegistryManager.
+ */
+ public static void listOperations(com.azure.resourcemanager.deviceregistry.DeviceRegistryManager manager) {
+ manager.operations().list(com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### SchemaRegistries_CreateOrReplace
+
+```java
+import com.azure.resourcemanager.deviceregistry.models.SchemaRegistryProperties;
+import com.azure.resourcemanager.deviceregistry.models.SystemAssignedServiceIdentity;
+import com.azure.resourcemanager.deviceregistry.models.SystemAssignedServiceIdentityType;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Samples for SchemaRegistries CreateOrReplace.
+ */
+public final class SchemaRegistriesCreateOrReplaceSamples {
+ /*
+ * x-ms-original-file: 2024-09-01-preview/Create_SchemaRegistry.json
+ */
+ /**
+ * Sample code: Create_SchemaRegistry.
+ *
+ * @param manager Entry point to DeviceRegistryManager.
+ */
+ public static void createSchemaRegistry(com.azure.resourcemanager.deviceregistry.DeviceRegistryManager manager) {
+ manager.schemaRegistries()
+ .define("my-schema-registry")
+ .withRegion("West Europe")
+ .withExistingResourceGroup("myResourceGroup")
+ .withTags(mapOf())
+ .withProperties(new SchemaRegistryProperties().withNamespace("sr-namespace-001")
+ .withDisplayName("Schema Registry namespace 001")
+ .withDescription("This is a sample Schema Registry")
+ .withStorageAccountContainerUrl("my-blob-storage.blob.core.windows.net/my-container"))
+ .withIdentity(new SystemAssignedServiceIdentity().withType(SystemAssignedServiceIdentityType.NONE))
+ .create();
+ }
+
+ // Use "Map.of" if available
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### SchemaRegistries_Delete
+
+```java
+/**
+ * Samples for SchemaRegistries Delete.
+ */
+public final class SchemaRegistriesDeleteSamples {
+ /*
+ * x-ms-original-file: 2024-09-01-preview/Delete_SchemaRegistry.json
+ */
+ /**
+ * Sample code: Delete_SchemaRegistry.
+ *
+ * @param manager Entry point to DeviceRegistryManager.
+ */
+ public static void deleteSchemaRegistry(com.azure.resourcemanager.deviceregistry.DeviceRegistryManager manager) {
+ manager.schemaRegistries().delete("myResourceGroup", "my-schema-registry", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### SchemaRegistries_GetByResourceGroup
+
+```java
+/**
+ * Samples for SchemaRegistries GetByResourceGroup.
+ */
+public final class SchemaRegistriesGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: 2024-09-01-preview/Get_SchemaRegistry.json
+ */
+ /**
+ * Sample code: Get_SchemaRegistry.
+ *
+ * @param manager Entry point to DeviceRegistryManager.
+ */
+ public static void getSchemaRegistry(com.azure.resourcemanager.deviceregistry.DeviceRegistryManager manager) {
+ manager.schemaRegistries()
+ .getByResourceGroupWithResponse("myResourceGroup", "my-schema-registry", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### SchemaRegistries_List
+
+```java
+/**
+ * Samples for SchemaRegistries List.
+ */
+public final class SchemaRegistriesListSamples {
+ /*
+ * x-ms-original-file: 2024-09-01-preview/List_SchemaRegistries_Subscription.json
+ */
+ /**
+ * Sample code: List_SchemaRegistries_Subscription.
+ *
+ * @param manager Entry point to DeviceRegistryManager.
+ */
+ public static void
+ listSchemaRegistriesSubscription(com.azure.resourcemanager.deviceregistry.DeviceRegistryManager manager) {
+ manager.schemaRegistries().list(com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### SchemaRegistries_ListByResourceGroup
+
+```java
+/**
+ * Samples for SchemaRegistries ListByResourceGroup.
+ */
+public final class SchemaRegistriesListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: 2024-09-01-preview/List_SchemaRegistries_ResourceGroup.json
+ */
+ /**
+ * Sample code: List_SchemaRegistries_ResourceGroup.
+ *
+ * @param manager Entry point to DeviceRegistryManager.
+ */
+ public static void
+ listSchemaRegistriesResourceGroup(com.azure.resourcemanager.deviceregistry.DeviceRegistryManager manager) {
+ manager.schemaRegistries().listByResourceGroup("myResourceGroup", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### SchemaRegistries_Update
+
+```java
+import com.azure.resourcemanager.deviceregistry.models.SchemaRegistry;
+import com.azure.resourcemanager.deviceregistry.models.SchemaRegistryUpdateProperties;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Samples for SchemaRegistries Update.
+ */
+public final class SchemaRegistriesUpdateSamples {
+ /*
+ * x-ms-original-file: 2024-09-01-preview/Update_SchemaRegistry.json
+ */
+ /**
+ * Sample code: Update_SchemaRegistry.
+ *
+ * @param manager Entry point to DeviceRegistryManager.
+ */
+ public static void updateSchemaRegistry(com.azure.resourcemanager.deviceregistry.DeviceRegistryManager manager) {
+ SchemaRegistry resource = manager.schemaRegistries()
+ .getByResourceGroupWithResponse("myResourceGroup", "my-schema-registry", com.azure.core.util.Context.NONE)
+ .getValue();
+ resource.update()
+ .withTags(mapOf())
+ .withProperties(new SchemaRegistryUpdateProperties().withDisplayName("Schema Registry namespace 001")
+ .withDescription("This is a sample Schema Registry"))
+ .apply();
+ }
+
+ // Use "Map.of" if available
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### SchemaVersions_CreateOrReplace
+
+```java
+import com.azure.resourcemanager.deviceregistry.models.SchemaVersionProperties;
+
+/**
+ * Samples for SchemaVersions CreateOrReplace.
+ */
+public final class SchemaVersionsCreateOrReplaceSamples {
+ /*
+ * x-ms-original-file: 2024-09-01-preview/Create_SchemaVersion.json
+ */
+ /**
+ * Sample code: Create_SchemaVersion.
+ *
+ * @param manager Entry point to DeviceRegistryManager.
+ */
+ public static void createSchemaVersion(com.azure.resourcemanager.deviceregistry.DeviceRegistryManager manager) {
+ manager.schemaVersions()
+ .define("1")
+ .withExistingSchema("myResourceGroup", "my-schema-registry", "my-schema")
+ .withProperties(new SchemaVersionProperties().withDescription("Schema version 1")
+ .withSchemaContent(
+ "{\"$schema\": \"http://json-schema.org/draft-07/schema#\",\"type\": \"object\",\"properties\": {\"humidity\": {\"type\": \"string\"},\"temperature\": {\"type\":\"number\"}}}"))
+ .create();
+ }
+}
+```
+
+### SchemaVersions_Delete
+
+```java
+/**
+ * Samples for SchemaVersions Delete.
+ */
+public final class SchemaVersionsDeleteSamples {
+ /*
+ * x-ms-original-file: 2024-09-01-preview/Delete_SchemaVersion.json
+ */
+ /**
+ * Sample code: Delete_SchemaVersion.
+ *
+ * @param manager Entry point to DeviceRegistryManager.
+ */
+ public static void deleteSchemaVersion(com.azure.resourcemanager.deviceregistry.DeviceRegistryManager manager) {
+ manager.schemaVersions()
+ .deleteWithResponse("myResourceGroup", "my-schema-registry", "my-schema", "1",
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### SchemaVersions_Get
+
+```java
+/**
+ * Samples for SchemaVersions Get.
+ */
+public final class SchemaVersionsGetSamples {
+ /*
+ * x-ms-original-file: 2024-09-01-preview/Get_SchemaVersion.json
+ */
+ /**
+ * Sample code: Get_SchemaVersion.
+ *
+ * @param manager Entry point to DeviceRegistryManager.
+ */
+ public static void getSchemaVersion(com.azure.resourcemanager.deviceregistry.DeviceRegistryManager manager) {
+ manager.schemaVersions()
+ .getWithResponse("myResourceGroup", "my-schema-registry", "my-schema", "1",
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### SchemaVersions_ListBySchema
+
+```java
+/**
+ * Samples for SchemaVersions ListBySchema.
+ */
+public final class SchemaVersionsListBySchemaSamples {
+ /*
+ * x-ms-original-file: 2024-09-01-preview/List_SchemaVersions_Schema.json
+ */
+ /**
+ * Sample code: List_SchemaVersions_Schema.
+ *
+ * @param manager Entry point to DeviceRegistryManager.
+ */
+ public static void
+ listSchemaVersionsSchema(com.azure.resourcemanager.deviceregistry.DeviceRegistryManager manager) {
+ manager.schemaVersions()
+ .listBySchema("myResourceGroup", "my-schema-registry", "my-schema", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### Schemas_CreateOrReplace
+
+```java
+import com.azure.resourcemanager.deviceregistry.models.Format;
+import com.azure.resourcemanager.deviceregistry.models.SchemaProperties;
+import com.azure.resourcemanager.deviceregistry.models.SchemaType;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Samples for Schemas CreateOrReplace.
+ */
+public final class SchemasCreateOrReplaceSamples {
+ /*
+ * x-ms-original-file: 2024-09-01-preview/Create_Schema.json
+ */
+ /**
+ * Sample code: Create_Schema.
+ *
+ * @param manager Entry point to DeviceRegistryManager.
+ */
+ public static void createSchema(com.azure.resourcemanager.deviceregistry.DeviceRegistryManager manager) {
+ manager.schemas()
+ .define("my-schema")
+ .withExistingSchemaRegistry("myResourceGroup", "my-schema-registry")
+ .withProperties(new SchemaProperties().withDisplayName("My Schema")
+ .withDescription("This is a sample Schema")
+ .withFormat(Format.JSON_SCHEMA_DRAFT7)
+ .withSchemaType(SchemaType.MESSAGE_SCHEMA)
+ .withTags(mapOf("sampleKey", "fakeTokenPlaceholder")))
+ .create();
+ }
+
+ // Use "Map.of" if available
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### Schemas_Delete
+
+```java
+/**
+ * Samples for Schemas Delete.
+ */
+public final class SchemasDeleteSamples {
+ /*
+ * x-ms-original-file: 2024-09-01-preview/Delete_Schema.json
+ */
+ /**
+ * Sample code: Delete_Schema.
+ *
+ * @param manager Entry point to DeviceRegistryManager.
+ */
+ public static void deleteSchema(com.azure.resourcemanager.deviceregistry.DeviceRegistryManager manager) {
+ manager.schemas()
+ .deleteWithResponse("myResourceGroup", "my-schema-registry", "my-schema", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### Schemas_Get
+
+```java
+/**
+ * Samples for Schemas Get.
+ */
+public final class SchemasGetSamples {
+ /*
+ * x-ms-original-file: 2024-09-01-preview/Get_Schema.json
+ */
+ /**
+ * Sample code: Schemas_Get.
+ *
+ * @param manager Entry point to DeviceRegistryManager.
+ */
+ public static void schemasGet(com.azure.resourcemanager.deviceregistry.DeviceRegistryManager manager) {
+ manager.schemas()
+ .getWithResponse("myResourceGroup", "my-schema-registry", "my-schema", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### Schemas_ListBySchemaRegistry
+
+```java
+/**
+ * Samples for Schemas ListBySchemaRegistry.
+ */
+public final class SchemasListBySchemaRegistrySamples {
+ /*
+ * x-ms-original-file: 2024-09-01-preview/List_Schemas_SchemaRegistry.json
+ */
+ /**
+ * Sample code: List_Schemas_SchemaRegistry.
+ *
+ * @param manager Entry point to DeviceRegistryManager.
+ */
+ public static void
+ listSchemasSchemaRegistry(com.azure.resourcemanager.deviceregistry.DeviceRegistryManager manager) {
+ manager.schemas()
+ .listBySchemaRegistry("myResourceGroup", "my-schema-registry", com.azure.core.util.Context.NONE);
}
}
```
diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/pom.xml b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/pom.xml
index 96277cb6ae652..caa0a58d6da8e 100644
--- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/pom.xml
+++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/pom.xml
@@ -1,7 +1,7 @@
4.0.0
@@ -46,13 +46,9 @@ Code generated by Microsoft (R) TypeSpec Code Generator.
0
0
true
+ false
-
- com.azure
- azure-json
- 1.3.0
-
com.azure
azure-core
@@ -75,5 +71,10 @@ Code generated by Microsoft (R) TypeSpec Code Generator.
1.14.2
test
+
+ com.azure
+ azure-json
+ 1.3.0
+
diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/DeviceRegistryManager.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/DeviceRegistryManager.java
index d2f6a321e567c..1f39c58fce5de 100644
--- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/DeviceRegistryManager.java
+++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/DeviceRegistryManager.java
@@ -23,16 +23,28 @@
import com.azure.core.management.profile.AzureProfile;
import com.azure.core.util.Configuration;
import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.deviceregistry.fluent.DeviceRegistryClient;
+import com.azure.resourcemanager.deviceregistry.fluent.DeviceRegistryManagementClient;
import com.azure.resourcemanager.deviceregistry.implementation.AssetEndpointProfilesImpl;
import com.azure.resourcemanager.deviceregistry.implementation.AssetsImpl;
-import com.azure.resourcemanager.deviceregistry.implementation.DeviceRegistryClientBuilder;
+import com.azure.resourcemanager.deviceregistry.implementation.BillingContainersImpl;
+import com.azure.resourcemanager.deviceregistry.implementation.DeviceRegistryManagementClientBuilder;
+import com.azure.resourcemanager.deviceregistry.implementation.DiscoveredAssetEndpointProfilesImpl;
+import com.azure.resourcemanager.deviceregistry.implementation.DiscoveredAssetsImpl;
import com.azure.resourcemanager.deviceregistry.implementation.OperationStatusImpl;
import com.azure.resourcemanager.deviceregistry.implementation.OperationsImpl;
+import com.azure.resourcemanager.deviceregistry.implementation.SchemaRegistriesImpl;
+import com.azure.resourcemanager.deviceregistry.implementation.SchemaVersionsImpl;
+import com.azure.resourcemanager.deviceregistry.implementation.SchemasImpl;
import com.azure.resourcemanager.deviceregistry.models.AssetEndpointProfiles;
import com.azure.resourcemanager.deviceregistry.models.Assets;
+import com.azure.resourcemanager.deviceregistry.models.BillingContainers;
+import com.azure.resourcemanager.deviceregistry.models.DiscoveredAssetEndpointProfiles;
+import com.azure.resourcemanager.deviceregistry.models.DiscoveredAssets;
import com.azure.resourcemanager.deviceregistry.models.OperationStatus;
import com.azure.resourcemanager.deviceregistry.models.Operations;
+import com.azure.resourcemanager.deviceregistry.models.SchemaRegistries;
+import com.azure.resourcemanager.deviceregistry.models.SchemaVersions;
+import com.azure.resourcemanager.deviceregistry.models.Schemas;
import java.time.Duration;
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
@@ -53,12 +65,24 @@ public final class DeviceRegistryManager {
private AssetEndpointProfiles assetEndpointProfiles;
- private final DeviceRegistryClient clientObject;
+ private BillingContainers billingContainers;
+
+ private DiscoveredAssets discoveredAssets;
+
+ private DiscoveredAssetEndpointProfiles discoveredAssetEndpointProfiles;
+
+ private SchemaRegistries schemaRegistries;
+
+ private Schemas schemas;
+
+ private SchemaVersions schemaVersions;
+
+ private final DeviceRegistryManagementClient clientObject;
private DeviceRegistryManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
Objects.requireNonNull(profile, "'profile' cannot be null.");
- this.clientObject = new DeviceRegistryClientBuilder().pipeline(httpPipeline)
+ this.clientObject = new DeviceRegistryManagementClientBuilder().pipeline(httpPipeline)
.endpoint(profile.getEnvironment().getResourceManagerEndpoint())
.subscriptionId(profile.getSubscriptionId())
.defaultPollInterval(defaultPollInterval)
@@ -312,12 +336,85 @@ public AssetEndpointProfiles assetEndpointProfiles() {
}
/**
- * Gets wrapped service client DeviceRegistryClient providing direct access to the underlying auto-generated API
- * implementation, based on Azure REST API.
+ * Gets the resource collection API of BillingContainers.
+ *
+ * @return Resource collection API of BillingContainers.
+ */
+ public BillingContainers billingContainers() {
+ if (this.billingContainers == null) {
+ this.billingContainers = new BillingContainersImpl(clientObject.getBillingContainers(), this);
+ }
+ return billingContainers;
+ }
+
+ /**
+ * Gets the resource collection API of DiscoveredAssets. It manages DiscoveredAsset.
+ *
+ * @return Resource collection API of DiscoveredAssets.
+ */
+ public DiscoveredAssets discoveredAssets() {
+ if (this.discoveredAssets == null) {
+ this.discoveredAssets = new DiscoveredAssetsImpl(clientObject.getDiscoveredAssets(), this);
+ }
+ return discoveredAssets;
+ }
+
+ /**
+ * Gets the resource collection API of DiscoveredAssetEndpointProfiles. It manages DiscoveredAssetEndpointProfile.
+ *
+ * @return Resource collection API of DiscoveredAssetEndpointProfiles.
+ */
+ public DiscoveredAssetEndpointProfiles discoveredAssetEndpointProfiles() {
+ if (this.discoveredAssetEndpointProfiles == null) {
+ this.discoveredAssetEndpointProfiles
+ = new DiscoveredAssetEndpointProfilesImpl(clientObject.getDiscoveredAssetEndpointProfiles(), this);
+ }
+ return discoveredAssetEndpointProfiles;
+ }
+
+ /**
+ * Gets the resource collection API of SchemaRegistries. It manages SchemaRegistry.
+ *
+ * @return Resource collection API of SchemaRegistries.
+ */
+ public SchemaRegistries schemaRegistries() {
+ if (this.schemaRegistries == null) {
+ this.schemaRegistries = new SchemaRegistriesImpl(clientObject.getSchemaRegistries(), this);
+ }
+ return schemaRegistries;
+ }
+
+ /**
+ * Gets the resource collection API of Schemas. It manages Schema.
+ *
+ * @return Resource collection API of Schemas.
+ */
+ public Schemas schemas() {
+ if (this.schemas == null) {
+ this.schemas = new SchemasImpl(clientObject.getSchemas(), this);
+ }
+ return schemas;
+ }
+
+ /**
+ * Gets the resource collection API of SchemaVersions. It manages SchemaVersion.
+ *
+ * @return Resource collection API of SchemaVersions.
+ */
+ public SchemaVersions schemaVersions() {
+ if (this.schemaVersions == null) {
+ this.schemaVersions = new SchemaVersionsImpl(clientObject.getSchemaVersions(), this);
+ }
+ return schemaVersions;
+ }
+
+ /**
+ * Gets wrapped service client DeviceRegistryManagementClient providing direct access to the underlying
+ * auto-generated API implementation, based on Azure REST API.
*
- * @return Wrapped service client DeviceRegistryClient.
+ * @return Wrapped service client DeviceRegistryManagementClient.
*/
- public DeviceRegistryClient serviceClient() {
+ public DeviceRegistryManagementClient serviceClient() {
return this.clientObject;
}
}
diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/BillingContainersClient.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/BillingContainersClient.java
new file mode 100644
index 0000000000000..37701d41d7546
--- /dev/null
+++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/BillingContainersClient.java
@@ -0,0 +1,64 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.deviceregistry.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.deviceregistry.fluent.models.BillingContainerInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in BillingContainersClient.
+ */
+public interface BillingContainersClient {
+ /**
+ * Get a BillingContainer.
+ *
+ * @param billingContainerName Name of the billing container.
+ * @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 BillingContainer along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String billingContainerName, Context context);
+
+ /**
+ * Get a BillingContainer.
+ *
+ * @param billingContainerName Name of the billing container.
+ * @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 BillingContainer.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BillingContainerInner get(String billingContainerName);
+
+ /**
+ * List BillingContainer 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 BillingContainer list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * List BillingContainer 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 BillingContainer list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+}
diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/DeviceRegistryClient.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/DeviceRegistryManagementClient.java
similarity index 57%
rename from sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/DeviceRegistryClient.java
rename to sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/DeviceRegistryManagementClient.java
index e2bfee52a58bb..6e64e3324c3a7 100644
--- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/DeviceRegistryClient.java
+++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/DeviceRegistryManagementClient.java
@@ -8,9 +8,9 @@
import java.time.Duration;
/**
- * The interface for DeviceRegistryClient class.
+ * The interface for DeviceRegistryManagementClient class.
*/
-public interface DeviceRegistryClient {
+public interface DeviceRegistryManagementClient {
/**
* Gets Service host.
*
@@ -73,4 +73,46 @@ public interface DeviceRegistryClient {
* @return the AssetEndpointProfilesClient object.
*/
AssetEndpointProfilesClient getAssetEndpointProfiles();
+
+ /**
+ * Gets the BillingContainersClient object to access its operations.
+ *
+ * @return the BillingContainersClient object.
+ */
+ BillingContainersClient getBillingContainers();
+
+ /**
+ * Gets the DiscoveredAssetsClient object to access its operations.
+ *
+ * @return the DiscoveredAssetsClient object.
+ */
+ DiscoveredAssetsClient getDiscoveredAssets();
+
+ /**
+ * Gets the DiscoveredAssetEndpointProfilesClient object to access its operations.
+ *
+ * @return the DiscoveredAssetEndpointProfilesClient object.
+ */
+ DiscoveredAssetEndpointProfilesClient getDiscoveredAssetEndpointProfiles();
+
+ /**
+ * Gets the SchemaRegistriesClient object to access its operations.
+ *
+ * @return the SchemaRegistriesClient object.
+ */
+ SchemaRegistriesClient getSchemaRegistries();
+
+ /**
+ * Gets the SchemasClient object to access its operations.
+ *
+ * @return the SchemasClient object.
+ */
+ SchemasClient getSchemas();
+
+ /**
+ * Gets the SchemaVersionsClient object to access its operations.
+ *
+ * @return the SchemaVersionsClient object.
+ */
+ SchemaVersionsClient getSchemaVersions();
}
diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/DiscoveredAssetEndpointProfilesClient.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/DiscoveredAssetEndpointProfilesClient.java
new file mode 100644
index 0000000000000..07d2ea342172e
--- /dev/null
+++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/DiscoveredAssetEndpointProfilesClient.java
@@ -0,0 +1,281 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.deviceregistry.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.deviceregistry.fluent.models.DiscoveredAssetEndpointProfileInner;
+import com.azure.resourcemanager.deviceregistry.models.DiscoveredAssetEndpointProfileUpdate;
+
+/**
+ * An instance of this class provides access to all the operations defined in DiscoveredAssetEndpointProfilesClient.
+ */
+public interface DiscoveredAssetEndpointProfilesClient {
+ /**
+ * Get a DiscoveredAssetEndpointProfile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetEndpointProfileName Discovered Asset Endpoint Profile name parameter.
+ * @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 DiscoveredAssetEndpointProfile along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(String resourceGroupName,
+ String discoveredAssetEndpointProfileName, Context context);
+
+ /**
+ * Get a DiscoveredAssetEndpointProfile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetEndpointProfileName Discovered Asset Endpoint Profile name parameter.
+ * @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 DiscoveredAssetEndpointProfile.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DiscoveredAssetEndpointProfileInner getByResourceGroup(String resourceGroupName,
+ String discoveredAssetEndpointProfileName);
+
+ /**
+ * Create a DiscoveredAssetEndpointProfile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetEndpointProfileName Discovered Asset Endpoint Profile name parameter.
+ * @param resource Resource create parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of discovered Asset Endpoint Profile definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, DiscoveredAssetEndpointProfileInner>
+ beginCreateOrReplace(String resourceGroupName, String discoveredAssetEndpointProfileName,
+ DiscoveredAssetEndpointProfileInner resource);
+
+ /**
+ * Create a DiscoveredAssetEndpointProfile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetEndpointProfileName Discovered Asset Endpoint Profile name parameter.
+ * @param resource Resource create parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of discovered Asset Endpoint Profile definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, DiscoveredAssetEndpointProfileInner>
+ beginCreateOrReplace(String resourceGroupName, String discoveredAssetEndpointProfileName,
+ DiscoveredAssetEndpointProfileInner resource, Context context);
+
+ /**
+ * Create a DiscoveredAssetEndpointProfile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetEndpointProfileName Discovered Asset Endpoint Profile name parameter.
+ * @param resource Resource create parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return discovered Asset Endpoint Profile definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DiscoveredAssetEndpointProfileInner createOrReplace(String resourceGroupName,
+ String discoveredAssetEndpointProfileName, DiscoveredAssetEndpointProfileInner resource);
+
+ /**
+ * Create a DiscoveredAssetEndpointProfile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetEndpointProfileName Discovered Asset Endpoint Profile name parameter.
+ * @param resource Resource create parameters.
+ * @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 discovered Asset Endpoint Profile definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DiscoveredAssetEndpointProfileInner createOrReplace(String resourceGroupName,
+ String discoveredAssetEndpointProfileName, DiscoveredAssetEndpointProfileInner resource, Context context);
+
+ /**
+ * Update a DiscoveredAssetEndpointProfile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetEndpointProfileName Discovered Asset Endpoint Profile name parameter.
+ * @param properties The resource properties to be updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of discovered Asset Endpoint Profile definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, DiscoveredAssetEndpointProfileInner> beginUpdate(
+ String resourceGroupName, String discoveredAssetEndpointProfileName,
+ DiscoveredAssetEndpointProfileUpdate properties);
+
+ /**
+ * Update a DiscoveredAssetEndpointProfile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetEndpointProfileName Discovered Asset Endpoint Profile name parameter.
+ * @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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of discovered Asset Endpoint Profile definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, DiscoveredAssetEndpointProfileInner> beginUpdate(
+ String resourceGroupName, String discoveredAssetEndpointProfileName,
+ DiscoveredAssetEndpointProfileUpdate properties, Context context);
+
+ /**
+ * Update a DiscoveredAssetEndpointProfile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetEndpointProfileName Discovered Asset Endpoint Profile name parameter.
+ * @param properties The resource properties to be updated.
+ * @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 discovered Asset Endpoint Profile definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DiscoveredAssetEndpointProfileInner update(String resourceGroupName, String discoveredAssetEndpointProfileName,
+ DiscoveredAssetEndpointProfileUpdate properties);
+
+ /**
+ * Update a DiscoveredAssetEndpointProfile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetEndpointProfileName Discovered Asset Endpoint Profile name parameter.
+ * @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 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 discovered Asset Endpoint Profile definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DiscoveredAssetEndpointProfileInner update(String resourceGroupName, String discoveredAssetEndpointProfileName,
+ DiscoveredAssetEndpointProfileUpdate properties, Context context);
+
+ /**
+ * Delete a DiscoveredAssetEndpointProfile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetEndpointProfileName Discovered Asset Endpoint Profile name parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String discoveredAssetEndpointProfileName);
+
+ /**
+ * Delete a DiscoveredAssetEndpointProfile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetEndpointProfileName Discovered Asset Endpoint Profile name parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String discoveredAssetEndpointProfileName,
+ Context context);
+
+ /**
+ * Delete a DiscoveredAssetEndpointProfile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetEndpointProfileName Discovered Asset Endpoint Profile name parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String discoveredAssetEndpointProfileName);
+
+ /**
+ * Delete a DiscoveredAssetEndpointProfile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetEndpointProfileName Discovered Asset Endpoint Profile name parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String discoveredAssetEndpointProfileName, Context context);
+
+ /**
+ * List DiscoveredAssetEndpointProfile 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 DiscoveredAssetEndpointProfile list operation as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * List DiscoveredAssetEndpointProfile 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 DiscoveredAssetEndpointProfile list operation as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+
+ /**
+ * List DiscoveredAssetEndpointProfile 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 DiscoveredAssetEndpointProfile list operation as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * List DiscoveredAssetEndpointProfile 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 DiscoveredAssetEndpointProfile list operation as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+}
diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/DiscoveredAssetsClient.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/DiscoveredAssetsClient.java
new file mode 100644
index 0000000000000..3362c3d1e02f9
--- /dev/null
+++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/DiscoveredAssetsClient.java
@@ -0,0 +1,271 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.deviceregistry.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.deviceregistry.fluent.models.DiscoveredAssetInner;
+import com.azure.resourcemanager.deviceregistry.models.DiscoveredAssetUpdate;
+
+/**
+ * An instance of this class provides access to all the operations defined in DiscoveredAssetsClient.
+ */
+public interface DiscoveredAssetsClient {
+ /**
+ * Get a DiscoveredAsset.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetName Discovered Asset name parameter.
+ * @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 DiscoveredAsset along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(String resourceGroupName, String discoveredAssetName,
+ Context context);
+
+ /**
+ * Get a DiscoveredAsset.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetName Discovered Asset name parameter.
+ * @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 DiscoveredAsset.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DiscoveredAssetInner getByResourceGroup(String resourceGroupName, String discoveredAssetName);
+
+ /**
+ * Create a DiscoveredAsset.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetName Discovered Asset name parameter.
+ * @param resource Resource create parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of discovered Asset definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, DiscoveredAssetInner> beginCreateOrReplace(String resourceGroupName,
+ String discoveredAssetName, DiscoveredAssetInner resource);
+
+ /**
+ * Create a DiscoveredAsset.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetName Discovered Asset name parameter.
+ * @param resource Resource create parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of discovered Asset definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, DiscoveredAssetInner> beginCreateOrReplace(String resourceGroupName,
+ String discoveredAssetName, DiscoveredAssetInner resource, Context context);
+
+ /**
+ * Create a DiscoveredAsset.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetName Discovered Asset name parameter.
+ * @param resource Resource create parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return discovered Asset definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DiscoveredAssetInner createOrReplace(String resourceGroupName, String discoveredAssetName,
+ DiscoveredAssetInner resource);
+
+ /**
+ * Create a DiscoveredAsset.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetName Discovered Asset name parameter.
+ * @param resource Resource create parameters.
+ * @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 discovered Asset definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DiscoveredAssetInner createOrReplace(String resourceGroupName, String discoveredAssetName,
+ DiscoveredAssetInner resource, Context context);
+
+ /**
+ * Update a DiscoveredAsset.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetName Discovered Asset name parameter.
+ * @param properties The resource properties to be updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of discovered Asset definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, DiscoveredAssetInner> beginUpdate(String resourceGroupName,
+ String discoveredAssetName, DiscoveredAssetUpdate properties);
+
+ /**
+ * Update a DiscoveredAsset.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetName Discovered Asset name parameter.
+ * @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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of discovered Asset definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, DiscoveredAssetInner> beginUpdate(String resourceGroupName,
+ String discoveredAssetName, DiscoveredAssetUpdate properties, Context context);
+
+ /**
+ * Update a DiscoveredAsset.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetName Discovered Asset name parameter.
+ * @param properties The resource properties to be updated.
+ * @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 discovered Asset definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DiscoveredAssetInner update(String resourceGroupName, String discoveredAssetName, DiscoveredAssetUpdate properties);
+
+ /**
+ * Update a DiscoveredAsset.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetName Discovered Asset name parameter.
+ * @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 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 discovered Asset definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DiscoveredAssetInner update(String resourceGroupName, String discoveredAssetName, DiscoveredAssetUpdate properties,
+ Context context);
+
+ /**
+ * Delete a DiscoveredAsset.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetName Discovered Asset name parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String discoveredAssetName);
+
+ /**
+ * Delete a DiscoveredAsset.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetName Discovered Asset name parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String discoveredAssetName,
+ Context context);
+
+ /**
+ * Delete a DiscoveredAsset.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetName Discovered Asset name parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String discoveredAssetName);
+
+ /**
+ * Delete a DiscoveredAsset.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetName Discovered Asset name parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String discoveredAssetName, Context context);
+
+ /**
+ * List DiscoveredAsset 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 DiscoveredAsset list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * List DiscoveredAsset 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 DiscoveredAsset list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+
+ /**
+ * List DiscoveredAsset 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 DiscoveredAsset list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * List DiscoveredAsset 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 DiscoveredAsset list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+}
diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/SchemaRegistriesClient.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/SchemaRegistriesClient.java
new file mode 100644
index 0000000000000..cea69f6ae34f0
--- /dev/null
+++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/SchemaRegistriesClient.java
@@ -0,0 +1,271 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.deviceregistry.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.deviceregistry.fluent.models.SchemaRegistryInner;
+import com.azure.resourcemanager.deviceregistry.models.SchemaRegistryUpdate;
+
+/**
+ * An instance of this class provides access to all the operations defined in SchemaRegistriesClient.
+ */
+public interface SchemaRegistriesClient {
+ /**
+ * Get a SchemaRegistry.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schemaRegistryName Schema registry name parameter.
+ * @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 SchemaRegistry along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(String resourceGroupName, String schemaRegistryName,
+ Context context);
+
+ /**
+ * Get a SchemaRegistry.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schemaRegistryName Schema registry name parameter.
+ * @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 SchemaRegistry.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SchemaRegistryInner getByResourceGroup(String resourceGroupName, String schemaRegistryName);
+
+ /**
+ * Create a SchemaRegistry.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schemaRegistryName Schema registry name parameter.
+ * @param resource Resource create parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of schema registry definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, SchemaRegistryInner> beginCreateOrReplace(String resourceGroupName,
+ String schemaRegistryName, SchemaRegistryInner resource);
+
+ /**
+ * Create a SchemaRegistry.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schemaRegistryName Schema registry name parameter.
+ * @param resource Resource create parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of schema registry definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, SchemaRegistryInner> beginCreateOrReplace(String resourceGroupName,
+ String schemaRegistryName, SchemaRegistryInner resource, Context context);
+
+ /**
+ * Create a SchemaRegistry.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schemaRegistryName Schema registry name parameter.
+ * @param resource Resource create parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return schema registry definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SchemaRegistryInner createOrReplace(String resourceGroupName, String schemaRegistryName,
+ SchemaRegistryInner resource);
+
+ /**
+ * Create a SchemaRegistry.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schemaRegistryName Schema registry name parameter.
+ * @param resource Resource create parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return schema registry definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SchemaRegistryInner createOrReplace(String resourceGroupName, String schemaRegistryName,
+ SchemaRegistryInner resource, Context context);
+
+ /**
+ * Update a SchemaRegistry.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schemaRegistryName Schema registry name parameter.
+ * @param properties The resource properties to be updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of schema registry definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, SchemaRegistryInner> beginUpdate(String resourceGroupName,
+ String schemaRegistryName, SchemaRegistryUpdate properties);
+
+ /**
+ * Update a SchemaRegistry.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schemaRegistryName Schema registry name parameter.
+ * @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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of schema registry definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, SchemaRegistryInner> beginUpdate(String resourceGroupName,
+ String schemaRegistryName, SchemaRegistryUpdate properties, Context context);
+
+ /**
+ * Update a SchemaRegistry.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schemaRegistryName Schema registry name parameter.
+ * @param properties The resource properties to be updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return schema registry definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SchemaRegistryInner update(String resourceGroupName, String schemaRegistryName, SchemaRegistryUpdate properties);
+
+ /**
+ * Update a SchemaRegistry.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schemaRegistryName Schema registry name parameter.
+ * @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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return schema registry definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SchemaRegistryInner update(String resourceGroupName, String schemaRegistryName, SchemaRegistryUpdate properties,
+ Context context);
+
+ /**
+ * Delete a SchemaRegistry.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schemaRegistryName Schema registry name parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String schemaRegistryName);
+
+ /**
+ * Delete a SchemaRegistry.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schemaRegistryName Schema registry name parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String schemaRegistryName,
+ Context context);
+
+ /**
+ * Delete a SchemaRegistry.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schemaRegistryName Schema registry name parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String schemaRegistryName);
+
+ /**
+ * Delete a SchemaRegistry.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schemaRegistryName Schema registry name parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String schemaRegistryName, Context context);
+
+ /**
+ * List SchemaRegistry 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 SchemaRegistry list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * List SchemaRegistry 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 SchemaRegistry list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+
+ /**
+ * List SchemaRegistry 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 SchemaRegistry list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * List SchemaRegistry 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 SchemaRegistry list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+}
diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/SchemaVersionsClient.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/SchemaVersionsClient.java
new file mode 100644
index 0000000000000..5241f12719863
--- /dev/null
+++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/SchemaVersionsClient.java
@@ -0,0 +1,147 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.deviceregistry.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.deviceregistry.fluent.models.SchemaVersionInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in SchemaVersionsClient.
+ */
+public interface SchemaVersionsClient {
+ /**
+ * Get a SchemaVersion.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schemaRegistryName Schema registry name parameter.
+ * @param schemaName Schema name parameter.
+ * @param schemaVersionName Schema version name parameter.
+ * @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 SchemaVersion along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String schemaRegistryName, String schemaName,
+ String schemaVersionName, Context context);
+
+ /**
+ * Get a SchemaVersion.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schemaRegistryName Schema registry name parameter.
+ * @param schemaName Schema name parameter.
+ * @param schemaVersionName Schema version name parameter.
+ * @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 SchemaVersion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SchemaVersionInner get(String resourceGroupName, String schemaRegistryName, String schemaName,
+ String schemaVersionName);
+
+ /**
+ * Create a SchemaVersion.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schemaRegistryName Schema registry name parameter.
+ * @param schemaName Schema name parameter.
+ * @param schemaVersionName Schema version name parameter.
+ * @param resource Resource create parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return schema version's definition along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrReplaceWithResponse(String resourceGroupName, String schemaRegistryName,
+ String schemaName, String schemaVersionName, SchemaVersionInner resource, Context context);
+
+ /**
+ * Create a SchemaVersion.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schemaRegistryName Schema registry name parameter.
+ * @param schemaName Schema name parameter.
+ * @param schemaVersionName Schema version name parameter.
+ * @param resource Resource create parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return schema version's definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SchemaVersionInner createOrReplace(String resourceGroupName, String schemaRegistryName, String schemaName,
+ String schemaVersionName, SchemaVersionInner resource);
+
+ /**
+ * Delete a SchemaVersion.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schemaRegistryName Schema registry name parameter.
+ * @param schemaName Schema name parameter.
+ * @param schemaVersionName Schema version name parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteWithResponse(String resourceGroupName, String schemaRegistryName, String schemaName,
+ String schemaVersionName, Context context);
+
+ /**
+ * Delete a SchemaVersion.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schemaRegistryName Schema registry name parameter.
+ * @param schemaName Schema name parameter.
+ * @param schemaVersionName Schema version name parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String schemaRegistryName, String schemaName, String schemaVersionName);
+
+ /**
+ * List SchemaVersion resources by Schema.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schemaRegistryName Schema registry name parameter.
+ * @param schemaName Schema name parameter.
+ * @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 SchemaVersion list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listBySchema(String resourceGroupName, String schemaRegistryName,
+ String schemaName);
+
+ /**
+ * List SchemaVersion resources by Schema.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schemaRegistryName Schema registry name parameter.
+ * @param schemaName Schema name parameter.
+ * @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 SchemaVersion list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listBySchema(String resourceGroupName, String schemaRegistryName,
+ String schemaName, Context context);
+}
diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/SchemasClient.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/SchemasClient.java
new file mode 100644
index 0000000000000..4bd64cc2174e5
--- /dev/null
+++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/SchemasClient.java
@@ -0,0 +1,137 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.deviceregistry.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.deviceregistry.fluent.models.SchemaInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in SchemasClient.
+ */
+public interface SchemasClient {
+ /**
+ * Get a Schema.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schemaRegistryName Schema registry name parameter.
+ * @param schemaName Schema name parameter.
+ * @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 Schema along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String schemaRegistryName, String schemaName,
+ Context context);
+
+ /**
+ * Get a Schema.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schemaRegistryName Schema registry name parameter.
+ * @param schemaName Schema name parameter.
+ * @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 Schema.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SchemaInner get(String resourceGroupName, String schemaRegistryName, String schemaName);
+
+ /**
+ * Create a Schema.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schemaRegistryName Schema registry name parameter.
+ * @param schemaName Schema name parameter.
+ * @param resource Resource create parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return schema definition along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrReplaceWithResponse(String resourceGroupName, String schemaRegistryName,
+ String schemaName, SchemaInner resource, Context context);
+
+ /**
+ * Create a Schema.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schemaRegistryName Schema registry name parameter.
+ * @param schemaName Schema name parameter.
+ * @param resource Resource create parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return schema definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SchemaInner createOrReplace(String resourceGroupName, String schemaRegistryName, String schemaName,
+ SchemaInner resource);
+
+ /**
+ * Delete a Schema.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schemaRegistryName Schema registry name parameter.
+ * @param schemaName Schema name parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteWithResponse(String resourceGroupName, String schemaRegistryName, String schemaName,
+ Context context);
+
+ /**
+ * Delete a Schema.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schemaRegistryName Schema registry name parameter.
+ * @param schemaName Schema name parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String schemaRegistryName, String schemaName);
+
+ /**
+ * List Schema resources by SchemaRegistry.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schemaRegistryName Schema registry name parameter.
+ * @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 Schema list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listBySchemaRegistry(String resourceGroupName, String schemaRegistryName);
+
+ /**
+ * List Schema resources by SchemaRegistry.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schemaRegistryName Schema registry name parameter.
+ * @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 Schema list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listBySchemaRegistry(String resourceGroupName, String schemaRegistryName,
+ Context context);
+}
diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/BillingContainerInner.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/BillingContainerInner.java
new file mode 100644
index 0000000000000..2c70351f8a432
--- /dev/null
+++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/BillingContainerInner.java
@@ -0,0 +1,172 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.deviceregistry.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.deviceregistry.models.BillingContainerProperties;
+import java.io.IOException;
+
+/**
+ * billingContainer Model as Azure resource whose sole purpose is to keep track of billables resources under a
+ * subscription.
+ */
+@Immutable
+public final class BillingContainerInner extends ProxyResource {
+ /*
+ * The resource-specific properties for this resource.
+ */
+ private BillingContainerProperties properties;
+
+ /*
+ * Resource ETag
+ */
+ private String etag;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of BillingContainerInner class.
+ */
+ private BillingContainerInner() {
+ }
+
+ /**
+ * Get the properties property: The resource-specific properties for this resource.
+ *
+ * @return the properties value.
+ */
+ public BillingContainerProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Get the etag property: Resource ETag.
+ *
+ * @return the etag value.
+ */
+ public String etag() {
+ return this.etag;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ 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}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of BillingContainerInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of BillingContainerInner if the JsonReader was pointing to an instance of it, or null if it
+ * was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the BillingContainerInner.
+ */
+ public static BillingContainerInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ BillingContainerInner deserializedBillingContainerInner = new BillingContainerInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedBillingContainerInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedBillingContainerInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedBillingContainerInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedBillingContainerInner.properties = BillingContainerProperties.fromJson(reader);
+ } else if ("etag".equals(fieldName)) {
+ deserializedBillingContainerInner.etag = reader.getString();
+ } else if ("systemData".equals(fieldName)) {
+ deserializedBillingContainerInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedBillingContainerInner;
+ });
+ }
+}
diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/DiscoveredAssetEndpointProfileInner.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/DiscoveredAssetEndpointProfileInner.java
new file mode 100644
index 0000000000000..44ef009c51ade
--- /dev/null
+++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/DiscoveredAssetEndpointProfileInner.java
@@ -0,0 +1,234 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.deviceregistry.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.Resource;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.deviceregistry.models.DiscoveredAssetEndpointProfileProperties;
+import com.azure.resourcemanager.deviceregistry.models.ExtendedLocation;
+import java.io.IOException;
+import java.util.Map;
+
+/**
+ * Discovered Asset Endpoint Profile definition.
+ */
+@Fluent
+public final class DiscoveredAssetEndpointProfileInner extends Resource {
+ /*
+ * The resource-specific properties for this resource.
+ */
+ private DiscoveredAssetEndpointProfileProperties properties;
+
+ /*
+ * The extended location.
+ */
+ private ExtendedLocation extendedLocation;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of DiscoveredAssetEndpointProfileInner class.
+ */
+ public DiscoveredAssetEndpointProfileInner() {
+ }
+
+ /**
+ * Get the properties property: The resource-specific properties for this resource.
+ *
+ * @return the properties value.
+ */
+ public DiscoveredAssetEndpointProfileProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: The resource-specific properties for this resource.
+ *
+ * @param properties the properties value to set.
+ * @return the DiscoveredAssetEndpointProfileInner object itself.
+ */
+ public DiscoveredAssetEndpointProfileInner withProperties(DiscoveredAssetEndpointProfileProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the extendedLocation property: The extended location.
+ *
+ * @return the extendedLocation value.
+ */
+ public ExtendedLocation extendedLocation() {
+ return this.extendedLocation;
+ }
+
+ /**
+ * Set the extendedLocation property: The extended location.
+ *
+ * @param extendedLocation the extendedLocation value to set.
+ * @return the DiscoveredAssetEndpointProfileInner object itself.
+ */
+ public DiscoveredAssetEndpointProfileInner withExtendedLocation(ExtendedLocation extendedLocation) {
+ this.extendedLocation = extendedLocation;
+ return this;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public DiscoveredAssetEndpointProfileInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public DiscoveredAssetEndpointProfileInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() != null) {
+ properties().validate();
+ }
+ if (extendedLocation() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property extendedLocation in model DiscoveredAssetEndpointProfileInner"));
+ } else {
+ extendedLocation().validate();
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(DiscoveredAssetEndpointProfileInner.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("location", location());
+ jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element));
+ jsonWriter.writeJsonField("extendedLocation", this.extendedLocation);
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of DiscoveredAssetEndpointProfileInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of DiscoveredAssetEndpointProfileInner if the JsonReader was pointing to an instance of it,
+ * or null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the DiscoveredAssetEndpointProfileInner.
+ */
+ public static DiscoveredAssetEndpointProfileInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ DiscoveredAssetEndpointProfileInner deserializedDiscoveredAssetEndpointProfileInner
+ = new DiscoveredAssetEndpointProfileInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedDiscoveredAssetEndpointProfileInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedDiscoveredAssetEndpointProfileInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedDiscoveredAssetEndpointProfileInner.type = reader.getString();
+ } else if ("location".equals(fieldName)) {
+ deserializedDiscoveredAssetEndpointProfileInner.withLocation(reader.getString());
+ } else if ("tags".equals(fieldName)) {
+ Map tags = reader.readMap(reader1 -> reader1.getString());
+ deserializedDiscoveredAssetEndpointProfileInner.withTags(tags);
+ } else if ("extendedLocation".equals(fieldName)) {
+ deserializedDiscoveredAssetEndpointProfileInner.extendedLocation
+ = ExtendedLocation.fromJson(reader);
+ } else if ("properties".equals(fieldName)) {
+ deserializedDiscoveredAssetEndpointProfileInner.properties
+ = DiscoveredAssetEndpointProfileProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedDiscoveredAssetEndpointProfileInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedDiscoveredAssetEndpointProfileInner;
+ });
+ }
+}
diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/DiscoveredAssetInner.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/DiscoveredAssetInner.java
new file mode 100644
index 0000000000000..366bebe17b207
--- /dev/null
+++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/DiscoveredAssetInner.java
@@ -0,0 +1,231 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.deviceregistry.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.Resource;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.deviceregistry.models.DiscoveredAssetProperties;
+import com.azure.resourcemanager.deviceregistry.models.ExtendedLocation;
+import java.io.IOException;
+import java.util.Map;
+
+/**
+ * Discovered Asset definition.
+ */
+@Fluent
+public final class DiscoveredAssetInner extends Resource {
+ /*
+ * The resource-specific properties for this resource.
+ */
+ private DiscoveredAssetProperties properties;
+
+ /*
+ * The extended location.
+ */
+ private ExtendedLocation extendedLocation;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of DiscoveredAssetInner class.
+ */
+ public DiscoveredAssetInner() {
+ }
+
+ /**
+ * Get the properties property: The resource-specific properties for this resource.
+ *
+ * @return the properties value.
+ */
+ public DiscoveredAssetProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: The resource-specific properties for this resource.
+ *
+ * @param properties the properties value to set.
+ * @return the DiscoveredAssetInner object itself.
+ */
+ public DiscoveredAssetInner withProperties(DiscoveredAssetProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the extendedLocation property: The extended location.
+ *
+ * @return the extendedLocation value.
+ */
+ public ExtendedLocation extendedLocation() {
+ return this.extendedLocation;
+ }
+
+ /**
+ * Set the extendedLocation property: The extended location.
+ *
+ * @param extendedLocation the extendedLocation value to set.
+ * @return the DiscoveredAssetInner object itself.
+ */
+ public DiscoveredAssetInner withExtendedLocation(ExtendedLocation extendedLocation) {
+ this.extendedLocation = extendedLocation;
+ return this;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public DiscoveredAssetInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public DiscoveredAssetInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() != null) {
+ properties().validate();
+ }
+ if (extendedLocation() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property extendedLocation in model DiscoveredAssetInner"));
+ } else {
+ extendedLocation().validate();
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(DiscoveredAssetInner.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("location", location());
+ jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element));
+ jsonWriter.writeJsonField("extendedLocation", this.extendedLocation);
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of DiscoveredAssetInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of DiscoveredAssetInner if the JsonReader was pointing to an instance of it, or null if it
+ * was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the DiscoveredAssetInner.
+ */
+ public static DiscoveredAssetInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ DiscoveredAssetInner deserializedDiscoveredAssetInner = new DiscoveredAssetInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedDiscoveredAssetInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedDiscoveredAssetInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedDiscoveredAssetInner.type = reader.getString();
+ } else if ("location".equals(fieldName)) {
+ deserializedDiscoveredAssetInner.withLocation(reader.getString());
+ } else if ("tags".equals(fieldName)) {
+ Map tags = reader.readMap(reader1 -> reader1.getString());
+ deserializedDiscoveredAssetInner.withTags(tags);
+ } else if ("extendedLocation".equals(fieldName)) {
+ deserializedDiscoveredAssetInner.extendedLocation = ExtendedLocation.fromJson(reader);
+ } else if ("properties".equals(fieldName)) {
+ deserializedDiscoveredAssetInner.properties = DiscoveredAssetProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedDiscoveredAssetInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedDiscoveredAssetInner;
+ });
+ }
+}
diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/OperationStatusResultInner.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/OperationStatusResultInner.java
index ef72a93767dfc..28ead9d57175c 100644
--- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/OperationStatusResultInner.java
+++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/OperationStatusResultInner.java
@@ -62,6 +62,11 @@ public final class OperationStatusResultInner implements JsonSerializable {
+ SchemaInner deserializedSchemaInner = new SchemaInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedSchemaInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedSchemaInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedSchemaInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedSchemaInner.properties = SchemaProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedSchemaInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedSchemaInner;
+ });
+ }
+}
diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/SchemaRegistryInner.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/SchemaRegistryInner.java
new file mode 100644
index 0000000000000..8abb1090dddca
--- /dev/null
+++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/SchemaRegistryInner.java
@@ -0,0 +1,224 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.deviceregistry.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.Resource;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.deviceregistry.models.SchemaRegistryProperties;
+import com.azure.resourcemanager.deviceregistry.models.SystemAssignedServiceIdentity;
+import java.io.IOException;
+import java.util.Map;
+
+/**
+ * Schema registry definition.
+ */
+@Fluent
+public final class SchemaRegistryInner extends Resource {
+ /*
+ * The resource-specific properties for this resource.
+ */
+ private SchemaRegistryProperties properties;
+
+ /*
+ * The managed service identities assigned to this resource.
+ */
+ private SystemAssignedServiceIdentity identity;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of SchemaRegistryInner class.
+ */
+ public SchemaRegistryInner() {
+ }
+
+ /**
+ * Get the properties property: The resource-specific properties for this resource.
+ *
+ * @return the properties value.
+ */
+ public SchemaRegistryProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: The resource-specific properties for this resource.
+ *
+ * @param properties the properties value to set.
+ * @return the SchemaRegistryInner object itself.
+ */
+ public SchemaRegistryInner withProperties(SchemaRegistryProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the identity property: The managed service identities assigned to this resource.
+ *
+ * @return the identity value.
+ */
+ public SystemAssignedServiceIdentity identity() {
+ return this.identity;
+ }
+
+ /**
+ * Set the identity property: The managed service identities assigned to this resource.
+ *
+ * @param identity the identity value to set.
+ * @return the SchemaRegistryInner object itself.
+ */
+ public SchemaRegistryInner withIdentity(SystemAssignedServiceIdentity identity) {
+ this.identity = identity;
+ return this;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public SchemaRegistryInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public SchemaRegistryInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() != null) {
+ properties().validate();
+ }
+ if (identity() != null) {
+ identity().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("location", location());
+ jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element));
+ jsonWriter.writeJsonField("properties", this.properties);
+ jsonWriter.writeJsonField("identity", this.identity);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of SchemaRegistryInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of SchemaRegistryInner if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the SchemaRegistryInner.
+ */
+ public static SchemaRegistryInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ SchemaRegistryInner deserializedSchemaRegistryInner = new SchemaRegistryInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedSchemaRegistryInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedSchemaRegistryInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedSchemaRegistryInner.type = reader.getString();
+ } else if ("location".equals(fieldName)) {
+ deserializedSchemaRegistryInner.withLocation(reader.getString());
+ } else if ("tags".equals(fieldName)) {
+ Map tags = reader.readMap(reader1 -> reader1.getString());
+ deserializedSchemaRegistryInner.withTags(tags);
+ } else if ("properties".equals(fieldName)) {
+ deserializedSchemaRegistryInner.properties = SchemaRegistryProperties.fromJson(reader);
+ } else if ("identity".equals(fieldName)) {
+ deserializedSchemaRegistryInner.identity = SystemAssignedServiceIdentity.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedSchemaRegistryInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedSchemaRegistryInner;
+ });
+ }
+}
diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/SchemaVersionInner.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/SchemaVersionInner.java
new file mode 100644
index 0000000000000..9c234ec7f0c84
--- /dev/null
+++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/fluent/models/SchemaVersionInner.java
@@ -0,0 +1,166 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.deviceregistry.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.deviceregistry.models.SchemaVersionProperties;
+import java.io.IOException;
+
+/**
+ * Schema version's definition.
+ */
+@Fluent
+public final class SchemaVersionInner extends ProxyResource {
+ /*
+ * The resource-specific properties for this resource.
+ */
+ private SchemaVersionProperties properties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of SchemaVersionInner class.
+ */
+ public SchemaVersionInner() {
+ }
+
+ /**
+ * Get the properties property: The resource-specific properties for this resource.
+ *
+ * @return the properties value.
+ */
+ public SchemaVersionProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: The resource-specific properties for this resource.
+ *
+ * @param properties the properties value to set.
+ * @return the SchemaVersionInner object itself.
+ */
+ public SchemaVersionInner withProperties(SchemaVersionProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ 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}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of SchemaVersionInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of SchemaVersionInner if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the SchemaVersionInner.
+ */
+ public static SchemaVersionInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ SchemaVersionInner deserializedSchemaVersionInner = new SchemaVersionInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedSchemaVersionInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedSchemaVersionInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedSchemaVersionInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedSchemaVersionInner.properties = SchemaVersionProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedSchemaVersionInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedSchemaVersionInner;
+ });
+ }
+}
diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/AssetEndpointProfilesClientImpl.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/AssetEndpointProfilesClientImpl.java
index 67aabbbfc96b9..28ee7da06f691 100644
--- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/AssetEndpointProfilesClientImpl.java
+++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/AssetEndpointProfilesClientImpl.java
@@ -52,25 +52,25 @@ public final class AssetEndpointProfilesClientImpl implements AssetEndpointProfi
/**
* The service client containing this operation class.
*/
- private final DeviceRegistryClientImpl client;
+ private final DeviceRegistryManagementClientImpl client;
/**
* Initializes an instance of AssetEndpointProfilesClientImpl.
*
* @param client the instance of the service client containing this operation class.
*/
- AssetEndpointProfilesClientImpl(DeviceRegistryClientImpl client) {
+ AssetEndpointProfilesClientImpl(DeviceRegistryManagementClientImpl client) {
this.service = RestProxy.create(AssetEndpointProfilesService.class, client.getHttpPipeline(),
client.getSerializerAdapter());
this.client = client;
}
/**
- * The interface defining all the services for DeviceRegistryClientAssetEndpointProfiles to be used by the proxy
- * service to perform REST calls.
+ * The interface defining all the services for DeviceRegistryManagementClientAssetEndpointProfiles to be used by the
+ * proxy service to perform REST calls.
*/
@Host("{endpoint}")
- @ServiceInterface(name = "DeviceRegistryClient")
+ @ServiceInterface(name = "DeviceRegistryManage")
public interface AssetEndpointProfilesService {
@Headers({ "Content-Type: application/json" })
@Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assetEndpointProfiles/{assetEndpointProfileName}")
diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/AssetsClientImpl.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/AssetsClientImpl.java
index beae8f67435c5..793a5c2ae7931 100644
--- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/AssetsClientImpl.java
+++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/AssetsClientImpl.java
@@ -52,24 +52,24 @@ public final class AssetsClientImpl implements AssetsClient {
/**
* The service client containing this operation class.
*/
- private final DeviceRegistryClientImpl client;
+ private final DeviceRegistryManagementClientImpl client;
/**
* Initializes an instance of AssetsClientImpl.
*
* @param client the instance of the service client containing this operation class.
*/
- AssetsClientImpl(DeviceRegistryClientImpl client) {
+ AssetsClientImpl(DeviceRegistryManagementClientImpl client) {
this.service = RestProxy.create(AssetsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
this.client = client;
}
/**
- * The interface defining all the services for DeviceRegistryClientAssets to be used by the proxy service to perform
- * REST calls.
+ * The interface defining all the services for DeviceRegistryManagementClientAssets to be used by the proxy service
+ * to perform REST calls.
*/
@Host("{endpoint}")
- @ServiceInterface(name = "DeviceRegistryClient")
+ @ServiceInterface(name = "DeviceRegistryManage")
public interface AssetsService {
@Headers({ "Content-Type: application/json" })
@Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assets/{assetName}")
diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/BillingContainerImpl.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/BillingContainerImpl.java
new file mode 100644
index 0000000000000..553aa10e8b3ad
--- /dev/null
+++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/BillingContainerImpl.java
@@ -0,0 +1,54 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.deviceregistry.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.deviceregistry.fluent.models.BillingContainerInner;
+import com.azure.resourcemanager.deviceregistry.models.BillingContainer;
+import com.azure.resourcemanager.deviceregistry.models.BillingContainerProperties;
+
+public final class BillingContainerImpl implements BillingContainer {
+ private BillingContainerInner innerObject;
+
+ private final com.azure.resourcemanager.deviceregistry.DeviceRegistryManager serviceManager;
+
+ BillingContainerImpl(BillingContainerInner innerObject,
+ com.azure.resourcemanager.deviceregistry.DeviceRegistryManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public BillingContainerProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public String etag() {
+ return this.innerModel().etag();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public BillingContainerInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.deviceregistry.DeviceRegistryManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/BillingContainersClientImpl.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/BillingContainersClientImpl.java
new file mode 100644
index 0000000000000..518d55d7ee971
--- /dev/null
+++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/BillingContainersClientImpl.java
@@ -0,0 +1,359 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.deviceregistry.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.resourcemanager.deviceregistry.fluent.BillingContainersClient;
+import com.azure.resourcemanager.deviceregistry.fluent.models.BillingContainerInner;
+import com.azure.resourcemanager.deviceregistry.implementation.models.BillingContainerListResult;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in BillingContainersClient.
+ */
+public final class BillingContainersClientImpl implements BillingContainersClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final BillingContainersService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final DeviceRegistryManagementClientImpl client;
+
+ /**
+ * Initializes an instance of BillingContainersClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ BillingContainersClientImpl(DeviceRegistryManagementClientImpl client) {
+ this.service
+ = RestProxy.create(BillingContainersService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for DeviceRegistryManagementClientBillingContainers to be used by the
+ * proxy service to perform REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "DeviceRegistryManage")
+ public interface BillingContainersService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.DeviceRegistry/billingContainers/{billingContainerName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("billingContainerName") String billingContainerName, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.DeviceRegistry/billingContainers")
+ @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("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listBySubscriptionNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * Get a BillingContainer.
+ *
+ * @param billingContainerName Name of the billing container.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 BillingContainer along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String billingContainerName) {
+ 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 (billingContainerName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter billingContainerName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), billingContainerName, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get a BillingContainer.
+ *
+ * @param billingContainerName Name of the billing container.
+ * @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 BillingContainer along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String billingContainerName, 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 (billingContainerName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter billingContainerName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ billingContainerName, accept, context);
+ }
+
+ /**
+ * Get a BillingContainer.
+ *
+ * @param billingContainerName Name of the billing container.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 BillingContainer on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String billingContainerName) {
+ return getWithResponseAsync(billingContainerName).flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get a BillingContainer.
+ *
+ * @param billingContainerName Name of the billing container.
+ * @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 BillingContainer along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(String billingContainerName, Context context) {
+ return getWithResponseAsync(billingContainerName, context).block();
+ }
+
+ /**
+ * Get a BillingContainer.
+ *
+ * @param billingContainerName Name of the billing container.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 BillingContainer.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public BillingContainerInner get(String billingContainerName) {
+ return getWithResponse(billingContainerName, Context.NONE).getValue();
+ }
+
+ /**
+ * List BillingContainer 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 BillingContainer list operation along with {@link PagedResponse} 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."));
+ }
+ 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()));
+ }
+
+ /**
+ * List BillingContainer resources by subscription ID.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a BillingContainer list operation along with {@link PagedResponse} 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 BillingContainer 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 BillingContainer list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(() -> listSinglePageAsync(),
+ nextLink -> listBySubscriptionNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List BillingContainer resources by subscription ID.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a BillingContainer 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 BillingContainer 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 BillingContainer list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ return new PagedIterable<>(listAsync());
+ }
+
+ /**
+ * List BillingContainer resources by subscription ID.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a BillingContainer list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(Context context) {
+ return new PagedIterable<>(listAsync(context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 BillingContainer list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(),
+ res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @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 BillingContainer list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySubscriptionNextSinglePageAsync(String nextLink,
+ Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+}
diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/BillingContainersImpl.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/BillingContainersImpl.java
new file mode 100644
index 0000000000000..5ba318e04334a
--- /dev/null
+++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/BillingContainersImpl.java
@@ -0,0 +1,66 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.deviceregistry.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.deviceregistry.fluent.BillingContainersClient;
+import com.azure.resourcemanager.deviceregistry.fluent.models.BillingContainerInner;
+import com.azure.resourcemanager.deviceregistry.models.BillingContainer;
+import com.azure.resourcemanager.deviceregistry.models.BillingContainers;
+
+public final class BillingContainersImpl implements BillingContainers {
+ private static final ClientLogger LOGGER = new ClientLogger(BillingContainersImpl.class);
+
+ private final BillingContainersClient innerClient;
+
+ private final com.azure.resourcemanager.deviceregistry.DeviceRegistryManager serviceManager;
+
+ public BillingContainersImpl(BillingContainersClient innerClient,
+ com.azure.resourcemanager.deviceregistry.DeviceRegistryManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response getWithResponse(String billingContainerName, Context context) {
+ Response inner = this.serviceClient().getWithResponse(billingContainerName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new BillingContainerImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public BillingContainer get(String billingContainerName) {
+ BillingContainerInner inner = this.serviceClient().get(billingContainerName);
+ if (inner != null) {
+ return new BillingContainerImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new BillingContainerImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(Context context) {
+ PagedIterable inner = this.serviceClient().list(context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new BillingContainerImpl(inner1, this.manager()));
+ }
+
+ private BillingContainersClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.deviceregistry.DeviceRegistryManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/DeviceRegistryClientBuilder.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/DeviceRegistryManagementClientBuilder.java
similarity index 67%
rename from sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/DeviceRegistryClientBuilder.java
rename to sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/DeviceRegistryManagementClientBuilder.java
index 54d34610039a1..c6ed35c90e842 100644
--- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/DeviceRegistryClientBuilder.java
+++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/DeviceRegistryManagementClientBuilder.java
@@ -15,10 +15,10 @@
import java.time.Duration;
/**
- * A builder for creating a new instance of the DeviceRegistryClientImpl type.
+ * A builder for creating a new instance of the DeviceRegistryManagementClientImpl type.
*/
-@ServiceClientBuilder(serviceClients = { DeviceRegistryClientImpl.class })
-public final class DeviceRegistryClientBuilder {
+@ServiceClientBuilder(serviceClients = { DeviceRegistryManagementClientImpl.class })
+public final class DeviceRegistryManagementClientBuilder {
/*
* Service host
*/
@@ -28,9 +28,9 @@ public final class DeviceRegistryClientBuilder {
* Sets Service host.
*
* @param endpoint the endpoint value.
- * @return the DeviceRegistryClientBuilder.
+ * @return the DeviceRegistryManagementClientBuilder.
*/
- public DeviceRegistryClientBuilder endpoint(String endpoint) {
+ public DeviceRegistryManagementClientBuilder endpoint(String endpoint) {
this.endpoint = endpoint;
return this;
}
@@ -44,9 +44,9 @@ public DeviceRegistryClientBuilder endpoint(String endpoint) {
* Sets The ID of the target subscription. The value must be an UUID.
*
* @param subscriptionId the subscriptionId value.
- * @return the DeviceRegistryClientBuilder.
+ * @return the DeviceRegistryManagementClientBuilder.
*/
- public DeviceRegistryClientBuilder subscriptionId(String subscriptionId) {
+ public DeviceRegistryManagementClientBuilder subscriptionId(String subscriptionId) {
this.subscriptionId = subscriptionId;
return this;
}
@@ -60,9 +60,9 @@ public DeviceRegistryClientBuilder subscriptionId(String subscriptionId) {
* Sets The environment to connect to.
*
* @param environment the environment value.
- * @return the DeviceRegistryClientBuilder.
+ * @return the DeviceRegistryManagementClientBuilder.
*/
- public DeviceRegistryClientBuilder environment(AzureEnvironment environment) {
+ public DeviceRegistryManagementClientBuilder environment(AzureEnvironment environment) {
this.environment = environment;
return this;
}
@@ -76,9 +76,9 @@ public DeviceRegistryClientBuilder environment(AzureEnvironment environment) {
* Sets The HTTP pipeline to send requests through.
*
* @param pipeline the pipeline value.
- * @return the DeviceRegistryClientBuilder.
+ * @return the DeviceRegistryManagementClientBuilder.
*/
- public DeviceRegistryClientBuilder pipeline(HttpPipeline pipeline) {
+ public DeviceRegistryManagementClientBuilder pipeline(HttpPipeline pipeline) {
this.pipeline = pipeline;
return this;
}
@@ -92,9 +92,9 @@ public DeviceRegistryClientBuilder pipeline(HttpPipeline pipeline) {
* Sets The default poll interval for long-running operation.
*
* @param defaultPollInterval the defaultPollInterval value.
- * @return the DeviceRegistryClientBuilder.
+ * @return the DeviceRegistryManagementClientBuilder.
*/
- public DeviceRegistryClientBuilder defaultPollInterval(Duration defaultPollInterval) {
+ public DeviceRegistryManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) {
this.defaultPollInterval = defaultPollInterval;
return this;
}
@@ -108,19 +108,19 @@ public DeviceRegistryClientBuilder defaultPollInterval(Duration defaultPollInter
* Sets The serializer to serialize an object into a string.
*
* @param serializerAdapter the serializerAdapter value.
- * @return the DeviceRegistryClientBuilder.
+ * @return the DeviceRegistryManagementClientBuilder.
*/
- public DeviceRegistryClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) {
+ public DeviceRegistryManagementClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) {
this.serializerAdapter = serializerAdapter;
return this;
}
/**
- * Builds an instance of DeviceRegistryClientImpl with the provided parameters.
+ * Builds an instance of DeviceRegistryManagementClientImpl with the provided parameters.
*
- * @return an instance of DeviceRegistryClientImpl.
+ * @return an instance of DeviceRegistryManagementClientImpl.
*/
- public DeviceRegistryClientImpl buildClient() {
+ public DeviceRegistryManagementClientImpl 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 DeviceRegistryClientImpl buildClient() {
SerializerAdapter localSerializerAdapter = (serializerAdapter != null)
? serializerAdapter
: SerializerFactory.createDefaultManagementSerializerAdapter();
- DeviceRegistryClientImpl client = new DeviceRegistryClientImpl(localPipeline, localSerializerAdapter,
- localDefaultPollInterval, localEnvironment, localEndpoint, this.subscriptionId);
+ DeviceRegistryManagementClientImpl client = new DeviceRegistryManagementClientImpl(localPipeline,
+ localSerializerAdapter, localDefaultPollInterval, localEnvironment, localEndpoint, this.subscriptionId);
return client;
}
}
diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/DeviceRegistryClientImpl.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/DeviceRegistryManagementClientImpl.java
similarity index 74%
rename from sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/DeviceRegistryClientImpl.java
rename to sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/DeviceRegistryManagementClientImpl.java
index f5cab59fef74c..9aa7a4bce55a2 100644
--- a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/DeviceRegistryClientImpl.java
+++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/DeviceRegistryManagementClientImpl.java
@@ -25,9 +25,15 @@
import com.azure.core.util.serializer.SerializerEncoding;
import com.azure.resourcemanager.deviceregistry.fluent.AssetEndpointProfilesClient;
import com.azure.resourcemanager.deviceregistry.fluent.AssetsClient;
-import com.azure.resourcemanager.deviceregistry.fluent.DeviceRegistryClient;
+import com.azure.resourcemanager.deviceregistry.fluent.BillingContainersClient;
+import com.azure.resourcemanager.deviceregistry.fluent.DeviceRegistryManagementClient;
+import com.azure.resourcemanager.deviceregistry.fluent.DiscoveredAssetEndpointProfilesClient;
+import com.azure.resourcemanager.deviceregistry.fluent.DiscoveredAssetsClient;
import com.azure.resourcemanager.deviceregistry.fluent.OperationStatusClient;
import com.azure.resourcemanager.deviceregistry.fluent.OperationsClient;
+import com.azure.resourcemanager.deviceregistry.fluent.SchemaRegistriesClient;
+import com.azure.resourcemanager.deviceregistry.fluent.SchemaVersionsClient;
+import com.azure.resourcemanager.deviceregistry.fluent.SchemasClient;
import java.io.IOException;
import java.lang.reflect.Type;
import java.nio.ByteBuffer;
@@ -38,10 +44,10 @@
import reactor.core.publisher.Mono;
/**
- * Initializes a new instance of the DeviceRegistryClientImpl type.
+ * Initializes a new instance of the DeviceRegistryManagementClientImpl type.
*/
-@ServiceClient(builder = DeviceRegistryClientBuilder.class)
-public final class DeviceRegistryClientImpl implements DeviceRegistryClient {
+@ServiceClient(builder = DeviceRegistryManagementClientBuilder.class)
+public final class DeviceRegistryManagementClientImpl implements DeviceRegistryManagementClient {
/**
* Service host.
*/
@@ -183,7 +189,91 @@ public AssetEndpointProfilesClient getAssetEndpointProfiles() {
}
/**
- * Initializes an instance of DeviceRegistryClient client.
+ * The BillingContainersClient object to access its operations.
+ */
+ private final BillingContainersClient billingContainers;
+
+ /**
+ * Gets the BillingContainersClient object to access its operations.
+ *
+ * @return the BillingContainersClient object.
+ */
+ public BillingContainersClient getBillingContainers() {
+ return this.billingContainers;
+ }
+
+ /**
+ * The DiscoveredAssetsClient object to access its operations.
+ */
+ private final DiscoveredAssetsClient discoveredAssets;
+
+ /**
+ * Gets the DiscoveredAssetsClient object to access its operations.
+ *
+ * @return the DiscoveredAssetsClient object.
+ */
+ public DiscoveredAssetsClient getDiscoveredAssets() {
+ return this.discoveredAssets;
+ }
+
+ /**
+ * The DiscoveredAssetEndpointProfilesClient object to access its operations.
+ */
+ private final DiscoveredAssetEndpointProfilesClient discoveredAssetEndpointProfiles;
+
+ /**
+ * Gets the DiscoveredAssetEndpointProfilesClient object to access its operations.
+ *
+ * @return the DiscoveredAssetEndpointProfilesClient object.
+ */
+ public DiscoveredAssetEndpointProfilesClient getDiscoveredAssetEndpointProfiles() {
+ return this.discoveredAssetEndpointProfiles;
+ }
+
+ /**
+ * The SchemaRegistriesClient object to access its operations.
+ */
+ private final SchemaRegistriesClient schemaRegistries;
+
+ /**
+ * Gets the SchemaRegistriesClient object to access its operations.
+ *
+ * @return the SchemaRegistriesClient object.
+ */
+ public SchemaRegistriesClient getSchemaRegistries() {
+ return this.schemaRegistries;
+ }
+
+ /**
+ * The SchemasClient object to access its operations.
+ */
+ private final SchemasClient schemas;
+
+ /**
+ * Gets the SchemasClient object to access its operations.
+ *
+ * @return the SchemasClient object.
+ */
+ public SchemasClient getSchemas() {
+ return this.schemas;
+ }
+
+ /**
+ * The SchemaVersionsClient object to access its operations.
+ */
+ private final SchemaVersionsClient schemaVersions;
+
+ /**
+ * Gets the SchemaVersionsClient object to access its operations.
+ *
+ * @return the SchemaVersionsClient object.
+ */
+ public SchemaVersionsClient getSchemaVersions() {
+ return this.schemaVersions;
+ }
+
+ /**
+ * Initializes an instance of DeviceRegistryManagementClient client.
*
* @param httpPipeline The HTTP pipeline to send requests through.
* @param serializerAdapter The serializer to serialize an object into a string.
@@ -192,18 +282,24 @@ public AssetEndpointProfilesClient getAssetEndpointProfiles() {
* @param endpoint Service host.
* @param subscriptionId The ID of the target subscription. The value must be an UUID.
*/
- DeviceRegistryClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter,
+ DeviceRegistryManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter,
Duration defaultPollInterval, AzureEnvironment environment, String endpoint, String subscriptionId) {
this.httpPipeline = httpPipeline;
this.serializerAdapter = serializerAdapter;
this.defaultPollInterval = defaultPollInterval;
this.endpoint = endpoint;
this.subscriptionId = subscriptionId;
- this.apiVersion = "2023-11-01-preview";
+ this.apiVersion = "2024-09-01-preview";
this.operations = new OperationsClientImpl(this);
this.operationStatus = new OperationStatusClientImpl(this);
this.assets = new AssetsClientImpl(this);
this.assetEndpointProfiles = new AssetEndpointProfilesClientImpl(this);
+ this.billingContainers = new BillingContainersClientImpl(this);
+ this.discoveredAssets = new DiscoveredAssetsClientImpl(this);
+ this.discoveredAssetEndpointProfiles = new DiscoveredAssetEndpointProfilesClientImpl(this);
+ this.schemaRegistries = new SchemaRegistriesClientImpl(this);
+ this.schemas = new SchemasClientImpl(this);
+ this.schemaVersions = new SchemaVersionsClientImpl(this);
}
/**
@@ -332,5 +428,5 @@ public Mono getBodyAsString(Charset charset) {
}
}
- private static final ClientLogger LOGGER = new ClientLogger(DeviceRegistryClientImpl.class);
+ private static final ClientLogger LOGGER = new ClientLogger(DeviceRegistryManagementClientImpl.class);
}
diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/DiscoveredAssetEndpointProfileImpl.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/DiscoveredAssetEndpointProfileImpl.java
new file mode 100644
index 0000000000000..88b31fc2df856
--- /dev/null
+++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/DiscoveredAssetEndpointProfileImpl.java
@@ -0,0 +1,197 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.deviceregistry.implementation;
+
+import com.azure.core.management.Region;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.deviceregistry.fluent.models.DiscoveredAssetEndpointProfileInner;
+import com.azure.resourcemanager.deviceregistry.models.DiscoveredAssetEndpointProfile;
+import com.azure.resourcemanager.deviceregistry.models.DiscoveredAssetEndpointProfileProperties;
+import com.azure.resourcemanager.deviceregistry.models.DiscoveredAssetEndpointProfileUpdate;
+import com.azure.resourcemanager.deviceregistry.models.DiscoveredAssetEndpointProfileUpdateProperties;
+import com.azure.resourcemanager.deviceregistry.models.ExtendedLocation;
+import java.util.Collections;
+import java.util.Map;
+
+public final class DiscoveredAssetEndpointProfileImpl implements DiscoveredAssetEndpointProfile,
+ DiscoveredAssetEndpointProfile.Definition, DiscoveredAssetEndpointProfile.Update {
+ private DiscoveredAssetEndpointProfileInner innerObject;
+
+ private final com.azure.resourcemanager.deviceregistry.DeviceRegistryManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public String location() {
+ return this.innerModel().location();
+ }
+
+ public Map tags() {
+ Map inner = this.innerModel().tags();
+ if (inner != null) {
+ return Collections.unmodifiableMap(inner);
+ } else {
+ return Collections.emptyMap();
+ }
+ }
+
+ public DiscoveredAssetEndpointProfileProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public ExtendedLocation extendedLocation() {
+ return this.innerModel().extendedLocation();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public Region region() {
+ return Region.fromName(this.regionName());
+ }
+
+ public String regionName() {
+ return this.location();
+ }
+
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
+ public DiscoveredAssetEndpointProfileInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.deviceregistry.DeviceRegistryManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String discoveredAssetEndpointProfileName;
+
+ private DiscoveredAssetEndpointProfileUpdate updateProperties;
+
+ public DiscoveredAssetEndpointProfileImpl withExistingResourceGroup(String resourceGroupName) {
+ this.resourceGroupName = resourceGroupName;
+ return this;
+ }
+
+ public DiscoveredAssetEndpointProfile create() {
+ this.innerObject = serviceManager.serviceClient()
+ .getDiscoveredAssetEndpointProfiles()
+ .createOrReplace(resourceGroupName, discoveredAssetEndpointProfileName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public DiscoveredAssetEndpointProfile create(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getDiscoveredAssetEndpointProfiles()
+ .createOrReplace(resourceGroupName, discoveredAssetEndpointProfileName, this.innerModel(), context);
+ return this;
+ }
+
+ DiscoveredAssetEndpointProfileImpl(String name,
+ com.azure.resourcemanager.deviceregistry.DeviceRegistryManager serviceManager) {
+ this.innerObject = new DiscoveredAssetEndpointProfileInner();
+ this.serviceManager = serviceManager;
+ this.discoveredAssetEndpointProfileName = name;
+ }
+
+ public DiscoveredAssetEndpointProfileImpl update() {
+ this.updateProperties = new DiscoveredAssetEndpointProfileUpdate();
+ return this;
+ }
+
+ public DiscoveredAssetEndpointProfile apply() {
+ this.innerObject = serviceManager.serviceClient()
+ .getDiscoveredAssetEndpointProfiles()
+ .update(resourceGroupName, discoveredAssetEndpointProfileName, updateProperties, Context.NONE);
+ return this;
+ }
+
+ public DiscoveredAssetEndpointProfile apply(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getDiscoveredAssetEndpointProfiles()
+ .update(resourceGroupName, discoveredAssetEndpointProfileName, updateProperties, context);
+ return this;
+ }
+
+ DiscoveredAssetEndpointProfileImpl(DiscoveredAssetEndpointProfileInner innerObject,
+ com.azure.resourcemanager.deviceregistry.DeviceRegistryManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.discoveredAssetEndpointProfileName
+ = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "discoveredAssetEndpointProfiles");
+ }
+
+ public DiscoveredAssetEndpointProfile refresh() {
+ this.innerObject = serviceManager.serviceClient()
+ .getDiscoveredAssetEndpointProfiles()
+ .getByResourceGroupWithResponse(resourceGroupName, discoveredAssetEndpointProfileName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public DiscoveredAssetEndpointProfile refresh(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getDiscoveredAssetEndpointProfiles()
+ .getByResourceGroupWithResponse(resourceGroupName, discoveredAssetEndpointProfileName, context)
+ .getValue();
+ return this;
+ }
+
+ public DiscoveredAssetEndpointProfileImpl withRegion(Region location) {
+ this.innerModel().withLocation(location.toString());
+ return this;
+ }
+
+ public DiscoveredAssetEndpointProfileImpl withRegion(String location) {
+ this.innerModel().withLocation(location);
+ return this;
+ }
+
+ public DiscoveredAssetEndpointProfileImpl withExtendedLocation(ExtendedLocation extendedLocation) {
+ this.innerModel().withExtendedLocation(extendedLocation);
+ return this;
+ }
+
+ public DiscoveredAssetEndpointProfileImpl withTags(Map tags) {
+ if (isInCreateMode()) {
+ this.innerModel().withTags(tags);
+ return this;
+ } else {
+ this.updateProperties.withTags(tags);
+ return this;
+ }
+ }
+
+ public DiscoveredAssetEndpointProfileImpl withProperties(DiscoveredAssetEndpointProfileProperties properties) {
+ this.innerModel().withProperties(properties);
+ return this;
+ }
+
+ public DiscoveredAssetEndpointProfileImpl
+ withProperties(DiscoveredAssetEndpointProfileUpdateProperties properties) {
+ this.updateProperties.withProperties(properties);
+ return this;
+ }
+
+ private boolean isInCreateMode() {
+ return this.innerModel().id() == null;
+ }
+}
diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/DiscoveredAssetEndpointProfilesClientImpl.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/DiscoveredAssetEndpointProfilesClientImpl.java
new file mode 100644
index 0000000000000..0075dd1ba2ab9
--- /dev/null
+++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/DiscoveredAssetEndpointProfilesClientImpl.java
@@ -0,0 +1,1337 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.deviceregistry.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.Patch;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.deviceregistry.fluent.DiscoveredAssetEndpointProfilesClient;
+import com.azure.resourcemanager.deviceregistry.fluent.models.DiscoveredAssetEndpointProfileInner;
+import com.azure.resourcemanager.deviceregistry.implementation.models.DiscoveredAssetEndpointProfileListResult;
+import com.azure.resourcemanager.deviceregistry.models.DiscoveredAssetEndpointProfileUpdate;
+import java.nio.ByteBuffer;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in DiscoveredAssetEndpointProfilesClient.
+ */
+public final class DiscoveredAssetEndpointProfilesClientImpl implements DiscoveredAssetEndpointProfilesClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final DiscoveredAssetEndpointProfilesService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final DeviceRegistryManagementClientImpl client;
+
+ /**
+ * Initializes an instance of DiscoveredAssetEndpointProfilesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ DiscoveredAssetEndpointProfilesClientImpl(DeviceRegistryManagementClientImpl client) {
+ this.service = RestProxy.create(DiscoveredAssetEndpointProfilesService.class, client.getHttpPipeline(),
+ client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for DeviceRegistryManagementClientDiscoveredAssetEndpointProfiles to be
+ * used by the proxy service to perform REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "DeviceRegistryManage")
+ public interface DiscoveredAssetEndpointProfilesService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/discoveredAssetEndpointProfiles/{discoveredAssetEndpointProfileName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getByResourceGroup(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("discoveredAssetEndpointProfileName") String discoveredAssetEndpointProfileName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/discoveredAssetEndpointProfiles/{discoveredAssetEndpointProfileName}")
+ @ExpectedResponses({ 200, 201 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> createOrReplace(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("discoveredAssetEndpointProfileName") String discoveredAssetEndpointProfileName,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") DiscoveredAssetEndpointProfileInner resource, Context context);
+
+ @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/discoveredAssetEndpointProfiles/{discoveredAssetEndpointProfileName}")
+ @ExpectedResponses({ 200, 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> update(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("discoveredAssetEndpointProfileName") String discoveredAssetEndpointProfileName,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") DiscoveredAssetEndpointProfileUpdate properties, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/discoveredAssetEndpointProfiles/{discoveredAssetEndpointProfileName}")
+ @ExpectedResponses({ 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("discoveredAssetEndpointProfileName") String discoveredAssetEndpointProfileName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/discoveredAssetEndpointProfiles")
+ @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}/providers/Microsoft.DeviceRegistry/discoveredAssetEndpointProfiles")
+ @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("{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)
+ Mono> listBySubscriptionNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * Get a DiscoveredAssetEndpointProfile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetEndpointProfileName Discovered Asset Endpoint Profile name parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a DiscoveredAssetEndpointProfile along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>
+ getByResourceGroupWithResponseAsync(String resourceGroupName, String discoveredAssetEndpointProfileName) {
+ 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 (discoveredAssetEndpointProfileName == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter discoveredAssetEndpointProfileName 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, discoveredAssetEndpointProfileName, accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get a DiscoveredAssetEndpointProfile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetEndpointProfileName Discovered Asset Endpoint Profile name parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a DiscoveredAssetEndpointProfile along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(
+ String resourceGroupName, String discoveredAssetEndpointProfileName, 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 (discoveredAssetEndpointProfileName == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter discoveredAssetEndpointProfileName 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, discoveredAssetEndpointProfileName, accept, context);
+ }
+
+ /**
+ * Get a DiscoveredAssetEndpointProfile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetEndpointProfileName Discovered Asset Endpoint Profile name parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a DiscoveredAssetEndpointProfile on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getByResourceGroupAsync(String resourceGroupName,
+ String discoveredAssetEndpointProfileName) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, discoveredAssetEndpointProfileName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get a DiscoveredAssetEndpointProfile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetEndpointProfileName Discovered Asset Endpoint Profile name parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a DiscoveredAssetEndpointProfile along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getByResourceGroupWithResponse(String resourceGroupName,
+ String discoveredAssetEndpointProfileName, Context context) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, discoveredAssetEndpointProfileName, context)
+ .block();
+ }
+
+ /**
+ * Get a DiscoveredAssetEndpointProfile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetEndpointProfileName Discovered Asset Endpoint Profile name parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a DiscoveredAssetEndpointProfile.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DiscoveredAssetEndpointProfileInner getByResourceGroup(String resourceGroupName,
+ String discoveredAssetEndpointProfileName) {
+ return getByResourceGroupWithResponse(resourceGroupName, discoveredAssetEndpointProfileName, Context.NONE)
+ .getValue();
+ }
+
+ /**
+ * Create a DiscoveredAssetEndpointProfile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetEndpointProfileName Discovered Asset Endpoint Profile name parameter.
+ * @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 discovered Asset Endpoint Profile definition along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrReplaceWithResponseAsync(String resourceGroupName,
+ String discoveredAssetEndpointProfileName, DiscoveredAssetEndpointProfileInner 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 (discoveredAssetEndpointProfileName == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter discoveredAssetEndpointProfileName 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 contentType = "application/json";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.createOrReplace(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, discoveredAssetEndpointProfileName, contentType,
+ accept, resource, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Create a DiscoveredAssetEndpointProfile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetEndpointProfileName Discovered Asset Endpoint Profile name parameter.
+ * @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 discovered Asset Endpoint Profile definition along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrReplaceWithResponseAsync(String resourceGroupName,
+ String discoveredAssetEndpointProfileName, DiscoveredAssetEndpointProfileInner 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 (discoveredAssetEndpointProfileName == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter discoveredAssetEndpointProfileName 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 contentType = "application/json";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.createOrReplace(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, discoveredAssetEndpointProfileName, contentType, accept,
+ resource, context);
+ }
+
+ /**
+ * Create a DiscoveredAssetEndpointProfile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetEndpointProfileName Discovered Asset Endpoint Profile name parameter.
+ * @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 PollerFlux} for polling of discovered Asset Endpoint Profile definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, DiscoveredAssetEndpointProfileInner>
+ beginCreateOrReplaceAsync(String resourceGroupName, String discoveredAssetEndpointProfileName,
+ DiscoveredAssetEndpointProfileInner resource) {
+ Mono>> mono
+ = createOrReplaceWithResponseAsync(resourceGroupName, discoveredAssetEndpointProfileName, resource);
+ return this.client.getLroResult(mono,
+ this.client.getHttpPipeline(), DiscoveredAssetEndpointProfileInner.class,
+ DiscoveredAssetEndpointProfileInner.class, this.client.getContext());
+ }
+
+ /**
+ * Create a DiscoveredAssetEndpointProfile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetEndpointProfileName Discovered Asset Endpoint Profile name parameter.
+ * @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 discovered Asset Endpoint Profile definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, DiscoveredAssetEndpointProfileInner>
+ beginCreateOrReplaceAsync(String resourceGroupName, String discoveredAssetEndpointProfileName,
+ DiscoveredAssetEndpointProfileInner resource, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono = createOrReplaceWithResponseAsync(resourceGroupName,
+ discoveredAssetEndpointProfileName, resource, context);
+ return this.client.getLroResult(mono,
+ this.client.getHttpPipeline(), DiscoveredAssetEndpointProfileInner.class,
+ DiscoveredAssetEndpointProfileInner.class, context);
+ }
+
+ /**
+ * Create a DiscoveredAssetEndpointProfile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetEndpointProfileName Discovered Asset Endpoint Profile name parameter.
+ * @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 discovered Asset Endpoint Profile definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, DiscoveredAssetEndpointProfileInner>
+ beginCreateOrReplace(String resourceGroupName, String discoveredAssetEndpointProfileName,
+ DiscoveredAssetEndpointProfileInner resource) {
+ return this.beginCreateOrReplaceAsync(resourceGroupName, discoveredAssetEndpointProfileName, resource)
+ .getSyncPoller();
+ }
+
+ /**
+ * Create a DiscoveredAssetEndpointProfile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetEndpointProfileName Discovered Asset Endpoint Profile name parameter.
+ * @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 discovered Asset Endpoint Profile definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, DiscoveredAssetEndpointProfileInner>
+ beginCreateOrReplace(String resourceGroupName, String discoveredAssetEndpointProfileName,
+ DiscoveredAssetEndpointProfileInner resource, Context context) {
+ return this.beginCreateOrReplaceAsync(resourceGroupName, discoveredAssetEndpointProfileName, resource, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * Create a DiscoveredAssetEndpointProfile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetEndpointProfileName Discovered Asset Endpoint Profile name parameter.
+ * @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 discovered Asset Endpoint Profile definition on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrReplaceAsync(String resourceGroupName,
+ String discoveredAssetEndpointProfileName, DiscoveredAssetEndpointProfileInner resource) {
+ return beginCreateOrReplaceAsync(resourceGroupName, discoveredAssetEndpointProfileName, resource).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create a DiscoveredAssetEndpointProfile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetEndpointProfileName Discovered Asset Endpoint Profile name parameter.
+ * @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 discovered Asset Endpoint Profile definition on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrReplaceAsync(String resourceGroupName,
+ String discoveredAssetEndpointProfileName, DiscoveredAssetEndpointProfileInner resource, Context context) {
+ return beginCreateOrReplaceAsync(resourceGroupName, discoveredAssetEndpointProfileName, resource, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create a DiscoveredAssetEndpointProfile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetEndpointProfileName Discovered Asset Endpoint Profile name parameter.
+ * @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 discovered Asset Endpoint Profile definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DiscoveredAssetEndpointProfileInner createOrReplace(String resourceGroupName,
+ String discoveredAssetEndpointProfileName, DiscoveredAssetEndpointProfileInner resource) {
+ return createOrReplaceAsync(resourceGroupName, discoveredAssetEndpointProfileName, resource).block();
+ }
+
+ /**
+ * Create a DiscoveredAssetEndpointProfile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetEndpointProfileName Discovered Asset Endpoint Profile name parameter.
+ * @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 discovered Asset Endpoint Profile definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DiscoveredAssetEndpointProfileInner createOrReplace(String resourceGroupName,
+ String discoveredAssetEndpointProfileName, DiscoveredAssetEndpointProfileInner resource, Context context) {
+ return createOrReplaceAsync(resourceGroupName, discoveredAssetEndpointProfileName, resource, context).block();
+ }
+
+ /**
+ * Update a DiscoveredAssetEndpointProfile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetEndpointProfileName Discovered Asset Endpoint Profile name parameter.
+ * @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 discovered Asset Endpoint Profile definition along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> updateWithResponseAsync(String resourceGroupName,
+ String discoveredAssetEndpointProfileName, DiscoveredAssetEndpointProfileUpdate 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 (discoveredAssetEndpointProfileName == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter discoveredAssetEndpointProfileName 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 contentType = "application/json";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, discoveredAssetEndpointProfileName, contentType,
+ accept, properties, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Update a DiscoveredAssetEndpointProfile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetEndpointProfileName Discovered Asset Endpoint Profile name parameter.
+ * @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 discovered Asset Endpoint Profile definition along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> updateWithResponseAsync(String resourceGroupName,
+ String discoveredAssetEndpointProfileName, DiscoveredAssetEndpointProfileUpdate 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 (discoveredAssetEndpointProfileName == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter discoveredAssetEndpointProfileName 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 contentType = "application/json";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, discoveredAssetEndpointProfileName, contentType, accept, properties, context);
+ }
+
+ /**
+ * Update a DiscoveredAssetEndpointProfile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetEndpointProfileName Discovered Asset Endpoint Profile name parameter.
+ * @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 discovered Asset Endpoint Profile definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, DiscoveredAssetEndpointProfileInner>
+ beginUpdateAsync(String resourceGroupName, String discoveredAssetEndpointProfileName,
+ DiscoveredAssetEndpointProfileUpdate properties) {
+ Mono>> mono
+ = updateWithResponseAsync(resourceGroupName, discoveredAssetEndpointProfileName, properties);
+ return this.client.getLroResult(mono,
+ this.client.getHttpPipeline(), DiscoveredAssetEndpointProfileInner.class,
+ DiscoveredAssetEndpointProfileInner.class, this.client.getContext());
+ }
+
+ /**
+ * Update a DiscoveredAssetEndpointProfile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetEndpointProfileName Discovered Asset Endpoint Profile name parameter.
+ * @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 the {@link PollerFlux} for polling of discovered Asset Endpoint Profile definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, DiscoveredAssetEndpointProfileInner>
+ beginUpdateAsync(String resourceGroupName, String discoveredAssetEndpointProfileName,
+ DiscoveredAssetEndpointProfileUpdate properties, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono
+ = updateWithResponseAsync(resourceGroupName, discoveredAssetEndpointProfileName, properties, context);
+ return this.client.getLroResult(mono,
+ this.client.getHttpPipeline(), DiscoveredAssetEndpointProfileInner.class,
+ DiscoveredAssetEndpointProfileInner.class, context);
+ }
+
+ /**
+ * Update a DiscoveredAssetEndpointProfile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetEndpointProfileName Discovered Asset Endpoint Profile name parameter.
+ * @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 SyncPoller} for polling of discovered Asset Endpoint Profile definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, DiscoveredAssetEndpointProfileInner> beginUpdate(
+ String resourceGroupName, String discoveredAssetEndpointProfileName,
+ DiscoveredAssetEndpointProfileUpdate properties) {
+ return this.beginUpdateAsync(resourceGroupName, discoveredAssetEndpointProfileName, properties).getSyncPoller();
+ }
+
+ /**
+ * Update a DiscoveredAssetEndpointProfile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetEndpointProfileName Discovered Asset Endpoint Profile name parameter.
+ * @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 the {@link SyncPoller} for polling of discovered Asset Endpoint Profile definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, DiscoveredAssetEndpointProfileInner> beginUpdate(
+ String resourceGroupName, String discoveredAssetEndpointProfileName,
+ DiscoveredAssetEndpointProfileUpdate properties, Context context) {
+ return this.beginUpdateAsync(resourceGroupName, discoveredAssetEndpointProfileName, properties, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * Update a DiscoveredAssetEndpointProfile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetEndpointProfileName Discovered Asset Endpoint Profile name parameter.
+ * @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 discovered Asset Endpoint Profile definition on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(String resourceGroupName,
+ String discoveredAssetEndpointProfileName, DiscoveredAssetEndpointProfileUpdate properties) {
+ return beginUpdateAsync(resourceGroupName, discoveredAssetEndpointProfileName, properties).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Update a DiscoveredAssetEndpointProfile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetEndpointProfileName Discovered Asset Endpoint Profile name parameter.
+ * @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 discovered Asset Endpoint Profile definition on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(String resourceGroupName,
+ String discoveredAssetEndpointProfileName, DiscoveredAssetEndpointProfileUpdate properties, Context context) {
+ return beginUpdateAsync(resourceGroupName, discoveredAssetEndpointProfileName, properties, context).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Update a DiscoveredAssetEndpointProfile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetEndpointProfileName Discovered Asset Endpoint Profile name parameter.
+ * @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 discovered Asset Endpoint Profile definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DiscoveredAssetEndpointProfileInner update(String resourceGroupName,
+ String discoveredAssetEndpointProfileName, DiscoveredAssetEndpointProfileUpdate properties) {
+ return updateAsync(resourceGroupName, discoveredAssetEndpointProfileName, properties).block();
+ }
+
+ /**
+ * Update a DiscoveredAssetEndpointProfile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetEndpointProfileName Discovered Asset Endpoint Profile name parameter.
+ * @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 discovered Asset Endpoint Profile definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DiscoveredAssetEndpointProfileInner update(String resourceGroupName,
+ String discoveredAssetEndpointProfileName, DiscoveredAssetEndpointProfileUpdate properties, Context context) {
+ return updateAsync(resourceGroupName, discoveredAssetEndpointProfileName, properties, context).block();
+ }
+
+ /**
+ * Delete a DiscoveredAssetEndpointProfile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetEndpointProfileName Discovered Asset Endpoint Profile name parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(String resourceGroupName,
+ String discoveredAssetEndpointProfileName) {
+ 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 (discoveredAssetEndpointProfileName == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter discoveredAssetEndpointProfileName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, discoveredAssetEndpointProfileName, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Delete a DiscoveredAssetEndpointProfile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetEndpointProfileName Discovered Asset Endpoint Profile name parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(String resourceGroupName,
+ String discoveredAssetEndpointProfileName, 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 (discoveredAssetEndpointProfileName == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter discoveredAssetEndpointProfileName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, discoveredAssetEndpointProfileName, accept, context);
+ }
+
+ /**
+ * Delete a DiscoveredAssetEndpointProfile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetEndpointProfileName Discovered Asset Endpoint Profile name parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(String resourceGroupName,
+ String discoveredAssetEndpointProfileName) {
+ Mono>> mono
+ = deleteWithResponseAsync(resourceGroupName, discoveredAssetEndpointProfileName);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Delete a DiscoveredAssetEndpointProfile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetEndpointProfileName Discovered Asset Endpoint Profile name parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(String resourceGroupName,
+ String discoveredAssetEndpointProfileName, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono
+ = deleteWithResponseAsync(resourceGroupName, discoveredAssetEndpointProfileName, context);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
+ context);
+ }
+
+ /**
+ * Delete a DiscoveredAssetEndpointProfile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetEndpointProfileName Discovered Asset Endpoint Profile name parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(String resourceGroupName,
+ String discoveredAssetEndpointProfileName) {
+ return this.beginDeleteAsync(resourceGroupName, discoveredAssetEndpointProfileName).getSyncPoller();
+ }
+
+ /**
+ * Delete a DiscoveredAssetEndpointProfile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetEndpointProfileName Discovered Asset Endpoint Profile name parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(String resourceGroupName,
+ String discoveredAssetEndpointProfileName, Context context) {
+ return this.beginDeleteAsync(resourceGroupName, discoveredAssetEndpointProfileName, context).getSyncPoller();
+ }
+
+ /**
+ * Delete a DiscoveredAssetEndpointProfile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetEndpointProfileName Discovered Asset Endpoint Profile name parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String discoveredAssetEndpointProfileName) {
+ return beginDeleteAsync(resourceGroupName, discoveredAssetEndpointProfileName).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Delete a DiscoveredAssetEndpointProfile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetEndpointProfileName Discovered Asset Endpoint Profile name parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String discoveredAssetEndpointProfileName,
+ Context context) {
+ return beginDeleteAsync(resourceGroupName, discoveredAssetEndpointProfileName, context).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Delete a DiscoveredAssetEndpointProfile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetEndpointProfileName Discovered Asset Endpoint Profile name parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String discoveredAssetEndpointProfileName) {
+ deleteAsync(resourceGroupName, discoveredAssetEndpointProfileName).block();
+ }
+
+ /**
+ * Delete a DiscoveredAssetEndpointProfile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetEndpointProfileName Discovered Asset Endpoint Profile name parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String discoveredAssetEndpointProfileName, Context context) {
+ deleteAsync(resourceGroupName, discoveredAssetEndpointProfileName, context).block();
+ }
+
+ /**
+ * List DiscoveredAssetEndpointProfile 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 DiscoveredAssetEndpointProfile list operation along with {@link PagedResponse} 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."));
+ }
+ 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()));
+ }
+
+ /**
+ * List DiscoveredAssetEndpointProfile resources by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a DiscoveredAssetEndpointProfile list operation along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @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."));
+ }
+ 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));
+ }
+
+ /**
+ * List DiscoveredAssetEndpointProfile 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 DiscoveredAssetEndpointProfile 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 DiscoveredAssetEndpointProfile resources by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a DiscoveredAssetEndpointProfile list operation as paginated response with
+ * {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName,
+ Context context) {
+ return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List DiscoveredAssetEndpointProfile 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 DiscoveredAssetEndpointProfile list operation as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName));
+ }
+
+ /**
+ * List DiscoveredAssetEndpointProfile resources by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a DiscoveredAssetEndpointProfile list operation as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName,
+ Context context) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context));
+ }
+
+ /**
+ * List DiscoveredAssetEndpointProfile 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 DiscoveredAssetEndpointProfile list operation along with {@link PagedResponse} 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."));
+ }
+ 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()));
+ }
+
+ /**
+ * List DiscoveredAssetEndpointProfile resources by subscription ID.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a DiscoveredAssetEndpointProfile list operation along with {@link PagedResponse} 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 DiscoveredAssetEndpointProfile 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 DiscoveredAssetEndpointProfile list operation as paginated response with
+ * {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(() -> listSinglePageAsync(),
+ nextLink -> listBySubscriptionNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List DiscoveredAssetEndpointProfile resources by subscription ID.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a DiscoveredAssetEndpointProfile 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 DiscoveredAssetEndpointProfile 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 DiscoveredAssetEndpointProfile list operation as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ return new PagedIterable<>(listAsync());
+ }
+
+ /**
+ * List DiscoveredAssetEndpointProfile resources by subscription ID.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a DiscoveredAssetEndpointProfile list operation as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(Context context) {
+ return new PagedIterable<>(listAsync(context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 DiscoveredAssetEndpointProfile list operation along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>
+ listByResourceGroupNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(),
+ res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @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 DiscoveredAssetEndpointProfile list operation along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>
+ listByResourceGroupNextSinglePageAsync(String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 DiscoveredAssetEndpointProfile list operation along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>
+ listBySubscriptionNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(),
+ res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @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 DiscoveredAssetEndpointProfile list operation along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>
+ listBySubscriptionNextSinglePageAsync(String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+}
diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/DiscoveredAssetEndpointProfilesImpl.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/DiscoveredAssetEndpointProfilesImpl.java
new file mode 100644
index 0000000000000..34c7bc45c5dfb
--- /dev/null
+++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/DiscoveredAssetEndpointProfilesImpl.java
@@ -0,0 +1,160 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.deviceregistry.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.deviceregistry.fluent.DiscoveredAssetEndpointProfilesClient;
+import com.azure.resourcemanager.deviceregistry.fluent.models.DiscoveredAssetEndpointProfileInner;
+import com.azure.resourcemanager.deviceregistry.models.DiscoveredAssetEndpointProfile;
+import com.azure.resourcemanager.deviceregistry.models.DiscoveredAssetEndpointProfiles;
+
+public final class DiscoveredAssetEndpointProfilesImpl implements DiscoveredAssetEndpointProfiles {
+ private static final ClientLogger LOGGER = new ClientLogger(DiscoveredAssetEndpointProfilesImpl.class);
+
+ private final DiscoveredAssetEndpointProfilesClient innerClient;
+
+ private final com.azure.resourcemanager.deviceregistry.DeviceRegistryManager serviceManager;
+
+ public DiscoveredAssetEndpointProfilesImpl(DiscoveredAssetEndpointProfilesClient innerClient,
+ com.azure.resourcemanager.deviceregistry.DeviceRegistryManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response getByResourceGroupWithResponse(String resourceGroupName,
+ String discoveredAssetEndpointProfileName, Context context) {
+ Response inner = this.serviceClient()
+ .getByResourceGroupWithResponse(resourceGroupName, discoveredAssetEndpointProfileName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new DiscoveredAssetEndpointProfileImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public DiscoveredAssetEndpointProfile getByResourceGroup(String resourceGroupName,
+ String discoveredAssetEndpointProfileName) {
+ DiscoveredAssetEndpointProfileInner inner
+ = this.serviceClient().getByResourceGroup(resourceGroupName, discoveredAssetEndpointProfileName);
+ if (inner != null) {
+ return new DiscoveredAssetEndpointProfileImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public void deleteByResourceGroup(String resourceGroupName, String discoveredAssetEndpointProfileName) {
+ this.serviceClient().delete(resourceGroupName, discoveredAssetEndpointProfileName);
+ }
+
+ public void delete(String resourceGroupName, String discoveredAssetEndpointProfileName, Context context) {
+ this.serviceClient().delete(resourceGroupName, discoveredAssetEndpointProfileName, context);
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ PagedIterable inner
+ = this.serviceClient().listByResourceGroup(resourceGroupName);
+ return ResourceManagerUtils.mapPage(inner,
+ inner1 -> new DiscoveredAssetEndpointProfileImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName,
+ Context context) {
+ PagedIterable inner
+ = this.serviceClient().listByResourceGroup(resourceGroupName, context);
+ return ResourceManagerUtils.mapPage(inner,
+ inner1 -> new DiscoveredAssetEndpointProfileImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return ResourceManagerUtils.mapPage(inner,
+ inner1 -> new DiscoveredAssetEndpointProfileImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(Context context) {
+ PagedIterable inner = this.serviceClient().list(context);
+ return ResourceManagerUtils.mapPage(inner,
+ inner1 -> new DiscoveredAssetEndpointProfileImpl(inner1, this.manager()));
+ }
+
+ public DiscoveredAssetEndpointProfile getById(String id) {
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String discoveredAssetEndpointProfileName
+ = ResourceManagerUtils.getValueFromIdByName(id, "discoveredAssetEndpointProfiles");
+ if (discoveredAssetEndpointProfileName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format(
+ "The resource ID '%s' is not valid. Missing path segment 'discoveredAssetEndpointProfiles'.", id)));
+ }
+ return this.getByResourceGroupWithResponse(resourceGroupName, discoveredAssetEndpointProfileName, Context.NONE)
+ .getValue();
+ }
+
+ public Response getByIdWithResponse(String id, Context context) {
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String discoveredAssetEndpointProfileName
+ = ResourceManagerUtils.getValueFromIdByName(id, "discoveredAssetEndpointProfiles");
+ if (discoveredAssetEndpointProfileName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format(
+ "The resource ID '%s' is not valid. Missing path segment 'discoveredAssetEndpointProfiles'.", id)));
+ }
+ return this.getByResourceGroupWithResponse(resourceGroupName, discoveredAssetEndpointProfileName, context);
+ }
+
+ public void deleteById(String id) {
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String discoveredAssetEndpointProfileName
+ = ResourceManagerUtils.getValueFromIdByName(id, "discoveredAssetEndpointProfiles");
+ if (discoveredAssetEndpointProfileName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format(
+ "The resource ID '%s' is not valid. Missing path segment 'discoveredAssetEndpointProfiles'.", id)));
+ }
+ this.delete(resourceGroupName, discoveredAssetEndpointProfileName, Context.NONE);
+ }
+
+ public void deleteByIdWithResponse(String id, Context context) {
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String discoveredAssetEndpointProfileName
+ = ResourceManagerUtils.getValueFromIdByName(id, "discoveredAssetEndpointProfiles");
+ if (discoveredAssetEndpointProfileName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format(
+ "The resource ID '%s' is not valid. Missing path segment 'discoveredAssetEndpointProfiles'.", id)));
+ }
+ this.delete(resourceGroupName, discoveredAssetEndpointProfileName, context);
+ }
+
+ private DiscoveredAssetEndpointProfilesClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.deviceregistry.DeviceRegistryManager manager() {
+ return this.serviceManager;
+ }
+
+ public DiscoveredAssetEndpointProfileImpl define(String name) {
+ return new DiscoveredAssetEndpointProfileImpl(name, this.manager());
+ }
+}
diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/DiscoveredAssetImpl.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/DiscoveredAssetImpl.java
new file mode 100644
index 0000000000000..06cf3ec63c155
--- /dev/null
+++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/DiscoveredAssetImpl.java
@@ -0,0 +1,193 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.deviceregistry.implementation;
+
+import com.azure.core.management.Region;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.deviceregistry.fluent.models.DiscoveredAssetInner;
+import com.azure.resourcemanager.deviceregistry.models.DiscoveredAsset;
+import com.azure.resourcemanager.deviceregistry.models.DiscoveredAssetProperties;
+import com.azure.resourcemanager.deviceregistry.models.DiscoveredAssetUpdate;
+import com.azure.resourcemanager.deviceregistry.models.DiscoveredAssetUpdateProperties;
+import com.azure.resourcemanager.deviceregistry.models.ExtendedLocation;
+import java.util.Collections;
+import java.util.Map;
+
+public final class DiscoveredAssetImpl implements DiscoveredAsset, DiscoveredAsset.Definition, DiscoveredAsset.Update {
+ private DiscoveredAssetInner innerObject;
+
+ private final com.azure.resourcemanager.deviceregistry.DeviceRegistryManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public String location() {
+ return this.innerModel().location();
+ }
+
+ public Map tags() {
+ Map inner = this.innerModel().tags();
+ if (inner != null) {
+ return Collections.unmodifiableMap(inner);
+ } else {
+ return Collections.emptyMap();
+ }
+ }
+
+ public DiscoveredAssetProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public ExtendedLocation extendedLocation() {
+ return this.innerModel().extendedLocation();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public Region region() {
+ return Region.fromName(this.regionName());
+ }
+
+ public String regionName() {
+ return this.location();
+ }
+
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
+ public DiscoveredAssetInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.deviceregistry.DeviceRegistryManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String discoveredAssetName;
+
+ private DiscoveredAssetUpdate updateProperties;
+
+ public DiscoveredAssetImpl withExistingResourceGroup(String resourceGroupName) {
+ this.resourceGroupName = resourceGroupName;
+ return this;
+ }
+
+ public DiscoveredAsset create() {
+ this.innerObject = serviceManager.serviceClient()
+ .getDiscoveredAssets()
+ .createOrReplace(resourceGroupName, discoveredAssetName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public DiscoveredAsset create(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getDiscoveredAssets()
+ .createOrReplace(resourceGroupName, discoveredAssetName, this.innerModel(), context);
+ return this;
+ }
+
+ DiscoveredAssetImpl(String name, com.azure.resourcemanager.deviceregistry.DeviceRegistryManager serviceManager) {
+ this.innerObject = new DiscoveredAssetInner();
+ this.serviceManager = serviceManager;
+ this.discoveredAssetName = name;
+ }
+
+ public DiscoveredAssetImpl update() {
+ this.updateProperties = new DiscoveredAssetUpdate();
+ return this;
+ }
+
+ public DiscoveredAsset apply() {
+ this.innerObject = serviceManager.serviceClient()
+ .getDiscoveredAssets()
+ .update(resourceGroupName, discoveredAssetName, updateProperties, Context.NONE);
+ return this;
+ }
+
+ public DiscoveredAsset apply(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getDiscoveredAssets()
+ .update(resourceGroupName, discoveredAssetName, updateProperties, context);
+ return this;
+ }
+
+ DiscoveredAssetImpl(DiscoveredAssetInner innerObject,
+ com.azure.resourcemanager.deviceregistry.DeviceRegistryManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.discoveredAssetName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "discoveredAssets");
+ }
+
+ public DiscoveredAsset refresh() {
+ this.innerObject = serviceManager.serviceClient()
+ .getDiscoveredAssets()
+ .getByResourceGroupWithResponse(resourceGroupName, discoveredAssetName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public DiscoveredAsset refresh(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getDiscoveredAssets()
+ .getByResourceGroupWithResponse(resourceGroupName, discoveredAssetName, context)
+ .getValue();
+ return this;
+ }
+
+ public DiscoveredAssetImpl withRegion(Region location) {
+ this.innerModel().withLocation(location.toString());
+ return this;
+ }
+
+ public DiscoveredAssetImpl withRegion(String location) {
+ this.innerModel().withLocation(location);
+ return this;
+ }
+
+ public DiscoveredAssetImpl withExtendedLocation(ExtendedLocation extendedLocation) {
+ this.innerModel().withExtendedLocation(extendedLocation);
+ return this;
+ }
+
+ public DiscoveredAssetImpl withTags(Map tags) {
+ if (isInCreateMode()) {
+ this.innerModel().withTags(tags);
+ return this;
+ } else {
+ this.updateProperties.withTags(tags);
+ return this;
+ }
+ }
+
+ public DiscoveredAssetImpl withProperties(DiscoveredAssetProperties properties) {
+ this.innerModel().withProperties(properties);
+ return this;
+ }
+
+ public DiscoveredAssetImpl withProperties(DiscoveredAssetUpdateProperties properties) {
+ this.updateProperties.withProperties(properties);
+ return this;
+ }
+
+ private boolean isInCreateMode() {
+ return this.innerModel().id() == null;
+ }
+}
diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/DiscoveredAssetsClientImpl.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/DiscoveredAssetsClientImpl.java
new file mode 100644
index 0000000000000..17a821c7e2ddb
--- /dev/null
+++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/DiscoveredAssetsClientImpl.java
@@ -0,0 +1,1296 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.deviceregistry.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.Patch;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.deviceregistry.fluent.DiscoveredAssetsClient;
+import com.azure.resourcemanager.deviceregistry.fluent.models.DiscoveredAssetInner;
+import com.azure.resourcemanager.deviceregistry.implementation.models.DiscoveredAssetListResult;
+import com.azure.resourcemanager.deviceregistry.models.DiscoveredAssetUpdate;
+import java.nio.ByteBuffer;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in DiscoveredAssetsClient.
+ */
+public final class DiscoveredAssetsClientImpl implements DiscoveredAssetsClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final DiscoveredAssetsService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final DeviceRegistryManagementClientImpl client;
+
+ /**
+ * Initializes an instance of DiscoveredAssetsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ DiscoveredAssetsClientImpl(DeviceRegistryManagementClientImpl client) {
+ this.service
+ = RestProxy.create(DiscoveredAssetsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for DeviceRegistryManagementClientDiscoveredAssets to be used by the
+ * proxy service to perform REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "DeviceRegistryManage")
+ public interface DiscoveredAssetsService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/discoveredAssets/{discoveredAssetName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getByResourceGroup(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("discoveredAssetName") String discoveredAssetName, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/discoveredAssets/{discoveredAssetName}")
+ @ExpectedResponses({ 200, 201 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> createOrReplace(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("discoveredAssetName") String discoveredAssetName,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") DiscoveredAssetInner resource, Context context);
+
+ @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/discoveredAssets/{discoveredAssetName}")
+ @ExpectedResponses({ 200, 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> update(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("discoveredAssetName") String discoveredAssetName,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") DiscoveredAssetUpdate properties, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/discoveredAssets/{discoveredAssetName}")
+ @ExpectedResponses({ 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("discoveredAssetName") String discoveredAssetName, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/discoveredAssets")
+ @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}/providers/Microsoft.DeviceRegistry/discoveredAssets")
+ @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("{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)
+ Mono> listBySubscriptionNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * Get a DiscoveredAsset.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetName Discovered Asset name parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a DiscoveredAsset along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName,
+ String discoveredAssetName) {
+ 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 (discoveredAssetName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter discoveredAssetName 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, discoveredAssetName, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get a DiscoveredAsset.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetName Discovered Asset name parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a DiscoveredAsset along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName,
+ String discoveredAssetName, 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 (discoveredAssetName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter discoveredAssetName 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, discoveredAssetName, accept, context);
+ }
+
+ /**
+ * Get a DiscoveredAsset.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetName Discovered Asset name parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a DiscoveredAsset on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getByResourceGroupAsync(String resourceGroupName, String discoveredAssetName) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, discoveredAssetName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get a DiscoveredAsset.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetName Discovered Asset name parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a DiscoveredAsset along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getByResourceGroupWithResponse(String resourceGroupName,
+ String discoveredAssetName, Context context) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, discoveredAssetName, context).block();
+ }
+
+ /**
+ * Get a DiscoveredAsset.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetName Discovered Asset name parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a DiscoveredAsset.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DiscoveredAssetInner getByResourceGroup(String resourceGroupName, String discoveredAssetName) {
+ return getByResourceGroupWithResponse(resourceGroupName, discoveredAssetName, Context.NONE).getValue();
+ }
+
+ /**
+ * Create a DiscoveredAsset.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetName Discovered Asset name parameter.
+ * @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 discovered Asset definition along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrReplaceWithResponseAsync(String resourceGroupName,
+ String discoveredAssetName, DiscoveredAssetInner 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 (discoveredAssetName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter discoveredAssetName 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 contentType = "application/json";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.createOrReplace(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, discoveredAssetName, contentType, accept, resource,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Create a DiscoveredAsset.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetName Discovered Asset name parameter.
+ * @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 discovered Asset definition along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrReplaceWithResponseAsync(String resourceGroupName,
+ String discoveredAssetName, DiscoveredAssetInner 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 (discoveredAssetName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter discoveredAssetName 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 contentType = "application/json";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.createOrReplace(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, discoveredAssetName, contentType, accept, resource,
+ context);
+ }
+
+ /**
+ * Create a DiscoveredAsset.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetName Discovered Asset name parameter.
+ * @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 PollerFlux} for polling of discovered Asset definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, DiscoveredAssetInner>
+ beginCreateOrReplaceAsync(String resourceGroupName, String discoveredAssetName, DiscoveredAssetInner resource) {
+ Mono>> mono
+ = createOrReplaceWithResponseAsync(resourceGroupName, discoveredAssetName, resource);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(),
+ DiscoveredAssetInner.class, DiscoveredAssetInner.class, this.client.getContext());
+ }
+
+ /**
+ * Create a DiscoveredAsset.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetName Discovered Asset name parameter.
+ * @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 discovered Asset definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, DiscoveredAssetInner> beginCreateOrReplaceAsync(
+ String resourceGroupName, String discoveredAssetName, DiscoveredAssetInner resource, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono
+ = createOrReplaceWithResponseAsync(resourceGroupName, discoveredAssetName, resource, context);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(),
+ DiscoveredAssetInner.class, DiscoveredAssetInner.class, context);
+ }
+
+ /**
+ * Create a DiscoveredAsset.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetName Discovered Asset name parameter.
+ * @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 discovered Asset definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, DiscoveredAssetInner>
+ beginCreateOrReplace(String resourceGroupName, String discoveredAssetName, DiscoveredAssetInner resource) {
+ return this.beginCreateOrReplaceAsync(resourceGroupName, discoveredAssetName, resource).getSyncPoller();
+ }
+
+ /**
+ * Create a DiscoveredAsset.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetName Discovered Asset name parameter.
+ * @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 discovered Asset definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, DiscoveredAssetInner> beginCreateOrReplace(
+ String resourceGroupName, String discoveredAssetName, DiscoveredAssetInner resource, Context context) {
+ return this.beginCreateOrReplaceAsync(resourceGroupName, discoveredAssetName, resource, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * Create a DiscoveredAsset.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetName Discovered Asset name parameter.
+ * @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 discovered Asset definition on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrReplaceAsync(String resourceGroupName, String discoveredAssetName,
+ DiscoveredAssetInner resource) {
+ return beginCreateOrReplaceAsync(resourceGroupName, discoveredAssetName, resource).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create a DiscoveredAsset.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetName Discovered Asset name parameter.
+ * @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 discovered Asset definition on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrReplaceAsync(String resourceGroupName, String discoveredAssetName,
+ DiscoveredAssetInner resource, Context context) {
+ return beginCreateOrReplaceAsync(resourceGroupName, discoveredAssetName, resource, context).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create a DiscoveredAsset.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetName Discovered Asset name parameter.
+ * @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 discovered Asset definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DiscoveredAssetInner createOrReplace(String resourceGroupName, String discoveredAssetName,
+ DiscoveredAssetInner resource) {
+ return createOrReplaceAsync(resourceGroupName, discoveredAssetName, resource).block();
+ }
+
+ /**
+ * Create a DiscoveredAsset.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetName Discovered Asset name parameter.
+ * @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 discovered Asset definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DiscoveredAssetInner createOrReplace(String resourceGroupName, String discoveredAssetName,
+ DiscoveredAssetInner resource, Context context) {
+ return createOrReplaceAsync(resourceGroupName, discoveredAssetName, resource, context).block();
+ }
+
+ /**
+ * Update a DiscoveredAsset.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetName Discovered Asset name parameter.
+ * @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 discovered Asset definition along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> updateWithResponseAsync(String resourceGroupName,
+ String discoveredAssetName, DiscoveredAssetUpdate 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 (discoveredAssetName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter discoveredAssetName 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 contentType = "application/json";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, discoveredAssetName, contentType, accept,
+ properties, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Update a DiscoveredAsset.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetName Discovered Asset name parameter.
+ * @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 discovered Asset definition along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> updateWithResponseAsync(String resourceGroupName,
+ String discoveredAssetName, DiscoveredAssetUpdate 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 (discoveredAssetName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter discoveredAssetName 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 contentType = "application/json";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, discoveredAssetName, contentType, accept, properties, context);
+ }
+
+ /**
+ * Update a DiscoveredAsset.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetName Discovered Asset name parameter.
+ * @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 discovered Asset definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, DiscoveredAssetInner>
+ beginUpdateAsync(String resourceGroupName, String discoveredAssetName, DiscoveredAssetUpdate properties) {
+ Mono>> mono
+ = updateWithResponseAsync(resourceGroupName, discoveredAssetName, properties);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(),
+ DiscoveredAssetInner.class, DiscoveredAssetInner.class, this.client.getContext());
+ }
+
+ /**
+ * Update a DiscoveredAsset.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetName Discovered Asset name parameter.
+ * @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 the {@link PollerFlux} for polling of discovered Asset definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, DiscoveredAssetInner> beginUpdateAsync(
+ String resourceGroupName, String discoveredAssetName, DiscoveredAssetUpdate properties, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono
+ = updateWithResponseAsync(resourceGroupName, discoveredAssetName, properties, context);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(),
+ DiscoveredAssetInner.class, DiscoveredAssetInner.class, context);
+ }
+
+ /**
+ * Update a DiscoveredAsset.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetName Discovered Asset name parameter.
+ * @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 SyncPoller} for polling of discovered Asset definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, DiscoveredAssetInner> beginUpdate(String resourceGroupName,
+ String discoveredAssetName, DiscoveredAssetUpdate properties) {
+ return this.beginUpdateAsync(resourceGroupName, discoveredAssetName, properties).getSyncPoller();
+ }
+
+ /**
+ * Update a DiscoveredAsset.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetName Discovered Asset name parameter.
+ * @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 the {@link SyncPoller} for polling of discovered Asset definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, DiscoveredAssetInner> beginUpdate(String resourceGroupName,
+ String discoveredAssetName, DiscoveredAssetUpdate properties, Context context) {
+ return this.beginUpdateAsync(resourceGroupName, discoveredAssetName, properties, context).getSyncPoller();
+ }
+
+ /**
+ * Update a DiscoveredAsset.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetName Discovered Asset name parameter.
+ * @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 discovered Asset definition on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(String resourceGroupName, String discoveredAssetName,
+ DiscoveredAssetUpdate properties) {
+ return beginUpdateAsync(resourceGroupName, discoveredAssetName, properties).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Update a DiscoveredAsset.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetName Discovered Asset name parameter.
+ * @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 discovered Asset definition on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(String resourceGroupName, String discoveredAssetName,
+ DiscoveredAssetUpdate properties, Context context) {
+ return beginUpdateAsync(resourceGroupName, discoveredAssetName, properties, context).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Update a DiscoveredAsset.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetName Discovered Asset name parameter.
+ * @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 discovered Asset definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DiscoveredAssetInner update(String resourceGroupName, String discoveredAssetName,
+ DiscoveredAssetUpdate properties) {
+ return updateAsync(resourceGroupName, discoveredAssetName, properties).block();
+ }
+
+ /**
+ * Update a DiscoveredAsset.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetName Discovered Asset name parameter.
+ * @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 discovered Asset definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DiscoveredAssetInner update(String resourceGroupName, String discoveredAssetName,
+ DiscoveredAssetUpdate properties, Context context) {
+ return updateAsync(resourceGroupName, discoveredAssetName, properties, context).block();
+ }
+
+ /**
+ * Delete a DiscoveredAsset.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetName Discovered Asset name parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(String resourceGroupName,
+ String discoveredAssetName) {
+ 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 (discoveredAssetName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter discoveredAssetName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, discoveredAssetName, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Delete a DiscoveredAsset.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetName Discovered Asset name parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(String resourceGroupName,
+ String discoveredAssetName, 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 (discoveredAssetName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter discoveredAssetName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, discoveredAssetName, accept, context);
+ }
+
+ /**
+ * Delete a DiscoveredAsset.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetName Discovered Asset name parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String discoveredAssetName) {
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, discoveredAssetName);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Delete a DiscoveredAsset.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetName Discovered Asset name parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String discoveredAssetName,
+ Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono
+ = deleteWithResponseAsync(resourceGroupName, discoveredAssetName, context);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
+ context);
+ }
+
+ /**
+ * Delete a DiscoveredAsset.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetName Discovered Asset name parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(String resourceGroupName, String discoveredAssetName) {
+ return this.beginDeleteAsync(resourceGroupName, discoveredAssetName).getSyncPoller();
+ }
+
+ /**
+ * Delete a DiscoveredAsset.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetName Discovered Asset name parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(String resourceGroupName, String discoveredAssetName,
+ Context context) {
+ return this.beginDeleteAsync(resourceGroupName, discoveredAssetName, context).getSyncPoller();
+ }
+
+ /**
+ * Delete a DiscoveredAsset.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetName Discovered Asset name parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String discoveredAssetName) {
+ return beginDeleteAsync(resourceGroupName, discoveredAssetName).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Delete a DiscoveredAsset.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetName Discovered Asset name parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String discoveredAssetName, Context context) {
+ return beginDeleteAsync(resourceGroupName, discoveredAssetName, context).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Delete a DiscoveredAsset.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetName Discovered Asset name parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String discoveredAssetName) {
+ deleteAsync(resourceGroupName, discoveredAssetName).block();
+ }
+
+ /**
+ * Delete a DiscoveredAsset.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param discoveredAssetName Discovered Asset name parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String discoveredAssetName, Context context) {
+ deleteAsync(resourceGroupName, discoveredAssetName, context).block();
+ }
+
+ /**
+ * List DiscoveredAsset 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 DiscoveredAsset list operation along with {@link PagedResponse} 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."));
+ }
+ 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()));
+ }
+
+ /**
+ * List DiscoveredAsset resources by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a DiscoveredAsset list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @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."));
+ }
+ 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));
+ }
+
+ /**
+ * List DiscoveredAsset 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 DiscoveredAsset 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 DiscoveredAsset resources by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a DiscoveredAsset list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) {
+ return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List DiscoveredAsset 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 DiscoveredAsset list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName));
+ }
+
+ /**
+ * List DiscoveredAsset resources by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a DiscoveredAsset list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context));
+ }
+
+ /**
+ * List DiscoveredAsset 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 DiscoveredAsset list operation along with {@link PagedResponse} 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."));
+ }
+ 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()));
+ }
+
+ /**
+ * List DiscoveredAsset resources by subscription ID.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a DiscoveredAsset list operation along with {@link PagedResponse} 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 DiscoveredAsset 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 DiscoveredAsset list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(() -> listSinglePageAsync(),
+ nextLink -> listBySubscriptionNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List DiscoveredAsset resources by subscription ID.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a DiscoveredAsset 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 DiscoveredAsset 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 DiscoveredAsset list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ return new PagedIterable<>(listAsync());
+ }
+
+ /**
+ * List DiscoveredAsset resources by subscription ID.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a DiscoveredAsset list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(Context context) {
+ return new PagedIterable<>(listAsync(context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 DiscoveredAsset list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(),
+ res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @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 DiscoveredAsset list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupNextSinglePageAsync(String nextLink,
+ Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 DiscoveredAsset list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(),
+ res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @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 DiscoveredAsset list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySubscriptionNextSinglePageAsync(String nextLink,
+ Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+}
diff --git a/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/DiscoveredAssetsImpl.java b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/DiscoveredAssetsImpl.java
new file mode 100644
index 0000000000000..e4c26f8f15dbe
--- /dev/null
+++ b/sdk/deviceregistry/azure-resourcemanager-deviceregistry/src/main/java/com/azure/resourcemanager/deviceregistry/implementation/DiscoveredAssetsImpl.java
@@ -0,0 +1,147 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.deviceregistry.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.deviceregistry.fluent.DiscoveredAssetsClient;
+import com.azure.resourcemanager.deviceregistry.fluent.models.DiscoveredAssetInner;
+import com.azure.resourcemanager.deviceregistry.models.DiscoveredAsset;
+import com.azure.resourcemanager.deviceregistry.models.DiscoveredAssets;
+
+public final class DiscoveredAssetsImpl implements DiscoveredAssets {
+ private static final ClientLogger LOGGER = new ClientLogger(DiscoveredAssetsImpl.class);
+
+ private final DiscoveredAssetsClient innerClient;
+
+ private final com.azure.resourcemanager.deviceregistry.DeviceRegistryManager serviceManager;
+
+ public DiscoveredAssetsImpl(DiscoveredAssetsClient innerClient,
+ com.azure.resourcemanager.deviceregistry.DeviceRegistryManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response getByResourceGroupWithResponse(String resourceGroupName,
+ String discoveredAssetName, Context context) {
+ Response inner
+ = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, discoveredAssetName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new DiscoveredAssetImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public DiscoveredAsset getByResourceGroup(String resourceGroupName, String discoveredAssetName) {
+ DiscoveredAssetInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, discoveredAssetName);
+ if (inner != null) {
+ return new DiscoveredAssetImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public void deleteByResourceGroup(String resourceGroupName, String discoveredAssetName) {
+ this.serviceClient().delete(resourceGroupName, discoveredAssetName);
+ }
+
+ public void delete(String resourceGroupName, String discoveredAssetName, Context context) {
+ this.serviceClient().delete(resourceGroupName, discoveredAssetName, context);
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new DiscoveredAssetImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ PagedIterable inner
+ = this.serviceClient().listByResourceGroup(resourceGroupName, context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new DiscoveredAssetImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new DiscoveredAssetImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(Context context) {
+ PagedIterable