diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index b84be386aa817..f0af113441f73 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -345,7 +345,7 @@ com.azure.resourcemanager:azure-resourcemanager-datamigration;1.0.0-beta.3;1.0.0 com.azure.resourcemanager:azure-resourcemanager-devspaces;1.0.0-beta.3;1.0.0-beta.4 com.azure.resourcemanager:azure-resourcemanager-devtestlabs;1.1.0;1.2.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-hanaonazure;1.0.0-beta.3;1.0.0-beta.4 -com.azure.resourcemanager:azure-resourcemanager-healthcareapis;1.1.0;1.2.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-healthcareapis;1.1.0;1.2.0 com.azure.resourcemanager:azure-resourcemanager-hybridcompute;1.0.0;1.1.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-logic;1.0.0-beta.3;1.0.0-beta.4 com.azure.resourcemanager:azure-resourcemanager-maintenance;1.0.0;1.1.0-beta.3 diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/CHANGELOG.md b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/CHANGELOG.md index bf767ec7c3f90..1963e7465d479 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/CHANGELOG.md +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/CHANGELOG.md @@ -1,14 +1,59 @@ # Release History -## 1.2.0-beta.1 (Unreleased) +## 1.2.0 (2024-12-19) -### Features Added +- Azure Resource Manager HealthcareApis client library for Java. This package contains Microsoft Azure SDK for HealthcareApis Management SDK. Azure Healthcare APIs Client. Package tag package-2024-03-31. 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 +#### Serialization/Deserialization change + +- `Jackson` is removed from dependency and no longer supported. + +##### Migration Guide + +If you are using `Jackson`/`ObjectMapper` for manual serialization/deserialization, configure your `ObjectMapper` for backward compatibility: +```java +objectMapper.registerModule(com.azure.core.serializer.json.jackson.JacksonJsonProvider.getJsonSerializableDatabindModule()); +``` + +### Features Added + +#### `models.ServicesResource` was modified + +* `name()` was added +* `id()` was added +* `type()` was added + +#### `models.PrivateLinkResource` was modified + +* `type()` was added +* `id()` was added +* `name()` was added + +#### `models.PrivateEndpointConnection` was modified + +* `name()` was added +* `id()` was added +* `type()` was added + +#### `models.ResourceCore` was modified + +* `id()` was added +* `type()` was added +* `name()` was added + +#### `models.TaggedResource` was modified + +* `id()` was added +* `name()` was added +* `type()` was added + +#### `models.LocationBasedResource` was modified -### Other Changes +* `name()` was added +* `type()` was added +* `id()` was added ## 1.1.0 (2024-04-15) diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/README.md b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/README.md index afa1617495f4d..0499e2dfa41db 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/README.md +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/README.md @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-healthcareapis - 1.1.0 + 1.2.0 ``` [//]: # ({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); @@ -74,6 +70,14 @@ See [API design][design] for general introduction on design and key concepts on ## Examples +```java +workspace = healthcareApisManager.workspaces() + .define(workspaceName) + .withExistingResourceGroup(resourceGroupName) + .withRegion(REGION) + .withProperties(new WorkspaceProperties().withPublicNetworkAccess(PublicNetworkAccess.DISABLED)) + .create(); +``` [Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/healthcareapis/azure-resourcemanager-healthcareapis/SAMPLE.md) @@ -97,6 +101,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/healthcareapis/azure-resourcemanager-healthcareapis/SAMPLE.md b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/SAMPLE.md index d02399f5ca89c..08f56f515c65a 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/SAMPLE.md +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/SAMPLE.md @@ -95,7 +95,9 @@ import com.azure.resourcemanager.healthcareapis.models.StorageConfiguration; */ public final class DicomServicesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/dicomservices/DicomServices_Create.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/dicomservices/ + * DicomServices_Create.json */ /** * Sample code: Create or update a Dicom Service. @@ -125,7 +127,9 @@ public final class DicomServicesCreateOrUpdateSamples { */ public final class DicomServicesDeleteSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/dicomservices/DicomServices_Delete.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/dicomservices/ + * DicomServices_Delete.json */ /** * Sample code: Delete a dicomservice. @@ -146,7 +150,9 @@ public final class DicomServicesDeleteSamples { */ public final class DicomServicesGetSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/dicomservices/DicomServices_Get.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/dicomservices/ + * DicomServices_Get.json */ /** * Sample code: Get a dicomservice. @@ -167,7 +173,9 @@ public final class DicomServicesGetSamples { */ public final class DicomServicesListByWorkspaceSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/dicomservices/DicomServices_List.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/dicomservices/ + * DicomServices_List.json */ /** * Sample code: List dicomservices. @@ -192,7 +200,9 @@ import java.util.Map; */ public final class DicomServicesUpdateSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/dicomservices/DicomServices_Patch.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/dicomservices/ + * DicomServices_Patch.json */ /** * Sample code: Update a dicomservice. @@ -228,7 +238,9 @@ public final class DicomServicesUpdateSamples { */ public final class FhirDestinationsListByIotConnectorSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/iotconnectors/iotconnector_fhirdestination_List.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/iotconnectors/ + * iotconnector_fhirdestination_List.json */ /** * Sample code: List IoT Connectors. @@ -268,7 +280,9 @@ import java.util.Map; */ public final class FhirServicesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/fhirservices/FhirServices_Create.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/fhirservices/ + * FhirServices_Create.json */ /** * Sample code: Create or update a Fhir Service. @@ -339,7 +353,9 @@ public final class FhirServicesCreateOrUpdateSamples { */ public final class FhirServicesDeleteSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/fhirservices/FhirServices_Delete.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/fhirservices/ + * FhirServices_Delete.json */ /** * Sample code: Delete a Fhir Service. @@ -360,7 +376,9 @@ public final class FhirServicesDeleteSamples { */ public final class FhirServicesGetSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/fhirservices/FhirServices_Get.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/fhirservices/ + * FhirServices_Get.json */ /** * Sample code: Get a Fhir Service. @@ -382,7 +400,9 @@ public final class FhirServicesGetSamples { */ public final class FhirServicesListByWorkspaceSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/fhirservices/FhirServices_List.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/fhirservices/ + * FhirServices_List.json */ /** * Sample code: List fhirservices. @@ -407,7 +427,9 @@ import java.util.Map; */ public final class FhirServicesUpdateSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/fhirservices/FhirServices_Patch.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/fhirservices/ + * FhirServices_Patch.json */ /** * Sample code: Update a Fhir Service. @@ -449,7 +471,9 @@ import java.io.IOException; */ public final class IotConnectorFhirDestinationCreateOrUpdateSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/iotconnectors/iotconnector_fhirdestination_Create.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/iotconnectors/ + * iotconnector_fhirdestination_Create.json */ /** * Sample code: Create or update an Iot Connector FHIR destination. @@ -483,7 +507,9 @@ public final class IotConnectorFhirDestinationCreateOrUpdateSamples { */ public final class IotConnectorFhirDestinationDeleteSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/iotconnectors/iotconnector_fhirdestination_Delete.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/iotconnectors/ + * iotconnector_fhirdestination_Delete.json */ /** * Sample code: Delete an IoT Connector destination. @@ -506,7 +532,9 @@ public final class IotConnectorFhirDestinationDeleteSamples { */ public final class IotConnectorFhirDestinationGetSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/iotconnectors/iotconnector_fhirdestination_Get.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/iotconnectors/ + * iotconnector_fhirdestination_Get.json */ /** * Sample code: Get an IoT Connector destination. @@ -539,7 +567,9 @@ import java.util.Map; */ public final class IotConnectorsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/iotconnectors/iotconnector_Create.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/iotconnectors/ + * iotconnector_Create.json */ /** * Sample code: Create an IoT Connector. @@ -588,7 +618,9 @@ public final class IotConnectorsCreateOrUpdateSamples { */ public final class IotConnectorsDeleteSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/iotconnectors/iotconnector_Delete.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/iotconnectors/ + * iotconnector_Delete.json */ /** * Sample code: Delete an IoT Connector. @@ -609,7 +641,9 @@ public final class IotConnectorsDeleteSamples { */ public final class IotConnectorsGetSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/iotconnectors/iotconnector_Get.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/iotconnectors/ + * iotconnector_Get.json */ /** * Sample code: Get an IoT Connector. @@ -630,7 +664,9 @@ public final class IotConnectorsGetSamples { */ public final class IotConnectorsListByWorkspaceSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/iotconnectors/iotconnector_List.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/iotconnectors/ + * iotconnector_List.json */ /** * Sample code: List iotconnectors. @@ -657,7 +693,9 @@ import java.util.Map; */ public final class IotConnectorsUpdateSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/iotconnectors/iotconnector_Patch.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/iotconnectors/ + * iotconnector_Patch.json */ /** * Sample code: Patch an IoT Connector. @@ -696,7 +734,9 @@ public final class IotConnectorsUpdateSamples { */ public final class OperationResultsGetSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/OperationResultsGet.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/ + * OperationResultsGet.json */ /** * Sample code: Get operation result. @@ -717,7 +757,9 @@ public final class OperationResultsGetSamples { */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/OperationsList.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/OperationsList. + * json */ /** * Sample code: List operations. @@ -741,7 +783,9 @@ import com.azure.resourcemanager.healthcareapis.models.PrivateLinkServiceConnect */ public final class PrivateEndpointConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/legacy/ServiceCreatePrivateEndpointConnection.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/legacy/ + * ServiceCreatePrivateEndpointConnection.json */ /** * Sample code: PrivateEndpointConnection_CreateOrUpdate. @@ -769,7 +813,9 @@ public final class PrivateEndpointConnectionsCreateOrUpdateSamples { */ public final class PrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/legacy/ServiceDeletePrivateEndpointConnection.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/legacy/ + * ServiceDeletePrivateEndpointConnection.json */ /** * Sample code: PrivateEndpointConnections_Delete. @@ -792,7 +838,9 @@ public final class PrivateEndpointConnectionsDeleteSamples { */ public final class PrivateEndpointConnectionsGetSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/legacy/ServiceGetPrivateEndpointConnection.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/legacy/ + * ServiceGetPrivateEndpointConnection.json */ /** * Sample code: PrivateEndpointConnection_GetConnection. @@ -815,7 +863,9 @@ public final class PrivateEndpointConnectionsGetSamples { */ public final class PrivateEndpointConnectionsListByServiceSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/legacy/ServiceListPrivateEndpointConnections.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/legacy/ + * ServiceListPrivateEndpointConnections.json */ /** * Sample code: PrivateEndpointConnection_List. @@ -837,7 +887,9 @@ public final class PrivateEndpointConnectionsListByServiceSamples { */ public final class PrivateLinkResourcesGetSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/legacy/PrivateLinkResourceGet.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/legacy/ + * PrivateLinkResourceGet.json */ /** * Sample code: PrivateLinkResources_Get. @@ -858,7 +910,9 @@ public final class PrivateLinkResourcesGetSamples { */ public final class PrivateLinkResourcesListByServiceSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/legacy/PrivateLinkResourcesListByService.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/legacy/ + * PrivateLinkResourcesListByService.json */ /** * Sample code: PrivateLinkResources_ListGroupIds. @@ -883,7 +937,9 @@ import com.azure.resourcemanager.healthcareapis.models.CheckNameAvailabilityPara */ public final class ServicesCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/CheckNameAvailabilityPost.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/ + * CheckNameAvailabilityPost.json */ /** * Sample code: Check name availability. @@ -920,7 +976,9 @@ import java.util.Map; */ public final class ServicesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/legacy/ServiceCreate.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/legacy/ + * ServiceCreate.json */ /** * Sample code: Create or Update a service with all parameters. @@ -959,7 +1017,9 @@ public final class ServicesCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/legacy/ServiceCreateInDataSovereignRegionWithCmkEnabled.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/legacy/ + * ServiceCreateInDataSovereignRegionWithCmkEnabled.json */ /** * Sample code: Create or Update a service with all parameters and CMK enabled in a data sovereign region. @@ -999,7 +1059,9 @@ public final class ServicesCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/legacy/ServiceCreateMinimum.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/legacy/ + * ServiceCreateMinimum.json */ /** * Sample code: Create or Update a service with minimum parameters. @@ -1041,7 +1103,9 @@ public final class ServicesCreateOrUpdateSamples { */ public final class ServicesDeleteSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/legacy/ServiceDelete.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/legacy/ + * ServiceDelete.json */ /** * Sample code: Delete service. @@ -1062,7 +1126,9 @@ public final class ServicesDeleteSamples { */ public final class ServicesGetByResourceGroupSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/legacy/ServiceGet.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/legacy/ + * ServiceGet.json */ /** * Sample code: Get metadata. @@ -1074,7 +1140,9 @@ public final class ServicesGetByResourceGroupSamples { } /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/legacy/ServiceGetInDataSovereignRegionWithCmkEnabled.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/legacy/ + * ServiceGetInDataSovereignRegionWithCmkEnabled.json */ /** * Sample code: Get metadata for CMK enabled service in data sovereign region. @@ -1096,7 +1164,9 @@ public final class ServicesGetByResourceGroupSamples { */ public final class ServicesListSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/legacy/ServiceList.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/legacy/ + * ServiceList.json */ /** * Sample code: List all services in subscription. @@ -1118,7 +1188,9 @@ public final class ServicesListSamples { */ public final class ServicesListByResourceGroupSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/legacy/ServiceListByResourceGroup.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/legacy/ + * ServiceListByResourceGroup.json */ /** * Sample code: List all services in resource group. @@ -1144,7 +1216,9 @@ import java.util.Map; */ public final class ServicesUpdateSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/legacy/ServicePatch.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/legacy/ + * ServicePatch.json */ /** * Sample code: Patch service. @@ -1184,7 +1258,9 @@ import com.azure.resourcemanager.healthcareapis.models.PrivateLinkServiceConnect */ public final class WorkspacePrivateEndpointConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/privatelink/WorkspaceCreatePrivateEndpointConnection.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/privatelink/ + * WorkspaceCreatePrivateEndpointConnection.json */ /** * Sample code: WorkspacePrivateEndpointConnection_CreateOrUpdate. @@ -1211,7 +1287,9 @@ public final class WorkspacePrivateEndpointConnectionsCreateOrUpdateSamples { */ public final class WorkspacePrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/privatelink/WorkspaceDeletePrivateEndpointConnection.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/privatelink/ + * WorkspaceDeletePrivateEndpointConnection.json */ /** * Sample code: WorkspacePrivateEndpointConnections_Delete. @@ -1234,7 +1312,9 @@ public final class WorkspacePrivateEndpointConnectionsDeleteSamples { */ public final class WorkspacePrivateEndpointConnectionsGetSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/privatelink/WorkspaceGetPrivateEndpointConnection.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/privatelink/ + * WorkspaceGetPrivateEndpointConnection.json */ /** * Sample code: WorkspacePrivateEndpointConnection_GetConnection. @@ -1257,7 +1337,9 @@ public final class WorkspacePrivateEndpointConnectionsGetSamples { */ public final class WorkspacePrivateEndpointConnectionsListByWorkspaceSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/privatelink/WorkspaceListPrivateEndpointConnections.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/privatelink/ + * WorkspaceListPrivateEndpointConnections.json */ /** * Sample code: WorkspacePrivateEndpointConnection_List. @@ -1280,7 +1362,9 @@ public final class WorkspacePrivateEndpointConnectionsListByWorkspaceSamples { */ public final class WorkspacePrivateLinkResourcesGetSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/privatelink/WorkspacePrivateLinkResourceGet.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/privatelink/ + * WorkspacePrivateLinkResourceGet.json */ /** * Sample code: WorkspacePrivateLinkResources_Get. @@ -1303,7 +1387,9 @@ public final class WorkspacePrivateLinkResourcesGetSamples { */ public final class WorkspacePrivateLinkResourcesListByWorkspaceSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/privatelink/PrivateLinkResourcesListByWorkspace.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/privatelink/ + * PrivateLinkResourcesListByWorkspace.json */ /** * Sample code: WorkspacePrivateLinkResources_ListGroupIds. @@ -1328,7 +1414,9 @@ import com.azure.resourcemanager.healthcareapis.models.WorkspaceProperties; */ public final class WorkspacesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/workspaces/Workspaces_Create.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/workspaces/ + * Workspaces_Create.json */ /** * Sample code: Create or update a workspace. @@ -1355,7 +1443,9 @@ public final class WorkspacesCreateOrUpdateSamples { */ public final class WorkspacesDeleteSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/workspaces/Workspaces_Delete.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/workspaces/ + * Workspaces_Delete.json */ /** * Sample code: Delete a workspace. @@ -1376,7 +1466,9 @@ public final class WorkspacesDeleteSamples { */ public final class WorkspacesGetByResourceGroupSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/workspaces/Workspaces_Get.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/workspaces/ + * Workspaces_Get.json */ /** * Sample code: Get workspace. @@ -1397,7 +1489,9 @@ public final class WorkspacesGetByResourceGroupSamples { */ public final class WorkspacesListSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/workspaces/Workspaces_ListBySubscription.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/workspaces/ + * Workspaces_ListBySubscription.json */ /** * Sample code: Get workspaces by subscription. @@ -1419,7 +1513,9 @@ public final class WorkspacesListSamples { */ public final class WorkspacesListByResourceGroupSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/workspaces/Workspaces_ListByResourceGroup.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/workspaces/ + * Workspaces_ListByResourceGroup.json */ /** * Sample code: Get workspaces by resource group. @@ -1445,7 +1541,9 @@ import java.util.Map; */ public final class WorkspacesUpdateSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/workspaces/Workspaces_Patch.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/workspaces/ + * Workspaces_Patch.json */ /** * Sample code: Update a workspace. diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/pom.xml b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/pom.xml index 2f39768fc7d9c..aa6b5d72bfc8c 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/pom.xml +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/pom.xml @@ -14,7 +14,7 @@ com.azure.resourcemanager azure-resourcemanager-healthcareapis - 1.2.0-beta.1 + 1.2.0 jar Microsoft Azure SDK for HealthcareApis Management @@ -45,6 +45,7 @@ UTF-8 0 0 + false diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/HealthcareApisManager.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/HealthcareApisManager.java index 6b7d1282bd2c7..d41daba967eee 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/HealthcareApisManager.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/HealthcareApisManager.java @@ -11,15 +11,15 @@ import com.azure.core.http.HttpPipelinePosition; import com.azure.core.http.policy.AddDatePolicy; import com.azure.core.http.policy.AddHeadersFromContextPolicy; -import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; import com.azure.core.http.policy.HttpPipelinePolicy; import com.azure.core.http.policy.HttpPolicyProviders; import com.azure.core.http.policy.RequestIdPolicy; import com.azure.core.http.policy.RetryOptions; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; -import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy; import com.azure.core.management.profile.AzureProfile; import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; @@ -253,7 +253,7 @@ public HealthcareApisManager authenticate(TokenCredential credential, AzureProfi .append("-") .append("com.azure.resourcemanager.healthcareapis") .append("/") - .append("1.1.0"); + .append("1.2.0"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder.append(" (") .append(Configuration.getGlobalConfiguration().get("java.version")) @@ -286,7 +286,7 @@ public HealthcareApisManager authenticate(TokenCredential credential, AzureProfi HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new AddDatePolicy()); - policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); + policies.add(new BearerTokenAuthenticationPolicy(credential, scopes.toArray(new String[0]))); policies.addAll(this.policies.stream() .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) .collect(Collectors.toList())); diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/DicomServiceInner.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/DicomServiceInner.java index a9047b3c7e430..15e184aec4a30 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/DicomServiceInner.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/DicomServiceInner.java @@ -6,6 +6,9 @@ import com.azure.core.annotation.Fluent; 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.healthcareapis.models.CorsConfiguration; import com.azure.resourcemanager.healthcareapis.models.DicomServiceAuthenticationConfiguration; import com.azure.resourcemanager.healthcareapis.models.Encryption; @@ -16,7 +19,7 @@ import com.azure.resourcemanager.healthcareapis.models.ServiceManagedIdentityIdentity; import com.azure.resourcemanager.healthcareapis.models.StorageConfiguration; import com.azure.resourcemanager.healthcareapis.models.TaggedResource; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; import java.util.Map; @@ -28,21 +31,33 @@ public final class DicomServiceInner extends TaggedResource { /* * Dicom Service configuration. */ - @JsonProperty(value = "properties") private DicomServiceProperties innerProperties; /* * Metadata pertaining to creation and last modification of the resource. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; /* * Setting indicating whether the service has a managed identity associated with it. */ - @JsonProperty(value = "identity") private ServiceManagedIdentityIdentity identity; + /* + * 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 DicomServiceInner class. */ @@ -87,6 +102,36 @@ public DicomServiceInner withIdentity(ServiceManagedIdentityIdentity identity) { return this; } + /** + * 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} */ @@ -299,7 +344,6 @@ public DicomServiceInner withEnableDataPartitions(Boolean enableDataPartitions) */ @Override public void validate() { - super.validate(); if (innerProperties() != null) { innerProperties().validate(); } @@ -307,4 +351,62 @@ public void validate() { identity().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("etag", etag()); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("identity", this.identity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DicomServiceInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DicomServiceInner 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 DicomServiceInner. + */ + public static DicomServiceInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DicomServiceInner deserializedDicomServiceInner = new DicomServiceInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedDicomServiceInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedDicomServiceInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedDicomServiceInner.type = reader.getString(); + } else if ("etag".equals(fieldName)) { + deserializedDicomServiceInner.withEtag(reader.getString()); + } else if ("location".equals(fieldName)) { + deserializedDicomServiceInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedDicomServiceInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedDicomServiceInner.innerProperties = DicomServiceProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedDicomServiceInner.systemData = SystemData.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedDicomServiceInner.identity = ServiceManagedIdentityIdentity.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDicomServiceInner; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/DicomServiceProperties.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/DicomServiceProperties.java index 149489824e569..76006d4ab66a1 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/DicomServiceProperties.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/DicomServiceProperties.java @@ -5,6 +5,10 @@ package com.azure.resourcemanager.healthcareapis.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.healthcareapis.models.CorsConfiguration; import com.azure.resourcemanager.healthcareapis.models.DicomServiceAuthenticationConfiguration; import com.azure.resourcemanager.healthcareapis.models.Encryption; @@ -13,72 +17,62 @@ import com.azure.resourcemanager.healthcareapis.models.PublicNetworkAccess; import com.azure.resourcemanager.healthcareapis.models.ServiceEventState; import com.azure.resourcemanager.healthcareapis.models.StorageConfiguration; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * Dicom Service properties. */ @Fluent -public final class DicomServiceProperties { +public final class DicomServiceProperties implements JsonSerializable { /* * The provisioning state. */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private ProvisioningState provisioningState; /* * Dicom Service authentication configuration. */ - @JsonProperty(value = "authenticationConfiguration") private DicomServiceAuthenticationConfiguration authenticationConfiguration; /* * Dicom Service Cors configuration. */ - @JsonProperty(value = "corsConfiguration") private CorsConfiguration corsConfiguration; /* * The url of the Dicom Services. */ - @JsonProperty(value = "serviceUrl", access = JsonProperty.Access.WRITE_ONLY) private String serviceUrl; /* * The list of private endpoint connections that are set up for this resource. */ - @JsonProperty(value = "privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY) private List privateEndpointConnections; /* * Control permission for data plane traffic coming from public networks while private endpoint is enabled. */ - @JsonProperty(value = "publicNetworkAccess") private PublicNetworkAccess publicNetworkAccess; /* * DICOM Service event support status. */ - @JsonProperty(value = "eventState", access = JsonProperty.Access.WRITE_ONLY) private ServiceEventState eventState; /* * The encryption settings of the DICOM service */ - @JsonProperty(value = "encryption") private Encryption encryption; /* * The configuration of external storage account */ - @JsonProperty(value = "storageConfiguration") private StorageConfiguration storageConfiguration; /* * If data partitions is enabled or not. */ - @JsonProperty(value = "enableDataPartitions") private Boolean enableDataPartitions; /** @@ -269,4 +263,70 @@ public void validate() { storageConfiguration().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("authenticationConfiguration", this.authenticationConfiguration); + jsonWriter.writeJsonField("corsConfiguration", this.corsConfiguration); + jsonWriter.writeStringField("publicNetworkAccess", + this.publicNetworkAccess == null ? null : this.publicNetworkAccess.toString()); + jsonWriter.writeJsonField("encryption", this.encryption); + jsonWriter.writeJsonField("storageConfiguration", this.storageConfiguration); + jsonWriter.writeBooleanField("enableDataPartitions", this.enableDataPartitions); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DicomServiceProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DicomServiceProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the DicomServiceProperties. + */ + public static DicomServiceProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DicomServiceProperties deserializedDicomServiceProperties = new DicomServiceProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedDicomServiceProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("authenticationConfiguration".equals(fieldName)) { + deserializedDicomServiceProperties.authenticationConfiguration + = DicomServiceAuthenticationConfiguration.fromJson(reader); + } else if ("corsConfiguration".equals(fieldName)) { + deserializedDicomServiceProperties.corsConfiguration = CorsConfiguration.fromJson(reader); + } else if ("serviceUrl".equals(fieldName)) { + deserializedDicomServiceProperties.serviceUrl = reader.getString(); + } else if ("privateEndpointConnections".equals(fieldName)) { + List privateEndpointConnections + = reader.readArray(reader1 -> PrivateEndpointConnection.fromJson(reader1)); + deserializedDicomServiceProperties.privateEndpointConnections = privateEndpointConnections; + } else if ("publicNetworkAccess".equals(fieldName)) { + deserializedDicomServiceProperties.publicNetworkAccess + = PublicNetworkAccess.fromString(reader.getString()); + } else if ("eventState".equals(fieldName)) { + deserializedDicomServiceProperties.eventState = ServiceEventState.fromString(reader.getString()); + } else if ("encryption".equals(fieldName)) { + deserializedDicomServiceProperties.encryption = Encryption.fromJson(reader); + } else if ("storageConfiguration".equals(fieldName)) { + deserializedDicomServiceProperties.storageConfiguration = StorageConfiguration.fromJson(reader); + } else if ("enableDataPartitions".equals(fieldName)) { + deserializedDicomServiceProperties.enableDataPartitions + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedDicomServiceProperties; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/FhirServiceInner.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/FhirServiceInner.java index 17e453a215a1a..5953a5dd8e0a9 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/FhirServiceInner.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/FhirServiceInner.java @@ -6,6 +6,9 @@ import com.azure.core.annotation.Fluent; 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.healthcareapis.models.Encryption; import com.azure.resourcemanager.healthcareapis.models.FhirServiceAcrConfiguration; import com.azure.resourcemanager.healthcareapis.models.FhirServiceAuthenticationConfiguration; @@ -21,7 +24,7 @@ import com.azure.resourcemanager.healthcareapis.models.ServiceEventState; import com.azure.resourcemanager.healthcareapis.models.ServiceManagedIdentityIdentity; import com.azure.resourcemanager.healthcareapis.models.TaggedResource; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; import java.util.Map; @@ -33,27 +36,38 @@ public final class FhirServiceInner extends TaggedResource { /* * The kind of the service. */ - @JsonProperty(value = "kind") private FhirServiceKind kind; /* * Fhir Service configuration. */ - @JsonProperty(value = "properties") private FhirServiceProperties innerProperties; /* * Metadata pertaining to creation and last modification of the resource. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; /* * Setting indicating whether the service has a managed identity associated with it. */ - @JsonProperty(value = "identity") private ServiceManagedIdentityIdentity identity; + /* + * 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 FhirServiceInner class. */ @@ -118,6 +132,36 @@ public FhirServiceInner withIdentity(ServiceManagedIdentityIdentity identity) { return this; } + /** + * 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} */ @@ -392,7 +436,6 @@ public FhirServiceInner withEncryption(Encryption encryption) { */ @Override public void validate() { - super.validate(); if (innerProperties() != null) { innerProperties().validate(); } @@ -400,4 +443,65 @@ public void validate() { identity().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("etag", etag()); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString()); + jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("identity", this.identity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FhirServiceInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FhirServiceInner 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 FhirServiceInner. + */ + public static FhirServiceInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FhirServiceInner deserializedFhirServiceInner = new FhirServiceInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedFhirServiceInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedFhirServiceInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedFhirServiceInner.type = reader.getString(); + } else if ("etag".equals(fieldName)) { + deserializedFhirServiceInner.withEtag(reader.getString()); + } else if ("location".equals(fieldName)) { + deserializedFhirServiceInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedFhirServiceInner.withTags(tags); + } else if ("kind".equals(fieldName)) { + deserializedFhirServiceInner.kind = FhirServiceKind.fromString(reader.getString()); + } else if ("properties".equals(fieldName)) { + deserializedFhirServiceInner.innerProperties = FhirServiceProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedFhirServiceInner.systemData = SystemData.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedFhirServiceInner.identity = ServiceManagedIdentityIdentity.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedFhirServiceInner; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/FhirServiceProperties.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/FhirServiceProperties.java index daa7dbf487dae..08a4e8c47829d 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/FhirServiceProperties.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/FhirServiceProperties.java @@ -5,6 +5,10 @@ package com.azure.resourcemanager.healthcareapis.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.healthcareapis.models.Encryption; import com.azure.resourcemanager.healthcareapis.models.FhirServiceAcrConfiguration; import com.azure.resourcemanager.healthcareapis.models.FhirServiceAuthenticationConfiguration; @@ -17,84 +21,72 @@ import com.azure.resourcemanager.healthcareapis.models.PublicNetworkAccess; import com.azure.resourcemanager.healthcareapis.models.ResourceVersionPolicyConfiguration; import com.azure.resourcemanager.healthcareapis.models.ServiceEventState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * Fhir Service properties. */ @Fluent -public final class FhirServiceProperties { +public final class FhirServiceProperties implements JsonSerializable { /* * The provisioning state. */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private ProvisioningState provisioningState; /* * Fhir Service Azure container registry configuration. */ - @JsonProperty(value = "acrConfiguration") private FhirServiceAcrConfiguration acrConfiguration; /* * Fhir Service authentication configuration. */ - @JsonProperty(value = "authenticationConfiguration") private FhirServiceAuthenticationConfiguration authenticationConfiguration; /* * Fhir Service Cors configuration. */ - @JsonProperty(value = "corsConfiguration") private FhirServiceCorsConfiguration corsConfiguration; /* * Fhir Service export configuration. */ - @JsonProperty(value = "exportConfiguration") private FhirServiceExportConfiguration exportConfiguration; /* * The list of private endpoint connections that are set up for this resource. */ - @JsonProperty(value = "privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY) private List privateEndpointConnections; /* * Control permission for data plane traffic coming from public networks while private endpoint is enabled. */ - @JsonProperty(value = "publicNetworkAccess") private PublicNetworkAccess publicNetworkAccess; /* * Fhir Service event support status. */ - @JsonProperty(value = "eventState", access = JsonProperty.Access.WRITE_ONLY) private ServiceEventState eventState; /* * Determines tracking of history for resources. */ - @JsonProperty(value = "resourceVersionPolicyConfiguration") private ResourceVersionPolicyConfiguration resourceVersionPolicyConfiguration; /* * Fhir Service import configuration. */ - @JsonProperty(value = "importConfiguration") private FhirServiceImportConfiguration importConfiguration; /* * Implementation Guides configuration. */ - @JsonProperty(value = "implementationGuidesConfiguration") private ImplementationGuidesConfiguration implementationGuidesConfiguration; /* * The encryption settings of the FHIR service */ - @JsonProperty(value = "encryption") private Encryption encryption; /** @@ -350,4 +342,80 @@ public void validate() { encryption().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("acrConfiguration", this.acrConfiguration); + jsonWriter.writeJsonField("authenticationConfiguration", this.authenticationConfiguration); + jsonWriter.writeJsonField("corsConfiguration", this.corsConfiguration); + jsonWriter.writeJsonField("exportConfiguration", this.exportConfiguration); + jsonWriter.writeStringField("publicNetworkAccess", + this.publicNetworkAccess == null ? null : this.publicNetworkAccess.toString()); + jsonWriter.writeJsonField("resourceVersionPolicyConfiguration", this.resourceVersionPolicyConfiguration); + jsonWriter.writeJsonField("importConfiguration", this.importConfiguration); + jsonWriter.writeJsonField("implementationGuidesConfiguration", this.implementationGuidesConfiguration); + jsonWriter.writeJsonField("encryption", this.encryption); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FhirServiceProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FhirServiceProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the FhirServiceProperties. + */ + public static FhirServiceProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FhirServiceProperties deserializedFhirServiceProperties = new FhirServiceProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedFhirServiceProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("acrConfiguration".equals(fieldName)) { + deserializedFhirServiceProperties.acrConfiguration = FhirServiceAcrConfiguration.fromJson(reader); + } else if ("authenticationConfiguration".equals(fieldName)) { + deserializedFhirServiceProperties.authenticationConfiguration + = FhirServiceAuthenticationConfiguration.fromJson(reader); + } else if ("corsConfiguration".equals(fieldName)) { + deserializedFhirServiceProperties.corsConfiguration = FhirServiceCorsConfiguration.fromJson(reader); + } else if ("exportConfiguration".equals(fieldName)) { + deserializedFhirServiceProperties.exportConfiguration + = FhirServiceExportConfiguration.fromJson(reader); + } else if ("privateEndpointConnections".equals(fieldName)) { + List privateEndpointConnections + = reader.readArray(reader1 -> PrivateEndpointConnection.fromJson(reader1)); + deserializedFhirServiceProperties.privateEndpointConnections = privateEndpointConnections; + } else if ("publicNetworkAccess".equals(fieldName)) { + deserializedFhirServiceProperties.publicNetworkAccess + = PublicNetworkAccess.fromString(reader.getString()); + } else if ("eventState".equals(fieldName)) { + deserializedFhirServiceProperties.eventState = ServiceEventState.fromString(reader.getString()); + } else if ("resourceVersionPolicyConfiguration".equals(fieldName)) { + deserializedFhirServiceProperties.resourceVersionPolicyConfiguration + = ResourceVersionPolicyConfiguration.fromJson(reader); + } else if ("importConfiguration".equals(fieldName)) { + deserializedFhirServiceProperties.importConfiguration + = FhirServiceImportConfiguration.fromJson(reader); + } else if ("implementationGuidesConfiguration".equals(fieldName)) { + deserializedFhirServiceProperties.implementationGuidesConfiguration + = ImplementationGuidesConfiguration.fromJson(reader); + } else if ("encryption".equals(fieldName)) { + deserializedFhirServiceProperties.encryption = Encryption.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedFhirServiceProperties; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/IotConnectorInner.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/IotConnectorInner.java index 093734106cb21..9086329158780 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/IotConnectorInner.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/IotConnectorInner.java @@ -6,12 +6,15 @@ import com.azure.core.annotation.Fluent; 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.healthcareapis.models.IotEventHubIngestionEndpointConfiguration; import com.azure.resourcemanager.healthcareapis.models.IotMappingProperties; import com.azure.resourcemanager.healthcareapis.models.ProvisioningState; import com.azure.resourcemanager.healthcareapis.models.ServiceManagedIdentityIdentity; import com.azure.resourcemanager.healthcareapis.models.TaggedResource; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.Map; /** @@ -22,21 +25,33 @@ public final class IotConnectorInner extends TaggedResource { /* * IoT Connector configuration. */ - @JsonProperty(value = "properties") private IotConnectorProperties innerProperties; /* * Metadata pertaining to creation and last modification of the resource. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; /* * Setting indicating whether the service has a managed identity associated with it. */ - @JsonProperty(value = "identity") private ServiceManagedIdentityIdentity identity; + /* + * 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 IotConnectorInner class. */ @@ -81,6 +96,36 @@ public IotConnectorInner withIdentity(ServiceManagedIdentityIdentity identity) { return this; } + /** + * 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} */ @@ -171,7 +216,6 @@ public IotConnectorInner withDeviceMapping(IotMappingProperties deviceMapping) { */ @Override public void validate() { - super.validate(); if (innerProperties() != null) { innerProperties().validate(); } @@ -179,4 +223,62 @@ public void validate() { identity().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("etag", etag()); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("identity", this.identity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IotConnectorInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IotConnectorInner 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 IotConnectorInner. + */ + public static IotConnectorInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IotConnectorInner deserializedIotConnectorInner = new IotConnectorInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedIotConnectorInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedIotConnectorInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedIotConnectorInner.type = reader.getString(); + } else if ("etag".equals(fieldName)) { + deserializedIotConnectorInner.withEtag(reader.getString()); + } else if ("location".equals(fieldName)) { + deserializedIotConnectorInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedIotConnectorInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedIotConnectorInner.innerProperties = IotConnectorProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedIotConnectorInner.systemData = SystemData.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedIotConnectorInner.identity = ServiceManagedIdentityIdentity.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedIotConnectorInner; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/IotConnectorProperties.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/IotConnectorProperties.java index 4875beb0d2ae6..d76108174ed2b 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/IotConnectorProperties.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/IotConnectorProperties.java @@ -5,32 +5,33 @@ package com.azure.resourcemanager.healthcareapis.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.healthcareapis.models.IotEventHubIngestionEndpointConfiguration; import com.azure.resourcemanager.healthcareapis.models.IotMappingProperties; import com.azure.resourcemanager.healthcareapis.models.ProvisioningState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * IoT Connector properties. */ @Fluent -public final class IotConnectorProperties { +public final class IotConnectorProperties implements JsonSerializable { /* * The provisioning state. */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private ProvisioningState provisioningState; /* * Source configuration. */ - @JsonProperty(value = "ingestionEndpointConfiguration") private IotEventHubIngestionEndpointConfiguration ingestionEndpointConfiguration; /* * Device Mappings. */ - @JsonProperty(value = "deviceMapping") private IotMappingProperties deviceMapping; /** @@ -102,4 +103,47 @@ public void validate() { deviceMapping().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("ingestionEndpointConfiguration", this.ingestionEndpointConfiguration); + jsonWriter.writeJsonField("deviceMapping", this.deviceMapping); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IotConnectorProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IotConnectorProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the IotConnectorProperties. + */ + public static IotConnectorProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IotConnectorProperties deserializedIotConnectorProperties = new IotConnectorProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedIotConnectorProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("ingestionEndpointConfiguration".equals(fieldName)) { + deserializedIotConnectorProperties.ingestionEndpointConfiguration + = IotEventHubIngestionEndpointConfiguration.fromJson(reader); + } else if ("deviceMapping".equals(fieldName)) { + deserializedIotConnectorProperties.deviceMapping = IotMappingProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedIotConnectorProperties; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/IotFhirDestinationInner.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/IotFhirDestinationInner.java index 9680e093d309c..3eaf83f009347 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/IotFhirDestinationInner.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/IotFhirDestinationInner.java @@ -7,10 +7,13 @@ import com.azure.core.annotation.Fluent; 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.healthcareapis.models.IotIdentityResolutionType; import com.azure.resourcemanager.healthcareapis.models.IotMappingProperties; import com.azure.resourcemanager.healthcareapis.models.LocationBasedResource; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * IoT Connector FHIR destination definition. @@ -20,15 +23,28 @@ public final class IotFhirDestinationInner extends LocationBasedResource { /* * IoT FHIR Destination settings. */ - @JsonProperty(value = "properties", required = true) private IotFhirDestinationProperties innerProperties = new IotFhirDestinationProperties(); /* * Metadata pertaining to creation and last modification of the resource. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) 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 IotFhirDestinationInner class. */ @@ -53,6 +69,36 @@ 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} */ @@ -148,7 +194,6 @@ public IotFhirDestinationInner withFhirMapping(IotMappingProperties fhirMapping) */ @Override public void validate() { - super.validate(); if (innerProperties() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( @@ -159,4 +204,55 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(IotFhirDestinationInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("etag", etag()); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IotFhirDestinationInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IotFhirDestinationInner 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 IotFhirDestinationInner. + */ + public static IotFhirDestinationInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IotFhirDestinationInner deserializedIotFhirDestinationInner = new IotFhirDestinationInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedIotFhirDestinationInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedIotFhirDestinationInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedIotFhirDestinationInner.type = reader.getString(); + } else if ("etag".equals(fieldName)) { + deserializedIotFhirDestinationInner.withEtag(reader.getString()); + } else if ("location".equals(fieldName)) { + deserializedIotFhirDestinationInner.withLocation(reader.getString()); + } else if ("properties".equals(fieldName)) { + deserializedIotFhirDestinationInner.innerProperties = IotFhirDestinationProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedIotFhirDestinationInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedIotFhirDestinationInner; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/IotFhirDestinationProperties.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/IotFhirDestinationProperties.java index 0bcb27f01177a..71cefd6149aee 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/IotFhirDestinationProperties.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/IotFhirDestinationProperties.java @@ -6,10 +6,14 @@ import com.azure.core.annotation.Fluent; 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.healthcareapis.models.IotDestinationProperties; import com.azure.resourcemanager.healthcareapis.models.IotIdentityResolutionType; import com.azure.resourcemanager.healthcareapis.models.IotMappingProperties; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.resourcemanager.healthcareapis.models.ProvisioningState; +import java.io.IOException; /** * IoT Connector destination properties for an Azure FHIR service. @@ -19,21 +23,23 @@ public final class IotFhirDestinationProperties extends IotDestinationProperties /* * Determines how resource identity is resolved on the destination. */ - @JsonProperty(value = "resourceIdentityResolutionType", required = true) private IotIdentityResolutionType resourceIdentityResolutionType; /* * Fully qualified resource id of the FHIR service to connect to. */ - @JsonProperty(value = "fhirServiceResourceId", required = true) private String fhirServiceResourceId; /* * FHIR Mappings */ - @JsonProperty(value = "fhirMapping", required = true) private IotMappingProperties fhirMapping; + /* + * The provisioning state. + */ + private ProvisioningState provisioningState; + /** * Creates an instance of IotFhirDestinationProperties class. */ @@ -101,6 +107,16 @@ public IotFhirDestinationProperties withFhirMapping(IotMappingProperties fhirMap return this; } + /** + * Get the provisioningState property: The provisioning state. + * + * @return the provisioningState value. + */ + @Override + public ProvisioningState provisioningState() { + return this.provisioningState; + } + /** * Validates the instance. * @@ -108,7 +124,6 @@ public IotFhirDestinationProperties withFhirMapping(IotMappingProperties fhirMap */ @Override public void validate() { - super.validate(); if (resourceIdentityResolutionType() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( @@ -129,4 +144,52 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(IotFhirDestinationProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("resourceIdentityResolutionType", + this.resourceIdentityResolutionType == null ? null : this.resourceIdentityResolutionType.toString()); + jsonWriter.writeStringField("fhirServiceResourceId", this.fhirServiceResourceId); + jsonWriter.writeJsonField("fhirMapping", this.fhirMapping); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IotFhirDestinationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IotFhirDestinationProperties 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 IotFhirDestinationProperties. + */ + public static IotFhirDestinationProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IotFhirDestinationProperties deserializedIotFhirDestinationProperties = new IotFhirDestinationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedIotFhirDestinationProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("resourceIdentityResolutionType".equals(fieldName)) { + deserializedIotFhirDestinationProperties.resourceIdentityResolutionType + = IotIdentityResolutionType.fromString(reader.getString()); + } else if ("fhirServiceResourceId".equals(fieldName)) { + deserializedIotFhirDestinationProperties.fhirServiceResourceId = reader.getString(); + } else if ("fhirMapping".equals(fieldName)) { + deserializedIotFhirDestinationProperties.fhirMapping = IotMappingProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedIotFhirDestinationProperties; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/OperationDetailInner.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/OperationDetailInner.java index 79c0391c3a9d2..7f649156abd23 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/OperationDetailInner.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/OperationDetailInner.java @@ -5,50 +5,49 @@ package com.azure.resourcemanager.healthcareapis.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.healthcareapis.models.ActionType; import com.azure.resourcemanager.healthcareapis.models.OperationDisplay; import com.azure.resourcemanager.healthcareapis.models.OperationProperties; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * Service REST API operation. */ @Fluent -public final class OperationDetailInner { +public final class OperationDetailInner implements JsonSerializable { /* * Name of the operation */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) private String name; /* - * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane operations. + * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for + * ARM/control-plane operations. */ - @JsonProperty(value = "isDataAction", access = JsonProperty.Access.WRITE_ONLY) private Boolean isDataAction; /* * Display of the operation */ - @JsonProperty(value = "display") private OperationDisplay display; /* * Default value is 'user,system'. */ - @JsonProperty(value = "origin", access = JsonProperty.Access.WRITE_ONLY) private String origin; /* * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */ - @JsonProperty(value = "actionType", access = JsonProperty.Access.WRITE_ONLY) private ActionType actionType; /* * Properties of the operation */ - @JsonProperty(value = "properties") private OperationProperties properties; /** @@ -148,4 +147,51 @@ public void validate() { properties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("display", this.display); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OperationDetailInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OperationDetailInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the OperationDetailInner. + */ + public static OperationDetailInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OperationDetailInner deserializedOperationDetailInner = new OperationDetailInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedOperationDetailInner.name = reader.getString(); + } else if ("isDataAction".equals(fieldName)) { + deserializedOperationDetailInner.isDataAction = reader.getNullable(JsonReader::getBoolean); + } else if ("display".equals(fieldName)) { + deserializedOperationDetailInner.display = OperationDisplay.fromJson(reader); + } else if ("origin".equals(fieldName)) { + deserializedOperationDetailInner.origin = reader.getString(); + } else if ("actionType".equals(fieldName)) { + deserializedOperationDetailInner.actionType = ActionType.fromString(reader.getString()); + } else if ("properties".equals(fieldName)) { + deserializedOperationDetailInner.properties = OperationProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedOperationDetailInner; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/OperationResultsDescriptionInner.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/OperationResultsDescriptionInner.java index d57c72e40f20a..f904ce1f9c75b 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/OperationResultsDescriptionInner.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/OperationResultsDescriptionInner.java @@ -5,48 +5,46 @@ package com.azure.resourcemanager.healthcareapis.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.healthcareapis.models.OperationResultStatus; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * The properties indicating the operation result of an operation on a service. */ @Fluent -public final class OperationResultsDescriptionInner { +public final class OperationResultsDescriptionInner implements JsonSerializable { /* * The ID of the operation returned. */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) private String id; /* * The name of the operation result. */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) private String name; /* * The status of the operation being performed. */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private OperationResultStatus status; /* * The time that the operation was started. */ - @JsonProperty(value = "startTime", access = JsonProperty.Access.WRITE_ONLY) private String startTime; /* * The time that the operation finished. */ - @JsonProperty(value = "endTime", access = JsonProperty.Access.WRITE_ONLY) private String endTime; /* * Additional properties of the operation result. */ - @JsonProperty(value = "properties") private Object properties; /** @@ -127,4 +125,52 @@ public OperationResultsDescriptionInner withProperties(Object properties) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeUntypedField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OperationResultsDescriptionInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OperationResultsDescriptionInner if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the OperationResultsDescriptionInner. + */ + public static OperationResultsDescriptionInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OperationResultsDescriptionInner deserializedOperationResultsDescriptionInner + = new OperationResultsDescriptionInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedOperationResultsDescriptionInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedOperationResultsDescriptionInner.name = reader.getString(); + } else if ("status".equals(fieldName)) { + deserializedOperationResultsDescriptionInner.status + = OperationResultStatus.fromString(reader.getString()); + } else if ("startTime".equals(fieldName)) { + deserializedOperationResultsDescriptionInner.startTime = reader.getString(); + } else if ("endTime".equals(fieldName)) { + deserializedOperationResultsDescriptionInner.endTime = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedOperationResultsDescriptionInner.properties = reader.readUntyped(); + } else { + reader.skipChildren(); + } + } + + return deserializedOperationResultsDescriptionInner; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/PrivateEndpointConnectionDescriptionInner.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/PrivateEndpointConnectionDescriptionInner.java index 6a6e4c12157b6..99af62c3b5ed4 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/PrivateEndpointConnectionDescriptionInner.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/PrivateEndpointConnectionDescriptionInner.java @@ -6,10 +6,14 @@ import com.azure.core.annotation.Fluent; 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.healthcareapis.models.PrivateEndpoint; import com.azure.resourcemanager.healthcareapis.models.PrivateEndpointConnection; +import com.azure.resourcemanager.healthcareapis.models.PrivateEndpointConnectionProvisioningState; import com.azure.resourcemanager.healthcareapis.models.PrivateLinkServiceConnectionState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * The Private Endpoint Connection resource. @@ -19,9 +23,28 @@ public final class PrivateEndpointConnectionDescriptionInner extends PrivateEndp /* * Metadata pertaining to creation and last modification of the resource. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /* + * Resource properties. + */ + private PrivateEndpointConnectionProperties innerProperties; + + /* + * 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 PrivateEndpointConnectionDescriptionInner class. */ @@ -38,24 +61,102 @@ public SystemData systemData() { } /** - * {@inheritDoc} + * Get the innerProperties property: Resource properties. + * + * @return the innerProperties value. + */ + private PrivateEndpointConnectionProperties innerProperties() { + return this.innerProperties; + } + + /** + * 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; + } + + /** + * Get the privateEndpoint property: The resource of private end point. + * + * @return the privateEndpoint value. + */ + public PrivateEndpoint privateEndpoint() { + return this.innerProperties() == null ? null : this.innerProperties().privateEndpoint(); + } + + /** + * Set the privateEndpoint property: The resource of private end point. + * + * @param privateEndpoint the privateEndpoint value to set. + * @return the PrivateEndpointConnectionDescriptionInner object itself. + */ public PrivateEndpointConnectionDescriptionInner withPrivateEndpoint(PrivateEndpoint privateEndpoint) { - super.withPrivateEndpoint(privateEndpoint); + if (this.innerProperties() == null) { + this.innerProperties = new PrivateEndpointConnectionProperties(); + } + this.innerProperties().withPrivateEndpoint(privateEndpoint); return this; } /** - * {@inheritDoc} + * Get the privateLinkServiceConnectionState property: A collection of information about the state of the connection + * between service consumer and provider. + * + * @return the privateLinkServiceConnectionState value. + */ + public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { + return this.innerProperties() == null ? null : this.innerProperties().privateLinkServiceConnectionState(); + } + + /** + * Set the privateLinkServiceConnectionState property: A collection of information about the state of the connection + * between service consumer and provider. + * + * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set. + * @return the PrivateEndpointConnectionDescriptionInner object itself. */ - @Override public PrivateEndpointConnectionDescriptionInner withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { - super.withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState); + if (this.innerProperties() == null) { + this.innerProperties = new PrivateEndpointConnectionProperties(); + } + this.innerProperties().withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState); return this; } + /** + * Get the provisioningState property: The provisioning state of the private endpoint connection resource. + * + * @return the provisioningState value. + */ + public PrivateEndpointConnectionProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + /** * Validates the instance. * @@ -63,6 +164,55 @@ public PrivateEndpointConnectionDescriptionInner withPrivateEndpoint(PrivateEndp */ @Override public void validate() { - super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", innerProperties()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateEndpointConnectionDescriptionInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateEndpointConnectionDescriptionInner 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 PrivateEndpointConnectionDescriptionInner. + */ + public static PrivateEndpointConnectionDescriptionInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateEndpointConnectionDescriptionInner deserializedPrivateEndpointConnectionDescriptionInner + = new PrivateEndpointConnectionDescriptionInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedPrivateEndpointConnectionDescriptionInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedPrivateEndpointConnectionDescriptionInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedPrivateEndpointConnectionDescriptionInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedPrivateEndpointConnectionDescriptionInner.innerProperties + = PrivateEndpointConnectionProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedPrivateEndpointConnectionDescriptionInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateEndpointConnectionDescriptionInner; + }); } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/PrivateEndpointConnectionProperties.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/PrivateEndpointConnectionProperties.java index a449923e50772..21d86342f3d7e 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/PrivateEndpointConnectionProperties.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/PrivateEndpointConnectionProperties.java @@ -6,32 +6,34 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.healthcareapis.models.PrivateEndpoint; import com.azure.resourcemanager.healthcareapis.models.PrivateEndpointConnectionProvisioningState; import com.azure.resourcemanager.healthcareapis.models.PrivateLinkServiceConnectionState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * Properties of the PrivateEndpointConnectProperties. */ @Fluent -public final class PrivateEndpointConnectionProperties { +public final class PrivateEndpointConnectionProperties + implements JsonSerializable { /* * The resource of private end point. */ - @JsonProperty(value = "privateEndpoint") private PrivateEndpoint privateEndpoint; /* * A collection of information about the state of the connection between service consumer and provider. */ - @JsonProperty(value = "privateLinkServiceConnectionState", required = true) private PrivateLinkServiceConnectionState privateLinkServiceConnectionState; /* * The provisioning state of the private endpoint connection resource. */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private PrivateEndpointConnectionProvisioningState provisioningState; /** @@ -111,4 +113,49 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("privateLinkServiceConnectionState", this.privateLinkServiceConnectionState); + jsonWriter.writeJsonField("privateEndpoint", this.privateEndpoint); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateEndpointConnectionProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateEndpointConnectionProperties 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 PrivateEndpointConnectionProperties. + */ + public static PrivateEndpointConnectionProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateEndpointConnectionProperties deserializedPrivateEndpointConnectionProperties + = new PrivateEndpointConnectionProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("privateLinkServiceConnectionState".equals(fieldName)) { + deserializedPrivateEndpointConnectionProperties.privateLinkServiceConnectionState + = PrivateLinkServiceConnectionState.fromJson(reader); + } else if ("privateEndpoint".equals(fieldName)) { + deserializedPrivateEndpointConnectionProperties.privateEndpoint = PrivateEndpoint.fromJson(reader); + } else if ("provisioningState".equals(fieldName)) { + deserializedPrivateEndpointConnectionProperties.provisioningState + = PrivateEndpointConnectionProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateEndpointConnectionProperties; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/PrivateLinkResourceDescriptionInner.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/PrivateLinkResourceDescriptionInner.java index 27e0780515eb4..e07ca06d4b58f 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/PrivateLinkResourceDescriptionInner.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/PrivateLinkResourceDescriptionInner.java @@ -6,8 +6,11 @@ import com.azure.core.annotation.Fluent; 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.healthcareapis.models.PrivateLinkResource; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** @@ -18,9 +21,28 @@ public final class PrivateLinkResourceDescriptionInner extends PrivateLinkResour /* * Metadata pertaining to creation and last modification of the resource. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /* + * Resource properties. + */ + private PrivateLinkResourceProperties innerProperties; + + /* + * 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 PrivateLinkResourceDescriptionInner class. */ @@ -37,11 +59,82 @@ public SystemData systemData() { } /** - * {@inheritDoc} + * Get the innerProperties property: Resource properties. + * + * @return the innerProperties value. + */ + private PrivateLinkResourceProperties innerProperties() { + return this.innerProperties; + } + + /** + * 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; + } + + /** + * Get the groupId property: The private link resource group id. + * + * @return the groupId value. + */ + public String groupId() { + return this.innerProperties() == null ? null : this.innerProperties().groupId(); + } + + /** + * Get the requiredMembers property: The private link resource required member names. + * + * @return the requiredMembers value. + */ + public List requiredMembers() { + return this.innerProperties() == null ? null : this.innerProperties().requiredMembers(); + } + + /** + * Get the requiredZoneNames property: The private link resource Private link DNS zone name. + * + * @return the requiredZoneNames value. + */ + public List requiredZoneNames() { + return this.innerProperties() == null ? null : this.innerProperties().requiredZoneNames(); + } + + /** + * Set the requiredZoneNames property: The private link resource Private link DNS zone name. + * + * @param requiredZoneNames the requiredZoneNames value to set. + * @return the PrivateLinkResourceDescriptionInner object itself. + */ public PrivateLinkResourceDescriptionInner withRequiredZoneNames(List requiredZoneNames) { - super.withRequiredZoneNames(requiredZoneNames); + if (this.innerProperties() == null) { + this.innerProperties = new PrivateLinkResourceProperties(); + } + this.innerProperties().withRequiredZoneNames(requiredZoneNames); return this; } @@ -52,6 +145,55 @@ public PrivateLinkResourceDescriptionInner withRequiredZoneNames(List re */ @Override public void validate() { - super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", innerProperties()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateLinkResourceDescriptionInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateLinkResourceDescriptionInner 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 PrivateLinkResourceDescriptionInner. + */ + public static PrivateLinkResourceDescriptionInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateLinkResourceDescriptionInner deserializedPrivateLinkResourceDescriptionInner + = new PrivateLinkResourceDescriptionInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedPrivateLinkResourceDescriptionInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedPrivateLinkResourceDescriptionInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedPrivateLinkResourceDescriptionInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedPrivateLinkResourceDescriptionInner.innerProperties + = PrivateLinkResourceProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedPrivateLinkResourceDescriptionInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateLinkResourceDescriptionInner; + }); } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/PrivateLinkResourceListResultDescriptionInner.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/PrivateLinkResourceListResultDescriptionInner.java index d3cf8f0181f35..05a77e1d354dd 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/PrivateLinkResourceListResultDescriptionInner.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/PrivateLinkResourceListResultDescriptionInner.java @@ -5,18 +5,22 @@ package com.azure.resourcemanager.healthcareapis.fluent.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; /** * A list of private link resources. */ @Fluent -public final class PrivateLinkResourceListResultDescriptionInner { +public final class PrivateLinkResourceListResultDescriptionInner + implements JsonSerializable { /* * Array of private link resources */ - @JsonProperty(value = "value") private List value; /** @@ -55,4 +59,43 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateLinkResourceListResultDescriptionInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateLinkResourceListResultDescriptionInner if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the PrivateLinkResourceListResultDescriptionInner. + */ + public static PrivateLinkResourceListResultDescriptionInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateLinkResourceListResultDescriptionInner deserializedPrivateLinkResourceListResultDescriptionInner + = new PrivateLinkResourceListResultDescriptionInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> PrivateLinkResourceDescriptionInner.fromJson(reader1)); + deserializedPrivateLinkResourceListResultDescriptionInner.value = value; + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateLinkResourceListResultDescriptionInner; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/PrivateLinkResourceProperties.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/PrivateLinkResourceProperties.java index f68fe2ec30790..9202d8511e120 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/PrivateLinkResourceProperties.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/PrivateLinkResourceProperties.java @@ -5,30 +5,31 @@ package com.azure.resourcemanager.healthcareapis.fluent.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; /** * Properties of a private link resource. */ @Fluent -public final class PrivateLinkResourceProperties { +public final class PrivateLinkResourceProperties implements JsonSerializable { /* * The private link resource group id. */ - @JsonProperty(value = "groupId", access = JsonProperty.Access.WRITE_ONLY) private String groupId; /* * The private link resource required member names. */ - @JsonProperty(value = "requiredMembers", access = JsonProperty.Access.WRITE_ONLY) private List requiredMembers; /* * The private link resource Private link DNS zone name. */ - @JsonProperty(value = "requiredZoneNames") private List requiredZoneNames; /** @@ -82,4 +83,48 @@ public PrivateLinkResourceProperties withRequiredZoneNames(List required */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("requiredZoneNames", this.requiredZoneNames, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateLinkResourceProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateLinkResourceProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the PrivateLinkResourceProperties. + */ + public static PrivateLinkResourceProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateLinkResourceProperties deserializedPrivateLinkResourceProperties + = new PrivateLinkResourceProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("groupId".equals(fieldName)) { + deserializedPrivateLinkResourceProperties.groupId = reader.getString(); + } else if ("requiredMembers".equals(fieldName)) { + List requiredMembers = reader.readArray(reader1 -> reader1.getString()); + deserializedPrivateLinkResourceProperties.requiredMembers = requiredMembers; + } else if ("requiredZoneNames".equals(fieldName)) { + List requiredZoneNames = reader.readArray(reader1 -> reader1.getString()); + deserializedPrivateLinkResourceProperties.requiredZoneNames = requiredZoneNames; + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateLinkResourceProperties; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/ServicesDescriptionInner.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/ServicesDescriptionInner.java index 5d80fc1d6e303..5a6f1754c0d48 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/ServicesDescriptionInner.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/ServicesDescriptionInner.java @@ -6,11 +6,15 @@ import com.azure.core.annotation.Fluent; 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.healthcareapis.models.Kind; import com.azure.resourcemanager.healthcareapis.models.ServicesProperties; import com.azure.resourcemanager.healthcareapis.models.ServicesResource; import com.azure.resourcemanager.healthcareapis.models.ServicesResourceIdentity; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.Map; /** @@ -21,15 +25,28 @@ public final class ServicesDescriptionInner extends ServicesResource { /* * The common properties of a service. */ - @JsonProperty(value = "properties") private ServicesProperties properties; /* * Metadata pertaining to creation and last modification of the resource. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) 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 ServicesDescriptionInner class. */ @@ -65,6 +82,36 @@ 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} */ @@ -117,9 +164,78 @@ public ServicesDescriptionInner withTags(Map tags) { */ @Override public void validate() { - super.validate(); if (properties() != null) { properties().validate(); } + if (kind() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property kind in model ServicesDescriptionInner")); + } + if (identity() != null) { + identity().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ServicesDescriptionInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeStringField("kind", kind() == null ? null : kind().toString()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("etag", etag()); + jsonWriter.writeJsonField("identity", identity()); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServicesDescriptionInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServicesDescriptionInner 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 ServicesDescriptionInner. + */ + public static ServicesDescriptionInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServicesDescriptionInner deserializedServicesDescriptionInner = new ServicesDescriptionInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedServicesDescriptionInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedServicesDescriptionInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedServicesDescriptionInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedServicesDescriptionInner.withLocation(reader.getString()); + } else if ("kind".equals(fieldName)) { + deserializedServicesDescriptionInner.withKind(Kind.fromString(reader.getString())); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedServicesDescriptionInner.withTags(tags); + } else if ("etag".equals(fieldName)) { + deserializedServicesDescriptionInner.withEtag(reader.getString()); + } else if ("identity".equals(fieldName)) { + deserializedServicesDescriptionInner.withIdentity(ServicesResourceIdentity.fromJson(reader)); + } else if ("properties".equals(fieldName)) { + deserializedServicesDescriptionInner.properties = ServicesProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedServicesDescriptionInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedServicesDescriptionInner; + }); } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/ServicesNameAvailabilityInfoInner.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/ServicesNameAvailabilityInfoInner.java index d63aca8b76c7a..cf1731c5ecee1 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/ServicesNameAvailabilityInfoInner.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/ServicesNameAvailabilityInfoInner.java @@ -5,30 +5,31 @@ package com.azure.resourcemanager.healthcareapis.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.healthcareapis.models.ServiceNameUnavailabilityReason; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * The properties indicating whether a given service name is available. */ @Fluent -public final class ServicesNameAvailabilityInfoInner { +public final class ServicesNameAvailabilityInfoInner implements JsonSerializable { /* * The value which indicates whether the provided name is available. */ - @JsonProperty(value = "nameAvailable", access = JsonProperty.Access.WRITE_ONLY) private Boolean nameAvailable; /* * The reason for unavailability. */ - @JsonProperty(value = "reason", access = JsonProperty.Access.WRITE_ONLY) private ServiceNameUnavailabilityReason reason; /* * The detailed reason message. */ - @JsonProperty(value = "message") private String message; /** @@ -82,4 +83,47 @@ public ServicesNameAvailabilityInfoInner withMessage(String message) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("message", this.message); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServicesNameAvailabilityInfoInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServicesNameAvailabilityInfoInner if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ServicesNameAvailabilityInfoInner. + */ + public static ServicesNameAvailabilityInfoInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServicesNameAvailabilityInfoInner deserializedServicesNameAvailabilityInfoInner + = new ServicesNameAvailabilityInfoInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("nameAvailable".equals(fieldName)) { + deserializedServicesNameAvailabilityInfoInner.nameAvailable + = reader.getNullable(JsonReader::getBoolean); + } else if ("reason".equals(fieldName)) { + deserializedServicesNameAvailabilityInfoInner.reason + = ServiceNameUnavailabilityReason.fromString(reader.getString()); + } else if ("message".equals(fieldName)) { + deserializedServicesNameAvailabilityInfoInner.message = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedServicesNameAvailabilityInfoInner; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/ServicesPropertiesUpdateParameters.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/ServicesPropertiesUpdateParameters.java index 5dbbdfc7fc1c3..e9e25a394689f 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/ServicesPropertiesUpdateParameters.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/ServicesPropertiesUpdateParameters.java @@ -5,18 +5,21 @@ package com.azure.resourcemanager.healthcareapis.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.healthcareapis.models.PublicNetworkAccess; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * The properties for updating a service instance. */ @Fluent -public final class ServicesPropertiesUpdateParameters { +public final class ServicesPropertiesUpdateParameters implements JsonSerializable { /* * Control permission for data plane traffic coming from public networks while private endpoint is enabled. */ - @JsonProperty(value = "publicNetworkAccess") private PublicNetworkAccess publicNetworkAccess; /** @@ -54,4 +57,43 @@ public ServicesPropertiesUpdateParameters withPublicNetworkAccess(PublicNetworkA */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("publicNetworkAccess", + this.publicNetworkAccess == null ? null : this.publicNetworkAccess.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServicesPropertiesUpdateParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServicesPropertiesUpdateParameters if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ServicesPropertiesUpdateParameters. + */ + public static ServicesPropertiesUpdateParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServicesPropertiesUpdateParameters deserializedServicesPropertiesUpdateParameters + = new ServicesPropertiesUpdateParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("publicNetworkAccess".equals(fieldName)) { + deserializedServicesPropertiesUpdateParameters.publicNetworkAccess + = PublicNetworkAccess.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedServicesPropertiesUpdateParameters; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/WorkspaceInner.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/WorkspaceInner.java index 21dd093d0598b..47cb965d7a9b6 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/WorkspaceInner.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/WorkspaceInner.java @@ -6,9 +6,12 @@ import com.azure.core.annotation.Fluent; 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.healthcareapis.models.TaggedResource; import com.azure.resourcemanager.healthcareapis.models.WorkspaceProperties; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.Map; /** @@ -19,15 +22,28 @@ public final class WorkspaceInner extends TaggedResource { /* * Workspaces resource specific properties. */ - @JsonProperty(value = "properties") private WorkspaceProperties properties; /* * Metadata pertaining to creation and last modification of the resource. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) 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 WorkspaceInner class. */ @@ -63,6 +79,36 @@ 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} */ @@ -97,9 +143,63 @@ public WorkspaceInner withEtag(String etag) { */ @Override public void validate() { - super.validate(); if (properties() != null) { properties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("etag", etag()); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WorkspaceInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WorkspaceInner 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 WorkspaceInner. + */ + public static WorkspaceInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WorkspaceInner deserializedWorkspaceInner = new WorkspaceInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedWorkspaceInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedWorkspaceInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedWorkspaceInner.type = reader.getString(); + } else if ("etag".equals(fieldName)) { + deserializedWorkspaceInner.withEtag(reader.getString()); + } else if ("location".equals(fieldName)) { + deserializedWorkspaceInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedWorkspaceInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedWorkspaceInner.properties = WorkspaceProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedWorkspaceInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedWorkspaceInner; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/DicomServicesClientImpl.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/DicomServicesClientImpl.java index 496ce88712e96..71cf8735d8f8b 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/DicomServicesClientImpl.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/DicomServicesClientImpl.java @@ -1150,9 +1150,7 @@ public void delete(String resourceGroupName, String dicomServiceName, String wor /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -1179,9 +1177,7 @@ private Mono> listByWorkspaceNextSinglePageAsyn /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/FhirDestinationsClientImpl.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/FhirDestinationsClientImpl.java index 6f7a97459960b..0c01191395faa 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/FhirDestinationsClientImpl.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/FhirDestinationsClientImpl.java @@ -247,9 +247,7 @@ public PagedIterable listByIotConnector(String resource /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -277,9 +275,7 @@ private Mono> listByIotConnectorNextSingl /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/FhirServicesClientImpl.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/FhirServicesClientImpl.java index c4fb4c733e37f..5781035a33bd9 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/FhirServicesClientImpl.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/FhirServicesClientImpl.java @@ -1146,9 +1146,7 @@ public void delete(String resourceGroupName, String fhirServiceName, String work /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -1174,9 +1172,7 @@ private Mono> listByWorkspaceNextSinglePageAsync /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/HealthcareApisManagementClientImpl.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/HealthcareApisManagementClientImpl.java index 6b56ba1c290f4..6ed91521578e0 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/HealthcareApisManagementClientImpl.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/HealthcareApisManagementClientImpl.java @@ -13,8 +13,8 @@ import com.azure.core.management.AzureEnvironment; import com.azure.core.management.exception.ManagementError; import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollerFactory; import com.azure.core.management.polling.PollResult; +import com.azure.core.management.polling.PollerFactory; import com.azure.core.util.Context; import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/IotConnectorsClientImpl.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/IotConnectorsClientImpl.java index 8f36cb082fa70..ed60b29c7551b 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/IotConnectorsClientImpl.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/IotConnectorsClientImpl.java @@ -1148,9 +1148,7 @@ public void delete(String resourceGroupName, String iotConnectorName, String wor /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -1176,9 +1174,7 @@ private Mono> listByWorkspaceNextSinglePageAsyn /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/OperationResultsDescriptionImpl.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/OperationResultsDescriptionImpl.java index 6ecde24db7d99..11746d2ab057d 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/OperationResultsDescriptionImpl.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/OperationResultsDescriptionImpl.java @@ -5,8 +5,8 @@ package com.azure.resourcemanager.healthcareapis.implementation; import com.azure.resourcemanager.healthcareapis.fluent.models.OperationResultsDescriptionInner; -import com.azure.resourcemanager.healthcareapis.models.OperationResultsDescription; import com.azure.resourcemanager.healthcareapis.models.OperationResultStatus; +import com.azure.resourcemanager.healthcareapis.models.OperationResultsDescription; public final class OperationResultsDescriptionImpl implements OperationResultsDescription { private OperationResultsDescriptionInner innerObject; diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/OperationsClientImpl.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/OperationsClientImpl.java index a86e5f8df0e38..0f27b28d72c73 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/OperationsClientImpl.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/OperationsClientImpl.java @@ -179,9 +179,7 @@ public PagedIterable list(Context context) { /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -207,9 +205,7 @@ private Mono> listNextSinglePageAsync(String /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/ServicesClientImpl.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/ServicesClientImpl.java index e7ac31a3bd936..f411ab62d5fa7 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/ServicesClientImpl.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/ServicesClientImpl.java @@ -1304,9 +1304,7 @@ public Response checkNameAvailabilityWithResp /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -1332,9 +1330,7 @@ private Mono> listNextSinglePageAsync(St /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -1361,9 +1357,7 @@ private Mono> listNextSinglePageAsync(St /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -1391,9 +1385,7 @@ private Mono> listByResourceGroupNextSin /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/WorkspacesClientImpl.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/WorkspacesClientImpl.java index f354d99afb6da..4eaa19ae69149 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/WorkspacesClientImpl.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/WorkspacesClientImpl.java @@ -1167,9 +1167,7 @@ public void delete(String resourceGroupName, String workspaceName, Context conte /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -1197,9 +1195,7 @@ private Mono> listBySubscriptionNextSinglePageAsyn /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -1227,9 +1223,7 @@ private Mono> listBySubscriptionNextSinglePageAsyn /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. @@ -1257,9 +1251,7 @@ private Mono> listByResourceGroupNextSinglePageAsy /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @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. diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ActionType.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ActionType.java index 1c16b8bb4a163..cf38efbd38e67 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ActionType.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ActionType.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -32,7 +31,6 @@ public ActionType() { * @param name a name to look for. * @return the corresponding ActionType. */ - @JsonCreator public static ActionType fromString(String name) { return fromString(name, ActionType.class); } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/CheckNameAvailabilityParameters.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/CheckNameAvailabilityParameters.java index f918905798f49..271f337c511fb 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/CheckNameAvailabilityParameters.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/CheckNameAvailabilityParameters.java @@ -6,23 +6,25 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Input values. */ @Fluent -public final class CheckNameAvailabilityParameters { +public final class CheckNameAvailabilityParameters implements JsonSerializable { /* * The name of the service instance to check. */ - @JsonProperty(value = "name", required = true) private String name; /* * The fully qualified resource type which includes provider namespace. */ - @JsonProperty(value = "type", required = true) private String type; /** @@ -90,4 +92,45 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(CheckNameAvailabilityParameters.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("type", this.type); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CheckNameAvailabilityParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CheckNameAvailabilityParameters 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 CheckNameAvailabilityParameters. + */ + public static CheckNameAvailabilityParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CheckNameAvailabilityParameters deserializedCheckNameAvailabilityParameters + = new CheckNameAvailabilityParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedCheckNameAvailabilityParameters.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedCheckNameAvailabilityParameters.type = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedCheckNameAvailabilityParameters; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/CorsConfiguration.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/CorsConfiguration.java index 50cb5aae0329e..583ec4b000da5 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/CorsConfiguration.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/CorsConfiguration.java @@ -5,42 +5,41 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; /** * The settings for the CORS configuration of the service instance. */ @Fluent -public final class CorsConfiguration { +public final class CorsConfiguration implements JsonSerializable { /* * The origins to be allowed via CORS. */ - @JsonProperty(value = "origins") private List origins; /* * The headers to be allowed via CORS. */ - @JsonProperty(value = "headers") private List headers; /* * The methods to be allowed via CORS. */ - @JsonProperty(value = "methods") private List methods; /* * The max age to be allowed via CORS. */ - @JsonProperty(value = "maxAge") private Integer maxAge; /* * If credentials are allowed via CORS. */ - @JsonProperty(value = "allowCredentials") private Boolean allowCredentials; /** @@ -156,4 +155,55 @@ public CorsConfiguration withAllowCredentials(Boolean allowCredentials) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("origins", this.origins, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("headers", this.headers, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("methods", this.methods, (writer, element) -> writer.writeString(element)); + jsonWriter.writeNumberField("maxAge", this.maxAge); + jsonWriter.writeBooleanField("allowCredentials", this.allowCredentials); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CorsConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CorsConfiguration if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the CorsConfiguration. + */ + public static CorsConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CorsConfiguration deserializedCorsConfiguration = new CorsConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("origins".equals(fieldName)) { + List origins = reader.readArray(reader1 -> reader1.getString()); + deserializedCorsConfiguration.origins = origins; + } else if ("headers".equals(fieldName)) { + List headers = reader.readArray(reader1 -> reader1.getString()); + deserializedCorsConfiguration.headers = headers; + } else if ("methods".equals(fieldName)) { + List methods = reader.readArray(reader1 -> reader1.getString()); + deserializedCorsConfiguration.methods = methods; + } else if ("maxAge".equals(fieldName)) { + deserializedCorsConfiguration.maxAge = reader.getNullable(JsonReader::getInt); + } else if ("allowCredentials".equals(fieldName)) { + deserializedCorsConfiguration.allowCredentials = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedCorsConfiguration; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/DicomServiceAuthenticationConfiguration.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/DicomServiceAuthenticationConfiguration.java index e3ed7eadf8217..442ba3294f59f 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/DicomServiceAuthenticationConfiguration.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/DicomServiceAuthenticationConfiguration.java @@ -5,24 +5,27 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; /** * Authentication configuration information. */ @Immutable -public final class DicomServiceAuthenticationConfiguration { +public final class DicomServiceAuthenticationConfiguration + implements JsonSerializable { /* * The authority url for the service */ - @JsonProperty(value = "authority", access = JsonProperty.Access.WRITE_ONLY) private String authority; /* * The audiences for the service */ - @JsonProperty(value = "audiences", access = JsonProperty.Access.WRITE_ONLY) private List audiences; /** @@ -56,4 +59,43 @@ public List audiences() { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DicomServiceAuthenticationConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DicomServiceAuthenticationConfiguration if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the DicomServiceAuthenticationConfiguration. + */ + public static DicomServiceAuthenticationConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DicomServiceAuthenticationConfiguration deserializedDicomServiceAuthenticationConfiguration + = new DicomServiceAuthenticationConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("authority".equals(fieldName)) { + deserializedDicomServiceAuthenticationConfiguration.authority = reader.getString(); + } else if ("audiences".equals(fieldName)) { + List audiences = reader.readArray(reader1 -> reader1.getString()); + deserializedDicomServiceAuthenticationConfiguration.audiences = audiences; + } else { + reader.skipChildren(); + } + } + + return deserializedDicomServiceAuthenticationConfiguration; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/DicomServiceCollection.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/DicomServiceCollection.java index 24a78526df1a2..22b75607d28ae 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/DicomServiceCollection.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/DicomServiceCollection.java @@ -5,25 +5,27 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.healthcareapis.fluent.models.DicomServiceInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * The collection of Dicom Services. */ @Fluent -public final class DicomServiceCollection { +public final class DicomServiceCollection implements JsonSerializable { /* * The link used to get the next page of Dicom Services. */ - @JsonProperty(value = "nextLink") private String nextLink; /* * The list of Dicom Services. */ - @JsonProperty(value = "value") private List value; /** @@ -82,4 +84,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("nextLink", this.nextLink); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DicomServiceCollection from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DicomServiceCollection if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the DicomServiceCollection. + */ + public static DicomServiceCollection fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DicomServiceCollection deserializedDicomServiceCollection = new DicomServiceCollection(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("nextLink".equals(fieldName)) { + deserializedDicomServiceCollection.nextLink = reader.getString(); + } else if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> DicomServiceInner.fromJson(reader1)); + deserializedDicomServiceCollection.value = value; + } else { + reader.skipChildren(); + } + } + + return deserializedDicomServiceCollection; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/DicomServicePatchResource.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/DicomServicePatchResource.java index 8a5cecced6147..204c6dda2dc56 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/DicomServicePatchResource.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/DicomServicePatchResource.java @@ -5,7 +5,10 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.Map; /** @@ -16,7 +19,6 @@ public final class DicomServicePatchResource extends ResourceTags { /* * Setting indicating whether the service has a managed identity associated with it. */ - @JsonProperty(value = "identity") private ServiceManagedIdentityIdentity identity; /** @@ -61,9 +63,48 @@ public DicomServicePatchResource withTags(Map tags) { */ @Override public void validate() { - super.validate(); if (identity() != null) { identity().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("identity", this.identity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DicomServicePatchResource from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DicomServicePatchResource if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the DicomServicePatchResource. + */ + public static DicomServicePatchResource fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DicomServicePatchResource deserializedDicomServicePatchResource = new DicomServicePatchResource(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedDicomServicePatchResource.withTags(tags); + } else if ("identity".equals(fieldName)) { + deserializedDicomServicePatchResource.identity = ServiceManagedIdentityIdentity.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDicomServicePatchResource; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/Encryption.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/Encryption.java index da39b70e24ba0..961b1a405a4ae 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/Encryption.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/Encryption.java @@ -5,17 +5,20 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Settings to encrypt a service. */ @Fluent -public final class Encryption { +public final class Encryption implements JsonSerializable { /* * The encryption settings for the customer-managed key */ - @JsonProperty(value = "customerManagedKeyEncryption") private EncryptionCustomerManagedKeyEncryption customerManagedKeyEncryption; /** @@ -55,4 +58,41 @@ public void validate() { customerManagedKeyEncryption().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("customerManagedKeyEncryption", this.customerManagedKeyEncryption); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Encryption from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Encryption if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IOException If an error occurs while reading the Encryption. + */ + public static Encryption fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Encryption deserializedEncryption = new Encryption(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("customerManagedKeyEncryption".equals(fieldName)) { + deserializedEncryption.customerManagedKeyEncryption + = EncryptionCustomerManagedKeyEncryption.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedEncryption; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/EncryptionCustomerManagedKeyEncryption.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/EncryptionCustomerManagedKeyEncryption.java index 7b0cc069f51bf..c0d10d4948e2b 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/EncryptionCustomerManagedKeyEncryption.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/EncryptionCustomerManagedKeyEncryption.java @@ -5,17 +5,21 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * The encryption settings for the customer-managed key. */ @Fluent -public final class EncryptionCustomerManagedKeyEncryption { +public final class EncryptionCustomerManagedKeyEncryption + implements JsonSerializable { /* * The URL of the key to use for encryption */ - @JsonProperty(value = "keyEncryptionKeyUrl") private String keyEncryptionKeyUrl; /** @@ -51,4 +55,41 @@ public EncryptionCustomerManagedKeyEncryption withKeyEncryptionKeyUrl(String key */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("keyEncryptionKeyUrl", this.keyEncryptionKeyUrl); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EncryptionCustomerManagedKeyEncryption from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EncryptionCustomerManagedKeyEncryption if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the EncryptionCustomerManagedKeyEncryption. + */ + public static EncryptionCustomerManagedKeyEncryption fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EncryptionCustomerManagedKeyEncryption deserializedEncryptionCustomerManagedKeyEncryption + = new EncryptionCustomerManagedKeyEncryption(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("keyEncryptionKeyUrl".equals(fieldName)) { + deserializedEncryptionCustomerManagedKeyEncryption.keyEncryptionKeyUrl = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedEncryptionCustomerManagedKeyEncryption; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/FhirResourceVersionPolicy.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/FhirResourceVersionPolicy.java index 3755c51d55f52..8aa714f11f3fc 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/FhirResourceVersionPolicy.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/FhirResourceVersionPolicy.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -42,7 +41,6 @@ public FhirResourceVersionPolicy() { * @param name a name to look for. * @return the corresponding FhirResourceVersionPolicy. */ - @JsonCreator public static FhirResourceVersionPolicy fromString(String name) { return fromString(name, FhirResourceVersionPolicy.class); } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/FhirServiceAcrConfiguration.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/FhirServiceAcrConfiguration.java index 2e4d2995c517f..a15a43097712d 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/FhirServiceAcrConfiguration.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/FhirServiceAcrConfiguration.java @@ -5,24 +5,26 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; /** * Azure container registry configuration information. */ @Fluent -public final class FhirServiceAcrConfiguration { +public final class FhirServiceAcrConfiguration implements JsonSerializable { /* * The list of the Azure container registry login servers. */ - @JsonProperty(value = "loginServers") private List loginServers; /* * The list of Open Container Initiative (OCI) artifacts. */ - @JsonProperty(value = "ociArtifacts") private List ociArtifacts; /** @@ -81,4 +83,46 @@ public void validate() { ociArtifacts().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("loginServers", this.loginServers, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("ociArtifacts", this.ociArtifacts, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FhirServiceAcrConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FhirServiceAcrConfiguration if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the FhirServiceAcrConfiguration. + */ + public static FhirServiceAcrConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FhirServiceAcrConfiguration deserializedFhirServiceAcrConfiguration = new FhirServiceAcrConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("loginServers".equals(fieldName)) { + List loginServers = reader.readArray(reader1 -> reader1.getString()); + deserializedFhirServiceAcrConfiguration.loginServers = loginServers; + } else if ("ociArtifacts".equals(fieldName)) { + List ociArtifacts + = reader.readArray(reader1 -> ServiceOciArtifactEntry.fromJson(reader1)); + deserializedFhirServiceAcrConfiguration.ociArtifacts = ociArtifacts; + } else { + reader.skipChildren(); + } + } + + return deserializedFhirServiceAcrConfiguration; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/FhirServiceAuthenticationConfiguration.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/FhirServiceAuthenticationConfiguration.java index f6ed43fc94afc..d1b863a124ee6 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/FhirServiceAuthenticationConfiguration.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/FhirServiceAuthenticationConfiguration.java @@ -5,36 +5,37 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; /** * Authentication configuration information. */ @Fluent -public final class FhirServiceAuthenticationConfiguration { +public final class FhirServiceAuthenticationConfiguration + implements JsonSerializable { /* * The authority url for the service */ - @JsonProperty(value = "authority") private String authority; /* * The audience url for the service */ - @JsonProperty(value = "audience") private String audience; /* * If the SMART on FHIR proxy is enabled */ - @JsonProperty(value = "smartProxyEnabled") private Boolean smartProxyEnabled; /* * The array of identity provider configurations for SMART on FHIR authentication. */ - @JsonProperty(value = "smartIdentityProviders") private List smartIdentityProviders; /** @@ -136,4 +137,54 @@ public void validate() { smartIdentityProviders().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("authority", this.authority); + jsonWriter.writeStringField("audience", this.audience); + jsonWriter.writeBooleanField("smartProxyEnabled", this.smartProxyEnabled); + jsonWriter.writeArrayField("smartIdentityProviders", this.smartIdentityProviders, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FhirServiceAuthenticationConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FhirServiceAuthenticationConfiguration if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the FhirServiceAuthenticationConfiguration. + */ + public static FhirServiceAuthenticationConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FhirServiceAuthenticationConfiguration deserializedFhirServiceAuthenticationConfiguration + = new FhirServiceAuthenticationConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("authority".equals(fieldName)) { + deserializedFhirServiceAuthenticationConfiguration.authority = reader.getString(); + } else if ("audience".equals(fieldName)) { + deserializedFhirServiceAuthenticationConfiguration.audience = reader.getString(); + } else if ("smartProxyEnabled".equals(fieldName)) { + deserializedFhirServiceAuthenticationConfiguration.smartProxyEnabled + = reader.getNullable(JsonReader::getBoolean); + } else if ("smartIdentityProviders".equals(fieldName)) { + List smartIdentityProviders + = reader.readArray(reader1 -> SmartIdentityProviderConfiguration.fromJson(reader1)); + deserializedFhirServiceAuthenticationConfiguration.smartIdentityProviders = smartIdentityProviders; + } else { + reader.skipChildren(); + } + } + + return deserializedFhirServiceAuthenticationConfiguration; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/FhirServiceCollection.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/FhirServiceCollection.java index 9f0b08da5a9ce..9a658143131c8 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/FhirServiceCollection.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/FhirServiceCollection.java @@ -5,25 +5,27 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.healthcareapis.fluent.models.FhirServiceInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * A collection of Fhir services. */ @Fluent -public final class FhirServiceCollection { +public final class FhirServiceCollection implements JsonSerializable { /* * The link used to get the next page of Fhir Services. */ - @JsonProperty(value = "nextLink") private String nextLink; /* * The list of Fhir Services. */ - @JsonProperty(value = "value") private List value; /** @@ -82,4 +84,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("nextLink", this.nextLink); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FhirServiceCollection from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FhirServiceCollection if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the FhirServiceCollection. + */ + public static FhirServiceCollection fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FhirServiceCollection deserializedFhirServiceCollection = new FhirServiceCollection(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("nextLink".equals(fieldName)) { + deserializedFhirServiceCollection.nextLink = reader.getString(); + } else if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> FhirServiceInner.fromJson(reader1)); + deserializedFhirServiceCollection.value = value; + } else { + reader.skipChildren(); + } + } + + return deserializedFhirServiceCollection; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/FhirServiceCorsConfiguration.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/FhirServiceCorsConfiguration.java index 47634ae04c4ba..77e7a9d47e54e 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/FhirServiceCorsConfiguration.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/FhirServiceCorsConfiguration.java @@ -5,42 +5,41 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; /** * The settings for the CORS configuration of the service instance. */ @Fluent -public final class FhirServiceCorsConfiguration { +public final class FhirServiceCorsConfiguration implements JsonSerializable { /* * The origins to be allowed via CORS. */ - @JsonProperty(value = "origins") private List origins; /* * The headers to be allowed via CORS. */ - @JsonProperty(value = "headers") private List headers; /* * The methods to be allowed via CORS. */ - @JsonProperty(value = "methods") private List methods; /* * The max age to be allowed via CORS. */ - @JsonProperty(value = "maxAge") private Integer maxAge; /* * If credentials are allowed via CORS. */ - @JsonProperty(value = "allowCredentials") private Boolean allowCredentials; /** @@ -156,4 +155,56 @@ public FhirServiceCorsConfiguration withAllowCredentials(Boolean allowCredential */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("origins", this.origins, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("headers", this.headers, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("methods", this.methods, (writer, element) -> writer.writeString(element)); + jsonWriter.writeNumberField("maxAge", this.maxAge); + jsonWriter.writeBooleanField("allowCredentials", this.allowCredentials); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FhirServiceCorsConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FhirServiceCorsConfiguration if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the FhirServiceCorsConfiguration. + */ + public static FhirServiceCorsConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FhirServiceCorsConfiguration deserializedFhirServiceCorsConfiguration = new FhirServiceCorsConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("origins".equals(fieldName)) { + List origins = reader.readArray(reader1 -> reader1.getString()); + deserializedFhirServiceCorsConfiguration.origins = origins; + } else if ("headers".equals(fieldName)) { + List headers = reader.readArray(reader1 -> reader1.getString()); + deserializedFhirServiceCorsConfiguration.headers = headers; + } else if ("methods".equals(fieldName)) { + List methods = reader.readArray(reader1 -> reader1.getString()); + deserializedFhirServiceCorsConfiguration.methods = methods; + } else if ("maxAge".equals(fieldName)) { + deserializedFhirServiceCorsConfiguration.maxAge = reader.getNullable(JsonReader::getInt); + } else if ("allowCredentials".equals(fieldName)) { + deserializedFhirServiceCorsConfiguration.allowCredentials + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedFhirServiceCorsConfiguration; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/FhirServiceExportConfiguration.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/FhirServiceExportConfiguration.java index d43a4fdbcf615..377539f8089c3 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/FhirServiceExportConfiguration.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/FhirServiceExportConfiguration.java @@ -5,17 +5,20 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Export operation configuration information. */ @Fluent -public final class FhirServiceExportConfiguration { +public final class FhirServiceExportConfiguration implements JsonSerializable { /* * The name of the default export storage account. */ - @JsonProperty(value = "storageAccountName") private String storageAccountName; /** @@ -51,4 +54,41 @@ public FhirServiceExportConfiguration withStorageAccountName(String storageAccou */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("storageAccountName", this.storageAccountName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FhirServiceExportConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FhirServiceExportConfiguration if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the FhirServiceExportConfiguration. + */ + public static FhirServiceExportConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FhirServiceExportConfiguration deserializedFhirServiceExportConfiguration + = new FhirServiceExportConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("storageAccountName".equals(fieldName)) { + deserializedFhirServiceExportConfiguration.storageAccountName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedFhirServiceExportConfiguration; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/FhirServiceImportConfiguration.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/FhirServiceImportConfiguration.java index 0450c3164f6b2..26f156d3406c6 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/FhirServiceImportConfiguration.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/FhirServiceImportConfiguration.java @@ -5,29 +5,30 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Import operation configuration information. */ @Fluent -public final class FhirServiceImportConfiguration { +public final class FhirServiceImportConfiguration implements JsonSerializable { /* * The name of the default integration storage account. */ - @JsonProperty(value = "integrationDataStore") private String integrationDataStore; /* * If the FHIR service is in InitialImportMode. */ - @JsonProperty(value = "initialImportMode") private Boolean initialImportMode; /* * If the import operation is enabled. */ - @JsonProperty(value = "enabled") private Boolean enabled; /** @@ -103,4 +104,48 @@ public FhirServiceImportConfiguration withEnabled(Boolean enabled) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("integrationDataStore", this.integrationDataStore); + jsonWriter.writeBooleanField("initialImportMode", this.initialImportMode); + jsonWriter.writeBooleanField("enabled", this.enabled); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FhirServiceImportConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FhirServiceImportConfiguration if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the FhirServiceImportConfiguration. + */ + public static FhirServiceImportConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FhirServiceImportConfiguration deserializedFhirServiceImportConfiguration + = new FhirServiceImportConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("integrationDataStore".equals(fieldName)) { + deserializedFhirServiceImportConfiguration.integrationDataStore = reader.getString(); + } else if ("initialImportMode".equals(fieldName)) { + deserializedFhirServiceImportConfiguration.initialImportMode + = reader.getNullable(JsonReader::getBoolean); + } else if ("enabled".equals(fieldName)) { + deserializedFhirServiceImportConfiguration.enabled = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedFhirServiceImportConfiguration; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/FhirServiceKind.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/FhirServiceKind.java index 476d2e8f14508..a99317accb8b1 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/FhirServiceKind.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/FhirServiceKind.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -37,7 +36,6 @@ public FhirServiceKind() { * @param name a name to look for. * @return the corresponding FhirServiceKind. */ - @JsonCreator public static FhirServiceKind fromString(String name) { return fromString(name, FhirServiceKind.class); } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/FhirServicePatchResource.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/FhirServicePatchResource.java index 8a81c29a9d02e..9258e61527a0f 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/FhirServicePatchResource.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/FhirServicePatchResource.java @@ -5,7 +5,10 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.Map; /** @@ -16,7 +19,6 @@ public final class FhirServicePatchResource extends ResourceTags { /* * Setting indicating whether the service has a managed identity associated with it. */ - @JsonProperty(value = "identity") private ServiceManagedIdentityIdentity identity; /** @@ -61,9 +63,48 @@ public FhirServicePatchResource withTags(Map tags) { */ @Override public void validate() { - super.validate(); if (identity() != null) { identity().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("identity", this.identity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FhirServicePatchResource from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FhirServicePatchResource if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the FhirServicePatchResource. + */ + public static FhirServicePatchResource fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FhirServicePatchResource deserializedFhirServicePatchResource = new FhirServicePatchResource(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedFhirServicePatchResource.withTags(tags); + } else if ("identity".equals(fieldName)) { + deserializedFhirServicePatchResource.identity = ServiceManagedIdentityIdentity.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedFhirServicePatchResource; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ImplementationGuidesConfiguration.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ImplementationGuidesConfiguration.java index 4d18c11f5d0e8..0aba73f394e6e 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ImplementationGuidesConfiguration.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ImplementationGuidesConfiguration.java @@ -5,18 +5,21 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * The settings for Implementation Guides - defining capabilities for national standards, vendor consortiums, clinical * societies, etc. */ @Fluent -public final class ImplementationGuidesConfiguration { +public final class ImplementationGuidesConfiguration implements JsonSerializable { /* * If US Core Missing Data requirement is enabled. */ - @JsonProperty(value = "usCoreMissingData") private Boolean usCoreMissingData; /** @@ -52,4 +55,42 @@ public ImplementationGuidesConfiguration withUsCoreMissingData(Boolean usCoreMis */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("usCoreMissingData", this.usCoreMissingData); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ImplementationGuidesConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ImplementationGuidesConfiguration if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ImplementationGuidesConfiguration. + */ + public static ImplementationGuidesConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ImplementationGuidesConfiguration deserializedImplementationGuidesConfiguration + = new ImplementationGuidesConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("usCoreMissingData".equals(fieldName)) { + deserializedImplementationGuidesConfiguration.usCoreMissingData + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedImplementationGuidesConfiguration; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/IotConnectorCollection.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/IotConnectorCollection.java index eb4a540db6477..23487e8693778 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/IotConnectorCollection.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/IotConnectorCollection.java @@ -5,25 +5,27 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.healthcareapis.fluent.models.IotConnectorInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * A collection of IoT Connectors. */ @Fluent -public final class IotConnectorCollection { +public final class IotConnectorCollection implements JsonSerializable { /* * The link used to get the next page of IoT Connectors. */ - @JsonProperty(value = "nextLink") private String nextLink; /* * The list of IoT Connectors. */ - @JsonProperty(value = "value") private List value; /** @@ -82,4 +84,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("nextLink", this.nextLink); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IotConnectorCollection from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IotConnectorCollection if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the IotConnectorCollection. + */ + public static IotConnectorCollection fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IotConnectorCollection deserializedIotConnectorCollection = new IotConnectorCollection(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("nextLink".equals(fieldName)) { + deserializedIotConnectorCollection.nextLink = reader.getString(); + } else if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> IotConnectorInner.fromJson(reader1)); + deserializedIotConnectorCollection.value = value; + } else { + reader.skipChildren(); + } + } + + return deserializedIotConnectorCollection; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/IotConnectorPatchResource.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/IotConnectorPatchResource.java index a7e05088b24cb..356037cb19c69 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/IotConnectorPatchResource.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/IotConnectorPatchResource.java @@ -5,7 +5,10 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.Map; /** @@ -16,7 +19,6 @@ public final class IotConnectorPatchResource extends ResourceTags { /* * Setting indicating whether the service has a managed identity associated with it. */ - @JsonProperty(value = "identity") private ServiceManagedIdentityIdentity identity; /** @@ -61,9 +63,48 @@ public IotConnectorPatchResource withTags(Map tags) { */ @Override public void validate() { - super.validate(); if (identity() != null) { identity().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("identity", this.identity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IotConnectorPatchResource from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IotConnectorPatchResource if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the IotConnectorPatchResource. + */ + public static IotConnectorPatchResource fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IotConnectorPatchResource deserializedIotConnectorPatchResource = new IotConnectorPatchResource(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedIotConnectorPatchResource.withTags(tags); + } else if ("identity".equals(fieldName)) { + deserializedIotConnectorPatchResource.identity = ServiceManagedIdentityIdentity.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedIotConnectorPatchResource; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/IotDestinationProperties.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/IotDestinationProperties.java index d4285921292ef..e62d86122ea1a 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/IotDestinationProperties.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/IotDestinationProperties.java @@ -5,17 +5,20 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Common IoT Connector destination properties. */ @Immutable -public class IotDestinationProperties { +public class IotDestinationProperties implements JsonSerializable { /* * The provisioning state. */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private ProvisioningState provisioningState; /** @@ -33,6 +36,17 @@ public ProvisioningState provisioningState() { return this.provisioningState; } + /** + * Set the provisioningState property: The provisioning state. + * + * @param provisioningState the provisioningState value to set. + * @return the IotDestinationProperties object itself. + */ + IotDestinationProperties withProvisioningState(ProvisioningState provisioningState) { + this.provisioningState = provisioningState; + return this; + } + /** * Validates the instance. * @@ -40,4 +54,40 @@ public ProvisioningState provisioningState() { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IotDestinationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IotDestinationProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the IotDestinationProperties. + */ + public static IotDestinationProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IotDestinationProperties deserializedIotDestinationProperties = new IotDestinationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedIotDestinationProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedIotDestinationProperties; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/IotEventHubIngestionEndpointConfiguration.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/IotEventHubIngestionEndpointConfiguration.java index 4efc46fc5045d..03e989ee86f50 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/IotEventHubIngestionEndpointConfiguration.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/IotEventHubIngestionEndpointConfiguration.java @@ -5,29 +5,31 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Event Hub ingestion endpoint configuration. */ @Fluent -public final class IotEventHubIngestionEndpointConfiguration { +public final class IotEventHubIngestionEndpointConfiguration + implements JsonSerializable { /* * Event Hub name to connect to. */ - @JsonProperty(value = "eventHubName") private String eventHubName; /* * Consumer group of the event hub to connected to. */ - @JsonProperty(value = "consumerGroup") private String consumerGroup; /* * Fully qualified namespace of the Event Hub to connect to. */ - @JsonProperty(value = "fullyQualifiedEventHubNamespace") private String fullyQualifiedEventHubNamespace; /** @@ -104,4 +106,48 @@ public String fullyQualifiedEventHubNamespace() { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("eventHubName", this.eventHubName); + jsonWriter.writeStringField("consumerGroup", this.consumerGroup); + jsonWriter.writeStringField("fullyQualifiedEventHubNamespace", this.fullyQualifiedEventHubNamespace); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IotEventHubIngestionEndpointConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IotEventHubIngestionEndpointConfiguration if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the IotEventHubIngestionEndpointConfiguration. + */ + public static IotEventHubIngestionEndpointConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IotEventHubIngestionEndpointConfiguration deserializedIotEventHubIngestionEndpointConfiguration + = new IotEventHubIngestionEndpointConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("eventHubName".equals(fieldName)) { + deserializedIotEventHubIngestionEndpointConfiguration.eventHubName = reader.getString(); + } else if ("consumerGroup".equals(fieldName)) { + deserializedIotEventHubIngestionEndpointConfiguration.consumerGroup = reader.getString(); + } else if ("fullyQualifiedEventHubNamespace".equals(fieldName)) { + deserializedIotEventHubIngestionEndpointConfiguration.fullyQualifiedEventHubNamespace + = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedIotEventHubIngestionEndpointConfiguration; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/IotFhirDestinationCollection.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/IotFhirDestinationCollection.java index af60a3d2c6457..ee6e86173d2c0 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/IotFhirDestinationCollection.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/IotFhirDestinationCollection.java @@ -5,25 +5,27 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.healthcareapis.fluent.models.IotFhirDestinationInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * A collection of IoT Connector FHIR destinations. */ @Fluent -public final class IotFhirDestinationCollection { +public final class IotFhirDestinationCollection implements JsonSerializable { /* * The link used to get the next page of IoT FHIR destinations. */ - @JsonProperty(value = "nextLink") private String nextLink; /* * The list of IoT Connector FHIR destinations. */ - @JsonProperty(value = "value") private List value; /** @@ -82,4 +84,45 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("nextLink", this.nextLink); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IotFhirDestinationCollection from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IotFhirDestinationCollection if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the IotFhirDestinationCollection. + */ + public static IotFhirDestinationCollection fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IotFhirDestinationCollection deserializedIotFhirDestinationCollection = new IotFhirDestinationCollection(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("nextLink".equals(fieldName)) { + deserializedIotFhirDestinationCollection.nextLink = reader.getString(); + } else if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> IotFhirDestinationInner.fromJson(reader1)); + deserializedIotFhirDestinationCollection.value = value; + } else { + reader.skipChildren(); + } + } + + return deserializedIotFhirDestinationCollection; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/IotIdentityResolutionType.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/IotIdentityResolutionType.java index 91897b74372ef..a8035927df07a 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/IotIdentityResolutionType.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/IotIdentityResolutionType.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -37,7 +36,6 @@ public IotIdentityResolutionType() { * @param name a name to look for. * @return the corresponding IotIdentityResolutionType. */ - @JsonCreator public static IotIdentityResolutionType fromString(String name) { return fromString(name, IotIdentityResolutionType.class); } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/IotMappingProperties.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/IotMappingProperties.java index 8284c45c6a657..16aa086010b4a 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/IotMappingProperties.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/IotMappingProperties.java @@ -5,17 +5,20 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * The mapping content. */ @Fluent -public final class IotMappingProperties { +public final class IotMappingProperties implements JsonSerializable { /* * The mapping. */ - @JsonProperty(value = "content") private Object content; /** @@ -51,4 +54,40 @@ public IotMappingProperties withContent(Object content) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeUntypedField("content", this.content); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IotMappingProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IotMappingProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the IotMappingProperties. + */ + public static IotMappingProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IotMappingProperties deserializedIotMappingProperties = new IotMappingProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("content".equals(fieldName)) { + deserializedIotMappingProperties.content = reader.readUntyped(); + } else { + reader.skipChildren(); + } + } + + return deserializedIotMappingProperties; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/Kind.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/Kind.java index 717c731c05d55..9001bd17c00f4 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/Kind.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/Kind.java @@ -4,9 +4,6 @@ package com.azure.resourcemanager.healthcareapis.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - /** * The kind of the service. */ @@ -41,7 +38,6 @@ public enum Kind { * @param value the serialized value to parse. * @return the parsed Kind object, or null if unable to parse. */ - @JsonCreator public static Kind fromString(String value) { if (value == null) { return null; @@ -58,7 +54,6 @@ public static Kind fromString(String value) { /** * {@inheritDoc} */ - @JsonValue @Override public String toString() { return this.value; diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ListOperations.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ListOperations.java index e9fe548f48952..8230e0a13440b 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ListOperations.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ListOperations.java @@ -5,26 +5,28 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.healthcareapis.fluent.models.OperationDetailInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * Available operations of the service. */ @Fluent -public final class ListOperations { +public final class ListOperations implements JsonSerializable { /* * Collection of available operation details */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * URL client should use to fetch the next page (per server side paging). * It's null for now, added for future use. */ - @JsonProperty(value = "nextLink") private String nextLink; /** @@ -74,4 +76,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ListOperations from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ListOperations if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ListOperations. + */ + public static ListOperations fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ListOperations deserializedListOperations = new ListOperations(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> OperationDetailInner.fromJson(reader1)); + deserializedListOperations.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedListOperations.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedListOperations; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/LocationBasedResource.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/LocationBasedResource.java index 50afa252182af..e7ac4b75562df 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/LocationBasedResource.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/LocationBasedResource.java @@ -5,7 +5,10 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * The common properties for any location based resource, tracked or proxy. @@ -15,9 +18,23 @@ public class LocationBasedResource extends ResourceCore { /* * The resource location. */ - @JsonProperty(value = "location") private String location; + /* + * 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 LocationBasedResource class. */ @@ -44,6 +61,36 @@ public LocationBasedResource withLocation(String location) { return this; } + /** + * 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} */ @@ -60,6 +107,51 @@ public LocationBasedResource withEtag(String etag) { */ @Override public void validate() { - super.validate(); + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("etag", etag()); + jsonWriter.writeStringField("location", this.location); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LocationBasedResource from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LocationBasedResource 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 LocationBasedResource. + */ + public static LocationBasedResource fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LocationBasedResource deserializedLocationBasedResource = new LocationBasedResource(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedLocationBasedResource.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedLocationBasedResource.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedLocationBasedResource.type = reader.getString(); + } else if ("etag".equals(fieldName)) { + deserializedLocationBasedResource.withEtag(reader.getString()); + } else if ("location".equals(fieldName)) { + deserializedLocationBasedResource.location = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedLocationBasedResource; + }); } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/LogSpecification.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/LogSpecification.java index 5b378a4e3414d..26b7a8b15596d 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/LogSpecification.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/LogSpecification.java @@ -5,29 +5,30 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Specifications of the Log for Azure Monitoring. */ @Fluent -public final class LogSpecification { +public final class LogSpecification implements JsonSerializable { /* * Name of the log */ - @JsonProperty(value = "name") private String name; /* * Localized friendly display name of the log */ - @JsonProperty(value = "displayName") private String displayName; /* * Blob duration of the log */ - @JsonProperty(value = "blobDuration") private String blobDuration; /** @@ -103,4 +104,46 @@ public LogSpecification withBlobDuration(String blobDuration) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("displayName", this.displayName); + jsonWriter.writeStringField("blobDuration", this.blobDuration); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LogSpecification from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LogSpecification if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the LogSpecification. + */ + public static LogSpecification fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LogSpecification deserializedLogSpecification = new LogSpecification(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedLogSpecification.name = reader.getString(); + } else if ("displayName".equals(fieldName)) { + deserializedLogSpecification.displayName = reader.getString(); + } else if ("blobDuration".equals(fieldName)) { + deserializedLogSpecification.blobDuration = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedLogSpecification; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ManagedServiceIdentityType.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ManagedServiceIdentityType.java index eca0cd0fc5f5c..3598cd95fef23 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ManagedServiceIdentityType.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ManagedServiceIdentityType.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -37,7 +36,6 @@ public ManagedServiceIdentityType() { * @param name a name to look for. * @return the corresponding ManagedServiceIdentityType. */ - @JsonCreator public static ManagedServiceIdentityType fromString(String name) { return fromString(name, ManagedServiceIdentityType.class); } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/MetricDimension.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/MetricDimension.java index 96daf6cab587c..16652c515bc94 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/MetricDimension.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/MetricDimension.java @@ -5,29 +5,30 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Specifications of the Dimension of metrics. */ @Fluent -public final class MetricDimension { +public final class MetricDimension implements JsonSerializable { /* * Name of the dimension */ - @JsonProperty(value = "name") private String name; /* * Localized friendly display name of the dimension */ - @JsonProperty(value = "displayName") private String displayName; /* * Whether this dimension should be included for the Shoebox export scenario */ - @JsonProperty(value = "toBeExportedForShoebox") private Boolean toBeExportedForShoebox; /** @@ -105,4 +106,46 @@ public MetricDimension withToBeExportedForShoebox(Boolean toBeExportedForShoebox */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("displayName", this.displayName); + jsonWriter.writeBooleanField("toBeExportedForShoebox", this.toBeExportedForShoebox); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MetricDimension from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MetricDimension if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the MetricDimension. + */ + public static MetricDimension fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MetricDimension deserializedMetricDimension = new MetricDimension(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedMetricDimension.name = reader.getString(); + } else if ("displayName".equals(fieldName)) { + deserializedMetricDimension.displayName = reader.getString(); + } else if ("toBeExportedForShoebox".equals(fieldName)) { + deserializedMetricDimension.toBeExportedForShoebox = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedMetricDimension; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/MetricSpecification.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/MetricSpecification.java index 99241a1b6b02b..b9093550cf290 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/MetricSpecification.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/MetricSpecification.java @@ -5,108 +5,96 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; /** * Specifications of the Metrics for Azure Monitoring. */ @Fluent -public final class MetricSpecification { +public final class MetricSpecification implements JsonSerializable { /* * Name of the metric */ - @JsonProperty(value = "name") private String name; /* * Localized friendly display name of the metric */ - @JsonProperty(value = "displayName") private String displayName; /* * Localized friendly description of the metric */ - @JsonProperty(value = "displayDescription") private String displayDescription; /* * Unit that makes sense for the metric */ - @JsonProperty(value = "unit") private String unit; /* * Name of the metric category that the metric belongs to. A metric can only belong to a single category. */ - @JsonProperty(value = "category") private String category; /* * Only provide one value for this field. Valid values: Average, Minimum, Maximum, Total, Count. */ - @JsonProperty(value = "aggregationType") private String aggregationType; /* * Supported aggregation types */ - @JsonProperty(value = "supportedAggregationTypes") private List supportedAggregationTypes; /* * Supported time grain types */ - @JsonProperty(value = "supportedTimeGrainTypes") private List supportedTimeGrainTypes; /* * Optional. If set to true, then zero will be returned for time duration where no metric is emitted/published. */ - @JsonProperty(value = "fillGapWithZero") private Boolean fillGapWithZero; /* * Pattern for the filter of the metric. */ - @JsonProperty(value = "metricFilterPattern") private String metricFilterPattern; /* * Dimensions of the metric */ - @JsonProperty(value = "dimensions") private List dimensions; /* * Whether the metric is internal. */ - @JsonProperty(value = "isInternal") private Boolean isInternal; /* * The source MDM account. */ - @JsonProperty(value = "sourceMdmAccount") private String sourceMdmAccount; /* * The source MDM namespace. */ - @JsonProperty(value = "sourceMdmNamespace") private String sourceMdmNamespace; /* * Whether regional MDM account enabled. */ - @JsonProperty(value = "enableRegionalMdmAccount") private Boolean enableRegionalMdmAccount; /* * The resource Id dimension name override. */ - @JsonProperty(value = "resourceIdDimensionNameOverride") private String resourceIdDimensionNameOverride; /** @@ -451,4 +439,91 @@ public void validate() { dimensions().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("displayName", this.displayName); + jsonWriter.writeStringField("displayDescription", this.displayDescription); + jsonWriter.writeStringField("unit", this.unit); + jsonWriter.writeStringField("category", this.category); + jsonWriter.writeStringField("aggregationType", this.aggregationType); + jsonWriter.writeArrayField("supportedAggregationTypes", this.supportedAggregationTypes, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("supportedTimeGrainTypes", this.supportedTimeGrainTypes, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeBooleanField("fillGapWithZero", this.fillGapWithZero); + jsonWriter.writeStringField("metricFilterPattern", this.metricFilterPattern); + jsonWriter.writeArrayField("dimensions", this.dimensions, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeBooleanField("isInternal", this.isInternal); + jsonWriter.writeStringField("sourceMdmAccount", this.sourceMdmAccount); + jsonWriter.writeStringField("sourceMdmNamespace", this.sourceMdmNamespace); + jsonWriter.writeBooleanField("enableRegionalMdmAccount", this.enableRegionalMdmAccount); + jsonWriter.writeStringField("resourceIdDimensionNameOverride", this.resourceIdDimensionNameOverride); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MetricSpecification from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MetricSpecification if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the MetricSpecification. + */ + public static MetricSpecification fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MetricSpecification deserializedMetricSpecification = new MetricSpecification(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedMetricSpecification.name = reader.getString(); + } else if ("displayName".equals(fieldName)) { + deserializedMetricSpecification.displayName = reader.getString(); + } else if ("displayDescription".equals(fieldName)) { + deserializedMetricSpecification.displayDescription = reader.getString(); + } else if ("unit".equals(fieldName)) { + deserializedMetricSpecification.unit = reader.getString(); + } else if ("category".equals(fieldName)) { + deserializedMetricSpecification.category = reader.getString(); + } else if ("aggregationType".equals(fieldName)) { + deserializedMetricSpecification.aggregationType = reader.getString(); + } else if ("supportedAggregationTypes".equals(fieldName)) { + List supportedAggregationTypes = reader.readArray(reader1 -> reader1.getString()); + deserializedMetricSpecification.supportedAggregationTypes = supportedAggregationTypes; + } else if ("supportedTimeGrainTypes".equals(fieldName)) { + List supportedTimeGrainTypes = reader.readArray(reader1 -> reader1.getString()); + deserializedMetricSpecification.supportedTimeGrainTypes = supportedTimeGrainTypes; + } else if ("fillGapWithZero".equals(fieldName)) { + deserializedMetricSpecification.fillGapWithZero = reader.getNullable(JsonReader::getBoolean); + } else if ("metricFilterPattern".equals(fieldName)) { + deserializedMetricSpecification.metricFilterPattern = reader.getString(); + } else if ("dimensions".equals(fieldName)) { + List dimensions = reader.readArray(reader1 -> MetricDimension.fromJson(reader1)); + deserializedMetricSpecification.dimensions = dimensions; + } else if ("isInternal".equals(fieldName)) { + deserializedMetricSpecification.isInternal = reader.getNullable(JsonReader::getBoolean); + } else if ("sourceMdmAccount".equals(fieldName)) { + deserializedMetricSpecification.sourceMdmAccount = reader.getString(); + } else if ("sourceMdmNamespace".equals(fieldName)) { + deserializedMetricSpecification.sourceMdmNamespace = reader.getString(); + } else if ("enableRegionalMdmAccount".equals(fieldName)) { + deserializedMetricSpecification.enableRegionalMdmAccount + = reader.getNullable(JsonReader::getBoolean); + } else if ("resourceIdDimensionNameOverride".equals(fieldName)) { + deserializedMetricSpecification.resourceIdDimensionNameOverride = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedMetricSpecification; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/OperationDisplay.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/OperationDisplay.java index d3967f61510dc..f70fa745d6c77 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/OperationDisplay.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/OperationDisplay.java @@ -5,35 +5,35 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * The object that represents the operation. */ @Immutable -public final class OperationDisplay { +public final class OperationDisplay implements JsonSerializable { /* * Service provider: Microsoft.HealthcareApis */ - @JsonProperty(value = "provider", access = JsonProperty.Access.WRITE_ONLY) private String provider; /* * Resource Type: Services */ - @JsonProperty(value = "resource", access = JsonProperty.Access.WRITE_ONLY) private String resource; /* * Name of the operation */ - @JsonProperty(value = "operation", access = JsonProperty.Access.WRITE_ONLY) private String operation; /* * Friendly description for the operation, */ - @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) private String description; /** @@ -85,4 +85,45 @@ public String description() { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OperationDisplay from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OperationDisplay if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the OperationDisplay. + */ + public static OperationDisplay fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OperationDisplay deserializedOperationDisplay = new OperationDisplay(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provider".equals(fieldName)) { + deserializedOperationDisplay.provider = reader.getString(); + } else if ("resource".equals(fieldName)) { + deserializedOperationDisplay.resource = reader.getString(); + } else if ("operation".equals(fieldName)) { + deserializedOperationDisplay.operation = reader.getString(); + } else if ("description".equals(fieldName)) { + deserializedOperationDisplay.description = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedOperationDisplay; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/OperationProperties.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/OperationProperties.java index 9bb16a8627f95..2690c674ab1f2 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/OperationProperties.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/OperationProperties.java @@ -5,17 +5,20 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Extra Operation properties. */ @Fluent -public final class OperationProperties { +public final class OperationProperties implements JsonSerializable { /* * Service specifications of the operation */ - @JsonProperty(value = "serviceSpecification") private ServiceSpecification serviceSpecification; /** @@ -54,4 +57,40 @@ public void validate() { serviceSpecification().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("serviceSpecification", this.serviceSpecification); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OperationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OperationProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the OperationProperties. + */ + public static OperationProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OperationProperties deserializedOperationProperties = new OperationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("serviceSpecification".equals(fieldName)) { + deserializedOperationProperties.serviceSpecification = ServiceSpecification.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedOperationProperties; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/OperationResultStatus.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/OperationResultStatus.java index 83bb3a7a493d7..3549981b1fae3 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/OperationResultStatus.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/OperationResultStatus.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -52,7 +51,6 @@ public OperationResultStatus() { * @param name a name to look for. * @return the corresponding OperationResultStatus. */ - @JsonCreator public static OperationResultStatus fromString(String name) { return fromString(name, OperationResultStatus.class); } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateEndpoint.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateEndpoint.java index 32023de3f6191..54b26e30d6a64 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateEndpoint.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateEndpoint.java @@ -5,17 +5,20 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * The Private Endpoint resource. */ @Immutable -public final class PrivateEndpoint { +public final class PrivateEndpoint implements JsonSerializable { /* * The ARM identifier for Private Endpoint */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) private String id; /** @@ -40,4 +43,39 @@ public String id() { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateEndpoint from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateEndpoint if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the PrivateEndpoint. + */ + public static PrivateEndpoint fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateEndpoint deserializedPrivateEndpoint = new PrivateEndpoint(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedPrivateEndpoint.id = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateEndpoint; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateEndpointConnection.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateEndpointConnection.java index 7e048b062b29f..d2435aa4a7f0f 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateEndpointConnection.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateEndpointConnection.java @@ -6,8 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.healthcareapis.fluent.models.PrivateEndpointConnectionProperties; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * The Private Endpoint Connection resource. @@ -17,9 +20,23 @@ public class PrivateEndpointConnection extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private PrivateEndpointConnectionProperties innerProperties; + /* + * 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 PrivateEndpointConnection class. */ @@ -35,6 +52,47 @@ private PrivateEndpointConnectionProperties innerProperties() { return this.innerProperties; } + /** + * Set the innerProperties property: Resource properties. + * + * @param innerProperties the innerProperties value to set. + * @return the PrivateEndpointConnection object itself. + */ + PrivateEndpointConnection withInnerProperties(PrivateEndpointConnectionProperties innerProperties) { + this.innerProperties = innerProperties; + return this; + } + + /** + * 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; + } + /** * Get the privateEndpoint property: The resource of private end point. * @@ -103,4 +161,48 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateEndpointConnection from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateEndpointConnection 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 PrivateEndpointConnection. + */ + public static PrivateEndpointConnection fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateEndpointConnection deserializedPrivateEndpointConnection = new PrivateEndpointConnection(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedPrivateEndpointConnection.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedPrivateEndpointConnection.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedPrivateEndpointConnection.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedPrivateEndpointConnection.innerProperties + = PrivateEndpointConnectionProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateEndpointConnection; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateEndpointConnectionListResultDescription.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateEndpointConnectionListResultDescription.java index 52cc4fc7e1a39..aa4043b05fd12 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateEndpointConnectionListResultDescription.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateEndpointConnectionListResultDescription.java @@ -5,19 +5,23 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.healthcareapis.fluent.models.PrivateEndpointConnectionDescriptionInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * List of private endpoint connection associated with the specified storage account. */ @Fluent -public final class PrivateEndpointConnectionListResultDescription { +public final class PrivateEndpointConnectionListResultDescription + implements JsonSerializable { /* * Array of private endpoint connections */ - @JsonProperty(value = "value") private List value; /** @@ -57,4 +61,43 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateEndpointConnectionListResultDescription from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateEndpointConnectionListResultDescription if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the PrivateEndpointConnectionListResultDescription. + */ + public static PrivateEndpointConnectionListResultDescription fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateEndpointConnectionListResultDescription deserializedPrivateEndpointConnectionListResultDescription + = new PrivateEndpointConnectionListResultDescription(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> PrivateEndpointConnectionDescriptionInner.fromJson(reader1)); + deserializedPrivateEndpointConnectionListResultDescription.value = value; + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateEndpointConnectionListResultDescription; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateEndpointConnectionProvisioningState.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateEndpointConnectionProvisioningState.java index 6c130f5183e80..1d9a2f0dd0f98 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateEndpointConnectionProvisioningState.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateEndpointConnectionProvisioningState.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -48,7 +47,6 @@ public PrivateEndpointConnectionProvisioningState() { * @param name a name to look for. * @return the corresponding PrivateEndpointConnectionProvisioningState. */ - @JsonCreator public static PrivateEndpointConnectionProvisioningState fromString(String name) { return fromString(name, PrivateEndpointConnectionProvisioningState.class); } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateEndpointServiceConnectionStatus.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateEndpointServiceConnectionStatus.java index e0038d6a82660..1b785a4b54316 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateEndpointServiceConnectionStatus.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateEndpointServiceConnectionStatus.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -43,7 +42,6 @@ public PrivateEndpointServiceConnectionStatus() { * @param name a name to look for. * @return the corresponding PrivateEndpointServiceConnectionStatus. */ - @JsonCreator public static PrivateEndpointServiceConnectionStatus fromString(String name) { return fromString(name, PrivateEndpointServiceConnectionStatus.class); } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateLinkResource.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateLinkResource.java index 264f7a055d644..b8e357eb4ac37 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateLinkResource.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateLinkResource.java @@ -6,8 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.healthcareapis.fluent.models.PrivateLinkResourceProperties; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** @@ -18,9 +21,23 @@ public class PrivateLinkResource extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private PrivateLinkResourceProperties innerProperties; + /* + * 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 PrivateLinkResource class. */ @@ -36,6 +53,47 @@ private PrivateLinkResourceProperties innerProperties() { return this.innerProperties; } + /** + * Set the innerProperties property: Resource properties. + * + * @param innerProperties the innerProperties value to set. + * @return the PrivateLinkResource object itself. + */ + PrivateLinkResource withInnerProperties(PrivateLinkResourceProperties innerProperties) { + this.innerProperties = innerProperties; + return this; + } + + /** + * 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; + } + /** * Get the groupId property: The private link resource group id. * @@ -87,4 +145,47 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateLinkResource from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateLinkResource 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 PrivateLinkResource. + */ + public static PrivateLinkResource fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateLinkResource deserializedPrivateLinkResource = new PrivateLinkResource(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedPrivateLinkResource.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedPrivateLinkResource.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedPrivateLinkResource.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedPrivateLinkResource.innerProperties = PrivateLinkResourceProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateLinkResource; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateLinkServiceConnectionState.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateLinkServiceConnectionState.java index 31d27ff78cb0e..cefb5cf2bd24f 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateLinkServiceConnectionState.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateLinkServiceConnectionState.java @@ -5,29 +5,30 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * A collection of information about the state of the connection between service consumer and provider. */ @Fluent -public final class PrivateLinkServiceConnectionState { +public final class PrivateLinkServiceConnectionState implements JsonSerializable { /* * Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. */ - @JsonProperty(value = "status") private PrivateEndpointServiceConnectionStatus status; /* * The reason for approval/rejection of the connection. */ - @JsonProperty(value = "description") private String description; /* * A message indicating if changes on the service provider require any updates on the consumer. */ - @JsonProperty(value = "actionsRequired") private String actionsRequired; /** @@ -107,4 +108,48 @@ public PrivateLinkServiceConnectionState withActionsRequired(String actionsRequi */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); + jsonWriter.writeStringField("description", this.description); + jsonWriter.writeStringField("actionsRequired", this.actionsRequired); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateLinkServiceConnectionState from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateLinkServiceConnectionState if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the PrivateLinkServiceConnectionState. + */ + public static PrivateLinkServiceConnectionState fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateLinkServiceConnectionState deserializedPrivateLinkServiceConnectionState + = new PrivateLinkServiceConnectionState(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedPrivateLinkServiceConnectionState.status + = PrivateEndpointServiceConnectionStatus.fromString(reader.getString()); + } else if ("description".equals(fieldName)) { + deserializedPrivateLinkServiceConnectionState.description = reader.getString(); + } else if ("actionsRequired".equals(fieldName)) { + deserializedPrivateLinkServiceConnectionState.actionsRequired = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateLinkServiceConnectionState; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ProvisioningState.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ProvisioningState.java index 2cea973ed0aa8..5dbd771ff5c7c 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ProvisioningState.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ProvisioningState.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -92,7 +91,6 @@ public ProvisioningState() { * @param name a name to look for. * @return the corresponding ProvisioningState. */ - @JsonCreator public static ProvisioningState fromString(String name) { return fromString(name, ProvisioningState.class); } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PublicNetworkAccess.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PublicNetworkAccess.java index 1598facbf7aa7..e1a60248714a8 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PublicNetworkAccess.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PublicNetworkAccess.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -37,7 +36,6 @@ public PublicNetworkAccess() { * @param name a name to look for. * @return the corresponding PublicNetworkAccess. */ - @JsonCreator public static PublicNetworkAccess fromString(String name) { return fromString(name, PublicNetworkAccess.class); } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ResourceCore.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ResourceCore.java index 04d9b1ead8db4..4622e371a6ba1 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ResourceCore.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ResourceCore.java @@ -6,7 +6,10 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * The common properties for any resource, tracked or proxy. @@ -16,9 +19,23 @@ public class ResourceCore extends ProxyResource { /* * An etag associated with the resource, used for optimistic concurrency when editing it. */ - @JsonProperty(value = "etag") private String etag; + /* + * 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 ResourceCore class. */ @@ -45,6 +62,36 @@ public ResourceCore withEtag(String etag) { return this; } + /** + * 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. * @@ -52,4 +99,47 @@ public ResourceCore withEtag(String etag) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("etag", this.etag); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceCore from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceCore 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 ResourceCore. + */ + public static ResourceCore fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceCore deserializedResourceCore = new ResourceCore(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedResourceCore.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedResourceCore.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedResourceCore.type = reader.getString(); + } else if ("etag".equals(fieldName)) { + deserializedResourceCore.etag = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceCore; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ResourceTags.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ResourceTags.java index 8e6d9d3ff5ccd..2528ccf0f923a 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ResourceTags.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ResourceTags.java @@ -5,20 +5,21 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.Map; /** * List of key value pairs that describe the resource. This will overwrite the existing tags. */ @Fluent -public class ResourceTags { +public class ResourceTags implements JsonSerializable { /* * Resource tags. */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; /** @@ -54,4 +55,41 @@ public ResourceTags withTags(Map tags) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceTags from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceTags if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ResourceTags. + */ + public static ResourceTags fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceTags deserializedResourceTags = new ResourceTags(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedResourceTags.tags = tags; + } else { + reader.skipChildren(); + } + } + + return deserializedResourceTags; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ResourceVersionPolicyConfiguration.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ResourceVersionPolicyConfiguration.java index 0f7c091456829..1adc9b7b6bb5c 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ResourceVersionPolicyConfiguration.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ResourceVersionPolicyConfiguration.java @@ -5,26 +5,26 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.Map; /** * The settings for history tracking for FHIR resources. */ @Fluent -public final class ResourceVersionPolicyConfiguration { +public final class ResourceVersionPolicyConfiguration implements JsonSerializable { /* * The default value for tracking history across all resources. */ - @JsonProperty(value = "default") private FhirResourceVersionPolicy defaultProperty; /* * A list of FHIR Resources and their version policy overrides. */ - @JsonProperty(value = "resourceTypeOverrides") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map resourceTypeOverrides; /** @@ -81,4 +81,48 @@ public Map resourceTypeOverrides() { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("default", this.defaultProperty == null ? null : this.defaultProperty.toString()); + jsonWriter.writeMapField("resourceTypeOverrides", this.resourceTypeOverrides, + (writer, element) -> writer.writeString(element == null ? null : element.toString())); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceVersionPolicyConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceVersionPolicyConfiguration if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ResourceVersionPolicyConfiguration. + */ + public static ResourceVersionPolicyConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceVersionPolicyConfiguration deserializedResourceVersionPolicyConfiguration + = new ResourceVersionPolicyConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("default".equals(fieldName)) { + deserializedResourceVersionPolicyConfiguration.defaultProperty + = FhirResourceVersionPolicy.fromString(reader.getString()); + } else if ("resourceTypeOverrides".equals(fieldName)) { + Map resourceTypeOverrides + = reader.readMap(reader1 -> FhirResourceVersionPolicy.fromString(reader1.getString())); + deserializedResourceVersionPolicyConfiguration.resourceTypeOverrides = resourceTypeOverrides; + } else { + reader.skipChildren(); + } + } + + return deserializedResourceVersionPolicyConfiguration; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceAccessPolicyEntry.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceAccessPolicyEntry.java index 60a9ddcdf2540..6259099dbff55 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceAccessPolicyEntry.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceAccessPolicyEntry.java @@ -6,17 +6,20 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * An access policy entry. */ @Fluent -public final class ServiceAccessPolicyEntry { +public final class ServiceAccessPolicyEntry implements JsonSerializable { /* * An Azure AD object ID (User or Apps) that is allowed access to the FHIR service. */ - @JsonProperty(value = "objectId", required = true) private String objectId; /** @@ -59,4 +62,41 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(ServiceAccessPolicyEntry.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("objectId", this.objectId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServiceAccessPolicyEntry from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServiceAccessPolicyEntry 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 ServiceAccessPolicyEntry. + */ + public static ServiceAccessPolicyEntry fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServiceAccessPolicyEntry deserializedServiceAccessPolicyEntry = new ServiceAccessPolicyEntry(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("objectId".equals(fieldName)) { + deserializedServiceAccessPolicyEntry.objectId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedServiceAccessPolicyEntry; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceAcrConfigurationInfo.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceAcrConfigurationInfo.java index 6a4d001ded003..4cd2aca53936a 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceAcrConfigurationInfo.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceAcrConfigurationInfo.java @@ -5,24 +5,26 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; /** * Azure container registry configuration information. */ @Fluent -public final class ServiceAcrConfigurationInfo { +public final class ServiceAcrConfigurationInfo implements JsonSerializable { /* * The list of the ACR login servers. */ - @JsonProperty(value = "loginServers") private List loginServers; /* * The list of Open Container Initiative (OCI) artifacts. */ - @JsonProperty(value = "ociArtifacts") private List ociArtifacts; /** @@ -81,4 +83,46 @@ public void validate() { ociArtifacts().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("loginServers", this.loginServers, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("ociArtifacts", this.ociArtifacts, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServiceAcrConfigurationInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServiceAcrConfigurationInfo if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ServiceAcrConfigurationInfo. + */ + public static ServiceAcrConfigurationInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServiceAcrConfigurationInfo deserializedServiceAcrConfigurationInfo = new ServiceAcrConfigurationInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("loginServers".equals(fieldName)) { + List loginServers = reader.readArray(reader1 -> reader1.getString()); + deserializedServiceAcrConfigurationInfo.loginServers = loginServers; + } else if ("ociArtifacts".equals(fieldName)) { + List ociArtifacts + = reader.readArray(reader1 -> ServiceOciArtifactEntry.fromJson(reader1)); + deserializedServiceAcrConfigurationInfo.ociArtifacts = ociArtifacts; + } else { + reader.skipChildren(); + } + } + + return deserializedServiceAcrConfigurationInfo; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceAuthenticationConfigurationInfo.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceAuthenticationConfigurationInfo.java index 5a32217fa3af4..4bd457dc0c1dc 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceAuthenticationConfigurationInfo.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceAuthenticationConfigurationInfo.java @@ -5,29 +5,31 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Authentication configuration information. */ @Fluent -public final class ServiceAuthenticationConfigurationInfo { +public final class ServiceAuthenticationConfigurationInfo + implements JsonSerializable { /* * The authority url for the service */ - @JsonProperty(value = "authority") private String authority; /* * The audience url for the service */ - @JsonProperty(value = "audience") private String audience; /* * If the SMART on FHIR proxy is enabled */ - @JsonProperty(value = "smartProxyEnabled") private Boolean smartProxyEnabled; /** @@ -103,4 +105,48 @@ public ServiceAuthenticationConfigurationInfo withSmartProxyEnabled(Boolean smar */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("authority", this.authority); + jsonWriter.writeStringField("audience", this.audience); + jsonWriter.writeBooleanField("smartProxyEnabled", this.smartProxyEnabled); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServiceAuthenticationConfigurationInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServiceAuthenticationConfigurationInfo if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ServiceAuthenticationConfigurationInfo. + */ + public static ServiceAuthenticationConfigurationInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServiceAuthenticationConfigurationInfo deserializedServiceAuthenticationConfigurationInfo + = new ServiceAuthenticationConfigurationInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("authority".equals(fieldName)) { + deserializedServiceAuthenticationConfigurationInfo.authority = reader.getString(); + } else if ("audience".equals(fieldName)) { + deserializedServiceAuthenticationConfigurationInfo.audience = reader.getString(); + } else if ("smartProxyEnabled".equals(fieldName)) { + deserializedServiceAuthenticationConfigurationInfo.smartProxyEnabled + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedServiceAuthenticationConfigurationInfo; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceCorsConfigurationInfo.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceCorsConfigurationInfo.java index 06f320b2787ef..2e4d6d88078ce 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceCorsConfigurationInfo.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceCorsConfigurationInfo.java @@ -5,42 +5,41 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; /** * The settings for the CORS configuration of the service instance. */ @Fluent -public final class ServiceCorsConfigurationInfo { +public final class ServiceCorsConfigurationInfo implements JsonSerializable { /* * The origins to be allowed via CORS. */ - @JsonProperty(value = "origins") private List origins; /* * The headers to be allowed via CORS. */ - @JsonProperty(value = "headers") private List headers; /* * The methods to be allowed via CORS. */ - @JsonProperty(value = "methods") private List methods; /* * The max age to be allowed via CORS. */ - @JsonProperty(value = "maxAge") private Integer maxAge; /* * If credentials are allowed via CORS. */ - @JsonProperty(value = "allowCredentials") private Boolean allowCredentials; /** @@ -156,4 +155,56 @@ public ServiceCorsConfigurationInfo withAllowCredentials(Boolean allowCredential */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("origins", this.origins, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("headers", this.headers, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("methods", this.methods, (writer, element) -> writer.writeString(element)); + jsonWriter.writeNumberField("maxAge", this.maxAge); + jsonWriter.writeBooleanField("allowCredentials", this.allowCredentials); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServiceCorsConfigurationInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServiceCorsConfigurationInfo if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ServiceCorsConfigurationInfo. + */ + public static ServiceCorsConfigurationInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServiceCorsConfigurationInfo deserializedServiceCorsConfigurationInfo = new ServiceCorsConfigurationInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("origins".equals(fieldName)) { + List origins = reader.readArray(reader1 -> reader1.getString()); + deserializedServiceCorsConfigurationInfo.origins = origins; + } else if ("headers".equals(fieldName)) { + List headers = reader.readArray(reader1 -> reader1.getString()); + deserializedServiceCorsConfigurationInfo.headers = headers; + } else if ("methods".equals(fieldName)) { + List methods = reader.readArray(reader1 -> reader1.getString()); + deserializedServiceCorsConfigurationInfo.methods = methods; + } else if ("maxAge".equals(fieldName)) { + deserializedServiceCorsConfigurationInfo.maxAge = reader.getNullable(JsonReader::getInt); + } else if ("allowCredentials".equals(fieldName)) { + deserializedServiceCorsConfigurationInfo.allowCredentials + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedServiceCorsConfigurationInfo; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceCosmosDbConfigurationInfo.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceCosmosDbConfigurationInfo.java index 95835ebac2fb6..f803fac6a11d1 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceCosmosDbConfigurationInfo.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceCosmosDbConfigurationInfo.java @@ -5,29 +5,30 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * The settings for the Cosmos DB database backing the service. */ @Fluent -public final class ServiceCosmosDbConfigurationInfo { +public final class ServiceCosmosDbConfigurationInfo implements JsonSerializable { /* * The provisioned throughput for the backing database. */ - @JsonProperty(value = "offerThroughput") private Integer offerThroughput; /* * The URI of the customer-managed key for the backing database. */ - @JsonProperty(value = "keyVaultKeyUri") private String keyVaultKeyUri; /* * The multi-tenant application id used to enable CMK access for services in a data sovereign region. */ - @JsonProperty(value = "crossTenantCmkApplicationId") private String crossTenantCmkApplicationId; /** @@ -105,4 +106,48 @@ public ServiceCosmosDbConfigurationInfo withCrossTenantCmkApplicationId(String c */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("offerThroughput", this.offerThroughput); + jsonWriter.writeStringField("keyVaultKeyUri", this.keyVaultKeyUri); + jsonWriter.writeStringField("crossTenantCmkApplicationId", this.crossTenantCmkApplicationId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServiceCosmosDbConfigurationInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServiceCosmosDbConfigurationInfo if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ServiceCosmosDbConfigurationInfo. + */ + public static ServiceCosmosDbConfigurationInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServiceCosmosDbConfigurationInfo deserializedServiceCosmosDbConfigurationInfo + = new ServiceCosmosDbConfigurationInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("offerThroughput".equals(fieldName)) { + deserializedServiceCosmosDbConfigurationInfo.offerThroughput + = reader.getNullable(JsonReader::getInt); + } else if ("keyVaultKeyUri".equals(fieldName)) { + deserializedServiceCosmosDbConfigurationInfo.keyVaultKeyUri = reader.getString(); + } else if ("crossTenantCmkApplicationId".equals(fieldName)) { + deserializedServiceCosmosDbConfigurationInfo.crossTenantCmkApplicationId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedServiceCosmosDbConfigurationInfo; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceEventState.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceEventState.java index 706afb705afb4..dcc7b3a49d3b1 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceEventState.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceEventState.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -42,7 +41,6 @@ public ServiceEventState() { * @param name a name to look for. * @return the corresponding ServiceEventState. */ - @JsonCreator public static ServiceEventState fromString(String name) { return fromString(name, ServiceEventState.class); } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceExportConfigurationInfo.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceExportConfigurationInfo.java index b81884566a320..398c3285d089d 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceExportConfigurationInfo.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceExportConfigurationInfo.java @@ -5,17 +5,20 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Export operation configuration information. */ @Fluent -public final class ServiceExportConfigurationInfo { +public final class ServiceExportConfigurationInfo implements JsonSerializable { /* * The name of the default export storage account. */ - @JsonProperty(value = "storageAccountName") private String storageAccountName; /** @@ -51,4 +54,41 @@ public ServiceExportConfigurationInfo withStorageAccountName(String storageAccou */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("storageAccountName", this.storageAccountName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServiceExportConfigurationInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServiceExportConfigurationInfo if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ServiceExportConfigurationInfo. + */ + public static ServiceExportConfigurationInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServiceExportConfigurationInfo deserializedServiceExportConfigurationInfo + = new ServiceExportConfigurationInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("storageAccountName".equals(fieldName)) { + deserializedServiceExportConfigurationInfo.storageAccountName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedServiceExportConfigurationInfo; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceImportConfigurationInfo.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceImportConfigurationInfo.java index 83e7c1d871ea7..517cd99295b64 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceImportConfigurationInfo.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceImportConfigurationInfo.java @@ -5,29 +5,30 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Import operation configuration information. */ @Fluent -public final class ServiceImportConfigurationInfo { +public final class ServiceImportConfigurationInfo implements JsonSerializable { /* * The name of the default integration storage account. */ - @JsonProperty(value = "integrationDataStore") private String integrationDataStore; /* * If the FHIR service is in InitialImportMode. */ - @JsonProperty(value = "initialImportMode") private Boolean initialImportMode; /* * If the import operation is enabled. */ - @JsonProperty(value = "enabled") private Boolean enabled; /** @@ -103,4 +104,48 @@ public ServiceImportConfigurationInfo withEnabled(Boolean enabled) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("integrationDataStore", this.integrationDataStore); + jsonWriter.writeBooleanField("initialImportMode", this.initialImportMode); + jsonWriter.writeBooleanField("enabled", this.enabled); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServiceImportConfigurationInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServiceImportConfigurationInfo if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ServiceImportConfigurationInfo. + */ + public static ServiceImportConfigurationInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServiceImportConfigurationInfo deserializedServiceImportConfigurationInfo + = new ServiceImportConfigurationInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("integrationDataStore".equals(fieldName)) { + deserializedServiceImportConfigurationInfo.integrationDataStore = reader.getString(); + } else if ("initialImportMode".equals(fieldName)) { + deserializedServiceImportConfigurationInfo.initialImportMode + = reader.getNullable(JsonReader::getBoolean); + } else if ("enabled".equals(fieldName)) { + deserializedServiceImportConfigurationInfo.enabled = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedServiceImportConfigurationInfo; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceManagedIdentity.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceManagedIdentity.java index 123db9fa784af..d7502423af326 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceManagedIdentity.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceManagedIdentity.java @@ -5,17 +5,20 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Managed service identity (system assigned and/or user assigned identities). */ @Fluent -public class ServiceManagedIdentity { +public class ServiceManagedIdentity implements JsonSerializable { /* * Setting indicating whether the service has a managed identity associated with it. */ - @JsonProperty(value = "identity") private ServiceManagedIdentityIdentity identity; /** @@ -54,4 +57,40 @@ public void validate() { identity().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("identity", this.identity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServiceManagedIdentity from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServiceManagedIdentity if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the ServiceManagedIdentity. + */ + public static ServiceManagedIdentity fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServiceManagedIdentity deserializedServiceManagedIdentity = new ServiceManagedIdentity(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("identity".equals(fieldName)) { + deserializedServiceManagedIdentity.identity = ServiceManagedIdentityIdentity.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedServiceManagedIdentity; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceManagedIdentityIdentity.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceManagedIdentityIdentity.java index 405871c1cb0b7..e594eb9e9bea4 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceManagedIdentityIdentity.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceManagedIdentityIdentity.java @@ -6,8 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.Map; import java.util.UUID; @@ -15,30 +18,30 @@ * Setting indicating whether the service has a managed identity associated with it. */ @Fluent -public final class ServiceManagedIdentityIdentity { +public final class ServiceManagedIdentityIdentity implements JsonSerializable { /* * Type of identity being specified, currently SystemAssigned and None are allowed. */ - @JsonProperty(value = "type", required = true) private ServiceManagedIdentityType type; /* - * The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. + * The service principal ID of the system assigned identity. This property will only be provided for a system + * assigned identity. */ - @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) private UUID principalId; /* - * The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. + * The tenant ID of the system assigned identity. This property will only be provided for a system assigned + * identity. */ - @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) private UUID tenantId; /* - * The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. + * The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will + * be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/ + * userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. */ - @JsonProperty(value = "userAssignedIdentities") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map userAssignedIdentities; /** @@ -135,4 +138,55 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(ServiceManagedIdentityIdentity.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeMapField("userAssignedIdentities", this.userAssignedIdentities, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServiceManagedIdentityIdentity from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServiceManagedIdentityIdentity 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 ServiceManagedIdentityIdentity. + */ + public static ServiceManagedIdentityIdentity fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServiceManagedIdentityIdentity deserializedServiceManagedIdentityIdentity + = new ServiceManagedIdentityIdentity(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedServiceManagedIdentityIdentity.type + = ServiceManagedIdentityType.fromString(reader.getString()); + } else if ("principalId".equals(fieldName)) { + deserializedServiceManagedIdentityIdentity.principalId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else if ("tenantId".equals(fieldName)) { + deserializedServiceManagedIdentityIdentity.tenantId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else if ("userAssignedIdentities".equals(fieldName)) { + Map userAssignedIdentities + = reader.readMap(reader1 -> UserAssignedIdentity.fromJson(reader1)); + deserializedServiceManagedIdentityIdentity.userAssignedIdentities = userAssignedIdentities; + } else { + reader.skipChildren(); + } + } + + return deserializedServiceManagedIdentityIdentity; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceManagedIdentityType.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceManagedIdentityType.java index 42d9a6eb3383e..884eaa4c4bb52 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceManagedIdentityType.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceManagedIdentityType.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -48,7 +47,6 @@ public ServiceManagedIdentityType() { * @param name a name to look for. * @return the corresponding ServiceManagedIdentityType. */ - @JsonCreator public static ServiceManagedIdentityType fromString(String name) { return fromString(name, ServiceManagedIdentityType.class); } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceNameUnavailabilityReason.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceNameUnavailabilityReason.java index 4cb6248fc44b2..538d69be4e9bf 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceNameUnavailabilityReason.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceNameUnavailabilityReason.java @@ -4,9 +4,6 @@ package com.azure.resourcemanager.healthcareapis.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - /** * The reason for unavailability. */ @@ -36,7 +33,6 @@ public enum ServiceNameUnavailabilityReason { * @param value the serialized value to parse. * @return the parsed ServiceNameUnavailabilityReason object, or null if unable to parse. */ - @JsonCreator public static ServiceNameUnavailabilityReason fromString(String value) { if (value == null) { return null; @@ -53,7 +49,6 @@ public static ServiceNameUnavailabilityReason fromString(String value) { /** * {@inheritDoc} */ - @JsonValue @Override public String toString() { return this.value; diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceOciArtifactEntry.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceOciArtifactEntry.java index 873d4a2b3e950..a5f4696a4c675 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceOciArtifactEntry.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceOciArtifactEntry.java @@ -5,29 +5,30 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * An Open Container Initiative (OCI) artifact. */ @Fluent -public final class ServiceOciArtifactEntry { +public final class ServiceOciArtifactEntry implements JsonSerializable { /* * The Azure Container Registry login server. */ - @JsonProperty(value = "loginServer") private String loginServer; /* * The artifact name. */ - @JsonProperty(value = "imageName") private String imageName; /* * The artifact digest. */ - @JsonProperty(value = "digest") private String digest; /** @@ -103,4 +104,46 @@ public ServiceOciArtifactEntry withDigest(String digest) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("loginServer", this.loginServer); + jsonWriter.writeStringField("imageName", this.imageName); + jsonWriter.writeStringField("digest", this.digest); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServiceOciArtifactEntry from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServiceOciArtifactEntry if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the ServiceOciArtifactEntry. + */ + public static ServiceOciArtifactEntry fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServiceOciArtifactEntry deserializedServiceOciArtifactEntry = new ServiceOciArtifactEntry(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("loginServer".equals(fieldName)) { + deserializedServiceOciArtifactEntry.loginServer = reader.getString(); + } else if ("imageName".equals(fieldName)) { + deserializedServiceOciArtifactEntry.imageName = reader.getString(); + } else if ("digest".equals(fieldName)) { + deserializedServiceOciArtifactEntry.digest = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedServiceOciArtifactEntry; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceSpecification.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceSpecification.java index 8f2507b69f5a2..f8a90ea964e1a 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceSpecification.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceSpecification.java @@ -5,24 +5,26 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; /** * Service specification payload. */ @Fluent -public final class ServiceSpecification { +public final class ServiceSpecification implements JsonSerializable { /* * Specifications of the Log for Azure Monitoring */ - @JsonProperty(value = "logSpecifications") private List logSpecifications; /* * Specifications of the Metrics for Azure Monitoring */ - @JsonProperty(value = "metricSpecifications") private List metricSpecifications; /** @@ -84,4 +86,49 @@ public void validate() { metricSpecifications().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("logSpecifications", this.logSpecifications, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("metricSpecifications", this.metricSpecifications, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServiceSpecification from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServiceSpecification if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the ServiceSpecification. + */ + public static ServiceSpecification fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServiceSpecification deserializedServiceSpecification = new ServiceSpecification(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("logSpecifications".equals(fieldName)) { + List logSpecifications + = reader.readArray(reader1 -> LogSpecification.fromJson(reader1)); + deserializedServiceSpecification.logSpecifications = logSpecifications; + } else if ("metricSpecifications".equals(fieldName)) { + List metricSpecifications + = reader.readArray(reader1 -> MetricSpecification.fromJson(reader1)); + deserializedServiceSpecification.metricSpecifications = metricSpecifications; + } else { + reader.skipChildren(); + } + } + + return deserializedServiceSpecification; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServicesDescriptionListResult.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServicesDescriptionListResult.java index 3645a40fbf77a..dea6dafa23727 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServicesDescriptionListResult.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServicesDescriptionListResult.java @@ -5,25 +5,27 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.healthcareapis.fluent.models.ServicesDescriptionInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * A list of service description objects with a next link. */ @Fluent -public final class ServicesDescriptionListResult { +public final class ServicesDescriptionListResult implements JsonSerializable { /* * The link used to get the next page of service description objects. */ - @JsonProperty(value = "nextLink") private String nextLink; /* * A list of service description objects. */ - @JsonProperty(value = "value") private List value; /** @@ -82,4 +84,46 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("nextLink", this.nextLink); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServicesDescriptionListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServicesDescriptionListResult if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ServicesDescriptionListResult. + */ + public static ServicesDescriptionListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServicesDescriptionListResult deserializedServicesDescriptionListResult + = new ServicesDescriptionListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("nextLink".equals(fieldName)) { + deserializedServicesDescriptionListResult.nextLink = reader.getString(); + } else if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ServicesDescriptionInner.fromJson(reader1)); + deserializedServicesDescriptionListResult.value = value; + } else { + reader.skipChildren(); + } + } + + return deserializedServicesDescriptionListResult; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServicesPatchDescription.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServicesPatchDescription.java index d8e15a915949d..31f8d6eb40802 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServicesPatchDescription.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServicesPatchDescription.java @@ -5,27 +5,27 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.healthcareapis.fluent.models.ServicesPropertiesUpdateParameters; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.Map; /** * The description of the service. */ @Fluent -public final class ServicesPatchDescription { +public final class ServicesPatchDescription implements JsonSerializable { /* * Instance tags */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; /* * The properties for updating a service instance. */ - @JsonProperty(value = "properties") private ServicesPropertiesUpdateParameters innerProperties; /** @@ -98,4 +98,45 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServicesPatchDescription from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServicesPatchDescription if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ServicesPatchDescription. + */ + public static ServicesPatchDescription fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServicesPatchDescription deserializedServicesPatchDescription = new ServicesPatchDescription(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedServicesPatchDescription.tags = tags; + } else if ("properties".equals(fieldName)) { + deserializedServicesPatchDescription.innerProperties + = ServicesPropertiesUpdateParameters.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedServicesPatchDescription; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServicesProperties.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServicesProperties.java index f63636cbfd1b3..78d20befa3ec3 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServicesProperties.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServicesProperties.java @@ -5,72 +5,66 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; /** * The properties of a service instance. */ @Fluent -public final class ServicesProperties { +public final class ServicesProperties implements JsonSerializable { /* * The provisioning state. */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private ProvisioningState provisioningState; /* * The access policies of the service instance. */ - @JsonProperty(value = "accessPolicies") private List accessPolicies; /* * The settings for the Cosmos DB database backing the service. */ - @JsonProperty(value = "cosmosDbConfiguration") private ServiceCosmosDbConfigurationInfo cosmosDbConfiguration; /* * The authentication configuration for the service instance. */ - @JsonProperty(value = "authenticationConfiguration") private ServiceAuthenticationConfigurationInfo authenticationConfiguration; /* * The settings for the CORS configuration of the service instance. */ - @JsonProperty(value = "corsConfiguration") private ServiceCorsConfigurationInfo corsConfiguration; /* * The settings for the export operation of the service instance. */ - @JsonProperty(value = "exportConfiguration") private ServiceExportConfigurationInfo exportConfiguration; /* * The list of private endpoint connections that are set up for this resource. */ - @JsonProperty(value = "privateEndpointConnections") private List privateEndpointConnections; /* * Control permission for data plane traffic coming from public networks while private endpoint is enabled. */ - @JsonProperty(value = "publicNetworkAccess") private PublicNetworkAccess publicNetworkAccess; /* * The azure container registry settings used for convert data operation of the service instance. */ - @JsonProperty(value = "acrConfiguration") private ServiceAcrConfigurationInfo acrConfiguration; /* * The settings for the import operation of the service instance. */ - @JsonProperty(value = "importConfiguration") private ServiceImportConfigurationInfo importConfiguration; /** @@ -307,4 +301,78 @@ public void validate() { importConfiguration().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("accessPolicies", this.accessPolicies, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("cosmosDbConfiguration", this.cosmosDbConfiguration); + jsonWriter.writeJsonField("authenticationConfiguration", this.authenticationConfiguration); + jsonWriter.writeJsonField("corsConfiguration", this.corsConfiguration); + jsonWriter.writeJsonField("exportConfiguration", this.exportConfiguration); + jsonWriter.writeArrayField("privateEndpointConnections", this.privateEndpointConnections, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("publicNetworkAccess", + this.publicNetworkAccess == null ? null : this.publicNetworkAccess.toString()); + jsonWriter.writeJsonField("acrConfiguration", this.acrConfiguration); + jsonWriter.writeJsonField("importConfiguration", this.importConfiguration); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServicesProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServicesProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ServicesProperties. + */ + public static ServicesProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServicesProperties deserializedServicesProperties = new ServicesProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedServicesProperties.provisioningState = ProvisioningState.fromString(reader.getString()); + } else if ("accessPolicies".equals(fieldName)) { + List accessPolicies + = reader.readArray(reader1 -> ServiceAccessPolicyEntry.fromJson(reader1)); + deserializedServicesProperties.accessPolicies = accessPolicies; + } else if ("cosmosDbConfiguration".equals(fieldName)) { + deserializedServicesProperties.cosmosDbConfiguration + = ServiceCosmosDbConfigurationInfo.fromJson(reader); + } else if ("authenticationConfiguration".equals(fieldName)) { + deserializedServicesProperties.authenticationConfiguration + = ServiceAuthenticationConfigurationInfo.fromJson(reader); + } else if ("corsConfiguration".equals(fieldName)) { + deserializedServicesProperties.corsConfiguration = ServiceCorsConfigurationInfo.fromJson(reader); + } else if ("exportConfiguration".equals(fieldName)) { + deserializedServicesProperties.exportConfiguration + = ServiceExportConfigurationInfo.fromJson(reader); + } else if ("privateEndpointConnections".equals(fieldName)) { + List privateEndpointConnections + = reader.readArray(reader1 -> PrivateEndpointConnection.fromJson(reader1)); + deserializedServicesProperties.privateEndpointConnections = privateEndpointConnections; + } else if ("publicNetworkAccess".equals(fieldName)) { + deserializedServicesProperties.publicNetworkAccess + = PublicNetworkAccess.fromString(reader.getString()); + } else if ("acrConfiguration".equals(fieldName)) { + deserializedServicesProperties.acrConfiguration = ServiceAcrConfigurationInfo.fromJson(reader); + } else if ("importConfiguration".equals(fieldName)) { + deserializedServicesProperties.importConfiguration + = ServiceImportConfigurationInfo.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedServicesProperties; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServicesResource.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServicesResource.java index 78bd797aae322..c4179ee89df88 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServicesResource.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServicesResource.java @@ -7,7 +7,10 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.Map; /** @@ -18,21 +21,33 @@ public class ServicesResource extends Resource { /* * The kind of the service. */ - @JsonProperty(value = "kind", required = true) private Kind kind; /* * An etag associated with the resource, used for optimistic concurrency when editing it. */ - @JsonProperty(value = "etag") private String etag; /* * Setting indicating whether the service has a managed identity associated with it. */ - @JsonProperty(value = "identity") private ServicesResourceIdentity identity; + /* + * 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 ServicesResource class. */ @@ -99,6 +114,36 @@ public ServicesResource withIdentity(ServicesResourceIdentity identity) { return this; } + /** + * 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} */ @@ -133,4 +178,60 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(ServicesResource.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.writeStringField("kind", this.kind == null ? null : this.kind.toString()); + jsonWriter.writeStringField("etag", this.etag); + jsonWriter.writeJsonField("identity", this.identity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServicesResource from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServicesResource 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 ServicesResource. + */ + public static ServicesResource fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServicesResource deserializedServicesResource = new ServicesResource(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedServicesResource.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedServicesResource.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedServicesResource.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedServicesResource.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedServicesResource.withTags(tags); + } else if ("kind".equals(fieldName)) { + deserializedServicesResource.kind = Kind.fromString(reader.getString()); + } else if ("etag".equals(fieldName)) { + deserializedServicesResource.etag = reader.getString(); + } else if ("identity".equals(fieldName)) { + deserializedServicesResource.identity = ServicesResourceIdentity.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedServicesResource; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServicesResourceIdentity.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServicesResourceIdentity.java index af064dc5ceffb..563b14d416060 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServicesResourceIdentity.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServicesResourceIdentity.java @@ -5,29 +5,30 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Setting indicating whether the service has a managed identity associated with it. */ @Fluent -public final class ServicesResourceIdentity { +public final class ServicesResourceIdentity implements JsonSerializable { /* * The principal ID of the resource identity. */ - @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) private String principalId; /* * The tenant ID of the resource. */ - @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) private String tenantId; /* * Type of identity being specified, currently SystemAssigned and None are allowed. */ - @JsonProperty(value = "type") private ManagedServiceIdentityType type; /** @@ -81,4 +82,45 @@ public ServicesResourceIdentity withType(ManagedServiceIdentityType type) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServicesResourceIdentity from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServicesResourceIdentity if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ServicesResourceIdentity. + */ + public static ServicesResourceIdentity fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServicesResourceIdentity deserializedServicesResourceIdentity = new ServicesResourceIdentity(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("principalId".equals(fieldName)) { + deserializedServicesResourceIdentity.principalId = reader.getString(); + } else if ("tenantId".equals(fieldName)) { + deserializedServicesResourceIdentity.tenantId = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedServicesResourceIdentity.type + = ManagedServiceIdentityType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedServicesResourceIdentity; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/SmartDataActions.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/SmartDataActions.java index d48bbc059bfa5..a2483de43fe60 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/SmartDataActions.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/SmartDataActions.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -32,7 +31,6 @@ public SmartDataActions() { * @param name a name to look for. * @return the corresponding SmartDataActions. */ - @JsonCreator public static SmartDataActions fromString(String name) { return fromString(name, SmartDataActions.class); } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/SmartIdentityProviderApplication.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/SmartIdentityProviderApplication.java index 57de8b2e11d9a..68d75dbcbcf40 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/SmartIdentityProviderApplication.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/SmartIdentityProviderApplication.java @@ -5,30 +5,32 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; /** * An Application configured in the Identity Provider used to access FHIR resources. */ @Fluent -public final class SmartIdentityProviderApplication { +public final class SmartIdentityProviderApplication implements JsonSerializable { /* - * The application client id defined in the identity provider. This value will be used to validate bearer tokens against the given authority. + * The application client id defined in the identity provider. This value will be used to validate bearer tokens + * against the given authority. */ - @JsonProperty(value = "clientId") private String clientId; /* * The audience that will be used to validate bearer tokens against the given authority. */ - @JsonProperty(value = "audience") private String audience; /* * The actions that are permitted to be performed on FHIR resources for the application. */ - @JsonProperty(value = "allowedDataActions") private List allowedDataActions; /** @@ -108,4 +110,50 @@ public SmartIdentityProviderApplication withAllowedDataActions(List writer.writeString(element == null ? null : element.toString())); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SmartIdentityProviderApplication from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SmartIdentityProviderApplication if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the SmartIdentityProviderApplication. + */ + public static SmartIdentityProviderApplication fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SmartIdentityProviderApplication deserializedSmartIdentityProviderApplication + = new SmartIdentityProviderApplication(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("clientId".equals(fieldName)) { + deserializedSmartIdentityProviderApplication.clientId = reader.getString(); + } else if ("audience".equals(fieldName)) { + deserializedSmartIdentityProviderApplication.audience = reader.getString(); + } else if ("allowedDataActions".equals(fieldName)) { + List allowedDataActions + = reader.readArray(reader1 -> SmartDataActions.fromString(reader1.getString())); + deserializedSmartIdentityProviderApplication.allowedDataActions = allowedDataActions; + } else { + reader.skipChildren(); + } + } + + return deserializedSmartIdentityProviderApplication; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/SmartIdentityProviderConfiguration.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/SmartIdentityProviderConfiguration.java index d39a04aafa082..1541e618701a9 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/SmartIdentityProviderConfiguration.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/SmartIdentityProviderConfiguration.java @@ -5,24 +5,26 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; /** * An object to configure an identity provider for use with SMART on FHIR authentication. */ @Fluent -public final class SmartIdentityProviderConfiguration { +public final class SmartIdentityProviderConfiguration implements JsonSerializable { /* * The identity provider token authority also known as the token issuing authority. */ - @JsonProperty(value = "authority") private String authority; /* * The array of identity provider applications for SMART on FHIR authentication. */ - @JsonProperty(value = "applications") private List applications; /** @@ -81,4 +83,46 @@ public void validate() { applications().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("authority", this.authority); + jsonWriter.writeArrayField("applications", this.applications, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SmartIdentityProviderConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SmartIdentityProviderConfiguration if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the SmartIdentityProviderConfiguration. + */ + public static SmartIdentityProviderConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SmartIdentityProviderConfiguration deserializedSmartIdentityProviderConfiguration + = new SmartIdentityProviderConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("authority".equals(fieldName)) { + deserializedSmartIdentityProviderConfiguration.authority = reader.getString(); + } else if ("applications".equals(fieldName)) { + List applications + = reader.readArray(reader1 -> SmartIdentityProviderApplication.fromJson(reader1)); + deserializedSmartIdentityProviderConfiguration.applications = applications; + } else { + reader.skipChildren(); + } + } + + return deserializedSmartIdentityProviderConfiguration; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/StorageConfiguration.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/StorageConfiguration.java index db23bbf71b765..ded1f7891edf8 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/StorageConfiguration.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/StorageConfiguration.java @@ -5,23 +5,25 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * The configuration of connected storage. */ @Fluent -public final class StorageConfiguration { +public final class StorageConfiguration implements JsonSerializable { /* * The resource id of connected storage account. */ - @JsonProperty(value = "storageResourceId") private String storageResourceId; /* * The filesystem name of connected storage account. */ - @JsonProperty(value = "fileSystemName") private String fileSystemName; /** @@ -77,4 +79,43 @@ public StorageConfiguration withFileSystemName(String fileSystemName) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("storageResourceId", this.storageResourceId); + jsonWriter.writeStringField("fileSystemName", this.fileSystemName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of StorageConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StorageConfiguration if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the StorageConfiguration. + */ + public static StorageConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StorageConfiguration deserializedStorageConfiguration = new StorageConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("storageResourceId".equals(fieldName)) { + deserializedStorageConfiguration.storageResourceId = reader.getString(); + } else if ("fileSystemName".equals(fieldName)) { + deserializedStorageConfiguration.fileSystemName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedStorageConfiguration; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/TaggedResource.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/TaggedResource.java index 7a9c742ef64f9..c98fc52b6213b 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/TaggedResource.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/TaggedResource.java @@ -5,8 +5,10 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.Map; /** @@ -17,10 +19,23 @@ public class TaggedResource extends LocationBasedResource { /* * Resource tags. */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; + /* + * 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 TaggedResource class. */ @@ -47,6 +62,36 @@ public TaggedResource withTags(Map tags) { return this; } + /** + * 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} */ @@ -72,6 +117,55 @@ public TaggedResource withEtag(String etag) { */ @Override public void validate() { - super.validate(); + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("etag", etag()); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TaggedResource from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TaggedResource 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 TaggedResource. + */ + public static TaggedResource fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TaggedResource deserializedTaggedResource = new TaggedResource(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedTaggedResource.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedTaggedResource.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedTaggedResource.type = reader.getString(); + } else if ("etag".equals(fieldName)) { + deserializedTaggedResource.withEtag(reader.getString()); + } else if ("location".equals(fieldName)) { + deserializedTaggedResource.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedTaggedResource.tags = tags; + } else { + reader.skipChildren(); + } + } + + return deserializedTaggedResource; + }); } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/UserAssignedIdentity.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/UserAssignedIdentity.java index f6cebc5ae6d13..c2d9d9969f8fb 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/UserAssignedIdentity.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/UserAssignedIdentity.java @@ -5,24 +5,26 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.UUID; /** * User assigned identity properties. */ @Immutable -public final class UserAssignedIdentity { +public final class UserAssignedIdentity implements JsonSerializable { /* * The principal ID of the assigned identity. */ - @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) private UUID principalId; /* * The client ID of the assigned identity. */ - @JsonProperty(value = "clientId", access = JsonProperty.Access.WRITE_ONLY) private UUID clientId; /** @@ -56,4 +58,43 @@ public UUID clientId() { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UserAssignedIdentity from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UserAssignedIdentity if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the UserAssignedIdentity. + */ + public static UserAssignedIdentity fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UserAssignedIdentity deserializedUserAssignedIdentity = new UserAssignedIdentity(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("principalId".equals(fieldName)) { + deserializedUserAssignedIdentity.principalId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else if ("clientId".equals(fieldName)) { + deserializedUserAssignedIdentity.clientId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedUserAssignedIdentity; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/WorkspaceList.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/WorkspaceList.java index 80cd5038d6ebb..43c0abaab8005 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/WorkspaceList.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/WorkspaceList.java @@ -5,25 +5,27 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.healthcareapis.fluent.models.WorkspaceInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * Collection of workspace object with a next link. */ @Fluent -public final class WorkspaceList { +public final class WorkspaceList implements JsonSerializable { /* * The link used to get the next page. */ - @JsonProperty(value = "nextLink") private String nextLink; /* * Collection of resources. */ - @JsonProperty(value = "value") private List value; /** @@ -82,4 +84,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("nextLink", this.nextLink); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WorkspaceList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WorkspaceList if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the WorkspaceList. + */ + public static WorkspaceList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WorkspaceList deserializedWorkspaceList = new WorkspaceList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("nextLink".equals(fieldName)) { + deserializedWorkspaceList.nextLink = reader.getString(); + } else if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> WorkspaceInner.fromJson(reader1)); + deserializedWorkspaceList.value = value; + } else { + reader.skipChildren(); + } + } + + return deserializedWorkspaceList; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/WorkspacePatchResource.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/WorkspacePatchResource.java index 200ddb6a560b6..4589e28601720 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/WorkspacePatchResource.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/WorkspacePatchResource.java @@ -5,6 +5,10 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.Map; /** @@ -34,6 +38,42 @@ public WorkspacePatchResource withTags(Map tags) { */ @Override public void validate() { - super.validate(); + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WorkspacePatchResource from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WorkspacePatchResource if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the WorkspacePatchResource. + */ + public static WorkspacePatchResource fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WorkspacePatchResource deserializedWorkspacePatchResource = new WorkspacePatchResource(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedWorkspacePatchResource.withTags(tags); + } else { + reader.skipChildren(); + } + } + + return deserializedWorkspacePatchResource; + }); } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/WorkspaceProperties.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/WorkspaceProperties.java index d7ab8fd226d79..1c8abf3edb009 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/WorkspaceProperties.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/WorkspaceProperties.java @@ -5,30 +5,31 @@ package com.azure.resourcemanager.healthcareapis.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; /** * Workspaces resource specific properties. */ @Fluent -public final class WorkspaceProperties { +public final class WorkspaceProperties implements JsonSerializable { /* * The provisioning state. */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private ProvisioningState provisioningState; /* * The list of private endpoint connections that are set up for this resource. */ - @JsonProperty(value = "privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY) private List privateEndpointConnections; /* * Control permission for data plane traffic coming from public networks while private endpoint is enabled. */ - @JsonProperty(value = "publicNetworkAccess") private PublicNetworkAccess publicNetworkAccess; /** @@ -88,4 +89,49 @@ public void validate() { privateEndpointConnections().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("publicNetworkAccess", + this.publicNetworkAccess == null ? null : this.publicNetworkAccess.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WorkspaceProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WorkspaceProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the WorkspaceProperties. + */ + public static WorkspaceProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WorkspaceProperties deserializedWorkspaceProperties = new WorkspaceProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedWorkspaceProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("privateEndpointConnections".equals(fieldName)) { + List privateEndpointConnections + = reader.readArray(reader1 -> PrivateEndpointConnection.fromJson(reader1)); + deserializedWorkspaceProperties.privateEndpointConnections = privateEndpointConnections; + } else if ("publicNetworkAccess".equals(fieldName)) { + deserializedWorkspaceProperties.publicNetworkAccess + = PublicNetworkAccess.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedWorkspaceProperties; + }); + } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/module-info.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/module-info.java index 6c21956187efc..7131843c6776c 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/module-info.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/module-info.java @@ -10,6 +10,6 @@ exports com.azure.resourcemanager.healthcareapis.fluent.models; exports com.azure.resourcemanager.healthcareapis.models; - opens com.azure.resourcemanager.healthcareapis.fluent.models to com.azure.core, com.fasterxml.jackson.databind; - opens com.azure.resourcemanager.healthcareapis.models to com.azure.core, com.fasterxml.jackson.databind; + opens com.azure.resourcemanager.healthcareapis.fluent.models to com.azure.core; + opens com.azure.resourcemanager.healthcareapis.models to com.azure.core; } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-healthcareapis/proxy-config.json b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-healthcareapis/proxy-config.json index c49e0242b42c9..b08f5728e971e 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-healthcareapis/proxy-config.json +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-healthcareapis/proxy-config.json @@ -1 +1 @@ -[ [ "com.azure.resourcemanager.healthcareapis.implementation.ServicesClientImpl$ServicesService" ], [ "com.azure.resourcemanager.healthcareapis.implementation.PrivateEndpointConnectionsClientImpl$PrivateEndpointConnectionsService" ], [ "com.azure.resourcemanager.healthcareapis.implementation.PrivateLinkResourcesClientImpl$PrivateLinkResourcesService" ], [ "com.azure.resourcemanager.healthcareapis.implementation.WorkspacesClientImpl$WorkspacesService" ], [ "com.azure.resourcemanager.healthcareapis.implementation.DicomServicesClientImpl$DicomServicesService" ], [ "com.azure.resourcemanager.healthcareapis.implementation.IotConnectorsClientImpl$IotConnectorsService" ], [ "com.azure.resourcemanager.healthcareapis.implementation.FhirDestinationsClientImpl$FhirDestinationsService" ], [ "com.azure.resourcemanager.healthcareapis.implementation.IotConnectorFhirDestinationsClientImpl$IotConnectorFhirDestinationsService" ], [ "com.azure.resourcemanager.healthcareapis.implementation.FhirServicesClientImpl$FhirServicesService" ], [ "com.azure.resourcemanager.healthcareapis.implementation.WorkspacePrivateEndpointConnectionsClientImpl$WorkspacePrivateEndpointConnectionsService" ], [ "com.azure.resourcemanager.healthcareapis.implementation.WorkspacePrivateLinkResourcesClientImpl$WorkspacePrivateLinkResourcesService" ], [ "com.azure.resourcemanager.healthcareapis.implementation.OperationsClientImpl$OperationsService" ], [ "com.azure.resourcemanager.healthcareapis.implementation.OperationResultsClientImpl$OperationResultsService" ] ] \ No newline at end of file +[["com.azure.resourcemanager.healthcareapis.implementation.DicomServicesClientImpl$DicomServicesService"],["com.azure.resourcemanager.healthcareapis.implementation.FhirDestinationsClientImpl$FhirDestinationsService"],["com.azure.resourcemanager.healthcareapis.implementation.FhirServicesClientImpl$FhirServicesService"],["com.azure.resourcemanager.healthcareapis.implementation.IotConnectorFhirDestinationsClientImpl$IotConnectorFhirDestinationsService"],["com.azure.resourcemanager.healthcareapis.implementation.IotConnectorsClientImpl$IotConnectorsService"],["com.azure.resourcemanager.healthcareapis.implementation.OperationResultsClientImpl$OperationResultsService"],["com.azure.resourcemanager.healthcareapis.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.healthcareapis.implementation.PrivateEndpointConnectionsClientImpl$PrivateEndpointConnectionsService"],["com.azure.resourcemanager.healthcareapis.implementation.PrivateLinkResourcesClientImpl$PrivateLinkResourcesService"],["com.azure.resourcemanager.healthcareapis.implementation.ServicesClientImpl$ServicesService"],["com.azure.resourcemanager.healthcareapis.implementation.WorkspacePrivateEndpointConnectionsClientImpl$WorkspacePrivateEndpointConnectionsService"],["com.azure.resourcemanager.healthcareapis.implementation.WorkspacePrivateLinkResourcesClientImpl$WorkspacePrivateLinkResourcesService"],["com.azure.resourcemanager.healthcareapis.implementation.WorkspacesClientImpl$WorkspacesService"]] \ No newline at end of file diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-healthcareapis/reflect-config.json b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-healthcareapis/reflect-config.json index 4270aceba9a6d..0637a088a01e8 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-healthcareapis/reflect-config.json +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-healthcareapis/reflect-config.json @@ -1,471 +1 @@ -[ { - "name" : "com.azure.resourcemanager.healthcareapis.fluent.models.ServicesDescriptionInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.ServicesProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.ServiceAccessPolicyEntry", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.ServiceCosmosDbConfigurationInfo", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.ServiceAuthenticationConfigurationInfo", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.ServiceCorsConfigurationInfo", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.ServiceExportConfigurationInfo", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.PrivateEndpointConnection", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.fluent.models.PrivateEndpointConnectionProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.PrivateEndpoint", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.PrivateLinkServiceConnectionState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.ServiceAcrConfigurationInfo", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.ServiceOciArtifactEntry", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.ServiceImportConfigurationInfo", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.ServicesResource", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.ServicesResourceIdentity", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.ServicesPatchDescription", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.fluent.models.ServicesPropertiesUpdateParameters", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.ServicesDescriptionListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.CheckNameAvailabilityParameters", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.fluent.models.ServicesNameAvailabilityInfoInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.PrivateEndpointConnectionListResultDescription", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.fluent.models.PrivateEndpointConnectionDescriptionInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.fluent.models.PrivateLinkResourceListResultDescriptionInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.fluent.models.PrivateLinkResourceDescriptionInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.PrivateLinkResource", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.fluent.models.PrivateLinkResourceProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.WorkspaceList", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.fluent.models.WorkspaceInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.WorkspaceProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.TaggedResource", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.ResourceTags", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.LocationBasedResource", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.ResourceCore", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.WorkspacePatchResource", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.DicomServiceCollection", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.fluent.models.DicomServiceInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.fluent.models.DicomServiceProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.DicomServiceAuthenticationConfiguration", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.CorsConfiguration", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.Encryption", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.EncryptionCustomerManagedKeyEncryption", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.StorageConfiguration", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.ServiceManagedIdentity", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.ServiceManagedIdentityIdentity", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.UserAssignedIdentity", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.DicomServicePatchResource", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.IotConnectorCollection", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.fluent.models.IotConnectorInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.fluent.models.IotConnectorProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.IotEventHubIngestionEndpointConfiguration", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.IotMappingProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.IotConnectorPatchResource", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.IotFhirDestinationCollection", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.fluent.models.IotFhirDestinationInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.fluent.models.IotFhirDestinationProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.IotDestinationProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.FhirServiceCollection", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.fluent.models.FhirServiceInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.fluent.models.FhirServiceProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.FhirServiceAcrConfiguration", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.FhirServiceAuthenticationConfiguration", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.SmartIdentityProviderConfiguration", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.SmartIdentityProviderApplication", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.FhirServiceCorsConfiguration", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.FhirServiceExportConfiguration", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.ResourceVersionPolicyConfiguration", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.FhirServiceImportConfiguration", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.ImplementationGuidesConfiguration", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.FhirServicePatchResource", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.ListOperations", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.fluent.models.OperationDetailInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.OperationDisplay", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.OperationProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.ServiceSpecification", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.LogSpecification", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.MetricSpecification", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.MetricDimension", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.fluent.models.OperationResultsDescriptionInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.ProvisioningState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.PrivateEndpointServiceConnectionStatus", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.PrivateEndpointConnectionProvisioningState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.PublicNetworkAccess", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.ManagedServiceIdentityType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.ServiceEventState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.ServiceManagedIdentityType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.IotIdentityResolutionType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.FhirServiceKind", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.SmartDataActions", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.FhirResourceVersionPolicy", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.ActionType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.OperationResultStatus", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.Kind", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.healthcareapis.models.ServiceNameUnavailabilityReason", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -} ] \ No newline at end of file +[] \ No newline at end of file diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/DicomServicesCreateOrUpdateSamples.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/DicomServicesCreateOrUpdateSamples.java index 8ee324b04b75b..eade5c6897572 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/DicomServicesCreateOrUpdateSamples.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/DicomServicesCreateOrUpdateSamples.java @@ -11,7 +11,9 @@ */ public final class DicomServicesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/dicomservices/DicomServices_Create.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/dicomservices/ + * DicomServices_Create.json */ /** * Sample code: Create or update a Dicom Service. diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/DicomServicesDeleteSamples.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/DicomServicesDeleteSamples.java index c627c02e0303d..38499345b5e25 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/DicomServicesDeleteSamples.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/DicomServicesDeleteSamples.java @@ -9,7 +9,9 @@ */ public final class DicomServicesDeleteSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/dicomservices/DicomServices_Delete.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/dicomservices/ + * DicomServices_Delete.json */ /** * Sample code: Delete a dicomservice. diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/DicomServicesGetSamples.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/DicomServicesGetSamples.java index e09f4c7fe6a95..91726abff0ae3 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/DicomServicesGetSamples.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/DicomServicesGetSamples.java @@ -9,7 +9,9 @@ */ public final class DicomServicesGetSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/dicomservices/DicomServices_Get.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/dicomservices/ + * DicomServices_Get.json */ /** * Sample code: Get a dicomservice. diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/DicomServicesListByWorkspaceSamples.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/DicomServicesListByWorkspaceSamples.java index 2b99306ae84ec..a77cb7b0a4940 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/DicomServicesListByWorkspaceSamples.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/DicomServicesListByWorkspaceSamples.java @@ -9,7 +9,9 @@ */ public final class DicomServicesListByWorkspaceSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/dicomservices/DicomServices_List.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/dicomservices/ + * DicomServices_List.json */ /** * Sample code: List dicomservices. diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/DicomServicesUpdateSamples.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/DicomServicesUpdateSamples.java index 12256ee1c3c29..72a07f8e77b5d 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/DicomServicesUpdateSamples.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/DicomServicesUpdateSamples.java @@ -13,7 +13,9 @@ */ public final class DicomServicesUpdateSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/dicomservices/DicomServices_Patch.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/dicomservices/ + * DicomServices_Patch.json */ /** * Sample code: Update a dicomservice. diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/FhirDestinationsListByIotConnectorSamples.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/FhirDestinationsListByIotConnectorSamples.java index f7f21a25a1b77..5f4ca1bb7fbb4 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/FhirDestinationsListByIotConnectorSamples.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/FhirDestinationsListByIotConnectorSamples.java @@ -9,7 +9,9 @@ */ public final class FhirDestinationsListByIotConnectorSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/iotconnectors/iotconnector_fhirdestination_List.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/iotconnectors/ + * iotconnector_fhirdestination_List.json */ /** * Sample code: List IoT Connectors. diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/FhirServicesCreateOrUpdateSamples.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/FhirServicesCreateOrUpdateSamples.java index f0a84af71f5a7..0f74a708a03d6 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/FhirServicesCreateOrUpdateSamples.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/FhirServicesCreateOrUpdateSamples.java @@ -28,7 +28,9 @@ */ public final class FhirServicesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/fhirservices/FhirServices_Create.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/fhirservices/ + * FhirServices_Create.json */ /** * Sample code: Create or update a Fhir Service. diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/FhirServicesDeleteSamples.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/FhirServicesDeleteSamples.java index 9c03fd7f27516..1493bfd64d176 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/FhirServicesDeleteSamples.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/FhirServicesDeleteSamples.java @@ -9,7 +9,9 @@ */ public final class FhirServicesDeleteSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/fhirservices/FhirServices_Delete.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/fhirservices/ + * FhirServices_Delete.json */ /** * Sample code: Delete a Fhir Service. diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/FhirServicesGetSamples.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/FhirServicesGetSamples.java index 6a11ecfcdc0a5..435a3bf99eb80 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/FhirServicesGetSamples.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/FhirServicesGetSamples.java @@ -9,7 +9,9 @@ */ public final class FhirServicesGetSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/fhirservices/FhirServices_Get.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/fhirservices/ + * FhirServices_Get.json */ /** * Sample code: Get a Fhir Service. diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/FhirServicesListByWorkspaceSamples.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/FhirServicesListByWorkspaceSamples.java index d17debf03e1b0..e24836c9bf5d0 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/FhirServicesListByWorkspaceSamples.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/FhirServicesListByWorkspaceSamples.java @@ -9,7 +9,9 @@ */ public final class FhirServicesListByWorkspaceSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/fhirservices/FhirServices_List.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/fhirservices/ + * FhirServices_List.json */ /** * Sample code: List fhirservices. diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/FhirServicesUpdateSamples.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/FhirServicesUpdateSamples.java index 79726a7382c2c..c792232bc3d01 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/FhirServicesUpdateSamples.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/FhirServicesUpdateSamples.java @@ -13,7 +13,9 @@ */ public final class FhirServicesUpdateSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/fhirservices/FhirServices_Patch.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/fhirservices/ + * FhirServices_Patch.json */ /** * Sample code: Update a Fhir Service. diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorFhirDestinationCreateOrUpdateSamples.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorFhirDestinationCreateOrUpdateSamples.java index efc8764ad266e..88a91d0396a29 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorFhirDestinationCreateOrUpdateSamples.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorFhirDestinationCreateOrUpdateSamples.java @@ -15,7 +15,9 @@ */ public final class IotConnectorFhirDestinationCreateOrUpdateSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/iotconnectors/iotconnector_fhirdestination_Create.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/iotconnectors/ + * iotconnector_fhirdestination_Create.json */ /** * Sample code: Create or update an Iot Connector FHIR destination. diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorFhirDestinationDeleteSamples.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorFhirDestinationDeleteSamples.java index 2d48ff28a9cd3..cb79bb6340b73 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorFhirDestinationDeleteSamples.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorFhirDestinationDeleteSamples.java @@ -9,7 +9,9 @@ */ public final class IotConnectorFhirDestinationDeleteSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/iotconnectors/iotconnector_fhirdestination_Delete.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/iotconnectors/ + * iotconnector_fhirdestination_Delete.json */ /** * Sample code: Delete an IoT Connector destination. diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorFhirDestinationGetSamples.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorFhirDestinationGetSamples.java index 181a0a5d525e2..a8b2b8a25bcda 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorFhirDestinationGetSamples.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorFhirDestinationGetSamples.java @@ -9,7 +9,9 @@ */ public final class IotConnectorFhirDestinationGetSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/iotconnectors/iotconnector_fhirdestination_Get.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/iotconnectors/ + * iotconnector_fhirdestination_Get.json */ /** * Sample code: Get an IoT Connector destination. diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorsCreateOrUpdateSamples.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorsCreateOrUpdateSamples.java index eaa158fbcb186..09e8f6e8598c9 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorsCreateOrUpdateSamples.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorsCreateOrUpdateSamples.java @@ -19,7 +19,9 @@ */ public final class IotConnectorsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/iotconnectors/iotconnector_Create.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/iotconnectors/ + * iotconnector_Create.json */ /** * Sample code: Create an IoT Connector. diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorsDeleteSamples.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorsDeleteSamples.java index 2b71738fbcaad..5d24df8d0b4e8 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorsDeleteSamples.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorsDeleteSamples.java @@ -9,7 +9,9 @@ */ public final class IotConnectorsDeleteSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/iotconnectors/iotconnector_Delete.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/iotconnectors/ + * iotconnector_Delete.json */ /** * Sample code: Delete an IoT Connector. diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorsGetSamples.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorsGetSamples.java index b749814c38a48..da76c647483f6 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorsGetSamples.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorsGetSamples.java @@ -9,7 +9,9 @@ */ public final class IotConnectorsGetSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/iotconnectors/iotconnector_Get.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/iotconnectors/ + * iotconnector_Get.json */ /** * Sample code: Get an IoT Connector. diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorsListByWorkspaceSamples.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorsListByWorkspaceSamples.java index 19f1a9fac6ff3..bf8182deb9dbc 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorsListByWorkspaceSamples.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorsListByWorkspaceSamples.java @@ -9,7 +9,9 @@ */ public final class IotConnectorsListByWorkspaceSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/iotconnectors/iotconnector_List.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/iotconnectors/ + * iotconnector_List.json */ /** * Sample code: List iotconnectors. diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorsUpdateSamples.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorsUpdateSamples.java index 3ead468a88904..cc55e2840c664 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorsUpdateSamples.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorsUpdateSamples.java @@ -15,7 +15,9 @@ */ public final class IotConnectorsUpdateSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/iotconnectors/iotconnector_Patch.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/iotconnectors/ + * iotconnector_Patch.json */ /** * Sample code: Patch an IoT Connector. diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/OperationResultsGetSamples.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/OperationResultsGetSamples.java index 05a100f3c84f4..354ce64bf4e68 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/OperationResultsGetSamples.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/OperationResultsGetSamples.java @@ -9,7 +9,9 @@ */ public final class OperationResultsGetSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/OperationResultsGet.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/ + * OperationResultsGet.json */ /** * Sample code: Get operation result. diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/OperationsListSamples.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/OperationsListSamples.java index fe3f69e18e1d3..e27b9edcaae29 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/OperationsListSamples.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/OperationsListSamples.java @@ -9,7 +9,9 @@ */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/OperationsList.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/OperationsList. + * json */ /** * Sample code: List operations. diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java index 52926dd0ef2c8..19621acd05a10 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java @@ -12,7 +12,9 @@ */ public final class PrivateEndpointConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/legacy/ServiceCreatePrivateEndpointConnection.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/legacy/ + * ServiceCreatePrivateEndpointConnection.json */ /** * Sample code: PrivateEndpointConnection_CreateOrUpdate. diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/PrivateEndpointConnectionsDeleteSamples.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/PrivateEndpointConnectionsDeleteSamples.java index faaa63f172905..2b115bb2f6bef 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/PrivateEndpointConnectionsDeleteSamples.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/PrivateEndpointConnectionsDeleteSamples.java @@ -9,7 +9,9 @@ */ public final class PrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/legacy/ServiceDeletePrivateEndpointConnection.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/legacy/ + * ServiceDeletePrivateEndpointConnection.json */ /** * Sample code: PrivateEndpointConnections_Delete. diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/PrivateEndpointConnectionsGetSamples.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/PrivateEndpointConnectionsGetSamples.java index 476d1beeb91d8..925c04b74285f 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/PrivateEndpointConnectionsGetSamples.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/PrivateEndpointConnectionsGetSamples.java @@ -9,7 +9,9 @@ */ public final class PrivateEndpointConnectionsGetSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/legacy/ServiceGetPrivateEndpointConnection.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/legacy/ + * ServiceGetPrivateEndpointConnection.json */ /** * Sample code: PrivateEndpointConnection_GetConnection. diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/PrivateEndpointConnectionsListByServiceSamples.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/PrivateEndpointConnectionsListByServiceSamples.java index 33b2d815396a6..8e7602f573288 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/PrivateEndpointConnectionsListByServiceSamples.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/PrivateEndpointConnectionsListByServiceSamples.java @@ -9,7 +9,9 @@ */ public final class PrivateEndpointConnectionsListByServiceSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/legacy/ServiceListPrivateEndpointConnections.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/legacy/ + * ServiceListPrivateEndpointConnections.json */ /** * Sample code: PrivateEndpointConnection_List. diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/PrivateLinkResourcesGetSamples.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/PrivateLinkResourcesGetSamples.java index 8ac11c2d9196b..b257a12138b63 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/PrivateLinkResourcesGetSamples.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/PrivateLinkResourcesGetSamples.java @@ -9,7 +9,9 @@ */ public final class PrivateLinkResourcesGetSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/legacy/PrivateLinkResourceGet.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/legacy/ + * PrivateLinkResourceGet.json */ /** * Sample code: PrivateLinkResources_Get. diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/PrivateLinkResourcesListByServiceSamples.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/PrivateLinkResourcesListByServiceSamples.java index 5361becf5f293..73b875a60c45f 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/PrivateLinkResourcesListByServiceSamples.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/PrivateLinkResourcesListByServiceSamples.java @@ -9,7 +9,9 @@ */ public final class PrivateLinkResourcesListByServiceSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/legacy/PrivateLinkResourcesListByService.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/legacy/ + * PrivateLinkResourcesListByService.json */ /** * Sample code: PrivateLinkResources_ListGroupIds. diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/ServicesCheckNameAvailabilitySamples.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/ServicesCheckNameAvailabilitySamples.java index b7edda9d0e60f..46a9d2f7fa8d5 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/ServicesCheckNameAvailabilitySamples.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/ServicesCheckNameAvailabilitySamples.java @@ -11,7 +11,9 @@ */ public final class ServicesCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/CheckNameAvailabilityPost.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/ + * CheckNameAvailabilityPost.json */ /** * Sample code: Check name availability. diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/ServicesCreateOrUpdateSamples.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/ServicesCreateOrUpdateSamples.java index df599bb4d9b3e..2c2b03931802d 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/ServicesCreateOrUpdateSamples.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/ServicesCreateOrUpdateSamples.java @@ -23,7 +23,9 @@ */ public final class ServicesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/legacy/ServiceCreate.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/legacy/ + * ServiceCreate.json */ /** * Sample code: Create or Update a service with all parameters. @@ -62,7 +64,9 @@ public static void createOrUpdateAServiceWithAllParameters( } /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/legacy/ServiceCreateInDataSovereignRegionWithCmkEnabled.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/legacy/ + * ServiceCreateInDataSovereignRegionWithCmkEnabled.json */ /** * Sample code: Create or Update a service with all parameters and CMK enabled in a data sovereign region. @@ -102,7 +106,9 @@ public static void createOrUpdateAServiceWithAllParametersAndCMKEnabledInADataSo } /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/legacy/ServiceCreateMinimum.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/legacy/ + * ServiceCreateMinimum.json */ /** * Sample code: Create or Update a service with minimum parameters. diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/ServicesDeleteSamples.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/ServicesDeleteSamples.java index 024b73324d35a..dc129501c8cc1 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/ServicesDeleteSamples.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/ServicesDeleteSamples.java @@ -9,7 +9,9 @@ */ public final class ServicesDeleteSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/legacy/ServiceDelete.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/legacy/ + * ServiceDelete.json */ /** * Sample code: Delete service. diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/ServicesGetByResourceGroupSamples.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/ServicesGetByResourceGroupSamples.java index fff4afe354515..31612db40a42d 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/ServicesGetByResourceGroupSamples.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/ServicesGetByResourceGroupSamples.java @@ -9,7 +9,9 @@ */ public final class ServicesGetByResourceGroupSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/legacy/ServiceGet.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/legacy/ + * ServiceGet.json */ /** * Sample code: Get metadata. @@ -21,7 +23,9 @@ public static void getMetadata(com.azure.resourcemanager.healthcareapis.Healthca } /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/legacy/ServiceGetInDataSovereignRegionWithCmkEnabled.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/legacy/ + * ServiceGetInDataSovereignRegionWithCmkEnabled.json */ /** * Sample code: Get metadata for CMK enabled service in data sovereign region. diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/ServicesListByResourceGroupSamples.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/ServicesListByResourceGroupSamples.java index 251b0b95541c0..b3100adad289e 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/ServicesListByResourceGroupSamples.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/ServicesListByResourceGroupSamples.java @@ -9,7 +9,9 @@ */ public final class ServicesListByResourceGroupSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/legacy/ServiceListByResourceGroup.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/legacy/ + * ServiceListByResourceGroup.json */ /** * Sample code: List all services in resource group. diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/ServicesListSamples.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/ServicesListSamples.java index e1ec0901105a4..709b71b6599bf 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/ServicesListSamples.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/ServicesListSamples.java @@ -9,7 +9,9 @@ */ public final class ServicesListSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/legacy/ServiceList.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/legacy/ + * ServiceList.json */ /** * Sample code: List all services in subscription. diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/ServicesUpdateSamples.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/ServicesUpdateSamples.java index c10c863604c90..9aa547d3c755d 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/ServicesUpdateSamples.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/ServicesUpdateSamples.java @@ -13,7 +13,9 @@ */ public final class ServicesUpdateSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/legacy/ServicePatch.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/legacy/ + * ServicePatch.json */ /** * Sample code: Patch service. diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacePrivateEndpointConnectionsCreateOrUpdateSamples.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacePrivateEndpointConnectionsCreateOrUpdateSamples.java index a5e6db0675dea..1884f01cb33fb 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacePrivateEndpointConnectionsCreateOrUpdateSamples.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacePrivateEndpointConnectionsCreateOrUpdateSamples.java @@ -13,7 +13,9 @@ */ public final class WorkspacePrivateEndpointConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/privatelink/WorkspaceCreatePrivateEndpointConnection.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/privatelink/ + * WorkspaceCreatePrivateEndpointConnection.json */ /** * Sample code: WorkspacePrivateEndpointConnection_CreateOrUpdate. diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacePrivateEndpointConnectionsDeleteSamples.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacePrivateEndpointConnectionsDeleteSamples.java index 5f03f50895ece..294f69c528e65 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacePrivateEndpointConnectionsDeleteSamples.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacePrivateEndpointConnectionsDeleteSamples.java @@ -9,7 +9,9 @@ */ public final class WorkspacePrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/privatelink/WorkspaceDeletePrivateEndpointConnection.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/privatelink/ + * WorkspaceDeletePrivateEndpointConnection.json */ /** * Sample code: WorkspacePrivateEndpointConnections_Delete. diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacePrivateEndpointConnectionsGetSamples.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacePrivateEndpointConnectionsGetSamples.java index a222b433ad9df..c99d9f4ee1db2 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacePrivateEndpointConnectionsGetSamples.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacePrivateEndpointConnectionsGetSamples.java @@ -9,7 +9,9 @@ */ public final class WorkspacePrivateEndpointConnectionsGetSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/privatelink/WorkspaceGetPrivateEndpointConnection.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/privatelink/ + * WorkspaceGetPrivateEndpointConnection.json */ /** * Sample code: WorkspacePrivateEndpointConnection_GetConnection. diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacePrivateEndpointConnectionsListByWorkspaceSamples.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacePrivateEndpointConnectionsListByWorkspaceSamples.java index dffa84cdec1ec..1a2f6e78f99e2 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacePrivateEndpointConnectionsListByWorkspaceSamples.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacePrivateEndpointConnectionsListByWorkspaceSamples.java @@ -9,7 +9,9 @@ */ public final class WorkspacePrivateEndpointConnectionsListByWorkspaceSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/privatelink/WorkspaceListPrivateEndpointConnections.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/privatelink/ + * WorkspaceListPrivateEndpointConnections.json */ /** * Sample code: WorkspacePrivateEndpointConnection_List. diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacePrivateLinkResourcesGetSamples.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacePrivateLinkResourcesGetSamples.java index 18ae33ea2abdc..ddae20a86c21f 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacePrivateLinkResourcesGetSamples.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacePrivateLinkResourcesGetSamples.java @@ -9,7 +9,9 @@ */ public final class WorkspacePrivateLinkResourcesGetSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/privatelink/WorkspacePrivateLinkResourceGet.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/privatelink/ + * WorkspacePrivateLinkResourceGet.json */ /** * Sample code: WorkspacePrivateLinkResources_Get. diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacePrivateLinkResourcesListByWorkspaceSamples.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacePrivateLinkResourcesListByWorkspaceSamples.java index 41f275d3e059d..94358b2813a03 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacePrivateLinkResourcesListByWorkspaceSamples.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacePrivateLinkResourcesListByWorkspaceSamples.java @@ -9,7 +9,9 @@ */ public final class WorkspacePrivateLinkResourcesListByWorkspaceSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/privatelink/PrivateLinkResourcesListByWorkspace.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/privatelink/ + * PrivateLinkResourcesListByWorkspace.json */ /** * Sample code: WorkspacePrivateLinkResources_ListGroupIds. diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacesCreateOrUpdateSamples.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacesCreateOrUpdateSamples.java index 665c96676d757..d402eed988ea5 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacesCreateOrUpdateSamples.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacesCreateOrUpdateSamples.java @@ -11,7 +11,9 @@ */ public final class WorkspacesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/workspaces/Workspaces_Create.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/workspaces/ + * Workspaces_Create.json */ /** * Sample code: Create or update a workspace. diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacesDeleteSamples.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacesDeleteSamples.java index baa760032d6fc..f5a1caf1b93e2 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacesDeleteSamples.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacesDeleteSamples.java @@ -9,7 +9,9 @@ */ public final class WorkspacesDeleteSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/workspaces/Workspaces_Delete.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/workspaces/ + * Workspaces_Delete.json */ /** * Sample code: Delete a workspace. diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacesGetByResourceGroupSamples.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacesGetByResourceGroupSamples.java index 2e35a2fcc4e7f..f4c8d47811866 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacesGetByResourceGroupSamples.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacesGetByResourceGroupSamples.java @@ -9,7 +9,9 @@ */ public final class WorkspacesGetByResourceGroupSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/workspaces/Workspaces_Get.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/workspaces/ + * Workspaces_Get.json */ /** * Sample code: Get workspace. diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacesListByResourceGroupSamples.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacesListByResourceGroupSamples.java index 4034d41e5ca5f..a5c92c62110e5 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacesListByResourceGroupSamples.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacesListByResourceGroupSamples.java @@ -9,7 +9,9 @@ */ public final class WorkspacesListByResourceGroupSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/workspaces/Workspaces_ListByResourceGroup.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/workspaces/ + * Workspaces_ListByResourceGroup.json */ /** * Sample code: Get workspaces by resource group. diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacesListSamples.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacesListSamples.java index ded3694f8e337..79df5795bb4c7 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacesListSamples.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacesListSamples.java @@ -9,7 +9,9 @@ */ public final class WorkspacesListSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/workspaces/Workspaces_ListBySubscription.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/workspaces/ + * Workspaces_ListBySubscription.json */ /** * Sample code: Get workspaces by subscription. diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacesUpdateSamples.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacesUpdateSamples.java index 4995182c55eb4..75515e18108be 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacesUpdateSamples.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacesUpdateSamples.java @@ -13,7 +13,9 @@ */ public final class WorkspacesUpdateSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/workspaces/Workspaces_Patch.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-31/examples/workspaces/ + * Workspaces_Patch.json */ /** * Sample code: Update a workspace. diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/DicomServicePatchResourceTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/DicomServicePatchResourceTests.java index 1f934eb635366..a071aeb4105a1 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/DicomServicePatchResourceTests.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/DicomServicePatchResourceTests.java @@ -17,7 +17,7 @@ public final class DicomServicePatchResourceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DicomServicePatchResource model = BinaryData.fromString( - "{\"identity\":{\"type\":\"None\",\"principalId\":\"54c6792f-546e-4b5a-b247-d33f3e22a327\",\"tenantId\":\"c327a4f3-9de4-4b85-bc8a-31f9b7029732\",\"userAssignedIdentities\":{\"vpnazzm\":{\"principalId\":\"1c55e9ad-44b3-448f-89a3-78493dc6d458\",\"clientId\":\"9a641ee7-b797-4b99-9d6e-f5645024d1fd\"},\"unmpxttd\":{\"principalId\":\"aa9f2827-cc48-4634-a937-6823acfcd5f6\",\"clientId\":\"c793c183-b544-4d92-a8ce-37b682ef4178\"},\"bnlankxmyskpb\":{\"principalId\":\"bc7cd2b4-3890-4d40-8f54-a9f7df9e63af\",\"clientId\":\"405d6d76-1ccb-452c-9361-fb2ef726727f\"}}},\"tags\":{\"qidybyx\":\"btkcxywnytnrsyn\",\"aaxdbabphlwrq\":\"zfcl\",\"hsucoc\":\"fkts\",\"ckzywbiexzfeyue\":\"nyyazttbtwwrqpue\"}}") + "{\"identity\":{\"type\":\"None\",\"principalId\":\"d796a918-e4e8-4cd0-80b2-468a0b39ac6c\",\"tenantId\":\"1817ad61-907a-41e5-b070-a0730b3dcd0c\",\"userAssignedIdentities\":{\"vpnazzm\":{\"principalId\":\"2d468e64-95cd-4796-b196-d6797cc9c154\",\"clientId\":\"8923b024-585c-4fa3-870f-3bd4664a5b72\"},\"unmpxttd\":{\"principalId\":\"4c965649-e70b-4f78-a28f-75753b01eaca\",\"clientId\":\"15dd40f2-cf44-487f-b865-3f64ef7933bb\"},\"bnlankxmyskpb\":{\"principalId\":\"4daee610-1d0d-4bff-9979-796d8a1b0176\",\"clientId\":\"b85be0dd-c0bd-43e9-8b89-e7e9d5f363d0\"}}},\"tags\":{\"qidybyx\":\"btkcxywnytnrsyn\",\"aaxdbabphlwrq\":\"zfcl\",\"hsucoc\":\"fkts\",\"ckzywbiexzfeyue\":\"nyyazttbtwwrqpue\"}}") .toObject(DicomServicePatchResource.class); Assertions.assertEquals("btkcxywnytnrsyn", model.tags().get("qidybyx")); Assertions.assertEquals(ServiceManagedIdentityType.NONE, model.identity().type()); diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/FhirServicePatchResourceTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/FhirServicePatchResourceTests.java index 15e2aec8dcf8b..66c566750f4b0 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/FhirServicePatchResourceTests.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/FhirServicePatchResourceTests.java @@ -17,7 +17,7 @@ public final class FhirServicePatchResourceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FhirServicePatchResource model = BinaryData.fromString( - "{\"identity\":{\"type\":\"SystemAssigned,UserAssigned\",\"principalId\":\"5f1e7b9b-c97f-42e1-b88f-a26dca8549c8\",\"tenantId\":\"d711ea4f-ba8c-4fe5-9da1-fded2bf43131\",\"userAssignedIdentities\":{\"fbtkuwhhmhyk\":{\"principalId\":\"57ecb925-822e-4f35-a7e8-ef62abdc0a45\",\"clientId\":\"602c6b64-ab70-4589-9e5d-50e9fb1c3eef\"},\"xafnndlpichko\":{\"principalId\":\"8c4ea974-6984-4a12-9dbe-8a47b1d0b0e6\",\"clientId\":\"d9a20670-5ccd-48ac-bca3-59593a265d4f\"},\"cdyhbpkkpwdreqn\":{\"principalId\":\"82e0fc70-28df-48c4-b855-043f1ec6a81f\",\"clientId\":\"8110969a-eb23-4a38-b7c6-54613c821c4f\"},\"qfovljxywsuws\":{\"principalId\":\"a260f4d8-91a2-4499-a1b6-11a785d0e521\",\"clientId\":\"a3fd0c3a-700b-4fc9-98d5-dd895bac830b\"}}},\"tags\":{\"r\":\"ndsytgadg\"}}") + "{\"identity\":{\"type\":\"SystemAssigned,UserAssigned\",\"principalId\":\"b46965b9-daae-4437-a87c-5fc694b0569d\",\"tenantId\":\"a44b4564-574a-44b7-8fc7-9eab89221736\",\"userAssignedIdentities\":{\"fbtkuwhhmhyk\":{\"principalId\":\"48b5f881-419a-4aa6-8f4f-c22c983bce9b\",\"clientId\":\"221f1ba6-10fb-42c0-880f-ecfc511bb5b4\"},\"xafnndlpichko\":{\"principalId\":\"229aae6e-6980-4110-9fc2-d2fecfb87508\",\"clientId\":\"8aa0aac1-703b-41f2-9fa3-53627be31a2a\"},\"cdyhbpkkpwdreqn\":{\"principalId\":\"a2087f17-57fc-4169-96ef-3f062e147676\",\"clientId\":\"f96dcac5-5bcc-46aa-b886-513f67601953\"},\"qfovljxywsuws\":{\"principalId\":\"7ec98738-d1c7-4ff4-8b50-262ce4457bd5\",\"clientId\":\"3ca883dc-1a19-42b7-9e46-505b3a335024\"}}},\"tags\":{\"r\":\"ndsytgadg\"}}") .toObject(FhirServicePatchResource.class); Assertions.assertEquals("ndsytgadg", model.tags().get("r")); Assertions.assertEquals(ServiceManagedIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorCollectionTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorCollectionTests.java index 0129796fc919a..c9bb766aab55c 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorCollectionTests.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorCollectionTests.java @@ -21,7 +21,7 @@ public final class IotConnectorCollectionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IotConnectorCollection model = BinaryData.fromString( - "{\"nextLink\":\"ibx\",\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"ingestionEndpointConfiguration\":{\"eventHubName\":\"lmuzy\",\"consumerGroup\":\"aepdkzjanc\",\"fullyQualifiedEventHubNamespace\":\"rhdwbavxbniw\"},\"deviceMapping\":{\"content\":\"datawz\"}},\"identity\":{\"type\":\"None\",\"principalId\":\"5d68a5c6-cc0c-4bc9-955b-fcc4738a7ccf\",\"tenantId\":\"85bca115-92be-4ff7-a182-4e19aede8096\",\"userAssignedIdentities\":{\"x\":{\"principalId\":\"4c0be058-6a30-4637-9683-3d991aceda1d\",\"clientId\":\"d2e59795-5bd1-4b91-bdc9-d3a1dd3e9013\"},\"xbzpfzab\":{\"principalId\":\"fea8ad83-2c06-451c-9d0f-a62832741c74\",\"clientId\":\"bd1451f7-8be3-439e-af13-b8a3503474f6\"},\"uhxwtctyqiklbbov\":{\"principalId\":\"6f1617c1-1665-4833-8282-bf9a8b7025c2\",\"clientId\":\"aa57ca88-86d6-4ffa-80da-f3d59dff9d1e\"}}},\"tags\":{\"kfssxqukkf\":\"zbhvgyuguosv\",\"mg\":\"l\",\"vlopwiyighx\":\"xnkjzkdesl\"},\"location\":\"dwzbaiue\",\"etag\":\"a\",\"id\":\"m\",\"name\":\"yqupedeojnabckh\",\"type\":\"mtxpsiebtfh\"},{\"properties\":{\"provisioningState\":\"Verifying\",\"ingestionEndpointConfiguration\":{\"eventHubName\":\"skrdqmhjj\",\"consumerGroup\":\"tldwkyzxuutk\",\"fullyQualifiedEventHubNamespace\":\"ws\"},\"deviceMapping\":{\"content\":\"datavlxotogtwrupqsx\"}},\"identity\":{\"type\":\"None\",\"principalId\":\"7b69c255-3cec-41aa-b2ab-52b5ce3e6e6d\",\"tenantId\":\"4512e0da-a12b-400a-bb07-60dbdf9bddd1\",\"userAssignedIdentities\":{\"o\":{\"principalId\":\"a8e161c3-cfc2-4fd4-abd1-68990e63c5be\",\"clientId\":\"3aa8429b-22ba-45d7-9a13-4f13a5fd8a3a\"}}},\"tags\":{\"notyfjfcnjbkcn\":\"lo\",\"kphywpnvjto\":\"dhbt\"},\"location\":\"ermclfplphoxuscr\",\"etag\":\"bgyepsbj\",\"id\":\"azqugxywpmueefj\",\"name\":\"wfqkquj\",\"type\":\"dsuyonobgla\"}]}") + "{\"nextLink\":\"ibx\",\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"ingestionEndpointConfiguration\":{\"eventHubName\":\"lmuzy\",\"consumerGroup\":\"aepdkzjanc\",\"fullyQualifiedEventHubNamespace\":\"rhdwbavxbniw\"},\"deviceMapping\":{\"content\":\"datawz\"}},\"identity\":{\"type\":\"None\",\"principalId\":\"5935d86c-2ce5-407f-a4f1-789b0af4e6c8\",\"tenantId\":\"0507481f-84f4-42e5-a9cf-c5ff134429fc\",\"userAssignedIdentities\":{\"x\":{\"principalId\":\"e6da41e8-04bc-49c1-afbf-e388250cc21f\",\"clientId\":\"7b005ba2-5a83-48f3-92c4-9c8198025721\"},\"xbzpfzab\":{\"principalId\":\"53f55637-aae2-4dbe-8932-32b7304dea07\",\"clientId\":\"35fa3415-6983-49a6-ad5f-65e2e062b6df\"},\"uhxwtctyqiklbbov\":{\"principalId\":\"d8214d94-b76e-4ce1-963d-2da0ee73b056\",\"clientId\":\"a77a78d3-4ca0-456c-b149-448714682780\"}}},\"tags\":{\"kfssxqukkf\":\"zbhvgyuguosv\",\"mg\":\"l\",\"vlopwiyighx\":\"xnkjzkdesl\"},\"location\":\"dwzbaiue\",\"etag\":\"a\",\"id\":\"m\",\"name\":\"yqupedeojnabckh\",\"type\":\"mtxpsiebtfh\"},{\"properties\":{\"provisioningState\":\"Verifying\",\"ingestionEndpointConfiguration\":{\"eventHubName\":\"skrdqmhjj\",\"consumerGroup\":\"tldwkyzxuutk\",\"fullyQualifiedEventHubNamespace\":\"ws\"},\"deviceMapping\":{\"content\":\"datavlxotogtwrupqsx\"}},\"identity\":{\"type\":\"None\",\"principalId\":\"5a47d99d-5978-4294-8c45-5dc66a91271d\",\"tenantId\":\"8c72d0ff-cf5c-4f2a-9a8f-1d289ca7cc4a\",\"userAssignedIdentities\":{\"o\":{\"principalId\":\"d8272c09-dd59-4f2e-ac53-903c0c3f4ab0\",\"clientId\":\"317d3644-aa2e-4326-905f-295cd7ff3a17\"}}},\"tags\":{\"notyfjfcnjbkcn\":\"lo\",\"kphywpnvjto\":\"dhbt\"},\"location\":\"ermclfplphoxuscr\",\"etag\":\"bgyepsbj\",\"id\":\"azqugxywpmueefj\",\"name\":\"wfqkquj\",\"type\":\"dsuyonobgla\"}]}") .toObject(IotConnectorCollection.class); Assertions.assertEquals("ibx", model.nextLink()); Assertions.assertEquals("a", model.value().get(0).etag()); diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorInnerTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorInnerTests.java index 5fa4b06b17463..6d4ceebc85ab1 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorInnerTests.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorInnerTests.java @@ -19,7 +19,7 @@ public final class IotConnectorInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IotConnectorInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Accepted\",\"ingestionEndpointConfiguration\":{\"eventHubName\":\"cmgyud\",\"consumerGroup\":\"tlmoyrx\",\"fullyQualifiedEventHubNamespace\":\"fudwpznt\"},\"deviceMapping\":{\"content\":\"datazhlrqjb\"}},\"identity\":{\"type\":\"None\",\"principalId\":\"a2a3a395-aea4-4417-8a09-0dc62f5f0bed\",\"tenantId\":\"1ce177b7-f69c-438f-b85b-1defaaaf1ff8\",\"userAssignedIdentities\":{\"bkyvp\":{\"principalId\":\"4ce306dd-2956-417f-94dc-300b64167235\",\"clientId\":\"0f673954-1ac5-4de6-b658-96f6a5c31b7b\"},\"n\":{\"principalId\":\"54d085c7-f2ce-4317-93b5-2f30f6e081ec\",\"clientId\":\"0ca69672-6071-4e24-82c7-dcf06cf5d3d5\"}}},\"tags\":{\"kafkuwbcrnwbm\":\"p\",\"us\":\"hhseyv\",\"ofmxagkvtmelmqkr\":\"tslhspkdeem\"},\"location\":\"hvljuahaquh\",\"etag\":\"hmdua\",\"id\":\"aex\",\"name\":\"pvfadmwsrcr\",\"type\":\"vxpvgomz\"}") + "{\"properties\":{\"provisioningState\":\"Accepted\",\"ingestionEndpointConfiguration\":{\"eventHubName\":\"cmgyud\",\"consumerGroup\":\"tlmoyrx\",\"fullyQualifiedEventHubNamespace\":\"fudwpznt\"},\"deviceMapping\":{\"content\":\"datazhlrqjb\"}},\"identity\":{\"type\":\"None\",\"principalId\":\"ea52b8d7-3aed-4822-be6f-4448e562e4aa\",\"tenantId\":\"e93a8256-827b-4094-bf00-f55ba5643964\",\"userAssignedIdentities\":{\"bkyvp\":{\"principalId\":\"e8576dd4-9027-4511-8834-7d1808156b5c\",\"clientId\":\"2c4c906f-4a62-4416-af6c-0843824079d0\"},\"n\":{\"principalId\":\"a5c79352-a895-4e42-bb3b-e7ac74e1a6d4\",\"clientId\":\"4c134a06-a08d-4e28-96bf-0989b9ed4ac4\"}}},\"tags\":{\"kafkuwbcrnwbm\":\"p\",\"us\":\"hhseyv\",\"ofmxagkvtmelmqkr\":\"tslhspkdeem\"},\"location\":\"hvljuahaquh\",\"etag\":\"hmdua\",\"id\":\"aex\",\"name\":\"pvfadmwsrcr\",\"type\":\"vxpvgomz\"}") .toObject(IotConnectorInner.class); Assertions.assertEquals("hmdua", model.etag()); Assertions.assertEquals("hvljuahaquh", model.location()); diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorPatchResourceTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorPatchResourceTests.java index 7914203d207df..31ff1f1cc6891 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorPatchResourceTests.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorPatchResourceTests.java @@ -17,7 +17,7 @@ public final class IotConnectorPatchResourceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IotConnectorPatchResource model = BinaryData.fromString( - "{\"identity\":{\"type\":\"SystemAssigned\",\"principalId\":\"c455047c-634c-443b-b77a-685eb7e4b2ba\",\"tenantId\":\"242c167a-d3a6-44ac-adcb-44be1b408302\",\"userAssignedIdentities\":{\"xnrj\":{\"principalId\":\"d7466da9-b041-4fc5-9821-d034c8f1480c\",\"clientId\":\"ec9c2f73-e05c-4a45-849c-cc0df7b9b591\"}}},\"tags\":{\"bkpyc\":\"qwgxhniskx\",\"l\":\"klwndnhjdauwhv\",\"xujznbmpowu\":\"zbtd\",\"lupj\":\"przqlveu\"}}") + "{\"identity\":{\"type\":\"SystemAssigned\",\"principalId\":\"50d25d22-2a1c-4d34-805c-988e1b8c5e1c\",\"tenantId\":\"6b2b8de4-1633-489f-890c-1be7aa9fab17\",\"userAssignedIdentities\":{\"xnrj\":{\"principalId\":\"91a44a4c-7525-403f-83f2-ffd13d248175\",\"clientId\":\"67499058-092e-42f8-9fef-a3e955bc11e0\"}}},\"tags\":{\"bkpyc\":\"qwgxhniskx\",\"l\":\"klwndnhjdauwhv\",\"xujznbmpowu\":\"zbtd\",\"lupj\":\"przqlveu\"}}") .toObject(IotConnectorPatchResource.class); Assertions.assertEquals("qwgxhniskx", model.tags().get("bkpyc")); Assertions.assertEquals(ServiceManagedIdentityType.SYSTEM_ASSIGNED, model.identity().type()); diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorsCreateOrUpdateMockTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorsCreateOrUpdateMockTests.java index 56ea10be40413..aa92dc0d4a82e 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorsCreateOrUpdateMockTests.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorsCreateOrUpdateMockTests.java @@ -28,7 +28,7 @@ public final class IotConnectorsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"ingestionEndpointConfiguration\":{\"eventHubName\":\"mieknlraria\",\"consumerGroup\":\"iuagydwqfbylyrfg\",\"fullyQualifiedEventHubNamespace\":\"gtcojocqwo\"},\"deviceMapping\":{\"content\":\"datazjvusfzldmo\"}},\"identity\":{\"type\":\"SystemAssigned\",\"principalId\":\"7827107a-5b42-49eb-a040-347f750ed838\",\"tenantId\":\"5c916b13-22f5-451e-976c-ce1beb9e5436\",\"userAssignedIdentities\":{\"adpysownbt\":{\"principalId\":\"eb624e7f-580e-42fd-85bf-f4e75d3fff0c\",\"clientId\":\"29fd45b9-d18f-4fb1-92f3-c1be25798be0\"},\"u\":{\"principalId\":\"984b335a-659b-47be-9dc6-8e7b59040c18\",\"clientId\":\"aa9ac3cb-b7b8-4280-9f11-f5e0453834c9\"},\"qctojcmisof\":{\"principalId\":\"2b71c719-0229-4537-83d8-eba48180ef78\",\"clientId\":\"41f8aa3b-658e-4293-ad84-775f069e7c3b\"},\"pe\":{\"principalId\":\"d4d3658e-edc0-4775-80f5-afc076b0184b\",\"clientId\":\"3d329dcf-5f0d-4d3e-8450-7dfffe0abb14\"}}},\"tags\":{\"hihihlhzdsqtzbsr\":\"yqdhcuplcplcw\"},\"location\":\"o\",\"etag\":\"jhf\",\"id\":\"mvec\",\"name\":\"ctxmwoteyowcluq\",\"type\":\"vekqvgqo\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"ingestionEndpointConfiguration\":{\"eventHubName\":\"mieknlraria\",\"consumerGroup\":\"iuagydwqfbylyrfg\",\"fullyQualifiedEventHubNamespace\":\"gtcojocqwo\"},\"deviceMapping\":{\"content\":\"datazjvusfzldmo\"}},\"identity\":{\"type\":\"SystemAssigned\",\"principalId\":\"c1e6059d-93b6-490b-8ef7-b0e839801597\",\"tenantId\":\"b178b46f-d63e-4420-b650-05a828edd824\",\"userAssignedIdentities\":{\"adpysownbt\":{\"principalId\":\"0a174abb-c157-445e-882e-6dbd4f349ce5\",\"clientId\":\"0d64d1d3-b9e6-4d84-83e7-cb4066864541\"},\"u\":{\"principalId\":\"63a8ab47-0c61-4fcb-a416-8e5b0915b8b9\",\"clientId\":\"7b472db1-2d24-4549-9f88-7f2ac17af2b5\"},\"qctojcmisof\":{\"principalId\":\"0ea121dc-1603-4444-afaa-91cc5f627343\",\"clientId\":\"a4878590-f401-48db-a5dc-6d8c1b7fc72c\"},\"pe\":{\"principalId\":\"4cbc2935-5158-465c-921e-a666b99213d5\",\"clientId\":\"839a6055-95e1-4733-9213-18605fa4ccb0\"}}},\"tags\":{\"hihihlhzdsqtzbsr\":\"yqdhcuplcplcw\"},\"location\":\"o\",\"etag\":\"jhf\",\"id\":\"mvec\",\"name\":\"ctxmwoteyowcluq\",\"type\":\"vekqvgqo\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorsGetWithResponseMockTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorsGetWithResponseMockTests.java index e457c353a4e3c..a5e3fa2190f46 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorsGetWithResponseMockTests.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorsGetWithResponseMockTests.java @@ -22,7 +22,7 @@ public final class IotConnectorsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Warned\",\"ingestionEndpointConfiguration\":{\"eventHubName\":\"obfirclnpk\",\"consumerGroup\":\"ayzri\",\"fullyQualifiedEventHubNamespace\":\"hya\"},\"deviceMapping\":{\"content\":\"datajlb\"}},\"identity\":{\"type\":\"UserAssigned\",\"principalId\":\"36c5dc0e-d88b-47cb-a955-ccf6e913dbd8\",\"tenantId\":\"cc26c0fe-617f-483c-a822-0391f835f38e\",\"userAssignedIdentities\":{\"omdynhdwdigum\":{\"principalId\":\"6297a391-3b9d-4176-b3f8-5fff43963d8b\",\"clientId\":\"2dec164a-b9da-4c64-bb6a-fb09e3e5d4a7\"}}},\"tags\":{\"hezwwvaiq\":\"aauzzptjazysd\",\"hqyikvy\":\"uvvfonkp\"},\"location\":\"uyav\",\"etag\":\"wmn\",\"id\":\"sttijfybvp\",\"name\":\"ekrsgs\",\"type\":\"b\"}"; + = "{\"properties\":{\"provisioningState\":\"Warned\",\"ingestionEndpointConfiguration\":{\"eventHubName\":\"obfirclnpk\",\"consumerGroup\":\"ayzri\",\"fullyQualifiedEventHubNamespace\":\"hya\"},\"deviceMapping\":{\"content\":\"datajlb\"}},\"identity\":{\"type\":\"UserAssigned\",\"principalId\":\"14940eeb-7ca3-4a84-a737-8eaab3ad7a7a\",\"tenantId\":\"8d9beda4-cd2d-402b-aaa3-375d8b6a04ee\",\"userAssignedIdentities\":{\"omdynhdwdigum\":{\"principalId\":\"6a6a96b3-3a25-457d-a5f8-bec31a5ea9c6\",\"clientId\":\"35fe9946-6e02-4d0b-8a34-2a3bd7223c40\"}}},\"tags\":{\"hezwwvaiq\":\"aauzzptjazysd\",\"hqyikvy\":\"uvvfonkp\"},\"location\":\"uyav\",\"etag\":\"wmn\",\"id\":\"sttijfybvp\",\"name\":\"ekrsgs\",\"type\":\"b\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorsListByWorkspaceMockTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorsListByWorkspaceMockTests.java index e6396594cb275..cc97db0f67229 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorsListByWorkspaceMockTests.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorsListByWorkspaceMockTests.java @@ -23,7 +23,7 @@ public final class IotConnectorsListByWorkspaceMockTests { @Test public void testListByWorkspace() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Moving\",\"ingestionEndpointConfiguration\":{\"eventHubName\":\"wiivwzjbhyzsx\",\"consumerGroup\":\"kambtrnegvmnvuqe\",\"fullyQualifiedEventHubNamespace\":\"lds\"},\"deviceMapping\":{\"content\":\"datatjb\"}},\"identity\":{\"type\":\"SystemAssigned\",\"principalId\":\"f5434719-75f0-4711-ab68-94eb18eccdfc\",\"tenantId\":\"6fc6b105-e80b-4910-9531-1fe2386e988d\",\"userAssignedIdentities\":{\"mjlxrrilozapeewc\":{\"principalId\":\"401bf5f8-ec51-49cb-98c9-f0c98e6820e5\",\"clientId\":\"c4e91e20-7c9c-482b-9af7-f756d43f9f21\"}}},\"tags\":{\"f\":\"lktwkuziycslev\",\"tqedcgzulwm\":\"ztcktyh\",\"rjvpglydzgkrvqee\":\"rqzz\"},\"location\":\"oepry\",\"etag\":\"nwy\",\"id\":\"pzdm\",\"name\":\"vzvfvaawzqadfl\",\"type\":\"z\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Moving\",\"ingestionEndpointConfiguration\":{\"eventHubName\":\"wiivwzjbhyzsx\",\"consumerGroup\":\"kambtrnegvmnvuqe\",\"fullyQualifiedEventHubNamespace\":\"lds\"},\"deviceMapping\":{\"content\":\"datatjb\"}},\"identity\":{\"type\":\"SystemAssigned\",\"principalId\":\"63ed9d2b-bcc5-43f6-a611-e05b52cca052\",\"tenantId\":\"6dd363a1-5b63-4d1a-9743-cda688401042\",\"userAssignedIdentities\":{\"mjlxrrilozapeewc\":{\"principalId\":\"cfb2d235-4241-494c-954c-9866206b667c\",\"clientId\":\"83ee51b0-2ef4-4629-ac01-591d4b4ed555\"}}},\"tags\":{\"f\":\"lktwkuziycslev\",\"tqedcgzulwm\":\"ztcktyh\",\"rjvpglydzgkrvqee\":\"rqzz\"},\"location\":\"oepry\",\"etag\":\"nwy\",\"id\":\"pzdm\",\"name\":\"vzvfvaawzqadfl\",\"type\":\"z\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServiceManagedIdentityIdentityTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServiceManagedIdentityIdentityTests.java index ca75ffae7f418..ae0f4d826e2ae 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServiceManagedIdentityIdentityTests.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServiceManagedIdentityIdentityTests.java @@ -16,7 +16,7 @@ public final class ServiceManagedIdentityIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServiceManagedIdentityIdentity model = BinaryData.fromString( - "{\"type\":\"SystemAssigned\",\"principalId\":\"40b0a94f-0dcb-48ee-a7a8-87c07179f85c\",\"tenantId\":\"963ce69d-a907-4e6b-8dc9-e0daf42a36fe\",\"userAssignedIdentities\":{\"pyydhi\":{\"principalId\":\"b81cb8c9-5eae-4739-ae2f-31cb6e0e0619\",\"clientId\":\"49ee57cd-90c9-4aef-a2f7-cc6f048c546f\"},\"qqkpikadrg\":{\"principalId\":\"e95ba9ef-282c-43a7-ba59-21f5527c9749\",\"clientId\":\"741836a1-aba2-44c1-b6cd-7794b769db1b\"},\"agnb\":{\"principalId\":\"1e995a0d-8e9c-4d09-9377-3470d9cf4747\",\"clientId\":\"a527f2f1-f6d2-4ba0-93e2-6de6c50f48ae\"},\"hijggme\":{\"principalId\":\"a1642505-8225-458f-bd3f-4837baf54b5d\",\"clientId\":\"6c5fa999-11fa-4e9e-8745-26857ca37464\"}}}") + "{\"type\":\"SystemAssigned\",\"principalId\":\"6f1b9257-c942-4ddf-97bb-2decc8341a06\",\"tenantId\":\"c0b232fc-3c8d-40e6-961b-42f233869e3e\",\"userAssignedIdentities\":{\"pyydhi\":{\"principalId\":\"d9f776ff-f1e3-4179-ab3d-aa68d54b3cb4\",\"clientId\":\"afb09e09-2e46-4119-a3ac-3193ee13efa9\"},\"qqkpikadrg\":{\"principalId\":\"eda5e402-969e-4da3-8830-dfe1c2a41a9f\",\"clientId\":\"7e0284c3-8363-4264-8770-8a7f966aa429\"},\"agnb\":{\"principalId\":\"9a88c760-3eae-4321-84a3-5ffc57ade196\",\"clientId\":\"c490ebe1-0c91-439b-bd03-8cf78ec314bd\"},\"hijggme\":{\"principalId\":\"07bff79e-0a47-4a14-9c28-ae76f6319bc2\",\"clientId\":\"e2366b51-aead-4458-b32e-94cf94d612a8\"}}}") .toObject(ServiceManagedIdentityIdentity.class); Assertions.assertEquals(ServiceManagedIdentityType.SYSTEM_ASSIGNED, model.type()); } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServiceManagedIdentityTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServiceManagedIdentityTests.java index 4b55e382dcd0e..8b70138b4b7f8 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServiceManagedIdentityTests.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServiceManagedIdentityTests.java @@ -17,7 +17,7 @@ public final class ServiceManagedIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServiceManagedIdentity model = BinaryData.fromString( - "{\"identity\":{\"type\":\"SystemAssigned,UserAssigned\",\"principalId\":\"41d14961-cd04-4109-a3b4-994d6b380d64\",\"tenantId\":\"e249c128-1c40-47eb-b6cb-2b58c9ce787f\",\"userAssignedIdentities\":{\"rbmpukgri\":{\"principalId\":\"17f41062-1cc1-4b42-ba66-f341e0888b1a\",\"clientId\":\"635dfe8b-0360-42cb-9e8a-d7919e76c65c\"},\"zlfbxzpuzycispnq\":{\"principalId\":\"d1aa003b-c737-4b12-a942-0be50079520c\",\"clientId\":\"50e01253-185c-44cb-8229-769dae831700\"}}}}") + "{\"identity\":{\"type\":\"SystemAssigned,UserAssigned\",\"principalId\":\"caa9d8ca-92c8-4f66-b188-48914292cc44\",\"tenantId\":\"420a3778-cece-48a9-ae52-2b3b0110b7fb\",\"userAssignedIdentities\":{\"rbmpukgri\":{\"principalId\":\"0886716b-8c57-4db4-86ae-7b0da16ff090\",\"clientId\":\"cc8ef13f-ff65-4ed9-9a74-7232b6aef270\"},\"zlfbxzpuzycispnq\":{\"principalId\":\"ab60c78b-5aac-4c75-aa3d-0bb0c8d5b7e1\",\"clientId\":\"f62bf010-0931-4aeb-9d9c-9f2f1c3cdf69\"}}}}") .toObject(ServiceManagedIdentity.class); Assertions.assertEquals(ServiceManagedIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/UserAssignedIdentityTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/UserAssignedIdentityTests.java index a03d6c0447cac..f4b16a75967a2 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/UserAssignedIdentityTests.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/UserAssignedIdentityTests.java @@ -11,7 +11,7 @@ public final class UserAssignedIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UserAssignedIdentity model = BinaryData.fromString( - "{\"principalId\":\"eccc36fe-cfec-45eb-a883-3c82b0c53f4f\",\"clientId\":\"e38780f3-f248-48d6-8a18-bcd03a399a77\"}") + "{\"principalId\":\"818ba509-5286-415a-a478-5d311bbb6ef9\",\"clientId\":\"cf60b310-61d2-43e9-98d9-2a9f7d9bdfaa\"}") .toObject(UserAssignedIdentity.class); }