From ae5e23710af1c61f4624cf58836c196f8ebfef35 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 2 Feb 2023 08:29:14 +0000 Subject: [PATCH] CodeGen from PR 22427 in Azure/azure-rest-api-specs Merge f60ca6b30394bb68a1f46479e58266eaf3f0d1db into 1c23efa3fffb2bba8dab4875e6e6639c596b76e3 --- eng/versioning/version_client.txt | 1 + pom.xml | 1 + .../CHANGELOG.md | 5 + .../README.md | 105 ++ .../SAMPLE.md | 1124 +++++++++++++ .../pom.xml | 55 + .../NetworkanalyticsManager.java | 349 ++++ .../fluent/DataConnectorOperationsClient.java | 237 +++ .../MetricsIngestionEndpointsClient.java | 203 +++ .../fluent/MicrosoftNetworkAnalytics.java | 81 + ...tworkAnalyticsProductOperationsClient.java | 228 +++ .../fluent/OperationsClient.java | 38 + .../fluent/StoragesClient.java | 238 +++ .../fluent/models/DataConnectorsInner.java | 258 +++ .../models/DataConnectorsProperties.java | 289 ++++ .../DataConnectorsUpdateProperties.java | 55 + .../models/DataLakeHouseResourcesInner.java | 207 +++ ...ataLakeHouseResourcesUpdateProperties.java | 55 + .../MetricsIngestionEndpointProperties.java | 153 ++ ...etricsIngestionEndpointResourcesInner.java | 146 ++ .../models/NetworkAnalyticsProductsInner.java | 94 ++ .../NetworkAnalyticsProductsProperties.java | 80 + .../fluent/models/OperationInner.java | 127 ++ .../fluent/models/StorageProperties.java | 203 +++ .../fluent/models/package-info.java | 6 + .../networkanalytics/fluent/package-info.java | 6 + .../DataConnectorOperationsClientImpl.java | 1447 +++++++++++++++++ .../DataConnectorOperationsImpl.java | 174 ++ .../implementation/DataConnectorsImpl.java | 268 +++ .../DataLakeHouseResourcesImpl.java | 247 +++ ...MetricsIngestionEndpointResourcesImpl.java | 72 + .../MetricsIngestionEndpointsClientImpl.java | 981 +++++++++++ .../MetricsIngestionEndpointsImpl.java | 124 ++ .../MicrosoftNetworkAnalyticsBuilder.java | 144 ++ .../MicrosoftNetworkAnalyticsImpl.java | 346 ++++ ...kAnalyticsProductOperationsClientImpl.java | 1373 ++++++++++++++++ ...NetworkAnalyticsProductOperationsImpl.java | 135 ++ .../NetworkAnalyticsProductsImpl.java | 56 + .../implementation/OperationImpl.java | 51 + .../implementation/OperationsClientImpl.java | 276 ++++ .../implementation/OperationsImpl.java | 46 + .../implementation/StoragesClientImpl.java | 1439 ++++++++++++++++ .../implementation/StoragesImpl.java | 174 ++ .../implementation/Utils.java | 204 +++ .../implementation/package-info.java | 6 + .../networkanalytics/models/ActionType.java | 44 + .../models/AzureDataExplorerProperties.java | 93 ++ .../networkanalytics/models/BlobServices.java | 60 + .../BronzeStorageAccountProperties.java | 50 + .../networkanalytics/models/Bypass.java | 53 + .../CommonStorageAccountProperties.java | 137 ++ .../models/ComputeConfiguration.java | 76 + .../models/DataConnectorConfiguration.java | 129 ++ .../models/DataConnectorOperations.java | 156 ++ .../models/DataConnectors.java | 361 ++++ .../models/DataConnectorsListResult.java | 88 + .../models/DataConnectorsUpdate.java | 96 ++ .../models/DataLakeHouseResources.java | 319 ++++ .../DataLakeHouseResourcesListResult.java | 89 + .../models/DataLakeHouseResourcesUpdate.java | 96 ++ .../models/DataRetentionProperties.java | 163 ++ .../models/DatasetConfiguration.java | 113 ++ .../models/DefaultAction.java | 47 + .../networkanalytics/models/IpRules.java | 83 + .../KustoClusterPrincipalAssignments.java | 117 ++ .../networkanalytics/models/KustoRole.java | 47 + .../ManagedResourceGroupConfiguration.java | 91 ++ .../MetricsIngestionEndpointResources.java | 90 + ...sIngestionEndpointResourcesListResult.java | 89 + .../models/MetricsIngestionEndpoints.java | 135 ++ .../networkanalytics/models/NetworkAcls.java | 189 +++ ...kAnalyticsProductConnectorInformation.java | 93 ++ .../NetworkAnalyticsProductInformation.java | 127 ++ .../NetworkAnalyticsProductOperations.java | 155 ++ .../models/NetworkAnalyticsProducts.java | 60 + .../NetworkAnalyticsProductsListResult.java | 89 + .../networkanalytics/models/Operation.java | 56 + .../models/OperationDisplay.java | 91 ++ .../models/OperationListResult.java | 62 + .../networkanalytics/models/Operations.java | 33 + .../networkanalytics/models/Origin.java | 53 + .../models/PrincipalType.java | 50 + .../models/PrivateEndPoint.java | 154 ++ .../models/ProvisioningState.java | 62 + .../models/ResourceAccessRules.java | 89 + .../models/RestorePolicy.java | 76 + .../models/RetentionProperties.java | 50 + .../networkanalytics/models/Storages.java | 156 ++ .../models/VirtualNetworkConfiguration.java | 123 ++ .../models/VirtualNetworkRule.java | 110 ++ .../networkanalytics/models/package-info.java | 6 + .../networkanalytics/package-info.java | 6 + .../src/main/java/module-info.java | 19 + ...nnectorOperationCreateOrUpdateSamples.java | 90 + .../DataConnectorOperationDeleteSamples.java | 34 + ...torOperationGetByResourceGroupSamples.java | 36 + ...orOperationListByResourceGroupSamples.java | 34 + .../DataConnectorOperationListSamples.java | 34 + .../DataConnectorOperationUpdateSamples.java | 68 + ...gestionEndpointsCreateOrUpdateSamples.java | 50 + ...etricsIngestionEndpointsDeleteSamples.java | 34 + .../MetricsIngestionEndpointsGetSamples.java | 34 + .../MetricsIngestionEndpointsListSamples.java | 34 + ...etricsIngestionEndpointsUpdateSamples.java | 52 + ...ProductOperationCreateOrUpdateSamples.java | 56 + ...nalyticsProductOperationDeleteSamples.java | 34 + ...uctOperationGetByResourceGroupSamples.java | 38 + ...ctOperationListByResourceGroupSamples.java | 34 + ...kAnalyticsProductOperationListSamples.java | 34 + ...nalyticsProductOperationUpdateSamples.java | 52 + .../generated/OperationsListSamples.java | 32 + .../StorageCreateOrUpdateSamples.java | 127 ++ .../generated/StorageDeleteSamples.java | 32 + .../StorageGetByResourceGroupSamples.java | 35 + .../StorageListByResourceGroupSamples.java | 34 + .../generated/StorageListSamples.java | 34 + .../generated/StorageUpdateSamples.java | 65 + sdk/networkanalytics/ci.yml | 47 + sdk/networkanalytics/pom.xml | 15 + 119 files changed, 17807 insertions(+) create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/CHANGELOG.md create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/README.md create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/SAMPLE.md create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/pom.xml create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/NetworkanalyticsManager.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/DataConnectorOperationsClient.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/MetricsIngestionEndpointsClient.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/MicrosoftNetworkAnalytics.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/NetworkAnalyticsProductOperationsClient.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/OperationsClient.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/StoragesClient.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/DataConnectorsInner.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/DataConnectorsProperties.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/DataConnectorsUpdateProperties.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/DataLakeHouseResourcesInner.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/DataLakeHouseResourcesUpdateProperties.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/MetricsIngestionEndpointProperties.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/MetricsIngestionEndpointResourcesInner.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/NetworkAnalyticsProductsInner.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/NetworkAnalyticsProductsProperties.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/OperationInner.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/StorageProperties.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/package-info.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/package-info.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataConnectorOperationsClientImpl.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataConnectorOperationsImpl.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataConnectorsImpl.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataLakeHouseResourcesImpl.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/MetricsIngestionEndpointResourcesImpl.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/MetricsIngestionEndpointsClientImpl.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/MetricsIngestionEndpointsImpl.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/MicrosoftNetworkAnalyticsBuilder.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/MicrosoftNetworkAnalyticsImpl.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/NetworkAnalyticsProductOperationsClientImpl.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/NetworkAnalyticsProductOperationsImpl.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/NetworkAnalyticsProductsImpl.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/OperationImpl.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/OperationsClientImpl.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/OperationsImpl.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/StoragesClientImpl.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/StoragesImpl.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/Utils.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/package-info.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/ActionType.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/AzureDataExplorerProperties.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/BlobServices.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/BronzeStorageAccountProperties.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/Bypass.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/CommonStorageAccountProperties.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/ComputeConfiguration.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataConnectorConfiguration.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataConnectorOperations.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataConnectors.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataConnectorsListResult.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataConnectorsUpdate.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataLakeHouseResources.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataLakeHouseResourcesListResult.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataLakeHouseResourcesUpdate.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataRetentionProperties.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DatasetConfiguration.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DefaultAction.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/IpRules.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/KustoClusterPrincipalAssignments.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/KustoRole.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/ManagedResourceGroupConfiguration.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/MetricsIngestionEndpointResources.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/MetricsIngestionEndpointResourcesListResult.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/MetricsIngestionEndpoints.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/NetworkAcls.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/NetworkAnalyticsProductConnectorInformation.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/NetworkAnalyticsProductInformation.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/NetworkAnalyticsProductOperations.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/NetworkAnalyticsProducts.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/NetworkAnalyticsProductsListResult.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/Operation.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/OperationDisplay.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/OperationListResult.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/Operations.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/Origin.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/PrincipalType.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/PrivateEndPoint.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/ProvisioningState.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/ResourceAccessRules.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/RestorePolicy.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/RetentionProperties.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/Storages.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/VirtualNetworkConfiguration.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/VirtualNetworkRule.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/package-info.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/package-info.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/module-info.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataConnectorOperationCreateOrUpdateSamples.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataConnectorOperationDeleteSamples.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataConnectorOperationGetByResourceGroupSamples.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataConnectorOperationListByResourceGroupSamples.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataConnectorOperationListSamples.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataConnectorOperationUpdateSamples.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/MetricsIngestionEndpointsCreateOrUpdateSamples.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/MetricsIngestionEndpointsDeleteSamples.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/MetricsIngestionEndpointsGetSamples.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/MetricsIngestionEndpointsListSamples.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/MetricsIngestionEndpointsUpdateSamples.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/NetworkAnalyticsProductOperationCreateOrUpdateSamples.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/NetworkAnalyticsProductOperationDeleteSamples.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/NetworkAnalyticsProductOperationGetByResourceGroupSamples.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/NetworkAnalyticsProductOperationListByResourceGroupSamples.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/NetworkAnalyticsProductOperationListSamples.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/NetworkAnalyticsProductOperationUpdateSamples.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/OperationsListSamples.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/StorageCreateOrUpdateSamples.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/StorageDeleteSamples.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/StorageGetByResourceGroupSamples.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/StorageListByResourceGroupSamples.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/StorageListSamples.java create mode 100644 sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/StorageUpdateSamples.java create mode 100644 sdk/networkanalytics/ci.yml create mode 100644 sdk/networkanalytics/pom.xml diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 5f8e248676a4..22e182274fd2 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -392,6 +392,7 @@ com.azure.resourcemanager:azure-resourcemanager-appcomplianceautomation;1.0.0-be com.azure.resourcemanager:azure-resourcemanager-servicenetworking;1.0.0-beta.1;1.0.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-recoveryservicessiterecovery;1.0.0-beta.1;1.0.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-billingbenefits;1.0.0-beta.1;1.0.0-beta.2 +com.azure.resourcemanager:azure-resourcemanager-networkanalytics;1.0.0-beta.1;1.0.0-beta.1 com.azure.tools:azure-sdk-archetype;1.0.0;1.2.0-beta.1 com.azure.tools:azure-sdk-build-tool;1.0.0-beta.1;1.0.0-beta.2 diff --git a/pom.xml b/pom.xml index 5081c08637ea..78f97010c295 100644 --- a/pom.xml +++ b/pom.xml @@ -119,6 +119,7 @@ sdk/mysql sdk/mysqlflexibleserver sdk/netapp + sdk/networkanalytics sdk/networkfunction sdk/nginx sdk/notificationhubs diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/CHANGELOG.md b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/CHANGELOG.md new file mode 100644 index 000000000000..badd854f4f71 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/CHANGELOG.md @@ -0,0 +1,5 @@ +# Release History + +## 1.0.0-beta.1 (2023-02-02) + +- Azure Resource Manager networkanalytics client library for Java. This package contains Microsoft Azure SDK for networkanalytics Management SDK. Package tag package-2023-04-30. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/README.md b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/README.md new file mode 100644 index 000000000000..9ad8b9847901 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/README.md @@ -0,0 +1,105 @@ +# Azure Resource Manager networkanalytics client library for Java + +Azure Resource Manager networkanalytics client library for Java. + +This package contains Microsoft Azure SDK for networkanalytics Management SDK. Package tag package-2023-04-30. 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 + +We're always working on improving our products and the way we communicate with our users. So we'd love to learn what's working and how we can do better. + +If you haven't already, please take a few minutes to [complete this short survey][survey] we have put together. + +Thank you in advance for your collaboration. We really appreciate your time! + +## Documentation + +Various documentation is available to help you get started + +- [API reference documentation][docs] + +## Getting started + +### Prerequisites + +- [Java Development Kit (JDK)][jdk] with version 8 or above +- [Azure Subscription][azure_subscription] + +### Adding the package to your product + +[//]: # ({x-version-update-start;com.azure.resourcemanager:azure-resourcemanager-networkanalytics;current}) +```xml + + com.azure.resourcemanager + azure-resourcemanager-networkanalytics + 1.0.0-beta.1 + +``` +[//]: # ({x-version-update-end}) + +### Include the recommended packages + +Azure Management Libraries require a `TokenCredential` implementation for authentication and an `HttpClient` implementation for HTTP client. + +[Azure Identity][azure_identity] and [Azure Core Netty HTTP][azure_core_http_netty] packages provide the default implementation. + +### Authentication + +By default, Azure Active Directory token authentication depends on correct configuration of the following environment variables. + +- `AZURE_CLIENT_ID` for Azure client ID. +- `AZURE_TENANT_ID` for Azure tenant ID. +- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate. + +In addition, Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable. + +With above configuration, `azure` client can be authenticated using the following code: + +```java +AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); +TokenCredential credential = new DefaultAzureCredentialBuilder() + .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint()) + .build(); +NetworkanalyticsManager manager = NetworkanalyticsManager + .authenticate(credential, profile); +``` + +The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise. + +See [Authentication][authenticate] for more options. + +## Key concepts + +See [API design][design] for general introduction on design and key concepts on Azure Management Libraries. + +## Examples + +[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/networkanalytics/azure-resourcemanager-networkanalytics/SAMPLE.md) + + +## Troubleshooting + +## Next steps + +## Contributing + +For details on contributing to this repository, see the [contributing guide][cg]. + +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit . + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact with any additional questions or comments. + + +[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS +[docs]: https://azure.github.io/azure-sdk-for-java/ +[jdk]: https://docs.microsoft.com/java/azure/jdk/ +[azure_subscription]: https://azure.microsoft.com/free/ +[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity +[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty +[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md +[design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md +[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md +[coc]: https://opensource.microsoft.com/codeofconduct/ +[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/SAMPLE.md b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/SAMPLE.md new file mode 100644 index 000000000000..558986b4df39 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/SAMPLE.md @@ -0,0 +1,1124 @@ +# Code snippets and samples + + +## DataConnectorOperation + +- [CreateOrUpdate](#dataconnectoroperation_createorupdate) +- [Delete](#dataconnectoroperation_delete) +- [GetByResourceGroup](#dataconnectoroperation_getbyresourcegroup) +- [List](#dataconnectoroperation_list) +- [ListByResourceGroup](#dataconnectoroperation_listbyresourcegroup) +- [Update](#dataconnectoroperation_update) + +## MetricsIngestionEndpoints + +- [CreateOrUpdate](#metricsingestionendpoints_createorupdate) +- [Delete](#metricsingestionendpoints_delete) +- [Get](#metricsingestionendpoints_get) +- [List](#metricsingestionendpoints_list) +- [Update](#metricsingestionendpoints_update) + +## NetworkAnalyticsProductOperation + +- [CreateOrUpdate](#networkanalyticsproductoperation_createorupdate) +- [Delete](#networkanalyticsproductoperation_delete) +- [GetByResourceGroup](#networkanalyticsproductoperation_getbyresourcegroup) +- [List](#networkanalyticsproductoperation_list) +- [ListByResourceGroup](#networkanalyticsproductoperation_listbyresourcegroup) +- [Update](#networkanalyticsproductoperation_update) + +## Operations + +- [List](#operations_list) + +## Storage + +- [CreateOrUpdate](#storage_createorupdate) +- [Delete](#storage_delete) +- [GetByResourceGroup](#storage_getbyresourcegroup) +- [List](#storage_list) +- [ListByResourceGroup](#storage_listbyresourcegroup) +- [Update](#storage_update) +### DataConnectorOperation_CreateOrUpdate + +```java +import com.azure.resourcemanager.networkanalytics.models.ComputeConfiguration; +import com.azure.resourcemanager.networkanalytics.models.DataConnectorConfiguration; +import com.azure.resourcemanager.networkanalytics.models.DataRetentionProperties; +import com.azure.resourcemanager.networkanalytics.models.DatasetConfiguration; +import com.azure.resourcemanager.networkanalytics.models.ManagedResourceGroupConfiguration; +import com.azure.resourcemanager.networkanalytics.models.RetentionProperties; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for DataConnectorOperation CreateOrUpdate. */ +public final class DataConnectorOperationCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/DataConnector_CreateOrUpdate_MaximumSet_Gen.json + */ + /** + * Sample code: DataConnector_CreateOrUpdate_Max. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void dataConnectorCreateOrUpdateMax( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager + .dataConnectorOperations() + .define("rtjrnwmvydrsclcye") + .withRegion("lkdprsvepnusozfvpkqqv") + .withExistingResourceGroup("rgopenapi") + .withTags(mapOf("key1835", "zatlpsdiibblpxqyxvnxrvk")) + .withManagedResourceGroupConfiguration( + new ManagedResourceGroupConfiguration() + .withName("flfqtliobufzhuxkhfhj") + .withLocation("ecafvspgcuuampnlsrihbgtujgouq")) + .withProductName("dbdypish") + .withProductVersion("yybjrksardkllouublivbduzjlwqjk") + .withProductConnector("yrazxjkyicvx") + .withProductConnectorDataset("dmlyvcshemlfhmyvofqofw") + .withDataLakeHouses(Arrays.asList("advwikycmuguhupha")) + .withDataConnectorConfiguration( + new DataConnectorConfiguration() + .withDataRetentionProperties( + new DataRetentionProperties() + .withDataExplorer(new RetentionProperties().withRetentionDays(7)) + .withBronzeStorageAccount(new RetentionProperties().withRetentionDays(7)) + .withSilverStorageAccount(new RetentionProperties().withRetentionDays(7)) + .withGoldStorageAccount(new RetentionProperties().withRetentionDays(7))) + .withDataset( + new DatasetConfiguration() + .withDatasetName("ptknewelhh") + .withTimestampKey(OffsetDateTime.parse("2023-01-30T18:13:09.337Z")) + .withColumnsToMask(Arrays.asList("gdjwh"))) + .withCompute(new ComputeConfiguration().withFailureAlertEmail("pummjy").withThroughput(20))) + .create(); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/DataConnector_CreateOrUpdate_MinimumSet_Gen.json + */ + /** + * Sample code: DataConnector_CreateOrUpdate_Min. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void dataConnectorCreateOrUpdateMin( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager + .dataConnectorOperations() + .define("dndnibjbfuuhrkqhlofcjke") + .withRegion("lkdprsvepnusozfvpkqqv") + .withExistingResourceGroup("rgopenapi") + .create(); + } + + @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; + } +} +``` + +### DataConnectorOperation_Delete + +```java +/** Samples for DataConnectorOperation Delete. */ +public final class DataConnectorOperationDeleteSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/DataConnector_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: DataConnector_Delete_Max. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void dataConnectorDeleteMax( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager.dataConnectorOperations().delete("rgopenapi", "tqpdqptkngnlz", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/DataConnector_Delete_MinimumSet_Gen.json + */ + /** + * Sample code: DataConnector_Delete_Min. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void dataConnectorDeleteMin( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager.dataConnectorOperations().delete("rgopenapi", "vqcxivaljzxyuyanosyf", com.azure.core.util.Context.NONE); + } +} +``` + +### DataConnectorOperation_GetByResourceGroup + +```java +/** Samples for DataConnectorOperation GetByResourceGroup. */ +public final class DataConnectorOperationGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/DataConnector_Get_MinimumSet_Gen.json + */ + /** + * Sample code: DataConnector_Get_Min. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void dataConnectorGetMin(com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager + .dataConnectorOperations() + .getByResourceGroupWithResponse("rgopenapi", "czghteymeeuvs", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/DataConnector_Get_MaximumSet_Gen.json + */ + /** + * Sample code: DataConnector_Get_Max. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void dataConnectorGetMax(com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager + .dataConnectorOperations() + .getByResourceGroupWithResponse("rgopenapi", "gdoqhclsirtskithgh", com.azure.core.util.Context.NONE); + } +} +``` + +### DataConnectorOperation_List + +```java +/** Samples for DataConnectorOperation List. */ +public final class DataConnectorOperationListSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/DataConnector_ListBySubscription_MaximumSet_Gen.json + */ + /** + * Sample code: DataConnector_ListBySubscription_Max. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void dataConnectorListBySubscriptionMax( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager.dataConnectorOperations().list(com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/DataConnector_ListBySubscription_MinimumSet_Gen.json + */ + /** + * Sample code: DataConnector_ListBySubscription_Min. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void dataConnectorListBySubscriptionMin( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager.dataConnectorOperations().list(com.azure.core.util.Context.NONE); + } +} +``` + +### DataConnectorOperation_ListByResourceGroup + +```java +/** Samples for DataConnectorOperation ListByResourceGroup. */ +public final class DataConnectorOperationListByResourceGroupSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/DataConnector_ListByResourceGroup_MaximumSet_Gen.json + */ + /** + * Sample code: DataConnector_ListByResourceGroup_Max. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void dataConnectorListByResourceGroupMax( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager.dataConnectorOperations().listByResourceGroup("rgopenapi", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/DataConnector_ListByResourceGroup_MinimumSet_Gen.json + */ + /** + * Sample code: DataConnector_ListByResourceGroup_Min. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void dataConnectorListByResourceGroupMin( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager.dataConnectorOperations().listByResourceGroup("rgopenapi", com.azure.core.util.Context.NONE); + } +} +``` + +### DataConnectorOperation_Update + +```java +import com.azure.resourcemanager.networkanalytics.models.DataConnectors; +import com.azure.resourcemanager.networkanalytics.models.ManagedResourceGroupConfiguration; +import java.util.HashMap; +import java.util.Map; + +/** Samples for DataConnectorOperation Update. */ +public final class DataConnectorOperationUpdateSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/DataConnector_Update_MinimumSet_Gen.json + */ + /** + * Sample code: DataConnector_Update_Min. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void dataConnectorUpdateMin( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + DataConnectors resource = + manager + .dataConnectorOperations() + .getByResourceGroupWithResponse( + "rgopenapi", "lhgdolhycyfphurejkwickn", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().apply(); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/DataConnector_Update_MaximumSet_Gen.json + */ + /** + * Sample code: DataConnector_Update_Max. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void dataConnectorUpdateMax( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + DataConnectors resource = + manager + .dataConnectorOperations() + .getByResourceGroupWithResponse("rgopenapi", "hs", com.azure.core.util.Context.NONE) + .getValue(); + resource + .update() + .withTags(mapOf("key8943", "u")) + .withManagedResourceGroupConfiguration( + new ManagedResourceGroupConfiguration() + .withName("flfqtliobufzhuxkhfhj") + .withLocation("ecafvspgcuuampnlsrihbgtujgouq")) + .apply(); + } + + @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; + } +} +``` + +### MetricsIngestionEndpoints_CreateOrUpdate + +```java +import com.azure.resourcemanager.networkanalytics.fluent.models.MetricsIngestionEndpointResourcesInner; +import com.azure.resourcemanager.networkanalytics.models.ManagedResourceGroupConfiguration; + +/** Samples for MetricsIngestionEndpoints CreateOrUpdate. */ +public final class MetricsIngestionEndpointsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/MetricsIngestionEndpoints_CreateOrUpdate_MinimumSet_Gen.json + */ + /** + * Sample code: MetricsIngestionEndpoints_CreateOrUpdate_Min. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void metricsIngestionEndpointsCreateOrUpdateMin( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager + .metricsIngestionEndpoints() + .createOrUpdate( + "ozrlousqyukjkqtvgmrk", new MetricsIngestionEndpointResourcesInner(), com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/MetricsIngestionEndpoints_CreateOrUpdate_MaximumSet_Gen.json + */ + /** + * Sample code: MetricsIngestionEndpoints_CreateOrUpdate_Max. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void metricsIngestionEndpointsCreateOrUpdateMax( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager + .metricsIngestionEndpoints() + .createOrUpdate( + "ozrlousqyukjkqtvgmrk", + new MetricsIngestionEndpointResourcesInner() + .withIngressRegionName("vehndmisl") + .withManagedResourceGroupConfiguration( + new ManagedResourceGroupConfiguration() + .withName("flfqtliobufzhuxkhfhj") + .withLocation("ecafvspgcuuampnlsrihbgtujgouq")), + com.azure.core.util.Context.NONE); + } +} +``` + +### MetricsIngestionEndpoints_Delete + +```java +/** Samples for MetricsIngestionEndpoints Delete. */ +public final class MetricsIngestionEndpointsDeleteSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/MetricsIngestionEndpoints_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: MetricsIngestionEndpoints_Delete_Max. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void metricsIngestionEndpointsDeleteMax( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager.metricsIngestionEndpoints().delete("ozrlousqyukjkqtvgmrk", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/MetricsIngestionEndpoints_Delete_MinimumSet_Gen.json + */ + /** + * Sample code: MetricsIngestionEndpoints_Delete_Min. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void metricsIngestionEndpointsDeleteMin( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager.metricsIngestionEndpoints().delete("ozrlousqyukjkqtvgmrk", com.azure.core.util.Context.NONE); + } +} +``` + +### MetricsIngestionEndpoints_Get + +```java +/** Samples for MetricsIngestionEndpoints Get. */ +public final class MetricsIngestionEndpointsGetSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/MetricsIngestionEndpoints_Get_MaximumSet_Gen.json + */ + /** + * Sample code: MetricsIngestionEndpoints_Get_Max. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void metricsIngestionEndpointsGetMax( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager.metricsIngestionEndpoints().getWithResponse("ozrlousqyukjkqtvgmrk", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/MetricsIngestionEndpoints_Get_MinimumSet_Gen.json + */ + /** + * Sample code: MetricsIngestionEndpoints_Get_Min. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void metricsIngestionEndpointsGetMin( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager.metricsIngestionEndpoints().getWithResponse("ozrlousqyukjkqtvgmrk", com.azure.core.util.Context.NONE); + } +} +``` + +### MetricsIngestionEndpoints_List + +```java +/** Samples for MetricsIngestionEndpoints List. */ +public final class MetricsIngestionEndpointsListSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/MetricsIngestionEndpoints_List_MaximumSet_Gen.json + */ + /** + * Sample code: MetricsIngestionEndpoints_List_Max. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void metricsIngestionEndpointsListMax( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager.metricsIngestionEndpoints().list("ozrlousqyukjkqtvgmrk", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/MetricsIngestionEndpoints_List_MinimumSet_Gen.json + */ + /** + * Sample code: MetricsIngestionEndpoints_List_Min. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void metricsIngestionEndpointsListMin( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager.metricsIngestionEndpoints().list("ozrlousqyukjkqtvgmrk", com.azure.core.util.Context.NONE); + } +} +``` + +### MetricsIngestionEndpoints_Update + +```java +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerEncoding; +import java.io.IOException; + +/** Samples for MetricsIngestionEndpoints Update. */ +public final class MetricsIngestionEndpointsUpdateSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/MetricsIngestionEndpoints_Update_MaximumSet_Gen.json + */ + /** + * Sample code: MetricsIngestionEndpoints_Update_Max. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void metricsIngestionEndpointsUpdateMax( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) throws IOException { + manager + .metricsIngestionEndpoints() + .updateWithResponse( + "ozrlousqyukjkqtvgmrk", + SerializerFactory + .createDefaultManagementSerializerAdapter() + .deserialize("{}", Object.class, SerializerEncoding.JSON), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/MetricsIngestionEndpoints_Update_MinimumSet_Gen.json + */ + /** + * Sample code: MetricsIngestionEndpoints_Update_Min. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void metricsIngestionEndpointsUpdateMin( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) throws IOException { + manager + .metricsIngestionEndpoints() + .updateWithResponse( + "ozrlousqyukjkqtvgmrk", + SerializerFactory + .createDefaultManagementSerializerAdapter() + .deserialize("{}", Object.class, SerializerEncoding.JSON), + com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkAnalyticsProductOperation_CreateOrUpdate + +```java +import com.azure.resourcemanager.networkanalytics.fluent.models.NetworkAnalyticsProductsInner; +import com.azure.resourcemanager.networkanalytics.models.NetworkAnalyticsProductConnectorInformation; +import com.azure.resourcemanager.networkanalytics.models.NetworkAnalyticsProductInformation; +import java.util.Arrays; + +/** Samples for NetworkAnalyticsProductOperation CreateOrUpdate. */ +public final class NetworkAnalyticsProductOperationCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/NetworkAnalyticsProduct_CreateOrUpdate_MaximumSet_Gen.json + */ + /** + * Sample code: NetworkAnalyticsProduct_CreateOrUpdate_Max. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void networkAnalyticsProductCreateOrUpdateMax( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager + .networkAnalyticsProductOperations() + .createOrUpdate( + "rgopenapi", + new NetworkAnalyticsProductsInner() + .withNetworkAnalyticsProductInformation( + new NetworkAnalyticsProductInformation() + .withProductName("hknfsjhzhl") + .withProductVersions(Arrays.asList("wxpytpcolbhrictzmjognhmpcrbb")) + .withProductConnectors( + Arrays + .asList( + new NetworkAnalyticsProductConnectorInformation() + .withConnectorName("ksaamsmnroclmiaebmhnypfeglpnpuqe") + .withDatasets(Arrays.asList("ga"))))), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/NetworkAnalyticsProduct_CreateOrUpdate_MinimumSet_Gen.json + */ + /** + * Sample code: NetworkAnalyticsProduct_CreateOrUpdate_Min. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void networkAnalyticsProductCreateOrUpdateMin( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager + .networkAnalyticsProductOperations() + .createOrUpdate("rgopenapi", new NetworkAnalyticsProductsInner(), com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkAnalyticsProductOperation_Delete + +```java +/** Samples for NetworkAnalyticsProductOperation Delete. */ +public final class NetworkAnalyticsProductOperationDeleteSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/NetworkAnalyticsProduct_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: NetworkAnalyticsProduct_Delete_Max. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void networkAnalyticsProductDeleteMax( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager.networkAnalyticsProductOperations().delete("rgopenapi", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/NetworkAnalyticsProduct_Delete_MinimumSet_Gen.json + */ + /** + * Sample code: NetworkAnalyticsProduct_Delete_Min. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void networkAnalyticsProductDeleteMin( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager.networkAnalyticsProductOperations().delete("rgopenapi", com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkAnalyticsProductOperation_GetByResourceGroup + +```java +/** Samples for NetworkAnalyticsProductOperation GetByResourceGroup. */ +public final class NetworkAnalyticsProductOperationGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/NetworkAnalyticsProduct_Get_MaximumSet_Gen.json + */ + /** + * Sample code: NetworkAnalyticsProduct_Get_Max. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void networkAnalyticsProductGetMax( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager + .networkAnalyticsProductOperations() + .getByResourceGroupWithResponse("rgopenapi", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/NetworkAnalyticsProduct_Get_MinimumSet_Gen.json + */ + /** + * Sample code: NetworkAnalyticsProduct_Get_Min. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void networkAnalyticsProductGetMin( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager + .networkAnalyticsProductOperations() + .getByResourceGroupWithResponse("rgopenapi", com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkAnalyticsProductOperation_List + +```java +/** Samples for NetworkAnalyticsProductOperation List. */ +public final class NetworkAnalyticsProductOperationListSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/NetworkAnalyticsProduct_ListBySubscription_MinimumSet_Gen.json + */ + /** + * Sample code: NetworkAnalyticsProduct_ListBySubscription_Min. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void networkAnalyticsProductListBySubscriptionMin( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager.networkAnalyticsProductOperations().list(com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/NetworkAnalyticsProduct_ListBySubscription_MaximumSet_Gen.json + */ + /** + * Sample code: NetworkAnalyticsProduct_ListBySubscription_Max. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void networkAnalyticsProductListBySubscriptionMax( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager.networkAnalyticsProductOperations().list(com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkAnalyticsProductOperation_ListByResourceGroup + +```java +/** Samples for NetworkAnalyticsProductOperation ListByResourceGroup. */ +public final class NetworkAnalyticsProductOperationListByResourceGroupSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/NetworkAnalyticsProduct_ListByResourceGroup_MinimumSet_Gen.json + */ + /** + * Sample code: NetworkAnalyticsProduct_ListByResourceGroup_Min. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void networkAnalyticsProductListByResourceGroupMin( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager.networkAnalyticsProductOperations().listByResourceGroup("rgopenapi", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/NetworkAnalyticsProduct_ListByResourceGroup_MaximumSet_Gen.json + */ + /** + * Sample code: NetworkAnalyticsProduct_ListByResourceGroup_Max. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void networkAnalyticsProductListByResourceGroupMax( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager.networkAnalyticsProductOperations().listByResourceGroup("rgopenapi", com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkAnalyticsProductOperation_Update + +```java +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerEncoding; +import java.io.IOException; + +/** Samples for NetworkAnalyticsProductOperation Update. */ +public final class NetworkAnalyticsProductOperationUpdateSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/NetworkAnalyticsProduct_Update_MinimumSet_Gen.json + */ + /** + * Sample code: NetworkAnalyticsProduct_Update_Min. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void networkAnalyticsProductUpdateMin( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) throws IOException { + manager + .networkAnalyticsProductOperations() + .updateWithResponse( + "rgopenapi", + SerializerFactory + .createDefaultManagementSerializerAdapter() + .deserialize("{}", Object.class, SerializerEncoding.JSON), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/NetworkAnalyticsProduct_Update_MaximumSet_Gen.json + */ + /** + * Sample code: NetworkAnalyticsProduct_Update_Max. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void networkAnalyticsProductUpdateMax( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) throws IOException { + manager + .networkAnalyticsProductOperations() + .updateWithResponse( + "rgopenapi", + SerializerFactory + .createDefaultManagementSerializerAdapter() + .deserialize("{}", Object.class, SerializerEncoding.JSON), + com.azure.core.util.Context.NONE); + } +} +``` + +### Operations_List + +```java +/** Samples for Operations List. */ +public final class OperationsListSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/Operations_List_MaximumSet_Gen.json + */ + /** + * Sample code: Operations_List_Max. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void operationsListMax(com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager.operations().list(com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/Operations_List_MinimumSet_Gen.json + */ + /** + * Sample code: Operations_List_Min. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void operationsListMin(com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager.operations().list(com.azure.core.util.Context.NONE); + } +} +``` + +### Storage_CreateOrUpdate + +```java +import com.azure.resourcemanager.networkanalytics.models.AzureDataExplorerProperties; +import com.azure.resourcemanager.networkanalytics.models.BlobServices; +import com.azure.resourcemanager.networkanalytics.models.BronzeStorageAccountProperties; +import com.azure.resourcemanager.networkanalytics.models.Bypass; +import com.azure.resourcemanager.networkanalytics.models.CommonStorageAccountProperties; +import com.azure.resourcemanager.networkanalytics.models.DefaultAction; +import com.azure.resourcemanager.networkanalytics.models.IpRules; +import com.azure.resourcemanager.networkanalytics.models.KustoClusterPrincipalAssignments; +import com.azure.resourcemanager.networkanalytics.models.KustoRole; +import com.azure.resourcemanager.networkanalytics.models.ManagedResourceGroupConfiguration; +import com.azure.resourcemanager.networkanalytics.models.NetworkAcls; +import com.azure.resourcemanager.networkanalytics.models.PrincipalType; +import com.azure.resourcemanager.networkanalytics.models.PrivateEndPoint; +import com.azure.resourcemanager.networkanalytics.models.ResourceAccessRules; +import com.azure.resourcemanager.networkanalytics.models.RestorePolicy; +import com.azure.resourcemanager.networkanalytics.models.VirtualNetworkConfiguration; +import com.azure.resourcemanager.networkanalytics.models.VirtualNetworkRule; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Storage CreateOrUpdate. */ +public final class StorageCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/Storage_CreateOrUpdate_MaximumSet_Gen.json + */ + /** + * Sample code: Storage_CreateOrUpdate_Max. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void storageCreateOrUpdateMax( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager + .storages() + .define("jnnuodll") + .withRegion("sybchhoambcfnzflnztjwgfu") + .withExistingResourceGroup("rgopenapi") + .withTags(mapOf("key2848", "kfzdswbuaip")) + .withManagedResourceGroupConfiguration( + new ManagedResourceGroupConfiguration() + .withName("flfqtliobufzhuxkhfhj") + .withLocation("ecafvspgcuuampnlsrihbgtujgouq")) + .withUniqueIdentifierName("suoxyedxsghz") + .withCommonStorageAccountProperties( + new CommonStorageAccountProperties() + .withPublicNetworkAccess("azfwzowpeno") + .withNetworkacls( + new NetworkAcls() + .withBypass(Bypass.NONE) + .withVirtualNetworkRule( + Arrays + .asList( + new VirtualNetworkRule() + .withId("xofnybcganrcfiimqreegaqouxfnlm") + .withAction("zwzn") + .withState("tnzqojumw"))) + .withIpRules( + Arrays + .asList( + new IpRules().withValue("kzxsxagfrpdvkjzusofdxko").withAction("wgqxykwovhff"))) + .withResourceAccessRules( + Arrays + .asList( + new ResourceAccessRules() + .withTenantId("ho") + .withResourceId("svitkayadlrrdxrjbzcemnaccoamqq"))) + .withDefaultActionType(DefaultAction.ALLOW)) + .withBlobServices( + new BlobServices().withRestorePolicy(new RestorePolicy().withEnabled(true).withDays(30))) + .withPrivateEndPoint( + new PrivateEndPoint() + .withSubnetId("qggeyzgrqodijtcutjelsizyxhd") + .withPrivateLinkServiceId("zqiirxmwqhakbabwneipctzxk") + .withGroupIds(Arrays.asList("itvtdkkpifhfiqhpjb")) + .withCustomDnsConfigs("cylmvnl"))) + .withBronzeStorageAccountProperties(new BronzeStorageAccountProperties().withIsSftpEnabled(true)) + .withAzureDataExplorerProperties( + new AzureDataExplorerProperties() + .withVirtualNetworkConfiguration( + new VirtualNetworkConfiguration() + .withSubnetId("wybwuekeixatewpihdfww") + .withEnginePublicIpId("qesxpfxpgzusjhgrjhtbrziv") + .withDataManagementPublicIpId("yaunpigmlnsbzjyal")) + .withKustoClusterPrincipalAssignments( + new KustoClusterPrincipalAssignments() + .withSystemIdentityName("dpvrzrysnb") + .withRole(KustoRole.ALL_DATABASES_ADMIN) + .withPrincipalType(PrincipalType.APP))) + .create(); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/Storage_CreateOrUpdate_MinimumSet_Gen.json + */ + /** + * Sample code: Storage_CreateOrUpdate_Min. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void storageCreateOrUpdateMin( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager + .storages() + .define("wssafffmuepzooqsiormn") + .withRegion("sybchhoambcfnzflnztjwgfu") + .withExistingResourceGroup("rgopenapi") + .create(); + } + + @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; + } +} +``` + +### Storage_Delete + +```java +/** Samples for Storage Delete. */ +public final class StorageDeleteSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/Storage_Delete_MinimumSet_Gen.json + */ + /** + * Sample code: Storage_Delete_Min. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void storageDeleteMin(com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager.storages().delete("rgopenapi", "hokmuhdfqghei", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/Storage_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: Storage_Delete_Max. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void storageDeleteMax(com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager.storages().delete("rgopenapi", "wlngxkftudslsecksjrxnfrtl", com.azure.core.util.Context.NONE); + } +} +``` + +### Storage_GetByResourceGroup + +```java +/** Samples for Storage GetByResourceGroup. */ +public final class StorageGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/Storage_Get_MinimumSet_Gen.json + */ + /** + * Sample code: Storage_Get_Min. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void storageGetMin(com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager.storages().getByResourceGroupWithResponse("rgopenapi", "trwbfuc", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/Storage_Get_MaximumSet_Gen.json + */ + /** + * Sample code: Storage_Get_Max. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void storageGetMax(com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager + .storages() + .getByResourceGroupWithResponse( + "rgopenapi", "afalahfsayijbtrzpjzrvukqmunyw", com.azure.core.util.Context.NONE); + } +} +``` + +### Storage_List + +```java +/** Samples for Storage List. */ +public final class StorageListSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/Storage_ListBySubscription_MinimumSet_Gen.json + */ + /** + * Sample code: Storage_ListBySubscription_Min. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void storageListBySubscriptionMin( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager.storages().list(com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/Storage_ListBySubscription_MaximumSet_Gen.json + */ + /** + * Sample code: Storage_ListBySubscription_Max. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void storageListBySubscriptionMax( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager.storages().list(com.azure.core.util.Context.NONE); + } +} +``` + +### Storage_ListByResourceGroup + +```java +/** Samples for Storage ListByResourceGroup. */ +public final class StorageListByResourceGroupSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/Storage_ListByResourceGroup_MaximumSet_Gen.json + */ + /** + * Sample code: Storage_ListByResourceGroup_Max. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void storageListByResourceGroupMax( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager.storages().listByResourceGroup("rgopenapi", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/Storage_ListByResourceGroup_MinimumSet_Gen.json + */ + /** + * Sample code: Storage_ListByResourceGroup_Min. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void storageListByResourceGroupMin( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager.storages().listByResourceGroup("rgopenapi", com.azure.core.util.Context.NONE); + } +} +``` + +### Storage_Update + +```java +import com.azure.resourcemanager.networkanalytics.models.DataLakeHouseResources; +import com.azure.resourcemanager.networkanalytics.models.ManagedResourceGroupConfiguration; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Storage Update. */ +public final class StorageUpdateSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/Storage_Update_MinimumSet_Gen.json + */ + /** + * Sample code: Storage_Update_Min. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void storageUpdateMin(com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + DataLakeHouseResources resource = + manager + .storages() + .getByResourceGroupWithResponse("rgopenapi", "xpyfslhorwbf", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().apply(); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/Storage_Update_MaximumSet_Gen.json + */ + /** + * Sample code: Storage_Update_Max. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void storageUpdateMax(com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + DataLakeHouseResources resource = + manager + .storages() + .getByResourceGroupWithResponse("rgopenapi", "wkuqjmixiscljktf", com.azure.core.util.Context.NONE) + .getValue(); + resource + .update() + .withTags(mapOf("key9798", "pmpellthjljwbmpulnmobfodhjuq")) + .withManagedResourceGroupConfiguration( + new ManagedResourceGroupConfiguration() + .withName("flfqtliobufzhuxkhfhj") + .withLocation("ecafvspgcuuampnlsrihbgtujgouq")) + .apply(); + } + + @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/networkanalytics/azure-resourcemanager-networkanalytics/pom.xml b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/pom.xml new file mode 100644 index 000000000000..9618fbdef2c0 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/pom.xml @@ -0,0 +1,55 @@ + + 4.0.0 + + com.azure + azure-client-sdk-parent + 1.7.0 + ../../parents/azure-client-sdk-parent + + + com.azure.resourcemanager + azure-resourcemanager-networkanalytics + 1.0.0-beta.1 + jar + + Microsoft Azure SDK for networkanalytics Management + This package contains Microsoft Azure SDK for networkanalytics Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2023-04-30. + https://github.com/Azure/azure-sdk-for-java + + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + + + + https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + + microsoft + Microsoft + + + + UTF-8 + true + + + + com.azure + azure-core + 1.36.0 + + + com.azure + azure-core-management + 1.10.1 + + + diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/NetworkanalyticsManager.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/NetworkanalyticsManager.java new file mode 100644 index 000000000000..4ac26a38358f --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/NetworkanalyticsManager.java @@ -0,0 +1,349 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics; + +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; +import com.azure.core.http.policy.AddDatePolicy; +import com.azure.core.http.policy.AddHeadersFromContextPolicy; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryOptions; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.util.Configuration; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.networkanalytics.fluent.MicrosoftNetworkAnalytics; +import com.azure.resourcemanager.networkanalytics.implementation.DataConnectorOperationsImpl; +import com.azure.resourcemanager.networkanalytics.implementation.MetricsIngestionEndpointsImpl; +import com.azure.resourcemanager.networkanalytics.implementation.MicrosoftNetworkAnalyticsBuilder; +import com.azure.resourcemanager.networkanalytics.implementation.NetworkAnalyticsProductOperationsImpl; +import com.azure.resourcemanager.networkanalytics.implementation.OperationsImpl; +import com.azure.resourcemanager.networkanalytics.implementation.StoragesImpl; +import com.azure.resourcemanager.networkanalytics.models.DataConnectorOperations; +import com.azure.resourcemanager.networkanalytics.models.MetricsIngestionEndpoints; +import com.azure.resourcemanager.networkanalytics.models.NetworkAnalyticsProductOperations; +import com.azure.resourcemanager.networkanalytics.models.Operations; +import com.azure.resourcemanager.networkanalytics.models.Storages; +import java.time.Duration; +import java.time.temporal.ChronoUnit; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; + +/** Entry point to NetworkanalyticsManager. */ +public final class NetworkanalyticsManager { + private MetricsIngestionEndpoints metricsIngestionEndpoints; + + private Operations operations; + + private DataConnectorOperations dataConnectorOperations; + + private Storages storages; + + private NetworkAnalyticsProductOperations networkAnalyticsProductOperations; + + private final MicrosoftNetworkAnalytics clientObject; + + private NetworkanalyticsManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { + Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + this.clientObject = + new MicrosoftNetworkAnalyticsBuilder() + .pipeline(httpPipeline) + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) + .subscriptionId(profile.getSubscriptionId()) + .defaultPollInterval(defaultPollInterval) + .buildClient(); + } + + /** + * Creates an instance of networkanalytics service API entry point. + * + * @param credential the credential to use. + * @param profile the Azure profile for client. + * @return the networkanalytics service API instance. + */ + public static NetworkanalyticsManager authenticate(TokenCredential credential, AzureProfile profile) { + Objects.requireNonNull(credential, "'credential' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + return configure().authenticate(credential, profile); + } + + /** + * Creates an instance of networkanalytics service API entry point. + * + * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. + * @param profile the Azure profile for client. + * @return the networkanalytics service API instance. + */ + public static NetworkanalyticsManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { + Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + return new NetworkanalyticsManager(httpPipeline, profile, null); + } + + /** + * Gets a Configurable instance that can be used to create NetworkanalyticsManager with optional configuration. + * + * @return the Configurable instance allowing configurations. + */ + public static Configurable configure() { + return new NetworkanalyticsManager.Configurable(); + } + + /** The Configurable allowing configurations to be set. */ + public static final class Configurable { + private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); + + private HttpClient httpClient; + private HttpLogOptions httpLogOptions; + private final List policies = new ArrayList<>(); + private final List scopes = new ArrayList<>(); + private RetryPolicy retryPolicy; + private RetryOptions retryOptions; + private Duration defaultPollInterval; + + private Configurable() { + } + + /** + * Sets the http client. + * + * @param httpClient the HTTP client. + * @return the configurable object itself. + */ + public Configurable withHttpClient(HttpClient httpClient) { + this.httpClient = Objects.requireNonNull(httpClient, "'httpClient' cannot be null."); + return this; + } + + /** + * Sets the logging options to the HTTP pipeline. + * + * @param httpLogOptions the HTTP log options. + * @return the configurable object itself. + */ + public Configurable withLogOptions(HttpLogOptions httpLogOptions) { + this.httpLogOptions = Objects.requireNonNull(httpLogOptions, "'httpLogOptions' cannot be null."); + return this; + } + + /** + * Adds the pipeline policy to the HTTP pipeline. + * + * @param policy the HTTP pipeline policy. + * @return the configurable object itself. + */ + public Configurable withPolicy(HttpPipelinePolicy policy) { + this.policies.add(Objects.requireNonNull(policy, "'policy' cannot be null.")); + return this; + } + + /** + * Adds the scope to permission sets. + * + * @param scope the scope. + * @return the configurable object itself. + */ + public Configurable withScope(String scope) { + this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null.")); + return this; + } + + /** + * Sets the retry policy to the HTTP pipeline. + * + * @param retryPolicy the HTTP pipeline retry policy. + * @return the configurable object itself. + */ + public Configurable withRetryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = Objects.requireNonNull(retryPolicy, "'retryPolicy' cannot be null."); + return this; + } + + /** + * Sets the retry options for the HTTP pipeline retry policy. + * + *

