From a38a4d0c7e899c44330a04e74a0b7296ffff6f38 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 8 Apr 2024 07:14:41 +0000 Subject: [PATCH] CodeGen from PR 3265 in test-repo-billy/azure-rest-api-specs Merge 4af7c0ca9d212d86b98eeb1e0c061ad711223281 into eb5d86ef25799428905881b2a0b2b3656430d734 --- .../CHANGELOG.md | 4 +- .../README.md | 4 +- .../SAMPLE.md | 473 +++++++++++------- .../pom.xml | 5 +- .../healthcareapis/HealthcareApisManager.java | 4 +- .../healthcareapis/fluent/ServicesClient.java | 62 --- .../fluent/models/DicomServiceInner.java | 24 + .../fluent/models/DicomServiceProperties.java | 30 ++ .../implementation/DicomServiceImpl.java | 16 +- .../implementation/DicomServicesImpl.java | 28 +- .../implementation/FhirDestinationsImpl.java | 4 +- .../implementation/FhirServiceImpl.java | 6 +- .../implementation/FhirServicesImpl.java | 28 +- .../HealthcareApisManagementClientImpl.java | 2 +- .../IotConnectorFhirDestinationsImpl.java | 32 +- .../implementation/IotConnectorImpl.java | 6 +- .../implementation/IotConnectorsImpl.java | 28 +- .../IotFhirDestinationImpl.java | 8 +- .../implementation/OperationsImpl.java | 4 +- ...vateEndpointConnectionDescriptionImpl.java | 7 +- .../PrivateEndpointConnectionsImpl.java | 34 +- .../{Utils.java => ResourceManagerUtils.java} | 4 +- .../implementation/ServicesClientImpl.java | 246 --------- .../ServicesDescriptionImpl.java | 141 +----- .../implementation/ServicesImpl.java | 91 +--- .../implementation/WorkspaceImpl.java | 4 +- ...rkspacePrivateEndpointConnectionsImpl.java | 6 +- .../WorkspacePrivateLinkResourcesImpl.java | 6 +- .../implementation/WorkspacesImpl.java | 24 +- .../healthcareapis/models/DicomService.java | 22 +- ...hirServiceAuthenticationConfiguration.java | 33 ++ .../healthcareapis/models/Services.java | 81 ++- .../models/ServicesDescription.java | 239 --------- .../models/SmartDataActions.java | 48 ++ .../SmartIdentityProviderApplication.java | 112 +++++ .../SmartIdentityProviderConfiguration.java | 84 ++++ .../models/StorageConfiguration.java | 80 +++ .../src/main/java/module-info.java | 2 - .../reflect-config.json | 20 + .../DicomServicesCreateOrUpdateSamples.java | 7 +- .../generated/DicomServicesDeleteSamples.java | 2 +- .../generated/DicomServicesGetSamples.java | 2 +- .../DicomServicesListByWorkspaceSamples.java | 2 +- .../generated/DicomServicesUpdateSamples.java | 2 +- ...DestinationsListByIotConnectorSamples.java | 2 +- .../FhirServicesCreateOrUpdateSamples.java | 22 +- .../generated/FhirServicesDeleteSamples.java | 2 +- .../generated/FhirServicesGetSamples.java | 2 +- .../FhirServicesListByWorkspaceSamples.java | 2 +- .../generated/FhirServicesUpdateSamples.java | 2 +- ...rFhirDestinationCreateOrUpdateSamples.java | 2 +- ...ConnectorFhirDestinationDeleteSamples.java | 2 +- ...IotConnectorFhirDestinationGetSamples.java | 2 +- .../IotConnectorsCreateOrUpdateSamples.java | 2 +- .../generated/IotConnectorsDeleteSamples.java | 2 +- .../generated/IotConnectorsGetSamples.java | 2 +- .../IotConnectorsListByWorkspaceSamples.java | 2 +- .../generated/IotConnectorsUpdateSamples.java | 2 +- .../generated/OperationResultsGetSamples.java | 2 +- .../generated/OperationsListSamples.java | 2 +- ...pointConnectionsCreateOrUpdateSamples.java | 2 +- ...ivateEndpointConnectionsDeleteSamples.java | 2 +- .../PrivateEndpointConnectionsGetSamples.java | 2 +- ...dpointConnectionsListByServiceSamples.java | 2 +- .../PrivateLinkResourcesGetSamples.java | 2 +- ...vateLinkResourcesListByServiceSamples.java | 2 +- .../ServicesCheckNameAvailabilitySamples.java | 2 +- .../ServicesCreateOrUpdateSamples.java | 128 ----- .../generated/ServicesDeleteSamples.java | 2 +- .../ServicesGetByResourceGroupSamples.java | 4 +- .../ServicesListByResourceGroupSamples.java | 2 +- .../generated/ServicesListSamples.java | 2 +- .../generated/ServicesUpdateSamples.java | 10 +- ...pointConnectionsCreateOrUpdateSamples.java | 2 +- ...ivateEndpointConnectionsDeleteSamples.java | 2 +- ...ePrivateEndpointConnectionsGetSamples.java | 2 +- ...ointConnectionsListByWorkspaceSamples.java | 2 +- ...rkspacePrivateLinkResourcesGetSamples.java | 2 +- ...teLinkResourcesListByWorkspaceSamples.java | 2 +- .../WorkspacesCreateOrUpdateSamples.java | 2 +- .../generated/WorkspacesDeleteSamples.java | 2 +- .../WorkspacesGetByResourceGroupSamples.java | 2 +- .../WorkspacesListByResourceGroupSamples.java | 2 +- .../generated/WorkspacesListSamples.java | 2 +- .../generated/WorkspacesUpdateSamples.java | 2 +- .../CheckNameAvailabilityParametersTests.java | 29 -- ...rviceAuthenticationConfigurationTests.java | 23 - .../DicomServicePatchResourceTests.java | 49 -- .../DicomServicesDeleteMockTests.java | 51 -- ...stinationsListByIotConnectorMockTests.java | 62 --- .../FhirServiceAcrConfigurationTests.java | 43 -- ...rviceAuthenticationConfigurationTests.java | 31 -- .../FhirServiceExportConfigurationTests.java | 26 - .../FhirServiceImportConfigurationTests.java | 31 -- .../FhirServicePatchResourceTests.java | 48 -- .../FhirServicesDeleteMockTests.java | 51 -- ...mplementationGuidesConfigurationTests.java | 25 - .../IotConnectorCollectionTests.java | 108 ---- ...irDestinationsCreateOrUpdateMockTests.java | 64 --- ...nectorFhirDestinationsDeleteMockTests.java | 52 -- ...rDestinationsGetWithResponseMockTests.java | 61 --- .../generated/IotConnectorInnerTests.java | 68 --- .../IotConnectorPatchResourceTests.java | 50 -- .../IotConnectorPropertiesTests.java | 36 -- .../IotConnectorsCreateOrUpdateMockTests.java | 90 ---- .../IotConnectorsDeleteMockTests.java | 51 -- ...IotConnectorsGetWithResponseMockTests.java | 63 --- ...IotConnectorsListByWorkspaceMockTests.java | 66 --- .../IotDestinationPropertiesTests.java | 22 - ...ubIngestionEndpointConfigurationTests.java | 31 -- .../IotFhirDestinationCollectionTests.java | 52 -- .../IotFhirDestinationInnerTests.java | 36 -- .../IotFhirDestinationPropertiesTests.java | 33 -- .../generated/IotMappingPropertiesTests.java | 22 - .../generated/ListOperationsTests.java | 26 - .../generated/LocationBasedResourceTests.java | 28 -- .../generated/LogSpecificationTests.java | 31 -- .../generated/MetricDimensionTests.java | 32 -- .../generated/MetricSpecificationTests.java | 74 --- .../generated/OperationDetailInnerTests.java | 116 ----- .../generated/OperationDisplayTests.java | 23 - .../generated/OperationPropertiesTests.java | 163 ------ ...OperationResultsDescriptionInnerTests.java | 23 - ...rationResultsGetWithResponseMockTests.java | 54 -- .../generated/OperationsListMockTests.java | 91 ---- ...dpointConnectionDescriptionInnerTests.java | 38 -- ...tConnectionListResultDescriptionTests.java | 48 -- ...vateEndpointConnectionPropertiesTests.java | 38 -- .../PrivateEndpointConnectionTests.java | 38 -- ...intConnectionsCreateOrUpdateMockTests.java | 66 --- ...ateEndpointConnectionsDeleteMockTests.java | 52 -- ...ntConnectionsGetWithResponseMockTests.java | 60 --- ...ointConnectionsListByServiceMockTests.java | 62 --- .../generated/PrivateEndpointTests.java | 21 - ...vateLinkResourceDescriptionInnerTests.java | 28 -- ...sourceListResultDescriptionInnerTests.java | 33 -- .../PrivateLinkResourcePropertiesTests.java | 29 -- .../generated/PrivateLinkResourceTests.java | 28 -- ...LinkResourcesGetWithResponseMockTests.java | 56 --- ...cesListByServiceWithResponseMockTests.java | 56 --- ...rivateLinkServiceConnectionStateTests.java | 33 -- .../generated/ResourceCoreTests.java | 26 - .../generated/ResourceTagsTests.java | 39 -- ...sourceVersionPolicyConfigurationTests.java | 45 -- .../ServiceAccessPolicyEntryTests.java | 25 - .../ServiceAcrConfigurationInfoTests.java | 40 -- ...eAuthenticationConfigurationInfoTests.java | 31 -- .../ServiceExportConfigurationInfoTests.java | 25 - .../ServiceImportConfigurationInfoTests.java | 31 -- .../ServiceManagedIdentityIdentityTests.java | 45 -- .../ServiceManagedIdentityTests.java | 45 -- .../ServiceOciArtifactEntryTests.java | 31 -- .../generated/ServiceSpecificationTests.java | 120 ----- ...NameAvailabilityWithResponseMockTests.java | 59 --- ...ervicesNameAvailabilityInfoInnerTests.java | 27 - .../ServicesPatchDescriptionTests.java | 45 -- ...rvicesPropertiesUpdateParametersTests.java | 27 - .../ServicesResourceIdentityTests.java | 27 - .../generated/ServicesResourceTests.java | 53 -- .../generated/TaggedResourceTests.java | 45 -- .../generated/UserAssignedIdentityTests.java | 23 - .../generated/WorkspaceInnerTests.java | 51 -- .../generated/WorkspaceListTests.java | 55 -- .../WorkspacePatchResourceTests.java | 41 -- ...intConnectionsCreateOrUpdateMockTests.java | 68 --- ...ateEndpointConnectionsDeleteMockTests.java | 52 -- ...ntConnectionsGetWithResponseMockTests.java | 60 --- ...ntConnectionsListByWorkspaceMockTests.java | 62 --- ...LinkResourcesGetWithResponseMockTests.java | 56 --- ...LinkResourcesListByWorkspaceMockTests.java | 57 --- .../generated/WorkspacePropertiesTests.java | 27 - .../WorkspacesCreateOrUpdateMockTests.java | 77 --- .../generated/WorkspacesDeleteMockTests.java | 51 -- ...tByResourceGroupWithResponseMockTests.java | 60 --- ...orkspacesListByResourceGroupMockTests.java | 62 --- .../generated/WorkspacesListMockTests.java | 61 --- 176 files changed, 1027 insertions(+), 5648 deletions(-) rename sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/{Utils.java => ResourceManagerUtils.java} (99%) create mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/SmartDataActions.java create mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/SmartIdentityProviderApplication.java create mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/SmartIdentityProviderConfiguration.java create mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/StorageConfiguration.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/ServicesCreateOrUpdateSamples.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/CheckNameAvailabilityParametersTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/DicomServiceAuthenticationConfigurationTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/DicomServicePatchResourceTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/DicomServicesDeleteMockTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/FhirDestinationsListByIotConnectorMockTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/FhirServiceAcrConfigurationTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/FhirServiceAuthenticationConfigurationTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/FhirServiceExportConfigurationTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/FhirServiceImportConfigurationTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/FhirServicePatchResourceTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/FhirServicesDeleteMockTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ImplementationGuidesConfigurationTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorCollectionTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorFhirDestinationsCreateOrUpdateMockTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorFhirDestinationsDeleteMockTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorFhirDestinationsGetWithResponseMockTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorInnerTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorPatchResourceTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorPropertiesTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorsCreateOrUpdateMockTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorsDeleteMockTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorsGetWithResponseMockTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorsListByWorkspaceMockTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotDestinationPropertiesTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotEventHubIngestionEndpointConfigurationTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotFhirDestinationCollectionTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotFhirDestinationInnerTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotFhirDestinationPropertiesTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotMappingPropertiesTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ListOperationsTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/LocationBasedResourceTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/LogSpecificationTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/MetricDimensionTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/MetricSpecificationTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/OperationDetailInnerTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/OperationDisplayTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/OperationPropertiesTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/OperationResultsDescriptionInnerTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/OperationResultsGetWithResponseMockTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/OperationsListMockTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateEndpointConnectionDescriptionInnerTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateEndpointConnectionListResultDescriptionTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateEndpointConnectionPropertiesTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateEndpointConnectionTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateEndpointConnectionsCreateOrUpdateMockTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateEndpointConnectionsDeleteMockTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateEndpointConnectionsListByServiceMockTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateEndpointTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateLinkResourceDescriptionInnerTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateLinkResourceListResultDescriptionInnerTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateLinkResourcePropertiesTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateLinkResourceTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateLinkResourcesGetWithResponseMockTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateLinkResourcesListByServiceWithResponseMockTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateLinkServiceConnectionStateTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ResourceCoreTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ResourceTagsTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ResourceVersionPolicyConfigurationTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServiceAccessPolicyEntryTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServiceAcrConfigurationInfoTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServiceAuthenticationConfigurationInfoTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServiceExportConfigurationInfoTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServiceImportConfigurationInfoTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServiceManagedIdentityIdentityTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServiceManagedIdentityTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServiceOciArtifactEntryTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServiceSpecificationTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServicesCheckNameAvailabilityWithResponseMockTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServicesNameAvailabilityInfoInnerTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServicesPatchDescriptionTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServicesPropertiesUpdateParametersTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServicesResourceIdentityTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServicesResourceTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/TaggedResourceTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/UserAssignedIdentityTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/WorkspaceInnerTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/WorkspaceListTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacePatchResourceTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacePrivateEndpointConnectionsCreateOrUpdateMockTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacePrivateEndpointConnectionsDeleteMockTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacePrivateEndpointConnectionsGetWithResponseMockTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacePrivateEndpointConnectionsListByWorkspaceMockTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacePrivateLinkResourcesGetWithResponseMockTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacePrivateLinkResourcesListByWorkspaceMockTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacePropertiesTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacesCreateOrUpdateMockTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacesDeleteMockTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacesGetByResourceGroupWithResponseMockTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacesListByResourceGroupMockTests.java delete mode 100644 sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacesListMockTests.java diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/CHANGELOG.md b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/CHANGELOG.md index efa9eb2e2340..630b7695fa97 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/CHANGELOG.md +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.1.0-beta.1 (Unreleased) +## 1.0.0-beta.1 (2024-04-08) + +- 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. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/README.md b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/README.md index e548040b4bea..869c8c7aab53 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/README.md +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/README.md @@ -2,7 +2,7 @@ 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-2023-11. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for HealthcareApis Management SDK. Azure Healthcare APIs Client. Package tag package-2024-03. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-healthcareapis - 1.0.0 + 1.1.0-beta.1 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/SAMPLE.md b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/SAMPLE.md index 1c7d11366ef2..bbcf77865ed2 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/SAMPLE.md +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/SAMPLE.md @@ -58,7 +58,6 @@ ## Services - [CheckNameAvailability](#services_checknameavailability) -- [CreateOrUpdate](#services_createorupdate) - [Delete](#services_delete) - [GetByResourceGroup](#services_getbyresourcegroup) - [List](#services_list) @@ -88,20 +87,29 @@ ### DicomServices_CreateOrUpdate ```java +import com.azure.resourcemanager.healthcareapis.models.StorageConfiguration; + /** * Samples for DicomServices CreateOrUpdate. */ public final class DicomServicesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/dicomservices/DicomServices_Create.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/dicomservices/ + * DicomServices_Create.json */ /** * Sample code: Create or update a Dicom Service. * * @param manager Entry point to HealthcareApisManager. */ - public static void createOrUpdateADicomService(com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) { - manager.dicomServices().define("blue").withExistingWorkspace("testRG", "workspace1").withRegion("westus").create(); + public static void + createOrUpdateADicomService(com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) { + manager.dicomServices().define("blue").withExistingWorkspace("testRG", "workspace1").withRegion("westus") + .withStorageConfiguration(new StorageConfiguration().withStorageResourceId( + "/subscriptions/ab309d4e-4c2e-4241-be2e-08e1c8dd4246/resourceGroups/rgname/providers/Microsoft.Storage/storageAccounts/accountname") + .withFileSystemName("fileSystemName")) + .create(); } } ``` @@ -114,7 +122,9 @@ public final class DicomServicesCreateOrUpdateSamples { */ public final class DicomServicesDeleteSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/dicomservices/DicomServices_Delete.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/dicomservices/ + * DicomServices_Delete.json */ /** * Sample code: Delete a dicomservice. @@ -135,7 +145,9 @@ public final class DicomServicesDeleteSamples { */ public final class DicomServicesGetSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/dicomservices/DicomServices_Get.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/dicomservices/ + * DicomServices_Get.json */ /** * Sample code: Get a dicomservice. @@ -156,7 +168,9 @@ public final class DicomServicesGetSamples { */ public final class DicomServicesListByWorkspaceSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/dicomservices/DicomServices_List.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/dicomservices/ + * DicomServices_List.json */ /** * Sample code: List dicomservices. @@ -181,7 +195,9 @@ import java.util.Map; */ public final class DicomServicesUpdateSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/dicomservices/DicomServices_Patch.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/dicomservices/ + * DicomServices_Patch.json */ /** * Sample code: Update a dicomservice. @@ -189,7 +205,8 @@ public final class DicomServicesUpdateSamples { * @param manager Entry point to HealthcareApisManager. */ public static void updateADicomservice(com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) { - DicomService resource = manager.dicomServices().getWithResponse("testRG", "workspace1", "blue", com.azure.core.util.Context.NONE).getValue(); + DicomService resource = manager.dicomServices() + .getWithResponse("testRG", "workspace1", "blue", com.azure.core.util.Context.NONE).getValue(); resource.update().withTags(mapOf("tagKey", "fakeTokenPlaceholder")).apply(); } @@ -215,7 +232,9 @@ public final class DicomServicesUpdateSamples { */ public final class FhirDestinationsListByIotConnectorSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/iotconnectors/iotconnector_fhirdestination_List.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/iotconnectors/ + * iotconnector_fhirdestination_List.json */ /** * Sample code: List IoT Connectors. @@ -242,26 +261,62 @@ import com.azure.resourcemanager.healthcareapis.models.FhirServiceKind; import com.azure.resourcemanager.healthcareapis.models.ImplementationGuidesConfiguration; import com.azure.resourcemanager.healthcareapis.models.ServiceManagedIdentityIdentity; import com.azure.resourcemanager.healthcareapis.models.ServiceManagedIdentityType; +import com.azure.resourcemanager.healthcareapis.models.SmartDataActions; +import com.azure.resourcemanager.healthcareapis.models.SmartIdentityProviderApplication; +import com.azure.resourcemanager.healthcareapis.models.SmartIdentityProviderConfiguration; import com.azure.resourcemanager.healthcareapis.models.UserAssignedIdentity; import java.util.Arrays; import java.util.HashMap; import java.util.Map; -import java.util.stream.Collectors; /** * Samples for FhirServices CreateOrUpdate. */ public final class FhirServicesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/fhirservices/FhirServices_Create.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/fhirservices/ + * FhirServices_Create.json */ /** * Sample code: Create or update a Fhir Service. * * @param manager Entry point to HealthcareApisManager. */ - public static void createOrUpdateAFhirService(com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) { - manager.fhirServices().define("fhirservice1").withExistingWorkspace("testRG", "workspace1").withRegion("westus").withTags(mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string")).withKind(FhirServiceKind.FHIR_R4).withIdentity(new ServiceManagedIdentityIdentity().withType(ServiceManagedIdentityType.USER_ASSIGNED).withUserAssignedIdentities(mapOf("/subscriptions/subid/resourcegroups/testRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-mi", new UserAssignedIdentity()))).withAcrConfiguration(new FhirServiceAcrConfiguration().withLoginServers(Arrays.asList("test1.azurecr.io"))).withAuthenticationConfiguration(new FhirServiceAuthenticationConfiguration().withAuthority("https://login.microsoftonline.com/abfde7b2-df0f-47e6-aabf-2462b07508dc").withAudience("https://azurehealthcareapis.com").withSmartProxyEnabled(true)).withCorsConfiguration(new FhirServiceCorsConfiguration().withOrigins(Arrays.asList("*")).withHeaders(Arrays.asList("*")).withMethods(Arrays.asList("DELETE", "GET", "OPTIONS", "PATCH", "POST", "PUT")).withMaxAge(1440).withAllowCredentials(false)).withExportConfiguration(new FhirServiceExportConfiguration().withStorageAccountName("existingStorageAccount")).withImportConfiguration(new FhirServiceImportConfiguration().withIntegrationDataStore("existingStorageAccount").withInitialImportMode(false).withEnabled(false)).withImplementationGuidesConfiguration(new ImplementationGuidesConfiguration().withUsCoreMissingData(false)).withEncryption(new Encryption().withCustomerManagedKeyEncryption(new EncryptionCustomerManagedKeyEncryption().withKeyEncryptionKeyUrl("fakeTokenPlaceholder"))).create(); + public static void + createOrUpdateAFhirService(com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) { + manager.fhirServices().define("fhirservice1").withExistingWorkspace("testRG", "workspace1").withRegion("westus") + .withTags(mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string")) + .withKind(FhirServiceKind.FHIR_R4) + .withIdentity(new ServiceManagedIdentityIdentity().withType(ServiceManagedIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf( + "/subscriptions/subid/resourcegroups/testRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-mi", + new UserAssignedIdentity()))) + .withAcrConfiguration(new FhirServiceAcrConfiguration() + .withLoginServers(Arrays.asList("test1.azurecr.io"))) + .withAuthenticationConfiguration( + new FhirServiceAuthenticationConfiguration() + .withAuthority("https://login.microsoftonline.com/abfde7b2-df0f-47e6-aabf-2462b07508dc") + .withAudience("https://azurehealthcareapis.com").withSmartProxyEnabled(true) + .withSmartIdentityProviders( + Arrays.asList(new SmartIdentityProviderConfiguration() + .withAuthority("https://login.b2clogin.com/11111111-1111-1111-1111-111111111111/v2.0") + .withApplications(Arrays.asList(new SmartIdentityProviderApplication() + .withClientId("22222222-2222-2222-2222-222222222222") + .withAudience("22222222-2222-2222-2222-222222222222") + .withAllowedDataActions(Arrays.asList(SmartDataActions.READ))))))) + .withCorsConfiguration( + new FhirServiceCorsConfiguration().withOrigins(Arrays.asList("*")).withHeaders(Arrays.asList("*")) + .withMethods(Arrays.asList("DELETE", "GET", "OPTIONS", "PATCH", "POST", "PUT")).withMaxAge(1440) + .withAllowCredentials(false)) + .withExportConfiguration( + new FhirServiceExportConfiguration().withStorageAccountName("existingStorageAccount")) + .withImportConfiguration(new FhirServiceImportConfiguration() + .withIntegrationDataStore("existingStorageAccount").withInitialImportMode(false).withEnabled(false)) + .withImplementationGuidesConfiguration(new ImplementationGuidesConfiguration().withUsCoreMissingData(false)) + .withEncryption(new Encryption().withCustomerManagedKeyEncryption( + new EncryptionCustomerManagedKeyEncryption().withKeyEncryptionKeyUrl("fakeTokenPlaceholder"))) + .create(); } // Use "Map.of" if available @@ -286,7 +341,9 @@ public final class FhirServicesCreateOrUpdateSamples { */ public final class FhirServicesDeleteSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/fhirservices/FhirServices_Delete.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/fhirservices/ + * FhirServices_Delete.json */ /** * Sample code: Delete a Fhir Service. @@ -307,7 +364,9 @@ public final class FhirServicesDeleteSamples { */ public final class FhirServicesGetSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/fhirservices/FhirServices_Get.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/fhirservices/ + * FhirServices_Get.json */ /** * Sample code: Get a Fhir Service. @@ -315,7 +374,8 @@ public final class FhirServicesGetSamples { * @param manager Entry point to HealthcareApisManager. */ public static void getAFhirService(com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) { - manager.fhirServices().getWithResponse("testRG", "workspace1", "fhirservices1", com.azure.core.util.Context.NONE); + manager.fhirServices().getWithResponse("testRG", "workspace1", "fhirservices1", + com.azure.core.util.Context.NONE); } } ``` @@ -328,7 +388,9 @@ public final class FhirServicesGetSamples { */ public final class FhirServicesListByWorkspaceSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/fhirservices/FhirServices_List.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/fhirservices/ + * FhirServices_List.json */ /** * Sample code: List fhirservices. @@ -353,7 +415,9 @@ import java.util.Map; */ public final class FhirServicesUpdateSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/fhirservices/FhirServices_Patch.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/fhirservices/ + * FhirServices_Patch.json */ /** * Sample code: Update a Fhir Service. @@ -361,7 +425,8 @@ public final class FhirServicesUpdateSamples { * @param manager Entry point to HealthcareApisManager. */ public static void updateAFhirService(com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) { - FhirService resource = manager.fhirServices().getWithResponse("testRG", "workspace1", "fhirservice1", com.azure.core.util.Context.NONE).getValue(); + FhirService resource = manager.fhirServices() + .getWithResponse("testRG", "workspace1", "fhirservice1", com.azure.core.util.Context.NONE).getValue(); resource.update().withTags(mapOf("tagKey", "fakeTokenPlaceholder")).apply(); } @@ -387,22 +452,32 @@ import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.healthcareapis.models.IotIdentityResolutionType; import com.azure.resourcemanager.healthcareapis.models.IotMappingProperties; import java.io.IOException; -import java.util.stream.Collectors; /** * Samples for IotConnectorFhirDestination CreateOrUpdate. */ public final class IotConnectorFhirDestinationCreateOrUpdateSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/iotconnectors/iotconnector_fhirdestination_Create.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/iotconnectors/ + * iotconnector_fhirdestination_Create.json */ /** * Sample code: Create or update an Iot Connector FHIR destination. * * @param manager Entry point to HealthcareApisManager. */ - public static void createOrUpdateAnIotConnectorFHIRDestination(com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) throws IOException { - manager.iotConnectorFhirDestinations().define("dest1").withExistingIotconnector("testRG", "workspace1", "blue").withResourceIdentityResolutionType(IotIdentityResolutionType.CREATE).withFhirServiceResourceId("subscriptions/11111111-2222-3333-4444-555566667777/resourceGroups/myrg/providers/Microsoft.HealthcareApis/workspaces/myworkspace/fhirservices/myfhirservice").withFhirMapping(new IotMappingProperties().withContent(SerializerFactory.createDefaultManagementSerializerAdapter().deserialize("{\"template\":[{\"template\":{\"codes\":[{\"code\":\"8867-4\",\"display\":\"Heart rate\",\"system\":\"http://loinc.org\"}],\"periodInterval\":60,\"typeName\":\"heartrate\",\"value\":{\"defaultPeriod\":5000,\"unit\":\"count/min\",\"valueName\":\"hr\",\"valueType\":\"SampledData\"}},\"templateType\":\"CodeValueFhir\"}],\"templateType\":\"CollectionFhirTemplate\"}", Object.class, SerializerEncoding.JSON))).withRegion("westus").create(); + public static void createOrUpdateAnIotConnectorFHIRDestination( + com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) throws IOException { + manager.iotConnectorFhirDestinations().define("dest1").withExistingIotconnector("testRG", "workspace1", "blue") + .withResourceIdentityResolutionType(IotIdentityResolutionType.CREATE) + .withFhirServiceResourceId( + "subscriptions/11111111-2222-3333-4444-555566667777/resourceGroups/myrg/providers/Microsoft.HealthcareApis/workspaces/myworkspace/fhirservices/myfhirservice") + .withFhirMapping(new IotMappingProperties() + .withContent(SerializerFactory.createDefaultManagementSerializerAdapter().deserialize( + "{\"template\":[{\"template\":{\"codes\":[{\"code\":\"8867-4\",\"display\":\"Heart rate\",\"system\":\"http://loinc.org\"}],\"periodInterval\":60,\"typeName\":\"heartrate\",\"value\":{\"defaultPeriod\":5000,\"unit\":\"count/min\",\"valueName\":\"hr\",\"valueType\":\"SampledData\"}},\"templateType\":\"CodeValueFhir\"}],\"templateType\":\"CollectionFhirTemplate\"}", + Object.class, SerializerEncoding.JSON))) + .withRegion("westus").create(); } } ``` @@ -415,15 +490,19 @@ public final class IotConnectorFhirDestinationCreateOrUpdateSamples { */ public final class IotConnectorFhirDestinationDeleteSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/iotconnectors/iotconnector_fhirdestination_Delete.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/iotconnectors/ + * iotconnector_fhirdestination_Delete.json */ /** * Sample code: Delete an IoT Connector destination. * * @param manager Entry point to HealthcareApisManager. */ - public static void deleteAnIoTConnectorDestination(com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) { - manager.iotConnectorFhirDestinations().delete("testRG", "workspace1", "blue", "dest1", com.azure.core.util.Context.NONE); + public static void + deleteAnIoTConnectorDestination(com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) { + manager.iotConnectorFhirDestinations().delete("testRG", "workspace1", "blue", "dest1", + com.azure.core.util.Context.NONE); } } ``` @@ -436,15 +515,19 @@ public final class IotConnectorFhirDestinationDeleteSamples { */ public final class IotConnectorFhirDestinationGetSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/iotconnectors/iotconnector_fhirdestination_Get.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/iotconnectors/ + * iotconnector_fhirdestination_Get.json */ /** * Sample code: Get an IoT Connector destination. * * @param manager Entry point to HealthcareApisManager. */ - public static void getAnIoTConnectorDestination(com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) { - manager.iotConnectorFhirDestinations().getWithResponse("testRG", "workspace1", "blue", "dest1", com.azure.core.util.Context.NONE); + public static void + getAnIoTConnectorDestination(com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) { + manager.iotConnectorFhirDestinations().getWithResponse("testRG", "workspace1", "blue", "dest1", + com.azure.core.util.Context.NONE); } } ``` @@ -461,22 +544,34 @@ import com.azure.resourcemanager.healthcareapis.models.ServiceManagedIdentityTyp import java.io.IOException; import java.util.HashMap; import java.util.Map; -import java.util.stream.Collectors; /** * Samples for IotConnectors CreateOrUpdate. */ public final class IotConnectorsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/iotconnectors/iotconnector_Create.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/iotconnectors/ + * iotconnector_Create.json */ /** * Sample code: Create an IoT Connector. * * @param manager Entry point to HealthcareApisManager. */ - public static void createAnIoTConnector(com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) throws IOException { - manager.iotConnectors().define("blue").withExistingWorkspace("testRG", "workspace1").withRegion("westus").withTags(mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string")).withIdentity(new ServiceManagedIdentityIdentity().withType(ServiceManagedIdentityType.SYSTEM_ASSIGNED)).withIngestionEndpointConfiguration(new IotEventHubIngestionEndpointConfiguration().withEventHubName("MyEventHubName").withConsumerGroup("ConsumerGroupA").withFullyQualifiedEventHubNamespace("myeventhub.servicesbus.windows.net")).withDeviceMapping(new IotMappingProperties().withContent(SerializerFactory.createDefaultManagementSerializerAdapter().deserialize("{\"template\":[{\"template\":{\"deviceIdExpression\":\"$.deviceid\",\"timestampExpression\":\"$.measurementdatetime\",\"typeMatchExpression\":\"$..[?(@heartrate)]\",\"typeName\":\"heartrate\",\"values\":[{\"required\":\"true\",\"valueExpression\":\"$.heartrate\",\"valueName\":\"hr\"}]},\"templateType\":\"JsonPathContent\"}],\"templateType\":\"CollectionContent\"}", Object.class, SerializerEncoding.JSON))).create(); + public static void createAnIoTConnector(com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) + throws IOException { + manager.iotConnectors().define("blue").withExistingWorkspace("testRG", "workspace1").withRegion("westus") + .withTags(mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string")) + .withIdentity(new ServiceManagedIdentityIdentity().withType(ServiceManagedIdentityType.SYSTEM_ASSIGNED)) + .withIngestionEndpointConfiguration(new IotEventHubIngestionEndpointConfiguration() + .withEventHubName("MyEventHubName").withConsumerGroup("ConsumerGroupA") + .withFullyQualifiedEventHubNamespace("myeventhub.servicesbus.windows.net")) + .withDeviceMapping(new IotMappingProperties() + .withContent(SerializerFactory.createDefaultManagementSerializerAdapter().deserialize( + "{\"template\":[{\"template\":{\"deviceIdExpression\":\"$.deviceid\",\"timestampExpression\":\"$.measurementdatetime\",\"typeMatchExpression\":\"$..[?(@heartrate)]\",\"typeName\":\"heartrate\",\"values\":[{\"required\":\"true\",\"valueExpression\":\"$.heartrate\",\"valueName\":\"hr\"}]},\"templateType\":\"JsonPathContent\"}],\"templateType\":\"CollectionContent\"}", + Object.class, SerializerEncoding.JSON))) + .create(); } // Use "Map.of" if available @@ -501,7 +596,9 @@ public final class IotConnectorsCreateOrUpdateSamples { */ public final class IotConnectorsDeleteSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/iotconnectors/iotconnector_Delete.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/iotconnectors/ + * iotconnector_Delete.json */ /** * Sample code: Delete an IoT Connector. @@ -522,7 +619,9 @@ public final class IotConnectorsDeleteSamples { */ public final class IotConnectorsGetSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/iotconnectors/iotconnector_Get.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/iotconnectors/ + * iotconnector_Get.json */ /** * Sample code: Get an IoT Connector. @@ -543,7 +642,9 @@ public final class IotConnectorsGetSamples { */ public final class IotConnectorsListByWorkspaceSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/iotconnectors/iotconnector_List.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/iotconnectors/ + * iotconnector_List.json */ /** * Sample code: List iotconnectors. @@ -564,14 +665,15 @@ import com.azure.resourcemanager.healthcareapis.models.ServiceManagedIdentityIde import com.azure.resourcemanager.healthcareapis.models.ServiceManagedIdentityType; import java.util.HashMap; import java.util.Map; -import java.util.stream.Collectors; /** * Samples for IotConnectors Update. */ public final class IotConnectorsUpdateSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/iotconnectors/iotconnector_Patch.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/iotconnectors/ + * iotconnector_Patch.json */ /** * Sample code: Patch an IoT Connector. @@ -579,8 +681,12 @@ public final class IotConnectorsUpdateSamples { * @param manager Entry point to HealthcareApisManager. */ public static void patchAnIoTConnector(com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) { - IotConnector resource = manager.iotConnectors().getWithResponse("testRG", "workspace1", "blue", com.azure.core.util.Context.NONE).getValue(); - resource.update().withTags(mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string")).withIdentity(new ServiceManagedIdentityIdentity().withType(ServiceManagedIdentityType.SYSTEM_ASSIGNED)).apply(); + IotConnector resource = manager.iotConnectors() + .getWithResponse("testRG", "workspace1", "blue", com.azure.core.util.Context.NONE).getValue(); + resource.update() + .withTags(mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string")) + .withIdentity(new ServiceManagedIdentityIdentity().withType(ServiceManagedIdentityType.SYSTEM_ASSIGNED)) + .apply(); } // Use "Map.of" if available @@ -605,7 +711,9 @@ public final class IotConnectorsUpdateSamples { */ public final class OperationResultsGetSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/OperationResultsGet.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/ + * OperationResultsGet.json */ /** * Sample code: Get operation result. @@ -626,7 +734,9 @@ public final class OperationResultsGetSamples { */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/OperationsList.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/OperationsList. + * json */ /** * Sample code: List operations. @@ -644,22 +754,27 @@ public final class OperationsListSamples { ```java import com.azure.resourcemanager.healthcareapis.models.PrivateEndpointServiceConnectionStatus; import com.azure.resourcemanager.healthcareapis.models.PrivateLinkServiceConnectionState; -import java.util.stream.Collectors; /** * Samples for PrivateEndpointConnections CreateOrUpdate. */ public final class PrivateEndpointConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/legacy/ServiceCreatePrivateEndpointConnection.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/legacy/ + * ServiceCreatePrivateEndpointConnection.json */ /** * Sample code: PrivateEndpointConnection_CreateOrUpdate. * * @param manager Entry point to HealthcareApisManager. */ - public static void privateEndpointConnectionCreateOrUpdate(com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) { - manager.privateEndpointConnections().define("myConnection").withExistingService("rgname", "service1").withPrivateLinkServiceConnectionState(new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.APPROVED).withDescription("Auto-Approved")).create(); + public static void privateEndpointConnectionCreateOrUpdate( + com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) { + manager.privateEndpointConnections().define("myConnection").withExistingService("rgname", "service1") + .withPrivateLinkServiceConnectionState(new PrivateLinkServiceConnectionState() + .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED).withDescription("Auto-Approved")) + .create(); } } ``` @@ -672,15 +787,19 @@ public final class PrivateEndpointConnectionsCreateOrUpdateSamples { */ public final class PrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/legacy/ServiceDeletePrivateEndpointConnection.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/legacy/ + * ServiceDeletePrivateEndpointConnection.json */ /** * Sample code: PrivateEndpointConnections_Delete. * * @param manager Entry point to HealthcareApisManager. */ - public static void privateEndpointConnectionsDelete(com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) { - manager.privateEndpointConnections().delete("rgname", "service1", "myConnection", com.azure.core.util.Context.NONE); + public static void + privateEndpointConnectionsDelete(com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) { + manager.privateEndpointConnections().delete("rgname", "service1", "myConnection", + com.azure.core.util.Context.NONE); } } ``` @@ -693,15 +812,19 @@ public final class PrivateEndpointConnectionsDeleteSamples { */ public final class PrivateEndpointConnectionsGetSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/legacy/ServiceGetPrivateEndpointConnection.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/legacy/ + * ServiceGetPrivateEndpointConnection.json */ /** * Sample code: PrivateEndpointConnection_GetConnection. * * @param manager Entry point to HealthcareApisManager. */ - public static void privateEndpointConnectionGetConnection(com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) { - manager.privateEndpointConnections().getWithResponse("rgname", "service1", "myConnection", com.azure.core.util.Context.NONE); + public static void + privateEndpointConnectionGetConnection(com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) { + manager.privateEndpointConnections().getWithResponse("rgname", "service1", "myConnection", + com.azure.core.util.Context.NONE); } } ``` @@ -714,14 +837,17 @@ public final class PrivateEndpointConnectionsGetSamples { */ public final class PrivateEndpointConnectionsListByServiceSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/legacy/ServiceListPrivateEndpointConnections.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/legacy/ + * ServiceListPrivateEndpointConnections.json */ /** * Sample code: PrivateEndpointConnection_List. * * @param manager Entry point to HealthcareApisManager. */ - public static void privateEndpointConnectionList(com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) { + public static void + privateEndpointConnectionList(com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) { manager.privateEndpointConnections().listByService("rgname", "service1", com.azure.core.util.Context.NONE); } } @@ -735,7 +861,9 @@ public final class PrivateEndpointConnectionsListByServiceSamples { */ public final class PrivateLinkResourcesGetSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/legacy/PrivateLinkResourceGet.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/legacy/ + * PrivateLinkResourceGet.json */ /** * Sample code: PrivateLinkResources_Get. @@ -756,15 +884,19 @@ public final class PrivateLinkResourcesGetSamples { */ public final class PrivateLinkResourcesListByServiceSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/legacy/PrivateLinkResourcesListByService.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/legacy/ + * PrivateLinkResourcesListByService.json */ /** * Sample code: PrivateLinkResources_ListGroupIds. * * @param manager Entry point to HealthcareApisManager. */ - public static void privateLinkResourcesListGroupIds(com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) { - manager.privateLinkResources().listByServiceWithResponse("rgname", "service1", com.azure.core.util.Context.NONE); + public static void + privateLinkResourcesListGroupIds(com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) { + manager.privateLinkResources().listByServiceWithResponse("rgname", "service1", + com.azure.core.util.Context.NONE); } } ``` @@ -779,7 +911,9 @@ import com.azure.resourcemanager.healthcareapis.models.CheckNameAvailabilityPara */ public final class ServicesCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/CheckNameAvailabilityPost.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/ + * CheckNameAvailabilityPost.json */ /** * Sample code: Check name availability. @@ -787,79 +921,9 @@ public final class ServicesCheckNameAvailabilitySamples { * @param manager Entry point to HealthcareApisManager. */ public static void checkNameAvailability(com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) { - manager.services().checkNameAvailabilityWithResponse(new CheckNameAvailabilityParameters().withName("serviceName").withType("Microsoft.HealthcareApis/services"), com.azure.core.util.Context.NONE); - } -} -``` - -### Services_CreateOrUpdate - -```java -import com.azure.resourcemanager.healthcareapis.models.Kind; -import com.azure.resourcemanager.healthcareapis.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.healthcareapis.models.PublicNetworkAccess; -import com.azure.resourcemanager.healthcareapis.models.ServiceAccessPolicyEntry; -import com.azure.resourcemanager.healthcareapis.models.ServiceAuthenticationConfigurationInfo; -import com.azure.resourcemanager.healthcareapis.models.ServiceCorsConfigurationInfo; -import com.azure.resourcemanager.healthcareapis.models.ServiceCosmosDbConfigurationInfo; -import com.azure.resourcemanager.healthcareapis.models.ServiceExportConfigurationInfo; -import com.azure.resourcemanager.healthcareapis.models.ServicesProperties; -import com.azure.resourcemanager.healthcareapis.models.ServicesResourceIdentity; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import java.util.stream.Collectors; - -/** - * Samples for Services CreateOrUpdate. - */ -public final class ServicesCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/legacy/ServiceCreate.json - */ - /** - * Sample code: Create or Update a service with all parameters. - * - * @param manager Entry point to HealthcareApisManager. - */ - public static void createOrUpdateAServiceWithAllParameters(com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) { - manager.services().define("service1").withRegion("westus2").withExistingResourceGroup("rg1").withKind(Kind.FHIR_R4).withTags(mapOf()).withIdentity(new ServicesResourceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED)).withProperties(new ServicesProperties().withAccessPolicies(Arrays.asList(new ServiceAccessPolicyEntry().withObjectId("c487e7d1-3210-41a3-8ccc-e9372b78da47"), new ServiceAccessPolicyEntry().withObjectId("5b307da8-43d4-492b-8b66-b0294ade872f"))).withCosmosDbConfiguration(new ServiceCosmosDbConfigurationInfo().withOfferThroughput(1000).withKeyVaultKeyUri("fakeTokenPlaceholder")).withAuthenticationConfiguration(new ServiceAuthenticationConfigurationInfo().withAuthority("https://login.microsoftonline.com/abfde7b2-df0f-47e6-aabf-2462b07508dc").withAudience("https://azurehealthcareapis.com").withSmartProxyEnabled(true)).withCorsConfiguration(new ServiceCorsConfigurationInfo().withOrigins(Arrays.asList("*")).withHeaders(Arrays.asList("*")).withMethods(Arrays.asList("DELETE", "GET", "OPTIONS", "PATCH", "POST", "PUT")).withMaxAge(1440).withAllowCredentials(false)).withExportConfiguration(new ServiceExportConfigurationInfo().withStorageAccountName("existingStorageAccount")).withPrivateEndpointConnections(Arrays.asList()).withPublicNetworkAccess(PublicNetworkAccess.DISABLED)).create(); - } - - /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/legacy/ServiceCreateInDataSovereignRegionWithCmkEnabled.json - */ - /** - * Sample code: Create or Update a service with all parameters and CMK enabled in a data sovereign region. - * - * @param manager Entry point to HealthcareApisManager. - */ - public static void createOrUpdateAServiceWithAllParametersAndCMKEnabledInADataSovereignRegion(com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) { - manager.services().define("service1").withRegion("Southeast Asia").withExistingResourceGroup("rg1").withKind(Kind.FHIR_R4).withTags(mapOf()).withIdentity(new ServicesResourceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED)).withProperties(new ServicesProperties().withAccessPolicies(Arrays.asList(new ServiceAccessPolicyEntry().withObjectId("c487e7d1-3210-41a3-8ccc-e9372b78da47"), new ServiceAccessPolicyEntry().withObjectId("5b307da8-43d4-492b-8b66-b0294ade872f"))).withCosmosDbConfiguration(new ServiceCosmosDbConfigurationInfo().withOfferThroughput(1000).withKeyVaultKeyUri("fakeTokenPlaceholder").withCrossTenantCmkApplicationId("de3fbeef-8c3a-428e-8b9f-4d229c8a85f4")).withAuthenticationConfiguration(new ServiceAuthenticationConfigurationInfo().withAuthority("https://login.microsoftonline.com/abfde7b2-df0f-47e6-aabf-2462b07508dc").withAudience("https://azurehealthcareapis.com").withSmartProxyEnabled(true)).withCorsConfiguration(new ServiceCorsConfigurationInfo().withOrigins(Arrays.asList("*")).withHeaders(Arrays.asList("*")).withMethods(Arrays.asList("DELETE", "GET", "OPTIONS", "PATCH", "POST", "PUT")).withMaxAge(1440).withAllowCredentials(false)).withExportConfiguration(new ServiceExportConfigurationInfo().withStorageAccountName("existingStorageAccount")).withPrivateEndpointConnections(Arrays.asList()).withPublicNetworkAccess(PublicNetworkAccess.DISABLED)).create(); - } - - /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/legacy/ServiceCreateMinimum.json - */ - /** - * Sample code: Create or Update a service with minimum parameters. - * - * @param manager Entry point to HealthcareApisManager. - */ - public static void createOrUpdateAServiceWithMinimumParameters(com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) { - manager.services().define("service2").withRegion("westus2").withExistingResourceGroup("rg1").withKind(Kind.FHIR_R4).withTags(mapOf()).withProperties(new ServicesProperties().withAccessPolicies(Arrays.asList(new ServiceAccessPolicyEntry().withObjectId("c487e7d1-3210-41a3-8ccc-e9372b78da47")))).create(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + manager.services().checkNameAvailabilityWithResponse( + new CheckNameAvailabilityParameters().withName("serviceName").withType("Microsoft.HealthcareApis/services"), + com.azure.core.util.Context.NONE); } } ``` @@ -872,7 +936,9 @@ public final class ServicesCreateOrUpdateSamples { */ public final class ServicesDeleteSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/legacy/ServiceDelete.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/legacy/ + * ServiceDelete.json */ /** * Sample code: Delete service. @@ -893,7 +959,9 @@ public final class ServicesDeleteSamples { */ public final class ServicesGetByResourceGroupSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/legacy/ServiceGet.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/legacy/ + * ServiceGet.json */ /** * Sample code: Get metadata. @@ -905,14 +973,17 @@ public final class ServicesGetByResourceGroupSamples { } /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/legacy/ServiceGetInDataSovereignRegionWithCmkEnabled.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/legacy/ + * ServiceGetInDataSovereignRegionWithCmkEnabled.json */ /** * Sample code: Get metadata for CMK enabled service in data sovereign region. * * @param manager Entry point to HealthcareApisManager. */ - public static void getMetadataForCMKEnabledServiceInDataSovereignRegion(com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) { + public static void getMetadataForCMKEnabledServiceInDataSovereignRegion( + com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) { manager.services().getByResourceGroupWithResponse("rg1", "service1", com.azure.core.util.Context.NONE); } } @@ -926,14 +997,17 @@ public final class ServicesGetByResourceGroupSamples { */ public final class ServicesListSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/legacy/ServiceList.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/legacy/ + * ServiceList.json */ /** * Sample code: List all services in subscription. * * @param manager Entry point to HealthcareApisManager. */ - public static void listAllServicesInSubscription(com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) { + public static void + listAllServicesInSubscription(com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) { manager.services().list(com.azure.core.util.Context.NONE); } } @@ -947,14 +1021,17 @@ public final class ServicesListSamples { */ public final class ServicesListByResourceGroupSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/legacy/ServiceListByResourceGroup.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/legacy/ + * ServiceListByResourceGroup.json */ /** * Sample code: List all services in resource group. * * @param manager Entry point to HealthcareApisManager. */ - public static void listAllServicesInResourceGroup(com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) { + public static void + listAllServicesInResourceGroup(com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) { manager.services().listByResourceGroup("rgname", com.azure.core.util.Context.NONE); } } @@ -963,7 +1040,7 @@ public final class ServicesListByResourceGroupSamples { ### Services_Update ```java -import com.azure.resourcemanager.healthcareapis.models.ServicesDescription; +import com.azure.resourcemanager.healthcareapis.models.ServicesPatchDescription; import java.util.HashMap; import java.util.Map; @@ -972,7 +1049,9 @@ import java.util.Map; */ public final class ServicesUpdateSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/legacy/ServicePatch.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/legacy/ + * ServicePatch.json */ /** * Sample code: Patch service. @@ -980,8 +1059,9 @@ public final class ServicesUpdateSamples { * @param manager Entry point to HealthcareApisManager. */ public static void patchService(com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) { - ServicesDescription resource = manager.services().getByResourceGroupWithResponse("rg1", "service1", com.azure.core.util.Context.NONE).getValue(); - resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); + manager.services().update("rg1", "service1", + new ServicesPatchDescription().withTags(mapOf("tag1", "value1", "tag2", "value2")), + com.azure.core.util.Context.NONE); } // Use "Map.of" if available @@ -1004,22 +1084,28 @@ public final class ServicesUpdateSamples { import com.azure.resourcemanager.healthcareapis.fluent.models.PrivateEndpointConnectionDescriptionInner; import com.azure.resourcemanager.healthcareapis.models.PrivateEndpointServiceConnectionStatus; import com.azure.resourcemanager.healthcareapis.models.PrivateLinkServiceConnectionState; -import java.util.stream.Collectors; /** * Samples for WorkspacePrivateEndpointConnections CreateOrUpdate. */ public final class WorkspacePrivateEndpointConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/privatelink/WorkspaceCreatePrivateEndpointConnection.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/privatelink/ + * WorkspaceCreatePrivateEndpointConnection.json */ /** * Sample code: WorkspacePrivateEndpointConnection_CreateOrUpdate. * * @param manager Entry point to HealthcareApisManager. */ - public static void workspacePrivateEndpointConnectionCreateOrUpdate(com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) { - manager.workspacePrivateEndpointConnections().createOrUpdate("testRG", "workspace1", "myConnection", new PrivateEndpointConnectionDescriptionInner().withPrivateLinkServiceConnectionState(new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.APPROVED).withDescription("Auto-Approved")), com.azure.core.util.Context.NONE); + public static void workspacePrivateEndpointConnectionCreateOrUpdate( + com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) { + manager.workspacePrivateEndpointConnections().createOrUpdate("testRG", "workspace1", "myConnection", + new PrivateEndpointConnectionDescriptionInner().withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) + .withDescription("Auto-Approved")), + com.azure.core.util.Context.NONE); } } ``` @@ -1032,15 +1118,19 @@ public final class WorkspacePrivateEndpointConnectionsCreateOrUpdateSamples { */ public final class WorkspacePrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/privatelink/WorkspaceDeletePrivateEndpointConnection.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/privatelink/ + * WorkspaceDeletePrivateEndpointConnection.json */ /** * Sample code: WorkspacePrivateEndpointConnections_Delete. * * @param manager Entry point to HealthcareApisManager. */ - public static void workspacePrivateEndpointConnectionsDelete(com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) { - manager.workspacePrivateEndpointConnections().delete("testRG", "workspace1", "myConnection", com.azure.core.util.Context.NONE); + public static void workspacePrivateEndpointConnectionsDelete( + com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) { + manager.workspacePrivateEndpointConnections().delete("testRG", "workspace1", "myConnection", + com.azure.core.util.Context.NONE); } } ``` @@ -1053,15 +1143,19 @@ public final class WorkspacePrivateEndpointConnectionsDeleteSamples { */ public final class WorkspacePrivateEndpointConnectionsGetSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/privatelink/WorkspaceGetPrivateEndpointConnection.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/privatelink/ + * WorkspaceGetPrivateEndpointConnection.json */ /** * Sample code: WorkspacePrivateEndpointConnection_GetConnection. * * @param manager Entry point to HealthcareApisManager. */ - public static void workspacePrivateEndpointConnectionGetConnection(com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) { - manager.workspacePrivateEndpointConnections().getWithResponse("testRG", "workspace1", "myConnection", com.azure.core.util.Context.NONE); + public static void workspacePrivateEndpointConnectionGetConnection( + com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) { + manager.workspacePrivateEndpointConnections().getWithResponse("testRG", "workspace1", "myConnection", + com.azure.core.util.Context.NONE); } } ``` @@ -1074,15 +1168,19 @@ public final class WorkspacePrivateEndpointConnectionsGetSamples { */ public final class WorkspacePrivateEndpointConnectionsListByWorkspaceSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/privatelink/WorkspaceListPrivateEndpointConnections.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/privatelink/ + * WorkspaceListPrivateEndpointConnections.json */ /** * Sample code: WorkspacePrivateEndpointConnection_List. * * @param manager Entry point to HealthcareApisManager. */ - public static void workspacePrivateEndpointConnectionList(com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) { - manager.workspacePrivateEndpointConnections().listByWorkspace("testRG", "workspace1", com.azure.core.util.Context.NONE); + public static void + workspacePrivateEndpointConnectionList(com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) { + manager.workspacePrivateEndpointConnections().listByWorkspace("testRG", "workspace1", + com.azure.core.util.Context.NONE); } } ``` @@ -1095,15 +1193,19 @@ public final class WorkspacePrivateEndpointConnectionsListByWorkspaceSamples { */ public final class WorkspacePrivateLinkResourcesGetSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/privatelink/WorkspacePrivateLinkResourceGet.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/privatelink/ + * WorkspacePrivateLinkResourceGet.json */ /** * Sample code: WorkspacePrivateLinkResources_Get. * * @param manager Entry point to HealthcareApisManager. */ - public static void workspacePrivateLinkResourcesGet(com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) { - manager.workspacePrivateLinkResources().getWithResponse("testRG", "workspace1", "healthcareworkspace", com.azure.core.util.Context.NONE); + public static void + workspacePrivateLinkResourcesGet(com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) { + manager.workspacePrivateLinkResources().getWithResponse("testRG", "workspace1", "healthcareworkspace", + com.azure.core.util.Context.NONE); } } ``` @@ -1116,15 +1218,19 @@ public final class WorkspacePrivateLinkResourcesGetSamples { */ public final class WorkspacePrivateLinkResourcesListByWorkspaceSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/privatelink/PrivateLinkResourcesListByWorkspace.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/privatelink/ + * PrivateLinkResourcesListByWorkspace.json */ /** * Sample code: WorkspacePrivateLinkResources_ListGroupIds. * * @param manager Entry point to HealthcareApisManager. */ - public static void workspacePrivateLinkResourcesListGroupIds(com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) { - manager.workspacePrivateLinkResources().listByWorkspace("testRG", "workspace1", com.azure.core.util.Context.NONE); + public static void workspacePrivateLinkResourcesListGroupIds( + com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) { + manager.workspacePrivateLinkResources().listByWorkspace("testRG", "workspace1", + com.azure.core.util.Context.NONE); } } ``` @@ -1139,15 +1245,19 @@ import com.azure.resourcemanager.healthcareapis.models.WorkspaceProperties; */ public final class WorkspacesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/workspaces/Workspaces_Create.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/workspaces/ + * Workspaces_Create.json */ /** * Sample code: Create or update a workspace. * * @param manager Entry point to HealthcareApisManager. */ - public static void createOrUpdateAWorkspace(com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) { - manager.workspaces().define("workspace1").withExistingResourceGroup("testRG").withRegion("westus").withProperties(new WorkspaceProperties()).create(); + public static void + createOrUpdateAWorkspace(com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) { + manager.workspaces().define("workspace1").withExistingResourceGroup("testRG").withRegion("westus") + .withProperties(new WorkspaceProperties()).create(); } } ``` @@ -1160,7 +1270,9 @@ public final class WorkspacesCreateOrUpdateSamples { */ public final class WorkspacesDeleteSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/workspaces/Workspaces_Delete.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/workspaces/ + * Workspaces_Delete.json */ /** * Sample code: Delete a workspace. @@ -1181,7 +1293,9 @@ public final class WorkspacesDeleteSamples { */ public final class WorkspacesGetByResourceGroupSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/workspaces/Workspaces_Get.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/workspaces/ + * Workspaces_Get.json */ /** * Sample code: Get workspace. @@ -1202,14 +1316,17 @@ public final class WorkspacesGetByResourceGroupSamples { */ public final class WorkspacesListSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/workspaces/Workspaces_ListBySubscription.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/workspaces/ + * Workspaces_ListBySubscription.json */ /** * Sample code: Get workspaces by subscription. * * @param manager Entry point to HealthcareApisManager. */ - public static void getWorkspacesBySubscription(com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) { + public static void + getWorkspacesBySubscription(com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) { manager.workspaces().list(com.azure.core.util.Context.NONE); } } @@ -1223,14 +1340,17 @@ public final class WorkspacesListSamples { */ public final class WorkspacesListByResourceGroupSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/workspaces/Workspaces_ListByResourceGroup.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/workspaces/ + * Workspaces_ListByResourceGroup.json */ /** * Sample code: Get workspaces by resource group. * * @param manager Entry point to HealthcareApisManager. */ - public static void getWorkspacesByResourceGroup(com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) { + public static void + getWorkspacesByResourceGroup(com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) { manager.workspaces().listByResourceGroup("testRG", com.azure.core.util.Context.NONE); } } @@ -1248,7 +1368,9 @@ import java.util.Map; */ public final class WorkspacesUpdateSamples { /* - * x-ms-original-file: specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/workspaces/Workspaces_Patch.json + * x-ms-original-file: + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/workspaces/ + * Workspaces_Patch.json */ /** * Sample code: Update a workspace. @@ -1256,7 +1378,8 @@ public final class WorkspacesUpdateSamples { * @param manager Entry point to HealthcareApisManager. */ public static void updateAWorkspace(com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) { - Workspace resource = manager.workspaces().getByResourceGroupWithResponse("testRG", "workspace1", com.azure.core.util.Context.NONE).getValue(); + Workspace resource = manager.workspaces() + .getByResourceGroupWithResponse("testRG", "workspace1", com.azure.core.util.Context.NONE).getValue(); resource.update().withTags(mapOf("tagKey", "fakeTokenPlaceholder")).apply(); } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/pom.xml b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/pom.xml index c078e21cca6e..1563a4d11b0d 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/pom.xml +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/pom.xml @@ -18,7 +18,7 @@ jar Microsoft Azure SDK for HealthcareApis Management - This package contains Microsoft Azure SDK for HealthcareApis Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Healthcare APIs Client. Package tag package-2023-11. + This package contains Microsoft Azure SDK for HealthcareApis Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Healthcare APIs Client. Package tag package-2024-03. https://github.com/Azure/azure-sdk-for-java @@ -45,6 +45,7 @@ UTF-8 0 0 + true @@ -93,8 +94,6 @@ 4.11.0 test - - net.bytebuddy byte-buddy 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 0986b84c436b..1ef5d56b2a59 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 @@ -248,7 +248,7 @@ public HealthcareApisManager authenticate(TokenCredential credential, AzureProfi StringBuilder userAgentBuilder = new StringBuilder(); userAgentBuilder.append("azsdk-java").append("-").append("com.azure.resourcemanager.healthcareapis") - .append("/").append("1.0.0"); + .append("/").append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder.append(" (").append(Configuration.getGlobalConfiguration().get("java.version")) .append("; ").append(Configuration.getGlobalConfiguration().get("os.name")).append("; ") @@ -288,7 +288,7 @@ public HealthcareApisManager authenticate(TokenCredential credential, AzureProfi } /** - * Gets the resource collection API of Services. It manages ServicesDescription. + * Gets the resource collection API of Services. * * @return Resource collection API of Services. */ diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/ServicesClient.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/ServicesClient.java index 0e703dddaff9..82832d55e78d 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/ServicesClient.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/ServicesClient.java @@ -48,68 +48,6 @@ Response getByResourceGroupWithResponse(String resourc @ServiceMethod(returns = ReturnType.SINGLE) ServicesDescriptionInner getByResourceGroup(String resourceGroupName, String resourceName); - /** - * Create or update the metadata of a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param serviceDescription The service instance metadata. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the description of the service. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ServicesDescriptionInner> - beginCreateOrUpdate(String resourceGroupName, String resourceName, ServicesDescriptionInner serviceDescription); - - /** - * Create or update the metadata of a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param serviceDescription The service instance metadata. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the description of the service. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ServicesDescriptionInner> beginCreateOrUpdate( - String resourceGroupName, String resourceName, ServicesDescriptionInner serviceDescription, Context context); - - /** - * Create or update the metadata of a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param serviceDescription The service instance metadata. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the description of the service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ServicesDescriptionInner createOrUpdate(String resourceGroupName, String resourceName, - ServicesDescriptionInner serviceDescription); - - /** - * Create or update the metadata of a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param serviceDescription The service instance metadata. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the description of the service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ServicesDescriptionInner createOrUpdate(String resourceGroupName, String resourceName, - ServicesDescriptionInner serviceDescription, Context context); - /** * Update the metadata of a service instance. * 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 6608e2634256..3a43b6e08b91 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 @@ -14,6 +14,7 @@ import com.azure.resourcemanager.healthcareapis.models.PublicNetworkAccess; import com.azure.resourcemanager.healthcareapis.models.ServiceEventState; 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.util.List; @@ -245,6 +246,29 @@ public DicomServiceInner withEncryption(Encryption encryption) { return this; } + /** + * Get the storageConfiguration property: The configuration of external storage account. + * + * @return the storageConfiguration value. + */ + public StorageConfiguration storageConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().storageConfiguration(); + } + + /** + * Set the storageConfiguration property: The configuration of external storage account. + * + * @param storageConfiguration the storageConfiguration value to set. + * @return the DicomServiceInner object itself. + */ + public DicomServiceInner withStorageConfiguration(StorageConfiguration storageConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new DicomServiceProperties(); + } + this.innerProperties().withStorageConfiguration(storageConfiguration); + return this; + } + /** * Validates the instance. * 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 ec4cf93edbaf..04ba4651e92c 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 @@ -12,6 +12,7 @@ import com.azure.resourcemanager.healthcareapis.models.ProvisioningState; 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.util.List; @@ -68,6 +69,12 @@ public final class DicomServiceProperties { @JsonProperty(value = "encryption") private Encryption encryption; + /* + * The configuration of external storage account + */ + @JsonProperty(value = "storageConfiguration") + private StorageConfiguration storageConfiguration; + /** * Creates an instance of DicomServiceProperties class. */ @@ -194,6 +201,26 @@ public DicomServiceProperties withEncryption(Encryption encryption) { return this; } + /** + * Get the storageConfiguration property: The configuration of external storage account. + * + * @return the storageConfiguration value. + */ + public StorageConfiguration storageConfiguration() { + return this.storageConfiguration; + } + + /** + * Set the storageConfiguration property: The configuration of external storage account. + * + * @param storageConfiguration the storageConfiguration value to set. + * @return the DicomServiceProperties object itself. + */ + public DicomServiceProperties withStorageConfiguration(StorageConfiguration storageConfiguration) { + this.storageConfiguration = storageConfiguration; + return this; + } + /** * Validates the instance. * @@ -212,5 +239,8 @@ public void validate() { if (encryption() != null) { encryption().validate(); } + if (storageConfiguration() != null) { + storageConfiguration().validate(); + } } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/DicomServiceImpl.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/DicomServiceImpl.java index 7f939c70d7a9..caa1b5ac1bd8 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/DicomServiceImpl.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/DicomServiceImpl.java @@ -18,6 +18,7 @@ import com.azure.resourcemanager.healthcareapis.models.PublicNetworkAccess; import com.azure.resourcemanager.healthcareapis.models.ServiceEventState; import com.azure.resourcemanager.healthcareapis.models.ServiceManagedIdentityIdentity; +import com.azure.resourcemanager.healthcareapis.models.StorageConfiguration; import java.util.Collections; import java.util.List; import java.util.Map; @@ -101,6 +102,10 @@ public Encryption encryption() { return this.innerModel().encryption(); } + public StorageConfiguration storageConfiguration() { + return this.innerModel().storageConfiguration(); + } + public Region region() { return Region.fromName(this.regionName()); } @@ -174,9 +179,9 @@ public DicomService apply(Context context) { com.azure.resourcemanager.healthcareapis.HealthcareApisManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.dicomServiceName = Utils.getValueFromIdByName(innerObject.id(), "dicomservices"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.dicomServiceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "dicomservices"); + this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); } public DicomService refresh() { @@ -247,6 +252,11 @@ public DicomServiceImpl withEncryption(Encryption encryption) { return this; } + public DicomServiceImpl withStorageConfiguration(StorageConfiguration storageConfiguration) { + this.innerModel().withStorageConfiguration(storageConfiguration); + return this; + } + private boolean isInCreateMode() { return this.innerModel().id() == null; } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/DicomServicesImpl.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/DicomServicesImpl.java index 9f928f9d03bd..27b204077b40 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/DicomServicesImpl.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/DicomServicesImpl.java @@ -29,14 +29,14 @@ public DicomServicesImpl(DicomServicesClient innerClient, public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName) { PagedIterable inner = this.serviceClient().listByWorkspace(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new DicomServiceImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DicomServiceImpl(inner1, this.manager())); } public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName, Context context) { PagedIterable inner = this.serviceClient().listByWorkspace(resourceGroupName, workspaceName, context); - return Utils.mapPage(inner, inner1 -> new DicomServiceImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DicomServiceImpl(inner1, this.manager())); } public Response getWithResponse(String resourceGroupName, String workspaceName, @@ -69,17 +69,17 @@ public void delete(String resourceGroupName, String dicomServiceName, String wor } public DicomService getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - String dicomServiceName = Utils.getValueFromIdByName(id, "dicomservices"); + String dicomServiceName = ResourceManagerUtils.getValueFromIdByName(id, "dicomservices"); if (dicomServiceName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'dicomservices'.", id))); @@ -88,17 +88,17 @@ public DicomService getById(String id) { } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - String dicomServiceName = Utils.getValueFromIdByName(id, "dicomservices"); + String dicomServiceName = ResourceManagerUtils.getValueFromIdByName(id, "dicomservices"); if (dicomServiceName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'dicomservices'.", id))); @@ -107,17 +107,17 @@ public Response getByIdWithResponse(String id, Context context) { } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String dicomServiceName = Utils.getValueFromIdByName(id, "dicomservices"); + String dicomServiceName = ResourceManagerUtils.getValueFromIdByName(id, "dicomservices"); if (dicomServiceName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'dicomservices'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); @@ -126,17 +126,17 @@ public void deleteById(String id) { } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String dicomServiceName = Utils.getValueFromIdByName(id, "dicomservices"); + String dicomServiceName = ResourceManagerUtils.getValueFromIdByName(id, "dicomservices"); if (dicomServiceName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'dicomservices'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/FhirDestinationsImpl.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/FhirDestinationsImpl.java index ee2223ff2cd8..8cfc70c037e3 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/FhirDestinationsImpl.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/FhirDestinationsImpl.java @@ -29,14 +29,14 @@ public PagedIterable listByIotConnector(String resourceGroup String iotConnectorName) { PagedIterable inner = this.serviceClient().listByIotConnector(resourceGroupName, workspaceName, iotConnectorName); - return Utils.mapPage(inner, inner1 -> new IotFhirDestinationImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new IotFhirDestinationImpl(inner1, this.manager())); } public PagedIterable listByIotConnector(String resourceGroupName, String workspaceName, String iotConnectorName, Context context) { PagedIterable inner = this.serviceClient().listByIotConnector(resourceGroupName, workspaceName, iotConnectorName, context); - return Utils.mapPage(inner, inner1 -> new IotFhirDestinationImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new IotFhirDestinationImpl(inner1, this.manager())); } private FhirDestinationsClient serviceClient() { diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/FhirServiceImpl.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/FhirServiceImpl.java index 9a2d0f38cf76..8f5e16eaedf2 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/FhirServiceImpl.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/FhirServiceImpl.java @@ -200,9 +200,9 @@ public FhirService apply(Context context) { com.azure.resourcemanager.healthcareapis.HealthcareApisManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.fhirServiceName = Utils.getValueFromIdByName(innerObject.id(), "fhirservices"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.fhirServiceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "fhirservices"); + this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); } public FhirService refresh() { diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/FhirServicesImpl.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/FhirServicesImpl.java index db973bec3497..5850e13773fe 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/FhirServicesImpl.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/FhirServicesImpl.java @@ -29,13 +29,13 @@ public FhirServicesImpl(FhirServicesClient innerClient, public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName) { PagedIterable inner = this.serviceClient().listByWorkspace(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new FhirServiceImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new FhirServiceImpl(inner1, this.manager())); } public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName, Context context) { PagedIterable inner = this.serviceClient().listByWorkspace(resourceGroupName, workspaceName, context); - return Utils.mapPage(inner, inner1 -> new FhirServiceImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new FhirServiceImpl(inner1, this.manager())); } public Response getWithResponse(String resourceGroupName, String workspaceName, String fhirServiceName, @@ -68,17 +68,17 @@ public void delete(String resourceGroupName, String fhirServiceName, String work } public FhirService getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - String fhirServiceName = Utils.getValueFromIdByName(id, "fhirservices"); + String fhirServiceName = ResourceManagerUtils.getValueFromIdByName(id, "fhirservices"); if (fhirServiceName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'fhirservices'.", id))); @@ -87,17 +87,17 @@ public FhirService getById(String id) { } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - String fhirServiceName = Utils.getValueFromIdByName(id, "fhirservices"); + String fhirServiceName = ResourceManagerUtils.getValueFromIdByName(id, "fhirservices"); if (fhirServiceName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'fhirservices'.", id))); @@ -106,17 +106,17 @@ public Response getByIdWithResponse(String id, Context context) { } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String fhirServiceName = Utils.getValueFromIdByName(id, "fhirservices"); + String fhirServiceName = ResourceManagerUtils.getValueFromIdByName(id, "fhirservices"); if (fhirServiceName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'fhirservices'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); @@ -125,17 +125,17 @@ public void deleteById(String id) { } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String fhirServiceName = Utils.getValueFromIdByName(id, "fhirservices"); + String fhirServiceName = ResourceManagerUtils.getValueFromIdByName(id, "fhirservices"); if (fhirServiceName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'fhirservices'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); 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 d21033c7838f..392d6564a7fd 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 @@ -333,7 +333,7 @@ public OperationResultsClient getOperationResults() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2023-11-01"; + this.apiVersion = "2024-03-01"; this.services = new ServicesClientImpl(this); this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this); this.privateLinkResources = new PrivateLinkResourcesClientImpl(this); diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/IotConnectorFhirDestinationsImpl.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/IotConnectorFhirDestinationsImpl.java index 716a0acf0f44..27014b5263f6 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/IotConnectorFhirDestinationsImpl.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/IotConnectorFhirDestinationsImpl.java @@ -60,22 +60,22 @@ public void delete(String resourceGroupName, String workspaceName, String iotCon } public IotFhirDestination getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - String iotConnectorName = Utils.getValueFromIdByName(id, "iotconnectors"); + String iotConnectorName = ResourceManagerUtils.getValueFromIdByName(id, "iotconnectors"); if (iotConnectorName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'iotconnectors'.", id))); } - String fhirDestinationName = Utils.getValueFromIdByName(id, "fhirdestinations"); + String fhirDestinationName = ResourceManagerUtils.getValueFromIdByName(id, "fhirdestinations"); if (fhirDestinationName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'fhirdestinations'.", id))); @@ -86,22 +86,22 @@ public IotFhirDestination getById(String id) { } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - String iotConnectorName = Utils.getValueFromIdByName(id, "iotconnectors"); + String iotConnectorName = ResourceManagerUtils.getValueFromIdByName(id, "iotconnectors"); if (iotConnectorName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'iotconnectors'.", id))); } - String fhirDestinationName = Utils.getValueFromIdByName(id, "fhirdestinations"); + String fhirDestinationName = ResourceManagerUtils.getValueFromIdByName(id, "fhirdestinations"); if (fhirDestinationName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'fhirdestinations'.", id))); @@ -110,22 +110,22 @@ public Response getByIdWithResponse(String id, Context conte } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - String iotConnectorName = Utils.getValueFromIdByName(id, "iotconnectors"); + String iotConnectorName = ResourceManagerUtils.getValueFromIdByName(id, "iotconnectors"); if (iotConnectorName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'iotconnectors'.", id))); } - String fhirDestinationName = Utils.getValueFromIdByName(id, "fhirdestinations"); + String fhirDestinationName = ResourceManagerUtils.getValueFromIdByName(id, "fhirdestinations"); if (fhirDestinationName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'fhirdestinations'.", id))); @@ -134,22 +134,22 @@ public void deleteById(String id) { } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - String iotConnectorName = Utils.getValueFromIdByName(id, "iotconnectors"); + String iotConnectorName = ResourceManagerUtils.getValueFromIdByName(id, "iotconnectors"); if (iotConnectorName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'iotconnectors'.", id))); } - String fhirDestinationName = Utils.getValueFromIdByName(id, "fhirdestinations"); + String fhirDestinationName = ResourceManagerUtils.getValueFromIdByName(id, "fhirdestinations"); if (fhirDestinationName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'fhirdestinations'.", id))); diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/IotConnectorImpl.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/IotConnectorImpl.java index 53cbbe8b6f16..3853b5054a82 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/IotConnectorImpl.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/IotConnectorImpl.java @@ -144,9 +144,9 @@ public IotConnector apply(Context context) { com.azure.resourcemanager.healthcareapis.HealthcareApisManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.iotConnectorName = Utils.getValueFromIdByName(innerObject.id(), "iotconnectors"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.iotConnectorName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "iotconnectors"); + this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); } public IotConnector refresh() { diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/IotConnectorsImpl.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/IotConnectorsImpl.java index d9d1b2d0c709..87b10cb68150 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/IotConnectorsImpl.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/IotConnectorsImpl.java @@ -29,14 +29,14 @@ public IotConnectorsImpl(IotConnectorsClient innerClient, public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName) { PagedIterable inner = this.serviceClient().listByWorkspace(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new IotConnectorImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new IotConnectorImpl(inner1, this.manager())); } public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName, Context context) { PagedIterable inner = this.serviceClient().listByWorkspace(resourceGroupName, workspaceName, context); - return Utils.mapPage(inner, inner1 -> new IotConnectorImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new IotConnectorImpl(inner1, this.manager())); } public Response getWithResponse(String resourceGroupName, String workspaceName, @@ -69,17 +69,17 @@ public void delete(String resourceGroupName, String iotConnectorName, String wor } public IotConnector getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - String iotConnectorName = Utils.getValueFromIdByName(id, "iotconnectors"); + String iotConnectorName = ResourceManagerUtils.getValueFromIdByName(id, "iotconnectors"); if (iotConnectorName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'iotconnectors'.", id))); @@ -88,17 +88,17 @@ public IotConnector getById(String id) { } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - String iotConnectorName = Utils.getValueFromIdByName(id, "iotconnectors"); + String iotConnectorName = ResourceManagerUtils.getValueFromIdByName(id, "iotconnectors"); if (iotConnectorName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'iotconnectors'.", id))); @@ -107,17 +107,17 @@ public Response getByIdWithResponse(String id, Context context) { } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String iotConnectorName = Utils.getValueFromIdByName(id, "iotconnectors"); + String iotConnectorName = ResourceManagerUtils.getValueFromIdByName(id, "iotconnectors"); if (iotConnectorName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'iotconnectors'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); @@ -126,17 +126,17 @@ public void deleteById(String id) { } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String iotConnectorName = Utils.getValueFromIdByName(id, "iotconnectors"); + String iotConnectorName = ResourceManagerUtils.getValueFromIdByName(id, "iotconnectors"); if (iotConnectorName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'iotconnectors'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/IotFhirDestinationImpl.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/IotFhirDestinationImpl.java index 2fdcdcdd1551..e1af2b696eb5 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/IotFhirDestinationImpl.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/IotFhirDestinationImpl.java @@ -128,10 +128,10 @@ public IotFhirDestination apply(Context context) { com.azure.resourcemanager.healthcareapis.HealthcareApisManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.iotConnectorName = Utils.getValueFromIdByName(innerObject.id(), "iotconnectors"); - this.fhirDestinationName = Utils.getValueFromIdByName(innerObject.id(), "fhirdestinations"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); + this.iotConnectorName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "iotconnectors"); + this.fhirDestinationName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "fhirdestinations"); } public IotFhirDestination refresh() { diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/OperationsImpl.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/OperationsImpl.java index 6cbc32cd5761..c54edf52871c 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/OperationsImpl.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/OperationsImpl.java @@ -27,12 +27,12 @@ public OperationsImpl(OperationsClient innerClient, public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new OperationDetailImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationDetailImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new OperationDetailImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationDetailImpl(inner1, this.manager())); } private OperationsClient serviceClient() { diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/PrivateEndpointConnectionDescriptionImpl.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/PrivateEndpointConnectionDescriptionImpl.java index 5fe68c5403d3..d35f59b02938 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/PrivateEndpointConnectionDescriptionImpl.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/PrivateEndpointConnectionDescriptionImpl.java @@ -116,9 +116,10 @@ public PrivateEndpointConnectionDescription apply(Context context) { com.azure.resourcemanager.healthcareapis.HealthcareApisManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.resourceName = Utils.getValueFromIdByName(innerObject.id(), "services"); - this.privateEndpointConnectionName = Utils.getValueFromIdByName(innerObject.id(), "privateEndpointConnections"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.resourceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "services"); + this.privateEndpointConnectionName + = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateEndpointConnections"); } public PrivateEndpointConnectionDescription refresh() { diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/PrivateEndpointConnectionsImpl.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/PrivateEndpointConnectionsImpl.java index eff0738dab22..dc0f333b3e9f 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/PrivateEndpointConnectionsImpl.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/PrivateEndpointConnectionsImpl.java @@ -31,14 +31,16 @@ public PagedIterable listByService(String String resourceName) { PagedIterable inner = this.serviceClient().listByService(resourceGroupName, resourceName); - return Utils.mapPage(inner, inner1 -> new PrivateEndpointConnectionDescriptionImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new PrivateEndpointConnectionDescriptionImpl(inner1, this.manager())); } public PagedIterable listByService(String resourceGroupName, String resourceName, Context context) { PagedIterable inner = this.serviceClient().listByService(resourceGroupName, resourceName, context); - return Utils.mapPage(inner, inner1 -> new PrivateEndpointConnectionDescriptionImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new PrivateEndpointConnectionDescriptionImpl(inner1, this.manager())); } public Response getWithResponse(String resourceGroupName, String resourceName, @@ -74,17 +76,18 @@ public void delete(String resourceGroupName, String resourceName, String private } public PrivateEndpointConnectionDescription getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String resourceName = Utils.getValueFromIdByName(id, "services"); + String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "services"); if (resourceName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'services'.", id))); } - String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections"); + String privateEndpointConnectionName + = ResourceManagerUtils.getValueFromIdByName(id, "privateEndpointConnections"); if (privateEndpointConnectionName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException(String .format("The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", id))); @@ -94,17 +97,18 @@ public PrivateEndpointConnectionDescription getById(String id) { } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String resourceName = Utils.getValueFromIdByName(id, "services"); + String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "services"); if (resourceName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'services'.", id))); } - String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections"); + String privateEndpointConnectionName + = ResourceManagerUtils.getValueFromIdByName(id, "privateEndpointConnections"); if (privateEndpointConnectionName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException(String .format("The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", id))); @@ -113,17 +117,18 @@ public Response getByIdWithResponse(String } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String resourceName = Utils.getValueFromIdByName(id, "services"); + String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "services"); if (resourceName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'services'.", id))); } - String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections"); + String privateEndpointConnectionName + = ResourceManagerUtils.getValueFromIdByName(id, "privateEndpointConnections"); if (privateEndpointConnectionName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException(String .format("The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", id))); @@ -132,17 +137,18 @@ public void deleteById(String id) { } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String resourceName = Utils.getValueFromIdByName(id, "services"); + String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "services"); if (resourceName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'services'.", id))); } - String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections"); + String privateEndpointConnectionName + = ResourceManagerUtils.getValueFromIdByName(id, "privateEndpointConnections"); if (privateEndpointConnectionName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException(String .format("The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", id))); diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/Utils.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/ResourceManagerUtils.java similarity index 99% rename from sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/Utils.java rename to sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/ResourceManagerUtils.java index 678bbfa7782d..04e778b628ff 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/Utils.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/ResourceManagerUtils.java @@ -19,8 +19,8 @@ import java.util.stream.Stream; import reactor.core.publisher.Flux; -final class Utils { - private Utils() { +final class ResourceManagerUtils { + private ResourceManagerUtils() { } static String getValueFromIdByName(String id, String name) { 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 e7ac31a3bd93..f1ea64063746 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 @@ -15,7 +15,6 @@ import com.azure.core.annotation.Patch; import com.azure.core.annotation.PathParam; import com.azure.core.annotation.Post; -import com.azure.core.annotation.Put; import com.azure.core.annotation.QueryParam; import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceInterface; @@ -83,16 +82,6 @@ Mono> getByResourceGroup(@HostParam("$host") @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/services/{resourceName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @BodyParam("application/json") ServicesDescriptionInner serviceDescription, - @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/services/{resourceName}") @ExpectedResponses({ 200 }) @@ -273,241 +262,6 @@ public ServicesDescriptionInner getByResourceGroup(String resourceGroupName, Str return getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); } - /** - * Create or update the metadata of a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param serviceDescription The service instance metadata. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the description of the service along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String resourceName, ServicesDescriptionInner serviceDescription) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (serviceDescription == null) { - return Mono - .error(new IllegalArgumentException("Parameter serviceDescription is required and cannot be null.")); - } else { - serviceDescription.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, serviceDescription, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update the metadata of a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param serviceDescription The service instance metadata. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the description of the service along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String resourceName, ServicesDescriptionInner serviceDescription, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (serviceDescription == null) { - return Mono - .error(new IllegalArgumentException("Parameter serviceDescription is required and cannot be null.")); - } else { - serviceDescription.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, serviceDescription, accept, context); - } - - /** - * Create or update the metadata of a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param serviceDescription The service instance metadata. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the description of the service. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ServicesDescriptionInner> beginCreateOrUpdateAsync( - String resourceGroupName, String resourceName, ServicesDescriptionInner serviceDescription) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, serviceDescription); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ServicesDescriptionInner.class, ServicesDescriptionInner.class, - this.client.getContext()); - } - - /** - * Create or update the metadata of a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param serviceDescription The service instance metadata. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the description of the service. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ServicesDescriptionInner> beginCreateOrUpdateAsync( - String resourceGroupName, String resourceName, ServicesDescriptionInner serviceDescription, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, serviceDescription, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ServicesDescriptionInner.class, ServicesDescriptionInner.class, context); - } - - /** - * Create or update the metadata of a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param serviceDescription The service instance metadata. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the description of the service. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ServicesDescriptionInner> beginCreateOrUpdate( - String resourceGroupName, String resourceName, ServicesDescriptionInner serviceDescription) { - return this.beginCreateOrUpdateAsync(resourceGroupName, resourceName, serviceDescription).getSyncPoller(); - } - - /** - * Create or update the metadata of a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param serviceDescription The service instance metadata. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the description of the service. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ServicesDescriptionInner> beginCreateOrUpdate( - String resourceGroupName, String resourceName, ServicesDescriptionInner serviceDescription, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, resourceName, serviceDescription, context) - .getSyncPoller(); - } - - /** - * Create or update the metadata of a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param serviceDescription The service instance metadata. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the description of the service on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String resourceName, - ServicesDescriptionInner serviceDescription) { - return beginCreateOrUpdateAsync(resourceGroupName, resourceName, serviceDescription).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update the metadata of a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param serviceDescription The service instance metadata. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the description of the service on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String resourceName, - ServicesDescriptionInner serviceDescription, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, resourceName, serviceDescription, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update the metadata of a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param serviceDescription The service instance metadata. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the description of the service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ServicesDescriptionInner createOrUpdate(String resourceGroupName, String resourceName, - ServicesDescriptionInner serviceDescription) { - return createOrUpdateAsync(resourceGroupName, resourceName, serviceDescription).block(); - } - - /** - * Create or update the metadata of a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param serviceDescription The service instance metadata. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the description of the service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ServicesDescriptionInner createOrUpdate(String resourceGroupName, String resourceName, - ServicesDescriptionInner serviceDescription, Context context) { - return createOrUpdateAsync(resourceGroupName, resourceName, serviceDescription, context).block(); - } - /** * Update the metadata of a service instance. * diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/ServicesDescriptionImpl.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/ServicesDescriptionImpl.java index 4b2fb59de9b0..d943afe901d2 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/ServicesDescriptionImpl.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/ServicesDescriptionImpl.java @@ -4,25 +4,26 @@ package com.azure.resourcemanager.healthcareapis.implementation; -import com.azure.core.management.Region; import com.azure.core.management.SystemData; -import com.azure.core.util.Context; import com.azure.resourcemanager.healthcareapis.fluent.models.ServicesDescriptionInner; import com.azure.resourcemanager.healthcareapis.models.Kind; -import com.azure.resourcemanager.healthcareapis.models.PublicNetworkAccess; import com.azure.resourcemanager.healthcareapis.models.ServicesDescription; -import com.azure.resourcemanager.healthcareapis.models.ServicesPatchDescription; import com.azure.resourcemanager.healthcareapis.models.ServicesProperties; import com.azure.resourcemanager.healthcareapis.models.ServicesResourceIdentity; import java.util.Collections; import java.util.Map; -public final class ServicesDescriptionImpl - implements ServicesDescription, ServicesDescription.Definition, ServicesDescription.Update { +public final class ServicesDescriptionImpl implements ServicesDescription { private ServicesDescriptionInner innerObject; private final com.azure.resourcemanager.healthcareapis.HealthcareApisManager serviceManager; + ServicesDescriptionImpl(ServicesDescriptionInner innerObject, + com.azure.resourcemanager.healthcareapis.HealthcareApisManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + public String id() { return this.innerModel().id(); } @@ -68,18 +69,6 @@ public SystemData systemData() { return this.innerModel().systemData(); } - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - public ServicesDescriptionInner innerModel() { return this.innerObject; } @@ -87,120 +76,4 @@ public ServicesDescriptionInner innerModel() { private com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager() { return this.serviceManager; } - - private String resourceGroupName; - - private String resourceName; - - private ServicesPatchDescription updateServicePatchDescription; - - public ServicesDescriptionImpl withExistingResourceGroup(String resourceGroupName) { - this.resourceGroupName = resourceGroupName; - return this; - } - - public ServicesDescription create() { - this.innerObject = serviceManager.serviceClient().getServices().createOrUpdate(resourceGroupName, resourceName, - this.innerModel(), Context.NONE); - return this; - } - - public ServicesDescription create(Context context) { - this.innerObject = serviceManager.serviceClient().getServices().createOrUpdate(resourceGroupName, resourceName, - this.innerModel(), context); - return this; - } - - ServicesDescriptionImpl(String name, - com.azure.resourcemanager.healthcareapis.HealthcareApisManager serviceManager) { - this.innerObject = new ServicesDescriptionInner(); - this.serviceManager = serviceManager; - this.resourceName = name; - } - - public ServicesDescriptionImpl update() { - this.updateServicePatchDescription = new ServicesPatchDescription(); - return this; - } - - public ServicesDescription apply() { - this.innerObject = serviceManager.serviceClient().getServices().update(resourceGroupName, resourceName, - updateServicePatchDescription, Context.NONE); - return this; - } - - public ServicesDescription apply(Context context) { - this.innerObject = serviceManager.serviceClient().getServices().update(resourceGroupName, resourceName, - updateServicePatchDescription, context); - return this; - } - - ServicesDescriptionImpl(ServicesDescriptionInner innerObject, - com.azure.resourcemanager.healthcareapis.HealthcareApisManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.resourceName = Utils.getValueFromIdByName(innerObject.id(), "services"); - } - - public ServicesDescription refresh() { - this.innerObject = serviceManager.serviceClient().getServices() - .getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); - return this; - } - - public ServicesDescription refresh(Context context) { - this.innerObject = serviceManager.serviceClient().getServices() - .getByResourceGroupWithResponse(resourceGroupName, resourceName, context).getValue(); - return this; - } - - public ServicesDescriptionImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public ServicesDescriptionImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public ServicesDescriptionImpl withKind(Kind kind) { - this.innerModel().withKind(kind); - return this; - } - - public ServicesDescriptionImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateServicePatchDescription.withTags(tags); - return this; - } - } - - public ServicesDescriptionImpl withEtag(String etag) { - this.innerModel().withEtag(etag); - return this; - } - - public ServicesDescriptionImpl withIdentity(ServicesResourceIdentity identity) { - this.innerModel().withIdentity(identity); - return this; - } - - public ServicesDescriptionImpl withProperties(ServicesProperties properties) { - this.innerModel().withProperties(properties); - return this; - } - - public ServicesDescriptionImpl withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { - this.updateServicePatchDescription.withPublicNetworkAccess(publicNetworkAccess); - return this; - } - - private boolean isInCreateMode() { - return this.innerModel().id() == null; - } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/ServicesImpl.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/ServicesImpl.java index 6d7f4bc15bd8..c16f6fd672c5 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/ServicesImpl.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/ServicesImpl.java @@ -16,6 +16,7 @@ import com.azure.resourcemanager.healthcareapis.models.Services; import com.azure.resourcemanager.healthcareapis.models.ServicesDescription; import com.azure.resourcemanager.healthcareapis.models.ServicesNameAvailabilityInfo; +import com.azure.resourcemanager.healthcareapis.models.ServicesPatchDescription; public final class ServicesImpl implements Services { private static final ClientLogger LOGGER = new ClientLogger(ServicesImpl.class); @@ -51,6 +52,28 @@ public ServicesDescription getByResourceGroup(String resourceGroupName, String r } } + public ServicesDescription update(String resourceGroupName, String resourceName, + ServicesPatchDescription servicePatchDescription) { + ServicesDescriptionInner inner + = this.serviceClient().update(resourceGroupName, resourceName, servicePatchDescription); + if (inner != null) { + return new ServicesDescriptionImpl(inner, this.manager()); + } else { + return null; + } + } + + public ServicesDescription update(String resourceGroupName, String resourceName, + ServicesPatchDescription servicePatchDescription, Context context) { + ServicesDescriptionInner inner + = this.serviceClient().update(resourceGroupName, resourceName, servicePatchDescription, context); + if (inner != null) { + return new ServicesDescriptionImpl(inner, this.manager()); + } else { + return null; + } + } + public void deleteByResourceGroup(String resourceGroupName, String resourceName) { this.serviceClient().delete(resourceGroupName, resourceName); } @@ -61,23 +84,23 @@ public void delete(String resourceGroupName, String resourceName, Context contex public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new ServicesDescriptionImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ServicesDescriptionImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new ServicesDescriptionImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ServicesDescriptionImpl(inner1, this.manager())); } public PagedIterable listByResourceGroup(String resourceGroupName) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return Utils.mapPage(inner, inner1 -> new ServicesDescriptionImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ServicesDescriptionImpl(inner1, this.manager())); } public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); - return Utils.mapPage(inner, inner1 -> new ServicesDescriptionImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ServicesDescriptionImpl(inner1, this.manager())); } public Response checkNameAvailabilityWithResponse( @@ -103,62 +126,6 @@ public Response checkNameAvailabilityWithResponse( } } - public ServicesDescription getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String resourceName = Utils.getValueFromIdByName(id, "services"); - if (resourceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'services'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String resourceName = Utils.getValueFromIdByName(id, "services"); - if (resourceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'services'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, resourceName, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String resourceName = Utils.getValueFromIdByName(id, "services"); - if (resourceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'services'.", id))); - } - this.delete(resourceGroupName, resourceName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String resourceName = Utils.getValueFromIdByName(id, "services"); - if (resourceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'services'.", id))); - } - this.delete(resourceGroupName, resourceName, context); - } - private ServicesClient serviceClient() { return this.innerClient; } @@ -166,8 +133,4 @@ private ServicesClient serviceClient() { private com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager() { return this.serviceManager; } - - public ServicesDescriptionImpl define(String name) { - return new ServicesDescriptionImpl(name, this.manager()); - } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/WorkspaceImpl.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/WorkspaceImpl.java index a1c2c7e1a79d..01f29b8e72e3 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/WorkspaceImpl.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/WorkspaceImpl.java @@ -126,8 +126,8 @@ public Workspace apply(Context context) { com.azure.resourcemanager.healthcareapis.HealthcareApisManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); } public Workspace refresh() { diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/WorkspacePrivateEndpointConnectionsImpl.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/WorkspacePrivateEndpointConnectionsImpl.java index bb8246c3b4e3..bb5adbb7faf3 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/WorkspacePrivateEndpointConnectionsImpl.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/WorkspacePrivateEndpointConnectionsImpl.java @@ -31,14 +31,16 @@ public PagedIterable listByWorkspace(Strin String workspaceName) { PagedIterable inner = this.serviceClient().listByWorkspace(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new PrivateEndpointConnectionDescriptionImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new PrivateEndpointConnectionDescriptionImpl(inner1, this.manager())); } public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName, Context context) { PagedIterable inner = this.serviceClient().listByWorkspace(resourceGroupName, workspaceName, context); - return Utils.mapPage(inner, inner1 -> new PrivateEndpointConnectionDescriptionImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new PrivateEndpointConnectionDescriptionImpl(inner1, this.manager())); } public Response getWithResponse(String resourceGroupName, diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/WorkspacePrivateLinkResourcesImpl.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/WorkspacePrivateLinkResourcesImpl.java index 9eba3a19e22c..6c23e8f17b10 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/WorkspacePrivateLinkResourcesImpl.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/WorkspacePrivateLinkResourcesImpl.java @@ -31,14 +31,16 @@ public PagedIterable listByWorkspace(String reso String workspaceName) { PagedIterable inner = this.serviceClient().listByWorkspace(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new PrivateLinkResourceDescriptionImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new PrivateLinkResourceDescriptionImpl(inner1, this.manager())); } public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName, Context context) { PagedIterable inner = this.serviceClient().listByWorkspace(resourceGroupName, workspaceName, context); - return Utils.mapPage(inner, inner1 -> new PrivateLinkResourceDescriptionImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new PrivateLinkResourceDescriptionImpl(inner1, this.manager())); } public Response getWithResponse(String resourceGroupName, String workspaceName, diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/WorkspacesImpl.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/WorkspacesImpl.java index 1a7bc83615bc..267d2f899c81 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/WorkspacesImpl.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/WorkspacesImpl.java @@ -29,22 +29,22 @@ public WorkspacesImpl(WorkspacesClient innerClient, public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); } public PagedIterable listByResourceGroup(String resourceGroupName) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return Utils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); } public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); - return Utils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); } public Response getByResourceGroupWithResponse(String resourceGroupName, String workspaceName, @@ -77,12 +77,12 @@ public void delete(String resourceGroupName, String workspaceName, Context conte } public Workspace getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); @@ -91,12 +91,12 @@ public Workspace getById(String id) { } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); @@ -105,12 +105,12 @@ public Response getByIdWithResponse(String id, Context context) { } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); @@ -119,12 +119,12 @@ public void deleteById(String id) { } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/DicomService.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/DicomService.java index be5f0e35ae17..615c82f69797 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/DicomService.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/DicomService.java @@ -129,6 +129,13 @@ public interface DicomService { */ Encryption encryption(); + /** + * Gets the storageConfiguration property: The configuration of external storage account. + * + * @return the storageConfiguration value. + */ + StorageConfiguration storageConfiguration(); + /** * Gets the region of the resource. * @@ -195,7 +202,7 @@ interface WithParentResource { interface WithCreate extends DefinitionStages.WithLocation, DefinitionStages.WithTags, DefinitionStages.WithEtag, DefinitionStages.WithIdentity, DefinitionStages.WithAuthenticationConfiguration, DefinitionStages.WithCorsConfiguration, DefinitionStages.WithPublicNetworkAccess, - DefinitionStages.WithEncryption { + DefinitionStages.WithEncryption, DefinitionStages.WithStorageConfiguration { /** * Executes the create request. * @@ -328,6 +335,19 @@ interface WithEncryption { */ WithCreate withEncryption(Encryption encryption); } + + /** + * The stage of the DicomService definition allowing to specify storageConfiguration. + */ + interface WithStorageConfiguration { + /** + * Specifies the storageConfiguration property: The configuration of external storage account. + * + * @param storageConfiguration The configuration of external storage account. + * @return the next definition stage. + */ + WithCreate withStorageConfiguration(StorageConfiguration storageConfiguration); + } } /** 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 d16ec7a8e459..f6ed43fc94af 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 @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; /** * Authentication configuration information. @@ -30,6 +31,12 @@ public final class FhirServiceAuthenticationConfiguration { @JsonProperty(value = "smartProxyEnabled") private Boolean smartProxyEnabled; + /* + * The array of identity provider configurations for SMART on FHIR authentication. + */ + @JsonProperty(value = "smartIdentityProviders") + private List smartIdentityProviders; + /** * Creates an instance of FhirServiceAuthenticationConfiguration class. */ @@ -96,11 +103,37 @@ public FhirServiceAuthenticationConfiguration withSmartProxyEnabled(Boolean smar return this; } + /** + * Get the smartIdentityProviders property: The array of identity provider configurations for SMART on FHIR + * authentication. + * + * @return the smartIdentityProviders value. + */ + public List smartIdentityProviders() { + return this.smartIdentityProviders; + } + + /** + * Set the smartIdentityProviders property: The array of identity provider configurations for SMART on FHIR + * authentication. + * + * @param smartIdentityProviders the smartIdentityProviders value to set. + * @return the FhirServiceAuthenticationConfiguration object itself. + */ + public FhirServiceAuthenticationConfiguration + withSmartIdentityProviders(List smartIdentityProviders) { + this.smartIdentityProviders = smartIdentityProviders; + return this; + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (smartIdentityProviders() != null) { + smartIdentityProviders().forEach(e -> e.validate()); + } } } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/Services.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/Services.java index 514d20130fbb..3a8ec3847b00 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/Services.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/Services.java @@ -38,6 +38,35 @@ Response getByResourceGroupWithResponse(String resourceGrou */ ServicesDescription getByResourceGroup(String resourceGroupName, String resourceName); + /** + * Update the metadata of a service instance. + * + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param servicePatchDescription The service instance metadata and security metadata. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the description of the service. + */ + ServicesDescription update(String resourceGroupName, String resourceName, + ServicesPatchDescription servicePatchDescription); + + /** + * Update the metadata of a service instance. + * + * @param resourceGroupName The name of the resource group that contains the service instance. + * @param resourceName The name of the service instance. + * @param servicePatchDescription The service instance metadata and security metadata. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the description of the service. + */ + ServicesDescription update(String resourceGroupName, String resourceName, + ServicesPatchDescription servicePatchDescription, Context context); + /** * Delete a service instance. * @@ -129,56 +158,4 @@ Response getByResourceGroupWithResponse(String resourceGrou * @return the properties indicating whether a given service name is available. */ ServicesNameAvailabilityInfo checkNameAvailability(CheckNameAvailabilityParameters checkNameAvailabilityInputs); - - /** - * Get the metadata of a service instance. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the metadata of a service instance along with {@link Response}. - */ - ServicesDescription getById(String id); - - /** - * Get the metadata of a service instance. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the metadata of a service instance along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a service instance. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete a service instance. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new ServicesDescription resource. - * - * @param name resource name. - * @return the first stage of the new ServicesDescription definition. - */ - ServicesDescription.DefinitionStages.Blank define(String name); } diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServicesDescription.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServicesDescription.java index 140bda2a3273..52851db7e8f5 100644 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServicesDescription.java +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServicesDescription.java @@ -4,9 +4,7 @@ package com.azure.resourcemanager.healthcareapis.models; -import com.azure.core.management.Region; import com.azure.core.management.SystemData; -import com.azure.core.util.Context; import com.azure.resourcemanager.healthcareapis.fluent.models.ServicesDescriptionInner; import java.util.Map; @@ -84,247 +82,10 @@ public interface ServicesDescription { */ SystemData systemData(); - /** - * Gets the region of the resource. - * - * @return the region of the resource. - */ - Region region(); - - /** - * Gets the name of the resource region. - * - * @return the name of the resource region. - */ - String regionName(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - /** * Gets the inner com.azure.resourcemanager.healthcareapis.fluent.models.ServicesDescriptionInner object. * * @return the inner object. */ ServicesDescriptionInner innerModel(); - - /** - * The entirety of the ServicesDescription definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, DefinitionStages.WithKind, DefinitionStages.WithCreate { - } - - /** - * The ServicesDescription definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the ServicesDescription definition. - */ - interface Blank extends WithLocation { - } - - /** - * The stage of the ServicesDescription definition allowing to specify location. - */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(String location); - } - - /** - * The stage of the ServicesDescription definition allowing to specify parent resource. - */ - interface WithResourceGroup { - /** - * Specifies resourceGroupName. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @return the next definition stage. - */ - WithKind withExistingResourceGroup(String resourceGroupName); - } - - /** - * The stage of the ServicesDescription definition allowing to specify kind. - */ - interface WithKind { - /** - * Specifies the kind property: The kind of the service.. - * - * @param kind The kind of the service. - * @return the next definition stage. - */ - WithCreate withKind(Kind kind); - } - - /** - * The stage of the ServicesDescription definition which contains all the minimum required properties for the - * resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithEtag, - DefinitionStages.WithIdentity, DefinitionStages.WithProperties { - /** - * Executes the create request. - * - * @return the created resource. - */ - ServicesDescription create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - ServicesDescription create(Context context); - } - - /** - * The stage of the ServicesDescription definition allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - WithCreate withTags(Map tags); - } - - /** - * The stage of the ServicesDescription definition allowing to specify etag. - */ - interface WithEtag { - /** - * Specifies the etag property: An etag associated with the resource, used for optimistic concurrency when - * editing it.. - * - * @param etag An etag associated with the resource, used for optimistic concurrency when editing it. - * @return the next definition stage. - */ - WithCreate withEtag(String etag); - } - - /** - * The stage of the ServicesDescription definition allowing to specify identity. - */ - interface WithIdentity { - /** - * Specifies the identity property: Setting indicating whether the service has a managed identity associated - * with it.. - * - * @param identity Setting indicating whether the service has a managed identity associated with it. - * @return the next definition stage. - */ - WithCreate withIdentity(ServicesResourceIdentity identity); - } - - /** - * The stage of the ServicesDescription definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The common properties of a service.. - * - * @param properties The common properties of a service. - * @return the next definition stage. - */ - WithCreate withProperties(ServicesProperties properties); - } - } - - /** - * Begins update for the ServicesDescription resource. - * - * @return the stage of resource update. - */ - ServicesDescription.Update update(); - - /** - * The template for ServicesDescription update. - */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithPublicNetworkAccess { - /** - * Executes the update request. - * - * @return the updated resource. - */ - ServicesDescription apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - ServicesDescription apply(Context context); - } - - /** - * The ServicesDescription update stages. - */ - interface UpdateStages { - /** - * The stage of the ServicesDescription update allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: Instance tags. - * - * @param tags Instance tags. - * @return the next definition stage. - */ - Update withTags(Map tags); - } - - /** - * The stage of the ServicesDescription update allowing to specify publicNetworkAccess. - */ - interface WithPublicNetworkAccess { - /** - * Specifies the publicNetworkAccess property: Control permission for data plane traffic coming from public - * networks while private endpoint is enabled.. - * - * @param publicNetworkAccess Control permission for data plane traffic coming from public networks while - * private endpoint is enabled. - * @return the next definition stage. - */ - Update withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - ServicesDescription refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - ServicesDescription refresh(Context context); } 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 new file mode 100644 index 000000000000..d48bbc059bfa --- /dev/null +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/SmartDataActions.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.healthcareapis.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * The Data Actions that can be enabled for a Smart Identity Provider Application. + */ +public final class SmartDataActions extends ExpandableStringEnum { + /** + * Static value Read for SmartDataActions. + */ + public static final SmartDataActions READ = fromString("Read"); + + /** + * Creates a new instance of SmartDataActions value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SmartDataActions() { + } + + /** + * Creates or finds a SmartDataActions from its string representation. + * + * @param name a name to look for. + * @return the corresponding SmartDataActions. + */ + @JsonCreator + public static SmartDataActions fromString(String name) { + return fromString(name, SmartDataActions.class); + } + + /** + * Gets known SmartDataActions values. + * + * @return known SmartDataActions values. + */ + public static Collection values() { + return values(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 new file mode 100644 index 000000000000..1acf142d993e --- /dev/null +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/SmartIdentityProviderApplication.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.healthcareapis.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * An Application configured in the Identity Provider used to access FHIR resources. + */ +@Fluent +public final class SmartIdentityProviderApplication { + /* + * 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; + + /** + * Creates an instance of SmartIdentityProviderApplication class. + */ + public SmartIdentityProviderApplication() { + } + + /** + * Get the clientId property: The application client id defined in the identity provider. This value will be used + * to validate bearer tokens against the given authority. + * + * @return the clientId value. + */ + public String clientId() { + return this.clientId; + } + + /** + * Set the clientId property: The application client id defined in the identity provider. This value will be used + * to validate bearer tokens against the given authority. + * + * @param clientId the clientId value to set. + * @return the SmartIdentityProviderApplication object itself. + */ + public SmartIdentityProviderApplication withClientId(String clientId) { + this.clientId = clientId; + return this; + } + + /** + * Get the audience property: The audience that will be used to validate bearer tokens against the given authority. + * + * @return the audience value. + */ + public String audience() { + return this.audience; + } + + /** + * Set the audience property: The audience that will be used to validate bearer tokens against the given authority. + * + * @param audience the audience value to set. + * @return the SmartIdentityProviderApplication object itself. + */ + public SmartIdentityProviderApplication withAudience(String audience) { + this.audience = audience; + return this; + } + + /** + * Get the allowedDataActions property: The actions that are permitted to be performed on FHIR resources for the + * application. + * + * @return the allowedDataActions value. + */ + public List allowedDataActions() { + return this.allowedDataActions; + } + + /** + * Set the allowedDataActions property: The actions that are permitted to be performed on FHIR resources for the + * application. + * + * @param allowedDataActions the allowedDataActions value to set. + * @return the SmartIdentityProviderApplication object itself. + */ + public SmartIdentityProviderApplication withAllowedDataActions(List allowedDataActions) { + this.allowedDataActions = allowedDataActions; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} 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 new file mode 100644 index 000000000000..d39a04aafa08 --- /dev/null +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/SmartIdentityProviderConfiguration.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.healthcareapis.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * An object to configure an identity provider for use with SMART on FHIR authentication. + */ +@Fluent +public final class SmartIdentityProviderConfiguration { + /* + * 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; + + /** + * Creates an instance of SmartIdentityProviderConfiguration class. + */ + public SmartIdentityProviderConfiguration() { + } + + /** + * Get the authority property: The identity provider token authority also known as the token issuing authority. + * + * @return the authority value. + */ + public String authority() { + return this.authority; + } + + /** + * Set the authority property: The identity provider token authority also known as the token issuing authority. + * + * @param authority the authority value to set. + * @return the SmartIdentityProviderConfiguration object itself. + */ + public SmartIdentityProviderConfiguration withAuthority(String authority) { + this.authority = authority; + return this; + } + + /** + * Get the applications property: The array of identity provider applications for SMART on FHIR authentication. + * + * @return the applications value. + */ + public List applications() { + return this.applications; + } + + /** + * Set the applications property: The array of identity provider applications for SMART on FHIR authentication. + * + * @param applications the applications value to set. + * @return the SmartIdentityProviderConfiguration object itself. + */ + public SmartIdentityProviderConfiguration withApplications(List applications) { + this.applications = applications; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (applications() != null) { + applications().forEach(e -> e.validate()); + } + } +} 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 new file mode 100644 index 000000000000..db23bbf71b76 --- /dev/null +++ b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/StorageConfiguration.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.healthcareapis.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The configuration of connected storage. + */ +@Fluent +public final class StorageConfiguration { + /* + * 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; + + /** + * Creates an instance of StorageConfiguration class. + */ + public StorageConfiguration() { + } + + /** + * Get the storageResourceId property: The resource id of connected storage account. + * + * @return the storageResourceId value. + */ + public String storageResourceId() { + return this.storageResourceId; + } + + /** + * Set the storageResourceId property: The resource id of connected storage account. + * + * @param storageResourceId the storageResourceId value to set. + * @return the StorageConfiguration object itself. + */ + public StorageConfiguration withStorageResourceId(String storageResourceId) { + this.storageResourceId = storageResourceId; + return this; + } + + /** + * Get the fileSystemName property: The filesystem name of connected storage account. + * + * @return the fileSystemName value. + */ + public String fileSystemName() { + return this.fileSystemName; + } + + /** + * Set the fileSystemName property: The filesystem name of connected storage account. + * + * @param fileSystemName the fileSystemName value to set. + * @return the StorageConfiguration object itself. + */ + public StorageConfiguration withFileSystemName(String fileSystemName) { + this.fileSystemName = fileSystemName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} 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 6c21956187ef..dc98e5553919 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 @@ -4,12 +4,10 @@ module com.azure.resourcemanager.healthcareapis { requires transitive com.azure.core.management; - exports com.azure.resourcemanager.healthcareapis; exports com.azure.resourcemanager.healthcareapis.fluent; 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; } 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 b5384129d2e3..4270aceba9a6 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 @@ -208,6 +208,11 @@ "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, @@ -303,6 +308,16 @@ "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, @@ -423,6 +438,11 @@ "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, 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 7926a6adc00e..efaa50055349 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 @@ -4,13 +4,15 @@ package com.azure.resourcemanager.healthcareapis.generated; +import com.azure.resourcemanager.healthcareapis.models.StorageConfiguration; + /** * Samples for DicomServices CreateOrUpdate. */ public final class DicomServicesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/dicomservices/ + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/dicomservices/ * DicomServices_Create.json */ /** @@ -21,6 +23,9 @@ public final class DicomServicesCreateOrUpdateSamples { public static void createOrUpdateADicomService(com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) { manager.dicomServices().define("blue").withExistingWorkspace("testRG", "workspace1").withRegion("westus") + .withStorageConfiguration(new StorageConfiguration().withStorageResourceId( + "/subscriptions/ab309d4e-4c2e-4241-be2e-08e1c8dd4246/resourceGroups/rgname/providers/Microsoft.Storage/storageAccounts/accountname") + .withFileSystemName("fileSystemName")) .create(); } } 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 bf9e730ea89f..1537892fb32d 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 @@ -10,7 +10,7 @@ public final class DicomServicesDeleteSamples { /* * x-ms-original-file: - * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/dicomservices/ + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/dicomservices/ * DicomServices_Delete.json */ /** 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 604ad64f7150..3f91b0a56055 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 @@ -10,7 +10,7 @@ public final class DicomServicesGetSamples { /* * x-ms-original-file: - * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/dicomservices/ + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/dicomservices/ * DicomServices_Get.json */ /** 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 a1db6208beee..d81a56855966 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 @@ -10,7 +10,7 @@ public final class DicomServicesListByWorkspaceSamples { /* * x-ms-original-file: - * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/dicomservices/ + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/dicomservices/ * DicomServices_List.json */ /** 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 d141131899fc..75056a876a2b 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 @@ -14,7 +14,7 @@ public final class DicomServicesUpdateSamples { /* * x-ms-original-file: - * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/dicomservices/ + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/dicomservices/ * DicomServices_Patch.json */ /** 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 c354a5a36a2f..dccad8ed8330 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 @@ -10,7 +10,7 @@ public final class FhirDestinationsListByIotConnectorSamples { /* * x-ms-original-file: - * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/iotconnectors/ + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/iotconnectors/ * iotconnector_fhirdestination_List.json */ /** 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 98771988add0..cd2ade2c380d 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 @@ -15,6 +15,9 @@ import com.azure.resourcemanager.healthcareapis.models.ImplementationGuidesConfiguration; import com.azure.resourcemanager.healthcareapis.models.ServiceManagedIdentityIdentity; import com.azure.resourcemanager.healthcareapis.models.ServiceManagedIdentityType; +import com.azure.resourcemanager.healthcareapis.models.SmartDataActions; +import com.azure.resourcemanager.healthcareapis.models.SmartIdentityProviderApplication; +import com.azure.resourcemanager.healthcareapis.models.SmartIdentityProviderConfiguration; import com.azure.resourcemanager.healthcareapis.models.UserAssignedIdentity; import java.util.Arrays; import java.util.HashMap; @@ -26,7 +29,7 @@ public final class FhirServicesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/fhirservices/ + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/fhirservices/ * FhirServices_Create.json */ /** @@ -43,10 +46,19 @@ public final class FhirServicesCreateOrUpdateSamples { .withUserAssignedIdentities(mapOf( "/subscriptions/subid/resourcegroups/testRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-mi", new UserAssignedIdentity()))) - .withAcrConfiguration(new FhirServiceAcrConfiguration().withLoginServers(Arrays.asList("test1.azurecr.io"))) - .withAuthenticationConfiguration(new FhirServiceAuthenticationConfiguration() - .withAuthority("https://login.microsoftonline.com/abfde7b2-df0f-47e6-aabf-2462b07508dc") - .withAudience("https://azurehealthcareapis.com").withSmartProxyEnabled(true)) + .withAcrConfiguration(new FhirServiceAcrConfiguration() + .withLoginServers(Arrays.asList("test1.azurecr.io"))) + .withAuthenticationConfiguration( + new FhirServiceAuthenticationConfiguration() + .withAuthority("https://login.microsoftonline.com/abfde7b2-df0f-47e6-aabf-2462b07508dc") + .withAudience("https://azurehealthcareapis.com").withSmartProxyEnabled(true) + .withSmartIdentityProviders( + Arrays.asList(new SmartIdentityProviderConfiguration() + .withAuthority("https://login.b2clogin.com/11111111-1111-1111-1111-111111111111/v2.0") + .withApplications(Arrays.asList(new SmartIdentityProviderApplication() + .withClientId("22222222-2222-2222-2222-222222222222") + .withAudience("22222222-2222-2222-2222-222222222222") + .withAllowedDataActions(Arrays.asList(SmartDataActions.READ))))))) .withCorsConfiguration( new FhirServiceCorsConfiguration().withOrigins(Arrays.asList("*")).withHeaders(Arrays.asList("*")) .withMethods(Arrays.asList("DELETE", "GET", "OPTIONS", "PATCH", "POST", "PUT")).withMaxAge(1440) 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 edcad199c3e6..c77178882b8d 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 @@ -10,7 +10,7 @@ public final class FhirServicesDeleteSamples { /* * x-ms-original-file: - * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/fhirservices/ + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/fhirservices/ * FhirServices_Delete.json */ /** 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 ba710e9d0307..399689756d71 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 @@ -10,7 +10,7 @@ public final class FhirServicesGetSamples { /* * x-ms-original-file: - * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/fhirservices/ + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/fhirservices/ * FhirServices_Get.json */ /** 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 4bb358510752..d8d86bc078dc 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 @@ -10,7 +10,7 @@ public final class FhirServicesListByWorkspaceSamples { /* * x-ms-original-file: - * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/fhirservices/ + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/fhirservices/ * FhirServices_List.json */ /** 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 c1bc25325448..c71349f30bd4 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 @@ -14,7 +14,7 @@ public final class FhirServicesUpdateSamples { /* * x-ms-original-file: - * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/fhirservices/ + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/fhirservices/ * FhirServices_Patch.json */ /** 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 8a729def5b70..b6a5bc7b68e9 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 @@ -16,7 +16,7 @@ public final class IotConnectorFhirDestinationCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/iotconnectors/ + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/iotconnectors/ * iotconnector_fhirdestination_Create.json */ /** 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 abca8019fe62..471a69bac591 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 @@ -10,7 +10,7 @@ public final class IotConnectorFhirDestinationDeleteSamples { /* * x-ms-original-file: - * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/iotconnectors/ + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/iotconnectors/ * iotconnector_fhirdestination_Delete.json */ /** 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 1ea15ce45e61..f2b2a09d6630 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 @@ -10,7 +10,7 @@ public final class IotConnectorFhirDestinationGetSamples { /* * x-ms-original-file: - * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/iotconnectors/ + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/iotconnectors/ * iotconnector_fhirdestination_Get.json */ /** 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 1394bb25fc87..3f6e88ac967f 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 @@ -20,7 +20,7 @@ public final class IotConnectorsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/iotconnectors/ + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/iotconnectors/ * iotconnector_Create.json */ /** 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 60a41d0da374..3e8283967cd2 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 @@ -10,7 +10,7 @@ public final class IotConnectorsDeleteSamples { /* * x-ms-original-file: - * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/iotconnectors/ + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/iotconnectors/ * iotconnector_Delete.json */ /** 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 3747e1c1d307..d259948193d5 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 @@ -10,7 +10,7 @@ public final class IotConnectorsGetSamples { /* * x-ms-original-file: - * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/iotconnectors/ + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/iotconnectors/ * iotconnector_Get.json */ /** 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 76fe7cbcd5ef..ee4761915717 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 @@ -10,7 +10,7 @@ public final class IotConnectorsListByWorkspaceSamples { /* * x-ms-original-file: - * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/iotconnectors/ + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/iotconnectors/ * iotconnector_List.json */ /** 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 00f74c385d0d..0b0603b5bc07 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 @@ -16,7 +16,7 @@ public final class IotConnectorsUpdateSamples { /* * x-ms-original-file: - * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/iotconnectors/ + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/iotconnectors/ * iotconnector_Patch.json */ /** 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 90eafc6f7857..68e7380e1c9d 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 @@ -10,7 +10,7 @@ public final class OperationResultsGetSamples { /* * x-ms-original-file: - * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/ + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/ * OperationResultsGet.json */ /** 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 9b37a0243857..de42c55c4705 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 @@ -10,7 +10,7 @@ public final class OperationsListSamples { /* * x-ms-original-file: - * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/OperationsList. + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/OperationsList. * json */ /** 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 4f2e2c1a1647..fd6305c040f2 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 @@ -13,7 +13,7 @@ public final class PrivateEndpointConnectionsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/legacy/ + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/legacy/ * ServiceCreatePrivateEndpointConnection.json */ /** 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 584ccda60b1f..c6bad2bbea21 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 @@ -10,7 +10,7 @@ public final class PrivateEndpointConnectionsDeleteSamples { /* * x-ms-original-file: - * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/legacy/ + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/legacy/ * ServiceDeletePrivateEndpointConnection.json */ /** 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 4e2091c67141..7276d2294b1c 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 @@ -10,7 +10,7 @@ public final class PrivateEndpointConnectionsGetSamples { /* * x-ms-original-file: - * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/legacy/ + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/legacy/ * ServiceGetPrivateEndpointConnection.json */ /** 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 a23315686be8..7d3316c83309 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 @@ -10,7 +10,7 @@ public final class PrivateEndpointConnectionsListByServiceSamples { /* * x-ms-original-file: - * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/legacy/ + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/legacy/ * ServiceListPrivateEndpointConnections.json */ /** 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 4fd7a4d20f80..91f2456dd362 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 @@ -10,7 +10,7 @@ public final class PrivateLinkResourcesGetSamples { /* * x-ms-original-file: - * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/legacy/ + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/legacy/ * PrivateLinkResourceGet.json */ /** 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 fee20782dc73..52c40f0be9ea 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 @@ -10,7 +10,7 @@ public final class PrivateLinkResourcesListByServiceSamples { /* * x-ms-original-file: - * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/legacy/ + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/legacy/ * PrivateLinkResourcesListByService.json */ /** 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 d07dfabce1f7..9f12021d737f 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 @@ -12,7 +12,7 @@ public final class ServicesCheckNameAvailabilitySamples { /* * x-ms-original-file: - * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/ + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/ * CheckNameAvailabilityPost.json */ /** 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 deleted file mode 100644 index c7b9bd88dc33..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/samples/java/com/azure/resourcemanager/healthcareapis/generated/ServicesCreateOrUpdateSamples.java +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.resourcemanager.healthcareapis.models.Kind; -import com.azure.resourcemanager.healthcareapis.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.healthcareapis.models.PublicNetworkAccess; -import com.azure.resourcemanager.healthcareapis.models.ServiceAccessPolicyEntry; -import com.azure.resourcemanager.healthcareapis.models.ServiceAuthenticationConfigurationInfo; -import com.azure.resourcemanager.healthcareapis.models.ServiceCorsConfigurationInfo; -import com.azure.resourcemanager.healthcareapis.models.ServiceCosmosDbConfigurationInfo; -import com.azure.resourcemanager.healthcareapis.models.ServiceExportConfigurationInfo; -import com.azure.resourcemanager.healthcareapis.models.ServicesProperties; -import com.azure.resourcemanager.healthcareapis.models.ServicesResourceIdentity; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for Services CreateOrUpdate. - */ -public final class ServicesCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/legacy/ - * ServiceCreate.json - */ - /** - * Sample code: Create or Update a service with all parameters. - * - * @param manager Entry point to HealthcareApisManager. - */ - public static void createOrUpdateAServiceWithAllParameters( - com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) { - manager - .services().define("service1").withRegion("westus2").withExistingResourceGroup( - "rg1") - .withKind(Kind.FHIR_R4).withTags(mapOf()) - .withIdentity(new ServicesResourceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED)) - .withProperties(new ServicesProperties() - .withAccessPolicies( - Arrays.asList(new ServiceAccessPolicyEntry().withObjectId("c487e7d1-3210-41a3-8ccc-e9372b78da47"), - new ServiceAccessPolicyEntry().withObjectId("5b307da8-43d4-492b-8b66-b0294ade872f"))) - .withCosmosDbConfiguration(new ServiceCosmosDbConfigurationInfo().withOfferThroughput(1000) - .withKeyVaultKeyUri("fakeTokenPlaceholder")) - .withAuthenticationConfiguration(new ServiceAuthenticationConfigurationInfo() - .withAuthority("https://login.microsoftonline.com/abfde7b2-df0f-47e6-aabf-2462b07508dc") - .withAudience("https://azurehealthcareapis.com").withSmartProxyEnabled(true)) - .withCorsConfiguration( - new ServiceCorsConfigurationInfo().withOrigins(Arrays.asList("*")).withHeaders(Arrays.asList("*")) - .withMethods(Arrays.asList("DELETE", "GET", "OPTIONS", "PATCH", "POST", "PUT")).withMaxAge(1440) - .withAllowCredentials(false)) - .withExportConfiguration( - new ServiceExportConfigurationInfo().withStorageAccountName("existingStorageAccount")) - .withPrivateEndpointConnections(Arrays.asList()).withPublicNetworkAccess(PublicNetworkAccess.DISABLED)) - .create(); - } - - /* - * x-ms-original-file: - * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/legacy/ - * ServiceCreateInDataSovereignRegionWithCmkEnabled.json - */ - /** - * Sample code: Create or Update a service with all parameters and CMK enabled in a data sovereign region. - * - * @param manager Entry point to HealthcareApisManager. - */ - public static void createOrUpdateAServiceWithAllParametersAndCMKEnabledInADataSovereignRegion( - com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) { - manager - .services().define("service1").withRegion("Southeast Asia").withExistingResourceGroup( - "rg1") - .withKind(Kind.FHIR_R4).withTags(mapOf()) - .withIdentity(new ServicesResourceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED)) - .withProperties(new ServicesProperties() - .withAccessPolicies( - Arrays.asList(new ServiceAccessPolicyEntry().withObjectId("c487e7d1-3210-41a3-8ccc-e9372b78da47"), - new ServiceAccessPolicyEntry().withObjectId("5b307da8-43d4-492b-8b66-b0294ade872f"))) - .withCosmosDbConfiguration(new ServiceCosmosDbConfigurationInfo().withOfferThroughput(1000) - .withKeyVaultKeyUri("fakeTokenPlaceholder") - .withCrossTenantCmkApplicationId("de3fbeef-8c3a-428e-8b9f-4d229c8a85f4")) - .withAuthenticationConfiguration(new ServiceAuthenticationConfigurationInfo() - .withAuthority("https://login.microsoftonline.com/abfde7b2-df0f-47e6-aabf-2462b07508dc") - .withAudience("https://azurehealthcareapis.com").withSmartProxyEnabled(true)) - .withCorsConfiguration( - new ServiceCorsConfigurationInfo().withOrigins(Arrays.asList("*")).withHeaders(Arrays.asList("*")) - .withMethods(Arrays.asList("DELETE", "GET", "OPTIONS", "PATCH", "POST", "PUT")).withMaxAge(1440) - .withAllowCredentials(false)) - .withExportConfiguration( - new ServiceExportConfigurationInfo().withStorageAccountName("existingStorageAccount")) - .withPrivateEndpointConnections(Arrays.asList()).withPublicNetworkAccess(PublicNetworkAccess.DISABLED)) - .create(); - } - - /* - * x-ms-original-file: - * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/legacy/ - * ServiceCreateMinimum.json - */ - /** - * Sample code: Create or Update a service with minimum parameters. - * - * @param manager Entry point to HealthcareApisManager. - */ - public static void createOrUpdateAServiceWithMinimumParameters( - com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) { - manager.services().define("service2").withRegion("westus2").withExistingResourceGroup("rg1") - .withKind(Kind.FHIR_R4).withTags(mapOf()) - .withProperties(new ServicesProperties().withAccessPolicies( - Arrays.asList(new ServiceAccessPolicyEntry().withObjectId("c487e7d1-3210-41a3-8ccc-e9372b78da47")))) - .create(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} 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 722e64b45afb..229f5d4672a4 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 @@ -10,7 +10,7 @@ public final class ServicesDeleteSamples { /* * x-ms-original-file: - * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/legacy/ + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/legacy/ * ServiceDelete.json */ /** 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 b42b8f775533..a7b1e949ec1c 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 @@ -10,7 +10,7 @@ public final class ServicesGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/legacy/ + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/legacy/ * ServiceGet.json */ /** @@ -24,7 +24,7 @@ public static void getMetadata(com.azure.resourcemanager.healthcareapis.Healthca /* * x-ms-original-file: - * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/legacy/ + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/legacy/ * ServiceGetInDataSovereignRegionWithCmkEnabled.json */ /** 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 fcbd05f646eb..e9bcf1c468d1 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 @@ -10,7 +10,7 @@ public final class ServicesListByResourceGroupSamples { /* * x-ms-original-file: - * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/legacy/ + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/legacy/ * ServiceListByResourceGroup.json */ /** 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 776542775545..52a70af53987 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 @@ -10,7 +10,7 @@ public final class ServicesListSamples { /* * x-ms-original-file: - * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/legacy/ + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/legacy/ * ServiceList.json */ /** 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 6de1233d0ba6..b1682551b506 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 @@ -4,7 +4,7 @@ package com.azure.resourcemanager.healthcareapis.generated; -import com.azure.resourcemanager.healthcareapis.models.ServicesDescription; +import com.azure.resourcemanager.healthcareapis.models.ServicesPatchDescription; import java.util.HashMap; import java.util.Map; @@ -14,7 +14,7 @@ public final class ServicesUpdateSamples { /* * x-ms-original-file: - * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/legacy/ + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/legacy/ * ServicePatch.json */ /** @@ -23,9 +23,9 @@ public final class ServicesUpdateSamples { * @param manager Entry point to HealthcareApisManager. */ public static void patchService(com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager) { - ServicesDescription resource = manager.services() - .getByResourceGroupWithResponse("rg1", "service1", com.azure.core.util.Context.NONE).getValue(); - resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); + manager.services().update("rg1", "service1", + new ServicesPatchDescription().withTags(mapOf("tag1", "value1", "tag2", "value2")), + com.azure.core.util.Context.NONE); } // Use "Map.of" if available 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 7df212f6eacc..f45c81163923 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 @@ -14,7 +14,7 @@ public final class WorkspacePrivateEndpointConnectionsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/privatelink/ + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/privatelink/ * WorkspaceCreatePrivateEndpointConnection.json */ /** 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 fc6fad0816d9..181cc0181766 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 @@ -10,7 +10,7 @@ public final class WorkspacePrivateEndpointConnectionsDeleteSamples { /* * x-ms-original-file: - * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/privatelink/ + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/privatelink/ * WorkspaceDeletePrivateEndpointConnection.json */ /** 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 a5738fc46b9a..c95e94b35c22 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 @@ -10,7 +10,7 @@ public final class WorkspacePrivateEndpointConnectionsGetSamples { /* * x-ms-original-file: - * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/privatelink/ + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/privatelink/ * WorkspaceGetPrivateEndpointConnection.json */ /** 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 ab058933d314..3c3da4f61cfd 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 @@ -10,7 +10,7 @@ public final class WorkspacePrivateEndpointConnectionsListByWorkspaceSamples { /* * x-ms-original-file: - * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/privatelink/ + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/privatelink/ * WorkspaceListPrivateEndpointConnections.json */ /** 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 8fb268034f67..8bdc5786855c 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 @@ -10,7 +10,7 @@ public final class WorkspacePrivateLinkResourcesGetSamples { /* * x-ms-original-file: - * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/privatelink/ + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/privatelink/ * WorkspacePrivateLinkResourceGet.json */ /** 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 059e1eabad63..dc7b4ef1f830 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 @@ -10,7 +10,7 @@ public final class WorkspacePrivateLinkResourcesListByWorkspaceSamples { /* * x-ms-original-file: - * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/privatelink/ + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/privatelink/ * PrivateLinkResourcesListByWorkspace.json */ /** 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 31f3cddb5513..d50abbbca3b2 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 @@ -12,7 +12,7 @@ public final class WorkspacesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/workspaces/ + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/workspaces/ * Workspaces_Create.json */ /** 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 9925b3aa526b..e287ddbdbeed 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 @@ -10,7 +10,7 @@ public final class WorkspacesDeleteSamples { /* * x-ms-original-file: - * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/workspaces/ + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/workspaces/ * Workspaces_Delete.json */ /** 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 6ff8f7a5c8a0..0a2671ec6bab 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 @@ -10,7 +10,7 @@ public final class WorkspacesGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/workspaces/ + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/workspaces/ * Workspaces_Get.json */ /** 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 bf8dab762cf1..28e5d0483670 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 @@ -10,7 +10,7 @@ public final class WorkspacesListByResourceGroupSamples { /* * x-ms-original-file: - * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/workspaces/ + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/workspaces/ * Workspaces_ListByResourceGroup.json */ /** 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 065e081c487f..65ed2e17e367 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 @@ -10,7 +10,7 @@ public final class WorkspacesListSamples { /* * x-ms-original-file: - * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/workspaces/ + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/workspaces/ * Workspaces_ListBySubscription.json */ /** 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 c887c0c2607e..f7bc0ac41f41 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 @@ -14,7 +14,7 @@ public final class WorkspacesUpdateSamples { /* * x-ms-original-file: - * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2023-11-01/examples/workspaces/ + * specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2024-03-01/examples/workspaces/ * Workspaces_Patch.json */ /** diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/CheckNameAvailabilityParametersTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/CheckNameAvailabilityParametersTests.java deleted file mode 100644 index 2b25f1243501..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/CheckNameAvailabilityParametersTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.models.CheckNameAvailabilityParameters; -import org.junit.jupiter.api.Assertions; - -public final class CheckNameAvailabilityParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CheckNameAvailabilityParameters model - = BinaryData.fromString("{\"name\":\"hqjbasvmsmj\",\"type\":\"ulngsntn\"}") - .toObject(CheckNameAvailabilityParameters.class); - Assertions.assertEquals("hqjbasvmsmj", model.name()); - Assertions.assertEquals("ulngsntn", model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CheckNameAvailabilityParameters model - = new CheckNameAvailabilityParameters().withName("hqjbasvmsmj").withType("ulngsntn"); - model = BinaryData.fromObject(model).toObject(CheckNameAvailabilityParameters.class); - Assertions.assertEquals("hqjbasvmsmj", model.name()); - Assertions.assertEquals("ulngsntn", model.type()); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/DicomServiceAuthenticationConfigurationTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/DicomServiceAuthenticationConfigurationTests.java deleted file mode 100644 index d25d998045d7..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/DicomServiceAuthenticationConfigurationTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.models.DicomServiceAuthenticationConfiguration; - -public final class DicomServiceAuthenticationConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DicomServiceAuthenticationConfiguration model - = BinaryData.fromString("{\"authority\":\"lrsf\",\"audiences\":[\"pwvlqdq\"]}") - .toObject(DicomServiceAuthenticationConfiguration.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DicomServiceAuthenticationConfiguration model = new DicomServiceAuthenticationConfiguration(); - model = BinaryData.fromObject(model).toObject(DicomServiceAuthenticationConfiguration.class); - } -} 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 deleted file mode 100644 index 9bd748c2722b..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/DicomServicePatchResourceTests.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.models.DicomServicePatchResource; -import com.azure.resourcemanager.healthcareapis.models.ServiceManagedIdentityIdentity; -import com.azure.resourcemanager.healthcareapis.models.ServiceManagedIdentityType; -import com.azure.resourcemanager.healthcareapis.models.UserAssignedIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DicomServicePatchResourceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DicomServicePatchResource model = BinaryData.fromString( - "{\"identity\":{\"type\":\"SystemAssigned\",\"principalId\":\"09317483-38b0-42b4-aa00-440ca6c94e0d\",\"tenantId\":\"0837a303-d55f-4c91-94af-e69b653c351c\",\"userAssignedIdentities\":{\"vtq\":{\"principalId\":\"1b7246ed-edf5-4d4f-8330-830c0d7167e3\",\"clientId\":\"03fb7d78-590b-412d-88c7-ec82fda165f7\"},\"buynhijggm\":{\"principalId\":\"fc92f197-1c23-4c0f-9940-89243ccaa960\",\"clientId\":\"bcd92d7f-8e1a-493d-8b2d-6d2903507345\"},\"siarbutrcvpn\":{\"principalId\":\"29edb6b5-4912-4ed1-a9f4-c0eef38cd5a2\",\"clientId\":\"bfb50d1a-d934-4035-9ad4-c93cd8b0c1ec\"}}},\"tags\":{\"nlankxmyskpb\":\"mhjrunmpxttdbhr\",\"nrs\":\"enbtkcxywny\",\"lhaaxdbabp\":\"nlqidybyxczf\"}}") - .toObject(DicomServicePatchResource.class); - Assertions.assertEquals("mhjrunmpxttdbhr", model.tags().get("nlankxmyskpb")); - Assertions.assertEquals(ServiceManagedIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DicomServicePatchResource model = new DicomServicePatchResource() - .withTags(mapOf("nlankxmyskpb", "mhjrunmpxttdbhr", "nrs", "enbtkcxywny", "lhaaxdbabp", "nlqidybyxczf")) - .withIdentity(new ServiceManagedIdentityIdentity().withType(ServiceManagedIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("vtq", new UserAssignedIdentity(), "buynhijggm", - new UserAssignedIdentity(), "siarbutrcvpn", new UserAssignedIdentity()))); - model = BinaryData.fromObject(model).toObject(DicomServicePatchResource.class); - Assertions.assertEquals("mhjrunmpxttdbhr", model.tags().get("nlankxmyskpb")); - Assertions.assertEquals(ServiceManagedIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/DicomServicesDeleteMockTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/DicomServicesDeleteMockTests.java deleted file mode 100644 index 95446bb391c8..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/DicomServicesDeleteMockTests.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.healthcareapis.HealthcareApisManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DicomServicesDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HealthcareApisManager manager = HealthcareApisManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.dicomServices().delete("qojpy", "vgtrdcnifmzzs", "ymbrnysuxmpraf", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/FhirDestinationsListByIotConnectorMockTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/FhirDestinationsListByIotConnectorMockTests.java deleted file mode 100644 index fe3ce611b64b..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/FhirDestinationsListByIotConnectorMockTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.healthcareapis.HealthcareApisManager; -import com.azure.resourcemanager.healthcareapis.models.IotFhirDestination; -import com.azure.resourcemanager.healthcareapis.models.IotIdentityResolutionType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class FhirDestinationsListByIotConnectorMockTests { - @Test - public void testListByIotConnector() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"value\":[{\"properties\":{\"resourceIdentityResolutionType\":\"Lookup\",\"fhirServiceResourceId\":\"qfr\",\"fhirMapping\":{\"content\":\"datalkzmegnitgvkxl\"},\"provisioningState\":\"Warned\"},\"location\":\"fegcea\",\"etag\":\"xwh\",\"id\":\"ansym\",\"name\":\"yqhlwigdivbkbx\",\"type\":\"omfaj\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HealthcareApisManager manager = HealthcareApisManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.fhirDestinations().listByIotConnector("lrcivtsoxfrke", - "xpmyyefrpmpdnq", "skawaoqvmmb", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("xwh", response.iterator().next().etag()); - Assertions.assertEquals("fegcea", response.iterator().next().location()); - Assertions.assertEquals(IotIdentityResolutionType.LOOKUP, - response.iterator().next().resourceIdentityResolutionType()); - Assertions.assertEquals("qfr", response.iterator().next().fhirServiceResourceId()); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/FhirServiceAcrConfigurationTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/FhirServiceAcrConfigurationTests.java deleted file mode 100644 index 7cda2396efd2..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/FhirServiceAcrConfigurationTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.models.FhirServiceAcrConfiguration; -import com.azure.resourcemanager.healthcareapis.models.ServiceOciArtifactEntry; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class FhirServiceAcrConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FhirServiceAcrConfiguration model = BinaryData.fromString( - "{\"loginServers\":[\"slpmutwuo\",\"grpkhjwniyqs\",\"uicpd\"],\"ociArtifacts\":[{\"loginServer\":\"zl\",\"imageName\":\"bmpaxmodfvu\",\"digest\":\"yw\"},{\"loginServer\":\"pfvmwyhrfou\",\"imageName\":\"taakc\",\"digest\":\"iyzvqtmnub\"},{\"loginServer\":\"kpzksmondjmq\",\"imageName\":\"vypomgkopkwho\",\"digest\":\"pajqgxysm\"},{\"loginServer\":\"mbqfqvmk\",\"imageName\":\"oz\",\"digest\":\"vhelxprglyatdd\"}]}") - .toObject(FhirServiceAcrConfiguration.class); - Assertions.assertEquals("slpmutwuo", model.loginServers().get(0)); - Assertions.assertEquals("zl", model.ociArtifacts().get(0).loginServer()); - Assertions.assertEquals("bmpaxmodfvu", model.ociArtifacts().get(0).imageName()); - Assertions.assertEquals("yw", model.ociArtifacts().get(0).digest()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FhirServiceAcrConfiguration model - = new FhirServiceAcrConfiguration().withLoginServers(Arrays.asList("slpmutwuo", "grpkhjwniyqs", "uicpd")) - .withOciArtifacts(Arrays.asList( - new ServiceOciArtifactEntry().withLoginServer("zl").withImageName("bmpaxmodfvu").withDigest("yw"), - new ServiceOciArtifactEntry().withLoginServer("pfvmwyhrfou").withImageName("taakc") - .withDigest("iyzvqtmnub"), - new ServiceOciArtifactEntry().withLoginServer("kpzksmondjmq").withImageName("vypomgkopkwho") - .withDigest("pajqgxysm"), - new ServiceOciArtifactEntry().withLoginServer("mbqfqvmk").withImageName("oz") - .withDigest("vhelxprglyatdd"))); - model = BinaryData.fromObject(model).toObject(FhirServiceAcrConfiguration.class); - Assertions.assertEquals("slpmutwuo", model.loginServers().get(0)); - Assertions.assertEquals("zl", model.ociArtifacts().get(0).loginServer()); - Assertions.assertEquals("bmpaxmodfvu", model.ociArtifacts().get(0).imageName()); - Assertions.assertEquals("yw", model.ociArtifacts().get(0).digest()); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/FhirServiceAuthenticationConfigurationTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/FhirServiceAuthenticationConfigurationTests.java deleted file mode 100644 index d57aec554afc..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/FhirServiceAuthenticationConfigurationTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.models.FhirServiceAuthenticationConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class FhirServiceAuthenticationConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FhirServiceAuthenticationConfiguration model = BinaryData - .fromString("{\"authority\":\"cbcuejrjxgciqi\",\"audience\":\"hos\",\"smartProxyEnabled\":true}") - .toObject(FhirServiceAuthenticationConfiguration.class); - Assertions.assertEquals("cbcuejrjxgciqi", model.authority()); - Assertions.assertEquals("hos", model.audience()); - Assertions.assertEquals(true, model.smartProxyEnabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FhirServiceAuthenticationConfiguration model = new FhirServiceAuthenticationConfiguration() - .withAuthority("cbcuejrjxgciqi").withAudience("hos").withSmartProxyEnabled(true); - model = BinaryData.fromObject(model).toObject(FhirServiceAuthenticationConfiguration.class); - Assertions.assertEquals("cbcuejrjxgciqi", model.authority()); - Assertions.assertEquals("hos", model.audience()); - Assertions.assertEquals(true, model.smartProxyEnabled()); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/FhirServiceExportConfigurationTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/FhirServiceExportConfigurationTests.java deleted file mode 100644 index 01566cbb8c99..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/FhirServiceExportConfigurationTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.models.FhirServiceExportConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class FhirServiceExportConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FhirServiceExportConfiguration model = BinaryData.fromString("{\"storageAccountName\":\"pqwcciuqgbdbutau\"}") - .toObject(FhirServiceExportConfiguration.class); - Assertions.assertEquals("pqwcciuqgbdbutau", model.storageAccountName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FhirServiceExportConfiguration model - = new FhirServiceExportConfiguration().withStorageAccountName("pqwcciuqgbdbutau"); - model = BinaryData.fromObject(model).toObject(FhirServiceExportConfiguration.class); - Assertions.assertEquals("pqwcciuqgbdbutau", model.storageAccountName()); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/FhirServiceImportConfigurationTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/FhirServiceImportConfigurationTests.java deleted file mode 100644 index a7ff8f5085f4..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/FhirServiceImportConfigurationTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.models.FhirServiceImportConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class FhirServiceImportConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FhirServiceImportConfiguration model = BinaryData - .fromString("{\"integrationDataStore\":\"chkoymkcdyh\",\"initialImportMode\":true,\"enabled\":true}") - .toObject(FhirServiceImportConfiguration.class); - Assertions.assertEquals("chkoymkcdyh", model.integrationDataStore()); - Assertions.assertEquals(true, model.initialImportMode()); - Assertions.assertEquals(true, model.enabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FhirServiceImportConfiguration model = new FhirServiceImportConfiguration() - .withIntegrationDataStore("chkoymkcdyh").withInitialImportMode(true).withEnabled(true); - model = BinaryData.fromObject(model).toObject(FhirServiceImportConfiguration.class); - Assertions.assertEquals("chkoymkcdyh", model.integrationDataStore()); - Assertions.assertEquals(true, model.initialImportMode()); - Assertions.assertEquals(true, model.enabled()); - } -} 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 deleted file mode 100644 index 06214e1c1ea7..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/FhirServicePatchResourceTests.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.models.FhirServicePatchResource; -import com.azure.resourcemanager.healthcareapis.models.ServiceManagedIdentityIdentity; -import com.azure.resourcemanager.healthcareapis.models.ServiceManagedIdentityType; -import com.azure.resourcemanager.healthcareapis.models.UserAssignedIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class FhirServicePatchResourceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FhirServicePatchResource model = BinaryData.fromString( - "{\"identity\":{\"type\":\"UserAssigned\",\"principalId\":\"c6a2aafa-5694-4560-8ec0-2e5b72d03d93\",\"tenantId\":\"79d425cb-1d61-40cf-a641-1d55a108a6b7\",\"userAssignedIdentities\":{\"fovljxyws\":{\"principalId\":\"5e476d69-3e0a-458e-9e90-9fe3925a1538\",\"clientId\":\"67f8c7fa-c883-4f28-b1db-1418760dfea5\"},\"yrs\":{\"principalId\":\"abc341ca-dee0-4ec2-8cce-82e12713d144\",\"clientId\":\"2e8e697f-d7d1-4ffb-a82a-f7969e7b1c75\"},\"ytgadgvraeaene\":{\"principalId\":\"c49d1c22-243f-4fff-a432-5e1a6172b12c\",\"clientId\":\"f10e97fe-6d9b-4921-a7d6-a456f4ef644a\"}}},\"tags\":{\"jfqka\":\"arrwlquu\"}}") - .toObject(FhirServicePatchResource.class); - Assertions.assertEquals("arrwlquu", model.tags().get("jfqka")); - Assertions.assertEquals(ServiceManagedIdentityType.USER_ASSIGNED, model.identity().type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FhirServicePatchResource model = new FhirServicePatchResource().withTags(mapOf("jfqka", "arrwlquu")) - .withIdentity(new ServiceManagedIdentityIdentity().withType(ServiceManagedIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("fovljxyws", new UserAssignedIdentity(), "yrs", - new UserAssignedIdentity(), "ytgadgvraeaene", new UserAssignedIdentity()))); - model = BinaryData.fromObject(model).toObject(FhirServicePatchResource.class); - Assertions.assertEquals("arrwlquu", model.tags().get("jfqka")); - Assertions.assertEquals(ServiceManagedIdentityType.USER_ASSIGNED, model.identity().type()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/FhirServicesDeleteMockTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/FhirServicesDeleteMockTests.java deleted file mode 100644 index bfb493facfd9..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/FhirServicesDeleteMockTests.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.healthcareapis.HealthcareApisManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class FhirServicesDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HealthcareApisManager manager = HealthcareApisManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.fhirServices().delete("kpn", "zaapmudqmeqwi", "pibudqwyxebeybpm", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ImplementationGuidesConfigurationTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ImplementationGuidesConfigurationTests.java deleted file mode 100644 index 55acb9b482f6..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ImplementationGuidesConfigurationTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.models.ImplementationGuidesConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class ImplementationGuidesConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImplementationGuidesConfiguration model - = BinaryData.fromString("{\"usCoreMissingData\":true}").toObject(ImplementationGuidesConfiguration.class); - Assertions.assertEquals(true, model.usCoreMissingData()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImplementationGuidesConfiguration model = new ImplementationGuidesConfiguration().withUsCoreMissingData(true); - model = BinaryData.fromObject(model).toObject(ImplementationGuidesConfiguration.class); - Assertions.assertEquals(true, model.usCoreMissingData()); - } -} 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 deleted file mode 100644 index 9e8ee8efdbbc..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorCollectionTests.java +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.fluent.models.IotConnectorInner; -import com.azure.resourcemanager.healthcareapis.models.IotConnectorCollection; -import com.azure.resourcemanager.healthcareapis.models.IotEventHubIngestionEndpointConfiguration; -import com.azure.resourcemanager.healthcareapis.models.IotMappingProperties; -import com.azure.resourcemanager.healthcareapis.models.ServiceManagedIdentityIdentity; -import com.azure.resourcemanager.healthcareapis.models.ServiceManagedIdentityType; -import com.azure.resourcemanager.healthcareapis.models.UserAssignedIdentity; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class IotConnectorCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IotConnectorCollection model = BinaryData.fromString( - "{\"nextLink\":\"wrqlfktsthsuco\",\"value\":[{\"properties\":{\"provisioningState\":\"Warned\",\"ingestionEndpointConfiguration\":{\"eventHubName\":\"t\",\"consumerGroup\":\"wwrq\",\"fullyQualifiedEventHubNamespace\":\"edckzywbiexzfey\"},\"deviceMapping\":{\"content\":\"dataxibxujwbhqwalm\"}},\"identity\":{\"type\":\"SystemAssigned\",\"principalId\":\"63faff57-a7ba-4c02-a86f-2870db96de3f\",\"tenantId\":\"11985b44-de42-41ba-a00c-6217f3e38480\",\"userAssignedIdentities\":{\"zjancuxr\":{\"principalId\":\"382d19f2-1931-493c-902a-6957cfa5e183\",\"clientId\":\"ae6080d1-f72f-4d39-925f-d1b6ec77423a\"},\"bavxbniwdjswzt\":{\"principalId\":\"8dd3f28f-0dc7-4bc9-968d-cc3a0dbb8793\",\"clientId\":\"28ca6ad7-443e-4720-9f88-3206f174a19c\"},\"pgn\":{\"principalId\":\"a93a737e-d1d8-452a-a4af-f6b16d93a9b3\",\"clientId\":\"4e1d5c40-a93e-494b-9aa6-6c9313fcc093\"}}},\"tags\":{\"pzxbz\":\"x\"},\"location\":\"zabglcuhxwt\",\"etag\":\"yqiklbbovplwzb\",\"id\":\"vgyuguos\",\"name\":\"mkfssxqukkfplgm\",\"type\":\"sxnkjzkdeslpvlo\"},{\"properties\":{\"provisioningState\":\"Deprovisioned\",\"ingestionEndpointConfiguration\":{\"eventHubName\":\"hxpkd\",\"consumerGroup\":\"baiuebbaumny\",\"fullyQualifiedEventHubNamespace\":\"ped\"},\"deviceMapping\":{\"content\":\"datanabckhsmtx\"}},\"identity\":{\"type\":\"UserAssigned\",\"principalId\":\"9d601b96-31f4-4e4b-b5ba-5e93177b0ae4\",\"tenantId\":\"36604fa7-99db-4d96-86f5-a4c82ef10e8c\",\"userAssignedIdentities\":{\"esap\":{\"principalId\":\"e11dd9e7-f674-4ca6-8969-7002b120c9a8\",\"clientId\":\"bab8bd32-5444-497b-a800-011f4587bffd\"},\"dqmh\":{\"principalId\":\"030505f5-a14d-40c2-a282-6c5b83401a74\",\"clientId\":\"b351c856-8f18-4675-8d50-b879279c683d\"},\"htldwk\":{\"principalId\":\"d4cd2a1d-af5a-4d2c-b519-dbb604a6b529\",\"clientId\":\"f6b62d92-be41-41a8-a3b0-9e2d75d96cad\"},\"uutkncw\":{\"principalId\":\"180084fd-8cda-4768-8178-9053f8cf914e\",\"clientId\":\"2d13b710-231d-423a-a387-8d4bdd35ed31\"}}},\"tags\":{\"sx\":\"svlxotogtwrup\",\"kvceoveilovnotyf\":\"nmic\",\"k\":\"fcnj\",\"kphywpnvjto\":\"nxdhbt\"},\"location\":\"ermclfplphoxuscr\",\"etag\":\"bgyepsbj\",\"id\":\"azqugxywpmueefj\",\"name\":\"wfqkquj\",\"type\":\"dsuyonobgla\"},{\"properties\":{\"provisioningState\":\"Accepted\",\"ingestionEndpointConfiguration\":{\"eventHubName\":\"cmgyud\",\"consumerGroup\":\"tlmoyrx\",\"fullyQualifiedEventHubNamespace\":\"fudwpznt\"},\"deviceMapping\":{\"content\":\"datazhlrqjb\"}},\"identity\":{\"type\":\"None\",\"principalId\":\"f27fc3af-b8ad-4b98-9f88-8714b3130e1a\",\"tenantId\":\"1e16b2da-d03c-483e-81bc-c23a1144d07a\",\"userAssignedIdentities\":{\"bkyvp\":{\"principalId\":\"fa934386-50e0-48e0-b7e3-abbe60487139\",\"clientId\":\"ca4f08fd-7d7b-437b-953f-e452188f4d88\"},\"n\":{\"principalId\":\"a6584d48-83c8-4209-8b66-f0e43f5107a6\",\"clientId\":\"456134a3-c25b-4ece-bb06-cfa57d46994e\"}}},\"tags\":{\"kafkuwbcrnwbm\":\"p\",\"us\":\"hhseyv\",\"ofmxagkvtmelmqkr\":\"tslhspkdeem\"},\"location\":\"hvljuahaquh\",\"etag\":\"hmdua\",\"id\":\"aex\",\"name\":\"pvfadmwsrcr\",\"type\":\"vxpvgomz\"},{\"properties\":{\"provisioningState\":\"SystemMaintenance\",\"ingestionEndpointConfiguration\":{\"eventHubName\":\"wbnb\",\"consumerGroup\":\"ldawkzbaliourqha\",\"fullyQualifiedEventHubNamespace\":\"uhashsfwx\"},\"deviceMapping\":{\"content\":\"dataw\"}},\"identity\":{\"type\":\"SystemAssigned,UserAssigned\",\"principalId\":\"61af33ad-31cb-495f-84ee-7b66713875b9\",\"tenantId\":\"9bb9741c-8823-496b-9cd3-343cf70a8c75\",\"userAssignedIdentities\":{\"xdje\":{\"principalId\":\"d69eac14-8630-4165-87ad-2d642ffe978e\",\"clientId\":\"977e1f6e-eb04-437c-a2fe-fc8901838abe\"},\"ucww\":{\"principalId\":\"0001cc13-4807-45c2-9418-97bab1631e3b\",\"clientId\":\"e34bef8a-7b02-4939-95cc-6287755d247e\"},\"vbvmeu\":{\"principalId\":\"1a42cdad-1646-4765-9910-143d03cd0eed\",\"clientId\":\"52ed49c1-2732-4a7c-8439-48735496a095\"}}},\"tags\":{\"eiotwmcdytdx\":\"vyhzceuojgjrwj\",\"nrjawgqwg\":\"it\",\"klwndnhjdauwhv\":\"hniskxfbkpyc\",\"zbtd\":\"l\"},\"location\":\"ujznb\",\"etag\":\"ow\",\"id\":\"wpr\",\"name\":\"qlveualupjmkh\",\"type\":\"xobbcswsrt\"}]}") - .toObject(IotConnectorCollection.class); - Assertions.assertEquals("wrqlfktsthsuco", model.nextLink()); - Assertions.assertEquals("yqiklbbovplwzb", model.value().get(0).etag()); - Assertions.assertEquals("zabglcuhxwt", model.value().get(0).location()); - Assertions.assertEquals("x", model.value().get(0).tags().get("pzxbz")); - Assertions.assertEquals(ServiceManagedIdentityType.SYSTEM_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("t", model.value().get(0).ingestionEndpointConfiguration().eventHubName()); - Assertions.assertEquals("wwrq", model.value().get(0).ingestionEndpointConfiguration().consumerGroup()); - Assertions.assertEquals("edckzywbiexzfey", - model.value().get(0).ingestionEndpointConfiguration().fullyQualifiedEventHubNamespace()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IotConnectorCollection model - = new IotConnectorCollection().withNextLink("wrqlfktsthsuco") - .withValue( - Arrays.asList( - new IotConnectorInner().withEtag("yqiklbbovplwzb").withLocation("zabglcuhxwt") - .withTags(mapOf("pzxbz", "x")) - .withIdentity(new ServiceManagedIdentityIdentity() - .withType(ServiceManagedIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("zjancuxr", new UserAssignedIdentity(), - "bavxbniwdjswzt", new UserAssignedIdentity(), "pgn", new UserAssignedIdentity()))) - .withIngestionEndpointConfiguration( - new IotEventHubIngestionEndpointConfiguration().withEventHubName("t") - .withConsumerGroup("wwrq").withFullyQualifiedEventHubNamespace("edckzywbiexzfey")) - .withDeviceMapping(new IotMappingProperties().withContent("dataxibxujwbhqwalm")), - new IotConnectorInner().withEtag("bgyepsbj").withLocation("ermclfplphoxuscr") - .withTags(mapOf("sx", "svlxotogtwrup", "kvceoveilovnotyf", "nmic", "k", "fcnj", - "kphywpnvjto", "nxdhbt")) - .withIdentity( - new ServiceManagedIdentityIdentity().withType(ServiceManagedIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("esap", new UserAssignedIdentity(), "dqmh", - new UserAssignedIdentity(), "htldwk", new UserAssignedIdentity(), "uutkncw", - new UserAssignedIdentity()))) - .withIngestionEndpointConfiguration( - new IotEventHubIngestionEndpointConfiguration().withEventHubName("hxpkd") - .withConsumerGroup("baiuebbaumny").withFullyQualifiedEventHubNamespace("ped")) - .withDeviceMapping(new IotMappingProperties().withContent("datanabckhsmtx")), - new IotConnectorInner().withEtag("hmdua").withLocation("hvljuahaquh") - .withTags(mapOf("kafkuwbcrnwbm", "p", "us", "hhseyv", "ofmxagkvtmelmqkr", "tslhspkdeem")) - .withIdentity(new ServiceManagedIdentityIdentity() - .withType(ServiceManagedIdentityType.NONE).withUserAssignedIdentities( - mapOf("bkyvp", new UserAssignedIdentity(), "n", new UserAssignedIdentity()))) - .withIngestionEndpointConfiguration( - new IotEventHubIngestionEndpointConfiguration().withEventHubName("cmgyud") - .withConsumerGroup("tlmoyrx").withFullyQualifiedEventHubNamespace("fudwpznt")) - .withDeviceMapping(new IotMappingProperties().withContent("datazhlrqjb")), - new IotConnectorInner().withEtag("ow").withLocation("ujznb") - .withTags(mapOf("eiotwmcdytdx", "vyhzceuojgjrwj", "nrjawgqwg", "it", "klwndnhjdauwhv", - "hniskxfbkpyc", "zbtd", "l")) - .withIdentity(new ServiceManagedIdentityIdentity() - .withType(ServiceManagedIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("xdje", new UserAssignedIdentity(), "ucww", - new UserAssignedIdentity(), "vbvmeu", new UserAssignedIdentity()))) - .withIngestionEndpointConfiguration(new IotEventHubIngestionEndpointConfiguration() - .withEventHubName("wbnb").withConsumerGroup("ldawkzbaliourqha") - .withFullyQualifiedEventHubNamespace("uhashsfwx")) - .withDeviceMapping(new IotMappingProperties().withContent("dataw")))); - model = BinaryData.fromObject(model).toObject(IotConnectorCollection.class); - Assertions.assertEquals("wrqlfktsthsuco", model.nextLink()); - Assertions.assertEquals("yqiklbbovplwzb", model.value().get(0).etag()); - Assertions.assertEquals("zabglcuhxwt", model.value().get(0).location()); - Assertions.assertEquals("x", model.value().get(0).tags().get("pzxbz")); - Assertions.assertEquals(ServiceManagedIdentityType.SYSTEM_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("t", model.value().get(0).ingestionEndpointConfiguration().eventHubName()); - Assertions.assertEquals("wwrq", model.value().get(0).ingestionEndpointConfiguration().consumerGroup()); - Assertions.assertEquals("edckzywbiexzfey", - model.value().get(0).ingestionEndpointConfiguration().fullyQualifiedEventHubNamespace()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorFhirDestinationsCreateOrUpdateMockTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorFhirDestinationsCreateOrUpdateMockTests.java deleted file mode 100644 index 193a4c373372..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorFhirDestinationsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.healthcareapis.HealthcareApisManager; -import com.azure.resourcemanager.healthcareapis.models.IotFhirDestination; -import com.azure.resourcemanager.healthcareapis.models.IotIdentityResolutionType; -import com.azure.resourcemanager.healthcareapis.models.IotMappingProperties; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class IotConnectorFhirDestinationsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"properties\":{\"resourceIdentityResolutionType\":\"Lookup\",\"fhirServiceResourceId\":\"lhhxudbxvodhtnsi\",\"fhirMapping\":{\"content\":\"datadhzmmesckdlp\"},\"provisioningState\":\"Succeeded\"},\"location\":\"x\",\"etag\":\"ilcfxwmdboxd\",\"id\":\"gsftufqobrjlnacg\",\"name\":\"ckknhxkizvy\",\"type\":\"nrzvuljraaer\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HealthcareApisManager manager = HealthcareApisManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - IotFhirDestination response = manager.iotConnectorFhirDestinations().define("eesvecu") - .withExistingIotconnector("ymerteeammxq", "ekkkzd", "rtkgdojbmxvavref") - .withResourceIdentityResolutionType(IotIdentityResolutionType.LOOKUP).withFhirServiceResourceId("pxtxsuwp") - .withFhirMapping(new IotMappingProperties().withContent("dataujwsawddjibabxvi")).withRegion("zeexavoxtfgle") - .withEtag("m").create(); - - Assertions.assertEquals("ilcfxwmdboxd", response.etag()); - Assertions.assertEquals("x", response.location()); - Assertions.assertEquals(IotIdentityResolutionType.LOOKUP, response.resourceIdentityResolutionType()); - Assertions.assertEquals("lhhxudbxvodhtnsi", response.fhirServiceResourceId()); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorFhirDestinationsDeleteMockTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorFhirDestinationsDeleteMockTests.java deleted file mode 100644 index 76cdd1623ade..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorFhirDestinationsDeleteMockTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.healthcareapis.HealthcareApisManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class IotConnectorFhirDestinationsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HealthcareApisManager manager = HealthcareApisManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.iotConnectorFhirDestinations().delete("nsmjbnkppxynen", "svxeizzgwklnsr", "ffeycx", "ktp", - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorFhirDestinationsGetWithResponseMockTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorFhirDestinationsGetWithResponseMockTests.java deleted file mode 100644 index a35fbcb488b6..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorFhirDestinationsGetWithResponseMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.healthcareapis.HealthcareApisManager; -import com.azure.resourcemanager.healthcareapis.models.IotFhirDestination; -import com.azure.resourcemanager.healthcareapis.models.IotIdentityResolutionType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class IotConnectorFhirDestinationsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"properties\":{\"resourceIdentityResolutionType\":\"Lookup\",\"fhirServiceResourceId\":\"dyvvjskgfmocwahp\",\"fhirMapping\":{\"content\":\"dataatjeaahh\"},\"provisioningState\":\"Moving\"},\"location\":\"akz\",\"etag\":\"bjjidjksyxky\",\"id\":\"vxevblb\",\"name\":\"ednljl\",\"type\":\"geuaulx\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HealthcareApisManager manager = HealthcareApisManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - IotFhirDestination response = manager.iotConnectorFhirDestinations() - .getWithResponse("wasqvdaeyyg", "xakjsqzhzb", "zkgimsid", "asi", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("bjjidjksyxky", response.etag()); - Assertions.assertEquals("akz", response.location()); - Assertions.assertEquals(IotIdentityResolutionType.LOOKUP, response.resourceIdentityResolutionType()); - Assertions.assertEquals("dyvvjskgfmocwahp", response.fhirServiceResourceId()); - } -} 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 deleted file mode 100644 index 8d7428efe6e6..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorInnerTests.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.fluent.models.IotConnectorInner; -import com.azure.resourcemanager.healthcareapis.models.IotEventHubIngestionEndpointConfiguration; -import com.azure.resourcemanager.healthcareapis.models.IotMappingProperties; -import com.azure.resourcemanager.healthcareapis.models.ServiceManagedIdentityIdentity; -import com.azure.resourcemanager.healthcareapis.models.ServiceManagedIdentityType; -import com.azure.resourcemanager.healthcareapis.models.UserAssignedIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class IotConnectorInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IotConnectorInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Deprovisioned\",\"ingestionEndpointConfiguration\":{\"eventHubName\":\"bpbewtghfgb\",\"consumerGroup\":\"gw\",\"fullyQualifiedEventHubNamespace\":\"vlvqhjkbegi\"},\"deviceMapping\":{\"content\":\"datamxiebw\"}},\"identity\":{\"type\":\"SystemAssigned\",\"principalId\":\"a0cddd50-7cc5-402e-8a74-da6110fc6422\",\"tenantId\":\"e5d63ea9-1515-4bca-8c3f-3284c67c5eaf\",\"userAssignedIdentities\":{\"rtzju\":{\"principalId\":\"162b90a1-4d9a-4fdf-acbd-27f744bb79f2\",\"clientId\":\"d699535f-b8d3-4a3c-97c4-e5b96a424f6d\"},\"yzm\":{\"principalId\":\"5f689c38-7d5b-4db8-8666-01c9b7d91dea\",\"clientId\":\"d753c9e0-1047-4b8a-8b5e-458907c7a87a\"},\"ongmtsa\":{\"principalId\":\"a13196c4-0bca-4635-8883-309cf89795df\",\"clientId\":\"ab7ebb04-65c7-4217-80c7-f6b96fe66116\"}}},\"tags\":{\"xqpsrknftguv\":\"bp\",\"riwwroy\":\"iuhprwmdyvxqta\",\"bycnojvkn\":\"bexrmcq\",\"qsgzvahapj\":\"e\"},\"location\":\"hpvgqz\",\"etag\":\"rvxdjzlmw\",\"id\":\"xkvugfhzov\",\"name\":\"wjvzunluthnn\",\"type\":\"rnxipei\"}") - .toObject(IotConnectorInner.class); - Assertions.assertEquals("rvxdjzlmw", model.etag()); - Assertions.assertEquals("hpvgqz", model.location()); - Assertions.assertEquals("bp", model.tags().get("xqpsrknftguv")); - Assertions.assertEquals(ServiceManagedIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - Assertions.assertEquals("bpbewtghfgb", model.ingestionEndpointConfiguration().eventHubName()); - Assertions.assertEquals("gw", model.ingestionEndpointConfiguration().consumerGroup()); - Assertions.assertEquals("vlvqhjkbegi", - model.ingestionEndpointConfiguration().fullyQualifiedEventHubNamespace()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IotConnectorInner model = new IotConnectorInner().withEtag("rvxdjzlmw").withLocation("hpvgqz") - .withTags( - mapOf("xqpsrknftguv", "bp", "riwwroy", "iuhprwmdyvxqta", "bycnojvkn", "bexrmcq", "qsgzvahapj", "e")) - .withIdentity(new ServiceManagedIdentityIdentity().withType(ServiceManagedIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("rtzju", new UserAssignedIdentity(), "yzm", - new UserAssignedIdentity(), "ongmtsa", new UserAssignedIdentity()))) - .withIngestionEndpointConfiguration( - new IotEventHubIngestionEndpointConfiguration().withEventHubName("bpbewtghfgb").withConsumerGroup("gw") - .withFullyQualifiedEventHubNamespace("vlvqhjkbegi")) - .withDeviceMapping(new IotMappingProperties().withContent("datamxiebw")); - model = BinaryData.fromObject(model).toObject(IotConnectorInner.class); - Assertions.assertEquals("rvxdjzlmw", model.etag()); - Assertions.assertEquals("hpvgqz", model.location()); - Assertions.assertEquals("bp", model.tags().get("xqpsrknftguv")); - Assertions.assertEquals(ServiceManagedIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - Assertions.assertEquals("bpbewtghfgb", model.ingestionEndpointConfiguration().eventHubName()); - Assertions.assertEquals("gw", model.ingestionEndpointConfiguration().consumerGroup()); - Assertions.assertEquals("vlvqhjkbegi", - model.ingestionEndpointConfiguration().fullyQualifiedEventHubNamespace()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} 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 deleted file mode 100644 index 8b04cf07b193..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorPatchResourceTests.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.models.IotConnectorPatchResource; -import com.azure.resourcemanager.healthcareapis.models.ServiceManagedIdentityIdentity; -import com.azure.resourcemanager.healthcareapis.models.ServiceManagedIdentityType; -import com.azure.resourcemanager.healthcareapis.models.UserAssignedIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class IotConnectorPatchResourceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IotConnectorPatchResource model = BinaryData.fromString( - "{\"identity\":{\"type\":\"SystemAssigned,UserAssigned\",\"principalId\":\"52eafb81-8285-4515-a15c-a3f20344a4d4\",\"tenantId\":\"a9ba01d1-d710-4438-b30d-e61262fb3605\",\"userAssignedIdentities\":{\"yexz\":{\"principalId\":\"ce3f42ea-1499-4be7-adbc-02491a1242ac\",\"clientId\":\"521b7d9d-3899-41a0-babe-f998c827d493\"},\"ixhnrztf\":{\"principalId\":\"2d5170f1-759d-40c5-aa91-8fd64c40d31b\",\"clientId\":\"0ba3a7fb-e059-412d-be59-639ea013965e\"},\"bnxknalaulppg\":{\"principalId\":\"3451f2f7-4cd9-4b5c-af23-81b173dfd961\",\"clientId\":\"1b466a83-a0ef-4a1d-ace3-abc4a1b51f07\"},\"pnapnyiropuh\":{\"principalId\":\"9755c4a1-a929-4bd3-be7d-d8f202f70933\",\"clientId\":\"9fc27027-e738-4e80-aeec-077a5a83b1e3\"}}},\"tags\":{\"v\":\"vpgylgqgitxmed\",\"zzhxgktrm\":\"slynqwwnc\"}}") - .toObject(IotConnectorPatchResource.class); - Assertions.assertEquals("vpgylgqgitxmed", model.tags().get("v")); - Assertions.assertEquals(ServiceManagedIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IotConnectorPatchResource model - = new IotConnectorPatchResource().withTags(mapOf("v", "vpgylgqgitxmed", "zzhxgktrm", "slynqwwnc")) - .withIdentity(new ServiceManagedIdentityIdentity() - .withType(ServiceManagedIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED).withUserAssignedIdentities( - mapOf("yexz", new UserAssignedIdentity(), "ixhnrztf", new UserAssignedIdentity(), - "bnxknalaulppg", new UserAssignedIdentity(), "pnapnyiropuh", new UserAssignedIdentity()))); - model = BinaryData.fromObject(model).toObject(IotConnectorPatchResource.class); - Assertions.assertEquals("vpgylgqgitxmed", model.tags().get("v")); - Assertions.assertEquals(ServiceManagedIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorPropertiesTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorPropertiesTests.java deleted file mode 100644 index 40fe01550288..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorPropertiesTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.fluent.models.IotConnectorProperties; -import com.azure.resourcemanager.healthcareapis.models.IotEventHubIngestionEndpointConfiguration; -import com.azure.resourcemanager.healthcareapis.models.IotMappingProperties; -import org.junit.jupiter.api.Assertions; - -public final class IotConnectorPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IotConnectorProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Creating\",\"ingestionEndpointConfiguration\":{\"eventHubName\":\"aejxd\",\"consumerGroup\":\"tskzbbtdzumveek\",\"fullyQualifiedEventHubNamespace\":\"wozuhkf\"},\"deviceMapping\":{\"content\":\"datajyofdxluusdtto\"}}") - .toObject(IotConnectorProperties.class); - Assertions.assertEquals("aejxd", model.ingestionEndpointConfiguration().eventHubName()); - Assertions.assertEquals("tskzbbtdzumveek", model.ingestionEndpointConfiguration().consumerGroup()); - Assertions.assertEquals("wozuhkf", model.ingestionEndpointConfiguration().fullyQualifiedEventHubNamespace()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IotConnectorProperties model = new IotConnectorProperties() - .withIngestionEndpointConfiguration( - new IotEventHubIngestionEndpointConfiguration().withEventHubName("aejxd") - .withConsumerGroup("tskzbbtdzumveek").withFullyQualifiedEventHubNamespace("wozuhkf")) - .withDeviceMapping(new IotMappingProperties().withContent("datajyofdxluusdtto")); - model = BinaryData.fromObject(model).toObject(IotConnectorProperties.class); - Assertions.assertEquals("aejxd", model.ingestionEndpointConfiguration().eventHubName()); - Assertions.assertEquals("tskzbbtdzumveek", model.ingestionEndpointConfiguration().consumerGroup()); - Assertions.assertEquals("wozuhkf", model.ingestionEndpointConfiguration().fullyQualifiedEventHubNamespace()); - } -} 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 deleted file mode 100644 index ad0ce2149404..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.healthcareapis.HealthcareApisManager; -import com.azure.resourcemanager.healthcareapis.models.IotConnector; -import com.azure.resourcemanager.healthcareapis.models.IotEventHubIngestionEndpointConfiguration; -import com.azure.resourcemanager.healthcareapis.models.IotMappingProperties; -import com.azure.resourcemanager.healthcareapis.models.ServiceManagedIdentityIdentity; -import com.azure.resourcemanager.healthcareapis.models.ServiceManagedIdentityType; -import com.azure.resourcemanager.healthcareapis.models.UserAssignedIdentity; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class IotConnectorsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"ingestionEndpointConfiguration\":{\"eventHubName\":\"mewip\",\"consumerGroup\":\"ekdxuku\",\"fullyQualifiedEventHubNamespace\":\"sjjxundxgketw\"},\"deviceMapping\":{\"content\":\"datazjhfjmhvv\"}},\"identity\":{\"type\":\"SystemAssigned,UserAssigned\",\"principalId\":\"b1b61bb2-8b2b-4b88-b806-97655f4eaa7f\",\"tenantId\":\"6ca7f7f2-b933-4535-a8d7-0a6c0280b935\",\"userAssignedIdentities\":{\"sx\":{\"principalId\":\"90e7fbd7-1731-4869-b59e-d5f3b89282fa\",\"clientId\":\"0f20c557-1dd6-49b7-b1d2-90a7f71c3d0c\"},\"fbuzjyihs\":{\"principalId\":\"e5d0a9da-1768-4b01-a548-496c90b18ad9\",\"clientId\":\"523aabec-8c5a-4611-aec2-75616dcfbde1\"}}},\"tags\":{\"nsqyrpfoobrltt\":\"hudypohyuemsl\"},\"location\":\"sjnygqdnfwqzdzgt\",\"etag\":\"axhnfh\",\"id\":\"lyvijouwiv\",\"name\":\"xoyzunbix\",\"type\":\"rtikvcpwpg\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HealthcareApisManager manager = HealthcareApisManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - IotConnector response = manager.iotConnectors().define("jhlfzswpchwahf").withExistingWorkspace("cse", "hwwn") - .withRegion("xgsg").withTags(mapOf("uvyinzqodfvpgs", "fiwrxgkn")).withEtag("fgzdjtxvz") - .withIdentity(new ServiceManagedIdentityIdentity().withType(ServiceManagedIdentityType.NONE) - .withUserAssignedIdentities( - mapOf("jzh", new UserAssignedIdentity(), "xfpxtgqscja", new UserAssignedIdentity(), - "juhdqazkmtgguwpi", new UserAssignedIdentity(), "jcivmmg", new UserAssignedIdentity()))) - .withIngestionEndpointConfiguration( - new IotEventHubIngestionEndpointConfiguration().withEventHubName("epgfew") - .withConsumerGroup("wlyxgncxyk").withFullyQualifiedEventHubNamespace("djhlimm")) - .withDeviceMapping(new IotMappingProperties().withContent("dataf")).create(); - - Assertions.assertEquals("axhnfh", response.etag()); - Assertions.assertEquals("sjnygqdnfwqzdzgt", response.location()); - Assertions.assertEquals("hudypohyuemsl", response.tags().get("nsqyrpfoobrltt")); - Assertions.assertEquals(ServiceManagedIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, response.identity().type()); - Assertions.assertEquals("mewip", response.ingestionEndpointConfiguration().eventHubName()); - Assertions.assertEquals("ekdxuku", response.ingestionEndpointConfiguration().consumerGroup()); - Assertions.assertEquals("sjjxundxgketw", - response.ingestionEndpointConfiguration().fullyQualifiedEventHubNamespace()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorsDeleteMockTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorsDeleteMockTests.java deleted file mode 100644 index b4939da81310..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorsDeleteMockTests.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.healthcareapis.HealthcareApisManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class IotConnectorsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HealthcareApisManager manager = HealthcareApisManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.iotConnectors().delete("talhsnvkcdmxzr", "oaimlnw", "aaomylweazu", com.azure.core.util.Context.NONE); - - } -} 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 deleted file mode 100644 index fd7cb2d2bc9d..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorsGetWithResponseMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.healthcareapis.HealthcareApisManager; -import com.azure.resourcemanager.healthcareapis.models.IotConnector; -import com.azure.resourcemanager.healthcareapis.models.ServiceManagedIdentityType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class IotConnectorsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"properties\":{\"provisioningState\":\"Verifying\",\"ingestionEndpointConfiguration\":{\"eventHubName\":\"iut\",\"consumerGroup\":\"apzhyrpetoge\",\"fullyQualifiedEventHubNamespace\":\"oxslh\"},\"deviceMapping\":{\"content\":\"datalabrqnkkzjcjbtr\"}},\"identity\":{\"type\":\"None\",\"principalId\":\"d78ae8dd-217a-4a15-9ccd-85e5b8452f9f\",\"tenantId\":\"0284beaa-26e5-4181-b468-2dda2dc544c5\",\"userAssignedIdentities\":{\"jj\":{\"principalId\":\"c2bb81f9-9bfd-4608-8098-c12d94265257\",\"clientId\":\"0654e397-b4f6-4435-93a6-c5400cde3391\"},\"qbeitpkxztmoob\":{\"principalId\":\"907053a4-86fa-45d9-bb81-8cc6a0c89451\",\"clientId\":\"0a48781e-b687-45ca-92b8-b9f0e4736c40\"}}},\"tags\":{\"pimaqxzhemjyh\":\"tidgfcwq\"},\"location\":\"uj\",\"etag\":\"t\",\"id\":\"kozzwculkb\",\"name\":\"wpfaj\",\"type\":\"jwltlwtjjgu\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HealthcareApisManager manager = HealthcareApisManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - IotConnector response = manager.iotConnectors() - .getWithResponse("qcuubgqibrta", "metttwgd", "lqxihhrmooiz", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("t", response.etag()); - Assertions.assertEquals("uj", response.location()); - Assertions.assertEquals("tidgfcwq", response.tags().get("pimaqxzhemjyh")); - Assertions.assertEquals(ServiceManagedIdentityType.NONE, response.identity().type()); - Assertions.assertEquals("iut", response.ingestionEndpointConfiguration().eventHubName()); - Assertions.assertEquals("apzhyrpetoge", response.ingestionEndpointConfiguration().consumerGroup()); - Assertions.assertEquals("oxslh", response.ingestionEndpointConfiguration().fullyQualifiedEventHubNamespace()); - } -} 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 deleted file mode 100644 index 52a385a4f7d3..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotConnectorsListByWorkspaceMockTests.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.healthcareapis.HealthcareApisManager; -import com.azure.resourcemanager.healthcareapis.models.IotConnector; -import com.azure.resourcemanager.healthcareapis.models.ServiceManagedIdentityType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class IotConnectorsListByWorkspaceMockTests { - @Test - public void testListByWorkspace() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"ingestionEndpointConfiguration\":{\"eventHubName\":\"ogfnzjvusf\",\"consumerGroup\":\"dmozu\",\"fullyQualifiedEventHubNamespace\":\"lfsbtkadpysow\"},\"deviceMapping\":{\"content\":\"datagkbugrjqct\"}},\"identity\":{\"type\":\"None\",\"principalId\":\"3f82d37a-4df2-4924-89a5-a9c92f3283a8\",\"tenantId\":\"2b92efa9-288e-4e47-a976-6254e012463c\",\"userAssignedIdentities\":{\"ypefojyqdhcupl\":{\"principalId\":\"61ccb15a-2a2c-42b9-8e3c-8957de0b2cf2\",\"clientId\":\"aa1fd0cc-df27-4312-b4cf-a7f74775d946\"},\"cwkhihi\":{\"principalId\":\"d4ed73c9-4efb-4fee-8573-a797972c376a\",\"clientId\":\"e4c5cde5-ac0c-4845-9795-108bce58e9e4\"},\"zdsqtzbsrgnow\":{\"principalId\":\"728d72db-8d68-4604-b75d-7ab8b741bd35\",\"clientId\":\"5264019b-0820-4ad5-b1f8-423c21e30067\"},\"fgmvecactxmwo\":{\"principalId\":\"289bffa9-ea93-471d-ab02-fe66abf9092f\",\"clientId\":\"6704adc3-1cd2-471b-8b83-9fc80082b40a\"}}},\"tags\":{\"ekqvgqouwif\":\"owcluqo\"},\"location\":\"pjwyiv\",\"etag\":\"kfxcvhrfs\",\"id\":\"huagrttikteusqc\",\"name\":\"kvyklxubyjaffmm\",\"type\":\"bl\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HealthcareApisManager manager = HealthcareApisManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.iotConnectors().listByWorkspace("ydwqfbylyrf", "iagtc", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("kfxcvhrfs", response.iterator().next().etag()); - Assertions.assertEquals("pjwyiv", response.iterator().next().location()); - Assertions.assertEquals("owcluqo", response.iterator().next().tags().get("ekqvgqouwif")); - Assertions.assertEquals(ServiceManagedIdentityType.NONE, response.iterator().next().identity().type()); - Assertions.assertEquals("ogfnzjvusf", - response.iterator().next().ingestionEndpointConfiguration().eventHubName()); - Assertions.assertEquals("dmozu", response.iterator().next().ingestionEndpointConfiguration().consumerGroup()); - Assertions.assertEquals("lfsbtkadpysow", - response.iterator().next().ingestionEndpointConfiguration().fullyQualifiedEventHubNamespace()); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotDestinationPropertiesTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotDestinationPropertiesTests.java deleted file mode 100644 index 51a7b2a991b8..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotDestinationPropertiesTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.models.IotDestinationProperties; - -public final class IotDestinationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IotDestinationProperties model - = BinaryData.fromString("{\"provisioningState\":\"Warned\"}").toObject(IotDestinationProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IotDestinationProperties model = new IotDestinationProperties(); - model = BinaryData.fromObject(model).toObject(IotDestinationProperties.class); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotEventHubIngestionEndpointConfigurationTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotEventHubIngestionEndpointConfigurationTests.java deleted file mode 100644 index 19fee6024623..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotEventHubIngestionEndpointConfigurationTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.models.IotEventHubIngestionEndpointConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class IotEventHubIngestionEndpointConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IotEventHubIngestionEndpointConfiguration model = BinaryData.fromString( - "{\"eventHubName\":\"aboekqv\",\"consumerGroup\":\"lns\",\"fullyQualifiedEventHubNamespace\":\"bxwyjsflhhcaa\"}") - .toObject(IotEventHubIngestionEndpointConfiguration.class); - Assertions.assertEquals("aboekqv", model.eventHubName()); - Assertions.assertEquals("lns", model.consumerGroup()); - Assertions.assertEquals("bxwyjsflhhcaa", model.fullyQualifiedEventHubNamespace()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IotEventHubIngestionEndpointConfiguration model = new IotEventHubIngestionEndpointConfiguration() - .withEventHubName("aboekqv").withConsumerGroup("lns").withFullyQualifiedEventHubNamespace("bxwyjsflhhcaa"); - model = BinaryData.fromObject(model).toObject(IotEventHubIngestionEndpointConfiguration.class); - Assertions.assertEquals("aboekqv", model.eventHubName()); - Assertions.assertEquals("lns", model.consumerGroup()); - Assertions.assertEquals("bxwyjsflhhcaa", model.fullyQualifiedEventHubNamespace()); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotFhirDestinationCollectionTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotFhirDestinationCollectionTests.java deleted file mode 100644 index 9c69f95c12ed..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotFhirDestinationCollectionTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.fluent.models.IotFhirDestinationInner; -import com.azure.resourcemanager.healthcareapis.models.IotFhirDestinationCollection; -import com.azure.resourcemanager.healthcareapis.models.IotIdentityResolutionType; -import com.azure.resourcemanager.healthcareapis.models.IotMappingProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class IotFhirDestinationCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IotFhirDestinationCollection model = BinaryData.fromString( - "{\"nextLink\":\"cnapkteoell\",\"value\":[{\"properties\":{\"resourceIdentityResolutionType\":\"Lookup\",\"fhirServiceResourceId\":\"d\",\"fhirMapping\":{\"content\":\"datapfqbuaceopzf\"},\"provisioningState\":\"Verifying\"},\"location\":\"ao\",\"etag\":\"pcqeqx\",\"id\":\"lzdahzxctobgbkdm\",\"name\":\"izpost\",\"type\":\"grcfb\"},{\"properties\":{\"resourceIdentityResolutionType\":\"Lookup\",\"fhirServiceResourceId\":\"rmfqjhhkxbpvj\",\"fhirMapping\":{\"content\":\"datajhxxjyn\"},\"provisioningState\":\"Canceled\"},\"location\":\"krtswbxqz\",\"etag\":\"zjf\",\"id\":\"uvjfdxxive\",\"name\":\"vtcqaqtdo\",\"type\":\"mcbxvwvxysl\"},{\"properties\":{\"resourceIdentityResolutionType\":\"Create\",\"fhirServiceResourceId\":\"hsfxoblytkb\",\"fhirMapping\":{\"content\":\"datape\"},\"provisioningState\":\"Moving\"},\"location\":\"krvrns\",\"etag\":\"hqjohxcrsbfova\",\"id\":\"rruvwbhsq\",\"name\":\"sub\",\"type\":\"gjb\"}]}") - .toObject(IotFhirDestinationCollection.class); - Assertions.assertEquals("cnapkteoell", model.nextLink()); - Assertions.assertEquals("pcqeqx", model.value().get(0).etag()); - Assertions.assertEquals("ao", model.value().get(0).location()); - Assertions.assertEquals(IotIdentityResolutionType.LOOKUP, - model.value().get(0).resourceIdentityResolutionType()); - Assertions.assertEquals("d", model.value().get(0).fhirServiceResourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IotFhirDestinationCollection model - = new IotFhirDestinationCollection().withNextLink("cnapkteoell") - .withValue(Arrays.asList(new IotFhirDestinationInner().withEtag("pcqeqx").withLocation("ao") - .withResourceIdentityResolutionType(IotIdentityResolutionType.LOOKUP).withFhirServiceResourceId("d") - .withFhirMapping(new IotMappingProperties().withContent("datapfqbuaceopzf")), - new IotFhirDestinationInner().withEtag("zjf").withLocation("krtswbxqz") - .withResourceIdentityResolutionType(IotIdentityResolutionType.LOOKUP) - .withFhirServiceResourceId("rmfqjhhkxbpvj") - .withFhirMapping(new IotMappingProperties().withContent("datajhxxjyn")), - new IotFhirDestinationInner().withEtag("hqjohxcrsbfova").withLocation("krvrns") - .withResourceIdentityResolutionType(IotIdentityResolutionType.CREATE) - .withFhirServiceResourceId("hsfxoblytkb") - .withFhirMapping(new IotMappingProperties().withContent("datape")))); - model = BinaryData.fromObject(model).toObject(IotFhirDestinationCollection.class); - Assertions.assertEquals("cnapkteoell", model.nextLink()); - Assertions.assertEquals("pcqeqx", model.value().get(0).etag()); - Assertions.assertEquals("ao", model.value().get(0).location()); - Assertions.assertEquals(IotIdentityResolutionType.LOOKUP, - model.value().get(0).resourceIdentityResolutionType()); - Assertions.assertEquals("d", model.value().get(0).fhirServiceResourceId()); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotFhirDestinationInnerTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotFhirDestinationInnerTests.java deleted file mode 100644 index 2847d2f00dd1..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotFhirDestinationInnerTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.fluent.models.IotFhirDestinationInner; -import com.azure.resourcemanager.healthcareapis.models.IotIdentityResolutionType; -import com.azure.resourcemanager.healthcareapis.models.IotMappingProperties; -import org.junit.jupiter.api.Assertions; - -public final class IotFhirDestinationInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IotFhirDestinationInner model = BinaryData.fromString( - "{\"properties\":{\"resourceIdentityResolutionType\":\"Create\",\"fhirServiceResourceId\":\"xb\",\"fhirMapping\":{\"content\":\"databsrfbj\"},\"provisioningState\":\"Accepted\"},\"location\":\"sotftpvj\",\"etag\":\"exilzznfqqnvwpmq\",\"id\":\"aruoujmkcjhwqyt\",\"name\":\"r\",\"type\":\"bnw\"}") - .toObject(IotFhirDestinationInner.class); - Assertions.assertEquals("exilzznfqqnvwpmq", model.etag()); - Assertions.assertEquals("sotftpvj", model.location()); - Assertions.assertEquals(IotIdentityResolutionType.CREATE, model.resourceIdentityResolutionType()); - Assertions.assertEquals("xb", model.fhirServiceResourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IotFhirDestinationInner model = new IotFhirDestinationInner().withEtag("exilzznfqqnvwpmq") - .withLocation("sotftpvj").withResourceIdentityResolutionType(IotIdentityResolutionType.CREATE) - .withFhirServiceResourceId("xb").withFhirMapping(new IotMappingProperties().withContent("databsrfbj")); - model = BinaryData.fromObject(model).toObject(IotFhirDestinationInner.class); - Assertions.assertEquals("exilzznfqqnvwpmq", model.etag()); - Assertions.assertEquals("sotftpvj", model.location()); - Assertions.assertEquals(IotIdentityResolutionType.CREATE, model.resourceIdentityResolutionType()); - Assertions.assertEquals("xb", model.fhirServiceResourceId()); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotFhirDestinationPropertiesTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotFhirDestinationPropertiesTests.java deleted file mode 100644 index 69ab33aeddd0..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotFhirDestinationPropertiesTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.fluent.models.IotFhirDestinationProperties; -import com.azure.resourcemanager.healthcareapis.models.IotIdentityResolutionType; -import com.azure.resourcemanager.healthcareapis.models.IotMappingProperties; -import org.junit.jupiter.api.Assertions; - -public final class IotFhirDestinationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IotFhirDestinationProperties model = BinaryData.fromString( - "{\"resourceIdentityResolutionType\":\"Lookup\",\"fhirServiceResourceId\":\"wgdrjervnaenqp\",\"fhirMapping\":{\"content\":\"dataindoygmifthnzd\"},\"provisioningState\":\"Accepted\"}") - .toObject(IotFhirDestinationProperties.class); - Assertions.assertEquals(IotIdentityResolutionType.LOOKUP, model.resourceIdentityResolutionType()); - Assertions.assertEquals("wgdrjervnaenqp", model.fhirServiceResourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IotFhirDestinationProperties model - = new IotFhirDestinationProperties().withResourceIdentityResolutionType(IotIdentityResolutionType.LOOKUP) - .withFhirServiceResourceId("wgdrjervnaenqp") - .withFhirMapping(new IotMappingProperties().withContent("dataindoygmifthnzd")); - model = BinaryData.fromObject(model).toObject(IotFhirDestinationProperties.class); - Assertions.assertEquals(IotIdentityResolutionType.LOOKUP, model.resourceIdentityResolutionType()); - Assertions.assertEquals("wgdrjervnaenqp", model.fhirServiceResourceId()); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotMappingPropertiesTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotMappingPropertiesTests.java deleted file mode 100644 index e4775da2817a..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/IotMappingPropertiesTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.models.IotMappingProperties; - -public final class IotMappingPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IotMappingProperties model - = BinaryData.fromString("{\"content\":\"datajixisxyawjoyaqcs\"}").toObject(IotMappingProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IotMappingProperties model = new IotMappingProperties().withContent("datajixisxyawjoyaqcs"); - model = BinaryData.fromObject(model).toObject(IotMappingProperties.class); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ListOperationsTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ListOperationsTests.java deleted file mode 100644 index 6e4d3d70c756..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ListOperationsTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.models.ListOperations; -import org.junit.jupiter.api.Assertions; - -public final class ListOperationsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ListOperations model = BinaryData.fromString( - "{\"value\":[{\"name\":\"ipfpubji\",\"isDataAction\":false,\"display\":{\"provider\":\"tohqkvpuvksgp\",\"resource\":\"aknynfsynljphuop\",\"operation\":\"dlqiyntorzih\",\"description\":\"osjswsr\"},\"origin\":\"lyzrpzbchckqqzqi\",\"actionType\":\"Internal\",\"properties\":{\"serviceSpecification\":{\"logSpecifications\":[{},{},{},{}],\"metricSpecifications\":[{},{}]}}},{\"name\":\"nkedyatrwyhqmib\",\"isDataAction\":false,\"display\":{\"provider\":\"tsmypyynpcdp\",\"resource\":\"nzgmwznmabik\",\"operation\":\"orgjhxbldt\",\"description\":\"wrlkdmtn\"},\"origin\":\"ok\",\"actionType\":\"Internal\",\"properties\":{\"serviceSpecification\":{\"logSpecifications\":[{},{}],\"metricSpecifications\":[{},{}]}}}],\"nextLink\":\"y\"}") - .toObject(ListOperations.class); - Assertions.assertEquals("y", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ListOperations model = new ListOperations().withNextLink("y"); - model = BinaryData.fromObject(model).toObject(ListOperations.class); - Assertions.assertEquals("y", model.nextLink()); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/LocationBasedResourceTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/LocationBasedResourceTests.java deleted file mode 100644 index d48957bd9ed6..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/LocationBasedResourceTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.models.LocationBasedResource; -import org.junit.jupiter.api.Assertions; - -public final class LocationBasedResourceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LocationBasedResource model = BinaryData.fromString( - "{\"location\":\"sle\",\"etag\":\"vxyqjpkcattpngjc\",\"id\":\"cczsq\",\"name\":\"jh\",\"type\":\"mdajv\"}") - .toObject(LocationBasedResource.class); - Assertions.assertEquals("vxyqjpkcattpngjc", model.etag()); - Assertions.assertEquals("sle", model.location()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LocationBasedResource model = new LocationBasedResource().withEtag("vxyqjpkcattpngjc").withLocation("sle"); - model = BinaryData.fromObject(model).toObject(LocationBasedResource.class); - Assertions.assertEquals("vxyqjpkcattpngjc", model.etag()); - Assertions.assertEquals("sle", model.location()); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/LogSpecificationTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/LogSpecificationTests.java deleted file mode 100644 index a9ab8ec14159..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/LogSpecificationTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.models.LogSpecification; -import org.junit.jupiter.api.Assertions; - -public final class LogSpecificationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LogSpecification model - = BinaryData.fromString("{\"name\":\"szywkbirryu\",\"displayName\":\"lhkjoqrvqq\",\"blobDuration\":\"t\"}") - .toObject(LogSpecification.class); - Assertions.assertEquals("szywkbirryu", model.name()); - Assertions.assertEquals("lhkjoqrvqq", model.displayName()); - Assertions.assertEquals("t", model.blobDuration()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LogSpecification model - = new LogSpecification().withName("szywkbirryu").withDisplayName("lhkjoqrvqq").withBlobDuration("t"); - model = BinaryData.fromObject(model).toObject(LogSpecification.class); - Assertions.assertEquals("szywkbirryu", model.name()); - Assertions.assertEquals("lhkjoqrvqq", model.displayName()); - Assertions.assertEquals("t", model.blobDuration()); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/MetricDimensionTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/MetricDimensionTests.java deleted file mode 100644 index a2ccbbcf8d50..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/MetricDimensionTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.models.MetricDimension; -import org.junit.jupiter.api.Assertions; - -public final class MetricDimensionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MetricDimension model = BinaryData - .fromString( - "{\"name\":\"jxeznoigbrnjwmw\",\"displayName\":\"nbsazejjoqkag\",\"toBeExportedForShoebox\":false}") - .toObject(MetricDimension.class); - Assertions.assertEquals("jxeznoigbrnjwmw", model.name()); - Assertions.assertEquals("nbsazejjoqkag", model.displayName()); - Assertions.assertEquals(false, model.toBeExportedForShoebox()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MetricDimension model = new MetricDimension().withName("jxeznoigbrnjwmw").withDisplayName("nbsazejjoqkag") - .withToBeExportedForShoebox(false); - model = BinaryData.fromObject(model).toObject(MetricDimension.class); - Assertions.assertEquals("jxeznoigbrnjwmw", model.name()); - Assertions.assertEquals("nbsazejjoqkag", model.displayName()); - Assertions.assertEquals(false, model.toBeExportedForShoebox()); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/MetricSpecificationTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/MetricSpecificationTests.java deleted file mode 100644 index 147cf88bfdac..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/MetricSpecificationTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.models.MetricDimension; -import com.azure.resourcemanager.healthcareapis.models.MetricSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class MetricSpecificationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MetricSpecification model = BinaryData.fromString( - "{\"name\":\"nrvgoupmfiibfgg\",\"displayName\":\"ool\",\"displayDescription\":\"wxkvtkkgll\",\"unit\":\"jygvjayvbl\",\"category\":\"vkzuhbxvvyhgso\",\"aggregationType\":\"yrqufegxuvwz\",\"supportedAggregationTypes\":[\"hlmctlpdngitvgb\",\"hrixkwmy\",\"jejveg\"],\"supportedTimeGrainTypes\":[\"pna\",\"xexccbdreaxhcexd\",\"rvqahqkghtpwi\",\"nhyjsv\"],\"fillGapWithZero\":true,\"metricFilterPattern\":\"z\",\"dimensions\":[{\"name\":\"owvrvmtgjqppyos\",\"displayName\":\"on\",\"toBeExportedForShoebox\":true},{\"name\":\"gfipnsxk\",\"displayName\":\"waekrrjreafxtsgu\",\"toBeExportedForShoebox\":true}],\"isInternal\":false,\"sourceMdmAccount\":\"kkxwslol\",\"sourceMdmNamespace\":\"pvuzlmv\",\"enableRegionalMdmAccount\":true,\"resourceIdDimensionNameOverride\":\"ktgplcr\"}") - .toObject(MetricSpecification.class); - Assertions.assertEquals("nrvgoupmfiibfgg", model.name()); - Assertions.assertEquals("ool", model.displayName()); - Assertions.assertEquals("wxkvtkkgll", model.displayDescription()); - Assertions.assertEquals("jygvjayvbl", model.unit()); - Assertions.assertEquals("vkzuhbxvvyhgso", model.category()); - Assertions.assertEquals("yrqufegxuvwz", model.aggregationType()); - Assertions.assertEquals("hlmctlpdngitvgb", model.supportedAggregationTypes().get(0)); - Assertions.assertEquals("pna", model.supportedTimeGrainTypes().get(0)); - Assertions.assertEquals(true, model.fillGapWithZero()); - Assertions.assertEquals("z", model.metricFilterPattern()); - Assertions.assertEquals("owvrvmtgjqppyos", model.dimensions().get(0).name()); - Assertions.assertEquals("on", model.dimensions().get(0).displayName()); - Assertions.assertEquals(true, model.dimensions().get(0).toBeExportedForShoebox()); - Assertions.assertEquals(false, model.isInternal()); - Assertions.assertEquals("kkxwslol", model.sourceMdmAccount()); - Assertions.assertEquals("pvuzlmv", model.sourceMdmNamespace()); - Assertions.assertEquals(true, model.enableRegionalMdmAccount()); - Assertions.assertEquals("ktgplcr", model.resourceIdDimensionNameOverride()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MetricSpecification model = new MetricSpecification().withName("nrvgoupmfiibfgg").withDisplayName("ool") - .withDisplayDescription("wxkvtkkgll").withUnit("jygvjayvbl").withCategory("vkzuhbxvvyhgso") - .withAggregationType("yrqufegxuvwz") - .withSupportedAggregationTypes(Arrays.asList("hlmctlpdngitvgb", "hrixkwmy", "jejveg")) - .withSupportedTimeGrainTypes(Arrays.asList("pna", "xexccbdreaxhcexd", "rvqahqkghtpwi", "nhyjsv")) - .withFillGapWithZero(true).withMetricFilterPattern("z") - .withDimensions(Arrays.asList( - new MetricDimension().withName("owvrvmtgjqppyos").withDisplayName("on") - .withToBeExportedForShoebox(true), - new MetricDimension().withName("gfipnsxk").withDisplayName("waekrrjreafxtsgu") - .withToBeExportedForShoebox(true))) - .withIsInternal(false).withSourceMdmAccount("kkxwslol").withSourceMdmNamespace("pvuzlmv") - .withEnableRegionalMdmAccount(true).withResourceIdDimensionNameOverride("ktgplcr"); - model = BinaryData.fromObject(model).toObject(MetricSpecification.class); - Assertions.assertEquals("nrvgoupmfiibfgg", model.name()); - Assertions.assertEquals("ool", model.displayName()); - Assertions.assertEquals("wxkvtkkgll", model.displayDescription()); - Assertions.assertEquals("jygvjayvbl", model.unit()); - Assertions.assertEquals("vkzuhbxvvyhgso", model.category()); - Assertions.assertEquals("yrqufegxuvwz", model.aggregationType()); - Assertions.assertEquals("hlmctlpdngitvgb", model.supportedAggregationTypes().get(0)); - Assertions.assertEquals("pna", model.supportedTimeGrainTypes().get(0)); - Assertions.assertEquals(true, model.fillGapWithZero()); - Assertions.assertEquals("z", model.metricFilterPattern()); - Assertions.assertEquals("owvrvmtgjqppyos", model.dimensions().get(0).name()); - Assertions.assertEquals("on", model.dimensions().get(0).displayName()); - Assertions.assertEquals(true, model.dimensions().get(0).toBeExportedForShoebox()); - Assertions.assertEquals(false, model.isInternal()); - Assertions.assertEquals("kkxwslol", model.sourceMdmAccount()); - Assertions.assertEquals("pvuzlmv", model.sourceMdmNamespace()); - Assertions.assertEquals(true, model.enableRegionalMdmAccount()); - Assertions.assertEquals("ktgplcr", model.resourceIdDimensionNameOverride()); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/OperationDetailInnerTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/OperationDetailInnerTests.java deleted file mode 100644 index 07bd12d5d7dd..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/OperationDetailInnerTests.java +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.fluent.models.OperationDetailInner; -import com.azure.resourcemanager.healthcareapis.models.LogSpecification; -import com.azure.resourcemanager.healthcareapis.models.MetricDimension; -import com.azure.resourcemanager.healthcareapis.models.MetricSpecification; -import com.azure.resourcemanager.healthcareapis.models.OperationDisplay; -import com.azure.resourcemanager.healthcareapis.models.OperationProperties; -import com.azure.resourcemanager.healthcareapis.models.ServiceSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class OperationDetailInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationDetailInner model = BinaryData.fromString( - "{\"name\":\"ogjltdtbnnhad\",\"isDataAction\":true,\"display\":{\"provider\":\"vcikhnvpamqgx\",\"resource\":\"u\",\"operation\":\"ik\",\"description\":\"ggxkallatmelwuip\"},\"origin\":\"cjzkzivgvvcna\",\"actionType\":\"Internal\",\"properties\":{\"serviceSpecification\":{\"logSpecifications\":[{\"name\":\"mueedndrdvstk\",\"displayName\":\"qtc\",\"blobDuration\":\"alm\"},{\"name\":\"tdaaygdvwvg\",\"displayName\":\"ohgwxrtfudxepxg\",\"blobDuration\":\"agvrvmnpkuk\"}],\"metricSpecifications\":[{\"name\":\"dblx\",\"displayName\":\"imfnjhfjx\",\"displayDescription\":\"szkkfoqre\",\"unit\":\"kzikfjawneaivxwc\",\"category\":\"lpcirelsf\",\"aggregationType\":\"enwabfatk\",\"supportedAggregationTypes\":[\"xbjhwuaanozjosph\",\"oulpjrv\",\"ag\",\"rvimjwosytxitcsk\"],\"supportedTimeGrainTypes\":[\"tq\"],\"fillGapWithZero\":false,\"metricFilterPattern\":\"kkezzikhlyfjhdgq\",\"dimensions\":[{},{}],\"isInternal\":false,\"sourceMdmAccount\":\"nyga\",\"sourceMdmNamespace\":\"idb\",\"enableRegionalMdmAccount\":false,\"resourceIdDimensionNameOverride\":\"pxllrx\"}]}}}") - .toObject(OperationDetailInner.class); - Assertions.assertEquals("mueedndrdvstk", - model.properties().serviceSpecification().logSpecifications().get(0).name()); - Assertions.assertEquals("qtc", - model.properties().serviceSpecification().logSpecifications().get(0).displayName()); - Assertions.assertEquals("alm", - model.properties().serviceSpecification().logSpecifications().get(0).blobDuration()); - Assertions.assertEquals("dblx", model.properties().serviceSpecification().metricSpecifications().get(0).name()); - Assertions.assertEquals("imfnjhfjx", - model.properties().serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions.assertEquals("szkkfoqre", - model.properties().serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("kzikfjawneaivxwc", - model.properties().serviceSpecification().metricSpecifications().get(0).unit()); - Assertions.assertEquals("lpcirelsf", - model.properties().serviceSpecification().metricSpecifications().get(0).category()); - Assertions.assertEquals("enwabfatk", - model.properties().serviceSpecification().metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals("xbjhwuaanozjosph", - model.properties().serviceSpecification().metricSpecifications().get(0).supportedAggregationTypes().get(0)); - Assertions.assertEquals("tq", - model.properties().serviceSpecification().metricSpecifications().get(0).supportedTimeGrainTypes().get(0)); - Assertions.assertEquals(false, - model.properties().serviceSpecification().metricSpecifications().get(0).fillGapWithZero()); - Assertions.assertEquals("kkezzikhlyfjhdgq", - model.properties().serviceSpecification().metricSpecifications().get(0).metricFilterPattern()); - Assertions.assertEquals(false, - model.properties().serviceSpecification().metricSpecifications().get(0).isInternal()); - Assertions.assertEquals("nyga", - model.properties().serviceSpecification().metricSpecifications().get(0).sourceMdmAccount()); - Assertions.assertEquals("idb", - model.properties().serviceSpecification().metricSpecifications().get(0).sourceMdmNamespace()); - Assertions.assertEquals(false, - model.properties().serviceSpecification().metricSpecifications().get(0).enableRegionalMdmAccount()); - Assertions.assertEquals("pxllrx", - model.properties().serviceSpecification().metricSpecifications().get(0).resourceIdDimensionNameOverride()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDetailInner model = new OperationDetailInner().withDisplay(new OperationDisplay()) - .withProperties(new OperationProperties().withServiceSpecification(new ServiceSpecification() - .withLogSpecifications(Arrays.asList( - new LogSpecification().withName("mueedndrdvstk").withDisplayName("qtc").withBlobDuration("alm"), - new LogSpecification().withName("tdaaygdvwvg").withDisplayName("ohgwxrtfudxepxg") - .withBlobDuration("agvrvmnpkuk"))) - .withMetricSpecifications(Arrays.asList(new MetricSpecification().withName("dblx") - .withDisplayName("imfnjhfjx").withDisplayDescription("szkkfoqre").withUnit("kzikfjawneaivxwc") - .withCategory("lpcirelsf").withAggregationType("enwabfatk") - .withSupportedAggregationTypes( - Arrays.asList("xbjhwuaanozjosph", "oulpjrv", "ag", "rvimjwosytxitcsk")) - .withSupportedTimeGrainTypes(Arrays.asList("tq")).withFillGapWithZero(false) - .withMetricFilterPattern("kkezzikhlyfjhdgq") - .withDimensions(Arrays.asList(new MetricDimension(), new MetricDimension())).withIsInternal(false) - .withSourceMdmAccount("nyga").withSourceMdmNamespace("idb").withEnableRegionalMdmAccount(false) - .withResourceIdDimensionNameOverride("pxllrx"))))); - model = BinaryData.fromObject(model).toObject(OperationDetailInner.class); - Assertions.assertEquals("mueedndrdvstk", - model.properties().serviceSpecification().logSpecifications().get(0).name()); - Assertions.assertEquals("qtc", - model.properties().serviceSpecification().logSpecifications().get(0).displayName()); - Assertions.assertEquals("alm", - model.properties().serviceSpecification().logSpecifications().get(0).blobDuration()); - Assertions.assertEquals("dblx", model.properties().serviceSpecification().metricSpecifications().get(0).name()); - Assertions.assertEquals("imfnjhfjx", - model.properties().serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions.assertEquals("szkkfoqre", - model.properties().serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("kzikfjawneaivxwc", - model.properties().serviceSpecification().metricSpecifications().get(0).unit()); - Assertions.assertEquals("lpcirelsf", - model.properties().serviceSpecification().metricSpecifications().get(0).category()); - Assertions.assertEquals("enwabfatk", - model.properties().serviceSpecification().metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals("xbjhwuaanozjosph", - model.properties().serviceSpecification().metricSpecifications().get(0).supportedAggregationTypes().get(0)); - Assertions.assertEquals("tq", - model.properties().serviceSpecification().metricSpecifications().get(0).supportedTimeGrainTypes().get(0)); - Assertions.assertEquals(false, - model.properties().serviceSpecification().metricSpecifications().get(0).fillGapWithZero()); - Assertions.assertEquals("kkezzikhlyfjhdgq", - model.properties().serviceSpecification().metricSpecifications().get(0).metricFilterPattern()); - Assertions.assertEquals(false, - model.properties().serviceSpecification().metricSpecifications().get(0).isInternal()); - Assertions.assertEquals("nyga", - model.properties().serviceSpecification().metricSpecifications().get(0).sourceMdmAccount()); - Assertions.assertEquals("idb", - model.properties().serviceSpecification().metricSpecifications().get(0).sourceMdmNamespace()); - Assertions.assertEquals(false, - model.properties().serviceSpecification().metricSpecifications().get(0).enableRegionalMdmAccount()); - Assertions.assertEquals("pxllrx", - model.properties().serviceSpecification().metricSpecifications().get(0).resourceIdDimensionNameOverride()); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/OperationDisplayTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/OperationDisplayTests.java deleted file mode 100644 index 446fc710abf2..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/OperationDisplayTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.models.OperationDisplay; - -public final class OperationDisplayTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationDisplay model = BinaryData.fromString( - "{\"provider\":\"jmoadsuv\",\"resource\":\"m\",\"operation\":\"dmjsjqb\",\"description\":\"hyxxrwlycoduhpk\"}") - .toObject(OperationDisplay.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDisplay model = new OperationDisplay(); - model = BinaryData.fromObject(model).toObject(OperationDisplay.class); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/OperationPropertiesTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/OperationPropertiesTests.java deleted file mode 100644 index 2f9af7484899..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/OperationPropertiesTests.java +++ /dev/null @@ -1,163 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.models.LogSpecification; -import com.azure.resourcemanager.healthcareapis.models.MetricDimension; -import com.azure.resourcemanager.healthcareapis.models.MetricSpecification; -import com.azure.resourcemanager.healthcareapis.models.OperationProperties; -import com.azure.resourcemanager.healthcareapis.models.ServiceSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class OperationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationProperties model = BinaryData.fromString( - "{\"serviceSpecification\":{\"logSpecifications\":[{\"name\":\"areqna\",\"displayName\":\"qugjhkycube\",\"blobDuration\":\"gssofwq\"},{\"name\":\"qal\",\"displayName\":\"mnjijpxacqqudf\",\"blobDuration\":\"yxbaaabjyvayf\"},{\"name\":\"m\",\"displayName\":\"rtuzqogs\",\"blobDuration\":\"nevfdnw\"},{\"name\":\"mewzsyyc\",\"displayName\":\"zsoibjudpfrxtr\",\"blobDuration\":\"zvaytdwkqbr\"}],\"metricSpecifications\":[{\"name\":\"axhexiilivp\",\"displayName\":\"iirqtd\",\"displayDescription\":\"axoruzfgsquy\",\"unit\":\"rxxle\",\"category\":\"ramxjezwlwnw\",\"aggregationType\":\"qlcvydy\",\"supportedAggregationTypes\":[\"dooaojkniodko\",\"ebwnujhe\"],\"supportedTimeGrainTypes\":[\"bvdkcrodtjin\",\"wj\",\"fltkacjv\",\"f\"],\"fillGapWithZero\":false,\"metricFilterPattern\":\"oakggkfpag\",\"dimensions\":[{\"name\":\"ulpqblylsyxkqjn\",\"displayName\":\"ervtiagxs\",\"toBeExportedForShoebox\":true}],\"isInternal\":false,\"sourceMdmAccount\":\"psbzkfzbeyvpn\",\"sourceMdmNamespace\":\"cvinvkjjxdxrbuuk\",\"enableRegionalMdmAccount\":true,\"resourceIdDimensionNameOverride\":\"wyhmlw\"},{\"name\":\"ztzp\",\"displayName\":\"ncckw\",\"displayDescription\":\"zqwhxxbuyqaxzfeq\",\"unit\":\"ppriol\",\"category\":\"rjaltolmncw\",\"aggregationType\":\"bqwcsdbnwdcf\",\"supportedAggregationTypes\":[\"qdpfuvglsbjjca\",\"vxb\"],\"supportedTimeGrainTypes\":[\"udutnco\",\"mr\",\"xqtvcofu\"],\"fillGapWithZero\":false,\"metricFilterPattern\":\"kgjubgdknnqvsazn\",\"dimensions\":[{\"name\":\"rudsg\",\"displayName\":\"hmk\",\"toBeExportedForShoebox\":true}],\"isInternal\":true,\"sourceMdmAccount\":\"wjue\",\"sourceMdmNamespace\":\"eburu\",\"enableRegionalMdmAccount\":true,\"resourceIdDimensionNameOverride\":\"vsmzlxwab\"},{\"name\":\"oefki\",\"displayName\":\"vtpuqujmqlgk\",\"displayDescription\":\"tndoaongbjc\",\"unit\":\"ujitcjedftww\",\"category\":\"zkoj\",\"aggregationType\":\"c\",\"supportedAggregationTypes\":[\"oqouicybxarzgszu\",\"oxciqopidoamcio\",\"hkh\"],\"supportedTimeGrainTypes\":[\"khnzbonlw\",\"toego\",\"dwbwhkszzcmrvexz\",\"vbtqgsfraoyzk\"],\"fillGapWithZero\":false,\"metricFilterPattern\":\"lmnguxaw\",\"dimensions\":[{\"name\":\"syuuximerq\",\"displayName\":\"bw\",\"toBeExportedForShoebox\":true},{\"name\":\"bykutw\",\"displayName\":\"hpagm\",\"toBeExportedForShoebox\":true},{\"name\":\"dsnfdsdoakgtdl\",\"displayName\":\"kzevdlhewpusds\",\"toBeExportedForShoebox\":true},{\"name\":\"ogvbbejdcngq\",\"displayName\":\"oakufgm\",\"toBeExportedForShoebox\":false}],\"isInternal\":false,\"sourceMdmAccount\":\"grtwae\",\"sourceMdmNamespace\":\"uzkopbminrfd\",\"enableRegionalMdmAccount\":false,\"resourceIdDimensionNameOverride\":\"hhziuief\"},{\"name\":\"bhdmsmlmzqhof\",\"displayName\":\"maequiahxicslfa\",\"displayDescription\":\"z\",\"unit\":\"yylhalnswhccsp\",\"category\":\"aivwitqscywu\",\"aggregationType\":\"woluhczbwemhair\",\"supportedAggregationTypes\":[\"gzd\",\"msweypqwdxggicc\",\"n\"],\"supportedTimeGrainTypes\":[\"uexmkttlst\",\"lzywemhzrncsdtc\"],\"fillGapWithZero\":false,\"metricFilterPattern\":\"ypbsfgytguslfead\",\"dimensions\":[{\"name\":\"ukyhejhzis\",\"displayName\":\"fpel\",\"toBeExportedForShoebox\":false}],\"isInternal\":false,\"sourceMdmAccount\":\"srp\",\"sourceMdmNamespace\":\"ujzra\",\"enableRegionalMdmAccount\":false,\"resourceIdDimensionNameOverride\":\"dw\"}]}}") - .toObject(OperationProperties.class); - Assertions.assertEquals("areqna", model.serviceSpecification().logSpecifications().get(0).name()); - Assertions.assertEquals("qugjhkycube", model.serviceSpecification().logSpecifications().get(0).displayName()); - Assertions.assertEquals("gssofwq", model.serviceSpecification().logSpecifications().get(0).blobDuration()); - Assertions.assertEquals("axhexiilivp", model.serviceSpecification().metricSpecifications().get(0).name()); - Assertions.assertEquals("iirqtd", model.serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions.assertEquals("axoruzfgsquy", - model.serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("rxxle", model.serviceSpecification().metricSpecifications().get(0).unit()); - Assertions.assertEquals("ramxjezwlwnw", model.serviceSpecification().metricSpecifications().get(0).category()); - Assertions.assertEquals("qlcvydy", - model.serviceSpecification().metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals("dooaojkniodko", - model.serviceSpecification().metricSpecifications().get(0).supportedAggregationTypes().get(0)); - Assertions.assertEquals("bvdkcrodtjin", - model.serviceSpecification().metricSpecifications().get(0).supportedTimeGrainTypes().get(0)); - Assertions.assertEquals(false, model.serviceSpecification().metricSpecifications().get(0).fillGapWithZero()); - Assertions.assertEquals("oakggkfpag", - model.serviceSpecification().metricSpecifications().get(0).metricFilterPattern()); - Assertions.assertEquals("ulpqblylsyxkqjn", - model.serviceSpecification().metricSpecifications().get(0).dimensions().get(0).name()); - Assertions.assertEquals("ervtiagxs", - model.serviceSpecification().metricSpecifications().get(0).dimensions().get(0).displayName()); - Assertions.assertEquals(true, - model.serviceSpecification().metricSpecifications().get(0).dimensions().get(0).toBeExportedForShoebox()); - Assertions.assertEquals(false, model.serviceSpecification().metricSpecifications().get(0).isInternal()); - Assertions.assertEquals("psbzkfzbeyvpn", - model.serviceSpecification().metricSpecifications().get(0).sourceMdmAccount()); - Assertions.assertEquals("cvinvkjjxdxrbuuk", - model.serviceSpecification().metricSpecifications().get(0).sourceMdmNamespace()); - Assertions.assertEquals(true, - model.serviceSpecification().metricSpecifications().get(0).enableRegionalMdmAccount()); - Assertions.assertEquals("wyhmlw", - model.serviceSpecification().metricSpecifications().get(0).resourceIdDimensionNameOverride()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationProperties model - = new OperationProperties() - .withServiceSpecification( - new ServiceSpecification().withLogSpecifications(Arrays.asList( - new LogSpecification().withName("areqna").withDisplayName("qugjhkycube") - .withBlobDuration("gssofwq"), - new LogSpecification().withName("qal").withDisplayName("mnjijpxacqqudf") - .withBlobDuration("yxbaaabjyvayf"), - new LogSpecification().withName("m").withDisplayName("rtuzqogs").withBlobDuration("nevfdnw"), - new LogSpecification().withName("mewzsyyc").withDisplayName("zsoibjudpfrxtr") - .withBlobDuration("zvaytdwkqbr"))) - .withMetricSpecifications( - Arrays - .asList( - new MetricSpecification().withName("axhexiilivp").withDisplayName("iirqtd") - .withDisplayDescription("axoruzfgsquy").withUnit("rxxle") - .withCategory("ramxjezwlwnw").withAggregationType("qlcvydy") - .withSupportedAggregationTypes(Arrays.asList("dooaojkniodko", "ebwnujhe")) - .withSupportedTimeGrainTypes( - Arrays.asList("bvdkcrodtjin", "wj", "fltkacjv", "f")) - .withFillGapWithZero(false).withMetricFilterPattern("oakggkfpag") - .withDimensions(Arrays.asList(new MetricDimension().withName("ulpqblylsyxkqjn") - .withDisplayName("ervtiagxs").withToBeExportedForShoebox(true))) - .withIsInternal(false).withSourceMdmAccount("psbzkfzbeyvpn") - .withSourceMdmNamespace("cvinvkjjxdxrbuuk").withEnableRegionalMdmAccount(true) - .withResourceIdDimensionNameOverride("wyhmlw"), - new MetricSpecification().withName("ztzp").withDisplayName("ncckw") - .withDisplayDescription("zqwhxxbuyqaxzfeq").withUnit("ppriol") - .withCategory("rjaltolmncw").withAggregationType("bqwcsdbnwdcf") - .withSupportedAggregationTypes(Arrays.asList("qdpfuvglsbjjca", "vxb")) - .withSupportedTimeGrainTypes(Arrays.asList("udutnco", "mr", "xqtvcofu")) - .withFillGapWithZero(false).withMetricFilterPattern("kgjubgdknnqvsazn") - .withDimensions(Arrays.asList(new MetricDimension().withName("rudsg") - .withDisplayName("hmk").withToBeExportedForShoebox(true))) - .withIsInternal(true).withSourceMdmAccount("wjue") - .withSourceMdmNamespace("eburu").withEnableRegionalMdmAccount(true) - .withResourceIdDimensionNameOverride("vsmzlxwab"), - new MetricSpecification().withName("oefki").withDisplayName("vtpuqujmqlgk") - .withDisplayDescription("tndoaongbjc").withUnit("ujitcjedftww") - .withCategory("zkoj").withAggregationType("c") - .withSupportedAggregationTypes( - Arrays.asList("oqouicybxarzgszu", "oxciqopidoamcio", "hkh")) - .withSupportedTimeGrainTypes( - Arrays.asList("khnzbonlw", "toego", "dwbwhkszzcmrvexz", "vbtqgsfraoyzk")) - .withFillGapWithZero(false).withMetricFilterPattern("lmnguxaw") - .withDimensions(Arrays.asList( - new MetricDimension().withName("syuuximerq").withDisplayName("bw") - .withToBeExportedForShoebox(true), - new MetricDimension().withName("bykutw").withDisplayName("hpagm") - .withToBeExportedForShoebox(true), - new MetricDimension().withName("dsnfdsdoakgtdl") - .withDisplayName("kzevdlhewpusds").withToBeExportedForShoebox(true), - new MetricDimension().withName("ogvbbejdcngq").withDisplayName("oakufgm") - .withToBeExportedForShoebox(false))) - .withIsInternal(false).withSourceMdmAccount("grtwae") - .withSourceMdmNamespace("uzkopbminrfd").withEnableRegionalMdmAccount(false) - .withResourceIdDimensionNameOverride("hhziuief"), - new MetricSpecification().withName("bhdmsmlmzqhof") - .withDisplayName("maequiahxicslfa").withDisplayDescription("z") - .withUnit("yylhalnswhccsp").withCategory("aivwitqscywu") - .withAggregationType("woluhczbwemhair") - .withSupportedAggregationTypes(Arrays.asList("gzd", "msweypqwdxggicc", "n")) - .withSupportedTimeGrainTypes(Arrays.asList("uexmkttlst", "lzywemhzrncsdtc")) - .withFillGapWithZero(false).withMetricFilterPattern("ypbsfgytguslfead") - .withDimensions(Arrays.asList(new MetricDimension().withName("ukyhejhzis") - .withDisplayName("fpel").withToBeExportedForShoebox(false))) - .withIsInternal(false).withSourceMdmAccount("srp") - .withSourceMdmNamespace("ujzra").withEnableRegionalMdmAccount(false) - .withResourceIdDimensionNameOverride("dw")))); - model = BinaryData.fromObject(model).toObject(OperationProperties.class); - Assertions.assertEquals("areqna", model.serviceSpecification().logSpecifications().get(0).name()); - Assertions.assertEquals("qugjhkycube", model.serviceSpecification().logSpecifications().get(0).displayName()); - Assertions.assertEquals("gssofwq", model.serviceSpecification().logSpecifications().get(0).blobDuration()); - Assertions.assertEquals("axhexiilivp", model.serviceSpecification().metricSpecifications().get(0).name()); - Assertions.assertEquals("iirqtd", model.serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions.assertEquals("axoruzfgsquy", - model.serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("rxxle", model.serviceSpecification().metricSpecifications().get(0).unit()); - Assertions.assertEquals("ramxjezwlwnw", model.serviceSpecification().metricSpecifications().get(0).category()); - Assertions.assertEquals("qlcvydy", - model.serviceSpecification().metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals("dooaojkniodko", - model.serviceSpecification().metricSpecifications().get(0).supportedAggregationTypes().get(0)); - Assertions.assertEquals("bvdkcrodtjin", - model.serviceSpecification().metricSpecifications().get(0).supportedTimeGrainTypes().get(0)); - Assertions.assertEquals(false, model.serviceSpecification().metricSpecifications().get(0).fillGapWithZero()); - Assertions.assertEquals("oakggkfpag", - model.serviceSpecification().metricSpecifications().get(0).metricFilterPattern()); - Assertions.assertEquals("ulpqblylsyxkqjn", - model.serviceSpecification().metricSpecifications().get(0).dimensions().get(0).name()); - Assertions.assertEquals("ervtiagxs", - model.serviceSpecification().metricSpecifications().get(0).dimensions().get(0).displayName()); - Assertions.assertEquals(true, - model.serviceSpecification().metricSpecifications().get(0).dimensions().get(0).toBeExportedForShoebox()); - Assertions.assertEquals(false, model.serviceSpecification().metricSpecifications().get(0).isInternal()); - Assertions.assertEquals("psbzkfzbeyvpn", - model.serviceSpecification().metricSpecifications().get(0).sourceMdmAccount()); - Assertions.assertEquals("cvinvkjjxdxrbuuk", - model.serviceSpecification().metricSpecifications().get(0).sourceMdmNamespace()); - Assertions.assertEquals(true, - model.serviceSpecification().metricSpecifications().get(0).enableRegionalMdmAccount()); - Assertions.assertEquals("wyhmlw", - model.serviceSpecification().metricSpecifications().get(0).resourceIdDimensionNameOverride()); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/OperationResultsDescriptionInnerTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/OperationResultsDescriptionInnerTests.java deleted file mode 100644 index 9c8920e69b9a..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/OperationResultsDescriptionInnerTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.fluent.models.OperationResultsDescriptionInner; - -public final class OperationResultsDescriptionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationResultsDescriptionInner model = BinaryData.fromString( - "{\"id\":\"ttaugzxnfaazp\",\"name\":\"tnkdmkqj\",\"status\":\"Running\",\"startTime\":\"envrkpyouaibrebq\",\"endTime\":\"ysjkixqtnqttez\",\"properties\":\"datafffiak\"}") - .toObject(OperationResultsDescriptionInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationResultsDescriptionInner model = new OperationResultsDescriptionInner().withProperties("datafffiak"); - model = BinaryData.fromObject(model).toObject(OperationResultsDescriptionInner.class); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/OperationResultsGetWithResponseMockTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/OperationResultsGetWithResponseMockTests.java deleted file mode 100644 index e4564abf2c96..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/OperationResultsGetWithResponseMockTests.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.healthcareapis.HealthcareApisManager; -import com.azure.resourcemanager.healthcareapis.models.OperationResultsDescription; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class OperationResultsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"id\":\"elisdjub\",\"name\":\"bqigkx\",\"status\":\"Requested\",\"startTime\":\"zgakgacyrcmj\",\"endTime\":\"spofapvuhry\",\"properties\":\"dataiofrzgbzjedmstk\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HealthcareApisManager manager = HealthcareApisManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - OperationResultsDescription response = manager.operationResults() - .getWithResponse("vxkdivqihebwtswb", "uwfmduragegizvc", com.azure.core.util.Context.NONE).getValue(); - - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/OperationsListMockTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/OperationsListMockTests.java deleted file mode 100644 index 123abd349ef3..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/OperationsListMockTests.java +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.healthcareapis.HealthcareApisManager; -import com.azure.resourcemanager.healthcareapis.models.OperationDetail; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class OperationsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"value\":[{\"name\":\"kwv\",\"isDataAction\":true,\"display\":{\"provider\":\"dfbzdixzmq\",\"resource\":\"odawopqhewjptmcg\",\"operation\":\"ostzelndlatu\",\"description\":\"zlbiojlvfhrbbpn\"},\"origin\":\"vcwwyyurmochppr\",\"actionType\":\"Internal\",\"properties\":{\"serviceSpecification\":{\"logSpecifications\":[{\"name\":\"yzejnhlbk\",\"displayName\":\"z\",\"blobDuration\":\"piljhahzvech\"}],\"metricSpecifications\":[{\"name\":\"wieholewjwiu\",\"displayName\":\"wefqsfapaqtferr\",\"displayDescription\":\"ex\",\"unit\":\"mfxapjwogqqno\",\"category\":\"udcdabtqwpwyawb\",\"aggregationType\":\"sqbuc\",\"supportedAggregationTypes\":[\"kyexaoguyaipi\",\"sdaultxij\",\"um\"],\"supportedTimeGrainTypes\":[\"azlnqnmcjngzqdqx\"],\"fillGapWithZero\":false,\"metricFilterPattern\":\"gny\",\"dimensions\":[{}],\"isInternal\":true,\"sourceMdmAccount\":\"vtuikzhajq\",\"sourceMdmNamespace\":\"cfhmlrqryxyn\",\"enableRegionalMdmAccount\":true,\"resourceIdDimensionNameOverride\":\"dpsovwxznptgo\"},{\"name\":\"ybbabpfhvfsl\",\"displayName\":\"ntjlr\",\"displayDescription\":\"jkskyr\",\"unit\":\"ovzidsx\",\"category\":\"abzmifrygznmmaxr\",\"aggregationType\":\"kzobgopxlhsln\",\"supportedAggregationTypes\":[\"ieixynllxe\",\"wcrojphslhcaw\",\"u\"],\"supportedTimeGrainTypes\":[\"dwfmvigorqjb\",\"tzh\",\"aglkafhon\"],\"fillGapWithZero\":false,\"metricFilterPattern\":\"eickpz\",\"dimensions\":[{}],\"isInternal\":true,\"sourceMdmAccount\":\"xelnwc\",\"sourceMdmNamespace\":\"yjede\",\"enableRegionalMdmAccount\":false,\"resourceIdDimensionNameOverride\":\"f\"},{\"name\":\"qscazuawxtz\",\"displayName\":\"uamwabzxrvxc\",\"displayDescription\":\"hsphaivmxyas\",\"unit\":\"vgsgzwywakoihkn\",\"category\":\"jblmljhlnymz\",\"aggregationType\":\"qyryuzcbmqqvxm\",\"supportedAggregationTypes\":[\"gtayxonsupeujlz\",\"nh\",\"vsqltnzoibgsxg\"],\"supportedTimeGrainTypes\":[\"yqo\"],\"fillGapWithZero\":false,\"metricFilterPattern\":\"ox\",\"dimensions\":[{}],\"isInternal\":false,\"sourceMdmAccount\":\"xiqxeiiqbimh\",\"sourceMdmNamespace\":\"wwinhehf\",\"enableRegionalMdmAccount\":false,\"resourceIdDimensionNameOverride\":\"vwbcblembnkbwv\"}]}}}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HealthcareApisManager manager = HealthcareApisManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("yzejnhlbk", - response.iterator().next().properties().serviceSpecification().logSpecifications().get(0).name()); - Assertions.assertEquals("z", - response.iterator().next().properties().serviceSpecification().logSpecifications().get(0).displayName()); - Assertions.assertEquals("piljhahzvech", - response.iterator().next().properties().serviceSpecification().logSpecifications().get(0).blobDuration()); - Assertions.assertEquals("wieholewjwiu", - response.iterator().next().properties().serviceSpecification().metricSpecifications().get(0).name()); - Assertions.assertEquals("wefqsfapaqtferr", - response.iterator().next().properties().serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions.assertEquals("ex", response.iterator().next().properties().serviceSpecification() - .metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("mfxapjwogqqno", - response.iterator().next().properties().serviceSpecification().metricSpecifications().get(0).unit()); - Assertions.assertEquals("udcdabtqwpwyawb", - response.iterator().next().properties().serviceSpecification().metricSpecifications().get(0).category()); - Assertions.assertEquals("sqbuc", response.iterator().next().properties().serviceSpecification() - .metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals("kyexaoguyaipi", response.iterator().next().properties().serviceSpecification() - .metricSpecifications().get(0).supportedAggregationTypes().get(0)); - Assertions.assertEquals("azlnqnmcjngzqdqx", response.iterator().next().properties().serviceSpecification() - .metricSpecifications().get(0).supportedTimeGrainTypes().get(0)); - Assertions.assertEquals(false, response.iterator().next().properties().serviceSpecification() - .metricSpecifications().get(0).fillGapWithZero()); - Assertions.assertEquals("gny", response.iterator().next().properties().serviceSpecification() - .metricSpecifications().get(0).metricFilterPattern()); - Assertions.assertEquals(true, - response.iterator().next().properties().serviceSpecification().metricSpecifications().get(0).isInternal()); - Assertions.assertEquals("vtuikzhajq", response.iterator().next().properties().serviceSpecification() - .metricSpecifications().get(0).sourceMdmAccount()); - Assertions.assertEquals("cfhmlrqryxyn", response.iterator().next().properties().serviceSpecification() - .metricSpecifications().get(0).sourceMdmNamespace()); - Assertions.assertEquals(true, response.iterator().next().properties().serviceSpecification() - .metricSpecifications().get(0).enableRegionalMdmAccount()); - Assertions.assertEquals("dpsovwxznptgo", response.iterator().next().properties().serviceSpecification() - .metricSpecifications().get(0).resourceIdDimensionNameOverride()); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateEndpointConnectionDescriptionInnerTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateEndpointConnectionDescriptionInnerTests.java deleted file mode 100644 index 5c025dcf065f..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateEndpointConnectionDescriptionInnerTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.fluent.models.PrivateEndpointConnectionDescriptionInner; -import com.azure.resourcemanager.healthcareapis.models.PrivateEndpoint; -import com.azure.resourcemanager.healthcareapis.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.healthcareapis.models.PrivateLinkServiceConnectionState; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointConnectionDescriptionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointConnectionDescriptionInner model = BinaryData.fromString( - "{\"properties\":{\"privateEndpoint\":{\"id\":\"okftyxolniwpwcuk\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"iawxklry\",\"actionsRequired\":\"wckbasyypnd\"},\"provisioningState\":\"Creating\"},\"id\":\"gcbacphejkot\",\"name\":\"nqgoulzndli\",\"type\":\"wyqkgfgibm\"}") - .toObject(PrivateEndpointConnectionDescriptionInner.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, - model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("iawxklry", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("wckbasyypnd", model.privateLinkServiceConnectionState().actionsRequired()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointConnectionDescriptionInner model = new PrivateEndpointConnectionDescriptionInner() - .withPrivateEndpoint(new PrivateEndpoint()).withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.REJECTED) - .withDescription("iawxklry").withActionsRequired("wckbasyypnd")); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionDescriptionInner.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, - model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("iawxklry", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("wckbasyypnd", model.privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateEndpointConnectionListResultDescriptionTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateEndpointConnectionListResultDescriptionTests.java deleted file mode 100644 index 36663e8a667b..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateEndpointConnectionListResultDescriptionTests.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.fluent.models.PrivateEndpointConnectionDescriptionInner; -import com.azure.resourcemanager.healthcareapis.models.PrivateEndpoint; -import com.azure.resourcemanager.healthcareapis.models.PrivateEndpointConnectionListResultDescription; -import com.azure.resourcemanager.healthcareapis.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.healthcareapis.models.PrivateLinkServiceConnectionState; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointConnectionListResultDescriptionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointConnectionListResultDescription model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"rcjd\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"hxbnjbiksqrg\",\"actionsRequired\":\"sainqpjwnzl\"},\"provisioningState\":\"Creating\"},\"id\":\"mppeebvmgxs\",\"name\":\"bkyqduu\",\"type\":\"itcjczdz\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"krwpdap\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"dkvwrwjfe\",\"actionsRequired\":\"nhutjeltmrldhugj\"},\"provisioningState\":\"Failed\"},\"id\":\"atqxho\",\"name\":\"dgeablgphu\",\"type\":\"icndvkaozwyifty\"}]}") - .toObject(PrivateEndpointConnectionListResultDescription.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.APPROVED, - model.value().get(0).privateLinkServiceConnectionState().status()); - Assertions.assertEquals("hxbnjbiksqrg", model.value().get(0).privateLinkServiceConnectionState().description()); - Assertions.assertEquals("sainqpjwnzl", - model.value().get(0).privateLinkServiceConnectionState().actionsRequired()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointConnectionListResultDescription model - = new PrivateEndpointConnectionListResultDescription().withValue(Arrays.asList( - new PrivateEndpointConnectionDescriptionInner().withPrivateEndpoint(new PrivateEndpoint()) - .withPrivateLinkServiceConnectionState(new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED).withDescription("hxbnjbiksqrg") - .withActionsRequired("sainqpjwnzl")), - new PrivateEndpointConnectionDescriptionInner().withPrivateEndpoint(new PrivateEndpoint()) - .withPrivateLinkServiceConnectionState(new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointServiceConnectionStatus.PENDING).withDescription("dkvwrwjfe") - .withActionsRequired("nhutjeltmrldhugj")))); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionListResultDescription.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.APPROVED, - model.value().get(0).privateLinkServiceConnectionState().status()); - Assertions.assertEquals("hxbnjbiksqrg", model.value().get(0).privateLinkServiceConnectionState().description()); - Assertions.assertEquals("sainqpjwnzl", - model.value().get(0).privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateEndpointConnectionPropertiesTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateEndpointConnectionPropertiesTests.java deleted file mode 100644 index 7406acbe9bd2..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateEndpointConnectionPropertiesTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.fluent.models.PrivateEndpointConnectionProperties; -import com.azure.resourcemanager.healthcareapis.models.PrivateEndpoint; -import com.azure.resourcemanager.healthcareapis.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.healthcareapis.models.PrivateLinkServiceConnectionState; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointConnectionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointConnectionProperties model = BinaryData.fromString( - "{\"privateEndpoint\":{\"id\":\"kc\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"rcryuanzwuxzdxta\",\"actionsRequired\":\"lhmwhfpmrqobm\"},\"provisioningState\":\"Deleting\"}") - .toObject(PrivateEndpointConnectionProperties.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, - model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("rcryuanzwuxzdxta", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("lhmwhfpmrqobm", model.privateLinkServiceConnectionState().actionsRequired()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointConnectionProperties model = new PrivateEndpointConnectionProperties() - .withPrivateEndpoint(new PrivateEndpoint()).withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.REJECTED) - .withDescription("rcryuanzwuxzdxta").withActionsRequired("lhmwhfpmrqobm")); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionProperties.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, - model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("rcryuanzwuxzdxta", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("lhmwhfpmrqobm", model.privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateEndpointConnectionTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateEndpointConnectionTests.java deleted file mode 100644 index 0083f7cea0ac..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateEndpointConnectionTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.models.PrivateEndpoint; -import com.azure.resourcemanager.healthcareapis.models.PrivateEndpointConnection; -import com.azure.resourcemanager.healthcareapis.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.healthcareapis.models.PrivateLinkServiceConnectionState; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointConnectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointConnection model = BinaryData.fromString( - "{\"properties\":{\"privateEndpoint\":{\"id\":\"cmpoyfdkfogkny\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"jddeqsrdeupewnw\",\"actionsRequired\":\"itjz\"},\"provisioningState\":\"Creating\"},\"id\":\"usarhmofc\",\"name\":\"hs\",\"type\":\"yurkdtmlxhekuksj\"}") - .toObject(PrivateEndpointConnection.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, - model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("jddeqsrdeupewnw", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("itjz", model.privateLinkServiceConnectionState().actionsRequired()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointConnection model = new PrivateEndpointConnection().withPrivateEndpoint(new PrivateEndpoint()) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.REJECTED) - .withDescription("jddeqsrdeupewnw").withActionsRequired("itjz")); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnection.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, - model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("jddeqsrdeupewnw", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("itjz", model.privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateEndpointConnectionsCreateOrUpdateMockTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateEndpointConnectionsCreateOrUpdateMockTests.java deleted file mode 100644 index ccfb5f2e6211..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateEndpointConnectionsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.healthcareapis.HealthcareApisManager; -import com.azure.resourcemanager.healthcareapis.models.PrivateEndpoint; -import com.azure.resourcemanager.healthcareapis.models.PrivateEndpointConnectionDescription; -import com.azure.resourcemanager.healthcareapis.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.healthcareapis.models.PrivateLinkServiceConnectionState; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PrivateEndpointConnectionsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"properties\":{\"privateEndpoint\":{\"id\":\"tymoxoftp\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"yczuhxacpq\",\"actionsRequired\":\"ihhyuspskasd\"},\"provisioningState\":\"Succeeded\"},\"id\":\"fwdgzxulucvp\",\"name\":\"mrsreuzvxurisjnh\",\"type\":\"ytxifqjzgxmrh\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HealthcareApisManager manager = HealthcareApisManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PrivateEndpointConnectionDescription response = manager.privateEndpointConnections().define("yo") - .withExistingService("pjbi", "gjmfxumvfcl").withPrivateEndpoint(new PrivateEndpoint()) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) - .withDescription("zbomvzzbtdcqvpni").withActionsRequired("jviylwdshfs")) - .create(); - - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.PENDING, - response.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("yczuhxacpq", response.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("ihhyuspskasd", response.privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateEndpointConnectionsDeleteMockTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateEndpointConnectionsDeleteMockTests.java deleted file mode 100644 index 93d88ca32472..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateEndpointConnectionsDeleteMockTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.healthcareapis.HealthcareApisManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PrivateEndpointConnectionsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HealthcareApisManager manager = HealthcareApisManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.privateEndpointConnections().delete("dxtqmieoxo", "ggufhyaomtb", "hhavgrvkffovjz", - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java deleted file mode 100644 index 6cb559ce5e2f..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.healthcareapis.HealthcareApisManager; -import com.azure.resourcemanager.healthcareapis.models.PrivateEndpointConnectionDescription; -import com.azure.resourcemanager.healthcareapis.models.PrivateEndpointServiceConnectionStatus; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PrivateEndpointConnectionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"properties\":{\"privateEndpoint\":{\"id\":\"nsvbuswdv\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"ycnunvjsrtk\",\"actionsRequired\":\"wnopqgikyzirtx\"},\"provisioningState\":\"Deleting\"},\"id\":\"x\",\"name\":\"ejnt\",\"type\":\"sewgioilqukr\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HealthcareApisManager manager = HealthcareApisManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PrivateEndpointConnectionDescription response = manager.privateEndpointConnections() - .getWithResponse("jbdhqxvc", "gf", "pdso", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.APPROVED, - response.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("ycnunvjsrtk", response.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("wnopqgikyzirtx", response.privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateEndpointConnectionsListByServiceMockTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateEndpointConnectionsListByServiceMockTests.java deleted file mode 100644 index 9dd03a0c953d..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateEndpointConnectionsListByServiceMockTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.healthcareapis.HealthcareApisManager; -import com.azure.resourcemanager.healthcareapis.models.PrivateEndpointConnectionDescription; -import com.azure.resourcemanager.healthcareapis.models.PrivateEndpointServiceConnectionStatus; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PrivateEndpointConnectionsListByServiceMockTests { - @Test - public void testListByService() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"value\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"zzronasx\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"zq\",\"actionsRequired\":\"hftwesgog\"},\"provisioningState\":\"Failed\"},\"id\":\"onnxkrlgnyhm\",\"name\":\"ssxkkgthr\",\"type\":\"gh\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HealthcareApisManager manager = HealthcareApisManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.privateEndpointConnections().listByService("jlpijnkrx", "rddh", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.APPROVED, - response.iterator().next().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("zq", response.iterator().next().privateLinkServiceConnectionState().description()); - Assertions.assertEquals("hftwesgog", - response.iterator().next().privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateEndpointTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateEndpointTests.java deleted file mode 100644 index f7de1f74b0c8..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateEndpointTests.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.models.PrivateEndpoint; - -public final class PrivateEndpointTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpoint model = BinaryData.fromString("{\"id\":\"nryrtihf\"}").toObject(PrivateEndpoint.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpoint model = new PrivateEndpoint(); - model = BinaryData.fromObject(model).toObject(PrivateEndpoint.class); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateLinkResourceDescriptionInnerTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateLinkResourceDescriptionInnerTests.java deleted file mode 100644 index 0e29667aa0d0..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateLinkResourceDescriptionInnerTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.fluent.models.PrivateLinkResourceDescriptionInner; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkResourceDescriptionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkResourceDescriptionInner model = BinaryData.fromString( - "{\"properties\":{\"groupId\":\"kyfi\",\"requiredMembers\":[\"idf\",\"zwdzuh\"],\"requiredZoneNames\":[\"wisdkft\",\"wxmnteiwao\",\"vkmijcmmxdcuf\",\"fsrpymzidnse\"]},\"id\":\"cxtbzsg\",\"name\":\"yc\",\"type\":\"sne\"}") - .toObject(PrivateLinkResourceDescriptionInner.class); - Assertions.assertEquals("wisdkft", model.requiredZoneNames().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkResourceDescriptionInner model = new PrivateLinkResourceDescriptionInner() - .withRequiredZoneNames(Arrays.asList("wisdkft", "wxmnteiwao", "vkmijcmmxdcuf", "fsrpymzidnse")); - model = BinaryData.fromObject(model).toObject(PrivateLinkResourceDescriptionInner.class); - Assertions.assertEquals("wisdkft", model.requiredZoneNames().get(0)); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateLinkResourceListResultDescriptionInnerTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateLinkResourceListResultDescriptionInnerTests.java deleted file mode 100644 index de0726d264d3..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateLinkResourceListResultDescriptionInnerTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.fluent.models.PrivateLinkResourceDescriptionInner; -import com.azure.resourcemanager.healthcareapis.fluent.models.PrivateLinkResourceListResultDescriptionInner; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkResourceListResultDescriptionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkResourceListResultDescriptionInner model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"groupId\":\"qsrxybzqqed\",\"requiredMembers\":[\"bciqfouflm\",\"nkzsmodmglou\",\"pbkwtmu\"],\"requiredZoneNames\":[\"qktapspwgcuert\",\"mkdo\"]},\"id\":\"vqwhbmdgbbjfd\",\"name\":\"gmbmbexppbh\",\"type\":\"q\"},{\"properties\":{\"groupId\":\"fpfpsalgbquxigj\",\"requiredMembers\":[\"zjaoyfhrtxil\",\"erkujys\",\"l\",\"juvf\"],\"requiredZoneNames\":[\"rlyxwjkcprbnw\",\"xgjvtbv\",\"ysszdnrujqguh\"]},\"id\":\"uouq\",\"name\":\"prwzwbnguitnwui\",\"type\":\"gazxuf\"}]}") - .toObject(PrivateLinkResourceListResultDescriptionInner.class); - Assertions.assertEquals("qktapspwgcuert", model.value().get(0).requiredZoneNames().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkResourceListResultDescriptionInner model - = new PrivateLinkResourceListResultDescriptionInner().withValue(Arrays.asList( - new PrivateLinkResourceDescriptionInner() - .withRequiredZoneNames(Arrays.asList("qktapspwgcuert", "mkdo")), - new PrivateLinkResourceDescriptionInner() - .withRequiredZoneNames(Arrays.asList("rlyxwjkcprbnw", "xgjvtbv", "ysszdnrujqguh")))); - model = BinaryData.fromObject(model).toObject(PrivateLinkResourceListResultDescriptionInner.class); - Assertions.assertEquals("qktapspwgcuert", model.value().get(0).requiredZoneNames().get(0)); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateLinkResourcePropertiesTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateLinkResourcePropertiesTests.java deleted file mode 100644 index 5189ece2a195..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateLinkResourcePropertiesTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.fluent.models.PrivateLinkResourceProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkResourcePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkResourceProperties model = BinaryData - .fromString( - "{\"groupId\":\"ysh\",\"requiredMembers\":[\"afbljjgpbtoqcjmk\"],\"requiredZoneNames\":[\"vbqid\"]}") - .toObject(PrivateLinkResourceProperties.class); - Assertions.assertEquals("vbqid", model.requiredZoneNames().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkResourceProperties model - = new PrivateLinkResourceProperties().withRequiredZoneNames(Arrays.asList("vbqid")); - model = BinaryData.fromObject(model).toObject(PrivateLinkResourceProperties.class); - Assertions.assertEquals("vbqid", model.requiredZoneNames().get(0)); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateLinkResourceTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateLinkResourceTests.java deleted file mode 100644 index 2b5d00697a58..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateLinkResourceTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.models.PrivateLinkResource; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkResourceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkResource model = BinaryData.fromString( - "{\"properties\":{\"groupId\":\"wzjeiach\",\"requiredMembers\":[\"sflnrosfqp\",\"eeh\"],\"requiredZoneNames\":[\"ypyqrimzinp\",\"swjdkirso\",\"dqxhcrmnohjtckwh\",\"soifiyipjxsqw\"]},\"id\":\"gr\",\"name\":\"bznorcjxvsnby\",\"type\":\"qabnmoc\"}") - .toObject(PrivateLinkResource.class); - Assertions.assertEquals("ypyqrimzinp", model.requiredZoneNames().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkResource model = new PrivateLinkResource() - .withRequiredZoneNames(Arrays.asList("ypyqrimzinp", "swjdkirso", "dqxhcrmnohjtckwh", "soifiyipjxsqw")); - model = BinaryData.fromObject(model).toObject(PrivateLinkResource.class); - Assertions.assertEquals("ypyqrimzinp", model.requiredZoneNames().get(0)); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateLinkResourcesGetWithResponseMockTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateLinkResourcesGetWithResponseMockTests.java deleted file mode 100644 index 07f79d5dd632..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateLinkResourcesGetWithResponseMockTests.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.healthcareapis.HealthcareApisManager; -import com.azure.resourcemanager.healthcareapis.models.PrivateLinkResourceDescription; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PrivateLinkResourcesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"properties\":{\"groupId\":\"kq\",\"requiredMembers\":[\"gzslesjcbhernnti\",\"w\"],\"requiredZoneNames\":[\"vbquwr\"]},\"id\":\"ehwagoh\",\"name\":\"uffkmrqemvvh\",\"type\":\"xtdr\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HealthcareApisManager manager = HealthcareApisManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PrivateLinkResourceDescription response = manager.privateLinkResources() - .getWithResponse("qjbvleorfmlu", "qtqzfavyv", "qqybarye", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("vbquwr", response.requiredZoneNames().get(0)); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateLinkResourcesListByServiceWithResponseMockTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateLinkResourcesListByServiceWithResponseMockTests.java deleted file mode 100644 index 811321c04149..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateLinkResourcesListByServiceWithResponseMockTests.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.healthcareapis.HealthcareApisManager; -import com.azure.resourcemanager.healthcareapis.models.PrivateLinkResourceListResultDescription; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PrivateLinkResourcesListByServiceWithResponseMockTests { - @Test - public void testListByServiceWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"value\":[{\"properties\":{\"groupId\":\"jqgwzp\",\"requiredMembers\":[\"n\",\"cypsxjv\",\"oimwkslirc\",\"zjxvydfcea\"],\"requiredZoneNames\":[\"hvygdyftumr\",\"wnawjslbiw\",\"ojgcyzt\"]},\"id\":\"fmznba\",\"name\":\"qphchqnrnrpxehuw\",\"type\":\"ykqgaifmvik\"},{\"properties\":{\"groupId\":\"vkhbejdznx\",\"requiredMembers\":[\"srhnjivo\",\"v\"],\"requiredZoneNames\":[\"v\",\"fzg\"]},\"id\":\"mjdftu\",\"name\":\"jltduceam\",\"type\":\"mczuo\"},{\"properties\":{\"groupId\":\"cwwqiokn\",\"requiredMembers\":[\"mojmsvpkjprvkw\",\"fz\",\"ljyxgtczhe\"],\"requiredZoneNames\":[\"sdshmkxmaehvb\",\"xu\",\"iplt\",\"n\"]},\"id\":\"tbaxk\",\"name\":\"xywr\",\"type\":\"kpyklyhp\"},{\"properties\":{\"groupId\":\"pvruudlg\",\"requiredMembers\":[\"thost\"],\"requiredZoneNames\":[\"stvdxeclz\",\"dqbcvhzlhplod\",\"kdl\",\"wqfbumlkxtrqjfsm\"]},\"id\":\"mbtxhwgf\",\"name\":\"srtawcoezbr\",\"type\":\"ubskhudygoookkq\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HealthcareApisManager manager = HealthcareApisManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PrivateLinkResourceListResultDescription response = manager.privateLinkResources() - .listByServiceWithResponse("blwpcesutrgj", "pauutpw", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("hvygdyftumr", response.value().get(0).requiredZoneNames().get(0)); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateLinkServiceConnectionStateTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateLinkServiceConnectionStateTests.java deleted file mode 100644 index 2ad85c487a4d..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/PrivateLinkServiceConnectionStateTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.healthcareapis.models.PrivateLinkServiceConnectionState; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkServiceConnectionStateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkServiceConnectionState model = BinaryData - .fromString("{\"status\":\"Approved\",\"description\":\"bpzvgn\",\"actionsRequired\":\"symglzufcyz\"}") - .toObject(PrivateLinkServiceConnectionState.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.APPROVED, model.status()); - Assertions.assertEquals("bpzvgn", model.description()); - Assertions.assertEquals("symglzufcyz", model.actionsRequired()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkServiceConnectionState model - = new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) - .withDescription("bpzvgn").withActionsRequired("symglzufcyz"); - model = BinaryData.fromObject(model).toObject(PrivateLinkServiceConnectionState.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.APPROVED, model.status()); - Assertions.assertEquals("bpzvgn", model.description()); - Assertions.assertEquals("symglzufcyz", model.actionsRequired()); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ResourceCoreTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ResourceCoreTests.java deleted file mode 100644 index 07a47c81c804..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ResourceCoreTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.models.ResourceCore; -import org.junit.jupiter.api.Assertions; - -public final class ResourceCoreTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceCore model = BinaryData - .fromString("{\"etag\":\"sounqecanoaeu\",\"id\":\"fhyhltrpmopjmcma\",\"name\":\"u\",\"type\":\"kthfui\"}") - .toObject(ResourceCore.class); - Assertions.assertEquals("sounqecanoaeu", model.etag()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceCore model = new ResourceCore().withEtag("sounqecanoaeu"); - model = BinaryData.fromObject(model).toObject(ResourceCore.class); - Assertions.assertEquals("sounqecanoaeu", model.etag()); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ResourceTagsTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ResourceTagsTests.java deleted file mode 100644 index baf04a129134..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ResourceTagsTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.models.ResourceTags; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ResourceTagsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceTags model = BinaryData.fromString("{\"tags\":{\"hfiqscjeypvhe\":\"aamdect\",\"gm\":\"rkgqhcjrefo\"}}") - .toObject(ResourceTags.class); - Assertions.assertEquals("aamdect", model.tags().get("hfiqscjeypvhe")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceTags model = new ResourceTags().withTags(mapOf("hfiqscjeypvhe", "aamdect", "gm", "rkgqhcjrefo")); - model = BinaryData.fromObject(model).toObject(ResourceTags.class); - Assertions.assertEquals("aamdect", model.tags().get("hfiqscjeypvhe")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ResourceVersionPolicyConfigurationTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ResourceVersionPolicyConfigurationTests.java deleted file mode 100644 index 7fe40c74d4ff..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ResourceVersionPolicyConfigurationTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.models.FhirResourceVersionPolicy; -import com.azure.resourcemanager.healthcareapis.models.ResourceVersionPolicyConfiguration; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ResourceVersionPolicyConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceVersionPolicyConfiguration model = BinaryData.fromString( - "{\"default\":\"versioned\",\"resourceTypeOverrides\":{\"whhmhykojo\":\"versioned\",\"fnndl\":\"versioned\"}}") - .toObject(ResourceVersionPolicyConfiguration.class); - Assertions.assertEquals(FhirResourceVersionPolicy.VERSIONED, model.defaultProperty()); - Assertions.assertEquals(FhirResourceVersionPolicy.VERSIONED, model.resourceTypeOverrides().get("whhmhykojo")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceVersionPolicyConfiguration model = new ResourceVersionPolicyConfiguration() - .withDefaultProperty(FhirResourceVersionPolicy.VERSIONED).withResourceTypeOverrides( - mapOf("whhmhykojo", FhirResourceVersionPolicy.VERSIONED, "fnndl", FhirResourceVersionPolicy.VERSIONED)); - model = BinaryData.fromObject(model).toObject(ResourceVersionPolicyConfiguration.class); - Assertions.assertEquals(FhirResourceVersionPolicy.VERSIONED, model.defaultProperty()); - Assertions.assertEquals(FhirResourceVersionPolicy.VERSIONED, model.resourceTypeOverrides().get("whhmhykojo")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServiceAccessPolicyEntryTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServiceAccessPolicyEntryTests.java deleted file mode 100644 index a6c35b655b89..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServiceAccessPolicyEntryTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.models.ServiceAccessPolicyEntry; -import org.junit.jupiter.api.Assertions; - -public final class ServiceAccessPolicyEntryTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServiceAccessPolicyEntry model - = BinaryData.fromString("{\"objectId\":\"qioqjzehtbmu\"}").toObject(ServiceAccessPolicyEntry.class); - Assertions.assertEquals("qioqjzehtbmu", model.objectId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServiceAccessPolicyEntry model = new ServiceAccessPolicyEntry().withObjectId("qioqjzehtbmu"); - model = BinaryData.fromObject(model).toObject(ServiceAccessPolicyEntry.class); - Assertions.assertEquals("qioqjzehtbmu", model.objectId()); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServiceAcrConfigurationInfoTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServiceAcrConfigurationInfoTests.java deleted file mode 100644 index 0967535cc8e8..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServiceAcrConfigurationInfoTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.models.ServiceAcrConfigurationInfo; -import com.azure.resourcemanager.healthcareapis.models.ServiceOciArtifactEntry; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ServiceAcrConfigurationInfoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServiceAcrConfigurationInfo model = BinaryData.fromString( - "{\"loginServers\":[\"dbihanufhfcbj\",\"s\"],\"ociArtifacts\":[{\"loginServer\":\"hxqh\",\"imageName\":\"ifpikxwczby\",\"digest\":\"npqxuh\"},{\"loginServer\":\"y\",\"imageName\":\"iwbybrkxvdumjg\",\"digest\":\"fwvuk\"},{\"loginServer\":\"audccsnhs\",\"imageName\":\"nyejhkryhtnap\",\"digest\":\"wlokjyem\"}]}") - .toObject(ServiceAcrConfigurationInfo.class); - Assertions.assertEquals("dbihanufhfcbj", model.loginServers().get(0)); - Assertions.assertEquals("hxqh", model.ociArtifacts().get(0).loginServer()); - Assertions.assertEquals("ifpikxwczby", model.ociArtifacts().get(0).imageName()); - Assertions.assertEquals("npqxuh", model.ociArtifacts().get(0).digest()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServiceAcrConfigurationInfo model = new ServiceAcrConfigurationInfo() - .withLoginServers(Arrays.asList("dbihanufhfcbj", "s")) - .withOciArtifacts(Arrays.asList( - new ServiceOciArtifactEntry().withLoginServer("hxqh").withImageName("ifpikxwczby").withDigest("npqxuh"), - new ServiceOciArtifactEntry().withLoginServer("y").withImageName("iwbybrkxvdumjg").withDigest("fwvuk"), - new ServiceOciArtifactEntry().withLoginServer("audccsnhs").withImageName("nyejhkryhtnap") - .withDigest("wlokjyem"))); - model = BinaryData.fromObject(model).toObject(ServiceAcrConfigurationInfo.class); - Assertions.assertEquals("dbihanufhfcbj", model.loginServers().get(0)); - Assertions.assertEquals("hxqh", model.ociArtifacts().get(0).loginServer()); - Assertions.assertEquals("ifpikxwczby", model.ociArtifacts().get(0).imageName()); - Assertions.assertEquals("npqxuh", model.ociArtifacts().get(0).digest()); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServiceAuthenticationConfigurationInfoTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServiceAuthenticationConfigurationInfoTests.java deleted file mode 100644 index b1fe1d242257..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServiceAuthenticationConfigurationInfoTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.models.ServiceAuthenticationConfigurationInfo; -import org.junit.jupiter.api.Assertions; - -public final class ServiceAuthenticationConfigurationInfoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServiceAuthenticationConfigurationInfo model = BinaryData - .fromString("{\"authority\":\"wlrxyb\",\"audience\":\"oqijgkdmbpaz\",\"smartProxyEnabled\":false}") - .toObject(ServiceAuthenticationConfigurationInfo.class); - Assertions.assertEquals("wlrxyb", model.authority()); - Assertions.assertEquals("oqijgkdmbpaz", model.audience()); - Assertions.assertEquals(false, model.smartProxyEnabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServiceAuthenticationConfigurationInfo model = new ServiceAuthenticationConfigurationInfo() - .withAuthority("wlrxyb").withAudience("oqijgkdmbpaz").withSmartProxyEnabled(false); - model = BinaryData.fromObject(model).toObject(ServiceAuthenticationConfigurationInfo.class); - Assertions.assertEquals("wlrxyb", model.authority()); - Assertions.assertEquals("oqijgkdmbpaz", model.audience()); - Assertions.assertEquals(false, model.smartProxyEnabled()); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServiceExportConfigurationInfoTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServiceExportConfigurationInfoTests.java deleted file mode 100644 index 4f5203e8b1ae..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServiceExportConfigurationInfoTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.models.ServiceExportConfigurationInfo; -import org.junit.jupiter.api.Assertions; - -public final class ServiceExportConfigurationInfoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServiceExportConfigurationInfo model = BinaryData.fromString("{\"storageAccountName\":\"cipaouaj\"}") - .toObject(ServiceExportConfigurationInfo.class); - Assertions.assertEquals("cipaouaj", model.storageAccountName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServiceExportConfigurationInfo model = new ServiceExportConfigurationInfo().withStorageAccountName("cipaouaj"); - model = BinaryData.fromObject(model).toObject(ServiceExportConfigurationInfo.class); - Assertions.assertEquals("cipaouaj", model.storageAccountName()); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServiceImportConfigurationInfoTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServiceImportConfigurationInfoTests.java deleted file mode 100644 index 5520c46d7b7d..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServiceImportConfigurationInfoTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.models.ServiceImportConfigurationInfo; -import org.junit.jupiter.api.Assertions; - -public final class ServiceImportConfigurationInfoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServiceImportConfigurationInfo model - = BinaryData.fromString("{\"integrationDataStore\":\"o\",\"initialImportMode\":false,\"enabled\":true}") - .toObject(ServiceImportConfigurationInfo.class); - Assertions.assertEquals("o", model.integrationDataStore()); - Assertions.assertEquals(false, model.initialImportMode()); - Assertions.assertEquals(true, model.enabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServiceImportConfigurationInfo model = new ServiceImportConfigurationInfo().withIntegrationDataStore("o") - .withInitialImportMode(false).withEnabled(true); - model = BinaryData.fromObject(model).toObject(ServiceImportConfigurationInfo.class); - Assertions.assertEquals("o", model.integrationDataStore()); - Assertions.assertEquals(false, model.initialImportMode()); - Assertions.assertEquals(true, model.enabled()); - } -} 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 deleted file mode 100644 index a0488ecbf42c..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServiceManagedIdentityIdentityTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.models.ServiceManagedIdentityIdentity; -import com.azure.resourcemanager.healthcareapis.models.ServiceManagedIdentityType; -import com.azure.resourcemanager.healthcareapis.models.UserAssignedIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ServiceManagedIdentityIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServiceManagedIdentityIdentity model = BinaryData.fromString( - "{\"type\":\"SystemAssigned\",\"principalId\":\"04256191-36aa-4e05-b8fd-06b8cfbcc797\",\"tenantId\":\"c4ab4def-94fd-407b-832b-d53491243405\",\"userAssignedIdentities\":{\"ukgri\":{\"principalId\":\"4f213e8d-4550-4718-a022-9386b165f6bf\",\"clientId\":\"c7c8bae3-1acf-4763-9edf-e9fa72574608\"},\"zlfbxzpuzycispnq\":{\"principalId\":\"9714cc07-726c-4ac8-98be-10d1357e914d\",\"clientId\":\"c464abc0-0107-4a47-a745-53f77fbd2f3a\"},\"mgkbrpyydhibn\":{\"principalId\":\"c351e1f6-d85c-489f-b036-6bf2e722a53a\",\"clientId\":\"fb8e21f1-205a-469a-af82-c08c46da659e\"}}}") - .toObject(ServiceManagedIdentityIdentity.class); - Assertions.assertEquals(ServiceManagedIdentityType.SYSTEM_ASSIGNED, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServiceManagedIdentityIdentity model - = new ServiceManagedIdentityIdentity().withType(ServiceManagedIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("ukgri", new UserAssignedIdentity(), "zlfbxzpuzycispnq", - new UserAssignedIdentity(), "mgkbrpyydhibn", new UserAssignedIdentity())); - model = BinaryData.fromObject(model).toObject(ServiceManagedIdentityIdentity.class); - Assertions.assertEquals(ServiceManagedIdentityType.SYSTEM_ASSIGNED, model.type()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} 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 deleted file mode 100644 index 30c712da27d5..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServiceManagedIdentityTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.models.ServiceManagedIdentity; -import com.azure.resourcemanager.healthcareapis.models.ServiceManagedIdentityIdentity; -import com.azure.resourcemanager.healthcareapis.models.ServiceManagedIdentityType; -import com.azure.resourcemanager.healthcareapis.models.UserAssignedIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ServiceManagedIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServiceManagedIdentity model = BinaryData.fromString( - "{\"identity\":{\"type\":\"None\",\"principalId\":\"c59b8d35-ac7b-40e5-a236-d9fae11ad60f\",\"tenantId\":\"e382ebb8-46e2-45f3-a35a-6096a07dfc81\",\"userAssignedIdentities\":{\"pvecxgodeb\":{\"principalId\":\"54d55307-b09f-47c2-b786-7f663349531e\",\"clientId\":\"245c1057-5157-45cb-b1d3-a57076b9203b\"}}}}") - .toObject(ServiceManagedIdentity.class); - Assertions.assertEquals(ServiceManagedIdentityType.NONE, model.identity().type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServiceManagedIdentity model = new ServiceManagedIdentity() - .withIdentity(new ServiceManagedIdentityIdentity().withType(ServiceManagedIdentityType.NONE) - .withUserAssignedIdentities(mapOf("pvecxgodeb", new UserAssignedIdentity()))); - model = BinaryData.fromObject(model).toObject(ServiceManagedIdentity.class); - Assertions.assertEquals(ServiceManagedIdentityType.NONE, model.identity().type()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServiceOciArtifactEntryTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServiceOciArtifactEntryTests.java deleted file mode 100644 index b9f31575240c..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServiceOciArtifactEntryTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.models.ServiceOciArtifactEntry; -import org.junit.jupiter.api.Assertions; - -public final class ServiceOciArtifactEntryTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServiceOciArtifactEntry model - = BinaryData.fromString("{\"loginServer\":\"vnipjox\",\"imageName\":\"nchgej\",\"digest\":\"odmailzyd\"}") - .toObject(ServiceOciArtifactEntry.class); - Assertions.assertEquals("vnipjox", model.loginServer()); - Assertions.assertEquals("nchgej", model.imageName()); - Assertions.assertEquals("odmailzyd", model.digest()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServiceOciArtifactEntry model - = new ServiceOciArtifactEntry().withLoginServer("vnipjox").withImageName("nchgej").withDigest("odmailzyd"); - model = BinaryData.fromObject(model).toObject(ServiceOciArtifactEntry.class); - Assertions.assertEquals("vnipjox", model.loginServer()); - Assertions.assertEquals("nchgej", model.imageName()); - Assertions.assertEquals("odmailzyd", model.digest()); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServiceSpecificationTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServiceSpecificationTests.java deleted file mode 100644 index 704ea1e11620..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServiceSpecificationTests.java +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.models.LogSpecification; -import com.azure.resourcemanager.healthcareapis.models.MetricDimension; -import com.azure.resourcemanager.healthcareapis.models.MetricSpecification; -import com.azure.resourcemanager.healthcareapis.models.ServiceSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ServiceSpecificationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServiceSpecification model = BinaryData.fromString( - "{\"logSpecifications\":[{\"name\":\"wib\",\"displayName\":\"cdl\",\"blobDuration\":\"shfwpracstwity\"},{\"name\":\"evxccedcp\",\"displayName\":\"dyodnwzxltj\",\"blobDuration\":\"nhltiugcxn\"}],\"metricSpecifications\":[{\"name\":\"xqi\",\"displayName\":\"qunyowxwlmdjr\",\"displayDescription\":\"fgbvfvpdbo\",\"unit\":\"cizsjqlhkrribdei\",\"category\":\"ipqkghvxndzwm\",\"aggregationType\":\"efajpj\",\"supportedAggregationTypes\":[\"kqnyh\",\"b\"],\"supportedTimeGrainTypes\":[\"jivfxzsjabib\",\"ystawfsdjpvkvp\",\"jxbkzbzkdvn\",\"jabudurgkakmo\"],\"fillGapWithZero\":false,\"metricFilterPattern\":\"jk\",\"dimensions\":[{\"name\":\"mouwqlgzrfzeey\",\"displayName\":\"izikayuhq\",\"toBeExportedForShoebox\":false},{\"name\":\"sybbqwr\",\"displayName\":\"ldgmfpgvmpip\",\"toBeExportedForShoebox\":false}],\"isInternal\":false,\"sourceMdmAccount\":\"qfxssmwutw\",\"sourceMdmNamespace\":\"srezp\",\"enableRegionalMdmAccount\":true,\"resourceIdDimensionNameOverride\":\"euyowqkd\"},{\"name\":\"t\",\"displayName\":\"ib\",\"displayDescription\":\"cgpik\",\"unit\":\"imejzanl\",\"category\":\"xi\",\"aggregationType\":\"rmbzo\",\"supportedAggregationTypes\":[\"i\",\"rjqc\"],\"supportedTimeGrainTypes\":[\"zpfrla\",\"szrnwo\"],\"fillGapWithZero\":false,\"metricFilterPattern\":\"fpwpjylwbt\",\"dimensions\":[{\"name\":\"sj\",\"displayName\":\"hszfjvfb\",\"toBeExportedForShoebox\":true},{\"name\":\"ljagrqmqhl\",\"displayName\":\"riiiojnalghfkv\",\"toBeExportedForShoebox\":false}],\"isInternal\":false,\"sourceMdmAccount\":\"owueluqh\",\"sourceMdmNamespace\":\"hhxvrhmzkwpj\",\"enableRegionalMdmAccount\":true,\"resourceIdDimensionNameOverride\":\"pughftqsxh\"},{\"name\":\"ujxukndxd\",\"displayName\":\"rjguufzdmsyqtf\",\"displayDescription\":\"whbotzingamv\",\"unit\":\"ho\",\"category\":\"qzudphq\",\"aggregationType\":\"vdkfwynwcvtbvk\",\"supportedAggregationTypes\":[\"mtnvyq\",\"atkzwpcnpw\"],\"supportedTimeGrainTypes\":[\"a\",\"sgvvsccyajguq\",\"hwyg\"],\"fillGapWithZero\":true,\"metricFilterPattern\":\"nk\",\"dimensions\":[{\"name\":\"emdwzrmuhapfc\",\"displayName\":\"psqxq\",\"toBeExportedForShoebox\":false},{\"name\":\"uoymgccelvezry\",\"displayName\":\"lmfeokerq\",\"toBeExportedForShoebox\":false},{\"name\":\"kobopgxed\",\"displayName\":\"wep\",\"toBeExportedForShoebox\":false},{\"name\":\"rfkbwccsnjvcdwxl\",\"displayName\":\"ekftnkhtj\",\"toBeExportedForShoebox\":false}],\"isInternal\":false,\"sourceMdmAccount\":\"fq\",\"sourceMdmNamespace\":\"mtdh\",\"enableRegionalMdmAccount\":true,\"resourceIdDimensionNameOverride\":\"ypgik\"}]}") - .toObject(ServiceSpecification.class); - Assertions.assertEquals("wib", model.logSpecifications().get(0).name()); - Assertions.assertEquals("cdl", model.logSpecifications().get(0).displayName()); - Assertions.assertEquals("shfwpracstwity", model.logSpecifications().get(0).blobDuration()); - Assertions.assertEquals("xqi", model.metricSpecifications().get(0).name()); - Assertions.assertEquals("qunyowxwlmdjr", model.metricSpecifications().get(0).displayName()); - Assertions.assertEquals("fgbvfvpdbo", model.metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("cizsjqlhkrribdei", model.metricSpecifications().get(0).unit()); - Assertions.assertEquals("ipqkghvxndzwm", model.metricSpecifications().get(0).category()); - Assertions.assertEquals("efajpj", model.metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals("kqnyh", model.metricSpecifications().get(0).supportedAggregationTypes().get(0)); - Assertions.assertEquals("jivfxzsjabib", model.metricSpecifications().get(0).supportedTimeGrainTypes().get(0)); - Assertions.assertEquals(false, model.metricSpecifications().get(0).fillGapWithZero()); - Assertions.assertEquals("jk", model.metricSpecifications().get(0).metricFilterPattern()); - Assertions.assertEquals("mouwqlgzrfzeey", model.metricSpecifications().get(0).dimensions().get(0).name()); - Assertions.assertEquals("izikayuhq", model.metricSpecifications().get(0).dimensions().get(0).displayName()); - Assertions.assertEquals(false, - model.metricSpecifications().get(0).dimensions().get(0).toBeExportedForShoebox()); - Assertions.assertEquals(false, model.metricSpecifications().get(0).isInternal()); - Assertions.assertEquals("qfxssmwutw", model.metricSpecifications().get(0).sourceMdmAccount()); - Assertions.assertEquals("srezp", model.metricSpecifications().get(0).sourceMdmNamespace()); - Assertions.assertEquals(true, model.metricSpecifications().get(0).enableRegionalMdmAccount()); - Assertions.assertEquals("euyowqkd", model.metricSpecifications().get(0).resourceIdDimensionNameOverride()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServiceSpecification model - = new ServiceSpecification() - .withLogSpecifications(Arrays.asList( - new LogSpecification().withName("wib").withDisplayName("cdl").withBlobDuration("shfwpracstwity"), - new LogSpecification().withName("evxccedcp").withDisplayName("dyodnwzxltj") - .withBlobDuration("nhltiugcxn"))) - .withMetricSpecifications(Arrays.asList( - new MetricSpecification().withName("xqi").withDisplayName("qunyowxwlmdjr") - .withDisplayDescription("fgbvfvpdbo").withUnit("cizsjqlhkrribdei").withCategory("ipqkghvxndzwm") - .withAggregationType("efajpj").withSupportedAggregationTypes(Arrays.asList("kqnyh", "b")) - .withSupportedTimeGrainTypes( - Arrays.asList("jivfxzsjabib", "ystawfsdjpvkvp", "jxbkzbzkdvn", "jabudurgkakmo")) - .withFillGapWithZero(false).withMetricFilterPattern("jk") - .withDimensions(Arrays.asList( - new MetricDimension().withName("mouwqlgzrfzeey").withDisplayName("izikayuhq") - .withToBeExportedForShoebox(false), - new MetricDimension().withName("sybbqwr").withDisplayName("ldgmfpgvmpip") - .withToBeExportedForShoebox(false))) - .withIsInternal(false).withSourceMdmAccount("qfxssmwutw").withSourceMdmNamespace("srezp") - .withEnableRegionalMdmAccount(true).withResourceIdDimensionNameOverride("euyowqkd"), - new MetricSpecification().withName("t").withDisplayName("ib").withDisplayDescription("cgpik") - .withUnit("imejzanl").withCategory("xi").withAggregationType("rmbzo") - .withSupportedAggregationTypes(Arrays.asList("i", "rjqc")) - .withSupportedTimeGrainTypes(Arrays.asList("zpfrla", "szrnwo")).withFillGapWithZero(false) - .withMetricFilterPattern("fpwpjylwbt") - .withDimensions(Arrays.asList( - new MetricDimension().withName("sj").withDisplayName("hszfjvfb") - .withToBeExportedForShoebox(true), - new MetricDimension().withName("ljagrqmqhl").withDisplayName("riiiojnalghfkv") - .withToBeExportedForShoebox(false))) - .withIsInternal(false).withSourceMdmAccount("owueluqh").withSourceMdmNamespace("hhxvrhmzkwpj") - .withEnableRegionalMdmAccount(true).withResourceIdDimensionNameOverride("pughftqsxh"), - new MetricSpecification().withName("ujxukndxd").withDisplayName("rjguufzdmsyqtf") - .withDisplayDescription("whbotzingamv").withUnit("ho").withCategory("qzudphq") - .withAggregationType("vdkfwynwcvtbvk") - .withSupportedAggregationTypes(Arrays.asList("mtnvyq", "atkzwpcnpw")) - .withSupportedTimeGrainTypes(Arrays.asList("a", "sgvvsccyajguq", "hwyg")) - .withFillGapWithZero(true).withMetricFilterPattern("nk") - .withDimensions(Arrays.asList( - new MetricDimension().withName("emdwzrmuhapfc").withDisplayName("psqxq") - .withToBeExportedForShoebox(false), - new MetricDimension().withName("uoymgccelvezry").withDisplayName("lmfeokerq") - .withToBeExportedForShoebox(false), - new MetricDimension().withName("kobopgxed").withDisplayName("wep") - .withToBeExportedForShoebox(false), - new MetricDimension().withName("rfkbwccsnjvcdwxl").withDisplayName("ekftnkhtj") - .withToBeExportedForShoebox(false))) - .withIsInternal(false).withSourceMdmAccount("fq").withSourceMdmNamespace("mtdh") - .withEnableRegionalMdmAccount(true).withResourceIdDimensionNameOverride("ypgik"))); - model = BinaryData.fromObject(model).toObject(ServiceSpecification.class); - Assertions.assertEquals("wib", model.logSpecifications().get(0).name()); - Assertions.assertEquals("cdl", model.logSpecifications().get(0).displayName()); - Assertions.assertEquals("shfwpracstwity", model.logSpecifications().get(0).blobDuration()); - Assertions.assertEquals("xqi", model.metricSpecifications().get(0).name()); - Assertions.assertEquals("qunyowxwlmdjr", model.metricSpecifications().get(0).displayName()); - Assertions.assertEquals("fgbvfvpdbo", model.metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("cizsjqlhkrribdei", model.metricSpecifications().get(0).unit()); - Assertions.assertEquals("ipqkghvxndzwm", model.metricSpecifications().get(0).category()); - Assertions.assertEquals("efajpj", model.metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals("kqnyh", model.metricSpecifications().get(0).supportedAggregationTypes().get(0)); - Assertions.assertEquals("jivfxzsjabib", model.metricSpecifications().get(0).supportedTimeGrainTypes().get(0)); - Assertions.assertEquals(false, model.metricSpecifications().get(0).fillGapWithZero()); - Assertions.assertEquals("jk", model.metricSpecifications().get(0).metricFilterPattern()); - Assertions.assertEquals("mouwqlgzrfzeey", model.metricSpecifications().get(0).dimensions().get(0).name()); - Assertions.assertEquals("izikayuhq", model.metricSpecifications().get(0).dimensions().get(0).displayName()); - Assertions.assertEquals(false, - model.metricSpecifications().get(0).dimensions().get(0).toBeExportedForShoebox()); - Assertions.assertEquals(false, model.metricSpecifications().get(0).isInternal()); - Assertions.assertEquals("qfxssmwutw", model.metricSpecifications().get(0).sourceMdmAccount()); - Assertions.assertEquals("srezp", model.metricSpecifications().get(0).sourceMdmNamespace()); - Assertions.assertEquals(true, model.metricSpecifications().get(0).enableRegionalMdmAccount()); - Assertions.assertEquals("euyowqkd", model.metricSpecifications().get(0).resourceIdDimensionNameOverride()); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServicesCheckNameAvailabilityWithResponseMockTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServicesCheckNameAvailabilityWithResponseMockTests.java deleted file mode 100644 index 818ed5496e30..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServicesCheckNameAvailabilityWithResponseMockTests.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.healthcareapis.HealthcareApisManager; -import com.azure.resourcemanager.healthcareapis.models.CheckNameAvailabilityParameters; -import com.azure.resourcemanager.healthcareapis.models.ServicesNameAvailabilityInfo; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ServicesCheckNameAvailabilityWithResponseMockTests { - @Test - public void testCheckNameAvailabilityWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"nameAvailable\":true,\"reason\":\"Invalid\",\"message\":\"qknfd\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HealthcareApisManager manager = HealthcareApisManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ServicesNameAvailabilityInfo response = manager.services() - .checkNameAvailabilityWithResponse( - new CheckNameAvailabilityParameters().withName("wvtylbfpncurdo").withType("wiithtywub"), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("qknfd", response.message()); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServicesNameAvailabilityInfoInnerTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServicesNameAvailabilityInfoInnerTests.java deleted file mode 100644 index ffaa782f2678..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServicesNameAvailabilityInfoInnerTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.fluent.models.ServicesNameAvailabilityInfoInner; -import org.junit.jupiter.api.Assertions; - -public final class ServicesNameAvailabilityInfoInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServicesNameAvailabilityInfoInner model - = BinaryData.fromString("{\"nameAvailable\":true,\"reason\":\"Invalid\",\"message\":\"cwrwclxxwrljdous\"}") - .toObject(ServicesNameAvailabilityInfoInner.class); - Assertions.assertEquals("cwrwclxxwrljdous", model.message()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServicesNameAvailabilityInfoInner model - = new ServicesNameAvailabilityInfoInner().withMessage("cwrwclxxwrljdous"); - model = BinaryData.fromObject(model).toObject(ServicesNameAvailabilityInfoInner.class); - Assertions.assertEquals("cwrwclxxwrljdous", model.message()); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServicesPatchDescriptionTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServicesPatchDescriptionTests.java deleted file mode 100644 index 2f0bfd0c3324..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServicesPatchDescriptionTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.models.PublicNetworkAccess; -import com.azure.resourcemanager.healthcareapis.models.ServicesPatchDescription; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ServicesPatchDescriptionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServicesPatchDescription model = BinaryData.fromString( - "{\"tags\":{\"rzevdphlxaol\":\"jakhmsbzjh\",\"fsinzgvfcjrwzoxx\":\"hqtrgqjbpf\",\"wfzitonpeqfpjk\":\"tfell\",\"nmayhuybb\":\"lxofpdvhpfxxypin\"},\"properties\":{\"publicNetworkAccess\":\"Enabled\"}}") - .toObject(ServicesPatchDescription.class); - Assertions.assertEquals("jakhmsbzjh", model.tags().get("rzevdphlxaol")); - Assertions.assertEquals(PublicNetworkAccess.ENABLED, model.publicNetworkAccess()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServicesPatchDescription model = new ServicesPatchDescription().withTags(mapOf("rzevdphlxaol", "jakhmsbzjh", - "fsinzgvfcjrwzoxx", "hqtrgqjbpf", "wfzitonpeqfpjk", "tfell", "nmayhuybb", "lxofpdvhpfxxypin")) - .withPublicNetworkAccess(PublicNetworkAccess.ENABLED); - model = BinaryData.fromObject(model).toObject(ServicesPatchDescription.class); - Assertions.assertEquals("jakhmsbzjh", model.tags().get("rzevdphlxaol")); - Assertions.assertEquals(PublicNetworkAccess.ENABLED, model.publicNetworkAccess()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServicesPropertiesUpdateParametersTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServicesPropertiesUpdateParametersTests.java deleted file mode 100644 index 26300681cd03..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServicesPropertiesUpdateParametersTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.fluent.models.ServicesPropertiesUpdateParameters; -import com.azure.resourcemanager.healthcareapis.models.PublicNetworkAccess; -import org.junit.jupiter.api.Assertions; - -public final class ServicesPropertiesUpdateParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServicesPropertiesUpdateParameters model = BinaryData.fromString("{\"publicNetworkAccess\":\"Enabled\"}") - .toObject(ServicesPropertiesUpdateParameters.class); - Assertions.assertEquals(PublicNetworkAccess.ENABLED, model.publicNetworkAccess()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServicesPropertiesUpdateParameters model - = new ServicesPropertiesUpdateParameters().withPublicNetworkAccess(PublicNetworkAccess.ENABLED); - model = BinaryData.fromObject(model).toObject(ServicesPropertiesUpdateParameters.class); - Assertions.assertEquals(PublicNetworkAccess.ENABLED, model.publicNetworkAccess()); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServicesResourceIdentityTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServicesResourceIdentityTests.java deleted file mode 100644 index 193e6849f7a2..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServicesResourceIdentityTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.healthcareapis.models.ServicesResourceIdentity; -import org.junit.jupiter.api.Assertions; - -public final class ServicesResourceIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServicesResourceIdentity model - = BinaryData.fromString("{\"principalId\":\"ctazakljlahbcryf\",\"tenantId\":\"fdosyg\",\"type\":\"None\"}") - .toObject(ServicesResourceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServicesResourceIdentity model = new ServicesResourceIdentity().withType(ManagedServiceIdentityType.NONE); - model = BinaryData.fromObject(model).toObject(ServicesResourceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.type()); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServicesResourceTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServicesResourceTests.java deleted file mode 100644 index 3d1ba023245e..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/ServicesResourceTests.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.models.Kind; -import com.azure.resourcemanager.healthcareapis.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.healthcareapis.models.ServicesResource; -import com.azure.resourcemanager.healthcareapis.models.ServicesResourceIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ServicesResourceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServicesResource model = BinaryData.fromString( - "{\"kind\":\"fhir-Stu3\",\"etag\":\"inpm\",\"identity\":{\"principalId\":\"aqwi\",\"tenantId\":\"sprozvcput\",\"type\":\"SystemAssigned\"},\"location\":\"vwmf\",\"tags\":{\"mkjozkrwf\":\"scmdvpjhulsuu\"},\"id\":\"dio\",\"name\":\"jpslwejd\",\"type\":\"vwryoqpso\"}") - .toObject(ServicesResource.class); - Assertions.assertEquals("vwmf", model.location()); - Assertions.assertEquals("scmdvpjhulsuu", model.tags().get("mkjozkrwf")); - Assertions.assertEquals(Kind.FHIR_STU3, model.kind()); - Assertions.assertEquals("inpm", model.etag()); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServicesResource model = new ServicesResource().withLocation("vwmf") - .withTags(mapOf("mkjozkrwf", "scmdvpjhulsuu")).withKind(Kind.FHIR_STU3).withEtag("inpm") - .withIdentity(new ServicesResourceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED)); - model = BinaryData.fromObject(model).toObject(ServicesResource.class); - Assertions.assertEquals("vwmf", model.location()); - Assertions.assertEquals("scmdvpjhulsuu", model.tags().get("mkjozkrwf")); - Assertions.assertEquals(Kind.FHIR_STU3, model.kind()); - Assertions.assertEquals("inpm", model.etag()); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/TaggedResourceTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/TaggedResourceTests.java deleted file mode 100644 index d56a7d900b18..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/TaggedResourceTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.models.TaggedResource; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class TaggedResourceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TaggedResource model = BinaryData.fromString( - "{\"tags\":{\"zj\":\"gwdkcglhsl\"},\"location\":\"ggd\",\"etag\":\"ixhbkuofqweykhm\",\"id\":\"n\",\"name\":\"vfyexfw\",\"type\":\"ybcibvyvdcsit\"}") - .toObject(TaggedResource.class); - Assertions.assertEquals("ixhbkuofqweykhm", model.etag()); - Assertions.assertEquals("ggd", model.location()); - Assertions.assertEquals("gwdkcglhsl", model.tags().get("zj")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TaggedResource model - = new TaggedResource().withEtag("ixhbkuofqweykhm").withLocation("ggd").withTags(mapOf("zj", "gwdkcglhsl")); - model = BinaryData.fromObject(model).toObject(TaggedResource.class); - Assertions.assertEquals("ixhbkuofqweykhm", model.etag()); - Assertions.assertEquals("ggd", model.location()); - Assertions.assertEquals("gwdkcglhsl", model.tags().get("zj")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} 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 deleted file mode 100644 index 5a215aca194e..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/UserAssignedIdentityTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.models.UserAssignedIdentity; - -public final class UserAssignedIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UserAssignedIdentity model = BinaryData.fromString( - "{\"principalId\":\"6aae38cb-f767-4045-a52f-784fc4d618b7\",\"clientId\":\"9e87805f-8a43-4458-9329-3bb8015429d4\"}") - .toObject(UserAssignedIdentity.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UserAssignedIdentity model = new UserAssignedIdentity(); - model = BinaryData.fromObject(model).toObject(UserAssignedIdentity.class); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/WorkspaceInnerTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/WorkspaceInnerTests.java deleted file mode 100644 index f3e654f1859b..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/WorkspaceInnerTests.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.fluent.models.WorkspaceInner; -import com.azure.resourcemanager.healthcareapis.models.PublicNetworkAccess; -import com.azure.resourcemanager.healthcareapis.models.WorkspaceProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class WorkspaceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkspaceInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Creating\",\"privateEndpointConnections\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"jjxhvpmo\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"dzxibqeojnxqbzvd\",\"actionsRequired\":\"t\"},\"provisioningState\":\"Deleting\"},\"id\":\"eic\",\"name\":\"twnpzaoqvuhrhcf\",\"type\":\"cyddglmjthjqk\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"icxm\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"q\",\"actionsRequired\":\"khixuigdtopbo\"},\"provisioningState\":\"Succeeded\"},\"id\":\"ghmewuam\",\"name\":\"uhrzayvvt\",\"type\":\"gvdfgiotkftutq\"}],\"publicNetworkAccess\":\"Disabled\"},\"tags\":{\"xdqmidtthzrvqdra\":\"efgugnxk\",\"skanyk\":\"hjybigehoqfbo\",\"nhzgpphrcgyn\":\"zlcuiywgqywgndrv\"},\"location\":\"cpecfvmmcoofs\",\"etag\":\"zevgb\",\"id\":\"qjqabcypmivkwl\",\"name\":\"uvcc\",\"type\":\"wnfnbacf\"}") - .toObject(WorkspaceInner.class); - Assertions.assertEquals("zevgb", model.etag()); - Assertions.assertEquals("cpecfvmmcoofs", model.location()); - Assertions.assertEquals("efgugnxk", model.tags().get("xdqmidtthzrvqdra")); - Assertions.assertEquals(PublicNetworkAccess.DISABLED, model.properties().publicNetworkAccess()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkspaceInner model = new WorkspaceInner().withEtag("zevgb").withLocation("cpecfvmmcoofs") - .withTags( - mapOf("xdqmidtthzrvqdra", "efgugnxk", "skanyk", "hjybigehoqfbo", "nhzgpphrcgyn", "zlcuiywgqywgndrv")) - .withProperties(new WorkspaceProperties().withPublicNetworkAccess(PublicNetworkAccess.DISABLED)); - model = BinaryData.fromObject(model).toObject(WorkspaceInner.class); - Assertions.assertEquals("zevgb", model.etag()); - Assertions.assertEquals("cpecfvmmcoofs", model.location()); - Assertions.assertEquals("efgugnxk", model.tags().get("xdqmidtthzrvqdra")); - Assertions.assertEquals(PublicNetworkAccess.DISABLED, model.properties().publicNetworkAccess()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/WorkspaceListTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/WorkspaceListTests.java deleted file mode 100644 index 6572b7d1b3b8..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/WorkspaceListTests.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.fluent.models.WorkspaceInner; -import com.azure.resourcemanager.healthcareapis.models.PublicNetworkAccess; -import com.azure.resourcemanager.healthcareapis.models.WorkspaceList; -import com.azure.resourcemanager.healthcareapis.models.WorkspaceProperties; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class WorkspaceListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkspaceList model = BinaryData.fromString( - "{\"nextLink\":\"ajzyul\",\"value\":[{\"properties\":{\"provisioningState\":\"Moving\",\"privateEndpointConnections\":[{\"properties\":{\"privateLinkServiceConnectionState\":{}},\"id\":\"hbzhfepg\",\"name\":\"gqexzlocxs\",\"type\":\"paierh\"},{\"properties\":{\"privateLinkServiceConnectionState\":{}},\"id\":\"csglum\",\"name\":\"a\",\"type\":\"tjaodxobnb\"}],\"publicNetworkAccess\":\"Enabled\"},\"tags\":{\"onpimexgstxg\":\"okaj\"},\"location\":\"odgmaajrmvdjwz\",\"etag\":\"ovmclwhijcoejct\",\"id\":\"zaqsqsycbkbfk\",\"name\":\"ukdkexxppofmxa\",\"type\":\"c\"}]}") - .toObject(WorkspaceList.class); - Assertions.assertEquals("ajzyul", model.nextLink()); - Assertions.assertEquals("ovmclwhijcoejct", model.value().get(0).etag()); - Assertions.assertEquals("odgmaajrmvdjwz", model.value().get(0).location()); - Assertions.assertEquals("okaj", model.value().get(0).tags().get("onpimexgstxg")); - Assertions.assertEquals(PublicNetworkAccess.ENABLED, model.value().get(0).properties().publicNetworkAccess()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkspaceList model = new WorkspaceList().withNextLink("ajzyul") - .withValue(Arrays.asList(new WorkspaceInner().withEtag("ovmclwhijcoejct").withLocation("odgmaajrmvdjwz") - .withTags(mapOf("onpimexgstxg", "okaj")) - .withProperties(new WorkspaceProperties().withPublicNetworkAccess(PublicNetworkAccess.ENABLED)))); - model = BinaryData.fromObject(model).toObject(WorkspaceList.class); - Assertions.assertEquals("ajzyul", model.nextLink()); - Assertions.assertEquals("ovmclwhijcoejct", model.value().get(0).etag()); - Assertions.assertEquals("odgmaajrmvdjwz", model.value().get(0).location()); - Assertions.assertEquals("okaj", model.value().get(0).tags().get("onpimexgstxg")); - Assertions.assertEquals(PublicNetworkAccess.ENABLED, model.value().get(0).properties().publicNetworkAccess()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacePatchResourceTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacePatchResourceTests.java deleted file mode 100644 index 1f223db2d1f9..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacePatchResourceTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.models.WorkspacePatchResource; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class WorkspacePatchResourceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkspacePatchResource model = BinaryData.fromString( - "{\"tags\":{\"yzydagfuaxbezyi\":\"dsfcpkvxodpuoz\",\"ywqsmbsurexim\":\"okktwhrdxw\",\"stkiiuxhqyud\":\"ryocfsfksymdd\",\"rq\":\"o\"}}") - .toObject(WorkspacePatchResource.class); - Assertions.assertEquals("dsfcpkvxodpuoz", model.tags().get("yzydagfuaxbezyi")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkspacePatchResource model = new WorkspacePatchResource().withTags(mapOf("yzydagfuaxbezyi", "dsfcpkvxodpuoz", - "ywqsmbsurexim", "okktwhrdxw", "stkiiuxhqyud", "ryocfsfksymdd", "rq", "o")); - model = BinaryData.fromObject(model).toObject(WorkspacePatchResource.class); - Assertions.assertEquals("dsfcpkvxodpuoz", model.tags().get("yzydagfuaxbezyi")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacePrivateEndpointConnectionsCreateOrUpdateMockTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacePrivateEndpointConnectionsCreateOrUpdateMockTests.java deleted file mode 100644 index 35d7b67829ce..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacePrivateEndpointConnectionsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.healthcareapis.HealthcareApisManager; -import com.azure.resourcemanager.healthcareapis.fluent.models.PrivateEndpointConnectionDescriptionInner; -import com.azure.resourcemanager.healthcareapis.models.PrivateEndpoint; -import com.azure.resourcemanager.healthcareapis.models.PrivateEndpointConnectionDescription; -import com.azure.resourcemanager.healthcareapis.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.healthcareapis.models.PrivateLinkServiceConnectionState; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkspacePrivateEndpointConnectionsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"properties\":{\"privateEndpoint\":{\"id\":\"ij\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"bmqzbqqxlajrnwx\",\"actionsRequired\":\"evehjkuyxoaf\"},\"provisioningState\":\"Succeeded\"},\"id\":\"qltfaey\",\"name\":\"inmfgvxirp\",\"type\":\"hriypoqeyhlqhy\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HealthcareApisManager manager = HealthcareApisManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PrivateEndpointConnectionDescription response = manager.workspacePrivateEndpointConnections() - .createOrUpdate("vruzslzojhpctfnm", "xotngfdguge", "zihgrkyu", - new PrivateEndpointConnectionDescriptionInner().withPrivateEndpoint(new PrivateEndpoint()) - .withPrivateLinkServiceConnectionState(new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointServiceConnectionStatus.REJECTED).withDescription("evy") - .withActionsRequired("hsgz")), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.PENDING, - response.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("bmqzbqqxlajrnwx", response.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("evehjkuyxoaf", response.privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacePrivateEndpointConnectionsDeleteMockTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacePrivateEndpointConnectionsDeleteMockTests.java deleted file mode 100644 index 6d5cc5cee25b..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacePrivateEndpointConnectionsDeleteMockTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.healthcareapis.HealthcareApisManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkspacePrivateEndpointConnectionsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HealthcareApisManager manager = HealthcareApisManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.workspacePrivateEndpointConnections().delete("prlpy", "nuciqdsmexiit", "fuxtyasiibmiybnn", - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacePrivateEndpointConnectionsGetWithResponseMockTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacePrivateEndpointConnectionsGetWithResponseMockTests.java deleted file mode 100644 index b6d188da4348..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacePrivateEndpointConnectionsGetWithResponseMockTests.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.healthcareapis.HealthcareApisManager; -import com.azure.resourcemanager.healthcareapis.models.PrivateEndpointConnectionDescription; -import com.azure.resourcemanager.healthcareapis.models.PrivateEndpointServiceConnectionStatus; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkspacePrivateEndpointConnectionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"properties\":{\"privateEndpoint\":{\"id\":\"gegydcwboxjum\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"lihrraiouaubr\",\"actionsRequired\":\"loqxfuojrngif\"},\"provisioningState\":\"Succeeded\"},\"id\":\"pasccbi\",\"name\":\"imzdlyj\",\"type\":\"fqwmkyoquf\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HealthcareApisManager manager = HealthcareApisManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PrivateEndpointConnectionDescription response = manager.workspacePrivateEndpointConnections() - .getWithResponse("uncuw", "qspkcdqzhlctd", "unqndyfpchrqb", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.APPROVED, - response.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("lihrraiouaubr", response.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("loqxfuojrngif", response.privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacePrivateEndpointConnectionsListByWorkspaceMockTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacePrivateEndpointConnectionsListByWorkspaceMockTests.java deleted file mode 100644 index 25acefc88e70..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacePrivateEndpointConnectionsListByWorkspaceMockTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.healthcareapis.HealthcareApisManager; -import com.azure.resourcemanager.healthcareapis.models.PrivateEndpointConnectionDescription; -import com.azure.resourcemanager.healthcareapis.models.PrivateEndpointServiceConnectionStatus; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkspacePrivateEndpointConnectionsListByWorkspaceMockTests { - @Test - public void testListByWorkspace() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"value\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"epqtybb\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"dakchzyvl\",\"actionsRequired\":\"q\"},\"provisioningState\":\"Succeeded\"},\"id\":\"cxkjibnxmysuxswq\",\"name\":\"ntvlwijpsttexo\",\"type\":\"qpwcyyufmh\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HealthcareApisManager manager = HealthcareApisManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.workspacePrivateEndpointConnections() - .listByWorkspace("ywuhpsvfuur", "tlwexxwlalniexz", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.PENDING, - response.iterator().next().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("dakchzyvl", - response.iterator().next().privateLinkServiceConnectionState().description()); - Assertions.assertEquals("q", response.iterator().next().privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacePrivateLinkResourcesGetWithResponseMockTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacePrivateLinkResourcesGetWithResponseMockTests.java deleted file mode 100644 index 4b8cf701c49f..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacePrivateLinkResourcesGetWithResponseMockTests.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.healthcareapis.HealthcareApisManager; -import com.azure.resourcemanager.healthcareapis.models.PrivateLinkResourceDescription; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkspacePrivateLinkResourcesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"properties\":{\"groupId\":\"hsdtmc\",\"requiredMembers\":[\"ufcohdxbz\",\"mcmuapc\"],\"requiredZoneNames\":[\"bevwqqxeys\",\"onqzinkfkbgbzbow\",\"eqocljmygvk\",\"qkjjeokbz\"]},\"id\":\"fezrx\",\"name\":\"czurtlei\",\"type\":\"q\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HealthcareApisManager manager = HealthcareApisManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PrivateLinkResourceDescription response = manager.workspacePrivateLinkResources() - .getWithResponse("bdb", "qgqqihedsvqwthmk", "ibcysihsgqc", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("bevwqqxeys", response.requiredZoneNames().get(0)); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacePrivateLinkResourcesListByWorkspaceMockTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacePrivateLinkResourcesListByWorkspaceMockTests.java deleted file mode 100644 index 2f798f75be85..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacePrivateLinkResourcesListByWorkspaceMockTests.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.healthcareapis.HealthcareApisManager; -import com.azure.resourcemanager.healthcareapis.models.PrivateLinkResourceDescription; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkspacePrivateLinkResourcesListByWorkspaceMockTests { - @Test - public void testListByWorkspace() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"value\":[{\"properties\":{\"groupId\":\"foudor\",\"requiredMembers\":[\"yyprotwyp\",\"ndm\",\"xhugcm\"],\"requiredZoneNames\":[\"vlgo\"]},\"id\":\"bmftpmdt\",\"name\":\"fjltfvnzcyjtotp\",\"type\":\"opv\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HealthcareApisManager manager = HealthcareApisManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.workspacePrivateLinkResources() - .listByWorkspace("stgnl", "hnmgixhcm", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("vlgo", response.iterator().next().requiredZoneNames().get(0)); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacePropertiesTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacePropertiesTests.java deleted file mode 100644 index 3a9448255ea3..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacePropertiesTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.healthcareapis.models.PublicNetworkAccess; -import com.azure.resourcemanager.healthcareapis.models.WorkspaceProperties; -import org.junit.jupiter.api.Assertions; - -public final class WorkspacePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkspaceProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Succeeded\",\"privateEndpointConnections\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"tqgtzxdpnqbqq\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"feallnwsu\",\"actionsRequired\":\"snjampmng\"},\"provisioningState\":\"Creating\"},\"id\":\"c\",\"name\":\"aqw\",\"type\":\"ochcbonqvpkvl\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"ea\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"heoflokeyyienjbd\",\"actionsRequired\":\"tgrhpdjpjumas\"},\"provisioningState\":\"Succeeded\"},\"id\":\"jpqyegu\",\"name\":\"lhbxxhejjzzvdud\",\"type\":\"wdslfhotwmcy\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"bjnpg\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"adehxnltyfsopp\",\"actionsRequired\":\"uesnzwdejbavo\"},\"provisioningState\":\"Deleting\"},\"id\":\"dmoh\",\"name\":\"tbqvudw\",\"type\":\"dndnvow\"}],\"publicNetworkAccess\":\"Disabled\"}") - .toObject(WorkspaceProperties.class); - Assertions.assertEquals(PublicNetworkAccess.DISABLED, model.publicNetworkAccess()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkspaceProperties model = new WorkspaceProperties().withPublicNetworkAccess(PublicNetworkAccess.DISABLED); - model = BinaryData.fromObject(model).toObject(WorkspaceProperties.class); - Assertions.assertEquals(PublicNetworkAccess.DISABLED, model.publicNetworkAccess()); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacesCreateOrUpdateMockTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacesCreateOrUpdateMockTests.java deleted file mode 100644 index 4bba943111a0..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacesCreateOrUpdateMockTests.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.healthcareapis.HealthcareApisManager; -import com.azure.resourcemanager.healthcareapis.models.PublicNetworkAccess; -import com.azure.resourcemanager.healthcareapis.models.Workspace; -import com.azure.resourcemanager.healthcareapis.models.WorkspaceProperties; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkspacesCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpointConnections\":[{\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Succeeded\"},\"id\":\"xfzwi\",\"name\":\"vwzjbhyz\",\"type\":\"xjrk\"}],\"publicNetworkAccess\":\"Enabled\"},\"tags\":{\"nvuqeqvldspa\":\"egv\",\"kdmflvestmjlx\":\"tjb\",\"zapeewchpx\":\"ril\"},\"location\":\"twkuziycs\",\"etag\":\"vu\",\"id\":\"uztcktyhjtqed\",\"name\":\"gzulwmmrqzzr\",\"type\":\"jvpglydzgk\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HealthcareApisManager manager = HealthcareApisManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Workspace response = manager.workspaces().define("nobaiyhddviacegf").withExistingResourceGroup("jkmnwq") - .withRegion("onbzoggculapzwy").withTags(mapOf("pjxxkzb", "aaewdaomdjv", "ncj", "msgeivsiykzk")) - .withEtag("gogtqxepnylbf") - .withProperties(new WorkspaceProperties().withPublicNetworkAccess(PublicNetworkAccess.ENABLED)).create(); - - Assertions.assertEquals("vu", response.etag()); - Assertions.assertEquals("twkuziycs", response.location()); - Assertions.assertEquals("egv", response.tags().get("nvuqeqvldspa")); - Assertions.assertEquals(PublicNetworkAccess.ENABLED, response.properties().publicNetworkAccess()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacesDeleteMockTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacesDeleteMockTests.java deleted file mode 100644 index 5c6c6d388c54..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacesDeleteMockTests.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.healthcareapis.HealthcareApisManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkspacesDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HealthcareApisManager manager = HealthcareApisManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.workspaces().delete("agst", "yohpfkyrkdbdgiog", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacesGetByResourceGroupWithResponseMockTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacesGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index 9152666631f4..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacesGetByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.healthcareapis.HealthcareApisManager; -import com.azure.resourcemanager.healthcareapis.models.PublicNetworkAccess; -import com.azure.resourcemanager.healthcareapis.models.Workspace; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkspacesGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"properties\":{\"provisioningState\":\"Suspended\",\"privateEndpointConnections\":[{\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Deleting\"},\"id\":\"ffgcvizqz\",\"name\":\"wlvwlyoupf\",\"type\":\"fbkjubdyhgkfmi\"},{\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Succeeded\"},\"id\":\"zfttsttktlahb\",\"name\":\"actxtgzukxitm\",\"type\":\"qtgqqqxhrnxr\"},{\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Creating\"},\"id\":\"isavok\",\"name\":\"dzf\",\"type\":\"azivjlfrqttbajl\"},{\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Deleting\"},\"id\":\"xyiopidkqqfku\",\"name\":\"s\",\"type\":\"xkdmligo\"}],\"publicNetworkAccess\":\"Enabled\"},\"tags\":{\"goorbteo\":\"pmloazuruoc\",\"r\":\"bfhjxakvvjgsl\"},\"location\":\"lmywwtkgkxnyed\",\"etag\":\"gyvudtjuewbc\",\"id\":\"hxuuwhcjyxccybvp\",\"name\":\"yakk\",\"type\":\"dzpxgwjpl\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HealthcareApisManager manager = HealthcareApisManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Workspace response = manager.workspaces() - .getByResourceGroupWithResponse("pi", "lqol", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("gyvudtjuewbc", response.etag()); - Assertions.assertEquals("lmywwtkgkxnyed", response.location()); - Assertions.assertEquals("pmloazuruoc", response.tags().get("goorbteo")); - Assertions.assertEquals(PublicNetworkAccess.ENABLED, response.properties().publicNetworkAccess()); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacesListByResourceGroupMockTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacesListByResourceGroupMockTests.java deleted file mode 100644 index a793b71d5c14..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacesListByResourceGroupMockTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.healthcareapis.HealthcareApisManager; -import com.azure.resourcemanager.healthcareapis.models.PublicNetworkAccess; -import com.azure.resourcemanager.healthcareapis.models.Workspace; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkspacesListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Deprovisioned\",\"privateEndpointConnections\":[{\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Failed\"},\"id\":\"fi\",\"name\":\"ndieuzaofj\",\"type\":\"hvcyyysfg\"},{\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Failed\"},\"id\":\"biipuip\",\"name\":\"oqonma\",\"type\":\"jeknizshq\"}],\"publicNetworkAccess\":\"Enabled\"},\"tags\":{\"dxsm\":\"vfgmblrrilby\"},\"location\":\"cwrwfs\",\"etag\":\"fnynszqujizdvoqy\",\"id\":\"ibyowbblgyavutp\",\"name\":\"hjoxo\",\"type\":\"smsks\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HealthcareApisManager manager = HealthcareApisManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.workspaces().listByResourceGroup("wjhhgdnhxmsivf", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("fnynszqujizdvoqy", response.iterator().next().etag()); - Assertions.assertEquals("cwrwfs", response.iterator().next().location()); - Assertions.assertEquals("vfgmblrrilby", response.iterator().next().tags().get("dxsm")); - Assertions.assertEquals(PublicNetworkAccess.ENABLED, - response.iterator().next().properties().publicNetworkAccess()); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacesListMockTests.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacesListMockTests.java deleted file mode 100644 index c95006fafeaf..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/test/java/com/azure/resourcemanager/healthcareapis/generated/WorkspacesListMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.healthcareapis.HealthcareApisManager; -import com.azure.resourcemanager.healthcareapis.models.PublicNetworkAccess; -import com.azure.resourcemanager.healthcareapis.models.Workspace; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkspacesListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"privateEndpointConnections\":[{\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Failed\"},\"id\":\"vewzcj\",\"name\":\"nmwcpmgu\",\"type\":\"adraufactkahzo\"},{\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Deleting\"},\"id\":\"iuxxpshneekulfg\",\"name\":\"lqubkwdlen\",\"type\":\"d\"},{\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Failed\"},\"id\":\"bazpjuohmi\",\"name\":\"yfln\",\"type\":\"rwm\"}],\"publicNetworkAccess\":\"Disabled\"},\"tags\":{\"xpgpq\":\"lvxwmyg\",\"daxconfozauorsuk\":\"hiszepnnbjcrxgib\"},\"location\":\"wbqpl\",\"etag\":\"vnuuepzl\",\"id\":\"phwzsoldweyuqdu\",\"name\":\"vmnnrw\",\"type\":\"biorktal\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HealthcareApisManager manager = HealthcareApisManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.workspaces().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("vnuuepzl", response.iterator().next().etag()); - Assertions.assertEquals("wbqpl", response.iterator().next().location()); - Assertions.assertEquals("lvxwmyg", response.iterator().next().tags().get("xpgpq")); - Assertions.assertEquals(PublicNetworkAccess.DISABLED, - response.iterator().next().properties().publicNetworkAccess()); - } -}