This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. + * + * @param retryOptions the retry options for the HTTP pipeline retry policy. + * @return the configurable object itself. + */ + public Configurable withRetryOptions(RetryOptions retryOptions) { + this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null."); + return this; + } + + /** + * Sets the default poll interval, used when service does not provide "Retry-After" header. + * + * @param defaultPollInterval the default poll interval. + * @return the configurable object itself. + */ + public Configurable withDefaultPollInterval(Duration defaultPollInterval) { + this.defaultPollInterval = + Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); + if (this.defaultPollInterval.isNegative()) { + throw LOGGER + .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); + } + return this; + } + + /** + * Creates an instance of networkanalytics service API entry point. + * + * @param credential the credential to use. + * @param profile the Azure profile for client. + * @return the networkanalytics service API instance. + */ + public NetworkanalyticsManager authenticate(TokenCredential credential, AzureProfile profile) { + Objects.requireNonNull(credential, "'credential' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + + StringBuilder userAgentBuilder = new StringBuilder(); + userAgentBuilder + .append("azsdk-java") + .append("-") + .append("com.azure.resourcemanager.networkanalytics") + .append("/") + .append("1.0.0-beta.1"); + if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { + userAgentBuilder + .append(" (") + .append(Configuration.getGlobalConfiguration().get("java.version")) + .append("; ") + .append(Configuration.getGlobalConfiguration().get("os.name")) + .append("; ") + .append(Configuration.getGlobalConfiguration().get("os.version")) + .append("; auto-generated)"); + } else { + userAgentBuilder.append(" (auto-generated)"); + } + + if (scopes.isEmpty()) { + scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default"); + } + if (retryPolicy == null) { + if (retryOptions != null) { + retryPolicy = new RetryPolicy(retryOptions); + } else { + retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); + } + } + List policies = new ArrayList<>(); + policies.add(new UserAgentPolicy(userAgentBuilder.toString())); + policies.add(new AddHeadersFromContextPolicy()); + policies.add(new RequestIdPolicy()); + policies + .addAll( + this + .policies + .stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .collect(Collectors.toList())); + HttpPolicyProviders.addBeforeRetryPolicies(policies); + policies.add(retryPolicy); + policies.add(new AddDatePolicy()); + policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); + policies + .addAll( + this + .policies + .stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .collect(Collectors.toList())); + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(httpLogOptions)); + HttpPipeline httpPipeline = + new HttpPipelineBuilder() + .httpClient(httpClient) + .policies(policies.toArray(new HttpPipelinePolicy[0])) + .build(); + return new NetworkanalyticsManager(httpPipeline, profile, defaultPollInterval); + } + } + + /** + * Gets the resource collection API of MetricsIngestionEndpoints. + * + * @return Resource collection API of MetricsIngestionEndpoints. + */ + public MetricsIngestionEndpoints metricsIngestionEndpoints() { + if (this.metricsIngestionEndpoints == null) { + this.metricsIngestionEndpoints = + new MetricsIngestionEndpointsImpl(clientObject.getMetricsIngestionEndpoints(), this); + } + return metricsIngestionEndpoints; + } + + /** + * Gets the resource collection API of Operations. + * + * @return Resource collection API of Operations. + */ + public Operations operations() { + if (this.operations == null) { + this.operations = new OperationsImpl(clientObject.getOperations(), this); + } + return operations; + } + + /** + * Gets the resource collection API of DataConnectorOperations. It manages DataConnectors. + * + * @return Resource collection API of DataConnectorOperations. + */ + public DataConnectorOperations dataConnectorOperations() { + if (this.dataConnectorOperations == null) { + this.dataConnectorOperations = + new DataConnectorOperationsImpl(clientObject.getDataConnectorOperations(), this); + } + return dataConnectorOperations; + } + + /** + * Gets the resource collection API of Storages. It manages DataLakeHouseResources. + * + * @return Resource collection API of Storages. + */ + public Storages storages() { + if (this.storages == null) { + this.storages = new StoragesImpl(clientObject.getStorages(), this); + } + return storages; + } + + /** + * Gets the resource collection API of NetworkAnalyticsProductOperations. + * + * @return Resource collection API of NetworkAnalyticsProductOperations. + */ + public NetworkAnalyticsProductOperations networkAnalyticsProductOperations() { + if (this.networkAnalyticsProductOperations == null) { + this.networkAnalyticsProductOperations = + new NetworkAnalyticsProductOperationsImpl(clientObject.getNetworkAnalyticsProductOperations(), this); + } + return networkAnalyticsProductOperations; + } + + /** + * @return Wrapped service client MicrosoftNetworkAnalytics providing direct access to the underlying auto-generated + * API implementation, based on Azure REST API. + */ + public MicrosoftNetworkAnalytics serviceClient() { + return this.clientObject; + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/DataConnectorOperationsClient.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/DataConnectorOperationsClient.java new file mode 100644 index 000000000000..8c9386854301 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/DataConnectorOperationsClient.java @@ -0,0 +1,237 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.networkanalytics.fluent.models.DataConnectorsInner; +import com.azure.resourcemanager.networkanalytics.models.DataConnectorsUpdate; + +/** An instance of this class provides access to all the operations defined in DataConnectorOperationsClient. */ +public interface DataConnectorOperationsClient { + /** + * List DataConnectors resources by subscription ID. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataConnectors list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * List DataConnectors resources by subscription ID. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataConnectors list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** + * List DataConnectors resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataConnectors list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List DataConnectors resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataConnectors list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Get a DataConnectors. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataConnectorName The data connector name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DataConnectors along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse( + String resourceGroupName, String dataConnectorName, Context context); + + /** + * Get a DataConnectors. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataConnectorName The data connector name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DataConnectors. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DataConnectorsInner getByResourceGroup(String resourceGroupName, String dataConnectorName); + + /** + * Create a DataConnectors. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataConnectorName The data connector name. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the data connector resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, DataConnectorsInner> beginCreateOrUpdate( + String resourceGroupName, String dataConnectorName, DataConnectorsInner resource); + + /** + * Create a DataConnectors. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataConnectorName The data connector name. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the data connector resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, DataConnectorsInner> beginCreateOrUpdate( + String resourceGroupName, String dataConnectorName, DataConnectorsInner resource, Context context); + + /** + * Create a DataConnectors. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataConnectorName The data connector name. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data connector resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DataConnectorsInner createOrUpdate( + String resourceGroupName, String dataConnectorName, DataConnectorsInner resource); + + /** + * Create a DataConnectors. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataConnectorName The data connector name. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data connector resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DataConnectorsInner createOrUpdate( + String resourceGroupName, String dataConnectorName, DataConnectorsInner resource, Context context); + + /** + * Update a DataConnectors. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataConnectorName The data connector name. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data connector resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse( + String resourceGroupName, String dataConnectorName, DataConnectorsUpdate properties, Context context); + + /** + * Update a DataConnectors. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataConnectorName The data connector name. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data connector resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DataConnectorsInner update(String resourceGroupName, String dataConnectorName, DataConnectorsUpdate properties); + + /** + * Delete a DataConnectors. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataConnectorName The data connector name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String dataConnectorName); + + /** + * Delete a DataConnectors. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataConnectorName The data connector name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String dataConnectorName, Context context); + + /** + * Delete a DataConnectors. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataConnectorName The data connector name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String dataConnectorName); + + /** + * Delete a DataConnectors. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataConnectorName The data connector name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String dataConnectorName, Context context); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/MetricsIngestionEndpointsClient.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/MetricsIngestionEndpointsClient.java new file mode 100644 index 000000000000..a2692f328797 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/MetricsIngestionEndpointsClient.java @@ -0,0 +1,203 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.networkanalytics.fluent.models.MetricsIngestionEndpointResourcesInner; + +/** An instance of this class provides access to all the operations defined in MetricsIngestionEndpointsClient. */ +public interface MetricsIngestionEndpointsClient { + /** + * List MetricsIngestionEndpointResources resources by parent. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a MetricsIngestionEndpointResources list operation as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceUri); + + /** + * List MetricsIngestionEndpointResources resources by parent. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a MetricsIngestionEndpointResources list operation as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceUri, Context context); + + /** + * Get a MetricsIngestionEndpointResources. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a MetricsIngestionEndpointResources along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceUri, Context context); + + /** + * Get a MetricsIngestionEndpointResources. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a MetricsIngestionEndpointResources. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MetricsIngestionEndpointResourcesInner get(String resourceUri); + + /** + * Create a MetricsIngestionEndpointResources. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of an ingestion endpoint for metrics relating to the parent resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, MetricsIngestionEndpointResourcesInner> + beginCreateOrUpdate(String resourceUri, MetricsIngestionEndpointResourcesInner resource); + + /** + * Create a MetricsIngestionEndpointResources. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of an ingestion endpoint for metrics relating to the parent resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, MetricsIngestionEndpointResourcesInner> + beginCreateOrUpdate(String resourceUri, MetricsIngestionEndpointResourcesInner resource, Context context); + + /** + * Create a MetricsIngestionEndpointResources. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an ingestion endpoint for metrics relating to the parent resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MetricsIngestionEndpointResourcesInner createOrUpdate( + String resourceUri, MetricsIngestionEndpointResourcesInner resource); + + /** + * Create a MetricsIngestionEndpointResources. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an ingestion endpoint for metrics relating to the parent resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MetricsIngestionEndpointResourcesInner createOrUpdate( + String resourceUri, MetricsIngestionEndpointResourcesInner resource, Context context); + + /** + * Update a MetricsIngestionEndpointResources. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an ingestion endpoint for metrics relating to the parent resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse( + String resourceUri, Object properties, Context context); + + /** + * Update a MetricsIngestionEndpointResources. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an ingestion endpoint for metrics relating to the parent resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MetricsIngestionEndpointResourcesInner update(String resourceUri, Object properties); + + /** + * Delete a MetricsIngestionEndpointResources. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceUri); + + /** + * Delete a MetricsIngestionEndpointResources. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceUri, Context context); + + /** + * Delete a MetricsIngestionEndpointResources. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceUri); + + /** + * Delete a MetricsIngestionEndpointResources. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceUri, Context context); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/MicrosoftNetworkAnalytics.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/MicrosoftNetworkAnalytics.java new file mode 100644 index 000000000000..9a39629ad278 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/MicrosoftNetworkAnalytics.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.fluent; + +import com.azure.core.http.HttpPipeline; +import java.time.Duration; + +/** The interface for MicrosoftNetworkAnalytics class. */ +public interface MicrosoftNetworkAnalytics { + /** + * Gets The ID of the target subscription. + * + * @return the subscriptionId value. + */ + String getSubscriptionId(); + + /** + * Gets server parameter. + * + * @return the endpoint value. + */ + String getEndpoint(); + + /** + * Gets Api Version. + * + * @return the apiVersion value. + */ + String getApiVersion(); + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + HttpPipeline getHttpPipeline(); + + /** + * Gets The default poll interval for long-running operation. + * + * @return the defaultPollInterval value. + */ + Duration getDefaultPollInterval(); + + /** + * Gets the MetricsIngestionEndpointsClient object to access its operations. + * + * @return the MetricsIngestionEndpointsClient object. + */ + MetricsIngestionEndpointsClient getMetricsIngestionEndpoints(); + + /** + * Gets the OperationsClient object to access its operations. + * + * @return the OperationsClient object. + */ + OperationsClient getOperations(); + + /** + * Gets the DataConnectorOperationsClient object to access its operations. + * + * @return the DataConnectorOperationsClient object. + */ + DataConnectorOperationsClient getDataConnectorOperations(); + + /** + * Gets the StoragesClient object to access its operations. + * + * @return the StoragesClient object. + */ + StoragesClient getStorages(); + + /** + * Gets the NetworkAnalyticsProductOperationsClient object to access its operations. + * + * @return the NetworkAnalyticsProductOperationsClient object. + */ + NetworkAnalyticsProductOperationsClient getNetworkAnalyticsProductOperations(); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/NetworkAnalyticsProductOperationsClient.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/NetworkAnalyticsProductOperationsClient.java new file mode 100644 index 000000000000..59bf4aa88286 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/NetworkAnalyticsProductOperationsClient.java @@ -0,0 +1,228 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.networkanalytics.fluent.models.NetworkAnalyticsProductsInner; + +/** + * An instance of this class provides access to all the operations defined in NetworkAnalyticsProductOperationsClient. + */ +public interface NetworkAnalyticsProductOperationsClient { + /** + * List NetworkAnalyticsProducts resources by subscription ID. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkAnalyticsProducts list operation as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * List NetworkAnalyticsProducts resources by subscription ID. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkAnalyticsProducts list operation as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** + * List NetworkAnalyticsProducts resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkAnalyticsProducts list operation as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List NetworkAnalyticsProducts resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkAnalyticsProducts list operation as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Get a NetworkAnalyticsProducts. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a NetworkAnalyticsProducts along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, Context context); + + /** + * Get a NetworkAnalyticsProducts. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a NetworkAnalyticsProducts. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkAnalyticsProductsInner getByResourceGroup(String resourceGroupName); + + /** + * Create a NetworkAnalyticsProducts. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the network analytics product resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkAnalyticsProductsInner> beginCreateOrUpdate( + String resourceGroupName, NetworkAnalyticsProductsInner resource); + + /** + * Create a NetworkAnalyticsProducts. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the network analytics product resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkAnalyticsProductsInner> beginCreateOrUpdate( + String resourceGroupName, NetworkAnalyticsProductsInner resource, Context context); + + /** + * Create a NetworkAnalyticsProducts. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the network analytics product resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkAnalyticsProductsInner createOrUpdate(String resourceGroupName, NetworkAnalyticsProductsInner resource); + + /** + * Create a NetworkAnalyticsProducts. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the network analytics product resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkAnalyticsProductsInner createOrUpdate( + String resourceGroupName, NetworkAnalyticsProductsInner resource, Context context); + + /** + * Update a NetworkAnalyticsProducts. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the network analytics product resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse( + String resourceGroupName, Object properties, Context context); + + /** + * Update a NetworkAnalyticsProducts. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the network analytics product resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkAnalyticsProductsInner update(String resourceGroupName, Object properties); + + /** + * Delete a NetworkAnalyticsProducts. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName); + + /** + * Delete a NetworkAnalyticsProducts. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, Context context); + + /** + * Delete a NetworkAnalyticsProducts. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName); + + /** + * Delete a NetworkAnalyticsProducts. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, Context context); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/OperationsClient.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/OperationsClient.java new file mode 100644 index 000000000000..0b8283099e82 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/OperationsClient.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.resourcemanager.networkanalytics.fluent.models.OperationInner; + +/** An instance of this class provides access to all the operations defined in OperationsClient. */ +public interface OperationsClient { + /** + * List the operations for the provider. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * List the operations for the provider. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/StoragesClient.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/StoragesClient.java new file mode 100644 index 000000000000..9774aba481ec --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/StoragesClient.java @@ -0,0 +1,238 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.networkanalytics.fluent.models.DataLakeHouseResourcesInner; +import com.azure.resourcemanager.networkanalytics.models.DataLakeHouseResourcesUpdate; + +/** An instance of this class provides access to all the operations defined in StoragesClient. */ +public interface StoragesClient { + /** + * List DataLakeHouseResources resources by subscription ID. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataLakeHouseResources list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * List DataLakeHouseResources resources by subscription ID. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataLakeHouseResources list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** + * List DataLakeHouseResources resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataLakeHouseResources list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List DataLakeHouseResources resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataLakeHouseResources list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Get a DataLakeHouseResources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageName The data lake house resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DataLakeHouseResources along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse( + String resourceGroupName, String storageName, Context context); + + /** + * Get a DataLakeHouseResources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageName The data lake house resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DataLakeHouseResources. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DataLakeHouseResourcesInner getByResourceGroup(String resourceGroupName, String storageName); + + /** + * Create a DataLakeHouseResources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageName The data lake house resource name. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the data lake house resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, DataLakeHouseResourcesInner> beginCreateOrUpdate( + String resourceGroupName, String storageName, DataLakeHouseResourcesInner resource); + + /** + * Create a DataLakeHouseResources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageName The data lake house resource name. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the data lake house resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, DataLakeHouseResourcesInner> beginCreateOrUpdate( + String resourceGroupName, String storageName, DataLakeHouseResourcesInner resource, Context context); + + /** + * Create a DataLakeHouseResources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageName The data lake house resource name. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data lake house resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DataLakeHouseResourcesInner createOrUpdate( + String resourceGroupName, String storageName, DataLakeHouseResourcesInner resource); + + /** + * Create a DataLakeHouseResources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageName The data lake house resource name. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data lake house resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DataLakeHouseResourcesInner createOrUpdate( + String resourceGroupName, String storageName, DataLakeHouseResourcesInner resource, Context context); + + /** + * Update a DataLakeHouseResources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageName The data lake house resource name. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data lake house resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse( + String resourceGroupName, String storageName, DataLakeHouseResourcesUpdate properties, Context context); + + /** + * Update a DataLakeHouseResources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageName The data lake house resource name. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data lake house resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DataLakeHouseResourcesInner update( + String resourceGroupName, String storageName, DataLakeHouseResourcesUpdate properties); + + /** + * Delete a DataLakeHouseResources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageName The data lake house resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String storageName); + + /** + * Delete a DataLakeHouseResources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageName The data lake house resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String storageName, Context context); + + /** + * Delete a DataLakeHouseResources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageName The data lake house resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String storageName); + + /** + * Delete a DataLakeHouseResources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageName The data lake house resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String storageName, Context context); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/DataConnectorsInner.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/DataConnectorsInner.java new file mode 100644 index 000000000000..6550277756b0 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/DataConnectorsInner.java @@ -0,0 +1,258 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.networkanalytics.models.DataConnectorConfiguration; +import com.azure.resourcemanager.networkanalytics.models.ManagedResourceGroupConfiguration; +import com.azure.resourcemanager.networkanalytics.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** The data connector resource. */ +@Fluent +public final class DataConnectorsInner extends Resource { + /* + * The resource-specific properties for this resource. + */ + @JsonProperty(value = "properties") + private DataConnectorsProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of DataConnectorsInner class. */ + public DataConnectorsInner() { + } + + /** + * Get the innerProperties property: The resource-specific properties for this resource. + * + * @return the innerProperties value. + */ + private DataConnectorsProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** {@inheritDoc} */ + @Override + public DataConnectorsInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public DataConnectorsInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the provisioningState property: The data connector provisioning state. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the managedResourceGroupConfiguration property: Managed resource group configuration. + * + * @return the managedResourceGroupConfiguration value. + */ + public ManagedResourceGroupConfiguration managedResourceGroupConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().managedResourceGroupConfiguration(); + } + + /** + * Set the managedResourceGroupConfiguration property: Managed resource group configuration. + * + * @param managedResourceGroupConfiguration the managedResourceGroupConfiguration value to set. + * @return the DataConnectorsInner object itself. + */ + public DataConnectorsInner withManagedResourceGroupConfiguration( + ManagedResourceGroupConfiguration managedResourceGroupConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new DataConnectorsProperties(); + } + this.innerProperties().withManagedResourceGroupConfiguration(managedResourceGroupConfiguration); + return this; + } + + /** + * Get the productName property: The network analytics product to which this connector belongs to. + * + * @return the productName value. + */ + public String productName() { + return this.innerProperties() == null ? null : this.innerProperties().productName(); + } + + /** + * Set the productName property: The network analytics product to which this connector belongs to. + * + * @param productName the productName value to set. + * @return the DataConnectorsInner object itself. + */ + public DataConnectorsInner withProductName(String productName) { + if (this.innerProperties() == null) { + this.innerProperties = new DataConnectorsProperties(); + } + this.innerProperties().withProductName(productName); + return this; + } + + /** + * Get the productVersion property: The version of the corresponding product. + * + * @return the productVersion value. + */ + public String productVersion() { + return this.innerProperties() == null ? null : this.innerProperties().productVersion(); + } + + /** + * Set the productVersion property: The version of the corresponding product. + * + * @param productVersion the productVersion value to set. + * @return the DataConnectorsInner object itself. + */ + public DataConnectorsInner withProductVersion(String productVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new DataConnectorsProperties(); + } + this.innerProperties().withProductVersion(productVersion); + return this; + } + + /** + * Get the productConnector property: The product connector. + * + * @return the productConnector value. + */ + public String productConnector() { + return this.innerProperties() == null ? null : this.innerProperties().productConnector(); + } + + /** + * Set the productConnector property: The product connector. + * + * @param productConnector the productConnector value to set. + * @return the DataConnectorsInner object itself. + */ + public DataConnectorsInner withProductConnector(String productConnector) { + if (this.innerProperties() == null) { + this.innerProperties = new DataConnectorsProperties(); + } + this.innerProperties().withProductConnector(productConnector); + return this; + } + + /** + * Get the productConnectorDataset property: The product connector dataset. + * + * @return the productConnectorDataset value. + */ + public String productConnectorDataset() { + return this.innerProperties() == null ? null : this.innerProperties().productConnectorDataset(); + } + + /** + * Set the productConnectorDataset property: The product connector dataset. + * + * @param productConnectorDataset the productConnectorDataset value to set. + * @return the DataConnectorsInner object itself. + */ + public DataConnectorsInner withProductConnectorDataset(String productConnectorDataset) { + if (this.innerProperties() == null) { + this.innerProperties = new DataConnectorsProperties(); + } + this.innerProperties().withProductConnectorDataset(productConnectorDataset); + return this; + } + + /** + * Get the dataLakeHouses property: An array of the ARM IDs for the Data Lake House resources. + * + * @return the dataLakeHouses value. + */ + public List dataLakeHouses() { + return this.innerProperties() == null ? null : this.innerProperties().dataLakeHouses(); + } + + /** + * Set the dataLakeHouses property: An array of the ARM IDs for the Data Lake House resources. + * + * @param dataLakeHouses the dataLakeHouses value to set. + * @return the DataConnectorsInner object itself. + */ + public DataConnectorsInner withDataLakeHouses(List dataLakeHouses) { + if (this.innerProperties() == null) { + this.innerProperties = new DataConnectorsProperties(); + } + this.innerProperties().withDataLakeHouses(dataLakeHouses); + return this; + } + + /** + * Get the dataIngestionPath property: The data ingestion path. + * + * @return the dataIngestionPath value. + */ + public String dataIngestionPath() { + return this.innerProperties() == null ? null : this.innerProperties().dataIngestionPath(); + } + + /** + * Get the dataConnectorConfiguration property: The data connector configuration. + * + * @return the dataConnectorConfiguration value. + */ + public DataConnectorConfiguration dataConnectorConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().dataConnectorConfiguration(); + } + + /** + * Set the dataConnectorConfiguration property: The data connector configuration. + * + * @param dataConnectorConfiguration the dataConnectorConfiguration value to set. + * @return the DataConnectorsInner object itself. + */ + public DataConnectorsInner withDataConnectorConfiguration(DataConnectorConfiguration dataConnectorConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new DataConnectorsProperties(); + } + this.innerProperties().withDataConnectorConfiguration(dataConnectorConfiguration); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/DataConnectorsProperties.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/DataConnectorsProperties.java new file mode 100644 index 000000000000..9bd4c58be48d --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/DataConnectorsProperties.java @@ -0,0 +1,289 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.networkanalytics.models.DataConnectorConfiguration; +import com.azure.resourcemanager.networkanalytics.models.ManagedResourceGroupConfiguration; +import com.azure.resourcemanager.networkanalytics.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Details of the Data Connector Properties. The product details are to be added from the supported values which can be + * fetched by making a GET call on the Network Analytics Product resource. + */ +@Fluent +public final class DataConnectorsProperties { + /* + * The data connector provisioning state + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /* + * Managed resource group configuration. + */ + @JsonProperty(value = "managedResourceGroupConfiguration") + private ManagedResourceGroupConfiguration managedResourceGroupConfiguration; + + /* + * The network analytics product to which this connector belongs to + */ + @JsonProperty(value = "productName", required = true) + private String productName; + + /* + * The version of the corresponding product + */ + @JsonProperty(value = "productVersion", required = true) + private String productVersion; + + /* + * The product connector + */ + @JsonProperty(value = "productConnector", required = true) + private String productConnector; + + /* + * The product connector dataset + */ + @JsonProperty(value = "productConnectorDataset", required = true) + private String productConnectorDataset; + + /* + * An array of the ARM IDs for the Data Lake House resources + */ + @JsonProperty(value = "dataLakeHouses", required = true) + private List dataLakeHouses; + + /* + * The data ingestion path + */ + @JsonProperty(value = "dataIngestionPath", access = JsonProperty.Access.WRITE_ONLY) + private String dataIngestionPath; + + /* + * The data connector configuration + */ + @JsonProperty(value = "dataConnectorConfiguration", required = true) + private DataConnectorConfiguration dataConnectorConfiguration; + + /** Creates an instance of DataConnectorsProperties class. */ + public DataConnectorsProperties() { + } + + /** + * Get the provisioningState property: The data connector provisioning state. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the managedResourceGroupConfiguration property: Managed resource group configuration. + * + * @return the managedResourceGroupConfiguration value. + */ + public ManagedResourceGroupConfiguration managedResourceGroupConfiguration() { + return this.managedResourceGroupConfiguration; + } + + /** + * Set the managedResourceGroupConfiguration property: Managed resource group configuration. + * + * @param managedResourceGroupConfiguration the managedResourceGroupConfiguration value to set. + * @return the DataConnectorsProperties object itself. + */ + public DataConnectorsProperties withManagedResourceGroupConfiguration( + ManagedResourceGroupConfiguration managedResourceGroupConfiguration) { + this.managedResourceGroupConfiguration = managedResourceGroupConfiguration; + return this; + } + + /** + * Get the productName property: The network analytics product to which this connector belongs to. + * + * @return the productName value. + */ + public String productName() { + return this.productName; + } + + /** + * Set the productName property: The network analytics product to which this connector belongs to. + * + * @param productName the productName value to set. + * @return the DataConnectorsProperties object itself. + */ + public DataConnectorsProperties withProductName(String productName) { + this.productName = productName; + return this; + } + + /** + * Get the productVersion property: The version of the corresponding product. + * + * @return the productVersion value. + */ + public String productVersion() { + return this.productVersion; + } + + /** + * Set the productVersion property: The version of the corresponding product. + * + * @param productVersion the productVersion value to set. + * @return the DataConnectorsProperties object itself. + */ + public DataConnectorsProperties withProductVersion(String productVersion) { + this.productVersion = productVersion; + return this; + } + + /** + * Get the productConnector property: The product connector. + * + * @return the productConnector value. + */ + public String productConnector() { + return this.productConnector; + } + + /** + * Set the productConnector property: The product connector. + * + * @param productConnector the productConnector value to set. + * @return the DataConnectorsProperties object itself. + */ + public DataConnectorsProperties withProductConnector(String productConnector) { + this.productConnector = productConnector; + return this; + } + + /** + * Get the productConnectorDataset property: The product connector dataset. + * + * @return the productConnectorDataset value. + */ + public String productConnectorDataset() { + return this.productConnectorDataset; + } + + /** + * Set the productConnectorDataset property: The product connector dataset. + * + * @param productConnectorDataset the productConnectorDataset value to set. + * @return the DataConnectorsProperties object itself. + */ + public DataConnectorsProperties withProductConnectorDataset(String productConnectorDataset) { + this.productConnectorDataset = productConnectorDataset; + return this; + } + + /** + * Get the dataLakeHouses property: An array of the ARM IDs for the Data Lake House resources. + * + * @return the dataLakeHouses value. + */ + public List dataLakeHouses() { + return this.dataLakeHouses; + } + + /** + * Set the dataLakeHouses property: An array of the ARM IDs for the Data Lake House resources. + * + * @param dataLakeHouses the dataLakeHouses value to set. + * @return the DataConnectorsProperties object itself. + */ + public DataConnectorsProperties withDataLakeHouses(List dataLakeHouses) { + this.dataLakeHouses = dataLakeHouses; + return this; + } + + /** + * Get the dataIngestionPath property: The data ingestion path. + * + * @return the dataIngestionPath value. + */ + public String dataIngestionPath() { + return this.dataIngestionPath; + } + + /** + * Get the dataConnectorConfiguration property: The data connector configuration. + * + * @return the dataConnectorConfiguration value. + */ + public DataConnectorConfiguration dataConnectorConfiguration() { + return this.dataConnectorConfiguration; + } + + /** + * Set the dataConnectorConfiguration property: The data connector configuration. + * + * @param dataConnectorConfiguration the dataConnectorConfiguration value to set. + * @return the DataConnectorsProperties object itself. + */ + public DataConnectorsProperties withDataConnectorConfiguration( + DataConnectorConfiguration dataConnectorConfiguration) { + this.dataConnectorConfiguration = dataConnectorConfiguration; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (managedResourceGroupConfiguration() != null) { + managedResourceGroupConfiguration().validate(); + } + if (productName() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property productName in model DataConnectorsProperties")); + } + if (productVersion() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property productVersion in model DataConnectorsProperties")); + } + if (productConnector() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property productConnector in model DataConnectorsProperties")); + } + if (productConnectorDataset() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property productConnectorDataset in model DataConnectorsProperties")); + } + if (dataLakeHouses() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property dataLakeHouses in model DataConnectorsProperties")); + } + if (dataConnectorConfiguration() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property dataConnectorConfiguration in model DataConnectorsProperties")); + } else { + dataConnectorConfiguration().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DataConnectorsProperties.class); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/DataConnectorsUpdateProperties.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/DataConnectorsUpdateProperties.java new file mode 100644 index 000000000000..bef56f4dc9c1 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/DataConnectorsUpdateProperties.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.networkanalytics.models.ManagedResourceGroupConfiguration; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The updatable properties of the DataConnectors. */ +@Fluent +public final class DataConnectorsUpdateProperties { + /* + * Managed resource group configuration. + */ + @JsonProperty(value = "managedResourceGroupConfiguration") + private ManagedResourceGroupConfiguration managedResourceGroupConfiguration; + + /** Creates an instance of DataConnectorsUpdateProperties class. */ + public DataConnectorsUpdateProperties() { + } + + /** + * Get the managedResourceGroupConfiguration property: Managed resource group configuration. + * + * @return the managedResourceGroupConfiguration value. + */ + public ManagedResourceGroupConfiguration managedResourceGroupConfiguration() { + return this.managedResourceGroupConfiguration; + } + + /** + * Set the managedResourceGroupConfiguration property: Managed resource group configuration. + * + * @param managedResourceGroupConfiguration the managedResourceGroupConfiguration value to set. + * @return the DataConnectorsUpdateProperties object itself. + */ + public DataConnectorsUpdateProperties withManagedResourceGroupConfiguration( + ManagedResourceGroupConfiguration managedResourceGroupConfiguration) { + this.managedResourceGroupConfiguration = managedResourceGroupConfiguration; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (managedResourceGroupConfiguration() != null) { + managedResourceGroupConfiguration().validate(); + } + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/DataLakeHouseResourcesInner.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/DataLakeHouseResourcesInner.java new file mode 100644 index 000000000000..d0f93a8ff89b --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/DataLakeHouseResourcesInner.java @@ -0,0 +1,207 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.networkanalytics.models.AzureDataExplorerProperties; +import com.azure.resourcemanager.networkanalytics.models.BronzeStorageAccountProperties; +import com.azure.resourcemanager.networkanalytics.models.CommonStorageAccountProperties; +import com.azure.resourcemanager.networkanalytics.models.ManagedResourceGroupConfiguration; +import com.azure.resourcemanager.networkanalytics.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** The data lake house resource. */ +@Fluent +public final class DataLakeHouseResourcesInner extends Resource { + /* + * The resource-specific properties for this resource. + */ + @JsonProperty(value = "properties") + private StorageProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of DataLakeHouseResourcesInner class. */ + public DataLakeHouseResourcesInner() { + } + + /** + * Get the innerProperties property: The resource-specific properties for this resource. + * + * @return the innerProperties value. + */ + private StorageProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** {@inheritDoc} */ + @Override + public DataLakeHouseResourcesInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public DataLakeHouseResourcesInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the provisioningState property: Storage properties. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the managedResourceGroupConfiguration property: Managed Resource Group configuration. + * + * @return the managedResourceGroupConfiguration value. + */ + public ManagedResourceGroupConfiguration managedResourceGroupConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().managedResourceGroupConfiguration(); + } + + /** + * Set the managedResourceGroupConfiguration property: Managed Resource Group configuration. + * + * @param managedResourceGroupConfiguration the managedResourceGroupConfiguration value to set. + * @return the DataLakeHouseResourcesInner object itself. + */ + public DataLakeHouseResourcesInner withManagedResourceGroupConfiguration( + ManagedResourceGroupConfiguration managedResourceGroupConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new StorageProperties(); + } + this.innerProperties().withManagedResourceGroupConfiguration(managedResourceGroupConfiguration); + return this; + } + + /** + * Get the uniqueIdentifierName property: unique Identifier Name. + * + * @return the uniqueIdentifierName value. + */ + public String uniqueIdentifierName() { + return this.innerProperties() == null ? null : this.innerProperties().uniqueIdentifierName(); + } + + /** + * Set the uniqueIdentifierName property: unique Identifier Name. + * + * @param uniqueIdentifierName the uniqueIdentifierName value to set. + * @return the DataLakeHouseResourcesInner object itself. + */ + public DataLakeHouseResourcesInner withUniqueIdentifierName(String uniqueIdentifierName) { + if (this.innerProperties() == null) { + this.innerProperties = new StorageProperties(); + } + this.innerProperties().withUniqueIdentifierName(uniqueIdentifierName); + return this; + } + + /** + * Get the commonStorageAccountProperties property: Common Storage Account properties. + * + * @return the commonStorageAccountProperties value. + */ + public CommonStorageAccountProperties commonStorageAccountProperties() { + return this.innerProperties() == null ? null : this.innerProperties().commonStorageAccountProperties(); + } + + /** + * Set the commonStorageAccountProperties property: Common Storage Account properties. + * + * @param commonStorageAccountProperties the commonStorageAccountProperties value to set. + * @return the DataLakeHouseResourcesInner object itself. + */ + public DataLakeHouseResourcesInner withCommonStorageAccountProperties( + CommonStorageAccountProperties commonStorageAccountProperties) { + if (this.innerProperties() == null) { + this.innerProperties = new StorageProperties(); + } + this.innerProperties().withCommonStorageAccountProperties(commonStorageAccountProperties); + return this; + } + + /** + * Get the bronzeStorageAccountProperties property: Bronze Storage Account properties. + * + * @return the bronzeStorageAccountProperties value. + */ + public BronzeStorageAccountProperties bronzeStorageAccountProperties() { + return this.innerProperties() == null ? null : this.innerProperties().bronzeStorageAccountProperties(); + } + + /** + * Set the bronzeStorageAccountProperties property: Bronze Storage Account properties. + * + * @param bronzeStorageAccountProperties the bronzeStorageAccountProperties value to set. + * @return the DataLakeHouseResourcesInner object itself. + */ + public DataLakeHouseResourcesInner withBronzeStorageAccountProperties( + BronzeStorageAccountProperties bronzeStorageAccountProperties) { + if (this.innerProperties() == null) { + this.innerProperties = new StorageProperties(); + } + this.innerProperties().withBronzeStorageAccountProperties(bronzeStorageAccountProperties); + return this; + } + + /** + * Get the azureDataExplorerProperties property: Azure DataExplorer Cluster properties. + * + * @return the azureDataExplorerProperties value. + */ + public AzureDataExplorerProperties azureDataExplorerProperties() { + return this.innerProperties() == null ? null : this.innerProperties().azureDataExplorerProperties(); + } + + /** + * Set the azureDataExplorerProperties property: Azure DataExplorer Cluster properties. + * + * @param azureDataExplorerProperties the azureDataExplorerProperties value to set. + * @return the DataLakeHouseResourcesInner object itself. + */ + public DataLakeHouseResourcesInner withAzureDataExplorerProperties( + AzureDataExplorerProperties azureDataExplorerProperties) { + if (this.innerProperties() == null) { + this.innerProperties = new StorageProperties(); + } + this.innerProperties().withAzureDataExplorerProperties(azureDataExplorerProperties); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/DataLakeHouseResourcesUpdateProperties.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/DataLakeHouseResourcesUpdateProperties.java new file mode 100644 index 000000000000..f94a1c96f285 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/DataLakeHouseResourcesUpdateProperties.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.networkanalytics.models.ManagedResourceGroupConfiguration; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The updatable properties of the DataLakeHouseResources. */ +@Fluent +public final class DataLakeHouseResourcesUpdateProperties { + /* + * Managed Resource Group configuration. + */ + @JsonProperty(value = "managedResourceGroupConfiguration") + private ManagedResourceGroupConfiguration managedResourceGroupConfiguration; + + /** Creates an instance of DataLakeHouseResourcesUpdateProperties class. */ + public DataLakeHouseResourcesUpdateProperties() { + } + + /** + * Get the managedResourceGroupConfiguration property: Managed Resource Group configuration. + * + * @return the managedResourceGroupConfiguration value. + */ + public ManagedResourceGroupConfiguration managedResourceGroupConfiguration() { + return this.managedResourceGroupConfiguration; + } + + /** + * Set the managedResourceGroupConfiguration property: Managed Resource Group configuration. + * + * @param managedResourceGroupConfiguration the managedResourceGroupConfiguration value to set. + * @return the DataLakeHouseResourcesUpdateProperties object itself. + */ + public DataLakeHouseResourcesUpdateProperties withManagedResourceGroupConfiguration( + ManagedResourceGroupConfiguration managedResourceGroupConfiguration) { + this.managedResourceGroupConfiguration = managedResourceGroupConfiguration; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (managedResourceGroupConfiguration() != null) { + managedResourceGroupConfiguration().validate(); + } + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/MetricsIngestionEndpointProperties.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/MetricsIngestionEndpointProperties.java new file mode 100644 index 000000000000..6e703b330e18 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/MetricsIngestionEndpointProperties.java @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.networkanalytics.models.ManagedResourceGroupConfiguration; +import com.azure.resourcemanager.networkanalytics.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The resource-specific properties of a Metrics Ingestion Endpoint. */ +@Fluent +public final class MetricsIngestionEndpointProperties { + /* + * Name of the External Metrics Ingress Gateway region where the compute should be deployed + */ + @JsonProperty(value = "ingressRegionName", required = true) + private String ingressRegionName; + + /* + * Event Hub URL to which the metrics should be sent for this resource + */ + @JsonProperty(value = "eventHubUrl", access = JsonProperty.Access.WRITE_ONLY) + private String eventHubUrl; + + /* + * Event Hub name to which the metrics should be sent for this resource + */ + @JsonProperty(value = "eventHubName", access = JsonProperty.Access.WRITE_ONLY) + private String eventHubName; + + /* + * Key Vault URL where the connection string exists for authentication + */ + @JsonProperty(value = "keyVaultUrl", access = JsonProperty.Access.WRITE_ONLY) + private String keyVaultUrl; + + /* + * The status of the last operation + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /* + * Managed Resource Group Configuration + */ + @JsonProperty(value = "managedResourceGroupConfiguration") + private ManagedResourceGroupConfiguration managedResourceGroupConfiguration; + + /** Creates an instance of MetricsIngestionEndpointProperties class. */ + public MetricsIngestionEndpointProperties() { + } + + /** + * Get the ingressRegionName property: Name of the External Metrics Ingress Gateway region where the compute should + * be deployed. + * + * @return the ingressRegionName value. + */ + public String ingressRegionName() { + return this.ingressRegionName; + } + + /** + * Set the ingressRegionName property: Name of the External Metrics Ingress Gateway region where the compute should + * be deployed. + * + * @param ingressRegionName the ingressRegionName value to set. + * @return the MetricsIngestionEndpointProperties object itself. + */ + public MetricsIngestionEndpointProperties withIngressRegionName(String ingressRegionName) { + this.ingressRegionName = ingressRegionName; + return this; + } + + /** + * Get the eventHubUrl property: Event Hub URL to which the metrics should be sent for this resource. + * + * @return the eventHubUrl value. + */ + public String eventHubUrl() { + return this.eventHubUrl; + } + + /** + * Get the eventHubName property: Event Hub name to which the metrics should be sent for this resource. + * + * @return the eventHubName value. + */ + public String eventHubName() { + return this.eventHubName; + } + + /** + * Get the keyVaultUrl property: Key Vault URL where the connection string exists for authentication. + * + * @return the keyVaultUrl value. + */ + public String keyVaultUrl() { + return this.keyVaultUrl; + } + + /** + * Get the provisioningState property: The status of the last operation. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the managedResourceGroupConfiguration property: Managed Resource Group Configuration. + * + * @return the managedResourceGroupConfiguration value. + */ + public ManagedResourceGroupConfiguration managedResourceGroupConfiguration() { + return this.managedResourceGroupConfiguration; + } + + /** + * Set the managedResourceGroupConfiguration property: Managed Resource Group Configuration. + * + * @param managedResourceGroupConfiguration the managedResourceGroupConfiguration value to set. + * @return the MetricsIngestionEndpointProperties object itself. + */ + public MetricsIngestionEndpointProperties withManagedResourceGroupConfiguration( + ManagedResourceGroupConfiguration managedResourceGroupConfiguration) { + this.managedResourceGroupConfiguration = managedResourceGroupConfiguration; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (ingressRegionName() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property ingressRegionName in model MetricsIngestionEndpointProperties")); + } + if (managedResourceGroupConfiguration() != null) { + managedResourceGroupConfiguration().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(MetricsIngestionEndpointProperties.class); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/MetricsIngestionEndpointResourcesInner.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/MetricsIngestionEndpointResourcesInner.java new file mode 100644 index 000000000000..f4730c042602 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/MetricsIngestionEndpointResourcesInner.java @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.networkanalytics.models.ManagedResourceGroupConfiguration; +import com.azure.resourcemanager.networkanalytics.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** An ingestion endpoint for metrics relating to the parent resource. */ +@Fluent +public final class MetricsIngestionEndpointResourcesInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + @JsonProperty(value = "properties") + private MetricsIngestionEndpointProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of MetricsIngestionEndpointResourcesInner class. */ + public MetricsIngestionEndpointResourcesInner() { + } + + /** + * Get the innerProperties property: The resource-specific properties for this resource. + * + * @return the innerProperties value. + */ + private MetricsIngestionEndpointProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the ingressRegionName property: Name of the External Metrics Ingress Gateway region where the compute should + * be deployed. + * + * @return the ingressRegionName value. + */ + public String ingressRegionName() { + return this.innerProperties() == null ? null : this.innerProperties().ingressRegionName(); + } + + /** + * Set the ingressRegionName property: Name of the External Metrics Ingress Gateway region where the compute should + * be deployed. + * + * @param ingressRegionName the ingressRegionName value to set. + * @return the MetricsIngestionEndpointResourcesInner object itself. + */ + public MetricsIngestionEndpointResourcesInner withIngressRegionName(String ingressRegionName) { + if (this.innerProperties() == null) { + this.innerProperties = new MetricsIngestionEndpointProperties(); + } + this.innerProperties().withIngressRegionName(ingressRegionName); + return this; + } + + /** + * Get the eventHubUrl property: Event Hub URL to which the metrics should be sent for this resource. + * + * @return the eventHubUrl value. + */ + public String eventHubUrl() { + return this.innerProperties() == null ? null : this.innerProperties().eventHubUrl(); + } + + /** + * Get the eventHubName property: Event Hub name to which the metrics should be sent for this resource. + * + * @return the eventHubName value. + */ + public String eventHubName() { + return this.innerProperties() == null ? null : this.innerProperties().eventHubName(); + } + + /** + * Get the keyVaultUrl property: Key Vault URL where the connection string exists for authentication. + * + * @return the keyVaultUrl value. + */ + public String keyVaultUrl() { + return this.innerProperties() == null ? null : this.innerProperties().keyVaultUrl(); + } + + /** + * Get the provisioningState property: The status of the last operation. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the managedResourceGroupConfiguration property: Managed Resource Group Configuration. + * + * @return the managedResourceGroupConfiguration value. + */ + public ManagedResourceGroupConfiguration managedResourceGroupConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().managedResourceGroupConfiguration(); + } + + /** + * Set the managedResourceGroupConfiguration property: Managed Resource Group Configuration. + * + * @param managedResourceGroupConfiguration the managedResourceGroupConfiguration value to set. + * @return the MetricsIngestionEndpointResourcesInner object itself. + */ + public MetricsIngestionEndpointResourcesInner withManagedResourceGroupConfiguration( + ManagedResourceGroupConfiguration managedResourceGroupConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new MetricsIngestionEndpointProperties(); + } + this.innerProperties().withManagedResourceGroupConfiguration(managedResourceGroupConfiguration); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/NetworkAnalyticsProductsInner.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/NetworkAnalyticsProductsInner.java new file mode 100644 index 000000000000..e81653a796b7 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/NetworkAnalyticsProductsInner.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.networkanalytics.models.NetworkAnalyticsProductInformation; +import com.azure.resourcemanager.networkanalytics.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The network analytics product resource. */ +@Fluent +public final class NetworkAnalyticsProductsInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + @JsonProperty(value = "properties") + private NetworkAnalyticsProductsProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of NetworkAnalyticsProductsInner class. */ + public NetworkAnalyticsProductsInner() { + } + + /** + * Get the innerProperties property: The resource-specific properties for this resource. + * + * @return the innerProperties value. + */ + private NetworkAnalyticsProductsProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the provisioningState property: The network analytics product provisioning state. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the networkAnalyticsProductInformation property: The network analytics product information. + * + * @return the networkAnalyticsProductInformation value. + */ + public NetworkAnalyticsProductInformation networkAnalyticsProductInformation() { + return this.innerProperties() == null ? null : this.innerProperties().networkAnalyticsProductInformation(); + } + + /** + * Set the networkAnalyticsProductInformation property: The network analytics product information. + * + * @param networkAnalyticsProductInformation the networkAnalyticsProductInformation value to set. + * @return the NetworkAnalyticsProductsInner object itself. + */ + public NetworkAnalyticsProductsInner withNetworkAnalyticsProductInformation( + NetworkAnalyticsProductInformation networkAnalyticsProductInformation) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkAnalyticsProductsProperties(); + } + this.innerProperties().withNetworkAnalyticsProductInformation(networkAnalyticsProductInformation); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/NetworkAnalyticsProductsProperties.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/NetworkAnalyticsProductsProperties.java new file mode 100644 index 000000000000..27083433fff3 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/NetworkAnalyticsProductsProperties.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.networkanalytics.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.networkanalytics.models.NetworkAnalyticsProductInformation; +import com.azure.resourcemanager.networkanalytics.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Details of the network analytics product properties. */ +@Fluent +public final class NetworkAnalyticsProductsProperties { + /* + * The network analytics product provisioning state + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /* + * The network analytics product information + */ + @JsonProperty(value = "networkAnalyticsProductInformation", required = true) + private NetworkAnalyticsProductInformation networkAnalyticsProductInformation; + + /** Creates an instance of NetworkAnalyticsProductsProperties class. */ + public NetworkAnalyticsProductsProperties() { + } + + /** + * Get the provisioningState property: The network analytics product provisioning state. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the networkAnalyticsProductInformation property: The network analytics product information. + * + * @return the networkAnalyticsProductInformation value. + */ + public NetworkAnalyticsProductInformation networkAnalyticsProductInformation() { + return this.networkAnalyticsProductInformation; + } + + /** + * Set the networkAnalyticsProductInformation property: The network analytics product information. + * + * @param networkAnalyticsProductInformation the networkAnalyticsProductInformation value to set. + * @return the NetworkAnalyticsProductsProperties object itself. + */ + public NetworkAnalyticsProductsProperties withNetworkAnalyticsProductInformation( + NetworkAnalyticsProductInformation networkAnalyticsProductInformation) { + this.networkAnalyticsProductInformation = networkAnalyticsProductInformation; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (networkAnalyticsProductInformation() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property networkAnalyticsProductInformation in model" + + " NetworkAnalyticsProductsProperties")); + } else { + networkAnalyticsProductInformation().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(NetworkAnalyticsProductsProperties.class); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/OperationInner.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/OperationInner.java new file mode 100644 index 000000000000..559cb385b0aa --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/OperationInner.java @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.networkanalytics.models.ActionType; +import com.azure.resourcemanager.networkanalytics.models.OperationDisplay; +import com.azure.resourcemanager.networkanalytics.models.Origin; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * REST API Operation + * + *

Details of a REST API operation, returned from the Resource Provider Operations API. + */ +@Fluent +public final class OperationInner { + /* + * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: + * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for + * ARM/control-plane operations. + */ + @JsonProperty(value = "isDataAction", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isDataAction; + + /* + * Localized display information for this particular operation. + */ + @JsonProperty(value = "display") + private OperationDisplay display; + + /* + * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default + * value is "user,system" + */ + @JsonProperty(value = "origin", access = JsonProperty.Access.WRITE_ONLY) + private Origin origin; + + /* + * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + */ + @JsonProperty(value = "actionType", access = JsonProperty.Access.WRITE_ONLY) + private ActionType actionType; + + /** Creates an instance of OperationInner class. */ + public OperationInner() { + } + + /** + * Get the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: + * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane + * operations and "false" for ARM/control-plane operations. + * + * @return the isDataAction value. + */ + public Boolean isDataAction() { + return this.isDataAction; + } + + /** + * Get the display property: Localized display information for this particular operation. + * + * @return the display value. + */ + public OperationDisplay display() { + return this.display; + } + + /** + * Set the display property: Localized display information for this particular operation. + * + * @param display the display value to set. + * @return the OperationInner object itself. + */ + public OperationInner withDisplay(OperationDisplay display) { + this.display = display; + return this; + } + + /** + * Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and + * audit logs UX. Default value is "user,system". + * + * @return the origin value. + */ + public Origin origin() { + return this.origin; + } + + /** + * Get the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal + * only APIs. + * + * @return the actionType value. + */ + public ActionType actionType() { + return this.actionType; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (display() != null) { + display().validate(); + } + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/StorageProperties.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/StorageProperties.java new file mode 100644 index 000000000000..0693f3d548f4 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/StorageProperties.java @@ -0,0 +1,203 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.networkanalytics.models.AzureDataExplorerProperties; +import com.azure.resourcemanager.networkanalytics.models.BronzeStorageAccountProperties; +import com.azure.resourcemanager.networkanalytics.models.CommonStorageAccountProperties; +import com.azure.resourcemanager.networkanalytics.models.ManagedResourceGroupConfiguration; +import com.azure.resourcemanager.networkanalytics.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Details of the NetworkAnalytics Storage. */ +@Fluent +public final class StorageProperties { + /* + * Storage properties + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /* + * Managed Resource Group configuration. + */ + @JsonProperty(value = "managedResourceGroupConfiguration") + private ManagedResourceGroupConfiguration managedResourceGroupConfiguration; + + /* + * unique Identifier Name + */ + @JsonProperty(value = "uniqueIdentifierName", required = true) + private String uniqueIdentifierName; + + /* + * Common Storage Account properties. + */ + @JsonProperty(value = "commonStorageAccountProperties") + private CommonStorageAccountProperties commonStorageAccountProperties; + + /* + * Bronze Storage Account properties. + */ + @JsonProperty(value = "bronzeStorageAccountProperties") + private BronzeStorageAccountProperties bronzeStorageAccountProperties; + + /* + * Azure DataExplorer Cluster properties. + */ + @JsonProperty(value = "azureDataExplorerProperties", required = true) + private AzureDataExplorerProperties azureDataExplorerProperties; + + /** Creates an instance of StorageProperties class. */ + public StorageProperties() { + } + + /** + * Get the provisioningState property: Storage properties. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the managedResourceGroupConfiguration property: Managed Resource Group configuration. + * + * @return the managedResourceGroupConfiguration value. + */ + public ManagedResourceGroupConfiguration managedResourceGroupConfiguration() { + return this.managedResourceGroupConfiguration; + } + + /** + * Set the managedResourceGroupConfiguration property: Managed Resource Group configuration. + * + * @param managedResourceGroupConfiguration the managedResourceGroupConfiguration value to set. + * @return the StorageProperties object itself. + */ + public StorageProperties withManagedResourceGroupConfiguration( + ManagedResourceGroupConfiguration managedResourceGroupConfiguration) { + this.managedResourceGroupConfiguration = managedResourceGroupConfiguration; + return this; + } + + /** + * Get the uniqueIdentifierName property: unique Identifier Name. + * + * @return the uniqueIdentifierName value. + */ + public String uniqueIdentifierName() { + return this.uniqueIdentifierName; + } + + /** + * Set the uniqueIdentifierName property: unique Identifier Name. + * + * @param uniqueIdentifierName the uniqueIdentifierName value to set. + * @return the StorageProperties object itself. + */ + public StorageProperties withUniqueIdentifierName(String uniqueIdentifierName) { + this.uniqueIdentifierName = uniqueIdentifierName; + return this; + } + + /** + * Get the commonStorageAccountProperties property: Common Storage Account properties. + * + * @return the commonStorageAccountProperties value. + */ + public CommonStorageAccountProperties commonStorageAccountProperties() { + return this.commonStorageAccountProperties; + } + + /** + * Set the commonStorageAccountProperties property: Common Storage Account properties. + * + * @param commonStorageAccountProperties the commonStorageAccountProperties value to set. + * @return the StorageProperties object itself. + */ + public StorageProperties withCommonStorageAccountProperties( + CommonStorageAccountProperties commonStorageAccountProperties) { + this.commonStorageAccountProperties = commonStorageAccountProperties; + return this; + } + + /** + * Get the bronzeStorageAccountProperties property: Bronze Storage Account properties. + * + * @return the bronzeStorageAccountProperties value. + */ + public BronzeStorageAccountProperties bronzeStorageAccountProperties() { + return this.bronzeStorageAccountProperties; + } + + /** + * Set the bronzeStorageAccountProperties property: Bronze Storage Account properties. + * + * @param bronzeStorageAccountProperties the bronzeStorageAccountProperties value to set. + * @return the StorageProperties object itself. + */ + public StorageProperties withBronzeStorageAccountProperties( + BronzeStorageAccountProperties bronzeStorageAccountProperties) { + this.bronzeStorageAccountProperties = bronzeStorageAccountProperties; + return this; + } + + /** + * Get the azureDataExplorerProperties property: Azure DataExplorer Cluster properties. + * + * @return the azureDataExplorerProperties value. + */ + public AzureDataExplorerProperties azureDataExplorerProperties() { + return this.azureDataExplorerProperties; + } + + /** + * Set the azureDataExplorerProperties property: Azure DataExplorer Cluster properties. + * + * @param azureDataExplorerProperties the azureDataExplorerProperties value to set. + * @return the StorageProperties object itself. + */ + public StorageProperties withAzureDataExplorerProperties(AzureDataExplorerProperties azureDataExplorerProperties) { + this.azureDataExplorerProperties = azureDataExplorerProperties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (managedResourceGroupConfiguration() != null) { + managedResourceGroupConfiguration().validate(); + } + if (uniqueIdentifierName() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property uniqueIdentifierName in model StorageProperties")); + } + if (commonStorageAccountProperties() != null) { + commonStorageAccountProperties().validate(); + } + if (bronzeStorageAccountProperties() != null) { + bronzeStorageAccountProperties().validate(); + } + if (azureDataExplorerProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property azureDataExplorerProperties in model StorageProperties")); + } else { + azureDataExplorerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(StorageProperties.class); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/package-info.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/package-info.java new file mode 100644 index 000000000000..59bab0bb8a0f --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/models/package-info.java @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** Package containing the inner data models for MicrosoftNetworkAnalytics. null. */ +package com.azure.resourcemanager.networkanalytics.fluent.models; diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/package-info.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/package-info.java new file mode 100644 index 000000000000..295962fde057 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/fluent/package-info.java @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** Package containing the service clients for MicrosoftNetworkAnalytics. null. */ +package com.azure.resourcemanager.networkanalytics.fluent; diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataConnectorOperationsClientImpl.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataConnectorOperationsClientImpl.java new file mode 100644 index 000000000000..733c5089153a --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataConnectorOperationsClientImpl.java @@ -0,0 +1,1447 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.networkanalytics.fluent.DataConnectorOperationsClient; +import com.azure.resourcemanager.networkanalytics.fluent.models.DataConnectorsInner; +import com.azure.resourcemanager.networkanalytics.models.DataConnectorsListResult; +import com.azure.resourcemanager.networkanalytics.models.DataConnectorsUpdate; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in DataConnectorOperationsClient. */ +public final class DataConnectorOperationsClientImpl implements DataConnectorOperationsClient { + /** The proxy service used to perform REST calls. */ + private final DataConnectorOperationsService service; + + /** The service client containing this operation class. */ + private final MicrosoftNetworkAnalyticsImpl client; + + /** + * Initializes an instance of DataConnectorOperationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + DataConnectorOperationsClientImpl(MicrosoftNetworkAnalyticsImpl client) { + this.service = + RestProxy + .create(DataConnectorOperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MicrosoftNetworkAnalyticsDataConnectorOperations to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "MicrosoftNetworkAnal") + public interface DataConnectorOperationsService { + @Headers({"Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkAnalytics/dataConnectors") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics" + + "/dataConnectors") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics" + + "/dataConnectors/{dataConnectorName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("dataConnectorName") String dataConnectorName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics" + + "/dataConnectors/{dataConnectorName}") + @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("dataConnectorName") String dataConnectorName, + @BodyParam("application/json") DataConnectorsInner resource, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics" + + "/dataConnectors/{dataConnectorName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> update( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("dataConnectorName") String dataConnectorName, + @BodyParam("application/json") DataConnectorsUpdate properties, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics" + + "/dataConnectors/{dataConnectorName}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("dataConnectorName") String dataConnectorName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * List DataConnectors resources by subscription ID. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataConnectors list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List DataConnectors resources by subscription ID. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataConnectors list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List DataConnectors resources by subscription ID. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataConnectors list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>( + () -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * List DataConnectors resources by subscription ID. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataConnectors list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(context), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + } + + /** + * List DataConnectors resources by subscription ID. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataConnectors list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * List DataConnectors resources by subscription ID. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataConnectors list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * List DataConnectors resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataConnectors list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listByResourceGroup( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List DataConnectors resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataConnectors list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync( + String resourceGroupName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroup( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List DataConnectors resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataConnectors list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * List DataConnectors resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataConnectors list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + } + + /** + * List DataConnectors resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataConnectors list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * List DataConnectors resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataConnectors list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + } + + /** + * Get a DataConnectors. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataConnectorName The data connector name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DataConnectors along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String dataConnectorName) { + 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 (dataConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter dataConnectorName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getByResourceGroup( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + dataConnectorName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a DataConnectors. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataConnectorName The data connector name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DataConnectors along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String dataConnectorName, 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 (dataConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter dataConnectorName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getByResourceGroup( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + dataConnectorName, + accept, + context); + } + + /** + * Get a DataConnectors. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataConnectorName The data connector name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DataConnectors on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String dataConnectorName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, dataConnectorName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a DataConnectors. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataConnectorName The data connector name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DataConnectors along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse( + String resourceGroupName, String dataConnectorName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, dataConnectorName, context).block(); + } + + /** + * Get a DataConnectors. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataConnectorName The data connector name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DataConnectors. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DataConnectorsInner getByResourceGroup(String resourceGroupName, String dataConnectorName) { + return getByResourceGroupWithResponse(resourceGroupName, dataConnectorName, Context.NONE).getValue(); + } + + /** + * Create a DataConnectors. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataConnectorName The data connector name. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data connector resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String dataConnectorName, DataConnectorsInner resource) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (dataConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter dataConnectorName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + dataConnectorName, + resource, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a DataConnectors. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataConnectorName The data connector name. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data connector resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String dataConnectorName, DataConnectorsInner resource, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (dataConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter dataConnectorName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + dataConnectorName, + resource, + accept, + context); + } + + /** + * Create a DataConnectors. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataConnectorName The data connector name. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the data connector resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, DataConnectorsInner> beginCreateOrUpdateAsync( + String resourceGroupName, String dataConnectorName, DataConnectorsInner resource) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, dataConnectorName, resource); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + DataConnectorsInner.class, + DataConnectorsInner.class, + this.client.getContext()); + } + + /** + * Create a DataConnectors. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataConnectorName The data connector name. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the data connector resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, DataConnectorsInner> beginCreateOrUpdateAsync( + String resourceGroupName, String dataConnectorName, DataConnectorsInner resource, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, dataConnectorName, resource, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), DataConnectorsInner.class, DataConnectorsInner.class, context); + } + + /** + * Create a DataConnectors. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataConnectorName The data connector name. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the data connector resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, DataConnectorsInner> beginCreateOrUpdate( + String resourceGroupName, String dataConnectorName, DataConnectorsInner resource) { + return this.beginCreateOrUpdateAsync(resourceGroupName, dataConnectorName, resource).getSyncPoller(); + } + + /** + * Create a DataConnectors. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataConnectorName The data connector name. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the data connector resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, DataConnectorsInner> beginCreateOrUpdate( + String resourceGroupName, String dataConnectorName, DataConnectorsInner resource, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, dataConnectorName, resource, context).getSyncPoller(); + } + + /** + * Create a DataConnectors. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataConnectorName The data connector name. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data connector resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String dataConnectorName, DataConnectorsInner resource) { + return beginCreateOrUpdateAsync(resourceGroupName, dataConnectorName, resource) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a DataConnectors. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataConnectorName The data connector name. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data connector resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String dataConnectorName, DataConnectorsInner resource, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, dataConnectorName, resource, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a DataConnectors. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataConnectorName The data connector name. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data connector resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DataConnectorsInner createOrUpdate( + String resourceGroupName, String dataConnectorName, DataConnectorsInner resource) { + return createOrUpdateAsync(resourceGroupName, dataConnectorName, resource).block(); + } + + /** + * Create a DataConnectors. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataConnectorName The data connector name. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data connector resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DataConnectorsInner createOrUpdate( + String resourceGroupName, String dataConnectorName, DataConnectorsInner resource, Context context) { + return createOrUpdateAsync(resourceGroupName, dataConnectorName, resource, context).block(); + } + + /** + * Update a DataConnectors. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataConnectorName The data connector name. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data connector resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync( + String resourceGroupName, String dataConnectorName, DataConnectorsUpdate properties) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (dataConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter dataConnectorName is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .update( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + dataConnectorName, + properties, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update a DataConnectors. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataConnectorName The data connector name. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data connector resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync( + String resourceGroupName, String dataConnectorName, DataConnectorsUpdate properties, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (dataConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter dataConnectorName is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .update( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + dataConnectorName, + properties, + accept, + context); + } + + /** + * Update a DataConnectors. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataConnectorName The data connector name. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data connector resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, String dataConnectorName, DataConnectorsUpdate properties) { + return updateWithResponseAsync(resourceGroupName, dataConnectorName, properties) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Update a DataConnectors. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataConnectorName The data connector name. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data connector resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse( + String resourceGroupName, String dataConnectorName, DataConnectorsUpdate properties, Context context) { + return updateWithResponseAsync(resourceGroupName, dataConnectorName, properties, context).block(); + } + + /** + * Update a DataConnectors. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataConnectorName The data connector name. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data connector resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DataConnectorsInner update( + String resourceGroupName, String dataConnectorName, DataConnectorsUpdate properties) { + return updateWithResponse(resourceGroupName, dataConnectorName, properties, Context.NONE).getValue(); + } + + /** + * Delete a DataConnectors. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataConnectorName The data connector name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String dataConnectorName) { + 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 (dataConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter dataConnectorName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + dataConnectorName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a DataConnectors. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataConnectorName The data connector name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String dataConnectorName, 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 (dataConnectorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter dataConnectorName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + dataConnectorName, + accept, + context); + } + + /** + * Delete a DataConnectors. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataConnectorName The data connector name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String dataConnectorName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, dataConnectorName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Delete a DataConnectors. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataConnectorName The data connector name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String dataConnectorName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, dataConnectorName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Delete a DataConnectors. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataConnectorName The data connector name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String dataConnectorName) { + return this.beginDeleteAsync(resourceGroupName, dataConnectorName).getSyncPoller(); + } + + /** + * Delete a DataConnectors. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataConnectorName The data connector name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String dataConnectorName, Context context) { + return this.beginDeleteAsync(resourceGroupName, dataConnectorName, context).getSyncPoller(); + } + + /** + * Delete a DataConnectors. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataConnectorName The data connector name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String dataConnectorName) { + return beginDeleteAsync(resourceGroupName, dataConnectorName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a DataConnectors. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataConnectorName The data connector name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String dataConnectorName, Context context) { + return beginDeleteAsync(resourceGroupName, dataConnectorName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a DataConnectors. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataConnectorName The data connector name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String dataConnectorName) { + deleteAsync(resourceGroupName, dataConnectorName).block(); + } + + /** + * Delete a DataConnectors. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataConnectorName The data connector name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String dataConnectorName, Context context) { + deleteAsync(resourceGroupName, dataConnectorName, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

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

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

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

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataConnectors list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataConnectorOperationsImpl.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataConnectorOperationsImpl.java new file mode 100644 index 000000000000..af4953373ecc --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataConnectorOperationsImpl.java @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.networkanalytics.fluent.DataConnectorOperationsClient; +import com.azure.resourcemanager.networkanalytics.fluent.models.DataConnectorsInner; +import com.azure.resourcemanager.networkanalytics.models.DataConnectorOperations; +import com.azure.resourcemanager.networkanalytics.models.DataConnectors; + +public final class DataConnectorOperationsImpl implements DataConnectorOperations { + private static final ClientLogger LOGGER = new ClientLogger(DataConnectorOperationsImpl.class); + + private final DataConnectorOperationsClient innerClient; + + private final com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager serviceManager; + + public DataConnectorOperationsImpl( + DataConnectorOperationsClient innerClient, + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return Utils.mapPage(inner, inner1 -> new DataConnectorsImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return Utils.mapPage(inner, inner1 -> new DataConnectorsImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return Utils.mapPage(inner, inner1 -> new DataConnectorsImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return Utils.mapPage(inner, inner1 -> new DataConnectorsImpl(inner1, this.manager())); + } + + public Response getByResourceGroupWithResponse( + String resourceGroupName, String dataConnectorName, Context context) { + Response inner = + this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, dataConnectorName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new DataConnectorsImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public DataConnectors getByResourceGroup(String resourceGroupName, String dataConnectorName) { + DataConnectorsInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, dataConnectorName); + if (inner != null) { + return new DataConnectorsImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String dataConnectorName) { + this.serviceClient().delete(resourceGroupName, dataConnectorName); + } + + public void delete(String resourceGroupName, String dataConnectorName, Context context) { + this.serviceClient().delete(resourceGroupName, dataConnectorName, context); + } + + public DataConnectors 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 dataConnectorName = Utils.getValueFromIdByName(id, "dataConnectors"); + if (dataConnectorName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'dataConnectors'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, dataConnectorName, 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 dataConnectorName = Utils.getValueFromIdByName(id, "dataConnectors"); + if (dataConnectorName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'dataConnectors'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, dataConnectorName, 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 dataConnectorName = Utils.getValueFromIdByName(id, "dataConnectors"); + if (dataConnectorName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'dataConnectors'.", id))); + } + this.delete(resourceGroupName, dataConnectorName, 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 dataConnectorName = Utils.getValueFromIdByName(id, "dataConnectors"); + if (dataConnectorName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'dataConnectors'.", id))); + } + this.delete(resourceGroupName, dataConnectorName, context); + } + + private DataConnectorOperationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager() { + return this.serviceManager; + } + + public DataConnectorsImpl define(String name) { + return new DataConnectorsImpl(name, this.manager()); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataConnectorsImpl.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataConnectorsImpl.java new file mode 100644 index 000000000000..9467faeaf5d4 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataConnectorsImpl.java @@ -0,0 +1,268 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.networkanalytics.fluent.models.DataConnectorsInner; +import com.azure.resourcemanager.networkanalytics.models.DataConnectorConfiguration; +import com.azure.resourcemanager.networkanalytics.models.DataConnectors; +import com.azure.resourcemanager.networkanalytics.models.DataConnectorsUpdate; +import com.azure.resourcemanager.networkanalytics.models.ManagedResourceGroupConfiguration; +import com.azure.resourcemanager.networkanalytics.models.ProvisioningState; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class DataConnectorsImpl implements DataConnectors, DataConnectors.Definition, DataConnectors.Update { + private DataConnectorsInner innerObject; + + private final com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public ManagedResourceGroupConfiguration managedResourceGroupConfiguration() { + return this.innerModel().managedResourceGroupConfiguration(); + } + + public String productName() { + return this.innerModel().productName(); + } + + public String productVersion() { + return this.innerModel().productVersion(); + } + + public String productConnector() { + return this.innerModel().productConnector(); + } + + public String productConnectorDataset() { + return this.innerModel().productConnectorDataset(); + } + + public List dataLakeHouses() { + List inner = this.innerModel().dataLakeHouses(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String dataIngestionPath() { + return this.innerModel().dataIngestionPath(); + } + + public DataConnectorConfiguration dataConnectorConfiguration() { + return this.innerModel().dataConnectorConfiguration(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public DataConnectorsInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String dataConnectorName; + + private DataConnectorsUpdate updateProperties; + + public DataConnectorsImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public DataConnectors create() { + this.innerObject = + serviceManager + .serviceClient() + .getDataConnectorOperations() + .createOrUpdate(resourceGroupName, dataConnectorName, this.innerModel(), Context.NONE); + return this; + } + + public DataConnectors create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getDataConnectorOperations() + .createOrUpdate(resourceGroupName, dataConnectorName, this.innerModel(), context); + return this; + } + + DataConnectorsImpl(String name, com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager serviceManager) { + this.innerObject = new DataConnectorsInner(); + this.serviceManager = serviceManager; + this.dataConnectorName = name; + } + + public DataConnectorsImpl update() { + this.updateProperties = new DataConnectorsUpdate(); + return this; + } + + public DataConnectors apply() { + this.innerObject = + serviceManager + .serviceClient() + .getDataConnectorOperations() + .updateWithResponse(resourceGroupName, dataConnectorName, updateProperties, Context.NONE) + .getValue(); + return this; + } + + public DataConnectors apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getDataConnectorOperations() + .updateWithResponse(resourceGroupName, dataConnectorName, updateProperties, context) + .getValue(); + return this; + } + + DataConnectorsImpl( + DataConnectorsInner innerObject, + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.dataConnectorName = Utils.getValueFromIdByName(innerObject.id(), "dataConnectors"); + } + + public DataConnectors refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getDataConnectorOperations() + .getByResourceGroupWithResponse(resourceGroupName, dataConnectorName, Context.NONE) + .getValue(); + return this; + } + + public DataConnectors refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getDataConnectorOperations() + .getByResourceGroupWithResponse(resourceGroupName, dataConnectorName, context) + .getValue(); + return this; + } + + public DataConnectorsImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public DataConnectorsImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public DataConnectorsImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateProperties.withTags(tags); + return this; + } + } + + public DataConnectorsImpl withManagedResourceGroupConfiguration( + ManagedResourceGroupConfiguration managedResourceGroupConfiguration) { + if (isInCreateMode()) { + this.innerModel().withManagedResourceGroupConfiguration(managedResourceGroupConfiguration); + return this; + } else { + this.updateProperties.withManagedResourceGroupConfiguration(managedResourceGroupConfiguration); + return this; + } + } + + public DataConnectorsImpl withProductName(String productName) { + this.innerModel().withProductName(productName); + return this; + } + + public DataConnectorsImpl withProductVersion(String productVersion) { + this.innerModel().withProductVersion(productVersion); + return this; + } + + public DataConnectorsImpl withProductConnector(String productConnector) { + this.innerModel().withProductConnector(productConnector); + return this; + } + + public DataConnectorsImpl withProductConnectorDataset(String productConnectorDataset) { + this.innerModel().withProductConnectorDataset(productConnectorDataset); + return this; + } + + public DataConnectorsImpl withDataLakeHouses(List dataLakeHouses) { + this.innerModel().withDataLakeHouses(dataLakeHouses); + return this; + } + + public DataConnectorsImpl withDataConnectorConfiguration(DataConnectorConfiguration dataConnectorConfiguration) { + this.innerModel().withDataConnectorConfiguration(dataConnectorConfiguration); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataLakeHouseResourcesImpl.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataLakeHouseResourcesImpl.java new file mode 100644 index 000000000000..55ba54e18324 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/DataLakeHouseResourcesImpl.java @@ -0,0 +1,247 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.networkanalytics.fluent.models.DataLakeHouseResourcesInner; +import com.azure.resourcemanager.networkanalytics.models.AzureDataExplorerProperties; +import com.azure.resourcemanager.networkanalytics.models.BronzeStorageAccountProperties; +import com.azure.resourcemanager.networkanalytics.models.CommonStorageAccountProperties; +import com.azure.resourcemanager.networkanalytics.models.DataLakeHouseResources; +import com.azure.resourcemanager.networkanalytics.models.DataLakeHouseResourcesUpdate; +import com.azure.resourcemanager.networkanalytics.models.ManagedResourceGroupConfiguration; +import com.azure.resourcemanager.networkanalytics.models.ProvisioningState; +import java.util.Collections; +import java.util.Map; + +public final class DataLakeHouseResourcesImpl + implements DataLakeHouseResources, DataLakeHouseResources.Definition, DataLakeHouseResources.Update { + private DataLakeHouseResourcesInner innerObject; + + private final com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public ManagedResourceGroupConfiguration managedResourceGroupConfiguration() { + return this.innerModel().managedResourceGroupConfiguration(); + } + + public String uniqueIdentifierName() { + return this.innerModel().uniqueIdentifierName(); + } + + public CommonStorageAccountProperties commonStorageAccountProperties() { + return this.innerModel().commonStorageAccountProperties(); + } + + public BronzeStorageAccountProperties bronzeStorageAccountProperties() { + return this.innerModel().bronzeStorageAccountProperties(); + } + + public AzureDataExplorerProperties azureDataExplorerProperties() { + return this.innerModel().azureDataExplorerProperties(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public DataLakeHouseResourcesInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String storageName; + + private DataLakeHouseResourcesUpdate updateProperties; + + public DataLakeHouseResourcesImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public DataLakeHouseResources create() { + this.innerObject = + serviceManager + .serviceClient() + .getStorages() + .createOrUpdate(resourceGroupName, storageName, this.innerModel(), Context.NONE); + return this; + } + + public DataLakeHouseResources create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getStorages() + .createOrUpdate(resourceGroupName, storageName, this.innerModel(), context); + return this; + } + + DataLakeHouseResourcesImpl( + String name, com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager serviceManager) { + this.innerObject = new DataLakeHouseResourcesInner(); + this.serviceManager = serviceManager; + this.storageName = name; + } + + public DataLakeHouseResourcesImpl update() { + this.updateProperties = new DataLakeHouseResourcesUpdate(); + return this; + } + + public DataLakeHouseResources apply() { + this.innerObject = + serviceManager + .serviceClient() + .getStorages() + .updateWithResponse(resourceGroupName, storageName, updateProperties, Context.NONE) + .getValue(); + return this; + } + + public DataLakeHouseResources apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getStorages() + .updateWithResponse(resourceGroupName, storageName, updateProperties, context) + .getValue(); + return this; + } + + DataLakeHouseResourcesImpl( + DataLakeHouseResourcesInner innerObject, + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.storageName = Utils.getValueFromIdByName(innerObject.id(), "dataLakeHouses"); + } + + public DataLakeHouseResources refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getStorages() + .getByResourceGroupWithResponse(resourceGroupName, storageName, Context.NONE) + .getValue(); + return this; + } + + public DataLakeHouseResources refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getStorages() + .getByResourceGroupWithResponse(resourceGroupName, storageName, context) + .getValue(); + return this; + } + + public DataLakeHouseResourcesImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public DataLakeHouseResourcesImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public DataLakeHouseResourcesImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateProperties.withTags(tags); + return this; + } + } + + public DataLakeHouseResourcesImpl withManagedResourceGroupConfiguration( + ManagedResourceGroupConfiguration managedResourceGroupConfiguration) { + if (isInCreateMode()) { + this.innerModel().withManagedResourceGroupConfiguration(managedResourceGroupConfiguration); + return this; + } else { + this.updateProperties.withManagedResourceGroupConfiguration(managedResourceGroupConfiguration); + return this; + } + } + + public DataLakeHouseResourcesImpl withUniqueIdentifierName(String uniqueIdentifierName) { + this.innerModel().withUniqueIdentifierName(uniqueIdentifierName); + return this; + } + + public DataLakeHouseResourcesImpl withCommonStorageAccountProperties( + CommonStorageAccountProperties commonStorageAccountProperties) { + this.innerModel().withCommonStorageAccountProperties(commonStorageAccountProperties); + return this; + } + + public DataLakeHouseResourcesImpl withBronzeStorageAccountProperties( + BronzeStorageAccountProperties bronzeStorageAccountProperties) { + this.innerModel().withBronzeStorageAccountProperties(bronzeStorageAccountProperties); + return this; + } + + public DataLakeHouseResourcesImpl withAzureDataExplorerProperties( + AzureDataExplorerProperties azureDataExplorerProperties) { + this.innerModel().withAzureDataExplorerProperties(azureDataExplorerProperties); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/MetricsIngestionEndpointResourcesImpl.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/MetricsIngestionEndpointResourcesImpl.java new file mode 100644 index 000000000000..8356f84f71c2 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/MetricsIngestionEndpointResourcesImpl.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.networkanalytics.fluent.models.MetricsIngestionEndpointResourcesInner; +import com.azure.resourcemanager.networkanalytics.models.ManagedResourceGroupConfiguration; +import com.azure.resourcemanager.networkanalytics.models.MetricsIngestionEndpointResources; +import com.azure.resourcemanager.networkanalytics.models.ProvisioningState; + +public final class MetricsIngestionEndpointResourcesImpl implements MetricsIngestionEndpointResources { + private MetricsIngestionEndpointResourcesInner innerObject; + + private final com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager serviceManager; + + MetricsIngestionEndpointResourcesImpl( + MetricsIngestionEndpointResourcesInner innerObject, + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String ingressRegionName() { + return this.innerModel().ingressRegionName(); + } + + public String eventHubUrl() { + return this.innerModel().eventHubUrl(); + } + + public String eventHubName() { + return this.innerModel().eventHubName(); + } + + public String keyVaultUrl() { + return this.innerModel().keyVaultUrl(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public ManagedResourceGroupConfiguration managedResourceGroupConfiguration() { + return this.innerModel().managedResourceGroupConfiguration(); + } + + public MetricsIngestionEndpointResourcesInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/MetricsIngestionEndpointsClientImpl.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/MetricsIngestionEndpointsClientImpl.java new file mode 100644 index 000000000000..e8cdf14feeba --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/MetricsIngestionEndpointsClientImpl.java @@ -0,0 +1,981 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.networkanalytics.fluent.MetricsIngestionEndpointsClient; +import com.azure.resourcemanager.networkanalytics.fluent.models.MetricsIngestionEndpointResourcesInner; +import com.azure.resourcemanager.networkanalytics.models.MetricsIngestionEndpointResourcesListResult; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in MetricsIngestionEndpointsClient. */ +public final class MetricsIngestionEndpointsClientImpl implements MetricsIngestionEndpointsClient { + /** The proxy service used to perform REST calls. */ + private final MetricsIngestionEndpointsService service; + + /** The service client containing this operation class. */ + private final MicrosoftNetworkAnalyticsImpl client; + + /** + * Initializes an instance of MetricsIngestionEndpointsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + MetricsIngestionEndpointsClientImpl(MicrosoftNetworkAnalyticsImpl client) { + this.service = + RestProxy + .create( + MetricsIngestionEndpointsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MicrosoftNetworkAnalyticsMetricsIngestionEndpoints to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "MicrosoftNetworkAnal") + public interface MetricsIngestionEndpointsService { + @Headers({"Content-Type: application/json"}) + @Get("/{resourceUri}/providers/Microsoft.NetworkAnalytics/metricsIngestionEndpoints") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam(value = "resourceUri", encoded = true) String resourceUri, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("/{resourceUri}/providers/Microsoft.NetworkAnalytics/metricsIngestionEndpoints/default") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam(value = "resourceUri", encoded = true) String resourceUri, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put("/{resourceUri}/providers/Microsoft.NetworkAnalytics/metricsIngestionEndpoints/default") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam(value = "resourceUri", encoded = true) String resourceUri, + @BodyParam("application/json") MetricsIngestionEndpointResourcesInner resource, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch("/{resourceUri}/providers/Microsoft.NetworkAnalytics/metricsIngestionEndpoints/default") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> update( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam(value = "resourceUri", encoded = true) String resourceUri, + @BodyParam("application/json") Object properties, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete("/{resourceUri}/providers/Microsoft.NetworkAnalytics/metricsIngestionEndpoints/default") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam(value = "resourceUri", encoded = true) String resourceUri, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * List MetricsIngestionEndpointResources resources by parent. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a MetricsIngestionEndpointResources list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceUri) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceUri == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service.list(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List MetricsIngestionEndpointResources resources by parent. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a MetricsIngestionEndpointResources list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceUri, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceUri == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List MetricsIngestionEndpointResources resources by parent. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a MetricsIngestionEndpointResources list operation as paginated response with {@link + * PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceUri) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceUri), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List MetricsIngestionEndpointResources resources by parent. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a MetricsIngestionEndpointResources list operation as paginated response with {@link + * PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceUri, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceUri, context), nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List MetricsIngestionEndpointResources resources by parent. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a MetricsIngestionEndpointResources list operation as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceUri) { + return new PagedIterable<>(listAsync(resourceUri)); + } + + /** + * List MetricsIngestionEndpointResources resources by parent. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a MetricsIngestionEndpointResources list operation as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceUri, Context context) { + return new PagedIterable<>(listAsync(resourceUri, context)); + } + + /** + * Get a MetricsIngestionEndpointResources. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a MetricsIngestionEndpointResources along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceUri) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceUri == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a MetricsIngestionEndpointResources. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a MetricsIngestionEndpointResources along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceUri, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceUri == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, accept, context); + } + + /** + * Get a MetricsIngestionEndpointResources. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a MetricsIngestionEndpointResources on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceUri) { + return getWithResponseAsync(resourceUri).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a MetricsIngestionEndpointResources. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a MetricsIngestionEndpointResources along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceUri, Context context) { + return getWithResponseAsync(resourceUri, context).block(); + } + + /** + * Get a MetricsIngestionEndpointResources. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a MetricsIngestionEndpointResources. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MetricsIngestionEndpointResourcesInner get(String resourceUri) { + return getWithResponse(resourceUri, Context.NONE).getValue(); + } + + /** + * Create a MetricsIngestionEndpointResources. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an ingestion endpoint for metrics relating to the parent resource along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceUri, MetricsIngestionEndpointResourcesInner resource) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceUri == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getApiVersion(), + resourceUri, + resource, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a MetricsIngestionEndpointResources. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an ingestion endpoint for metrics relating to the parent resource along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceUri, MetricsIngestionEndpointResourcesInner resource, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceUri == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, resource, accept, context); + } + + /** + * Create a MetricsIngestionEndpointResources. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of an ingestion endpoint for metrics relating to the parent resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, MetricsIngestionEndpointResourcesInner> + beginCreateOrUpdateAsync(String resourceUri, MetricsIngestionEndpointResourcesInner resource) { + Mono>> mono = createOrUpdateWithResponseAsync(resourceUri, resource); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + MetricsIngestionEndpointResourcesInner.class, + MetricsIngestionEndpointResourcesInner.class, + this.client.getContext()); + } + + /** + * Create a MetricsIngestionEndpointResources. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of an ingestion endpoint for metrics relating to the parent resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, MetricsIngestionEndpointResourcesInner> + beginCreateOrUpdateAsync(String resourceUri, MetricsIngestionEndpointResourcesInner resource, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceUri, resource, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + MetricsIngestionEndpointResourcesInner.class, + MetricsIngestionEndpointResourcesInner.class, + context); + } + + /** + * Create a MetricsIngestionEndpointResources. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of an ingestion endpoint for metrics relating to the parent resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, MetricsIngestionEndpointResourcesInner> + beginCreateOrUpdate(String resourceUri, MetricsIngestionEndpointResourcesInner resource) { + return this.beginCreateOrUpdateAsync(resourceUri, resource).getSyncPoller(); + } + + /** + * Create a MetricsIngestionEndpointResources. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of an ingestion endpoint for metrics relating to the parent resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, MetricsIngestionEndpointResourcesInner> + beginCreateOrUpdate(String resourceUri, MetricsIngestionEndpointResourcesInner resource, Context context) { + return this.beginCreateOrUpdateAsync(resourceUri, resource, context).getSyncPoller(); + } + + /** + * Create a MetricsIngestionEndpointResources. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an ingestion endpoint for metrics relating to the parent resource on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceUri, MetricsIngestionEndpointResourcesInner resource) { + return beginCreateOrUpdateAsync(resourceUri, resource).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a MetricsIngestionEndpointResources. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an ingestion endpoint for metrics relating to the parent resource on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceUri, MetricsIngestionEndpointResourcesInner resource, Context context) { + return beginCreateOrUpdateAsync(resourceUri, resource, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a MetricsIngestionEndpointResources. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an ingestion endpoint for metrics relating to the parent resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MetricsIngestionEndpointResourcesInner createOrUpdate( + String resourceUri, MetricsIngestionEndpointResourcesInner resource) { + return createOrUpdateAsync(resourceUri, resource).block(); + } + + /** + * Create a MetricsIngestionEndpointResources. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an ingestion endpoint for metrics relating to the parent resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MetricsIngestionEndpointResourcesInner createOrUpdate( + String resourceUri, MetricsIngestionEndpointResourcesInner resource, Context context) { + return createOrUpdateAsync(resourceUri, resource, context).block(); + } + + /** + * Update a MetricsIngestionEndpointResources. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an ingestion endpoint for metrics relating to the parent resource along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync( + String resourceUri, Object properties) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceUri == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .update( + this.client.getEndpoint(), + this.client.getApiVersion(), + resourceUri, + properties, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update a MetricsIngestionEndpointResources. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an ingestion endpoint for metrics relating to the parent resource along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync( + String resourceUri, Object properties, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceUri == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .update(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, properties, accept, context); + } + + /** + * Update a MetricsIngestionEndpointResources. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an ingestion endpoint for metrics relating to the parent resource on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceUri, Object properties) { + return updateWithResponseAsync(resourceUri, properties).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Update a MetricsIngestionEndpointResources. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an ingestion endpoint for metrics relating to the parent resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse( + String resourceUri, Object properties, Context context) { + return updateWithResponseAsync(resourceUri, properties, context).block(); + } + + /** + * Update a MetricsIngestionEndpointResources. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an ingestion endpoint for metrics relating to the parent resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MetricsIngestionEndpointResourcesInner update(String resourceUri, Object properties) { + return updateWithResponse(resourceUri, properties, Context.NONE).getValue(); + } + + /** + * Delete a MetricsIngestionEndpointResources. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceUri) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceUri == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a MetricsIngestionEndpointResources. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceUri, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceUri == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, accept, context); + } + + /** + * Delete a MetricsIngestionEndpointResources. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceUri) { + Mono>> mono = deleteWithResponseAsync(resourceUri); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Delete a MetricsIngestionEndpointResources. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceUri, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(resourceUri, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Delete a MetricsIngestionEndpointResources. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceUri) { + return this.beginDeleteAsync(resourceUri).getSyncPoller(); + } + + /** + * Delete a MetricsIngestionEndpointResources. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceUri, Context context) { + return this.beginDeleteAsync(resourceUri, context).getSyncPoller(); + } + + /** + * Delete a MetricsIngestionEndpointResources. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceUri) { + return beginDeleteAsync(resourceUri).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a MetricsIngestionEndpointResources. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceUri, Context context) { + return beginDeleteAsync(resourceUri, context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a MetricsIngestionEndpointResources. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceUri) { + deleteAsync(resourceUri).block(); + } + + /** + * Delete a MetricsIngestionEndpointResources. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceUri, Context context) { + deleteAsync(resourceUri, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a MetricsIngestionEndpointResources list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a MetricsIngestionEndpointResources list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/MetricsIngestionEndpointsImpl.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/MetricsIngestionEndpointsImpl.java new file mode 100644 index 000000000000..ba82daac50bc --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/MetricsIngestionEndpointsImpl.java @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.networkanalytics.fluent.MetricsIngestionEndpointsClient; +import com.azure.resourcemanager.networkanalytics.fluent.models.MetricsIngestionEndpointResourcesInner; +import com.azure.resourcemanager.networkanalytics.models.MetricsIngestionEndpointResources; +import com.azure.resourcemanager.networkanalytics.models.MetricsIngestionEndpoints; + +public final class MetricsIngestionEndpointsImpl implements MetricsIngestionEndpoints { + private static final ClientLogger LOGGER = new ClientLogger(MetricsIngestionEndpointsImpl.class); + + private final MetricsIngestionEndpointsClient innerClient; + + private final com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager serviceManager; + + public MetricsIngestionEndpointsImpl( + MetricsIngestionEndpointsClient innerClient, + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceUri) { + PagedIterable inner = this.serviceClient().list(resourceUri); + return Utils.mapPage(inner, inner1 -> new MetricsIngestionEndpointResourcesImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceUri, Context context) { + PagedIterable inner = this.serviceClient().list(resourceUri, context); + return Utils.mapPage(inner, inner1 -> new MetricsIngestionEndpointResourcesImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceUri, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceUri, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new MetricsIngestionEndpointResourcesImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public MetricsIngestionEndpointResources get(String resourceUri) { + MetricsIngestionEndpointResourcesInner inner = this.serviceClient().get(resourceUri); + if (inner != null) { + return new MetricsIngestionEndpointResourcesImpl(inner, this.manager()); + } else { + return null; + } + } + + public MetricsIngestionEndpointResources createOrUpdate( + String resourceUri, MetricsIngestionEndpointResourcesInner resource) { + MetricsIngestionEndpointResourcesInner inner = this.serviceClient().createOrUpdate(resourceUri, resource); + if (inner != null) { + return new MetricsIngestionEndpointResourcesImpl(inner, this.manager()); + } else { + return null; + } + } + + public MetricsIngestionEndpointResources createOrUpdate( + String resourceUri, MetricsIngestionEndpointResourcesInner resource, Context context) { + MetricsIngestionEndpointResourcesInner inner = + this.serviceClient().createOrUpdate(resourceUri, resource, context); + if (inner != null) { + return new MetricsIngestionEndpointResourcesImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response updateWithResponse( + String resourceUri, Object properties, Context context) { + Response inner = + this.serviceClient().updateWithResponse(resourceUri, properties, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new MetricsIngestionEndpointResourcesImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public MetricsIngestionEndpointResources update(String resourceUri, Object properties) { + MetricsIngestionEndpointResourcesInner inner = this.serviceClient().update(resourceUri, properties); + if (inner != null) { + return new MetricsIngestionEndpointResourcesImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceUri) { + this.serviceClient().delete(resourceUri); + } + + public void delete(String resourceUri, Context context) { + this.serviceClient().delete(resourceUri, context); + } + + private MetricsIngestionEndpointsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/MicrosoftNetworkAnalyticsBuilder.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/MicrosoftNetworkAnalyticsBuilder.java new file mode 100644 index 000000000000..c86e2c38c30e --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/MicrosoftNetworkAnalyticsBuilder.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.implementation; + +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerAdapter; +import java.time.Duration; + +/** A builder for creating a new instance of the MicrosoftNetworkAnalyticsImpl type. */ +@ServiceClientBuilder(serviceClients = {MicrosoftNetworkAnalyticsImpl.class}) +public final class MicrosoftNetworkAnalyticsBuilder { + /* + * The ID of the target subscription. + */ + private String subscriptionId; + + /** + * Sets The ID of the target subscription. + * + * @param subscriptionId the subscriptionId value. + * @return the MicrosoftNetworkAnalyticsBuilder. + */ + public MicrosoftNetworkAnalyticsBuilder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /* + * server parameter + */ + private String endpoint; + + /** + * Sets server parameter. + * + * @param endpoint the endpoint value. + * @return the MicrosoftNetworkAnalyticsBuilder. + */ + public MicrosoftNetworkAnalyticsBuilder endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /* + * The environment to connect to + */ + private AzureEnvironment environment; + + /** + * Sets The environment to connect to. + * + * @param environment the environment value. + * @return the MicrosoftNetworkAnalyticsBuilder. + */ + public MicrosoftNetworkAnalyticsBuilder environment(AzureEnvironment environment) { + this.environment = environment; + return this; + } + + /* + * The HTTP pipeline to send requests through + */ + private HttpPipeline pipeline; + + /** + * Sets The HTTP pipeline to send requests through. + * + * @param pipeline the pipeline value. + * @return the MicrosoftNetworkAnalyticsBuilder. + */ + public MicrosoftNetworkAnalyticsBuilder pipeline(HttpPipeline pipeline) { + this.pipeline = pipeline; + return this; + } + + /* + * The default poll interval for long-running operation + */ + private Duration defaultPollInterval; + + /** + * Sets The default poll interval for long-running operation. + * + * @param defaultPollInterval the defaultPollInterval value. + * @return the MicrosoftNetworkAnalyticsBuilder. + */ + public MicrosoftNetworkAnalyticsBuilder defaultPollInterval(Duration defaultPollInterval) { + this.defaultPollInterval = defaultPollInterval; + return this; + } + + /* + * The serializer to serialize an object into a string + */ + private SerializerAdapter serializerAdapter; + + /** + * Sets The serializer to serialize an object into a string. + * + * @param serializerAdapter the serializerAdapter value. + * @return the MicrosoftNetworkAnalyticsBuilder. + */ + public MicrosoftNetworkAnalyticsBuilder serializerAdapter(SerializerAdapter serializerAdapter) { + this.serializerAdapter = serializerAdapter; + return this; + } + + /** + * Builds an instance of MicrosoftNetworkAnalyticsImpl with the provided parameters. + * + * @return an instance of MicrosoftNetworkAnalyticsImpl. + */ + public MicrosoftNetworkAnalyticsImpl buildClient() { + String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; + AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; + HttpPipeline localPipeline = + (pipeline != null) + ? pipeline + : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); + Duration localDefaultPollInterval = + (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); + SerializerAdapter localSerializerAdapter = + (serializerAdapter != null) + ? serializerAdapter + : SerializerFactory.createDefaultManagementSerializerAdapter(); + MicrosoftNetworkAnalyticsImpl client = + new MicrosoftNetworkAnalyticsImpl( + localPipeline, + localSerializerAdapter, + localDefaultPollInterval, + localEnvironment, + subscriptionId, + localEndpoint); + return client; + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/MicrosoftNetworkAnalyticsImpl.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/MicrosoftNetworkAnalyticsImpl.java new file mode 100644 index 000000000000..8e0bd20e8445 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/MicrosoftNetworkAnalyticsImpl.java @@ -0,0 +1,346 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.implementation; + +import com.azure.core.annotation.ServiceClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpResponse; +import com.azure.core.http.rest.Response; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.management.polling.PollerFactory; +import com.azure.core.util.Context; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.AsyncPollResponse; +import com.azure.core.util.polling.LongRunningOperationStatus; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.serializer.SerializerAdapter; +import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.networkanalytics.fluent.DataConnectorOperationsClient; +import com.azure.resourcemanager.networkanalytics.fluent.MetricsIngestionEndpointsClient; +import com.azure.resourcemanager.networkanalytics.fluent.MicrosoftNetworkAnalytics; +import com.azure.resourcemanager.networkanalytics.fluent.NetworkAnalyticsProductOperationsClient; +import com.azure.resourcemanager.networkanalytics.fluent.OperationsClient; +import com.azure.resourcemanager.networkanalytics.fluent.StoragesClient; +import java.io.IOException; +import java.lang.reflect.Type; +import java.nio.ByteBuffer; +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; +import java.time.Duration; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** Initializes a new instance of the MicrosoftNetworkAnalyticsImpl type. */ +@ServiceClient(builder = MicrosoftNetworkAnalyticsBuilder.class) +public final class MicrosoftNetworkAnalyticsImpl implements MicrosoftNetworkAnalytics { + /** The ID of the target subscription. */ + private final String subscriptionId; + + /** + * Gets The ID of the target subscription. + * + * @return the subscriptionId value. + */ + public String getSubscriptionId() { + return this.subscriptionId; + } + + /** server parameter. */ + private final String endpoint; + + /** + * Gets server parameter. + * + * @return the endpoint value. + */ + public String getEndpoint() { + return this.endpoint; + } + + /** Api Version. */ + private final String apiVersion; + + /** + * Gets Api Version. + * + * @return the apiVersion value. + */ + public String getApiVersion() { + return this.apiVersion; + } + + /** The HTTP pipeline to send requests through. */ + private final HttpPipeline httpPipeline; + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + public HttpPipeline getHttpPipeline() { + return this.httpPipeline; + } + + /** The serializer to serialize an object into a string. */ + private final SerializerAdapter serializerAdapter; + + /** + * Gets The serializer to serialize an object into a string. + * + * @return the serializerAdapter value. + */ + SerializerAdapter getSerializerAdapter() { + return this.serializerAdapter; + } + + /** The default poll interval for long-running operation. */ + private final Duration defaultPollInterval; + + /** + * Gets The default poll interval for long-running operation. + * + * @return the defaultPollInterval value. + */ + public Duration getDefaultPollInterval() { + return this.defaultPollInterval; + } + + /** The MetricsIngestionEndpointsClient object to access its operations. */ + private final MetricsIngestionEndpointsClient metricsIngestionEndpoints; + + /** + * Gets the MetricsIngestionEndpointsClient object to access its operations. + * + * @return the MetricsIngestionEndpointsClient object. + */ + public MetricsIngestionEndpointsClient getMetricsIngestionEndpoints() { + return this.metricsIngestionEndpoints; + } + + /** The OperationsClient object to access its operations. */ + private final OperationsClient operations; + + /** + * Gets the OperationsClient object to access its operations. + * + * @return the OperationsClient object. + */ + public OperationsClient getOperations() { + return this.operations; + } + + /** The DataConnectorOperationsClient object to access its operations. */ + private final DataConnectorOperationsClient dataConnectorOperations; + + /** + * Gets the DataConnectorOperationsClient object to access its operations. + * + * @return the DataConnectorOperationsClient object. + */ + public DataConnectorOperationsClient getDataConnectorOperations() { + return this.dataConnectorOperations; + } + + /** The StoragesClient object to access its operations. */ + private final StoragesClient storages; + + /** + * Gets the StoragesClient object to access its operations. + * + * @return the StoragesClient object. + */ + public StoragesClient getStorages() { + return this.storages; + } + + /** The NetworkAnalyticsProductOperationsClient object to access its operations. */ + private final NetworkAnalyticsProductOperationsClient networkAnalyticsProductOperations; + + /** + * Gets the NetworkAnalyticsProductOperationsClient object to access its operations. + * + * @return the NetworkAnalyticsProductOperationsClient object. + */ + public NetworkAnalyticsProductOperationsClient getNetworkAnalyticsProductOperations() { + return this.networkAnalyticsProductOperations; + } + + /** + * Initializes an instance of MicrosoftNetworkAnalytics client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param serializerAdapter The serializer to serialize an object into a string. + * @param defaultPollInterval The default poll interval for long-running operation. + * @param environment The Azure environment. + * @param subscriptionId The ID of the target subscription. + * @param endpoint server parameter. + */ + MicrosoftNetworkAnalyticsImpl( + HttpPipeline httpPipeline, + SerializerAdapter serializerAdapter, + Duration defaultPollInterval, + AzureEnvironment environment, + String subscriptionId, + String endpoint) { + this.httpPipeline = httpPipeline; + this.serializerAdapter = serializerAdapter; + this.defaultPollInterval = defaultPollInterval; + this.subscriptionId = subscriptionId; + this.endpoint = endpoint; + this.apiVersion = "2023-04-30"; + this.metricsIngestionEndpoints = new MetricsIngestionEndpointsClientImpl(this); + this.operations = new OperationsClientImpl(this); + this.dataConnectorOperations = new DataConnectorOperationsClientImpl(this); + this.storages = new StoragesClientImpl(this); + this.networkAnalyticsProductOperations = new NetworkAnalyticsProductOperationsClientImpl(this); + } + + /** + * Gets default client context. + * + * @return the default client context. + */ + public Context getContext() { + return Context.NONE; + } + + /** + * Merges default client context with provided context. + * + * @param context the context to be merged with default client context. + * @return the merged context. + */ + public Context mergeContext(Context context) { + return CoreUtils.mergeContexts(this.getContext(), context); + } + + /** + * Gets long running operation result. + * + * @param activationResponse the response of activation operation. + * @param httpPipeline the http pipeline. + * @param pollResultType type of poll result. + * @param finalResultType type of final result. + * @param context the context shared by all requests. + * @param type of poll result. + * @param type of final result. + * @return poller flux for poll result and final result. + */ + public PollerFlux, U> getLroResult( + Mono>> activationResponse, + HttpPipeline httpPipeline, + Type pollResultType, + Type finalResultType, + Context context) { + return PollerFactory + .create( + serializerAdapter, + httpPipeline, + pollResultType, + finalResultType, + defaultPollInterval, + activationResponse, + context); + } + + /** + * Gets the final result, or an error, based on last async poll response. + * + * @param response the last async poll response. + * @param type of poll result. + * @param type of final result. + * @return the final result, or an error. + */ + public Mono getLroFinalResultOrError(AsyncPollResponse, U> response) { + if (response.getStatus() != LongRunningOperationStatus.SUCCESSFULLY_COMPLETED) { + String errorMessage; + ManagementError managementError = null; + HttpResponse errorResponse = null; + PollResult.Error lroError = response.getValue().getError(); + if (lroError != null) { + errorResponse = + new HttpResponseImpl( + lroError.getResponseStatusCode(), lroError.getResponseHeaders(), lroError.getResponseBody()); + + errorMessage = response.getValue().getError().getMessage(); + String errorBody = response.getValue().getError().getResponseBody(); + if (errorBody != null) { + // try to deserialize error body to ManagementError + try { + managementError = + this + .getSerializerAdapter() + .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON); + if (managementError.getCode() == null || managementError.getMessage() == null) { + managementError = null; + } + } catch (IOException | RuntimeException ioe) { + LOGGER.logThrowableAsWarning(ioe); + } + } + } else { + // fallback to default error message + errorMessage = "Long running operation failed."; + } + if (managementError == null) { + // fallback to default ManagementError + managementError = new ManagementError(response.getStatus().toString(), errorMessage); + } + return Mono.error(new ManagementException(errorMessage, errorResponse, managementError)); + } else { + return response.getFinalResult(); + } + } + + private static final class HttpResponseImpl extends HttpResponse { + private final int statusCode; + + private final byte[] responseBody; + + private final HttpHeaders httpHeaders; + + HttpResponseImpl(int statusCode, HttpHeaders httpHeaders, String responseBody) { + super(null); + this.statusCode = statusCode; + this.httpHeaders = httpHeaders; + this.responseBody = responseBody == null ? null : responseBody.getBytes(StandardCharsets.UTF_8); + } + + public int getStatusCode() { + return statusCode; + } + + public String getHeaderValue(String s) { + return httpHeaders.getValue(s); + } + + public HttpHeaders getHeaders() { + return httpHeaders; + } + + public Flux getBody() { + return Flux.just(ByteBuffer.wrap(responseBody)); + } + + public Mono getBodyAsByteArray() { + return Mono.just(responseBody); + } + + public Mono getBodyAsString() { + return Mono.just(new String(responseBody, StandardCharsets.UTF_8)); + } + + public Mono getBodyAsString(Charset charset) { + return Mono.just(new String(responseBody, charset)); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(MicrosoftNetworkAnalyticsImpl.class); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/NetworkAnalyticsProductOperationsClientImpl.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/NetworkAnalyticsProductOperationsClientImpl.java new file mode 100644 index 000000000000..1c15bc856932 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/NetworkAnalyticsProductOperationsClientImpl.java @@ -0,0 +1,1373 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.networkanalytics.fluent.NetworkAnalyticsProductOperationsClient; +import com.azure.resourcemanager.networkanalytics.fluent.models.NetworkAnalyticsProductsInner; +import com.azure.resourcemanager.networkanalytics.models.NetworkAnalyticsProductsListResult; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in NetworkAnalyticsProductOperationsClient. + */ +public final class NetworkAnalyticsProductOperationsClientImpl implements NetworkAnalyticsProductOperationsClient { + /** The proxy service used to perform REST calls. */ + private final NetworkAnalyticsProductOperationsService service; + + /** The service client containing this operation class. */ + private final MicrosoftNetworkAnalyticsImpl client; + + /** + * Initializes an instance of NetworkAnalyticsProductOperationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + NetworkAnalyticsProductOperationsClientImpl(MicrosoftNetworkAnalyticsImpl client) { + this.service = + RestProxy + .create( + NetworkAnalyticsProductOperationsService.class, + client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MicrosoftNetworkAnalyticsNetworkAnalyticsProductOperations to be used + * by the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "MicrosoftNetworkAnal") + public interface NetworkAnalyticsProductOperationsService { + @Headers({"Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkAnalytics/networkAnalyticsProducts") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics" + + "/networkAnalyticsProducts") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics" + + "/networkAnalyticsProducts/default") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics" + + "/networkAnalyticsProducts/default") + @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, + @BodyParam("application/json") NetworkAnalyticsProductsInner resource, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics" + + "/networkAnalyticsProducts/default") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> update( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @BodyParam("application/json") Object properties, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics" + + "/networkAnalyticsProducts/default") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * List NetworkAnalyticsProducts resources by subscription ID. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkAnalyticsProducts list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List NetworkAnalyticsProducts resources by subscription ID. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkAnalyticsProducts list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List NetworkAnalyticsProducts resources by subscription ID. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkAnalyticsProducts list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>( + () -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * List NetworkAnalyticsProducts resources by subscription ID. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkAnalyticsProducts list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(context), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + } + + /** + * List NetworkAnalyticsProducts resources by subscription ID. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkAnalyticsProducts list operation as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * List NetworkAnalyticsProducts resources by subscription ID. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkAnalyticsProducts list operation as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * List NetworkAnalyticsProducts resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkAnalyticsProducts list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync( + String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listByResourceGroup( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List NetworkAnalyticsProducts resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkAnalyticsProducts list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync( + String resourceGroupName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroup( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List NetworkAnalyticsProducts resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkAnalyticsProducts list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * List NetworkAnalyticsProducts resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkAnalyticsProducts list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync( + String resourceGroupName, Context context) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + } + + /** + * List NetworkAnalyticsProducts resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkAnalyticsProducts list operation as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * List NetworkAnalyticsProducts resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkAnalyticsProducts list operation as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + } + + /** + * Get a NetworkAnalyticsProducts. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a NetworkAnalyticsProducts along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getByResourceGroup( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a NetworkAnalyticsProducts. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a NetworkAnalyticsProducts along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getByResourceGroup( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + accept, + context); + } + + /** + * Get a NetworkAnalyticsProducts. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a NetworkAnalyticsProducts on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName) { + return getByResourceGroupWithResponseAsync(resourceGroupName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a NetworkAnalyticsProducts. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a NetworkAnalyticsProducts along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse( + String resourceGroupName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, context).block(); + } + + /** + * Get a NetworkAnalyticsProducts. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a NetworkAnalyticsProducts. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkAnalyticsProductsInner getByResourceGroup(String resourceGroupName) { + return getByResourceGroupWithResponse(resourceGroupName, Context.NONE).getValue(); + } + + /** + * Create a NetworkAnalyticsProducts. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the network analytics product resource along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, NetworkAnalyticsProductsInner resource) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + resource, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a NetworkAnalyticsProducts. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the network analytics product resource along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, NetworkAnalyticsProductsInner resource, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + resource, + accept, + context); + } + + /** + * Create a NetworkAnalyticsProducts. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the network analytics product resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NetworkAnalyticsProductsInner> + beginCreateOrUpdateAsync(String resourceGroupName, NetworkAnalyticsProductsInner resource) { + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, resource); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + NetworkAnalyticsProductsInner.class, + NetworkAnalyticsProductsInner.class, + this.client.getContext()); + } + + /** + * Create a NetworkAnalyticsProducts. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the network analytics product resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NetworkAnalyticsProductsInner> + beginCreateOrUpdateAsync(String resourceGroupName, NetworkAnalyticsProductsInner resource, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, resource, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + NetworkAnalyticsProductsInner.class, + NetworkAnalyticsProductsInner.class, + context); + } + + /** + * Create a NetworkAnalyticsProducts. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the network analytics product resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkAnalyticsProductsInner> beginCreateOrUpdate( + String resourceGroupName, NetworkAnalyticsProductsInner resource) { + return this.beginCreateOrUpdateAsync(resourceGroupName, resource).getSyncPoller(); + } + + /** + * Create a NetworkAnalyticsProducts. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the network analytics product resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkAnalyticsProductsInner> beginCreateOrUpdate( + String resourceGroupName, NetworkAnalyticsProductsInner resource, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, resource, context).getSyncPoller(); + } + + /** + * Create a NetworkAnalyticsProducts. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the network analytics product resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, NetworkAnalyticsProductsInner resource) { + return beginCreateOrUpdateAsync(resourceGroupName, resource) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a NetworkAnalyticsProducts. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the network analytics product resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, NetworkAnalyticsProductsInner resource, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, resource, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a NetworkAnalyticsProducts. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the network analytics product resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkAnalyticsProductsInner createOrUpdate( + String resourceGroupName, NetworkAnalyticsProductsInner resource) { + return createOrUpdateAsync(resourceGroupName, resource).block(); + } + + /** + * Create a NetworkAnalyticsProducts. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the network analytics product resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkAnalyticsProductsInner createOrUpdate( + String resourceGroupName, NetworkAnalyticsProductsInner resource, Context context) { + return createOrUpdateAsync(resourceGroupName, resource, context).block(); + } + + /** + * Update a NetworkAnalyticsProducts. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the network analytics product resource along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync( + String resourceGroupName, Object properties) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .update( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + properties, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update a NetworkAnalyticsProducts. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the network analytics product resource along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync( + String resourceGroupName, Object properties, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .update( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + properties, + accept, + context); + } + + /** + * Update a NetworkAnalyticsProducts. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the network analytics product resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, Object properties) { + return updateWithResponseAsync(resourceGroupName, properties).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Update a NetworkAnalyticsProducts. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the network analytics product resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse( + String resourceGroupName, Object properties, Context context) { + return updateWithResponseAsync(resourceGroupName, properties, context).block(); + } + + /** + * Update a NetworkAnalyticsProducts. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the network analytics product resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkAnalyticsProductsInner update(String resourceGroupName, Object properties) { + return updateWithResponse(resourceGroupName, properties, Context.NONE).getValue(); + } + + /** + * Delete a NetworkAnalyticsProducts. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a NetworkAnalyticsProducts. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + accept, + context); + } + + /** + * Delete a NetworkAnalyticsProducts. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Delete a NetworkAnalyticsProducts. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Delete a NetworkAnalyticsProducts. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName) { + return this.beginDeleteAsync(resourceGroupName).getSyncPoller(); + } + + /** + * Delete a NetworkAnalyticsProducts. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, Context context) { + return this.beginDeleteAsync(resourceGroupName, context).getSyncPoller(); + } + + /** + * Delete a NetworkAnalyticsProducts. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName) { + return beginDeleteAsync(resourceGroupName).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a NetworkAnalyticsProducts. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, Context context) { + return beginDeleteAsync(resourceGroupName, context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a NetworkAnalyticsProducts. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName) { + deleteAsync(resourceGroupName).block(); + } + + /** + * Delete a NetworkAnalyticsProducts. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, Context context) { + deleteAsync(resourceGroupName, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

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

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

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

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkAnalyticsProducts list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/NetworkAnalyticsProductOperationsImpl.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/NetworkAnalyticsProductOperationsImpl.java new file mode 100644 index 000000000000..23e9c2b9b2f8 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/NetworkAnalyticsProductOperationsImpl.java @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.networkanalytics.fluent.NetworkAnalyticsProductOperationsClient; +import com.azure.resourcemanager.networkanalytics.fluent.models.NetworkAnalyticsProductsInner; +import com.azure.resourcemanager.networkanalytics.models.NetworkAnalyticsProductOperations; +import com.azure.resourcemanager.networkanalytics.models.NetworkAnalyticsProducts; + +public final class NetworkAnalyticsProductOperationsImpl implements NetworkAnalyticsProductOperations { + private static final ClientLogger LOGGER = new ClientLogger(NetworkAnalyticsProductOperationsImpl.class); + + private final NetworkAnalyticsProductOperationsClient innerClient; + + private final com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager serviceManager; + + public NetworkAnalyticsProductOperationsImpl( + NetworkAnalyticsProductOperationsClient innerClient, + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return Utils.mapPage(inner, inner1 -> new NetworkAnalyticsProductsImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return Utils.mapPage(inner, inner1 -> new NetworkAnalyticsProductsImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = + this.serviceClient().listByResourceGroup(resourceGroupName); + return Utils.mapPage(inner, inner1 -> new NetworkAnalyticsProductsImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = + this.serviceClient().listByResourceGroup(resourceGroupName, context); + return Utils.mapPage(inner, inner1 -> new NetworkAnalyticsProductsImpl(inner1, this.manager())); + } + + public Response getByResourceGroupWithResponse( + String resourceGroupName, Context context) { + Response inner = + this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new NetworkAnalyticsProductsImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public NetworkAnalyticsProducts getByResourceGroup(String resourceGroupName) { + NetworkAnalyticsProductsInner inner = this.serviceClient().getByResourceGroup(resourceGroupName); + if (inner != null) { + return new NetworkAnalyticsProductsImpl(inner, this.manager()); + } else { + return null; + } + } + + public NetworkAnalyticsProducts createOrUpdate(String resourceGroupName, NetworkAnalyticsProductsInner resource) { + NetworkAnalyticsProductsInner inner = this.serviceClient().createOrUpdate(resourceGroupName, resource); + if (inner != null) { + return new NetworkAnalyticsProductsImpl(inner, this.manager()); + } else { + return null; + } + } + + public NetworkAnalyticsProducts createOrUpdate( + String resourceGroupName, NetworkAnalyticsProductsInner resource, Context context) { + NetworkAnalyticsProductsInner inner = this.serviceClient().createOrUpdate(resourceGroupName, resource, context); + if (inner != null) { + return new NetworkAnalyticsProductsImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response updateWithResponse( + String resourceGroupName, Object properties, Context context) { + Response inner = + this.serviceClient().updateWithResponse(resourceGroupName, properties, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new NetworkAnalyticsProductsImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public NetworkAnalyticsProducts update(String resourceGroupName, Object properties) { + NetworkAnalyticsProductsInner inner = this.serviceClient().update(resourceGroupName, properties); + if (inner != null) { + return new NetworkAnalyticsProductsImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName) { + this.serviceClient().delete(resourceGroupName); + } + + public void delete(String resourceGroupName, Context context) { + this.serviceClient().delete(resourceGroupName, context); + } + + private NetworkAnalyticsProductOperationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/NetworkAnalyticsProductsImpl.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/NetworkAnalyticsProductsImpl.java new file mode 100644 index 000000000000..a98292acbbc3 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/NetworkAnalyticsProductsImpl.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.networkanalytics.fluent.models.NetworkAnalyticsProductsInner; +import com.azure.resourcemanager.networkanalytics.models.NetworkAnalyticsProductInformation; +import com.azure.resourcemanager.networkanalytics.models.NetworkAnalyticsProducts; +import com.azure.resourcemanager.networkanalytics.models.ProvisioningState; + +public final class NetworkAnalyticsProductsImpl implements NetworkAnalyticsProducts { + private NetworkAnalyticsProductsInner innerObject; + + private final com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager serviceManager; + + NetworkAnalyticsProductsImpl( + NetworkAnalyticsProductsInner innerObject, + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public NetworkAnalyticsProductInformation networkAnalyticsProductInformation() { + return this.innerModel().networkAnalyticsProductInformation(); + } + + public NetworkAnalyticsProductsInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/OperationImpl.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/OperationImpl.java new file mode 100644 index 000000000000..0acaf250ed94 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/OperationImpl.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.implementation; + +import com.azure.resourcemanager.networkanalytics.fluent.models.OperationInner; +import com.azure.resourcemanager.networkanalytics.models.ActionType; +import com.azure.resourcemanager.networkanalytics.models.Operation; +import com.azure.resourcemanager.networkanalytics.models.OperationDisplay; +import com.azure.resourcemanager.networkanalytics.models.Origin; + +public final class OperationImpl implements Operation { + private OperationInner innerObject; + + private final com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager serviceManager; + + OperationImpl( + OperationInner innerObject, com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String name() { + return this.innerModel().name(); + } + + public Boolean isDataAction() { + return this.innerModel().isDataAction(); + } + + public OperationDisplay display() { + return this.innerModel().display(); + } + + public Origin origin() { + return this.innerModel().origin(); + } + + public ActionType actionType() { + return this.innerModel().actionType(); + } + + public OperationInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/OperationsClientImpl.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/OperationsClientImpl.java new file mode 100644 index 000000000000..9bd22e50d224 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/OperationsClientImpl.java @@ -0,0 +1,276 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.networkanalytics.fluent.OperationsClient; +import com.azure.resourcemanager.networkanalytics.fluent.models.OperationInner; +import com.azure.resourcemanager.networkanalytics.models.OperationListResult; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in OperationsClient. */ +public final class OperationsClientImpl implements OperationsClient { + /** The proxy service used to perform REST calls. */ + private final OperationsService service; + + /** The service client containing this operation class. */ + private final MicrosoftNetworkAnalyticsImpl client; + + /** + * Initializes an instance of OperationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + OperationsClientImpl(MicrosoftNetworkAnalyticsImpl client) { + this.service = + RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MicrosoftNetworkAnalyticsOperations to be used by the proxy service + * to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "MicrosoftNetworkAnal") + public interface OperationsService { + @Headers({"Content-Type: application/json"}) + @Get("/providers/Microsoft.NetworkAnalytics/operations") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * List the operations for the provider. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List the operations for the provider. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List the operations for the provider. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link + * PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List the operations for the provider. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link + * PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List the operations for the provider. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * List the operations for the provider. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/OperationsImpl.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/OperationsImpl.java new file mode 100644 index 000000000000..5827d4f4f069 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/OperationsImpl.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.networkanalytics.fluent.OperationsClient; +import com.azure.resourcemanager.networkanalytics.fluent.models.OperationInner; +import com.azure.resourcemanager.networkanalytics.models.Operation; +import com.azure.resourcemanager.networkanalytics.models.Operations; + +public final class OperationsImpl implements Operations { + private static final ClientLogger LOGGER = new ClientLogger(OperationsImpl.class); + + private final OperationsClient innerClient; + + private final com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager serviceManager; + + public OperationsImpl( + OperationsClient innerClient, + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); + } + + private OperationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/StoragesClientImpl.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/StoragesClientImpl.java new file mode 100644 index 000000000000..c41fd6152eae --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/StoragesClientImpl.java @@ -0,0 +1,1439 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.networkanalytics.fluent.StoragesClient; +import com.azure.resourcemanager.networkanalytics.fluent.models.DataLakeHouseResourcesInner; +import com.azure.resourcemanager.networkanalytics.models.DataLakeHouseResourcesListResult; +import com.azure.resourcemanager.networkanalytics.models.DataLakeHouseResourcesUpdate; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in StoragesClient. */ +public final class StoragesClientImpl implements StoragesClient { + /** The proxy service used to perform REST calls. */ + private final StoragesService service; + + /** The service client containing this operation class. */ + private final MicrosoftNetworkAnalyticsImpl client; + + /** + * Initializes an instance of StoragesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + StoragesClientImpl(MicrosoftNetworkAnalyticsImpl client) { + this.service = RestProxy.create(StoragesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MicrosoftNetworkAnalyticsStorages to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "MicrosoftNetworkAnal") + public interface StoragesService { + @Headers({"Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetworkAnalytics/dataLakeHouses") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics" + + "/dataLakeHouses") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics" + + "/dataLakeHouses/{storageName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("storageName") String storageName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics" + + "/dataLakeHouses/{storageName}") + @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("storageName") String storageName, + @BodyParam("application/json") DataLakeHouseResourcesInner resource, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics" + + "/dataLakeHouses/{storageName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> update( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("storageName") String storageName, + @BodyParam("application/json") DataLakeHouseResourcesUpdate properties, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics" + + "/dataLakeHouses/{storageName}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("storageName") String storageName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * List DataLakeHouseResources resources by subscription ID. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataLakeHouseResources list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List DataLakeHouseResources resources by subscription ID. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataLakeHouseResources list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List DataLakeHouseResources resources by subscription ID. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataLakeHouseResources list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>( + () -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * List DataLakeHouseResources resources by subscription ID. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataLakeHouseResources list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(context), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + } + + /** + * List DataLakeHouseResources resources by subscription ID. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataLakeHouseResources list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * List DataLakeHouseResources resources by subscription ID. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataLakeHouseResources list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * List DataLakeHouseResources resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataLakeHouseResources list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync( + String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listByResourceGroup( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List DataLakeHouseResources resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataLakeHouseResources list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync( + String resourceGroupName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroup( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List DataLakeHouseResources resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataLakeHouseResources list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * List DataLakeHouseResources resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataLakeHouseResources list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + } + + /** + * List DataLakeHouseResources resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataLakeHouseResources list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * List DataLakeHouseResources resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataLakeHouseResources list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + } + + /** + * Get a DataLakeHouseResources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageName The data lake house resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DataLakeHouseResources along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String storageName) { + 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 (storageName == null) { + return Mono.error(new IllegalArgumentException("Parameter storageName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getByResourceGroup( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + storageName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a DataLakeHouseResources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageName The data lake house resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DataLakeHouseResources along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String storageName, 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 (storageName == null) { + return Mono.error(new IllegalArgumentException("Parameter storageName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getByResourceGroup( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + storageName, + accept, + context); + } + + /** + * Get a DataLakeHouseResources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageName The data lake house resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DataLakeHouseResources on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String storageName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, storageName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a DataLakeHouseResources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageName The data lake house resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DataLakeHouseResources along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse( + String resourceGroupName, String storageName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, storageName, context).block(); + } + + /** + * Get a DataLakeHouseResources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageName The data lake house resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DataLakeHouseResources. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DataLakeHouseResourcesInner getByResourceGroup(String resourceGroupName, String storageName) { + return getByResourceGroupWithResponse(resourceGroupName, storageName, Context.NONE).getValue(); + } + + /** + * Create a DataLakeHouseResources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageName The data lake house resource name. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data lake house resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String storageName, DataLakeHouseResourcesInner resource) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (storageName == null) { + return Mono.error(new IllegalArgumentException("Parameter storageName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + storageName, + resource, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a DataLakeHouseResources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageName The data lake house resource name. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data lake house resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String storageName, DataLakeHouseResourcesInner resource, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (storageName == null) { + return Mono.error(new IllegalArgumentException("Parameter storageName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + storageName, + resource, + accept, + context); + } + + /** + * Create a DataLakeHouseResources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageName The data lake house resource name. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the data lake house resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, DataLakeHouseResourcesInner> beginCreateOrUpdateAsync( + String resourceGroupName, String storageName, DataLakeHouseResourcesInner resource) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, storageName, resource); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + DataLakeHouseResourcesInner.class, + DataLakeHouseResourcesInner.class, + this.client.getContext()); + } + + /** + * Create a DataLakeHouseResources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageName The data lake house resource name. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the data lake house resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, DataLakeHouseResourcesInner> beginCreateOrUpdateAsync( + String resourceGroupName, String storageName, DataLakeHouseResourcesInner resource, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, storageName, resource, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + DataLakeHouseResourcesInner.class, + DataLakeHouseResourcesInner.class, + context); + } + + /** + * Create a DataLakeHouseResources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageName The data lake house resource name. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the data lake house resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, DataLakeHouseResourcesInner> beginCreateOrUpdate( + String resourceGroupName, String storageName, DataLakeHouseResourcesInner resource) { + return this.beginCreateOrUpdateAsync(resourceGroupName, storageName, resource).getSyncPoller(); + } + + /** + * Create a DataLakeHouseResources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageName The data lake house resource name. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the data lake house resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, DataLakeHouseResourcesInner> beginCreateOrUpdate( + String resourceGroupName, String storageName, DataLakeHouseResourcesInner resource, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, storageName, resource, context).getSyncPoller(); + } + + /** + * Create a DataLakeHouseResources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageName The data lake house resource name. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data lake house resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String storageName, DataLakeHouseResourcesInner resource) { + return beginCreateOrUpdateAsync(resourceGroupName, storageName, resource) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a DataLakeHouseResources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageName The data lake house resource name. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data lake house resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String storageName, DataLakeHouseResourcesInner resource, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, storageName, resource, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a DataLakeHouseResources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageName The data lake house resource name. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data lake house resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DataLakeHouseResourcesInner createOrUpdate( + String resourceGroupName, String storageName, DataLakeHouseResourcesInner resource) { + return createOrUpdateAsync(resourceGroupName, storageName, resource).block(); + } + + /** + * Create a DataLakeHouseResources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageName The data lake house resource name. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data lake house resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DataLakeHouseResourcesInner createOrUpdate( + String resourceGroupName, String storageName, DataLakeHouseResourcesInner resource, Context context) { + return createOrUpdateAsync(resourceGroupName, storageName, resource, context).block(); + } + + /** + * Update a DataLakeHouseResources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageName The data lake house resource name. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data lake house resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync( + String resourceGroupName, String storageName, DataLakeHouseResourcesUpdate properties) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (storageName == null) { + return Mono.error(new IllegalArgumentException("Parameter storageName is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .update( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + storageName, + properties, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update a DataLakeHouseResources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageName The data lake house resource name. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data lake house resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync( + String resourceGroupName, String storageName, DataLakeHouseResourcesUpdate properties, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (storageName == null) { + return Mono.error(new IllegalArgumentException("Parameter storageName is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .update( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + storageName, + properties, + accept, + context); + } + + /** + * Update a DataLakeHouseResources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageName The data lake house resource name. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data lake house resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, String storageName, DataLakeHouseResourcesUpdate properties) { + return updateWithResponseAsync(resourceGroupName, storageName, properties) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Update a DataLakeHouseResources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageName The data lake house resource name. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data lake house resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse( + String resourceGroupName, String storageName, DataLakeHouseResourcesUpdate properties, Context context) { + return updateWithResponseAsync(resourceGroupName, storageName, properties, context).block(); + } + + /** + * Update a DataLakeHouseResources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageName The data lake house resource name. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the data lake house resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DataLakeHouseResourcesInner update( + String resourceGroupName, String storageName, DataLakeHouseResourcesUpdate properties) { + return updateWithResponse(resourceGroupName, storageName, properties, Context.NONE).getValue(); + } + + /** + * Delete a DataLakeHouseResources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageName The data lake house resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String storageName) { + 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 (storageName == null) { + return Mono.error(new IllegalArgumentException("Parameter storageName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + storageName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a DataLakeHouseResources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageName The data lake house resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String storageName, 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 (storageName == null) { + return Mono.error(new IllegalArgumentException("Parameter storageName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + storageName, + accept, + context); + } + + /** + * Delete a DataLakeHouseResources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageName The data lake house resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String storageName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, storageName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Delete a DataLakeHouseResources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageName The data lake house resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String storageName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, storageName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Delete a DataLakeHouseResources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageName The data lake house resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String storageName) { + return this.beginDeleteAsync(resourceGroupName, storageName).getSyncPoller(); + } + + /** + * Delete a DataLakeHouseResources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageName The data lake house resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String storageName, Context context) { + return this.beginDeleteAsync(resourceGroupName, storageName, context).getSyncPoller(); + } + + /** + * Delete a DataLakeHouseResources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageName The data lake house resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String storageName) { + return beginDeleteAsync(resourceGroupName, storageName).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a DataLakeHouseResources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageName The data lake house resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String storageName, Context context) { + return beginDeleteAsync(resourceGroupName, storageName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a DataLakeHouseResources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageName The data lake house resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String storageName) { + deleteAsync(resourceGroupName, storageName).block(); + } + + /** + * Delete a DataLakeHouseResources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageName The data lake house resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String storageName, Context context) { + deleteAsync(resourceGroupName, storageName, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

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

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

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

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataLakeHouseResources list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/StoragesImpl.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/StoragesImpl.java new file mode 100644 index 000000000000..ea52b2c04de3 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/StoragesImpl.java @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.networkanalytics.fluent.StoragesClient; +import com.azure.resourcemanager.networkanalytics.fluent.models.DataLakeHouseResourcesInner; +import com.azure.resourcemanager.networkanalytics.models.DataLakeHouseResources; +import com.azure.resourcemanager.networkanalytics.models.Storages; + +public final class StoragesImpl implements Storages { + private static final ClientLogger LOGGER = new ClientLogger(StoragesImpl.class); + + private final StoragesClient innerClient; + + private final com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager serviceManager; + + public StoragesImpl( + StoragesClient innerClient, com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return Utils.mapPage(inner, inner1 -> new DataLakeHouseResourcesImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return Utils.mapPage(inner, inner1 -> new DataLakeHouseResourcesImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return Utils.mapPage(inner, inner1 -> new DataLakeHouseResourcesImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = + this.serviceClient().listByResourceGroup(resourceGroupName, context); + return Utils.mapPage(inner, inner1 -> new DataLakeHouseResourcesImpl(inner1, this.manager())); + } + + public Response getByResourceGroupWithResponse( + String resourceGroupName, String storageName, Context context) { + Response inner = + this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, storageName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new DataLakeHouseResourcesImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public DataLakeHouseResources getByResourceGroup(String resourceGroupName, String storageName) { + DataLakeHouseResourcesInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, storageName); + if (inner != null) { + return new DataLakeHouseResourcesImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String storageName) { + this.serviceClient().delete(resourceGroupName, storageName); + } + + public void delete(String resourceGroupName, String storageName, Context context) { + this.serviceClient().delete(resourceGroupName, storageName, context); + } + + public DataLakeHouseResources 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 storageName = Utils.getValueFromIdByName(id, "dataLakeHouses"); + if (storageName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'dataLakeHouses'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, storageName, 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 storageName = Utils.getValueFromIdByName(id, "dataLakeHouses"); + if (storageName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'dataLakeHouses'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, storageName, 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 storageName = Utils.getValueFromIdByName(id, "dataLakeHouses"); + if (storageName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'dataLakeHouses'.", id))); + } + this.delete(resourceGroupName, storageName, 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 storageName = Utils.getValueFromIdByName(id, "dataLakeHouses"); + if (storageName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'dataLakeHouses'.", id))); + } + this.delete(resourceGroupName, storageName, context); + } + + private StoragesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager() { + return this.serviceManager; + } + + public DataLakeHouseResourcesImpl define(String name) { + return new DataLakeHouseResourcesImpl(name, this.manager()); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/Utils.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/Utils.java new file mode 100644 index 000000000000..adc579b7f0ae --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/Utils.java @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.implementation; + +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.util.CoreUtils; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; +import java.util.function.Function; +import java.util.stream.Collectors; +import java.util.stream.Stream; +import reactor.core.publisher.Flux; + +final class Utils { + static String getValueFromIdByName(String id, String name) { + if (id == null) { + return null; + } + Iterator itr = Arrays.stream(id.split("/")).iterator(); + while (itr.hasNext()) { + String part = itr.next(); + if (part != null && !part.trim().isEmpty()) { + if (part.equalsIgnoreCase(name)) { + if (itr.hasNext()) { + return itr.next(); + } else { + return null; + } + } + } + } + return null; + } + + static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) { + if (id == null || pathTemplate == null) { + return null; + } + String parameterNameParentheses = "{" + parameterName + "}"; + List idSegmentsReverted = Arrays.asList(id.split("/")); + List pathSegments = Arrays.asList(pathTemplate.split("/")); + Collections.reverse(idSegmentsReverted); + Iterator idItrReverted = idSegmentsReverted.iterator(); + int pathIndex = pathSegments.size(); + while (idItrReverted.hasNext() && pathIndex > 0) { + String idSegment = idItrReverted.next(); + String pathSegment = pathSegments.get(--pathIndex); + if (!CoreUtils.isNullOrEmpty(idSegment) && !CoreUtils.isNullOrEmpty(pathSegment)) { + if (pathSegment.equalsIgnoreCase(parameterNameParentheses)) { + if (pathIndex == 0 || (pathIndex == 1 && pathSegments.get(0).isEmpty())) { + List segments = new ArrayList<>(); + segments.add(idSegment); + idItrReverted.forEachRemaining(segments::add); + Collections.reverse(segments); + if (segments.size() > 0 && segments.get(0).isEmpty()) { + segments.remove(0); + } + return String.join("/", segments); + } else { + return idSegment; + } + } + } + } + return null; + } + + static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) { + return new PagedIterableImpl(pageIterable, mapper); + } + + private static final class PagedIterableImpl extends PagedIterable { + + private final PagedIterable pagedIterable; + private final Function mapper; + private final Function, PagedResponse> pageMapper; + + private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) { + super( + PagedFlux + .create( + () -> + (continuationToken, pageSize) -> + Flux.fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); + this.pagedIterable = pagedIterable; + this.mapper = mapper; + this.pageMapper = getPageMapper(mapper); + } + + private static Function, PagedResponse> getPageMapper(Function mapper) { + return page -> + new PagedResponseBase( + page.getRequest(), + page.getStatusCode(), + page.getHeaders(), + page.getElements().stream().map(mapper).collect(Collectors.toList()), + page.getContinuationToken(), + null); + } + + @Override + public Stream stream() { + return pagedIterable.stream().map(mapper); + } + + @Override + public Stream> streamByPage() { + return pagedIterable.streamByPage().map(pageMapper); + } + + @Override + public Stream> streamByPage(String continuationToken) { + return pagedIterable.streamByPage(continuationToken).map(pageMapper); + } + + @Override + public Stream> streamByPage(int preferredPageSize) { + return pagedIterable.streamByPage(preferredPageSize).map(pageMapper); + } + + @Override + public Stream> streamByPage(String continuationToken, int preferredPageSize) { + return pagedIterable.streamByPage(continuationToken, preferredPageSize).map(pageMapper); + } + + @Override + public Iterator iterator() { + return new IteratorImpl(pagedIterable.iterator(), mapper); + } + + @Override + public Iterable> iterableByPage() { + return new IterableImpl, PagedResponse>(pagedIterable.iterableByPage(), pageMapper); + } + + @Override + public Iterable> iterableByPage(String continuationToken) { + return new IterableImpl, PagedResponse>( + pagedIterable.iterableByPage(continuationToken), pageMapper); + } + + @Override + public Iterable> iterableByPage(int preferredPageSize) { + return new IterableImpl, PagedResponse>( + pagedIterable.iterableByPage(preferredPageSize), pageMapper); + } + + @Override + public Iterable> iterableByPage(String continuationToken, int preferredPageSize) { + return new IterableImpl, PagedResponse>( + pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); + } + } + + private static final class IteratorImpl implements Iterator { + + private final Iterator iterator; + private final Function mapper; + + private IteratorImpl(Iterator iterator, Function mapper) { + this.iterator = iterator; + this.mapper = mapper; + } + + @Override + public boolean hasNext() { + return iterator.hasNext(); + } + + @Override + public S next() { + return mapper.apply(iterator.next()); + } + + @Override + public void remove() { + iterator.remove(); + } + } + + private static final class IterableImpl implements Iterable { + + private final Iterable iterable; + private final Function mapper; + + private IterableImpl(Iterable iterable, Function mapper) { + this.iterable = iterable; + this.mapper = mapper; + } + + @Override + public Iterator iterator() { + return new IteratorImpl(iterable.iterator(), mapper); + } + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/package-info.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/package-info.java new file mode 100644 index 000000000000..48adaf48c436 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/implementation/package-info.java @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** Package containing the implementations for MicrosoftNetworkAnalytics. null. */ +package com.azure.resourcemanager.networkanalytics.implementation; diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/ActionType.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/ActionType.java new file mode 100644 index 000000000000..5f79669576bb --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/ActionType.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */ +public final class ActionType extends ExpandableStringEnum { + /** Static value Internal for ActionType. */ + public static final ActionType INTERNAL = fromString("Internal"); + + /** + * Creates a new instance of ActionType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ActionType() { + } + + /** + * Creates or finds a ActionType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ActionType. + */ + @JsonCreator + public static ActionType fromString(String name) { + return fromString(name, ActionType.class); + } + + /** + * Gets known ActionType values. + * + * @return known ActionType values. + */ + public static Collection values() { + return values(ActionType.class); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/AzureDataExplorerProperties.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/AzureDataExplorerProperties.java new file mode 100644 index 000000000000..20d39f14022f --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/AzureDataExplorerProperties.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** ADx Properties. */ +@Fluent +public final class AzureDataExplorerProperties { + /* + * Virtual Network Configuration + */ + @JsonProperty(value = "virtualNetworkConfiguration") + private VirtualNetworkConfiguration virtualNetworkConfiguration; + + /* + * Kusto Cluster Principal Assignments + */ + @JsonProperty(value = "kustoClusterPrincipalAssignments", required = true) + private KustoClusterPrincipalAssignments kustoClusterPrincipalAssignments; + + /** Creates an instance of AzureDataExplorerProperties class. */ + public AzureDataExplorerProperties() { + } + + /** + * Get the virtualNetworkConfiguration property: Virtual Network Configuration. + * + * @return the virtualNetworkConfiguration value. + */ + public VirtualNetworkConfiguration virtualNetworkConfiguration() { + return this.virtualNetworkConfiguration; + } + + /** + * Set the virtualNetworkConfiguration property: Virtual Network Configuration. + * + * @param virtualNetworkConfiguration the virtualNetworkConfiguration value to set. + * @return the AzureDataExplorerProperties object itself. + */ + public AzureDataExplorerProperties withVirtualNetworkConfiguration( + VirtualNetworkConfiguration virtualNetworkConfiguration) { + this.virtualNetworkConfiguration = virtualNetworkConfiguration; + return this; + } + + /** + * Get the kustoClusterPrincipalAssignments property: Kusto Cluster Principal Assignments. + * + * @return the kustoClusterPrincipalAssignments value. + */ + public KustoClusterPrincipalAssignments kustoClusterPrincipalAssignments() { + return this.kustoClusterPrincipalAssignments; + } + + /** + * Set the kustoClusterPrincipalAssignments property: Kusto Cluster Principal Assignments. + * + * @param kustoClusterPrincipalAssignments the kustoClusterPrincipalAssignments value to set. + * @return the AzureDataExplorerProperties object itself. + */ + public AzureDataExplorerProperties withKustoClusterPrincipalAssignments( + KustoClusterPrincipalAssignments kustoClusterPrincipalAssignments) { + this.kustoClusterPrincipalAssignments = kustoClusterPrincipalAssignments; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (virtualNetworkConfiguration() != null) { + virtualNetworkConfiguration().validate(); + } + if (kustoClusterPrincipalAssignments() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property kustoClusterPrincipalAssignments in model" + + " AzureDataExplorerProperties")); + } else { + kustoClusterPrincipalAssignments().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AzureDataExplorerProperties.class); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/BlobServices.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/BlobServices.java new file mode 100644 index 000000000000..e2b168f67da0 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/BlobServices.java @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Configuration for creating Blob Service. */ +@Fluent +public final class BlobServices { + /* + * Restore Policy + */ + @JsonProperty(value = "restorePolicy", required = true) + private RestorePolicy restorePolicy; + + /** Creates an instance of BlobServices class. */ + public BlobServices() { + } + + /** + * Get the restorePolicy property: Restore Policy. + * + * @return the restorePolicy value. + */ + public RestorePolicy restorePolicy() { + return this.restorePolicy; + } + + /** + * Set the restorePolicy property: Restore Policy. + * + * @param restorePolicy the restorePolicy value to set. + * @return the BlobServices object itself. + */ + public BlobServices withRestorePolicy(RestorePolicy restorePolicy) { + this.restorePolicy = restorePolicy; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (restorePolicy() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property restorePolicy in model BlobServices")); + } else { + restorePolicy().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(BlobServices.class); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/BronzeStorageAccountProperties.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/BronzeStorageAccountProperties.java new file mode 100644 index 000000000000..221e1d1b74d5 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/BronzeStorageAccountProperties.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Configuration for BronzeAccount. */ +@Fluent +public final class BronzeStorageAccountProperties { + /* + * Enables Secure File Transfer Protocol, if set to true + */ + @JsonProperty(value = "isSftpEnabled", required = true) + private boolean isSftpEnabled; + + /** Creates an instance of BronzeStorageAccountProperties class. */ + public BronzeStorageAccountProperties() { + } + + /** + * Get the isSftpEnabled property: Enables Secure File Transfer Protocol, if set to true. + * + * @return the isSftpEnabled value. + */ + public boolean isSftpEnabled() { + return this.isSftpEnabled; + } + + /** + * Set the isSftpEnabled property: Enables Secure File Transfer Protocol, if set to true. + * + * @param isSftpEnabled the isSftpEnabled value to set. + * @return the BronzeStorageAccountProperties object itself. + */ + public BronzeStorageAccountProperties withIsSftpEnabled(boolean isSftpEnabled) { + this.isSftpEnabled = isSftpEnabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/Bypass.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/Bypass.java new file mode 100644 index 000000000000..d3ff0a280681 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/Bypass.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for Bypass. */ +public final class Bypass extends ExpandableStringEnum { + /** Static value None for Bypass. */ + public static final Bypass NONE = fromString("None"); + + /** Static value Logging for Bypass. */ + public static final Bypass LOGGING = fromString("Logging"); + + /** Static value Metrics for Bypass. */ + public static final Bypass METRICS = fromString("Metrics"); + + /** Static value AzureServices for Bypass. */ + public static final Bypass AZURE_SERVICES = fromString("AzureServices"); + + /** + * Creates a new instance of Bypass value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Bypass() { + } + + /** + * Creates or finds a Bypass from its string representation. + * + * @param name a name to look for. + * @return the corresponding Bypass. + */ + @JsonCreator + public static Bypass fromString(String name) { + return fromString(name, Bypass.class); + } + + /** + * Gets known Bypass values. + * + * @return known Bypass values. + */ + public static Collection values() { + return values(Bypass.class); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/CommonStorageAccountProperties.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/CommonStorageAccountProperties.java new file mode 100644 index 000000000000..5032c0ce734f --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/CommonStorageAccountProperties.java @@ -0,0 +1,137 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Common Storage Account Properties. */ +@Fluent +public final class CommonStorageAccountProperties { + /* + * Allow or disallow public network access to Storage Account. + */ + @JsonProperty(value = "publicNetworkAccess") + private String publicNetworkAccess; + + /* + * Network rule set + */ + @JsonProperty(value = "networkacls") + private NetworkAcls networkacls; + + /* + * Blob Services + */ + @JsonProperty(value = "blobServices") + private BlobServices blobServices; + + /* + * Private End Point + */ + @JsonProperty(value = "privateEndPoint") + private PrivateEndPoint privateEndPoint; + + /** Creates an instance of CommonStorageAccountProperties class. */ + public CommonStorageAccountProperties() { + } + + /** + * Get the publicNetworkAccess property: Allow or disallow public network access to Storage Account. + * + * @return the publicNetworkAccess value. + */ + public String publicNetworkAccess() { + return this.publicNetworkAccess; + } + + /** + * Set the publicNetworkAccess property: Allow or disallow public network access to Storage Account. + * + * @param publicNetworkAccess the publicNetworkAccess value to set. + * @return the CommonStorageAccountProperties object itself. + */ + public CommonStorageAccountProperties withPublicNetworkAccess(String publicNetworkAccess) { + this.publicNetworkAccess = publicNetworkAccess; + return this; + } + + /** + * Get the networkacls property: Network rule set. + * + * @return the networkacls value. + */ + public NetworkAcls networkacls() { + return this.networkacls; + } + + /** + * Set the networkacls property: Network rule set. + * + * @param networkacls the networkacls value to set. + * @return the CommonStorageAccountProperties object itself. + */ + public CommonStorageAccountProperties withNetworkacls(NetworkAcls networkacls) { + this.networkacls = networkacls; + return this; + } + + /** + * Get the blobServices property: Blob Services. + * + * @return the blobServices value. + */ + public BlobServices blobServices() { + return this.blobServices; + } + + /** + * Set the blobServices property: Blob Services. + * + * @param blobServices the blobServices value to set. + * @return the CommonStorageAccountProperties object itself. + */ + public CommonStorageAccountProperties withBlobServices(BlobServices blobServices) { + this.blobServices = blobServices; + return this; + } + + /** + * Get the privateEndPoint property: Private End Point. + * + * @return the privateEndPoint value. + */ + public PrivateEndPoint privateEndPoint() { + return this.privateEndPoint; + } + + /** + * Set the privateEndPoint property: Private End Point. + * + * @param privateEndPoint the privateEndPoint value to set. + * @return the CommonStorageAccountProperties object itself. + */ + public CommonStorageAccountProperties withPrivateEndPoint(PrivateEndPoint privateEndPoint) { + this.privateEndPoint = privateEndPoint; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (networkacls() != null) { + networkacls().validate(); + } + if (blobServices() != null) { + blobServices().validate(); + } + if (privateEndPoint() != null) { + privateEndPoint().validate(); + } + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/ComputeConfiguration.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/ComputeConfiguration.java new file mode 100644 index 000000000000..0bafb401dd9a --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/ComputeConfiguration.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The compute configuration. */ +@Fluent +public final class ComputeConfiguration { + /* + * The alert email in case of a failure + */ + @JsonProperty(value = "failureAlertEmail") + private String failureAlertEmail; + + /* + * The data throughput speed in mbps. The accepted values are: 10, 100, 300, 500, 1024 + */ + @JsonProperty(value = "throughput", required = true) + private int throughput; + + /** Creates an instance of ComputeConfiguration class. */ + public ComputeConfiguration() { + } + + /** + * Get the failureAlertEmail property: The alert email in case of a failure. + * + * @return the failureAlertEmail value. + */ + public String failureAlertEmail() { + return this.failureAlertEmail; + } + + /** + * Set the failureAlertEmail property: The alert email in case of a failure. + * + * @param failureAlertEmail the failureAlertEmail value to set. + * @return the ComputeConfiguration object itself. + */ + public ComputeConfiguration withFailureAlertEmail(String failureAlertEmail) { + this.failureAlertEmail = failureAlertEmail; + return this; + } + + /** + * Get the throughput property: The data throughput speed in mbps. The accepted values are: 10, 100, 300, 500, 1024. + * + * @return the throughput value. + */ + public int throughput() { + return this.throughput; + } + + /** + * Set the throughput property: The data throughput speed in mbps. The accepted values are: 10, 100, 300, 500, 1024. + * + * @param throughput the throughput value to set. + * @return the ComputeConfiguration object itself. + */ + public ComputeConfiguration withThroughput(int throughput) { + this.throughput = throughput; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataConnectorConfiguration.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataConnectorConfiguration.java new file mode 100644 index 000000000000..93db56d00c37 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataConnectorConfiguration.java @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The data retention, dataset and compute configurations for the connector. */ +@Fluent +public final class DataConnectorConfiguration { + /* + * The data retention configuration + */ + @JsonProperty(value = "dataRetentionProperties", required = true) + private DataRetentionProperties dataRetentionProperties; + + /* + * The datasets configuration array + */ + @JsonProperty(value = "dataset", required = true) + private DatasetConfiguration dataset; + + /* + * The compute configuration + */ + @JsonProperty(value = "compute", required = true) + private ComputeConfiguration compute; + + /** Creates an instance of DataConnectorConfiguration class. */ + public DataConnectorConfiguration() { + } + + /** + * Get the dataRetentionProperties property: The data retention configuration. + * + * @return the dataRetentionProperties value. + */ + public DataRetentionProperties dataRetentionProperties() { + return this.dataRetentionProperties; + } + + /** + * Set the dataRetentionProperties property: The data retention configuration. + * + * @param dataRetentionProperties the dataRetentionProperties value to set. + * @return the DataConnectorConfiguration object itself. + */ + public DataConnectorConfiguration withDataRetentionProperties(DataRetentionProperties dataRetentionProperties) { + this.dataRetentionProperties = dataRetentionProperties; + return this; + } + + /** + * Get the dataset property: The datasets configuration array. + * + * @return the dataset value. + */ + public DatasetConfiguration dataset() { + return this.dataset; + } + + /** + * Set the dataset property: The datasets configuration array. + * + * @param dataset the dataset value to set. + * @return the DataConnectorConfiguration object itself. + */ + public DataConnectorConfiguration withDataset(DatasetConfiguration dataset) { + this.dataset = dataset; + return this; + } + + /** + * Get the compute property: The compute configuration. + * + * @return the compute value. + */ + public ComputeConfiguration compute() { + return this.compute; + } + + /** + * Set the compute property: The compute configuration. + * + * @param compute the compute value to set. + * @return the DataConnectorConfiguration object itself. + */ + public DataConnectorConfiguration withCompute(ComputeConfiguration compute) { + this.compute = compute; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (dataRetentionProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property dataRetentionProperties in model DataConnectorConfiguration")); + } else { + dataRetentionProperties().validate(); + } + if (dataset() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property dataset in model DataConnectorConfiguration")); + } else { + dataset().validate(); + } + if (compute() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property compute in model DataConnectorConfiguration")); + } else { + compute().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DataConnectorConfiguration.class); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataConnectorOperations.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataConnectorOperations.java new file mode 100644 index 000000000000..cbff08c25569 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataConnectorOperations.java @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of DataConnectorOperations. */ +public interface DataConnectorOperations { + /** + * List DataConnectors resources by subscription ID. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataConnectors list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * List DataConnectors resources by subscription ID. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataConnectors list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(Context context); + + /** + * List DataConnectors resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataConnectors list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List DataConnectors resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataConnectors list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Get a DataConnectors. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataConnectorName The data connector name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DataConnectors along with {@link Response}. + */ + Response getByResourceGroupWithResponse( + String resourceGroupName, String dataConnectorName, Context context); + + /** + * Get a DataConnectors. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataConnectorName The data connector name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DataConnectors. + */ + DataConnectors getByResourceGroup(String resourceGroupName, String dataConnectorName); + + /** + * Delete a DataConnectors. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataConnectorName The data connector name. + * @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 deleteByResourceGroup(String resourceGroupName, String dataConnectorName); + + /** + * Delete a DataConnectors. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dataConnectorName The data connector name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String dataConnectorName, Context context); + + /** + * Get a DataConnectors. + * + * @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 a DataConnectors along with {@link Response}. + */ + DataConnectors getById(String id); + + /** + * Get a DataConnectors. + * + * @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 a DataConnectors along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a DataConnectors. + * + * @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 DataConnectors. + * + * @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 DataConnectors resource. + * + * @param name resource name. + * @return the first stage of the new DataConnectors definition. + */ + DataConnectors.DefinitionStages.Blank define(String name); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataConnectors.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataConnectors.java new file mode 100644 index 000000000000..d2aca5a92a52 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataConnectors.java @@ -0,0 +1,361 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.networkanalytics.fluent.models.DataConnectorsInner; +import java.util.List; +import java.util.Map; + +/** An immutable client-side representation of DataConnectors. */ +public interface DataConnectors { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: The data connector provisioning state. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the managedResourceGroupConfiguration property: Managed resource group configuration. + * + * @return the managedResourceGroupConfiguration value. + */ + ManagedResourceGroupConfiguration managedResourceGroupConfiguration(); + + /** + * Gets the productName property: The network analytics product to which this connector belongs to. + * + * @return the productName value. + */ + String productName(); + + /** + * Gets the productVersion property: The version of the corresponding product. + * + * @return the productVersion value. + */ + String productVersion(); + + /** + * Gets the productConnector property: The product connector. + * + * @return the productConnector value. + */ + String productConnector(); + + /** + * Gets the productConnectorDataset property: The product connector dataset. + * + * @return the productConnectorDataset value. + */ + String productConnectorDataset(); + + /** + * Gets the dataLakeHouses property: An array of the ARM IDs for the Data Lake House resources. + * + * @return the dataLakeHouses value. + */ + List dataLakeHouses(); + + /** + * Gets the dataIngestionPath property: The data ingestion path. + * + * @return the dataIngestionPath value. + */ + String dataIngestionPath(); + + /** + * Gets the dataConnectorConfiguration property: The data connector configuration. + * + * @return the dataConnectorConfiguration value. + */ + DataConnectorConfiguration dataConnectorConfiguration(); + + /** + * 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.networkanalytics.fluent.models.DataConnectorsInner object. + * + * @return the inner object. + */ + DataConnectorsInner innerModel(); + + /** The entirety of the DataConnectors definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, + DefinitionStages.WithCreate { + } + /** The DataConnectors definition stages. */ + interface DefinitionStages { + /** The first stage of the DataConnectors definition. */ + interface Blank extends WithLocation { + } + /** The stage of the DataConnectors 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 DataConnectors definition allowing to specify parent resource. */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @return the next definition stage. + */ + WithCreate withExistingResourceGroup(String resourceGroupName); + } + /** + * The stage of the DataConnectors 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.WithManagedResourceGroupConfiguration, + DefinitionStages.WithProductName, + DefinitionStages.WithProductVersion, + DefinitionStages.WithProductConnector, + DefinitionStages.WithProductConnectorDataset, + DefinitionStages.WithDataLakeHouses, + DefinitionStages.WithDataConnectorConfiguration { + /** + * Executes the create request. + * + * @return the created resource. + */ + DataConnectors create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + DataConnectors create(Context context); + } + /** The stage of the DataConnectors 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 DataConnectors definition allowing to specify managedResourceGroupConfiguration. */ + interface WithManagedResourceGroupConfiguration { + /** + * Specifies the managedResourceGroupConfiguration property: Managed resource group configuration.. + * + * @param managedResourceGroupConfiguration Managed resource group configuration. + * @return the next definition stage. + */ + WithCreate withManagedResourceGroupConfiguration( + ManagedResourceGroupConfiguration managedResourceGroupConfiguration); + } + /** The stage of the DataConnectors definition allowing to specify productName. */ + interface WithProductName { + /** + * Specifies the productName property: The network analytics product to which this connector belongs to. + * + * @param productName The network analytics product to which this connector belongs to. + * @return the next definition stage. + */ + WithCreate withProductName(String productName); + } + /** The stage of the DataConnectors definition allowing to specify productVersion. */ + interface WithProductVersion { + /** + * Specifies the productVersion property: The version of the corresponding product. + * + * @param productVersion The version of the corresponding product. + * @return the next definition stage. + */ + WithCreate withProductVersion(String productVersion); + } + /** The stage of the DataConnectors definition allowing to specify productConnector. */ + interface WithProductConnector { + /** + * Specifies the productConnector property: The product connector. + * + * @param productConnector The product connector. + * @return the next definition stage. + */ + WithCreate withProductConnector(String productConnector); + } + /** The stage of the DataConnectors definition allowing to specify productConnectorDataset. */ + interface WithProductConnectorDataset { + /** + * Specifies the productConnectorDataset property: The product connector dataset. + * + * @param productConnectorDataset The product connector dataset. + * @return the next definition stage. + */ + WithCreate withProductConnectorDataset(String productConnectorDataset); + } + /** The stage of the DataConnectors definition allowing to specify dataLakeHouses. */ + interface WithDataLakeHouses { + /** + * Specifies the dataLakeHouses property: An array of the ARM IDs for the Data Lake House resources. + * + * @param dataLakeHouses An array of the ARM IDs for the Data Lake House resources. + * @return the next definition stage. + */ + WithCreate withDataLakeHouses(List dataLakeHouses); + } + /** The stage of the DataConnectors definition allowing to specify dataConnectorConfiguration. */ + interface WithDataConnectorConfiguration { + /** + * Specifies the dataConnectorConfiguration property: The data connector configuration. + * + * @param dataConnectorConfiguration The data connector configuration. + * @return the next definition stage. + */ + WithCreate withDataConnectorConfiguration(DataConnectorConfiguration dataConnectorConfiguration); + } + } + /** + * Begins update for the DataConnectors resource. + * + * @return the stage of resource update. + */ + DataConnectors.Update update(); + + /** The template for DataConnectors update. */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithManagedResourceGroupConfiguration { + /** + * Executes the update request. + * + * @return the updated resource. + */ + DataConnectors apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + DataConnectors apply(Context context); + } + /** The DataConnectors update stages. */ + interface UpdateStages { + /** The stage of the DataConnectors update allowing to specify tags. */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + /** The stage of the DataConnectors update allowing to specify managedResourceGroupConfiguration. */ + interface WithManagedResourceGroupConfiguration { + /** + * Specifies the managedResourceGroupConfiguration property: Managed resource group configuration.. + * + * @param managedResourceGroupConfiguration Managed resource group configuration. + * @return the next definition stage. + */ + Update withManagedResourceGroupConfiguration( + ManagedResourceGroupConfiguration managedResourceGroupConfiguration); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + DataConnectors refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + DataConnectors refresh(Context context); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataConnectorsListResult.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataConnectorsListResult.java new file mode 100644 index 000000000000..74fd2828fdc1 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataConnectorsListResult.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.networkanalytics.fluent.models.DataConnectorsInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The response of a DataConnectors list operation. */ +@Fluent +public final class DataConnectorsListResult { + /* + * The DataConnectors items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** Creates an instance of DataConnectorsListResult class. */ + public DataConnectorsListResult() { + } + + /** + * Get the value property: The DataConnectors items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The DataConnectors items on this page. + * + * @param value the value value to set. + * @return the DataConnectorsListResult object itself. + */ + public DataConnectorsListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The link to the next page of items. + * + * @param nextLink the nextLink value to set. + * @return the DataConnectorsListResult object itself. + */ + public DataConnectorsListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property value in model DataConnectorsListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DataConnectorsListResult.class); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataConnectorsUpdate.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataConnectorsUpdate.java new file mode 100644 index 000000000000..06f9661b6557 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataConnectorsUpdate.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.networkanalytics.fluent.models.DataConnectorsUpdateProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** The type used for update operations of the DataConnectors. */ +@Fluent +public final class DataConnectorsUpdate { + /* + * Resource tags. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + + /* + * The updatable properties of the DataConnectors. + */ + @JsonProperty(value = "properties") + private DataConnectorsUpdateProperties innerProperties; + + /** Creates an instance of DataConnectorsUpdate class. */ + public DataConnectorsUpdate() { + } + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the DataConnectorsUpdate object itself. + */ + public DataConnectorsUpdate withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the innerProperties property: The updatable properties of the DataConnectors. + * + * @return the innerProperties value. + */ + private DataConnectorsUpdateProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the managedResourceGroupConfiguration property: Managed resource group configuration. + * + * @return the managedResourceGroupConfiguration value. + */ + public ManagedResourceGroupConfiguration managedResourceGroupConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().managedResourceGroupConfiguration(); + } + + /** + * Set the managedResourceGroupConfiguration property: Managed resource group configuration. + * + * @param managedResourceGroupConfiguration the managedResourceGroupConfiguration value to set. + * @return the DataConnectorsUpdate object itself. + */ + public DataConnectorsUpdate withManagedResourceGroupConfiguration( + ManagedResourceGroupConfiguration managedResourceGroupConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new DataConnectorsUpdateProperties(); + } + this.innerProperties().withManagedResourceGroupConfiguration(managedResourceGroupConfiguration); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataLakeHouseResources.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataLakeHouseResources.java new file mode 100644 index 000000000000..dcbbb173261f --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataLakeHouseResources.java @@ -0,0 +1,319 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.networkanalytics.fluent.models.DataLakeHouseResourcesInner; +import java.util.Map; + +/** An immutable client-side representation of DataLakeHouseResources. */ +public interface DataLakeHouseResources { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: Storage properties. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the managedResourceGroupConfiguration property: Managed Resource Group configuration. + * + * @return the managedResourceGroupConfiguration value. + */ + ManagedResourceGroupConfiguration managedResourceGroupConfiguration(); + + /** + * Gets the uniqueIdentifierName property: unique Identifier Name. + * + * @return the uniqueIdentifierName value. + */ + String uniqueIdentifierName(); + + /** + * Gets the commonStorageAccountProperties property: Common Storage Account properties. + * + * @return the commonStorageAccountProperties value. + */ + CommonStorageAccountProperties commonStorageAccountProperties(); + + /** + * Gets the bronzeStorageAccountProperties property: Bronze Storage Account properties. + * + * @return the bronzeStorageAccountProperties value. + */ + BronzeStorageAccountProperties bronzeStorageAccountProperties(); + + /** + * Gets the azureDataExplorerProperties property: Azure DataExplorer Cluster properties. + * + * @return the azureDataExplorerProperties value. + */ + AzureDataExplorerProperties azureDataExplorerProperties(); + + /** + * 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.networkanalytics.fluent.models.DataLakeHouseResourcesInner object. + * + * @return the inner object. + */ + DataLakeHouseResourcesInner innerModel(); + + /** The entirety of the DataLakeHouseResources definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, + DefinitionStages.WithCreate { + } + /** The DataLakeHouseResources definition stages. */ + interface DefinitionStages { + /** The first stage of the DataLakeHouseResources definition. */ + interface Blank extends WithLocation { + } + /** The stage of the DataLakeHouseResources 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 DataLakeHouseResources definition allowing to specify parent resource. */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @return the next definition stage. + */ + WithCreate withExistingResourceGroup(String resourceGroupName); + } + /** + * The stage of the DataLakeHouseResources 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.WithManagedResourceGroupConfiguration, + DefinitionStages.WithUniqueIdentifierName, + DefinitionStages.WithCommonStorageAccountProperties, + DefinitionStages.WithBronzeStorageAccountProperties, + DefinitionStages.WithAzureDataExplorerProperties { + /** + * Executes the create request. + * + * @return the created resource. + */ + DataLakeHouseResources create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + DataLakeHouseResources create(Context context); + } + /** The stage of the DataLakeHouseResources 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 DataLakeHouseResources definition allowing to specify managedResourceGroupConfiguration. */ + interface WithManagedResourceGroupConfiguration { + /** + * Specifies the managedResourceGroupConfiguration property: Managed Resource Group configuration.. + * + * @param managedResourceGroupConfiguration Managed Resource Group configuration. + * @return the next definition stage. + */ + WithCreate withManagedResourceGroupConfiguration( + ManagedResourceGroupConfiguration managedResourceGroupConfiguration); + } + /** The stage of the DataLakeHouseResources definition allowing to specify uniqueIdentifierName. */ + interface WithUniqueIdentifierName { + /** + * Specifies the uniqueIdentifierName property: unique Identifier Name. + * + * @param uniqueIdentifierName unique Identifier Name. + * @return the next definition stage. + */ + WithCreate withUniqueIdentifierName(String uniqueIdentifierName); + } + /** The stage of the DataLakeHouseResources definition allowing to specify commonStorageAccountProperties. */ + interface WithCommonStorageAccountProperties { + /** + * Specifies the commonStorageAccountProperties property: Common Storage Account properties.. + * + * @param commonStorageAccountProperties Common Storage Account properties. + * @return the next definition stage. + */ + WithCreate withCommonStorageAccountProperties( + CommonStorageAccountProperties commonStorageAccountProperties); + } + /** The stage of the DataLakeHouseResources definition allowing to specify bronzeStorageAccountProperties. */ + interface WithBronzeStorageAccountProperties { + /** + * Specifies the bronzeStorageAccountProperties property: Bronze Storage Account properties.. + * + * @param bronzeStorageAccountProperties Bronze Storage Account properties. + * @return the next definition stage. + */ + WithCreate withBronzeStorageAccountProperties( + BronzeStorageAccountProperties bronzeStorageAccountProperties); + } + /** The stage of the DataLakeHouseResources definition allowing to specify azureDataExplorerProperties. */ + interface WithAzureDataExplorerProperties { + /** + * Specifies the azureDataExplorerProperties property: Azure DataExplorer Cluster properties.. + * + * @param azureDataExplorerProperties Azure DataExplorer Cluster properties. + * @return the next definition stage. + */ + WithCreate withAzureDataExplorerProperties(AzureDataExplorerProperties azureDataExplorerProperties); + } + } + /** + * Begins update for the DataLakeHouseResources resource. + * + * @return the stage of resource update. + */ + DataLakeHouseResources.Update update(); + + /** The template for DataLakeHouseResources update. */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithManagedResourceGroupConfiguration { + /** + * Executes the update request. + * + * @return the updated resource. + */ + DataLakeHouseResources apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + DataLakeHouseResources apply(Context context); + } + /** The DataLakeHouseResources update stages. */ + interface UpdateStages { + /** The stage of the DataLakeHouseResources update allowing to specify tags. */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + /** The stage of the DataLakeHouseResources update allowing to specify managedResourceGroupConfiguration. */ + interface WithManagedResourceGroupConfiguration { + /** + * Specifies the managedResourceGroupConfiguration property: Managed Resource Group configuration.. + * + * @param managedResourceGroupConfiguration Managed Resource Group configuration. + * @return the next definition stage. + */ + Update withManagedResourceGroupConfiguration( + ManagedResourceGroupConfiguration managedResourceGroupConfiguration); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + DataLakeHouseResources refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + DataLakeHouseResources refresh(Context context); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataLakeHouseResourcesListResult.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataLakeHouseResourcesListResult.java new file mode 100644 index 000000000000..7cdbc5b81002 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataLakeHouseResourcesListResult.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.networkanalytics.fluent.models.DataLakeHouseResourcesInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The response of a DataLakeHouseResources list operation. */ +@Fluent +public final class DataLakeHouseResourcesListResult { + /* + * The DataLakeHouseResources items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** Creates an instance of DataLakeHouseResourcesListResult class. */ + public DataLakeHouseResourcesListResult() { + } + + /** + * Get the value property: The DataLakeHouseResources items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The DataLakeHouseResources items on this page. + * + * @param value the value value to set. + * @return the DataLakeHouseResourcesListResult object itself. + */ + public DataLakeHouseResourcesListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The link to the next page of items. + * + * @param nextLink the nextLink value to set. + * @return the DataLakeHouseResourcesListResult object itself. + */ + public DataLakeHouseResourcesListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property value in model DataLakeHouseResourcesListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DataLakeHouseResourcesListResult.class); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataLakeHouseResourcesUpdate.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataLakeHouseResourcesUpdate.java new file mode 100644 index 000000000000..c45cc508d2b5 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataLakeHouseResourcesUpdate.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.networkanalytics.fluent.models.DataLakeHouseResourcesUpdateProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** The type used for update operations of the DataLakeHouseResources. */ +@Fluent +public final class DataLakeHouseResourcesUpdate { + /* + * Resource tags. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + + /* + * The updatable properties of the DataLakeHouseResources. + */ + @JsonProperty(value = "properties") + private DataLakeHouseResourcesUpdateProperties innerProperties; + + /** Creates an instance of DataLakeHouseResourcesUpdate class. */ + public DataLakeHouseResourcesUpdate() { + } + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the DataLakeHouseResourcesUpdate object itself. + */ + public DataLakeHouseResourcesUpdate withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the innerProperties property: The updatable properties of the DataLakeHouseResources. + * + * @return the innerProperties value. + */ + private DataLakeHouseResourcesUpdateProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the managedResourceGroupConfiguration property: Managed Resource Group configuration. + * + * @return the managedResourceGroupConfiguration value. + */ + public ManagedResourceGroupConfiguration managedResourceGroupConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().managedResourceGroupConfiguration(); + } + + /** + * Set the managedResourceGroupConfiguration property: Managed Resource Group configuration. + * + * @param managedResourceGroupConfiguration the managedResourceGroupConfiguration value to set. + * @return the DataLakeHouseResourcesUpdate object itself. + */ + public DataLakeHouseResourcesUpdate withManagedResourceGroupConfiguration( + ManagedResourceGroupConfiguration managedResourceGroupConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new DataLakeHouseResourcesUpdateProperties(); + } + this.innerProperties().withManagedResourceGroupConfiguration(managedResourceGroupConfiguration); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataRetentionProperties.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataRetentionProperties.java new file mode 100644 index 000000000000..cf67fea406bc --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DataRetentionProperties.java @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The data retention properties. */ +@Fluent +public final class DataRetentionProperties { + /* + * The Azure data explorer retention properties + */ + @JsonProperty(value = "dataExplorer", required = true) + private RetentionProperties dataExplorer; + + /* + * The bronze storage account retention properties + */ + @JsonProperty(value = "bronzeStorageAccount", required = true) + private RetentionProperties bronzeStorageAccount; + + /* + * The silver storage account retention properties + */ + @JsonProperty(value = "silverStorageAccount", required = true) + private RetentionProperties silverStorageAccount; + + /* + * The gold storage account retention properties + */ + @JsonProperty(value = "goldStorageAccount", required = true) + private RetentionProperties goldStorageAccount; + + /** Creates an instance of DataRetentionProperties class. */ + public DataRetentionProperties() { + } + + /** + * Get the dataExplorer property: The Azure data explorer retention properties. + * + * @return the dataExplorer value. + */ + public RetentionProperties dataExplorer() { + return this.dataExplorer; + } + + /** + * Set the dataExplorer property: The Azure data explorer retention properties. + * + * @param dataExplorer the dataExplorer value to set. + * @return the DataRetentionProperties object itself. + */ + public DataRetentionProperties withDataExplorer(RetentionProperties dataExplorer) { + this.dataExplorer = dataExplorer; + return this; + } + + /** + * Get the bronzeStorageAccount property: The bronze storage account retention properties. + * + * @return the bronzeStorageAccount value. + */ + public RetentionProperties bronzeStorageAccount() { + return this.bronzeStorageAccount; + } + + /** + * Set the bronzeStorageAccount property: The bronze storage account retention properties. + * + * @param bronzeStorageAccount the bronzeStorageAccount value to set. + * @return the DataRetentionProperties object itself. + */ + public DataRetentionProperties withBronzeStorageAccount(RetentionProperties bronzeStorageAccount) { + this.bronzeStorageAccount = bronzeStorageAccount; + return this; + } + + /** + * Get the silverStorageAccount property: The silver storage account retention properties. + * + * @return the silverStorageAccount value. + */ + public RetentionProperties silverStorageAccount() { + return this.silverStorageAccount; + } + + /** + * Set the silverStorageAccount property: The silver storage account retention properties. + * + * @param silverStorageAccount the silverStorageAccount value to set. + * @return the DataRetentionProperties object itself. + */ + public DataRetentionProperties withSilverStorageAccount(RetentionProperties silverStorageAccount) { + this.silverStorageAccount = silverStorageAccount; + return this; + } + + /** + * Get the goldStorageAccount property: The gold storage account retention properties. + * + * @return the goldStorageAccount value. + */ + public RetentionProperties goldStorageAccount() { + return this.goldStorageAccount; + } + + /** + * Set the goldStorageAccount property: The gold storage account retention properties. + * + * @param goldStorageAccount the goldStorageAccount value to set. + * @return the DataRetentionProperties object itself. + */ + public DataRetentionProperties withGoldStorageAccount(RetentionProperties goldStorageAccount) { + this.goldStorageAccount = goldStorageAccount; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (dataExplorer() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property dataExplorer in model DataRetentionProperties")); + } else { + dataExplorer().validate(); + } + if (bronzeStorageAccount() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property bronzeStorageAccount in model DataRetentionProperties")); + } else { + bronzeStorageAccount().validate(); + } + if (silverStorageAccount() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property silverStorageAccount in model DataRetentionProperties")); + } else { + silverStorageAccount().validate(); + } + if (goldStorageAccount() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property goldStorageAccount in model DataRetentionProperties")); + } else { + goldStorageAccount().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DataRetentionProperties.class); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DatasetConfiguration.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DatasetConfiguration.java new file mode 100644 index 000000000000..29c86c87d43d --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DatasetConfiguration.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** The connector dataset information. */ +@Fluent +public final class DatasetConfiguration { + /* + * The name of the dataset + */ + @JsonProperty(value = "datasetName", required = true) + private String datasetName; + + /* + * The column key holding the timestamp data + */ + @JsonProperty(value = "timestampKey") + private OffsetDateTime timestampKey; + + /* + * Columns to be masked + */ + @JsonProperty(value = "columnsToMask") + private List columnsToMask; + + /** Creates an instance of DatasetConfiguration class. */ + public DatasetConfiguration() { + } + + /** + * Get the datasetName property: The name of the dataset. + * + * @return the datasetName value. + */ + public String datasetName() { + return this.datasetName; + } + + /** + * Set the datasetName property: The name of the dataset. + * + * @param datasetName the datasetName value to set. + * @return the DatasetConfiguration object itself. + */ + public DatasetConfiguration withDatasetName(String datasetName) { + this.datasetName = datasetName; + return this; + } + + /** + * Get the timestampKey property: The column key holding the timestamp data. + * + * @return the timestampKey value. + */ + public OffsetDateTime timestampKey() { + return this.timestampKey; + } + + /** + * Set the timestampKey property: The column key holding the timestamp data. + * + * @param timestampKey the timestampKey value to set. + * @return the DatasetConfiguration object itself. + */ + public DatasetConfiguration withTimestampKey(OffsetDateTime timestampKey) { + this.timestampKey = timestampKey; + return this; + } + + /** + * Get the columnsToMask property: Columns to be masked. + * + * @return the columnsToMask value. + */ + public List columnsToMask() { + return this.columnsToMask; + } + + /** + * Set the columnsToMask property: Columns to be masked. + * + * @param columnsToMask the columnsToMask value to set. + * @return the DatasetConfiguration object itself. + */ + public DatasetConfiguration withColumnsToMask(List columnsToMask) { + this.columnsToMask = columnsToMask; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (datasetName() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property datasetName in model DatasetConfiguration")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DatasetConfiguration.class); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DefaultAction.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DefaultAction.java new file mode 100644 index 000000000000..d94df7adca3a --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/DefaultAction.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for DefaultAction. */ +public final class DefaultAction extends ExpandableStringEnum { + /** Static value Allow for DefaultAction. */ + public static final DefaultAction ALLOW = fromString("Allow"); + + /** Static value Deny for DefaultAction. */ + public static final DefaultAction DENY = fromString("Deny"); + + /** + * Creates a new instance of DefaultAction value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DefaultAction() { + } + + /** + * Creates or finds a DefaultAction from its string representation. + * + * @param name a name to look for. + * @return the corresponding DefaultAction. + */ + @JsonCreator + public static DefaultAction fromString(String name) { + return fromString(name, DefaultAction.class); + } + + /** + * Gets known DefaultAction values. + * + * @return known DefaultAction values. + */ + public static Collection values() { + return values(DefaultAction.class); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/IpRules.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/IpRules.java new file mode 100644 index 000000000000..0bd666f151d9 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/IpRules.java @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** IP rule with specific IP or IP range in CIDR format. */ +@Fluent +public final class IpRules { + /* + * IP Rules Value + */ + @JsonProperty(value = "value") + private String value; + + /* + * The action of virtual network rule. + */ + @JsonProperty(value = "action", required = true) + private String action; + + /** Creates an instance of IpRules class. */ + public IpRules() { + } + + /** + * Get the value property: IP Rules Value. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Set the value property: IP Rules Value. + * + * @param value the value value to set. + * @return the IpRules object itself. + */ + public IpRules withValue(String value) { + this.value = value; + return this; + } + + /** + * Get the action property: The action of virtual network rule. + * + * @return the action value. + */ + public String action() { + return this.action; + } + + /** + * Set the action property: The action of virtual network rule. + * + * @param action the action value to set. + * @return the IpRules object itself. + */ + public IpRules withAction(String action) { + this.action = action; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (action() == null) { + throw LOGGER + .logExceptionAsError(new IllegalArgumentException("Missing required property action in model IpRules")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(IpRules.class); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/KustoClusterPrincipalAssignments.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/KustoClusterPrincipalAssignments.java new file mode 100644 index 000000000000..bd02eaac710a --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/KustoClusterPrincipalAssignments.java @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** ADx Role assignments. */ +@Fluent +public final class KustoClusterPrincipalAssignments { + /* + * system Identity Name + */ + @JsonProperty(value = "systemIdentityName") + private String systemIdentityName; + + /* + * Kusto roles + */ + @JsonProperty(value = "role", required = true) + private KustoRole role; + + /* + * Principal type. + */ + @JsonProperty(value = "principalType", required = true) + private PrincipalType principalType; + + /** Creates an instance of KustoClusterPrincipalAssignments class. */ + public KustoClusterPrincipalAssignments() { + } + + /** + * Get the systemIdentityName property: system Identity Name. + * + * @return the systemIdentityName value. + */ + public String systemIdentityName() { + return this.systemIdentityName; + } + + /** + * Set the systemIdentityName property: system Identity Name. + * + * @param systemIdentityName the systemIdentityName value to set. + * @return the KustoClusterPrincipalAssignments object itself. + */ + public KustoClusterPrincipalAssignments withSystemIdentityName(String systemIdentityName) { + this.systemIdentityName = systemIdentityName; + return this; + } + + /** + * Get the role property: Kusto roles. + * + * @return the role value. + */ + public KustoRole role() { + return this.role; + } + + /** + * Set the role property: Kusto roles. + * + * @param role the role value to set. + * @return the KustoClusterPrincipalAssignments object itself. + */ + public KustoClusterPrincipalAssignments withRole(KustoRole role) { + this.role = role; + return this; + } + + /** + * Get the principalType property: Principal type. + * + * @return the principalType value. + */ + public PrincipalType principalType() { + return this.principalType; + } + + /** + * Set the principalType property: Principal type. + * + * @param principalType the principalType value to set. + * @return the KustoClusterPrincipalAssignments object itself. + */ + public KustoClusterPrincipalAssignments withPrincipalType(PrincipalType principalType) { + this.principalType = principalType; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (role() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property role in model KustoClusterPrincipalAssignments")); + } + if (principalType() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property principalType in model KustoClusterPrincipalAssignments")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(KustoClusterPrincipalAssignments.class); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/KustoRole.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/KustoRole.java new file mode 100644 index 000000000000..8460e893d899 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/KustoRole.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for KustoRole. */ +public final class KustoRole extends ExpandableStringEnum { + /** Static value AllDatabasesAdmin for KustoRole. */ + public static final KustoRole ALL_DATABASES_ADMIN = fromString("AllDatabasesAdmin"); + + /** Static value AllDatabasesViewer for KustoRole. */ + public static final KustoRole ALL_DATABASES_VIEWER = fromString("AllDatabasesViewer"); + + /** + * Creates a new instance of KustoRole value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public KustoRole() { + } + + /** + * Creates or finds a KustoRole from its string representation. + * + * @param name a name to look for. + * @return the corresponding KustoRole. + */ + @JsonCreator + public static KustoRole fromString(String name) { + return fromString(name, KustoRole.class); + } + + /** + * Gets known KustoRole values. + * + * @return known KustoRole values. + */ + public static Collection values() { + return values(KustoRole.class); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/ManagedResourceGroupConfiguration.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/ManagedResourceGroupConfiguration.java new file mode 100644 index 000000000000..80e37c5b10c1 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/ManagedResourceGroupConfiguration.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** ManagedResourceGroup related properties. */ +@Fluent +public final class ManagedResourceGroupConfiguration { + /* + * Name of managed resource group + */ + @JsonProperty(value = "name", required = true) + private String name; + + /* + * Managed Resource Group location + */ + @JsonProperty(value = "location", required = true) + private String location; + + /** Creates an instance of ManagedResourceGroupConfiguration class. */ + public ManagedResourceGroupConfiguration() { + } + + /** + * Get the name property: Name of managed resource group. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of managed resource group. + * + * @param name the name value to set. + * @return the ManagedResourceGroupConfiguration object itself. + */ + public ManagedResourceGroupConfiguration withName(String name) { + this.name = name; + return this; + } + + /** + * Get the location property: Managed Resource Group location. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: Managed Resource Group location. + * + * @param location the location value to set. + * @return the ManagedResourceGroupConfiguration object itself. + */ + public ManagedResourceGroupConfiguration withLocation(String location) { + this.location = location; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property name in model ManagedResourceGroupConfiguration")); + } + if (location() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property location in model ManagedResourceGroupConfiguration")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ManagedResourceGroupConfiguration.class); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/MetricsIngestionEndpointResources.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/MetricsIngestionEndpointResources.java new file mode 100644 index 000000000000..269f83e44e43 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/MetricsIngestionEndpointResources.java @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.networkanalytics.fluent.models.MetricsIngestionEndpointResourcesInner; + +/** An immutable client-side representation of MetricsIngestionEndpointResources. */ +public interface MetricsIngestionEndpointResources { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the ingressRegionName property: Name of the External Metrics Ingress Gateway region where the compute should + * be deployed. + * + * @return the ingressRegionName value. + */ + String ingressRegionName(); + + /** + * Gets the eventHubUrl property: Event Hub URL to which the metrics should be sent for this resource. + * + * @return the eventHubUrl value. + */ + String eventHubUrl(); + + /** + * Gets the eventHubName property: Event Hub name to which the metrics should be sent for this resource. + * + * @return the eventHubName value. + */ + String eventHubName(); + + /** + * Gets the keyVaultUrl property: Key Vault URL where the connection string exists for authentication. + * + * @return the keyVaultUrl value. + */ + String keyVaultUrl(); + + /** + * Gets the provisioningState property: The status of the last operation. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the managedResourceGroupConfiguration property: Managed Resource Group Configuration. + * + * @return the managedResourceGroupConfiguration value. + */ + ManagedResourceGroupConfiguration managedResourceGroupConfiguration(); + + /** + * Gets the inner com.azure.resourcemanager.networkanalytics.fluent.models.MetricsIngestionEndpointResourcesInner + * object. + * + * @return the inner object. + */ + MetricsIngestionEndpointResourcesInner innerModel(); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/MetricsIngestionEndpointResourcesListResult.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/MetricsIngestionEndpointResourcesListResult.java new file mode 100644 index 000000000000..5bc152f114fa --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/MetricsIngestionEndpointResourcesListResult.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.networkanalytics.fluent.models.MetricsIngestionEndpointResourcesInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The response of a MetricsIngestionEndpointResources list operation. */ +@Fluent +public final class MetricsIngestionEndpointResourcesListResult { + /* + * The MetricsIngestionEndpointResources items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** Creates an instance of MetricsIngestionEndpointResourcesListResult class. */ + public MetricsIngestionEndpointResourcesListResult() { + } + + /** + * Get the value property: The MetricsIngestionEndpointResources items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The MetricsIngestionEndpointResources items on this page. + * + * @param value the value value to set. + * @return the MetricsIngestionEndpointResourcesListResult object itself. + */ + public MetricsIngestionEndpointResourcesListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The link to the next page of items. + * + * @param nextLink the nextLink value to set. + * @return the MetricsIngestionEndpointResourcesListResult object itself. + */ + public MetricsIngestionEndpointResourcesListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property value in model MetricsIngestionEndpointResourcesListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(MetricsIngestionEndpointResourcesListResult.class); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/MetricsIngestionEndpoints.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/MetricsIngestionEndpoints.java new file mode 100644 index 000000000000..280ee9b623a5 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/MetricsIngestionEndpoints.java @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.networkanalytics.fluent.models.MetricsIngestionEndpointResourcesInner; + +/** Resource collection API of MetricsIngestionEndpoints. */ +public interface MetricsIngestionEndpoints { + /** + * List MetricsIngestionEndpointResources resources by parent. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a MetricsIngestionEndpointResources list operation as paginated response with {@link + * PagedIterable}. + */ + PagedIterable list(String resourceUri); + + /** + * List MetricsIngestionEndpointResources resources by parent. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a MetricsIngestionEndpointResources list operation as paginated response with {@link + * PagedIterable}. + */ + PagedIterable list(String resourceUri, Context context); + + /** + * Get a MetricsIngestionEndpointResources. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a MetricsIngestionEndpointResources along with {@link Response}. + */ + Response getWithResponse(String resourceUri, Context context); + + /** + * Get a MetricsIngestionEndpointResources. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a MetricsIngestionEndpointResources. + */ + MetricsIngestionEndpointResources get(String resourceUri); + + /** + * Create a MetricsIngestionEndpointResources. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an ingestion endpoint for metrics relating to the parent resource. + */ + MetricsIngestionEndpointResources createOrUpdate( + String resourceUri, MetricsIngestionEndpointResourcesInner resource); + + /** + * Create a MetricsIngestionEndpointResources. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an ingestion endpoint for metrics relating to the parent resource. + */ + MetricsIngestionEndpointResources createOrUpdate( + String resourceUri, MetricsIngestionEndpointResourcesInner resource, Context context); + + /** + * Update a MetricsIngestionEndpointResources. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an ingestion endpoint for metrics relating to the parent resource along with {@link Response}. + */ + Response updateWithResponse( + String resourceUri, Object properties, Context context); + + /** + * Update a MetricsIngestionEndpointResources. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an ingestion endpoint for metrics relating to the parent resource. + */ + MetricsIngestionEndpointResources update(String resourceUri, Object properties); + + /** + * Delete a MetricsIngestionEndpointResources. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceUri); + + /** + * Delete a MetricsIngestionEndpointResources. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceUri, Context context); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/NetworkAcls.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/NetworkAcls.java new file mode 100644 index 000000000000..752fc18dc862 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/NetworkAcls.java @@ -0,0 +1,189 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Network rule set. */ +@Fluent +public final class NetworkAcls { + /* + * Specifies whether traffic is bypassed for Logging/Metrics/AzureServices + */ + @JsonProperty(value = "bypass", required = true) + private Bypass bypass; + + /* + * Virtual Network Rule + */ + @JsonProperty(value = "virtualNetworkRule", required = true) + private List virtualNetworkRule; + + /* + * IP rule with specific IP or IP range in CIDR format. + */ + @JsonProperty(value = "ipRules", required = true) + private List ipRules; + + /* + * Resource Access Rules. + */ + @JsonProperty(value = "resourceAccessRules", required = true) + private List resourceAccessRules; + + /* + * Default Action + */ + @JsonProperty(value = "defaultActionType", required = true) + private DefaultAction defaultActionType; + + /** Creates an instance of NetworkAcls class. */ + public NetworkAcls() { + } + + /** + * Get the bypass property: Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. + * + * @return the bypass value. + */ + public Bypass bypass() { + return this.bypass; + } + + /** + * Set the bypass property: Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. + * + * @param bypass the bypass value to set. + * @return the NetworkAcls object itself. + */ + public NetworkAcls withBypass(Bypass bypass) { + this.bypass = bypass; + return this; + } + + /** + * Get the virtualNetworkRule property: Virtual Network Rule. + * + * @return the virtualNetworkRule value. + */ + public List virtualNetworkRule() { + return this.virtualNetworkRule; + } + + /** + * Set the virtualNetworkRule property: Virtual Network Rule. + * + * @param virtualNetworkRule the virtualNetworkRule value to set. + * @return the NetworkAcls object itself. + */ + public NetworkAcls withVirtualNetworkRule(List virtualNetworkRule) { + this.virtualNetworkRule = virtualNetworkRule; + return this; + } + + /** + * Get the ipRules property: IP rule with specific IP or IP range in CIDR format. + * + * @return the ipRules value. + */ + public List ipRules() { + return this.ipRules; + } + + /** + * Set the ipRules property: IP rule with specific IP or IP range in CIDR format. + * + * @param ipRules the ipRules value to set. + * @return the NetworkAcls object itself. + */ + public NetworkAcls withIpRules(List ipRules) { + this.ipRules = ipRules; + return this; + } + + /** + * Get the resourceAccessRules property: Resource Access Rules. + * + * @return the resourceAccessRules value. + */ + public List resourceAccessRules() { + return this.resourceAccessRules; + } + + /** + * Set the resourceAccessRules property: Resource Access Rules. + * + * @param resourceAccessRules the resourceAccessRules value to set. + * @return the NetworkAcls object itself. + */ + public NetworkAcls withResourceAccessRules(List resourceAccessRules) { + this.resourceAccessRules = resourceAccessRules; + return this; + } + + /** + * Get the defaultActionType property: Default Action. + * + * @return the defaultActionType value. + */ + public DefaultAction defaultActionType() { + return this.defaultActionType; + } + + /** + * Set the defaultActionType property: Default Action. + * + * @param defaultActionType the defaultActionType value to set. + * @return the NetworkAcls object itself. + */ + public NetworkAcls withDefaultActionType(DefaultAction defaultActionType) { + this.defaultActionType = defaultActionType; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (bypass() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property bypass in model NetworkAcls")); + } + if (virtualNetworkRule() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property virtualNetworkRule in model NetworkAcls")); + } else { + virtualNetworkRule().forEach(e -> e.validate()); + } + if (ipRules() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property ipRules in model NetworkAcls")); + } else { + ipRules().forEach(e -> e.validate()); + } + if (resourceAccessRules() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property resourceAccessRules in model NetworkAcls")); + } else { + resourceAccessRules().forEach(e -> e.validate()); + } + if (defaultActionType() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property defaultActionType in model NetworkAcls")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(NetworkAcls.class); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/NetworkAnalyticsProductConnectorInformation.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/NetworkAnalyticsProductConnectorInformation.java new file mode 100644 index 000000000000..d374ea20edd7 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/NetworkAnalyticsProductConnectorInformation.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Data Connector Information. */ +@Fluent +public final class NetworkAnalyticsProductConnectorInformation { + /* + * The connector name + */ + @JsonProperty(value = "connectorName", required = true) + private String connectorName; + + /* + * The datasets supported by the connector + */ + @JsonProperty(value = "datasets", required = true) + private List datasets; + + /** Creates an instance of NetworkAnalyticsProductConnectorInformation class. */ + public NetworkAnalyticsProductConnectorInformation() { + } + + /** + * Get the connectorName property: The connector name. + * + * @return the connectorName value. + */ + public String connectorName() { + return this.connectorName; + } + + /** + * Set the connectorName property: The connector name. + * + * @param connectorName the connectorName value to set. + * @return the NetworkAnalyticsProductConnectorInformation object itself. + */ + public NetworkAnalyticsProductConnectorInformation withConnectorName(String connectorName) { + this.connectorName = connectorName; + return this; + } + + /** + * Get the datasets property: The datasets supported by the connector. + * + * @return the datasets value. + */ + public List datasets() { + return this.datasets; + } + + /** + * Set the datasets property: The datasets supported by the connector. + * + * @param datasets the datasets value to set. + * @return the NetworkAnalyticsProductConnectorInformation object itself. + */ + public NetworkAnalyticsProductConnectorInformation withDatasets(List datasets) { + this.datasets = datasets; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (connectorName() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property connectorName in model" + + " NetworkAnalyticsProductConnectorInformation")); + } + if (datasets() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property datasets in model NetworkAnalyticsProductConnectorInformation")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(NetworkAnalyticsProductConnectorInformation.class); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/NetworkAnalyticsProductInformation.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/NetworkAnalyticsProductInformation.java new file mode 100644 index 000000000000..9c8095f7b6a1 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/NetworkAnalyticsProductInformation.java @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The network analytics product information. */ +@Fluent +public final class NetworkAnalyticsProductInformation { + /* + * Name of the network analytics product + */ + @JsonProperty(value = "productName", required = true) + private String productName; + + /* + * The available versions for the product + */ + @JsonProperty(value = "productVersions", required = true) + private List productVersions; + + /* + * The connectors supported by the product + */ + @JsonProperty(value = "productConnectors", required = true) + private List productConnectors; + + /** Creates an instance of NetworkAnalyticsProductInformation class. */ + public NetworkAnalyticsProductInformation() { + } + + /** + * Get the productName property: Name of the network analytics product. + * + * @return the productName value. + */ + public String productName() { + return this.productName; + } + + /** + * Set the productName property: Name of the network analytics product. + * + * @param productName the productName value to set. + * @return the NetworkAnalyticsProductInformation object itself. + */ + public NetworkAnalyticsProductInformation withProductName(String productName) { + this.productName = productName; + return this; + } + + /** + * Get the productVersions property: The available versions for the product. + * + * @return the productVersions value. + */ + public List productVersions() { + return this.productVersions; + } + + /** + * Set the productVersions property: The available versions for the product. + * + * @param productVersions the productVersions value to set. + * @return the NetworkAnalyticsProductInformation object itself. + */ + public NetworkAnalyticsProductInformation withProductVersions(List productVersions) { + this.productVersions = productVersions; + return this; + } + + /** + * Get the productConnectors property: The connectors supported by the product. + * + * @return the productConnectors value. + */ + public List productConnectors() { + return this.productConnectors; + } + + /** + * Set the productConnectors property: The connectors supported by the product. + * + * @param productConnectors the productConnectors value to set. + * @return the NetworkAnalyticsProductInformation object itself. + */ + public NetworkAnalyticsProductInformation withProductConnectors( + List productConnectors) { + this.productConnectors = productConnectors; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (productName() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property productName in model NetworkAnalyticsProductInformation")); + } + if (productVersions() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property productVersions in model NetworkAnalyticsProductInformation")); + } + if (productConnectors() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property productConnectors in model NetworkAnalyticsProductInformation")); + } else { + productConnectors().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(NetworkAnalyticsProductInformation.class); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/NetworkAnalyticsProductOperations.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/NetworkAnalyticsProductOperations.java new file mode 100644 index 000000000000..a6f2e0358ebc --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/NetworkAnalyticsProductOperations.java @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.networkanalytics.fluent.models.NetworkAnalyticsProductsInner; + +/** Resource collection API of NetworkAnalyticsProductOperations. */ +public interface NetworkAnalyticsProductOperations { + /** + * List NetworkAnalyticsProducts resources by subscription ID. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkAnalyticsProducts list operation as paginated response with {@link + * PagedIterable}. + */ + PagedIterable list(); + + /** + * List NetworkAnalyticsProducts resources by subscription ID. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkAnalyticsProducts list operation as paginated response with {@link + * PagedIterable}. + */ + PagedIterable list(Context context); + + /** + * List NetworkAnalyticsProducts resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkAnalyticsProducts list operation as paginated response with {@link + * PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List NetworkAnalyticsProducts resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a NetworkAnalyticsProducts list operation as paginated response with {@link + * PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Get a NetworkAnalyticsProducts. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a NetworkAnalyticsProducts along with {@link Response}. + */ + Response getByResourceGroupWithResponse(String resourceGroupName, Context context); + + /** + * Get a NetworkAnalyticsProducts. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a NetworkAnalyticsProducts. + */ + NetworkAnalyticsProducts getByResourceGroup(String resourceGroupName); + + /** + * Create a NetworkAnalyticsProducts. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the network analytics product resource. + */ + NetworkAnalyticsProducts createOrUpdate(String resourceGroupName, NetworkAnalyticsProductsInner resource); + + /** + * Create a NetworkAnalyticsProducts. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the network analytics product resource. + */ + NetworkAnalyticsProducts createOrUpdate( + String resourceGroupName, NetworkAnalyticsProductsInner resource, Context context); + + /** + * Update a NetworkAnalyticsProducts. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the network analytics product resource along with {@link Response}. + */ + Response updateWithResponse(String resourceGroupName, Object properties, Context context); + + /** + * Update a NetworkAnalyticsProducts. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the network analytics product resource. + */ + NetworkAnalyticsProducts update(String resourceGroupName, Object properties); + + /** + * Delete a NetworkAnalyticsProducts. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName); + + /** + * Delete a NetworkAnalyticsProducts. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, Context context); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/NetworkAnalyticsProducts.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/NetworkAnalyticsProducts.java new file mode 100644 index 000000000000..c0b7e25ccefd --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/NetworkAnalyticsProducts.java @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.networkanalytics.fluent.models.NetworkAnalyticsProductsInner; + +/** An immutable client-side representation of NetworkAnalyticsProducts. */ +public interface NetworkAnalyticsProducts { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: The network analytics product provisioning state. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the networkAnalyticsProductInformation property: The network analytics product information. + * + * @return the networkAnalyticsProductInformation value. + */ + NetworkAnalyticsProductInformation networkAnalyticsProductInformation(); + + /** + * Gets the inner com.azure.resourcemanager.networkanalytics.fluent.models.NetworkAnalyticsProductsInner object. + * + * @return the inner object. + */ + NetworkAnalyticsProductsInner innerModel(); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/NetworkAnalyticsProductsListResult.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/NetworkAnalyticsProductsListResult.java new file mode 100644 index 000000000000..ae46f50e1212 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/NetworkAnalyticsProductsListResult.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.networkanalytics.fluent.models.NetworkAnalyticsProductsInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The response of a NetworkAnalyticsProducts list operation. */ +@Fluent +public final class NetworkAnalyticsProductsListResult { + /* + * The NetworkAnalyticsProducts items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** Creates an instance of NetworkAnalyticsProductsListResult class. */ + public NetworkAnalyticsProductsListResult() { + } + + /** + * Get the value property: The NetworkAnalyticsProducts items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The NetworkAnalyticsProducts items on this page. + * + * @param value the value value to set. + * @return the NetworkAnalyticsProductsListResult object itself. + */ + public NetworkAnalyticsProductsListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The link to the next page of items. + * + * @param nextLink the nextLink value to set. + * @return the NetworkAnalyticsProductsListResult object itself. + */ + public NetworkAnalyticsProductsListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property value in model NetworkAnalyticsProductsListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(NetworkAnalyticsProductsListResult.class); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/Operation.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/Operation.java new file mode 100644 index 000000000000..6859ff6e781d --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/Operation.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.resourcemanager.networkanalytics.fluent.models.OperationInner; + +/** An immutable client-side representation of Operation. */ +public interface Operation { + /** + * Gets the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: + * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". + * + * @return the name value. + */ + String name(); + + /** + * Gets the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane + * operations and "false" for ARM/control-plane operations. + * + * @return the isDataAction value. + */ + Boolean isDataAction(); + + /** + * Gets the display property: Localized display information for this particular operation. + * + * @return the display value. + */ + OperationDisplay display(); + + /** + * Gets the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and + * audit logs UX. Default value is "user,system". + * + * @return the origin value. + */ + Origin origin(); + + /** + * Gets the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal + * only APIs. + * + * @return the actionType value. + */ + ActionType actionType(); + + /** + * Gets the inner com.azure.resourcemanager.networkanalytics.fluent.models.OperationInner object. + * + * @return the inner object. + */ + OperationInner innerModel(); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/OperationDisplay.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/OperationDisplay.java new file mode 100644 index 000000000000..cf6ba592ed53 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/OperationDisplay.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Localized display information for this particular operation. */ +@Immutable +public final class OperationDisplay { + /* + * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft + * Compute". + */ + @JsonProperty(value = "provider", access = JsonProperty.Access.WRITE_ONLY) + private String provider; + + /* + * The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job + * Schedule Collections". + */ + @JsonProperty(value = "resource", access = JsonProperty.Access.WRITE_ONLY) + private String resource; + + /* + * The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual + * Machine", "Restart Virtual Machine". + */ + @JsonProperty(value = "operation", access = JsonProperty.Access.WRITE_ONLY) + private String operation; + + /* + * The short, localized friendly description of the operation; suitable for tool tips and detailed views. + */ + @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) + private String description; + + /** Creates an instance of OperationDisplay class. */ + public OperationDisplay() { + } + + /** + * Get the provider property: The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring + * Insights" or "Microsoft Compute". + * + * @return the provider value. + */ + public String provider() { + return this.provider; + } + + /** + * Get the resource property: The localized friendly name of the resource type related to this operation. E.g. + * "Virtual Machines" or "Job Schedule Collections". + * + * @return the resource value. + */ + public String resource() { + return this.resource; + } + + /** + * Get the operation property: The concise, localized friendly name for the operation; suitable for dropdowns. E.g. + * "Create or Update Virtual Machine", "Restart Virtual Machine". + * + * @return the operation value. + */ + public String operation() { + return this.operation; + } + + /** + * Get the description property: The short, localized friendly description of the operation; suitable for tool tips + * and detailed views. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/OperationListResult.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/OperationListResult.java new file mode 100644 index 000000000000..7b28927b42f8 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/OperationListResult.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.networkanalytics.fluent.models.OperationInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of + * results. + */ +@Immutable +public final class OperationListResult { + /* + * List of operations supported by the resource provider + */ + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + private List value; + + /* + * URL to get the next set of operation list results (if there are any). + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** Creates an instance of OperationListResult class. */ + public OperationListResult() { + } + + /** + * Get the value property: List of operations supported by the resource provider. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: URL to get the next set of operation list results (if there are any). + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/Operations.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/Operations.java new file mode 100644 index 000000000000..7966871de72c --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/Operations.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; + +/** Resource collection API of Operations. */ +public interface Operations { + /** + * List the operations for the provider. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link + * PagedIterable}. + */ + PagedIterable list(); + + /** + * List the operations for the provider. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link + * PagedIterable}. + */ + PagedIterable list(Context context); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/Origin.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/Origin.java new file mode 100644 index 000000000000..54e5fb6c0512 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/Origin.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value + * is "user,system". + */ +public final class Origin extends ExpandableStringEnum { + /** Static value user for Origin. */ + public static final Origin USER = fromString("user"); + + /** Static value system for Origin. */ + public static final Origin SYSTEM = fromString("system"); + + /** Static value user,system for Origin. */ + public static final Origin USER_SYSTEM = fromString("user,system"); + + /** + * Creates a new instance of Origin value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Origin() { + } + + /** + * Creates or finds a Origin from its string representation. + * + * @param name a name to look for. + * @return the corresponding Origin. + */ + @JsonCreator + public static Origin fromString(String name) { + return fromString(name, Origin.class); + } + + /** + * Gets known Origin values. + * + * @return known Origin values. + */ + public static Collection values() { + return values(Origin.class); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/PrincipalType.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/PrincipalType.java new file mode 100644 index 000000000000..d71c65328501 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/PrincipalType.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for PrincipalType. */ +public final class PrincipalType extends ExpandableStringEnum { + /** Static value App for PrincipalType. */ + public static final PrincipalType APP = fromString("App"); + + /** Static value Group for PrincipalType. */ + public static final PrincipalType GROUP = fromString("Group"); + + /** Static value User for PrincipalType. */ + public static final PrincipalType USER = fromString("User"); + + /** + * Creates a new instance of PrincipalType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PrincipalType() { + } + + /** + * Creates or finds a PrincipalType from its string representation. + * + * @param name a name to look for. + * @return the corresponding PrincipalType. + */ + @JsonCreator + public static PrincipalType fromString(String name) { + return fromString(name, PrincipalType.class); + } + + /** + * Gets known PrincipalType values. + * + * @return known PrincipalType values. + */ + public static Collection values() { + return values(PrincipalType.class); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/PrivateEndPoint.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/PrivateEndPoint.java new file mode 100644 index 000000000000..3be78905946b --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/PrivateEndPoint.java @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Private End Point Resource. */ +@Fluent +public final class PrivateEndPoint { + /* + * Resource ID of a subnet + */ + @JsonProperty(value = "subnetId", required = true) + private String subnetId; + + /* + * The private link resource service id + */ + @JsonProperty(value = "privateLinkServiceId", required = true) + private String privateLinkServiceId; + + /* + * The private link resource group id. + */ + @JsonProperty(value = "groupIds", required = true) + private List groupIds; + + /* + * The private link resource customDnsConfigs. + */ + @JsonProperty(value = "customDnsConfigs", required = true) + private String customDnsConfigs; + + /** Creates an instance of PrivateEndPoint class. */ + public PrivateEndPoint() { + } + + /** + * Get the subnetId property: Resource ID of a subnet. + * + * @return the subnetId value. + */ + public String subnetId() { + return this.subnetId; + } + + /** + * Set the subnetId property: Resource ID of a subnet. + * + * @param subnetId the subnetId value to set. + * @return the PrivateEndPoint object itself. + */ + public PrivateEndPoint withSubnetId(String subnetId) { + this.subnetId = subnetId; + return this; + } + + /** + * Get the privateLinkServiceId property: The private link resource service id. + * + * @return the privateLinkServiceId value. + */ + public String privateLinkServiceId() { + return this.privateLinkServiceId; + } + + /** + * Set the privateLinkServiceId property: The private link resource service id. + * + * @param privateLinkServiceId the privateLinkServiceId value to set. + * @return the PrivateEndPoint object itself. + */ + public PrivateEndPoint withPrivateLinkServiceId(String privateLinkServiceId) { + this.privateLinkServiceId = privateLinkServiceId; + return this; + } + + /** + * Get the groupIds property: The private link resource group id. + * + * @return the groupIds value. + */ + public List groupIds() { + return this.groupIds; + } + + /** + * Set the groupIds property: The private link resource group id. + * + * @param groupIds the groupIds value to set. + * @return the PrivateEndPoint object itself. + */ + public PrivateEndPoint withGroupIds(List groupIds) { + this.groupIds = groupIds; + return this; + } + + /** + * Get the customDnsConfigs property: The private link resource customDnsConfigs. + * + * @return the customDnsConfigs value. + */ + public String customDnsConfigs() { + return this.customDnsConfigs; + } + + /** + * Set the customDnsConfigs property: The private link resource customDnsConfigs. + * + * @param customDnsConfigs the customDnsConfigs value to set. + * @return the PrivateEndPoint object itself. + */ + public PrivateEndPoint withCustomDnsConfigs(String customDnsConfigs) { + this.customDnsConfigs = customDnsConfigs; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (subnetId() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property subnetId in model PrivateEndPoint")); + } + if (privateLinkServiceId() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property privateLinkServiceId in model PrivateEndPoint")); + } + if (groupIds() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property groupIds in model PrivateEndPoint")); + } + if (customDnsConfigs() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property customDnsConfigs in model PrivateEndPoint")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PrivateEndPoint.class); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/ProvisioningState.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/ProvisioningState.java new file mode 100644 index 000000000000..4c1a8c69fc5b --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/ProvisioningState.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The status of the current operation. */ +public final class ProvisioningState extends ExpandableStringEnum { + /** Static value Succeeded for ProvisioningState. */ + public static final ProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Failed for ProvisioningState. */ + public static final ProvisioningState FAILED = fromString("Failed"); + + /** Static value Canceled for ProvisioningState. */ + public static final ProvisioningState CANCELED = fromString("Canceled"); + + /** Static value Provisioning for ProvisioningState. */ + public static final ProvisioningState PROVISIONING = fromString("Provisioning"); + + /** Static value Updating for ProvisioningState. */ + public static final ProvisioningState UPDATING = fromString("Updating"); + + /** Static value Deleting for ProvisioningState. */ + public static final ProvisioningState DELETING = fromString("Deleting"); + + /** Static value Accepted for ProvisioningState. */ + public static final ProvisioningState ACCEPTED = fromString("Accepted"); + + /** + * Creates a new instance of ProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ProvisioningState() { + } + + /** + * Creates or finds a ProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ProvisioningState. + */ + @JsonCreator + public static ProvisioningState fromString(String name) { + return fromString(name, ProvisioningState.class); + } + + /** + * Gets known ProvisioningState values. + * + * @return known ProvisioningState values. + */ + public static Collection values() { + return values(ProvisioningState.class); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/ResourceAccessRules.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/ResourceAccessRules.java new file mode 100644 index 000000000000..237ab7923117 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/ResourceAccessRules.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Resource Access Rules. */ +@Fluent +public final class ResourceAccessRules { + /* + * The tenant ID of resource. + */ + @JsonProperty(value = "tenantId", required = true) + private String tenantId; + + /* + * Resource ID + */ + @JsonProperty(value = "resourceId", required = true) + private String resourceId; + + /** Creates an instance of ResourceAccessRules class. */ + public ResourceAccessRules() { + } + + /** + * Get the tenantId property: The tenant ID of resource. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Set the tenantId property: The tenant ID of resource. + * + * @param tenantId the tenantId value to set. + * @return the ResourceAccessRules object itself. + */ + public ResourceAccessRules withTenantId(String tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Get the resourceId property: Resource ID. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the resourceId property: Resource ID. + * + * @param resourceId the resourceId value to set. + * @return the ResourceAccessRules object itself. + */ + public ResourceAccessRules withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (tenantId() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property tenantId in model ResourceAccessRules")); + } + if (resourceId() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property resourceId in model ResourceAccessRules")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ResourceAccessRules.class); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/RestorePolicy.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/RestorePolicy.java new file mode 100644 index 000000000000..cb3ad7f59371 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/RestorePolicy.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Restore Policy. */ +@Fluent +public final class RestorePolicy { + /* + * Restore Policy enabled or disabled boolean value + */ + @JsonProperty(value = "enabled", required = true) + private boolean enabled; + + /* + * Restore Policy in days + */ + @JsonProperty(value = "days", required = true) + private int days; + + /** Creates an instance of RestorePolicy class. */ + public RestorePolicy() { + } + + /** + * Get the enabled property: Restore Policy enabled or disabled boolean value. + * + * @return the enabled value. + */ + public boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Restore Policy enabled or disabled boolean value. + * + * @param enabled the enabled value to set. + * @return the RestorePolicy object itself. + */ + public RestorePolicy withEnabled(boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the days property: Restore Policy in days. + * + * @return the days value. + */ + public int days() { + return this.days; + } + + /** + * Set the days property: Restore Policy in days. + * + * @param days the days value to set. + * @return the RestorePolicy object itself. + */ + public RestorePolicy withDays(int days) { + this.days = days; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/RetentionProperties.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/RetentionProperties.java new file mode 100644 index 000000000000..cf638b2b8e2d --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/RetentionProperties.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The retention properties model. */ +@Fluent +public final class RetentionProperties { + /* + * The data retention period in days + */ + @JsonProperty(value = "retentionDays", required = true) + private int retentionDays; + + /** Creates an instance of RetentionProperties class. */ + public RetentionProperties() { + } + + /** + * Get the retentionDays property: The data retention period in days. + * + * @return the retentionDays value. + */ + public int retentionDays() { + return this.retentionDays; + } + + /** + * Set the retentionDays property: The data retention period in days. + * + * @param retentionDays the retentionDays value to set. + * @return the RetentionProperties object itself. + */ + public RetentionProperties withRetentionDays(int retentionDays) { + this.retentionDays = retentionDays; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/Storages.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/Storages.java new file mode 100644 index 000000000000..d4ec74ee19c8 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/Storages.java @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of Storages. */ +public interface Storages { + /** + * List DataLakeHouseResources resources by subscription ID. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataLakeHouseResources list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * List DataLakeHouseResources resources by subscription ID. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataLakeHouseResources list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(Context context); + + /** + * List DataLakeHouseResources resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataLakeHouseResources list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List DataLakeHouseResources resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DataLakeHouseResources list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Get a DataLakeHouseResources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageName The data lake house resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DataLakeHouseResources along with {@link Response}. + */ + Response getByResourceGroupWithResponse( + String resourceGroupName, String storageName, Context context); + + /** + * Get a DataLakeHouseResources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageName The data lake house resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DataLakeHouseResources. + */ + DataLakeHouseResources getByResourceGroup(String resourceGroupName, String storageName); + + /** + * Delete a DataLakeHouseResources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageName The data lake house resource name. + * @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 deleteByResourceGroup(String resourceGroupName, String storageName); + + /** + * Delete a DataLakeHouseResources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageName The data lake house resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String storageName, Context context); + + /** + * Get a DataLakeHouseResources. + * + * @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 a DataLakeHouseResources along with {@link Response}. + */ + DataLakeHouseResources getById(String id); + + /** + * Get a DataLakeHouseResources. + * + * @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 a DataLakeHouseResources along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a DataLakeHouseResources. + * + * @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 DataLakeHouseResources. + * + * @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 DataLakeHouseResources resource. + * + * @param name resource name. + * @return the first stage of the new DataLakeHouseResources definition. + */ + DataLakeHouseResources.DefinitionStages.Blank define(String name); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/VirtualNetworkConfiguration.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/VirtualNetworkConfiguration.java new file mode 100644 index 000000000000..b36d4cbc9e00 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/VirtualNetworkConfiguration.java @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Virtual Network Configuration. */ +@Fluent +public final class VirtualNetworkConfiguration { + /* + * Resource ID of a subnet + */ + @JsonProperty(value = "subnetId", required = true) + private String subnetId; + + /* + * Engine Public IP ID + */ + @JsonProperty(value = "enginePublicIpId", required = true) + private String enginePublicIpId; + + /* + * Data Management Public Ip ID + */ + @JsonProperty(value = "dataManagementPublicIpId", required = true) + private String dataManagementPublicIpId; + + /** Creates an instance of VirtualNetworkConfiguration class. */ + public VirtualNetworkConfiguration() { + } + + /** + * Get the subnetId property: Resource ID of a subnet. + * + * @return the subnetId value. + */ + public String subnetId() { + return this.subnetId; + } + + /** + * Set the subnetId property: Resource ID of a subnet. + * + * @param subnetId the subnetId value to set. + * @return the VirtualNetworkConfiguration object itself. + */ + public VirtualNetworkConfiguration withSubnetId(String subnetId) { + this.subnetId = subnetId; + return this; + } + + /** + * Get the enginePublicIpId property: Engine Public IP ID. + * + * @return the enginePublicIpId value. + */ + public String enginePublicIpId() { + return this.enginePublicIpId; + } + + /** + * Set the enginePublicIpId property: Engine Public IP ID. + * + * @param enginePublicIpId the enginePublicIpId value to set. + * @return the VirtualNetworkConfiguration object itself. + */ + public VirtualNetworkConfiguration withEnginePublicIpId(String enginePublicIpId) { + this.enginePublicIpId = enginePublicIpId; + return this; + } + + /** + * Get the dataManagementPublicIpId property: Data Management Public Ip ID. + * + * @return the dataManagementPublicIpId value. + */ + public String dataManagementPublicIpId() { + return this.dataManagementPublicIpId; + } + + /** + * Set the dataManagementPublicIpId property: Data Management Public Ip ID. + * + * @param dataManagementPublicIpId the dataManagementPublicIpId value to set. + * @return the VirtualNetworkConfiguration object itself. + */ + public VirtualNetworkConfiguration withDataManagementPublicIpId(String dataManagementPublicIpId) { + this.dataManagementPublicIpId = dataManagementPublicIpId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (subnetId() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property subnetId in model VirtualNetworkConfiguration")); + } + if (enginePublicIpId() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property enginePublicIpId in model VirtualNetworkConfiguration")); + } + if (dataManagementPublicIpId() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property dataManagementPublicIpId in model VirtualNetworkConfiguration")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(VirtualNetworkConfiguration.class); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/VirtualNetworkRule.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/VirtualNetworkRule.java new file mode 100644 index 000000000000..d60ce0afca1a --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/VirtualNetworkRule.java @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Virtual Network Rule. */ +@Fluent +public final class VirtualNetworkRule { + /* + * Resource ID of a subnet + */ + @JsonProperty(value = "id", required = true) + private String id; + + /* + * The action of virtual network rule. + */ + @JsonProperty(value = "action") + private String action; + + /* + * Gets the state of virtual network rule. + */ + @JsonProperty(value = "state") + private String state; + + /** Creates an instance of VirtualNetworkRule class. */ + public VirtualNetworkRule() { + } + + /** + * Get the id property: Resource ID of a subnet. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: Resource ID of a subnet. + * + * @param id the id value to set. + * @return the VirtualNetworkRule object itself. + */ + public VirtualNetworkRule withId(String id) { + this.id = id; + return this; + } + + /** + * Get the action property: The action of virtual network rule. + * + * @return the action value. + */ + public String action() { + return this.action; + } + + /** + * Set the action property: The action of virtual network rule. + * + * @param action the action value to set. + * @return the VirtualNetworkRule object itself. + */ + public VirtualNetworkRule withAction(String action) { + this.action = action; + return this; + } + + /** + * Get the state property: Gets the state of virtual network rule. + * + * @return the state value. + */ + public String state() { + return this.state; + } + + /** + * Set the state property: Gets the state of virtual network rule. + * + * @param state the state value to set. + * @return the VirtualNetworkRule object itself. + */ + public VirtualNetworkRule withState(String state) { + this.state = state; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (id() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property id in model VirtualNetworkRule")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(VirtualNetworkRule.class); +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/package-info.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/package-info.java new file mode 100644 index 000000000000..8f1eb2fda840 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/models/package-info.java @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** Package containing the data models for MicrosoftNetworkAnalytics. null. */ +package com.azure.resourcemanager.networkanalytics.models; diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/package-info.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/package-info.java new file mode 100644 index 000000000000..9742d59488a3 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/com/azure/resourcemanager/networkanalytics/package-info.java @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** Package containing the classes for MicrosoftNetworkAnalytics. null. */ +package com.azure.resourcemanager.networkanalytics; diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/module-info.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/module-info.java new file mode 100644 index 000000000000..53f5fee0b714 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/main/java/module-info.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +module com.azure.resourcemanager.networkanalytics { + requires transitive com.azure.core.management; + + exports com.azure.resourcemanager.networkanalytics; + exports com.azure.resourcemanager.networkanalytics.fluent; + exports com.azure.resourcemanager.networkanalytics.fluent.models; + exports com.azure.resourcemanager.networkanalytics.models; + + opens com.azure.resourcemanager.networkanalytics.fluent.models to + com.azure.core, + com.fasterxml.jackson.databind; + opens com.azure.resourcemanager.networkanalytics.models to + com.azure.core, + com.fasterxml.jackson.databind; +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataConnectorOperationCreateOrUpdateSamples.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataConnectorOperationCreateOrUpdateSamples.java new file mode 100644 index 000000000000..e0d29aa80c88 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataConnectorOperationCreateOrUpdateSamples.java @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +import com.azure.resourcemanager.networkanalytics.models.ComputeConfiguration; +import com.azure.resourcemanager.networkanalytics.models.DataConnectorConfiguration; +import com.azure.resourcemanager.networkanalytics.models.DataRetentionProperties; +import com.azure.resourcemanager.networkanalytics.models.DatasetConfiguration; +import com.azure.resourcemanager.networkanalytics.models.ManagedResourceGroupConfiguration; +import com.azure.resourcemanager.networkanalytics.models.RetentionProperties; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for DataConnectorOperation CreateOrUpdate. */ +public final class DataConnectorOperationCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/DataConnector_CreateOrUpdate_MaximumSet_Gen.json + */ + /** + * Sample code: DataConnector_CreateOrUpdate_Max. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void dataConnectorCreateOrUpdateMax( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager + .dataConnectorOperations() + .define("rtjrnwmvydrsclcye") + .withRegion("lkdprsvepnusozfvpkqqv") + .withExistingResourceGroup("rgopenapi") + .withTags(mapOf("key1835", "zatlpsdiibblpxqyxvnxrvk")) + .withManagedResourceGroupConfiguration( + new ManagedResourceGroupConfiguration() + .withName("flfqtliobufzhuxkhfhj") + .withLocation("ecafvspgcuuampnlsrihbgtujgouq")) + .withProductName("dbdypish") + .withProductVersion("yybjrksardkllouublivbduzjlwqjk") + .withProductConnector("yrazxjkyicvx") + .withProductConnectorDataset("dmlyvcshemlfhmyvofqofw") + .withDataLakeHouses(Arrays.asList("advwikycmuguhupha")) + .withDataConnectorConfiguration( + new DataConnectorConfiguration() + .withDataRetentionProperties( + new DataRetentionProperties() + .withDataExplorer(new RetentionProperties().withRetentionDays(7)) + .withBronzeStorageAccount(new RetentionProperties().withRetentionDays(7)) + .withSilverStorageAccount(new RetentionProperties().withRetentionDays(7)) + .withGoldStorageAccount(new RetentionProperties().withRetentionDays(7))) + .withDataset( + new DatasetConfiguration() + .withDatasetName("ptknewelhh") + .withTimestampKey(OffsetDateTime.parse("2023-01-30T18:13:09.337Z")) + .withColumnsToMask(Arrays.asList("gdjwh"))) + .withCompute(new ComputeConfiguration().withFailureAlertEmail("pummjy").withThroughput(20))) + .create(); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/DataConnector_CreateOrUpdate_MinimumSet_Gen.json + */ + /** + * Sample code: DataConnector_CreateOrUpdate_Min. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void dataConnectorCreateOrUpdateMin( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager + .dataConnectorOperations() + .define("dndnibjbfuuhrkqhlofcjke") + .withRegion("lkdprsvepnusozfvpkqqv") + .withExistingResourceGroup("rgopenapi") + .create(); + } + + @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/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataConnectorOperationDeleteSamples.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataConnectorOperationDeleteSamples.java new file mode 100644 index 000000000000..c79d107318e6 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataConnectorOperationDeleteSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +/** Samples for DataConnectorOperation Delete. */ +public final class DataConnectorOperationDeleteSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/DataConnector_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: DataConnector_Delete_Max. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void dataConnectorDeleteMax( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager.dataConnectorOperations().delete("rgopenapi", "tqpdqptkngnlz", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/DataConnector_Delete_MinimumSet_Gen.json + */ + /** + * Sample code: DataConnector_Delete_Min. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void dataConnectorDeleteMin( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager.dataConnectorOperations().delete("rgopenapi", "vqcxivaljzxyuyanosyf", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataConnectorOperationGetByResourceGroupSamples.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataConnectorOperationGetByResourceGroupSamples.java new file mode 100644 index 000000000000..b935622789bf --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataConnectorOperationGetByResourceGroupSamples.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +/** Samples for DataConnectorOperation GetByResourceGroup. */ +public final class DataConnectorOperationGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/DataConnector_Get_MinimumSet_Gen.json + */ + /** + * Sample code: DataConnector_Get_Min. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void dataConnectorGetMin(com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager + .dataConnectorOperations() + .getByResourceGroupWithResponse("rgopenapi", "czghteymeeuvs", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/DataConnector_Get_MaximumSet_Gen.json + */ + /** + * Sample code: DataConnector_Get_Max. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void dataConnectorGetMax(com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager + .dataConnectorOperations() + .getByResourceGroupWithResponse("rgopenapi", "gdoqhclsirtskithgh", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataConnectorOperationListByResourceGroupSamples.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataConnectorOperationListByResourceGroupSamples.java new file mode 100644 index 000000000000..c7fd7b1b05ad --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataConnectorOperationListByResourceGroupSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +/** Samples for DataConnectorOperation ListByResourceGroup. */ +public final class DataConnectorOperationListByResourceGroupSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/DataConnector_ListByResourceGroup_MaximumSet_Gen.json + */ + /** + * Sample code: DataConnector_ListByResourceGroup_Max. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void dataConnectorListByResourceGroupMax( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager.dataConnectorOperations().listByResourceGroup("rgopenapi", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/DataConnector_ListByResourceGroup_MinimumSet_Gen.json + */ + /** + * Sample code: DataConnector_ListByResourceGroup_Min. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void dataConnectorListByResourceGroupMin( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager.dataConnectorOperations().listByResourceGroup("rgopenapi", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataConnectorOperationListSamples.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataConnectorOperationListSamples.java new file mode 100644 index 000000000000..135c998a7436 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataConnectorOperationListSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +/** Samples for DataConnectorOperation List. */ +public final class DataConnectorOperationListSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/DataConnector_ListBySubscription_MaximumSet_Gen.json + */ + /** + * Sample code: DataConnector_ListBySubscription_Max. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void dataConnectorListBySubscriptionMax( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager.dataConnectorOperations().list(com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/DataConnector_ListBySubscription_MinimumSet_Gen.json + */ + /** + * Sample code: DataConnector_ListBySubscription_Min. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void dataConnectorListBySubscriptionMin( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager.dataConnectorOperations().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataConnectorOperationUpdateSamples.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataConnectorOperationUpdateSamples.java new file mode 100644 index 000000000000..41b5492773f7 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/DataConnectorOperationUpdateSamples.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +import com.azure.resourcemanager.networkanalytics.models.DataConnectors; +import com.azure.resourcemanager.networkanalytics.models.ManagedResourceGroupConfiguration; +import java.util.HashMap; +import java.util.Map; + +/** Samples for DataConnectorOperation Update. */ +public final class DataConnectorOperationUpdateSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/DataConnector_Update_MinimumSet_Gen.json + */ + /** + * Sample code: DataConnector_Update_Min. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void dataConnectorUpdateMin( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + DataConnectors resource = + manager + .dataConnectorOperations() + .getByResourceGroupWithResponse( + "rgopenapi", "lhgdolhycyfphurejkwickn", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().apply(); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/DataConnector_Update_MaximumSet_Gen.json + */ + /** + * Sample code: DataConnector_Update_Max. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void dataConnectorUpdateMax( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + DataConnectors resource = + manager + .dataConnectorOperations() + .getByResourceGroupWithResponse("rgopenapi", "hs", com.azure.core.util.Context.NONE) + .getValue(); + resource + .update() + .withTags(mapOf("key8943", "u")) + .withManagedResourceGroupConfiguration( + new ManagedResourceGroupConfiguration() + .withName("flfqtliobufzhuxkhfhj") + .withLocation("ecafvspgcuuampnlsrihbgtujgouq")) + .apply(); + } + + @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/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/MetricsIngestionEndpointsCreateOrUpdateSamples.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/MetricsIngestionEndpointsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..83773bd86719 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/MetricsIngestionEndpointsCreateOrUpdateSamples.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +import com.azure.resourcemanager.networkanalytics.fluent.models.MetricsIngestionEndpointResourcesInner; +import com.azure.resourcemanager.networkanalytics.models.ManagedResourceGroupConfiguration; + +/** Samples for MetricsIngestionEndpoints CreateOrUpdate. */ +public final class MetricsIngestionEndpointsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/MetricsIngestionEndpoints_CreateOrUpdate_MinimumSet_Gen.json + */ + /** + * Sample code: MetricsIngestionEndpoints_CreateOrUpdate_Min. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void metricsIngestionEndpointsCreateOrUpdateMin( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager + .metricsIngestionEndpoints() + .createOrUpdate( + "ozrlousqyukjkqtvgmrk", new MetricsIngestionEndpointResourcesInner(), com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/MetricsIngestionEndpoints_CreateOrUpdate_MaximumSet_Gen.json + */ + /** + * Sample code: MetricsIngestionEndpoints_CreateOrUpdate_Max. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void metricsIngestionEndpointsCreateOrUpdateMax( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager + .metricsIngestionEndpoints() + .createOrUpdate( + "ozrlousqyukjkqtvgmrk", + new MetricsIngestionEndpointResourcesInner() + .withIngressRegionName("vehndmisl") + .withManagedResourceGroupConfiguration( + new ManagedResourceGroupConfiguration() + .withName("flfqtliobufzhuxkhfhj") + .withLocation("ecafvspgcuuampnlsrihbgtujgouq")), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/MetricsIngestionEndpointsDeleteSamples.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/MetricsIngestionEndpointsDeleteSamples.java new file mode 100644 index 000000000000..3d631078a40f --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/MetricsIngestionEndpointsDeleteSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +/** Samples for MetricsIngestionEndpoints Delete. */ +public final class MetricsIngestionEndpointsDeleteSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/MetricsIngestionEndpoints_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: MetricsIngestionEndpoints_Delete_Max. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void metricsIngestionEndpointsDeleteMax( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager.metricsIngestionEndpoints().delete("ozrlousqyukjkqtvgmrk", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/MetricsIngestionEndpoints_Delete_MinimumSet_Gen.json + */ + /** + * Sample code: MetricsIngestionEndpoints_Delete_Min. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void metricsIngestionEndpointsDeleteMin( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager.metricsIngestionEndpoints().delete("ozrlousqyukjkqtvgmrk", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/MetricsIngestionEndpointsGetSamples.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/MetricsIngestionEndpointsGetSamples.java new file mode 100644 index 000000000000..b27e5c7df9c3 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/MetricsIngestionEndpointsGetSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +/** Samples for MetricsIngestionEndpoints Get. */ +public final class MetricsIngestionEndpointsGetSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/MetricsIngestionEndpoints_Get_MaximumSet_Gen.json + */ + /** + * Sample code: MetricsIngestionEndpoints_Get_Max. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void metricsIngestionEndpointsGetMax( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager.metricsIngestionEndpoints().getWithResponse("ozrlousqyukjkqtvgmrk", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/MetricsIngestionEndpoints_Get_MinimumSet_Gen.json + */ + /** + * Sample code: MetricsIngestionEndpoints_Get_Min. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void metricsIngestionEndpointsGetMin( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager.metricsIngestionEndpoints().getWithResponse("ozrlousqyukjkqtvgmrk", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/MetricsIngestionEndpointsListSamples.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/MetricsIngestionEndpointsListSamples.java new file mode 100644 index 000000000000..dd33606fa8e0 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/MetricsIngestionEndpointsListSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +/** Samples for MetricsIngestionEndpoints List. */ +public final class MetricsIngestionEndpointsListSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/MetricsIngestionEndpoints_List_MaximumSet_Gen.json + */ + /** + * Sample code: MetricsIngestionEndpoints_List_Max. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void metricsIngestionEndpointsListMax( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager.metricsIngestionEndpoints().list("ozrlousqyukjkqtvgmrk", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/MetricsIngestionEndpoints_List_MinimumSet_Gen.json + */ + /** + * Sample code: MetricsIngestionEndpoints_List_Min. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void metricsIngestionEndpointsListMin( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager.metricsIngestionEndpoints().list("ozrlousqyukjkqtvgmrk", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/MetricsIngestionEndpointsUpdateSamples.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/MetricsIngestionEndpointsUpdateSamples.java new file mode 100644 index 000000000000..018b671d007b --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/MetricsIngestionEndpointsUpdateSamples.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerEncoding; +import java.io.IOException; + +/** Samples for MetricsIngestionEndpoints Update. */ +public final class MetricsIngestionEndpointsUpdateSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/MetricsIngestionEndpoints_Update_MaximumSet_Gen.json + */ + /** + * Sample code: MetricsIngestionEndpoints_Update_Max. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void metricsIngestionEndpointsUpdateMax( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) throws IOException { + manager + .metricsIngestionEndpoints() + .updateWithResponse( + "ozrlousqyukjkqtvgmrk", + SerializerFactory + .createDefaultManagementSerializerAdapter() + .deserialize("{}", Object.class, SerializerEncoding.JSON), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/MetricsIngestionEndpoints_Update_MinimumSet_Gen.json + */ + /** + * Sample code: MetricsIngestionEndpoints_Update_Min. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void metricsIngestionEndpointsUpdateMin( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) throws IOException { + manager + .metricsIngestionEndpoints() + .updateWithResponse( + "ozrlousqyukjkqtvgmrk", + SerializerFactory + .createDefaultManagementSerializerAdapter() + .deserialize("{}", Object.class, SerializerEncoding.JSON), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/NetworkAnalyticsProductOperationCreateOrUpdateSamples.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/NetworkAnalyticsProductOperationCreateOrUpdateSamples.java new file mode 100644 index 000000000000..971aa5e4f9fb --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/NetworkAnalyticsProductOperationCreateOrUpdateSamples.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +import com.azure.resourcemanager.networkanalytics.fluent.models.NetworkAnalyticsProductsInner; +import com.azure.resourcemanager.networkanalytics.models.NetworkAnalyticsProductConnectorInformation; +import com.azure.resourcemanager.networkanalytics.models.NetworkAnalyticsProductInformation; +import java.util.Arrays; + +/** Samples for NetworkAnalyticsProductOperation CreateOrUpdate. */ +public final class NetworkAnalyticsProductOperationCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/NetworkAnalyticsProduct_CreateOrUpdate_MaximumSet_Gen.json + */ + /** + * Sample code: NetworkAnalyticsProduct_CreateOrUpdate_Max. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void networkAnalyticsProductCreateOrUpdateMax( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager + .networkAnalyticsProductOperations() + .createOrUpdate( + "rgopenapi", + new NetworkAnalyticsProductsInner() + .withNetworkAnalyticsProductInformation( + new NetworkAnalyticsProductInformation() + .withProductName("hknfsjhzhl") + .withProductVersions(Arrays.asList("wxpytpcolbhrictzmjognhmpcrbb")) + .withProductConnectors( + Arrays + .asList( + new NetworkAnalyticsProductConnectorInformation() + .withConnectorName("ksaamsmnroclmiaebmhnypfeglpnpuqe") + .withDatasets(Arrays.asList("ga"))))), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/NetworkAnalyticsProduct_CreateOrUpdate_MinimumSet_Gen.json + */ + /** + * Sample code: NetworkAnalyticsProduct_CreateOrUpdate_Min. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void networkAnalyticsProductCreateOrUpdateMin( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager + .networkAnalyticsProductOperations() + .createOrUpdate("rgopenapi", new NetworkAnalyticsProductsInner(), com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/NetworkAnalyticsProductOperationDeleteSamples.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/NetworkAnalyticsProductOperationDeleteSamples.java new file mode 100644 index 000000000000..9694bd11e4d4 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/NetworkAnalyticsProductOperationDeleteSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +/** Samples for NetworkAnalyticsProductOperation Delete. */ +public final class NetworkAnalyticsProductOperationDeleteSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/NetworkAnalyticsProduct_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: NetworkAnalyticsProduct_Delete_Max. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void networkAnalyticsProductDeleteMax( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager.networkAnalyticsProductOperations().delete("rgopenapi", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/NetworkAnalyticsProduct_Delete_MinimumSet_Gen.json + */ + /** + * Sample code: NetworkAnalyticsProduct_Delete_Min. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void networkAnalyticsProductDeleteMin( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager.networkAnalyticsProductOperations().delete("rgopenapi", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/NetworkAnalyticsProductOperationGetByResourceGroupSamples.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/NetworkAnalyticsProductOperationGetByResourceGroupSamples.java new file mode 100644 index 000000000000..1c21f1c97052 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/NetworkAnalyticsProductOperationGetByResourceGroupSamples.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +/** Samples for NetworkAnalyticsProductOperation GetByResourceGroup. */ +public final class NetworkAnalyticsProductOperationGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/NetworkAnalyticsProduct_Get_MaximumSet_Gen.json + */ + /** + * Sample code: NetworkAnalyticsProduct_Get_Max. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void networkAnalyticsProductGetMax( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager + .networkAnalyticsProductOperations() + .getByResourceGroupWithResponse("rgopenapi", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/NetworkAnalyticsProduct_Get_MinimumSet_Gen.json + */ + /** + * Sample code: NetworkAnalyticsProduct_Get_Min. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void networkAnalyticsProductGetMin( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager + .networkAnalyticsProductOperations() + .getByResourceGroupWithResponse("rgopenapi", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/NetworkAnalyticsProductOperationListByResourceGroupSamples.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/NetworkAnalyticsProductOperationListByResourceGroupSamples.java new file mode 100644 index 000000000000..50e19feda34a --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/NetworkAnalyticsProductOperationListByResourceGroupSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +/** Samples for NetworkAnalyticsProductOperation ListByResourceGroup. */ +public final class NetworkAnalyticsProductOperationListByResourceGroupSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/NetworkAnalyticsProduct_ListByResourceGroup_MinimumSet_Gen.json + */ + /** + * Sample code: NetworkAnalyticsProduct_ListByResourceGroup_Min. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void networkAnalyticsProductListByResourceGroupMin( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager.networkAnalyticsProductOperations().listByResourceGroup("rgopenapi", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/NetworkAnalyticsProduct_ListByResourceGroup_MaximumSet_Gen.json + */ + /** + * Sample code: NetworkAnalyticsProduct_ListByResourceGroup_Max. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void networkAnalyticsProductListByResourceGroupMax( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager.networkAnalyticsProductOperations().listByResourceGroup("rgopenapi", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/NetworkAnalyticsProductOperationListSamples.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/NetworkAnalyticsProductOperationListSamples.java new file mode 100644 index 000000000000..f7e438e0c2c4 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/NetworkAnalyticsProductOperationListSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +/** Samples for NetworkAnalyticsProductOperation List. */ +public final class NetworkAnalyticsProductOperationListSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/NetworkAnalyticsProduct_ListBySubscription_MinimumSet_Gen.json + */ + /** + * Sample code: NetworkAnalyticsProduct_ListBySubscription_Min. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void networkAnalyticsProductListBySubscriptionMin( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager.networkAnalyticsProductOperations().list(com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/NetworkAnalyticsProduct_ListBySubscription_MaximumSet_Gen.json + */ + /** + * Sample code: NetworkAnalyticsProduct_ListBySubscription_Max. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void networkAnalyticsProductListBySubscriptionMax( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager.networkAnalyticsProductOperations().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/NetworkAnalyticsProductOperationUpdateSamples.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/NetworkAnalyticsProductOperationUpdateSamples.java new file mode 100644 index 000000000000..a12e28e826c8 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/NetworkAnalyticsProductOperationUpdateSamples.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerEncoding; +import java.io.IOException; + +/** Samples for NetworkAnalyticsProductOperation Update. */ +public final class NetworkAnalyticsProductOperationUpdateSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/NetworkAnalyticsProduct_Update_MinimumSet_Gen.json + */ + /** + * Sample code: NetworkAnalyticsProduct_Update_Min. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void networkAnalyticsProductUpdateMin( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) throws IOException { + manager + .networkAnalyticsProductOperations() + .updateWithResponse( + "rgopenapi", + SerializerFactory + .createDefaultManagementSerializerAdapter() + .deserialize("{}", Object.class, SerializerEncoding.JSON), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/NetworkAnalyticsProduct_Update_MaximumSet_Gen.json + */ + /** + * Sample code: NetworkAnalyticsProduct_Update_Max. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void networkAnalyticsProductUpdateMax( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) throws IOException { + manager + .networkAnalyticsProductOperations() + .updateWithResponse( + "rgopenapi", + SerializerFactory + .createDefaultManagementSerializerAdapter() + .deserialize("{}", Object.class, SerializerEncoding.JSON), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/OperationsListSamples.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/OperationsListSamples.java new file mode 100644 index 000000000000..d06b0a56c731 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/OperationsListSamples.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +/** Samples for Operations List. */ +public final class OperationsListSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/Operations_List_MaximumSet_Gen.json + */ + /** + * Sample code: Operations_List_Max. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void operationsListMax(com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager.operations().list(com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/Operations_List_MinimumSet_Gen.json + */ + /** + * Sample code: Operations_List_Min. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void operationsListMin(com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager.operations().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/StorageCreateOrUpdateSamples.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/StorageCreateOrUpdateSamples.java new file mode 100644 index 000000000000..2c3de566b024 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/StorageCreateOrUpdateSamples.java @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +import com.azure.resourcemanager.networkanalytics.models.AzureDataExplorerProperties; +import com.azure.resourcemanager.networkanalytics.models.BlobServices; +import com.azure.resourcemanager.networkanalytics.models.BronzeStorageAccountProperties; +import com.azure.resourcemanager.networkanalytics.models.Bypass; +import com.azure.resourcemanager.networkanalytics.models.CommonStorageAccountProperties; +import com.azure.resourcemanager.networkanalytics.models.DefaultAction; +import com.azure.resourcemanager.networkanalytics.models.IpRules; +import com.azure.resourcemanager.networkanalytics.models.KustoClusterPrincipalAssignments; +import com.azure.resourcemanager.networkanalytics.models.KustoRole; +import com.azure.resourcemanager.networkanalytics.models.ManagedResourceGroupConfiguration; +import com.azure.resourcemanager.networkanalytics.models.NetworkAcls; +import com.azure.resourcemanager.networkanalytics.models.PrincipalType; +import com.azure.resourcemanager.networkanalytics.models.PrivateEndPoint; +import com.azure.resourcemanager.networkanalytics.models.ResourceAccessRules; +import com.azure.resourcemanager.networkanalytics.models.RestorePolicy; +import com.azure.resourcemanager.networkanalytics.models.VirtualNetworkConfiguration; +import com.azure.resourcemanager.networkanalytics.models.VirtualNetworkRule; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Storage CreateOrUpdate. */ +public final class StorageCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/Storage_CreateOrUpdate_MaximumSet_Gen.json + */ + /** + * Sample code: Storage_CreateOrUpdate_Max. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void storageCreateOrUpdateMax( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager + .storages() + .define("jnnuodll") + .withRegion("sybchhoambcfnzflnztjwgfu") + .withExistingResourceGroup("rgopenapi") + .withTags(mapOf("key2848", "kfzdswbuaip")) + .withManagedResourceGroupConfiguration( + new ManagedResourceGroupConfiguration() + .withName("flfqtliobufzhuxkhfhj") + .withLocation("ecafvspgcuuampnlsrihbgtujgouq")) + .withUniqueIdentifierName("suoxyedxsghz") + .withCommonStorageAccountProperties( + new CommonStorageAccountProperties() + .withPublicNetworkAccess("azfwzowpeno") + .withNetworkacls( + new NetworkAcls() + .withBypass(Bypass.NONE) + .withVirtualNetworkRule( + Arrays + .asList( + new VirtualNetworkRule() + .withId("xofnybcganrcfiimqreegaqouxfnlm") + .withAction("zwzn") + .withState("tnzqojumw"))) + .withIpRules( + Arrays + .asList( + new IpRules().withValue("kzxsxagfrpdvkjzusofdxko").withAction("wgqxykwovhff"))) + .withResourceAccessRules( + Arrays + .asList( + new ResourceAccessRules() + .withTenantId("ho") + .withResourceId("svitkayadlrrdxrjbzcemnaccoamqq"))) + .withDefaultActionType(DefaultAction.ALLOW)) + .withBlobServices( + new BlobServices().withRestorePolicy(new RestorePolicy().withEnabled(true).withDays(30))) + .withPrivateEndPoint( + new PrivateEndPoint() + .withSubnetId("qggeyzgrqodijtcutjelsizyxhd") + .withPrivateLinkServiceId("zqiirxmwqhakbabwneipctzxk") + .withGroupIds(Arrays.asList("itvtdkkpifhfiqhpjb")) + .withCustomDnsConfigs("cylmvnl"))) + .withBronzeStorageAccountProperties(new BronzeStorageAccountProperties().withIsSftpEnabled(true)) + .withAzureDataExplorerProperties( + new AzureDataExplorerProperties() + .withVirtualNetworkConfiguration( + new VirtualNetworkConfiguration() + .withSubnetId("wybwuekeixatewpihdfww") + .withEnginePublicIpId("qesxpfxpgzusjhgrjhtbrziv") + .withDataManagementPublicIpId("yaunpigmlnsbzjyal")) + .withKustoClusterPrincipalAssignments( + new KustoClusterPrincipalAssignments() + .withSystemIdentityName("dpvrzrysnb") + .withRole(KustoRole.ALL_DATABASES_ADMIN) + .withPrincipalType(PrincipalType.APP))) + .create(); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/Storage_CreateOrUpdate_MinimumSet_Gen.json + */ + /** + * Sample code: Storage_CreateOrUpdate_Min. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void storageCreateOrUpdateMin( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager + .storages() + .define("wssafffmuepzooqsiormn") + .withRegion("sybchhoambcfnzflnztjwgfu") + .withExistingResourceGroup("rgopenapi") + .create(); + } + + @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/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/StorageDeleteSamples.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/StorageDeleteSamples.java new file mode 100644 index 000000000000..543f8e9434ed --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/StorageDeleteSamples.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +/** Samples for Storage Delete. */ +public final class StorageDeleteSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/Storage_Delete_MinimumSet_Gen.json + */ + /** + * Sample code: Storage_Delete_Min. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void storageDeleteMin(com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager.storages().delete("rgopenapi", "hokmuhdfqghei", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/Storage_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: Storage_Delete_Max. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void storageDeleteMax(com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager.storages().delete("rgopenapi", "wlngxkftudslsecksjrxnfrtl", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/StorageGetByResourceGroupSamples.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/StorageGetByResourceGroupSamples.java new file mode 100644 index 000000000000..fc89520ec52b --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/StorageGetByResourceGroupSamples.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +/** Samples for Storage GetByResourceGroup. */ +public final class StorageGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/Storage_Get_MinimumSet_Gen.json + */ + /** + * Sample code: Storage_Get_Min. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void storageGetMin(com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager.storages().getByResourceGroupWithResponse("rgopenapi", "trwbfuc", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/Storage_Get_MaximumSet_Gen.json + */ + /** + * Sample code: Storage_Get_Max. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void storageGetMax(com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager + .storages() + .getByResourceGroupWithResponse( + "rgopenapi", "afalahfsayijbtrzpjzrvukqmunyw", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/StorageListByResourceGroupSamples.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/StorageListByResourceGroupSamples.java new file mode 100644 index 000000000000..469b66db7bac --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/StorageListByResourceGroupSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +/** Samples for Storage ListByResourceGroup. */ +public final class StorageListByResourceGroupSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/Storage_ListByResourceGroup_MaximumSet_Gen.json + */ + /** + * Sample code: Storage_ListByResourceGroup_Max. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void storageListByResourceGroupMax( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager.storages().listByResourceGroup("rgopenapi", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/Storage_ListByResourceGroup_MinimumSet_Gen.json + */ + /** + * Sample code: Storage_ListByResourceGroup_Min. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void storageListByResourceGroupMin( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager.storages().listByResourceGroup("rgopenapi", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/StorageListSamples.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/StorageListSamples.java new file mode 100644 index 000000000000..d2e494a05716 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/StorageListSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +/** Samples for Storage List. */ +public final class StorageListSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/Storage_ListBySubscription_MinimumSet_Gen.json + */ + /** + * Sample code: Storage_ListBySubscription_Min. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void storageListBySubscriptionMin( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager.storages().list(com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/Storage_ListBySubscription_MaximumSet_Gen.json + */ + /** + * Sample code: Storage_ListBySubscription_Max. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void storageListBySubscriptionMax( + com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + manager.storages().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/StorageUpdateSamples.java b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/StorageUpdateSamples.java new file mode 100644 index 000000000000..a40f2b125a03 --- /dev/null +++ b/sdk/networkanalytics/azure-resourcemanager-networkanalytics/src/samples/java/com/azure/resourcemanager/networkanalytics/generated/StorageUpdateSamples.java @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.networkanalytics.generated; + +import com.azure.resourcemanager.networkanalytics.models.DataLakeHouseResources; +import com.azure.resourcemanager.networkanalytics.models.ManagedResourceGroupConfiguration; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Storage Update. */ +public final class StorageUpdateSamples { + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/Storage_Update_MinimumSet_Gen.json + */ + /** + * Sample code: Storage_Update_Min. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void storageUpdateMin(com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + DataLakeHouseResources resource = + manager + .storages() + .getByResourceGroupWithResponse("rgopenapi", "xpyfslhorwbf", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().apply(); + } + + /* + * x-ms-original-file: specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-04-30/examples/Storage_Update_MaximumSet_Gen.json + */ + /** + * Sample code: Storage_Update_Max. + * + * @param manager Entry point to NetworkanalyticsManager. + */ + public static void storageUpdateMax(com.azure.resourcemanager.networkanalytics.NetworkanalyticsManager manager) { + DataLakeHouseResources resource = + manager + .storages() + .getByResourceGroupWithResponse("rgopenapi", "wkuqjmixiscljktf", com.azure.core.util.Context.NONE) + .getValue(); + resource + .update() + .withTags(mapOf("key9798", "pmpellthjljwbmpulnmobfodhjuq")) + .withManagedResourceGroupConfiguration( + new ManagedResourceGroupConfiguration() + .withName("flfqtliobufzhuxkhfhj") + .withLocation("ecafvspgcuuampnlsrihbgtujgouq")) + .apply(); + } + + @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/networkanalytics/ci.yml b/sdk/networkanalytics/ci.yml new file mode 100644 index 000000000000..339204c5378c --- /dev/null +++ b/sdk/networkanalytics/ci.yml @@ -0,0 +1,47 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: + branches: + include: + - main + - hotfix/* + - release/* + paths: + include: + - sdk/networkanalytics/ci.yml + - sdk/networkanalytics/azure-resourcemanager-networkanalytics/ + exclude: + - sdk/networkanalytics/pom.xml + - sdk/networkanalytics/azure-resourcemanager-networkanalytics/pom.xml + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/networkanalytics/ci.yml + - sdk/networkanalytics/azure-resourcemanager-networkanalytics/ + exclude: + - sdk/networkanalytics/pom.xml + - sdk/networkanalytics/azure-resourcemanager-networkanalytics/pom.xml + +parameters: + - name: release_azureresourcemanagernetworkanalytics + displayName: azure-resourcemanager-networkanalytics + type: boolean + default: false + +extends: + template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: networkanalytics + EnableBatchRelease: true + Artifacts: + - name: azure-resourcemanager-networkanalytics + groupId: com.azure.resourcemanager + safeName: azureresourcemanagernetworkanalytics + releaseInBatch: ${{ parameters.release_azureresourcemanagernetworkanalytics }} diff --git a/sdk/networkanalytics/pom.xml b/sdk/networkanalytics/pom.xml new file mode 100644 index 000000000000..5e6b0fc7a759 --- /dev/null +++ b/sdk/networkanalytics/pom.xml @@ -0,0 +1,15 @@ + + + 4.0.0 + com.azure + azure-networkanalytics-service + pom + 1.0.0 + + + azure-resourcemanager-networkanalytics + +