From 67c3f1d232569feb58f115605af27b6e0299609e Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 2 Aug 2022 18:11:05 +0000 Subject: [PATCH] CodeGen from PR 20072 in Azure/azure-rest-api-specs Merge d83c55aec572f679c39e21725a1a37204dc7ad72 into 055263ea0b7a5d3211229a6424e1fa21d2c03b4f --- .../CHANGELOG.md | 4 +- .../azure-resourcemanager-dashboard/README.md | 4 +- .../azure-resourcemanager-dashboard/SAMPLE.md | 206 ++- .../azure-resourcemanager-dashboard/pom.xml | 2 +- .../dashboard/DashboardManager.java | 45 +- .../fluent/DashboardManagementClient.java | 17 +- .../dashboard/fluent/OperationsClient.java | 10 +- .../PrivateEndpointConnectionsClient.java | 228 ++++ .../fluent/PrivateLinkResourcesClient.java | 72 + .../fluent/models/ManagedGrafanaInner.java | 8 +- ...onResultInner.java => OperationInner.java} | 37 +- .../PrivateEndpointConnectionInner.java | 140 ++ .../PrivateEndpointConnectionProperties.java | 135 ++ .../models/PrivateLinkResourceInner.java | 107 ++ .../models/PrivateLinkResourceProperties.java | 93 ++ .../DashboardManagementClientBuilder.java | 44 +- .../DashboardManagementClientImpl.java | 48 +- .../implementation/GrafanasClientImpl.java | 20 +- .../implementation/ManagedGrafanaImpl.java | 16 +- ...tionResultImpl.java => OperationImpl.java} | 13 +- .../implementation/OperationsClientImpl.java | 46 +- .../implementation/OperationsImpl.java | 16 +- .../PrivateEndpointConnectionImpl.java | 177 +++ .../PrivateEndpointConnectionsClientImpl.java | 1188 +++++++++++++++++ .../PrivateEndpointConnectionsImpl.java | 210 +++ .../PrivateLinkResourceImpl.java | 74 + .../PrivateLinkResourcesClientImpl.java | 519 +++++++ .../PrivateLinkResourcesImpl.java | 73 + .../dashboard/models/ActionType.java | 6 +- .../dashboard/models/ApiKey.java | 38 + .../AutoGeneratedDomainNameLabelScope.java | 6 +- .../AzureMonitorWorkspaceIntegration.java | 47 + .../models/DeterministicOutboundIp.java | 38 + .../dashboard/models/GrafanaIntegrations.java | 54 + .../dashboard/models/IdentityType.java | 34 - .../dashboard/models/ManagedGrafana.java | 25 +- .../models/ManagedGrafanaProperties.java | 170 ++- ...agedGrafanaPropertiesUpdateParameters.java | 157 +++ .../ManagedGrafanaUpdateParameters.java | 35 +- .../dashboard/models/ManagedIdentity.java | 119 -- .../models/ManagedServiceIdentity.java | 139 ++ .../models/ManagedServiceIdentityType.java | 45 + .../{OperationResult.java => Operation.java} | 22 +- .../dashboard/models/OperationDisplay.java | 26 +- .../dashboard/models/OperationListResult.java | 18 +- .../dashboard/models/Operations.java | 8 +- .../dashboard/models/Origin.java | 6 +- .../dashboard/models/PrivateEndpoint.java | 35 + .../models/PrivateEndpointConnection.java | 241 ++++ .../PrivateEndpointConnectionListResult.java | 66 + ...teEndpointConnectionProvisioningState.java | 45 + .../models/PrivateEndpointConnections.java | 142 ++ ...rivateEndpointServiceConnectionStatus.java | 42 + .../dashboard/models/PrivateLinkResource.java | 75 ++ .../models/PrivateLinkResourceListResult.java | 66 + .../models/PrivateLinkResources.java | 65 + .../PrivateLinkServiceConnectionState.java | 102 ++ .../dashboard/models/ProvisioningState.java | 6 +- .../dashboard/models/PublicNetworkAccess.java | 38 + .../models/UserAssignedIdentity.java | 19 +- .../dashboard/models/ZoneRedundancy.java | 6 +- .../generated/GrafanaCreateSamples.java | 29 +- .../generated/GrafanaDeleteSamples.java | 2 +- .../GrafanaGetByResourceGroupSamples.java | 2 +- .../GrafanaListByResourceGroupSamples.java | 2 +- .../generated/GrafanaListSamples.java | 2 +- .../generated/GrafanaUpdateSamples.java | 25 +- .../generated/OperationsListSamples.java | 2 +- ...vateEndpointConnectionsApproveSamples.java | 24 + ...ivateEndpointConnectionsDeleteSamples.java | 22 + .../PrivateEndpointConnectionsGetSamples.java | 24 + ...PrivateEndpointConnectionsListSamples.java | 22 + .../PrivateLinkResourcesGetSamples.java | 22 + .../PrivateLinkResourcesListSamples.java | 22 + 74 files changed, 5311 insertions(+), 382 deletions(-) create mode 100644 sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/fluent/PrivateEndpointConnectionsClient.java create mode 100644 sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/fluent/PrivateLinkResourcesClient.java rename sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/fluent/models/{OperationResultInner.java => OperationInner.java} (63%) create mode 100644 sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/fluent/models/PrivateEndpointConnectionInner.java create mode 100644 sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/fluent/models/PrivateEndpointConnectionProperties.java create mode 100644 sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/fluent/models/PrivateLinkResourceInner.java create mode 100644 sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/fluent/models/PrivateLinkResourceProperties.java rename sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/implementation/{OperationResultImpl.java => OperationImpl.java} (76%) create mode 100644 sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/implementation/PrivateEndpointConnectionImpl.java create mode 100644 sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/implementation/PrivateEndpointConnectionsClientImpl.java create mode 100644 sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/implementation/PrivateEndpointConnectionsImpl.java create mode 100644 sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/implementation/PrivateLinkResourceImpl.java create mode 100644 sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/implementation/PrivateLinkResourcesClientImpl.java create mode 100644 sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/implementation/PrivateLinkResourcesImpl.java create mode 100644 sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/ApiKey.java create mode 100644 sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/AzureMonitorWorkspaceIntegration.java create mode 100644 sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/DeterministicOutboundIp.java create mode 100644 sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/GrafanaIntegrations.java delete mode 100644 sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/IdentityType.java create mode 100644 sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/ManagedGrafanaPropertiesUpdateParameters.java delete mode 100644 sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/ManagedIdentity.java create mode 100644 sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/ManagedServiceIdentity.java create mode 100644 sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/ManagedServiceIdentityType.java rename sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/{OperationResult.java => Operation.java} (58%) create mode 100644 sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/PrivateEndpoint.java create mode 100644 sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/PrivateEndpointConnection.java create mode 100644 sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/PrivateEndpointConnectionListResult.java create mode 100644 sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/PrivateEndpointConnectionProvisioningState.java create mode 100644 sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/PrivateEndpointConnections.java create mode 100644 sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/PrivateEndpointServiceConnectionStatus.java create mode 100644 sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/PrivateLinkResource.java create mode 100644 sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/PrivateLinkResourceListResult.java create mode 100644 sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/PrivateLinkResources.java create mode 100644 sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/PrivateLinkServiceConnectionState.java create mode 100644 sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/PublicNetworkAccess.java create mode 100644 sdk/dashboard/azure-resourcemanager-dashboard/src/samples/java/com/azure/resourcemanager/dashboard/generated/PrivateEndpointConnectionsApproveSamples.java create mode 100644 sdk/dashboard/azure-resourcemanager-dashboard/src/samples/java/com/azure/resourcemanager/dashboard/generated/PrivateEndpointConnectionsDeleteSamples.java create mode 100644 sdk/dashboard/azure-resourcemanager-dashboard/src/samples/java/com/azure/resourcemanager/dashboard/generated/PrivateEndpointConnectionsGetSamples.java create mode 100644 sdk/dashboard/azure-resourcemanager-dashboard/src/samples/java/com/azure/resourcemanager/dashboard/generated/PrivateEndpointConnectionsListSamples.java create mode 100644 sdk/dashboard/azure-resourcemanager-dashboard/src/samples/java/com/azure/resourcemanager/dashboard/generated/PrivateLinkResourcesGetSamples.java create mode 100644 sdk/dashboard/azure-resourcemanager-dashboard/src/samples/java/com/azure/resourcemanager/dashboard/generated/PrivateLinkResourcesListSamples.java diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/CHANGELOG.md b/sdk/dashboard/azure-resourcemanager-dashboard/CHANGELOG.md index 1cabdde159e1..9602d52fd7fe 100644 --- a/sdk/dashboard/azure-resourcemanager-dashboard/CHANGELOG.md +++ b/sdk/dashboard/azure-resourcemanager-dashboard/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.0.0-beta.2 (Unreleased) +## 1.0.0-beta.1 (2022-08-02) + +- Azure Resource Manager Dashboard client library for Java. This package contains Microsoft Azure SDK for Dashboard Management SDK. The Microsoft.Dashboard Rest API spec. Package tag package-2022-08-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/README.md b/sdk/dashboard/azure-resourcemanager-dashboard/README.md index 66845e87ce0a..0cf90a6b7e2f 100644 --- a/sdk/dashboard/azure-resourcemanager-dashboard/README.md +++ b/sdk/dashboard/azure-resourcemanager-dashboard/README.md @@ -2,7 +2,7 @@ Azure Resource Manager Dashboard client library for Java. -This package contains Microsoft Azure SDK for Dashboard Management SDK. The Microsoft.Dashboard Rest API spec. Package tag package-2021-09-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for Dashboard Management SDK. The Microsoft.Dashboard Rest API spec. Package tag package-2022-08-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-dashboard - 1.0.0-beta.1 + 1.0.0-beta.2 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/SAMPLE.md b/sdk/dashboard/azure-resourcemanager-dashboard/SAMPLE.md index a204cd1cf2b4..7a1ac3421850 100644 --- a/sdk/dashboard/azure-resourcemanager-dashboard/SAMPLE.md +++ b/sdk/dashboard/azure-resourcemanager-dashboard/SAMPLE.md @@ -13,22 +13,39 @@ ## Operations - [List](#operations_list) + +## PrivateEndpointConnections + +- [Approve](#privateendpointconnections_approve) +- [Delete](#privateendpointconnections_delete) +- [Get](#privateendpointconnections_get) +- [List](#privateendpointconnections_list) + +## PrivateLinkResources + +- [Get](#privatelinkresources_get) +- [List](#privatelinkresources_list) ### Grafana_Create ```java -import com.azure.resourcemanager.dashboard.models.IdentityType; +import com.azure.resourcemanager.dashboard.models.ApiKey; +import com.azure.resourcemanager.dashboard.models.AzureMonitorWorkspaceIntegration; +import com.azure.resourcemanager.dashboard.models.DeterministicOutboundIp; +import com.azure.resourcemanager.dashboard.models.GrafanaIntegrations; import com.azure.resourcemanager.dashboard.models.ManagedGrafanaProperties; -import com.azure.resourcemanager.dashboard.models.ManagedIdentity; -import com.azure.resourcemanager.dashboard.models.ProvisioningState; +import com.azure.resourcemanager.dashboard.models.ManagedServiceIdentity; +import com.azure.resourcemanager.dashboard.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.dashboard.models.PublicNetworkAccess; import com.azure.resourcemanager.dashboard.models.ResourceSku; import com.azure.resourcemanager.dashboard.models.ZoneRedundancy; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; /** Samples for Grafana Create. */ public final class GrafanaCreateSamples { /* - * x-ms-original-file: specification/dashboard/resource-manager/Microsoft.Dashboard/preview/2021-09-01-preview/examples/Grafana_Create.json + * x-ms-original-file: specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2022-08-01/examples/Grafana_Create.json */ /** * Sample code: Grafana_Create. @@ -45,9 +62,19 @@ public final class GrafanaCreateSamples { .withSku(new ResourceSku().withName("Standard")) .withProperties( new ManagedGrafanaProperties() - .withProvisioningState(ProvisioningState.ACCEPTED) - .withZoneRedundancy(ZoneRedundancy.ENABLED)) - .withIdentity(new ManagedIdentity().withType(IdentityType.SYSTEM_ASSIGNED)) + .withPublicNetworkAccess(PublicNetworkAccess.ENABLED) + .withZoneRedundancy(ZoneRedundancy.ENABLED) + .withApiKey(ApiKey.ENABLED) + .withDeterministicOutboundIp(DeterministicOutboundIp.ENABLED) + .withGrafanaIntegrations( + new GrafanaIntegrations() + .withAzureMonitorWorkspaceIntegrations( + Arrays + .asList( + new AzureMonitorWorkspaceIntegration() + .withAzureMonitorWorkspaceResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.monitor/accounts/myAzureMonitorWorkspace"))))) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED)) .create(); } @@ -72,7 +99,7 @@ import com.azure.core.util.Context; /** Samples for Grafana Delete. */ public final class GrafanaDeleteSamples { /* - * x-ms-original-file: specification/dashboard/resource-manager/Microsoft.Dashboard/preview/2021-09-01-preview/examples/Grafana_Delete.json + * x-ms-original-file: specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2022-08-01/examples/Grafana_Delete.json */ /** * Sample code: Grafana_Delete. @@ -93,7 +120,7 @@ import com.azure.core.util.Context; /** Samples for Grafana GetByResourceGroup. */ public final class GrafanaGetByResourceGroupSamples { /* - * x-ms-original-file: specification/dashboard/resource-manager/Microsoft.Dashboard/preview/2021-09-01-preview/examples/Grafana_Get.json + * x-ms-original-file: specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2022-08-01/examples/Grafana_Get.json */ /** * Sample code: Grafana_Get. @@ -114,7 +141,7 @@ import com.azure.core.util.Context; /** Samples for Grafana List. */ public final class GrafanaListSamples { /* - * x-ms-original-file: specification/dashboard/resource-manager/Microsoft.Dashboard/preview/2021-09-01-preview/examples/Grafana_List.json + * x-ms-original-file: specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2022-08-01/examples/Grafana_List.json */ /** * Sample code: Grafana_List. @@ -135,7 +162,7 @@ import com.azure.core.util.Context; /** Samples for Grafana ListByResourceGroup. */ public final class GrafanaListByResourceGroupSamples { /* - * x-ms-original-file: specification/dashboard/resource-manager/Microsoft.Dashboard/preview/2021-09-01-preview/examples/Grafana_ListByResourceGroup.json + * x-ms-original-file: specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2022-08-01/examples/Grafana_ListByResourceGroup.json */ /** * Sample code: Grafana_ListByResourceGroup. @@ -152,14 +179,20 @@ public final class GrafanaListByResourceGroupSamples { ```java import com.azure.core.util.Context; +import com.azure.resourcemanager.dashboard.models.ApiKey; +import com.azure.resourcemanager.dashboard.models.AzureMonitorWorkspaceIntegration; +import com.azure.resourcemanager.dashboard.models.DeterministicOutboundIp; +import com.azure.resourcemanager.dashboard.models.GrafanaIntegrations; import com.azure.resourcemanager.dashboard.models.ManagedGrafana; +import com.azure.resourcemanager.dashboard.models.ManagedGrafanaPropertiesUpdateParameters; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; /** Samples for Grafana Update. */ public final class GrafanaUpdateSamples { /* - * x-ms-original-file: specification/dashboard/resource-manager/Microsoft.Dashboard/preview/2021-09-01-preview/examples/Grafana_Update.json + * x-ms-original-file: specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2022-08-01/examples/Grafana_Update.json */ /** * Sample code: Grafana_Update. @@ -172,7 +205,22 @@ public final class GrafanaUpdateSamples { .grafanas() .getByResourceGroupWithResponse("myResourceGroup", "myWorkspace", Context.NONE) .getValue(); - resource.update().withTags(mapOf("Environment", "Dev 2")).apply(); + resource + .update() + .withTags(mapOf("Environment", "Dev 2")) + .withProperties( + new ManagedGrafanaPropertiesUpdateParameters() + .withApiKey(ApiKey.ENABLED) + .withDeterministicOutboundIp(DeterministicOutboundIp.ENABLED) + .withGrafanaIntegrations( + new GrafanaIntegrations() + .withAzureMonitorWorkspaceIntegrations( + Arrays + .asList( + new AzureMonitorWorkspaceIntegration() + .withAzureMonitorWorkspaceResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.monitor/accounts/myAzureMonitorWorkspace"))))) + .apply(); } @SuppressWarnings("unchecked") @@ -196,7 +244,7 @@ import com.azure.core.util.Context; /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/dashboard/resource-manager/Microsoft.Dashboard/preview/2021-09-01-preview/examples/Operations_List.json + * x-ms-original-file: specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2022-08-01/examples/Operations_List.json */ /** * Sample code: Operations_List. @@ -209,3 +257,133 @@ public final class OperationsListSamples { } ``` +### PrivateEndpointConnections_Approve + +```java +/** Samples for PrivateEndpointConnections Approve. */ +public final class PrivateEndpointConnectionsApproveSamples { + /* + * x-ms-original-file: specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2022-08-01/examples/PrivateEndpointConnections_Approve.json + */ + /** + * Sample code: PrivateEndpointConnections_Approve. + * + * @param manager Entry point to DashboardManager. + */ + public static void privateEndpointConnectionsApprove(com.azure.resourcemanager.dashboard.DashboardManager manager) { + manager + .privateEndpointConnections() + .define("myConnection") + .withExistingGrafana("myResourceGroup", "myWorkspace") + .create(); + } +} +``` + +### PrivateEndpointConnections_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for PrivateEndpointConnections Delete. */ +public final class PrivateEndpointConnectionsDeleteSamples { + /* + * x-ms-original-file: specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2022-08-01/examples/PrivateEndpointConnections_Delete.json + */ + /** + * Sample code: PrivateEndpointConnections_Delete. + * + * @param manager Entry point to DashboardManager. + */ + public static void privateEndpointConnectionsDelete(com.azure.resourcemanager.dashboard.DashboardManager manager) { + manager.privateEndpointConnections().delete("myResourceGroup", "myWorkspace", "myConnection", Context.NONE); + } +} +``` + +### PrivateEndpointConnections_Get + +```java +import com.azure.core.util.Context; + +/** Samples for PrivateEndpointConnections Get. */ +public final class PrivateEndpointConnectionsGetSamples { + /* + * x-ms-original-file: specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2022-08-01/examples/PrivateEndpointConnections_Get.json + */ + /** + * Sample code: PrivateEndpointConnections_Get. + * + * @param manager Entry point to DashboardManager. + */ + public static void privateEndpointConnectionsGet(com.azure.resourcemanager.dashboard.DashboardManager manager) { + manager + .privateEndpointConnections() + .getWithResponse("myResourceGroup", "myWorkspace", "myConnection", Context.NONE); + } +} +``` + +### PrivateEndpointConnections_List + +```java +import com.azure.core.util.Context; + +/** Samples for PrivateEndpointConnections List. */ +public final class PrivateEndpointConnectionsListSamples { + /* + * x-ms-original-file: specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2022-08-01/examples/PrivateEndpointConnections_List.json + */ + /** + * Sample code: PrivateEndpointConnections_List. + * + * @param manager Entry point to DashboardManager. + */ + public static void privateEndpointConnectionsList(com.azure.resourcemanager.dashboard.DashboardManager manager) { + manager.privateEndpointConnections().list("myResourceGroup", "myWorkspace", Context.NONE); + } +} +``` + +### PrivateLinkResources_Get + +```java +import com.azure.core.util.Context; + +/** Samples for PrivateLinkResources Get. */ +public final class PrivateLinkResourcesGetSamples { + /* + * x-ms-original-file: specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2022-08-01/examples/PrivateLinkResources_Get.json + */ + /** + * Sample code: PrivateLinkResources_Get. + * + * @param manager Entry point to DashboardManager. + */ + public static void privateLinkResourcesGet(com.azure.resourcemanager.dashboard.DashboardManager manager) { + manager.privateLinkResources().getWithResponse("myResourceGroup", "myWorkspace", "grafana", Context.NONE); + } +} +``` + +### PrivateLinkResources_List + +```java +import com.azure.core.util.Context; + +/** Samples for PrivateLinkResources List. */ +public final class PrivateLinkResourcesListSamples { + /* + * x-ms-original-file: specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2022-08-01/examples/PrivateLinkResources_List.json + */ + /** + * Sample code: PrivateLinkResources_List. + * + * @param manager Entry point to DashboardManager. + */ + public static void privateLinkResourcesList(com.azure.resourcemanager.dashboard.DashboardManager manager) { + manager.privateLinkResources().list("myResourceGroup", "myWorkspace", Context.NONE); + } +} +``` + diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/pom.xml b/sdk/dashboard/azure-resourcemanager-dashboard/pom.xml index ea3ff8250204..d8e9d0059e1f 100644 --- a/sdk/dashboard/azure-resourcemanager-dashboard/pom.xml +++ b/sdk/dashboard/azure-resourcemanager-dashboard/pom.xml @@ -13,7 +13,7 @@ jar Microsoft Azure SDK for Dashboard Management - This package contains Microsoft Azure SDK for Dashboard Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The Microsoft.Dashboard Rest API spec. Package tag package-2021-09-01-preview. + This package contains Microsoft Azure SDK for Dashboard Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The Microsoft.Dashboard Rest API spec. Package tag package-2022-08-01. https://github.com/Azure/azure-sdk-for-java diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/DashboardManager.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/DashboardManager.java index 5f55ba6a4686..41a6f4d57e64 100644 --- a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/DashboardManager.java +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/DashboardManager.java @@ -27,8 +27,12 @@ import com.azure.resourcemanager.dashboard.implementation.DashboardManagementClientBuilder; import com.azure.resourcemanager.dashboard.implementation.GrafanasImpl; import com.azure.resourcemanager.dashboard.implementation.OperationsImpl; +import com.azure.resourcemanager.dashboard.implementation.PrivateEndpointConnectionsImpl; +import com.azure.resourcemanager.dashboard.implementation.PrivateLinkResourcesImpl; import com.azure.resourcemanager.dashboard.models.Grafanas; import com.azure.resourcemanager.dashboard.models.Operations; +import com.azure.resourcemanager.dashboard.models.PrivateEndpointConnections; +import com.azure.resourcemanager.dashboard.models.PrivateLinkResources; import java.time.Duration; import java.time.temporal.ChronoUnit; import java.util.ArrayList; @@ -42,6 +46,10 @@ public final class DashboardManager { private Grafanas grafanas; + private PrivateEndpointConnections privateEndpointConnections; + + private PrivateLinkResources privateLinkResources; + private final DashboardManagementClient clientObject; private DashboardManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { @@ -264,7 +272,11 @@ public DashboardManager authenticate(TokenCredential credential, AzureProfile pr } } - /** @return Resource collection API of Operations. */ + /** + * 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); @@ -272,7 +284,11 @@ public Operations operations() { return operations; } - /** @return Resource collection API of Grafanas. */ + /** + * Gets the resource collection API of Grafanas. It manages ManagedGrafana. + * + * @return Resource collection API of Grafanas. + */ public Grafanas grafanas() { if (this.grafanas == null) { this.grafanas = new GrafanasImpl(clientObject.getGrafanas(), this); @@ -280,6 +296,31 @@ public Grafanas grafanas() { return grafanas; } + /** + * Gets the resource collection API of PrivateEndpointConnections. It manages PrivateEndpointConnection. + * + * @return Resource collection API of PrivateEndpointConnections. + */ + public PrivateEndpointConnections privateEndpointConnections() { + if (this.privateEndpointConnections == null) { + this.privateEndpointConnections = + new PrivateEndpointConnectionsImpl(clientObject.getPrivateEndpointConnections(), this); + } + return privateEndpointConnections; + } + + /** + * Gets the resource collection API of PrivateLinkResources. + * + * @return Resource collection API of PrivateLinkResources. + */ + public PrivateLinkResources privateLinkResources() { + if (this.privateLinkResources == null) { + this.privateLinkResources = new PrivateLinkResourcesImpl(clientObject.getPrivateLinkResources(), this); + } + return privateLinkResources; + } + /** * @return Wrapped service client DashboardManagementClient providing direct access to the underlying auto-generated * API implementation, based on Azure REST API. diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/fluent/DashboardManagementClient.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/fluent/DashboardManagementClient.java index 5b591b481b9b..fb119a235145 100644 --- a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/fluent/DashboardManagementClient.java +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/fluent/DashboardManagementClient.java @@ -10,8 +10,7 @@ /** The interface for DashboardManagementClient class. */ public interface DashboardManagementClient { /** - * Gets Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID - * forms part of the URI for every service call. + * Gets The ID of the target subscription. * * @return the subscriptionId value. */ @@ -58,4 +57,18 @@ public interface DashboardManagementClient { * @return the GrafanasClient object. */ GrafanasClient getGrafanas(); + + /** + * Gets the PrivateEndpointConnectionsClient object to access its operations. + * + * @return the PrivateEndpointConnectionsClient object. + */ + PrivateEndpointConnectionsClient getPrivateEndpointConnections(); + + /** + * Gets the PrivateLinkResourcesClient object to access its operations. + * + * @return the PrivateLinkResourcesClient object. + */ + PrivateLinkResourcesClient getPrivateLinkResources(); } diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/fluent/OperationsClient.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/fluent/OperationsClient.java index 990b0d5d43e7..2b2ace7996b1 100644 --- a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/fluent/OperationsClient.java +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/fluent/OperationsClient.java @@ -8,7 +8,7 @@ import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; -import com.azure.resourcemanager.dashboard.fluent.models.OperationResultInner; +import com.azure.resourcemanager.dashboard.fluent.models.OperationInner; /** An instance of this class provides access to all the operations defined in OperationsClient. */ public interface OperationsClient { @@ -17,11 +17,11 @@ public interface OperationsClient { * * @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 Microsoft.Dashboard provider as paginated response with {@link + * @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(); + PagedIterable list(); /** * List all available API operations provided by Microsoft.Dashboard. @@ -30,9 +30,9 @@ public interface OperationsClient { * @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 Microsoft.Dashboard provider as paginated response with {@link + * @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); + PagedIterable list(Context context); } diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/fluent/PrivateEndpointConnectionsClient.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/fluent/PrivateEndpointConnectionsClient.java new file mode 100644 index 000000000000..d8a565d0fa9f --- /dev/null +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/fluent/PrivateEndpointConnectionsClient.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.dashboard.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.dashboard.fluent.models.PrivateEndpointConnectionInner; + +/** An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. */ +public interface PrivateEndpointConnectionsClient { + /** + * Get private endpoint connections. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @param privateEndpointConnectionName The private endpoint connection name of Azure Managed Grafana. + * @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 private endpoint connections. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateEndpointConnectionInner get( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName); + + /** + * Get private endpoint connections. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @param privateEndpointConnectionName The private endpoint connection name of Azure Managed Grafana. + * @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 private endpoint connections along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context); + + /** + * Manual approve private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @param privateEndpointConnectionName The private endpoint connection name of Azure Managed Grafana. + * @param body The Private Endpoint Connection 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 the Private Endpoint Connection resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PrivateEndpointConnectionInner> beginApprove( + String resourceGroupName, + String workspaceName, + String privateEndpointConnectionName, + PrivateEndpointConnectionInner body); + + /** + * Manual approve private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @param privateEndpointConnectionName The private endpoint connection name of Azure Managed Grafana. + * @param body The Private Endpoint Connection 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 the Private Endpoint Connection resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PrivateEndpointConnectionInner> beginApprove( + String resourceGroupName, + String workspaceName, + String privateEndpointConnectionName, + PrivateEndpointConnectionInner body, + Context context); + + /** + * Manual approve private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @param privateEndpointConnectionName The private endpoint connection name of Azure Managed Grafana. + * @param body The Private Endpoint Connection 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 Private Endpoint Connection resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateEndpointConnectionInner approve( + String resourceGroupName, + String workspaceName, + String privateEndpointConnectionName, + PrivateEndpointConnectionInner body); + + /** + * Manual approve private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @param privateEndpointConnectionName The private endpoint connection name of Azure Managed Grafana. + * @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 Private Endpoint Connection resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateEndpointConnectionInner approve( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName); + + /** + * Manual approve private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @param privateEndpointConnectionName The private endpoint connection name of Azure Managed Grafana. + * @param body The Private Endpoint Connection 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 Private Endpoint Connection resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateEndpointConnectionInner approve( + String resourceGroupName, + String workspaceName, + String privateEndpointConnectionName, + PrivateEndpointConnectionInner body, + Context context); + + /** + * Delete private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @param privateEndpointConnectionName The private endpoint connection name of Azure Managed Grafana. + * @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 workspaceName, String privateEndpointConnectionName); + + /** + * Delete private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @param privateEndpointConnectionName The private endpoint connection name of Azure Managed Grafana. + * @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 workspaceName, String privateEndpointConnectionName, Context context); + + /** + * Delete private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @param privateEndpointConnectionName The private endpoint connection name of Azure Managed Grafana. + * @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 workspaceName, String privateEndpointConnectionName); + + /** + * Delete private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @param privateEndpointConnectionName The private endpoint connection name of Azure Managed Grafana. + * @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 workspaceName, String privateEndpointConnectionName, Context context); + + /** + * Get private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @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 private endpoint connection as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * Get private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @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 private endpoint connection as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, Context context); +} diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/fluent/PrivateLinkResourcesClient.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/fluent/PrivateLinkResourcesClient.java new file mode 100644 index 000000000000..ba7ae19ee220 --- /dev/null +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/fluent/PrivateLinkResourcesClient.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.dashboard.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.dashboard.fluent.models.PrivateLinkResourceInner; + +/** An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. */ +public interface PrivateLinkResourcesClient { + /** + * List all private link resources information for this grafana resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @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 private link resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * List all private link resources information for this grafana resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @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 private link resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, Context context); + + /** + * Get specific private link resource information for this grafana resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @param privateLinkResourceName The privateLinkResourceName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specific private link resource information for this grafana resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateLinkResourceInner get(String resourceGroupName, String workspaceName, String privateLinkResourceName); + + /** + * Get specific private link resource information for this grafana resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @param privateLinkResourceName The privateLinkResourceName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specific private link resource information for this grafana resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String workspaceName, String privateLinkResourceName, Context context); +} diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/fluent/models/ManagedGrafanaInner.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/fluent/models/ManagedGrafanaInner.java index fcb394255caf..ae9f836d063c 100644 --- a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/fluent/models/ManagedGrafanaInner.java +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/fluent/models/ManagedGrafanaInner.java @@ -8,7 +8,7 @@ import com.azure.core.management.Resource; import com.azure.core.management.SystemData; import com.azure.resourcemanager.dashboard.models.ManagedGrafanaProperties; -import com.azure.resourcemanager.dashboard.models.ManagedIdentity; +import com.azure.resourcemanager.dashboard.models.ManagedServiceIdentity; import com.azure.resourcemanager.dashboard.models.ResourceSku; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; @@ -32,7 +32,7 @@ public final class ManagedGrafanaInner extends Resource { * The managed identity of the grafana resource. */ @JsonProperty(value = "identity") - private ManagedIdentity identity; + private ManagedServiceIdentity identity; /* * The system meta data relating to this grafana resource. @@ -85,7 +85,7 @@ public ManagedGrafanaInner withProperties(ManagedGrafanaProperties properties) { * * @return the identity value. */ - public ManagedIdentity identity() { + public ManagedServiceIdentity identity() { return this.identity; } @@ -95,7 +95,7 @@ public ManagedIdentity identity() { * @param identity the identity value to set. * @return the ManagedGrafanaInner object itself. */ - public ManagedGrafanaInner withIdentity(ManagedIdentity identity) { + public ManagedGrafanaInner withIdentity(ManagedServiceIdentity identity) { this.identity = identity; return this; } diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/fluent/models/OperationResultInner.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/fluent/models/OperationInner.java similarity index 63% rename from sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/fluent/models/OperationResultInner.java rename to sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/fluent/models/OperationInner.java index b5e3cb59a1ca..ea2ae030758f 100644 --- a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/fluent/models/OperationResultInner.java +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/fluent/models/OperationInner.java @@ -10,18 +10,23 @@ import com.azure.resourcemanager.dashboard.models.Origin; import com.fasterxml.jackson.annotation.JsonProperty; -/** A Microsoft.Dashboard REST API operation. */ +/** + * REST API Operation + * + *

Details of a REST API operation, returned from the Resource Provider Operations API. + */ @Fluent -public final class OperationResultInner { +public final class OperationInner { /* - * Operation name, i.e., {provider}/{resource}/{operation}. + * 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; /* - * Indicates whether the operation applies to data-plane. Set "true" for - * data-plane operations and "false" for ARM/control-plane operations. + * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for + * ARM/control-plane operations. */ @JsonProperty(value = "isDataAction", access = JsonProperty.Access.WRITE_ONLY) private Boolean isDataAction; @@ -33,20 +38,21 @@ public final class OperationResultInner { private OperationDisplay display; /* - * The intended executor of the operation. + * 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; /* - * Indicates the action type. "Internal" refers to actions that are for - * internal only APIs. + * 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; /** - * Get the name property: Operation name, i.e., {provider}/{resource}/{operation}. + * 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. */ @@ -55,7 +61,7 @@ public String name() { } /** - * Get the isDataAction property: Indicates whether the operation applies to data-plane. Set "true" for data-plane + * 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. @@ -77,15 +83,16 @@ public OperationDisplay display() { * Set the display property: Localized display information for this particular operation. * * @param display the display value to set. - * @return the OperationResultInner object itself. + * @return the OperationInner object itself. */ - public OperationResultInner withDisplay(OperationDisplay display) { + public OperationInner withDisplay(OperationDisplay display) { this.display = display; return this; } /** - * Get the origin property: The intended executor of the operation. + * 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. */ @@ -94,8 +101,8 @@ public Origin origin() { } /** - * Get the actionType property: Indicates the action type. "Internal" refers to actions that are for internal only - * APIs. + * Get the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal + * only APIs. * * @return the actionType value. */ diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/fluent/models/PrivateEndpointConnectionInner.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/fluent/models/PrivateEndpointConnectionInner.java new file mode 100644 index 000000000000..c072912a6b8a --- /dev/null +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/fluent/models/PrivateEndpointConnectionInner.java @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dashboard.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.dashboard.models.PrivateEndpoint; +import com.azure.resourcemanager.dashboard.models.PrivateEndpointConnectionProvisioningState; +import com.azure.resourcemanager.dashboard.models.PrivateLinkServiceConnectionState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The Private Endpoint Connection resource. */ +@Fluent +public final class PrivateEndpointConnectionInner extends ProxyResource { + /* + * Resource properties. + */ + @JsonProperty(value = "properties") + private PrivateEndpointConnectionProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Get the innerProperties property: Resource properties. + * + * @return the innerProperties value. + */ + private PrivateEndpointConnectionProperties 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 privateEndpoint property: The resource of private end point. + * + * @return the privateEndpoint value. + */ + public PrivateEndpoint privateEndpoint() { + return this.innerProperties() == null ? null : this.innerProperties().privateEndpoint(); + } + + /** + * Set the privateEndpoint property: The resource of private end point. + * + * @param privateEndpoint the privateEndpoint value to set. + * @return the PrivateEndpointConnectionInner object itself. + */ + public PrivateEndpointConnectionInner withPrivateEndpoint(PrivateEndpoint privateEndpoint) { + if (this.innerProperties() == null) { + this.innerProperties = new PrivateEndpointConnectionProperties(); + } + this.innerProperties().withPrivateEndpoint(privateEndpoint); + return this; + } + + /** + * Get the privateLinkServiceConnectionState property: A collection of information about the state of the connection + * between service consumer and provider. + * + * @return the privateLinkServiceConnectionState value. + */ + public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { + return this.innerProperties() == null ? null : this.innerProperties().privateLinkServiceConnectionState(); + } + + /** + * Set the privateLinkServiceConnectionState property: A collection of information about the state of the connection + * between service consumer and provider. + * + * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set. + * @return the PrivateEndpointConnectionInner object itself. + */ + public PrivateEndpointConnectionInner withPrivateLinkServiceConnectionState( + PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { + if (this.innerProperties() == null) { + this.innerProperties = new PrivateEndpointConnectionProperties(); + } + this.innerProperties().withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState); + return this; + } + + /** + * Get the groupIds property: The private endpoint connection group ids. + * + * @return the groupIds value. + */ + public List groupIds() { + return this.innerProperties() == null ? null : this.innerProperties().groupIds(); + } + + /** + * Set the groupIds property: The private endpoint connection group ids. + * + * @param groupIds the groupIds value to set. + * @return the PrivateEndpointConnectionInner object itself. + */ + public PrivateEndpointConnectionInner withGroupIds(List groupIds) { + if (this.innerProperties() == null) { + this.innerProperties = new PrivateEndpointConnectionProperties(); + } + this.innerProperties().withGroupIds(groupIds); + return this; + } + + /** + * Get the provisioningState property: The provisioning state of the private endpoint connection resource. + * + * @return the provisioningState value. + */ + public PrivateEndpointConnectionProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/fluent/models/PrivateEndpointConnectionProperties.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/fluent/models/PrivateEndpointConnectionProperties.java new file mode 100644 index 000000000000..4f3d161d44cb --- /dev/null +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/fluent/models/PrivateEndpointConnectionProperties.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.dashboard.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.dashboard.models.PrivateEndpoint; +import com.azure.resourcemanager.dashboard.models.PrivateEndpointConnectionProvisioningState; +import com.azure.resourcemanager.dashboard.models.PrivateLinkServiceConnectionState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Properties of the PrivateEndpointConnectProperties. */ +@Fluent +public final class PrivateEndpointConnectionProperties { + /* + * The resource of private end point. + */ + @JsonProperty(value = "privateEndpoint") + private PrivateEndpoint privateEndpoint; + + /* + * A collection of information about the state of the connection between service consumer and provider. + */ + @JsonProperty(value = "privateLinkServiceConnectionState", required = true) + private PrivateLinkServiceConnectionState privateLinkServiceConnectionState; + + /* + * The private endpoint connection group ids. + */ + @JsonProperty(value = "groupIds") + private List groupIds; + + /* + * The provisioning state of the private endpoint connection resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private PrivateEndpointConnectionProvisioningState provisioningState; + + /** + * Get the privateEndpoint property: The resource of private end point. + * + * @return the privateEndpoint value. + */ + public PrivateEndpoint privateEndpoint() { + return this.privateEndpoint; + } + + /** + * Set the privateEndpoint property: The resource of private end point. + * + * @param privateEndpoint the privateEndpoint value to set. + * @return the PrivateEndpointConnectionProperties object itself. + */ + public PrivateEndpointConnectionProperties withPrivateEndpoint(PrivateEndpoint privateEndpoint) { + this.privateEndpoint = privateEndpoint; + return this; + } + + /** + * Get the privateLinkServiceConnectionState property: A collection of information about the state of the connection + * between service consumer and provider. + * + * @return the privateLinkServiceConnectionState value. + */ + public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { + return this.privateLinkServiceConnectionState; + } + + /** + * Set the privateLinkServiceConnectionState property: A collection of information about the state of the connection + * between service consumer and provider. + * + * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set. + * @return the PrivateEndpointConnectionProperties object itself. + */ + public PrivateEndpointConnectionProperties withPrivateLinkServiceConnectionState( + PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { + this.privateLinkServiceConnectionState = privateLinkServiceConnectionState; + return this; + } + + /** + * Get the groupIds property: The private endpoint connection group ids. + * + * @return the groupIds value. + */ + public List groupIds() { + return this.groupIds; + } + + /** + * Set the groupIds property: The private endpoint connection group ids. + * + * @param groupIds the groupIds value to set. + * @return the PrivateEndpointConnectionProperties object itself. + */ + public PrivateEndpointConnectionProperties withGroupIds(List groupIds) { + this.groupIds = groupIds; + return this; + } + + /** + * Get the provisioningState property: The provisioning state of the private endpoint connection resource. + * + * @return the provisioningState value. + */ + public PrivateEndpointConnectionProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (privateEndpoint() != null) { + privateEndpoint().validate(); + } + if (privateLinkServiceConnectionState() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property privateLinkServiceConnectionState in model" + + " PrivateEndpointConnectionProperties")); + } else { + privateLinkServiceConnectionState().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionProperties.class); +} diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/fluent/models/PrivateLinkResourceInner.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/fluent/models/PrivateLinkResourceInner.java new file mode 100644 index 000000000000..b55664263ed7 --- /dev/null +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/fluent/models/PrivateLinkResourceInner.java @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dashboard.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.dashboard.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** A private link resource. */ +@Fluent +public final class PrivateLinkResourceInner extends ProxyResource { + /* + * Resource properties. + */ + @JsonProperty(value = "properties") + private PrivateLinkResourceProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Get the innerProperties property: Resource properties. + * + * @return the innerProperties value. + */ + private PrivateLinkResourceProperties 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: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the groupId property: The private link resource group id. + * + * @return the groupId value. + */ + public String groupId() { + return this.innerProperties() == null ? null : this.innerProperties().groupId(); + } + + /** + * Get the requiredMembers property: The private link resource required member names. + * + * @return the requiredMembers value. + */ + public List requiredMembers() { + return this.innerProperties() == null ? null : this.innerProperties().requiredMembers(); + } + + /** + * Get the requiredZoneNames property: The private link resource Private link DNS zone name. + * + * @return the requiredZoneNames value. + */ + public List requiredZoneNames() { + return this.innerProperties() == null ? null : this.innerProperties().requiredZoneNames(); + } + + /** + * Set the requiredZoneNames property: The private link resource Private link DNS zone name. + * + * @param requiredZoneNames the requiredZoneNames value to set. + * @return the PrivateLinkResourceInner object itself. + */ + public PrivateLinkResourceInner withRequiredZoneNames(List requiredZoneNames) { + if (this.innerProperties() == null) { + this.innerProperties = new PrivateLinkResourceProperties(); + } + this.innerProperties().withRequiredZoneNames(requiredZoneNames); + 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/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/fluent/models/PrivateLinkResourceProperties.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/fluent/models/PrivateLinkResourceProperties.java new file mode 100644 index 000000000000..3ce063502445 --- /dev/null +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/fluent/models/PrivateLinkResourceProperties.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.dashboard.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.dashboard.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Properties of a private link resource. */ +@Fluent +public final class PrivateLinkResourceProperties { + /* + * Provisioning state of the resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /* + * The private link resource group id. + */ + @JsonProperty(value = "groupId", access = JsonProperty.Access.WRITE_ONLY) + private String groupId; + + /* + * The private link resource required member names. + */ + @JsonProperty(value = "requiredMembers", access = JsonProperty.Access.WRITE_ONLY) + private List requiredMembers; + + /* + * The private link resource Private link DNS zone name. + */ + @JsonProperty(value = "requiredZoneNames") + private List requiredZoneNames; + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the groupId property: The private link resource group id. + * + * @return the groupId value. + */ + public String groupId() { + return this.groupId; + } + + /** + * Get the requiredMembers property: The private link resource required member names. + * + * @return the requiredMembers value. + */ + public List requiredMembers() { + return this.requiredMembers; + } + + /** + * Get the requiredZoneNames property: The private link resource Private link DNS zone name. + * + * @return the requiredZoneNames value. + */ + public List requiredZoneNames() { + return this.requiredZoneNames; + } + + /** + * Set the requiredZoneNames property: The private link resource Private link DNS zone name. + * + * @param requiredZoneNames the requiredZoneNames value to set. + * @return the PrivateLinkResourceProperties object itself. + */ + public PrivateLinkResourceProperties withRequiredZoneNames(List requiredZoneNames) { + this.requiredZoneNames = requiredZoneNames; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/implementation/DashboardManagementClientBuilder.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/implementation/DashboardManagementClientBuilder.java index c5af019139b0..d61e0cd06cc3 100644 --- a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/implementation/DashboardManagementClientBuilder.java +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/implementation/DashboardManagementClientBuilder.java @@ -18,15 +18,12 @@ @ServiceClientBuilder(serviceClients = {DashboardManagementClientImpl.class}) public final class DashboardManagementClientBuilder { /* - * Gets subscription credentials which uniquely identify Microsoft Azure - * subscription. The subscription ID forms part of the URI for every - * service call. + * The ID of the target subscription. */ private String subscriptionId; /** - * Sets Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID - * forms part of the URI for every service call. + * Sets The ID of the target subscription. * * @param subscriptionId the subscriptionId value. * @return the DashboardManagementClientBuilder. @@ -122,27 +119,26 @@ public DashboardManagementClientBuilder serializerAdapter(SerializerAdapter seri * @return an instance of DashboardManagementClientImpl. */ public DashboardManagementClientImpl buildClient() { - if (pipeline == null) { - this.pipeline = new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); - } - if (endpoint == null) { - this.endpoint = ""; - } - if (environment == null) { - this.environment = AzureEnvironment.AZURE; - } - if (pipeline == null) { - this.pipeline = new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); - } - if (defaultPollInterval == null) { - this.defaultPollInterval = Duration.ofSeconds(30); - } - if (serializerAdapter == null) { - this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter(); - } + 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(); DashboardManagementClientImpl client = new DashboardManagementClientImpl( - pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint); + localPipeline, + localSerializerAdapter, + localDefaultPollInterval, + localEnvironment, + subscriptionId, + localEndpoint); return client; } } diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/implementation/DashboardManagementClientImpl.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/implementation/DashboardManagementClientImpl.java index 78060d7d83c0..37b89da5401a 100644 --- a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/implementation/DashboardManagementClientImpl.java +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/implementation/DashboardManagementClientImpl.java @@ -15,6 +15,7 @@ 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; @@ -24,28 +25,25 @@ import com.azure.resourcemanager.dashboard.fluent.DashboardManagementClient; import com.azure.resourcemanager.dashboard.fluent.GrafanasClient; import com.azure.resourcemanager.dashboard.fluent.OperationsClient; +import com.azure.resourcemanager.dashboard.fluent.PrivateEndpointConnectionsClient; +import com.azure.resourcemanager.dashboard.fluent.PrivateLinkResourcesClient; 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 java.util.Map; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; /** Initializes a new instance of the DashboardManagementClientImpl type. */ @ServiceClient(builder = DashboardManagementClientBuilder.class) public final class DashboardManagementClientImpl implements DashboardManagementClient { - /** - * Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms - * part of the URI for every service call. - */ + /** The ID of the target subscription. */ private final String subscriptionId; /** - * Gets Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID - * forms part of the URI for every service call. + * Gets The ID of the target subscription. * * @return the subscriptionId value. */ @@ -137,6 +135,30 @@ public GrafanasClient getGrafanas() { return this.grafanas; } + /** The PrivateEndpointConnectionsClient object to access its operations. */ + private final PrivateEndpointConnectionsClient privateEndpointConnections; + + /** + * Gets the PrivateEndpointConnectionsClient object to access its operations. + * + * @return the PrivateEndpointConnectionsClient object. + */ + public PrivateEndpointConnectionsClient getPrivateEndpointConnections() { + return this.privateEndpointConnections; + } + + /** The PrivateLinkResourcesClient object to access its operations. */ + private final PrivateLinkResourcesClient privateLinkResources; + + /** + * Gets the PrivateLinkResourcesClient object to access its operations. + * + * @return the PrivateLinkResourcesClient object. + */ + public PrivateLinkResourcesClient getPrivateLinkResources() { + return this.privateLinkResources; + } + /** * Initializes an instance of DashboardManagementClient client. * @@ -144,8 +166,7 @@ public GrafanasClient getGrafanas() { * @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 Gets subscription credentials which uniquely identify Microsoft Azure subscription. The - * subscription ID forms part of the URI for every service call. + * @param subscriptionId The ID of the target subscription. * @param endpoint server parameter. */ DashboardManagementClientImpl( @@ -160,9 +181,11 @@ public GrafanasClient getGrafanas() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2021-09-01-preview"; + this.apiVersion = "2022-08-01"; this.operations = new OperationsClientImpl(this); this.grafanas = new GrafanasClientImpl(this); + this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this); + this.privateLinkResources = new PrivateLinkResourcesClientImpl(this); } /** @@ -181,10 +204,7 @@ public Context getContext() { * @return the merged context. */ public Context mergeContext(Context context) { - for (Map.Entry entry : this.getContext().getValues().entrySet()) { - context = context.addData(entry.getKey(), entry.getValue()); - } - return context; + return CoreUtils.mergeContexts(this.getContext(), context); } /** diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/implementation/GrafanasClientImpl.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/implementation/GrafanasClientImpl.java index 8d57ce3cfbe5..ca096ebdaf8d 100644 --- a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/implementation/GrafanasClientImpl.java +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/implementation/GrafanasClientImpl.java @@ -123,7 +123,7 @@ Mono>> create( @Patch( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/grafana" + "/{workspaceName}") - @ExpectedResponses({200}) + @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> update( @HostParam("$host") String endpoint, @@ -583,14 +583,7 @@ private Mono> getByResourceGroupWithResponseAsync( @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync(String resourceGroupName, String workspaceName) { return getByResourceGroupWithResponseAsync(resourceGroupName, workspaceName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -1032,14 +1025,7 @@ private Mono> updateWithResponseAsync( private Mono updateAsync( String resourceGroupName, String workspaceName, ManagedGrafanaUpdateParameters requestBodyParameters) { return updateWithResponseAsync(resourceGroupName, workspaceName, requestBodyParameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/implementation/ManagedGrafanaImpl.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/implementation/ManagedGrafanaImpl.java index fd1cca146e6c..daae52aa3935 100644 --- a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/implementation/ManagedGrafanaImpl.java +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/implementation/ManagedGrafanaImpl.java @@ -10,8 +10,9 @@ import com.azure.resourcemanager.dashboard.fluent.models.ManagedGrafanaInner; import com.azure.resourcemanager.dashboard.models.ManagedGrafana; import com.azure.resourcemanager.dashboard.models.ManagedGrafanaProperties; +import com.azure.resourcemanager.dashboard.models.ManagedGrafanaPropertiesUpdateParameters; import com.azure.resourcemanager.dashboard.models.ManagedGrafanaUpdateParameters; -import com.azure.resourcemanager.dashboard.models.ManagedIdentity; +import com.azure.resourcemanager.dashboard.models.ManagedServiceIdentity; import com.azure.resourcemanager.dashboard.models.ResourceSku; import java.util.Collections; import java.util.Map; @@ -54,7 +55,7 @@ public ManagedGrafanaProperties properties() { return this.innerModel().properties(); } - public ManagedIdentity identity() { + public ManagedServiceIdentity identity() { return this.innerModel().identity(); } @@ -70,6 +71,10 @@ public String regionName() { return this.location(); } + public String resourceGroupName() { + return resourceGroupName; + } + public ManagedGrafanaInner innerModel() { return this.innerObject; } @@ -196,7 +201,7 @@ public ManagedGrafanaImpl withProperties(ManagedGrafanaProperties properties) { return this; } - public ManagedGrafanaImpl withIdentity(ManagedIdentity identity) { + public ManagedGrafanaImpl withIdentity(ManagedServiceIdentity identity) { if (isInCreateMode()) { this.innerModel().withIdentity(identity); return this; @@ -206,6 +211,11 @@ public ManagedGrafanaImpl withIdentity(ManagedIdentity identity) { } } + public ManagedGrafanaImpl withProperties(ManagedGrafanaPropertiesUpdateParameters properties) { + this.updateRequestBodyParameters.withProperties(properties); + return this; + } + private boolean isInCreateMode() { return this.innerModel().id() == null; } diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/implementation/OperationResultImpl.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/implementation/OperationImpl.java similarity index 76% rename from sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/implementation/OperationResultImpl.java rename to sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/implementation/OperationImpl.java index e8caf4ea66e5..960ca6ba4a83 100644 --- a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/implementation/OperationResultImpl.java +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/implementation/OperationImpl.java @@ -4,19 +4,18 @@ package com.azure.resourcemanager.dashboard.implementation; -import com.azure.resourcemanager.dashboard.fluent.models.OperationResultInner; +import com.azure.resourcemanager.dashboard.fluent.models.OperationInner; import com.azure.resourcemanager.dashboard.models.ActionType; +import com.azure.resourcemanager.dashboard.models.Operation; import com.azure.resourcemanager.dashboard.models.OperationDisplay; -import com.azure.resourcemanager.dashboard.models.OperationResult; import com.azure.resourcemanager.dashboard.models.Origin; -public final class OperationResultImpl implements OperationResult { - private OperationResultInner innerObject; +public final class OperationImpl implements Operation { + private OperationInner innerObject; private final com.azure.resourcemanager.dashboard.DashboardManager serviceManager; - OperationResultImpl( - OperationResultInner innerObject, com.azure.resourcemanager.dashboard.DashboardManager serviceManager) { + OperationImpl(OperationInner innerObject, com.azure.resourcemanager.dashboard.DashboardManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } @@ -41,7 +40,7 @@ public ActionType actionType() { return this.innerModel().actionType(); } - public OperationResultInner innerModel() { + public OperationInner innerModel() { return this.innerObject; } diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/implementation/OperationsClientImpl.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/implementation/OperationsClientImpl.java index 2e6a14df3851..cc0aae7b6c02 100644 --- a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/implementation/OperationsClientImpl.java +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/implementation/OperationsClientImpl.java @@ -26,7 +26,7 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.dashboard.fluent.OperationsClient; -import com.azure.resourcemanager.dashboard.fluent.models.OperationResultInner; +import com.azure.resourcemanager.dashboard.fluent.models.OperationInner; import com.azure.resourcemanager.dashboard.models.OperationListResult; import reactor.core.publisher.Mono; @@ -82,11 +82,11 @@ Mono> listNext( * * @throws 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 Microsoft.Dashboard provider along with {@link PagedResponse} - * on successful completion of {@link Mono}. + * @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() { + private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { return Mono .error( @@ -97,7 +97,7 @@ private Mono> listSinglePageAsync() { return FluxUtil .withContext( context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) - .>map( + .>map( res -> new PagedResponseBase<>( res.getRequest(), @@ -116,11 +116,11 @@ private Mono> listSinglePageAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Microsoft.Dashboard provider along with {@link PagedResponse} - * on successful completion of {@link Mono}. + * @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) { + private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -147,11 +147,11 @@ private Mono> listSinglePageAsync(Context co * * @throws 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 Microsoft.Dashboard provider as paginated response with {@link + * @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() { + private PagedFlux listAsync() { return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); } @@ -162,11 +162,11 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Microsoft.Dashboard provider as paginated response with {@link + * @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) { + private PagedFlux listAsync(Context context) { return new PagedFlux<>( () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); } @@ -176,11 +176,11 @@ private PagedFlux listAsync(Context context) { * * @throws 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 Microsoft.Dashboard provider as paginated response with {@link + * @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() { + public PagedIterable list() { return new PagedIterable<>(listAsync()); } @@ -191,11 +191,11 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Microsoft.Dashboard provider as paginated response with {@link + * @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) { + public PagedIterable list(Context context) { return new PagedIterable<>(listAsync(context)); } @@ -206,11 +206,11 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Microsoft.Dashboard provider along with {@link PagedResponse} - * on successful completion of {@link Mono}. + * @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) { + private Mono> listNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -223,7 +223,7 @@ private Mono> listNextSinglePageAsync(String final String accept = "application/json"; return FluxUtil .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( + .>map( res -> new PagedResponseBase<>( res.getRequest(), @@ -243,11 +243,11 @@ private Mono> listNextSinglePageAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Microsoft.Dashboard provider along with {@link PagedResponse} - * on successful completion of {@link Mono}. + * @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) { + private Mono> listNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/implementation/OperationsImpl.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/implementation/OperationsImpl.java index 9d766e2b1775..f4eb7468c44c 100644 --- a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/implementation/OperationsImpl.java +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/implementation/OperationsImpl.java @@ -8,8 +8,8 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.dashboard.fluent.OperationsClient; -import com.azure.resourcemanager.dashboard.fluent.models.OperationResultInner; -import com.azure.resourcemanager.dashboard.models.OperationResult; +import com.azure.resourcemanager.dashboard.fluent.models.OperationInner; +import com.azure.resourcemanager.dashboard.models.Operation; import com.azure.resourcemanager.dashboard.models.Operations; public final class OperationsImpl implements Operations { @@ -25,14 +25,14 @@ public OperationsImpl( this.serviceManager = serviceManager; } - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new OperationResultImpl(inner1, this.manager())); + 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 OperationResultImpl(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() { diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/implementation/PrivateEndpointConnectionImpl.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/implementation/PrivateEndpointConnectionImpl.java new file mode 100644 index 000000000000..d8149fc330aa --- /dev/null +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/implementation/PrivateEndpointConnectionImpl.java @@ -0,0 +1,177 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dashboard.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.dashboard.fluent.models.PrivateEndpointConnectionInner; +import com.azure.resourcemanager.dashboard.models.PrivateEndpoint; +import com.azure.resourcemanager.dashboard.models.PrivateEndpointConnection; +import com.azure.resourcemanager.dashboard.models.PrivateEndpointConnectionProvisioningState; +import com.azure.resourcemanager.dashboard.models.PrivateLinkServiceConnectionState; +import java.util.Collections; +import java.util.List; + +public final class PrivateEndpointConnectionImpl + implements PrivateEndpointConnection, PrivateEndpointConnection.Definition, PrivateEndpointConnection.Update { + private PrivateEndpointConnectionInner innerObject; + + private final com.azure.resourcemanager.dashboard.DashboardManager 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 PrivateEndpoint privateEndpoint() { + return this.innerModel().privateEndpoint(); + } + + public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { + return this.innerModel().privateLinkServiceConnectionState(); + } + + public List groupIds() { + List inner = this.innerModel().groupIds(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public PrivateEndpointConnectionProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public PrivateEndpointConnectionInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.dashboard.DashboardManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String workspaceName; + + private String privateEndpointConnectionName; + + public PrivateEndpointConnectionImpl withExistingGrafana(String resourceGroupName, String workspaceName) { + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + return this; + } + + public PrivateEndpointConnection create() { + this.innerObject = + serviceManager + .serviceClient() + .getPrivateEndpointConnections() + .approve( + resourceGroupName, workspaceName, privateEndpointConnectionName, this.innerModel(), Context.NONE); + return this; + } + + public PrivateEndpointConnection create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getPrivateEndpointConnections() + .approve(resourceGroupName, workspaceName, privateEndpointConnectionName, this.innerModel(), context); + return this; + } + + PrivateEndpointConnectionImpl(String name, com.azure.resourcemanager.dashboard.DashboardManager serviceManager) { + this.innerObject = new PrivateEndpointConnectionInner(); + this.serviceManager = serviceManager; + this.privateEndpointConnectionName = name; + } + + public PrivateEndpointConnectionImpl update() { + return this; + } + + public PrivateEndpointConnection apply() { + this.innerObject = + serviceManager + .serviceClient() + .getPrivateEndpointConnections() + .approve( + resourceGroupName, workspaceName, privateEndpointConnectionName, this.innerModel(), Context.NONE); + return this; + } + + public PrivateEndpointConnection apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getPrivateEndpointConnections() + .approve(resourceGroupName, workspaceName, privateEndpointConnectionName, this.innerModel(), context); + return this; + } + + PrivateEndpointConnectionImpl( + PrivateEndpointConnectionInner innerObject, + com.azure.resourcemanager.dashboard.DashboardManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "grafana"); + this.privateEndpointConnectionName = Utils.getValueFromIdByName(innerObject.id(), "privateEndpointConnections"); + } + + public PrivateEndpointConnection refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getPrivateEndpointConnections() + .getWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, Context.NONE) + .getValue(); + return this; + } + + public PrivateEndpointConnection refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getPrivateEndpointConnections() + .getWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, context) + .getValue(); + return this; + } + + public PrivateEndpointConnectionImpl withPrivateEndpoint(PrivateEndpoint privateEndpoint) { + this.innerModel().withPrivateEndpoint(privateEndpoint); + return this; + } + + public PrivateEndpointConnectionImpl withPrivateLinkServiceConnectionState( + PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { + this.innerModel().withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState); + return this; + } + + public PrivateEndpointConnectionImpl withGroupIds(List groupIds) { + this.innerModel().withGroupIds(groupIds); + return this; + } +} diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/implementation/PrivateEndpointConnectionsClientImpl.java new file mode 100644 index 000000000000..11fb5719189b --- /dev/null +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/implementation/PrivateEndpointConnectionsClientImpl.java @@ -0,0 +1,1188 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dashboard.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.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.dashboard.fluent.PrivateEndpointConnectionsClient; +import com.azure.resourcemanager.dashboard.fluent.models.PrivateEndpointConnectionInner; +import com.azure.resourcemanager.dashboard.models.PrivateEndpointConnectionListResult; +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 PrivateEndpointConnectionsClient. */ +public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpointConnectionsClient { + /** The proxy service used to perform REST calls. */ + private final PrivateEndpointConnectionsService service; + + /** The service client containing this operation class. */ + private final DashboardManagementClientImpl client; + + /** + * Initializes an instance of PrivateEndpointConnectionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + PrivateEndpointConnectionsClientImpl(DashboardManagementClientImpl client) { + this.service = + RestProxy + .create( + PrivateEndpointConnectionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for DashboardManagementClientPrivateEndpointConnections to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "DashboardManagementC") + private interface PrivateEndpointConnectionsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/grafana" + + "/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @QueryParam("api-version") String apiVersion, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/grafana" + + "/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> approve( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @QueryParam("api-version") String apiVersion, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @BodyParam("application/json") PrivateEndpointConnectionInner body, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/grafana" + + "/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @QueryParam("api-version") String apiVersion, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/grafana" + + "/{workspaceName}/privateEndpointConnections") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @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); + } + + /** + * Get private endpoint connections. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @param privateEndpointConnectionName The private endpoint connection name of Azure Managed Grafana. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return private endpoint connections along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { + 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + this.client.getApiVersion(), + privateEndpointConnectionName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get private endpoint connections. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @param privateEndpointConnectionName The private endpoint connection name of Azure Managed Grafana. + * @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 private endpoint connections along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName, 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + this.client.getApiVersion(), + privateEndpointConnectionName, + accept, + context); + } + + /** + * Get private endpoint connections. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @param privateEndpointConnectionName The private endpoint connection name of Azure Managed Grafana. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return private endpoint connections on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { + return getWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get private endpoint connections. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @param privateEndpointConnectionName The private endpoint connection name of Azure Managed Grafana. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return private endpoint connections. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateEndpointConnectionInner get( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { + return getAsync(resourceGroupName, workspaceName, privateEndpointConnectionName).block(); + } + + /** + * Get private endpoint connections. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @param privateEndpointConnectionName The private endpoint connection name of Azure Managed Grafana. + * @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 private endpoint connections along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, context).block(); + } + + /** + * Manual approve private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @param privateEndpointConnectionName The private endpoint connection name of Azure Managed Grafana. + * @param body The Private Endpoint Connection 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 Private Endpoint Connection resource along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> approveWithResponseAsync( + String resourceGroupName, + String workspaceName, + String privateEndpointConnectionName, + PrivateEndpointConnectionInner body) { + 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + if (body != null) { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .approve( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + this.client.getApiVersion(), + privateEndpointConnectionName, + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Manual approve private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @param privateEndpointConnectionName The private endpoint connection name of Azure Managed Grafana. + * @param body The Private Endpoint Connection 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 Private Endpoint Connection resource along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> approveWithResponseAsync( + String resourceGroupName, + String workspaceName, + String privateEndpointConnectionName, + PrivateEndpointConnectionInner body, + 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + if (body != null) { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .approve( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + this.client.getApiVersion(), + privateEndpointConnectionName, + body, + accept, + context); + } + + /** + * Manual approve private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @param privateEndpointConnectionName The private endpoint connection name of Azure Managed Grafana. + * @param body The Private Endpoint Connection 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 the Private Endpoint Connection resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, PrivateEndpointConnectionInner> beginApproveAsync( + String resourceGroupName, + String workspaceName, + String privateEndpointConnectionName, + PrivateEndpointConnectionInner body) { + Mono>> mono = + approveWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + PrivateEndpointConnectionInner.class, + PrivateEndpointConnectionInner.class, + this.client.getContext()); + } + + /** + * Manual approve private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @param privateEndpointConnectionName The private endpoint connection name of Azure Managed Grafana. + * @param body The Private Endpoint Connection 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 the Private Endpoint Connection resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, PrivateEndpointConnectionInner> beginApproveAsync( + String resourceGroupName, + String workspaceName, + String privateEndpointConnectionName, + PrivateEndpointConnectionInner body, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + approveWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, body, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + PrivateEndpointConnectionInner.class, + PrivateEndpointConnectionInner.class, + context); + } + + /** + * Manual approve private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @param privateEndpointConnectionName The private endpoint connection name of Azure Managed Grafana. + * @param body The Private Endpoint Connection 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 the Private Endpoint Connection resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PrivateEndpointConnectionInner> beginApprove( + String resourceGroupName, + String workspaceName, + String privateEndpointConnectionName, + PrivateEndpointConnectionInner body) { + return beginApproveAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, body).getSyncPoller(); + } + + /** + * Manual approve private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @param privateEndpointConnectionName The private endpoint connection name of Azure Managed Grafana. + * @param body The Private Endpoint Connection 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 the Private Endpoint Connection resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PrivateEndpointConnectionInner> beginApprove( + String resourceGroupName, + String workspaceName, + String privateEndpointConnectionName, + PrivateEndpointConnectionInner body, + Context context) { + return beginApproveAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, body, context) + .getSyncPoller(); + } + + /** + * Manual approve private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @param privateEndpointConnectionName The private endpoint connection name of Azure Managed Grafana. + * @param body The Private Endpoint Connection 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 Private Endpoint Connection resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono approveAsync( + String resourceGroupName, + String workspaceName, + String privateEndpointConnectionName, + PrivateEndpointConnectionInner body) { + return beginApproveAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Manual approve private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @param privateEndpointConnectionName The private endpoint connection name of Azure Managed Grafana. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Private Endpoint Connection resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono approveAsync( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { + final PrivateEndpointConnectionInner body = null; + return beginApproveAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Manual approve private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @param privateEndpointConnectionName The private endpoint connection name of Azure Managed Grafana. + * @param body The Private Endpoint Connection 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 Private Endpoint Connection resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono approveAsync( + String resourceGroupName, + String workspaceName, + String privateEndpointConnectionName, + PrivateEndpointConnectionInner body, + Context context) { + return beginApproveAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Manual approve private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @param privateEndpointConnectionName The private endpoint connection name of Azure Managed Grafana. + * @param body The Private Endpoint Connection 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 Private Endpoint Connection resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateEndpointConnectionInner approve( + String resourceGroupName, + String workspaceName, + String privateEndpointConnectionName, + PrivateEndpointConnectionInner body) { + return approveAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, body).block(); + } + + /** + * Manual approve private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @param privateEndpointConnectionName The private endpoint connection name of Azure Managed Grafana. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Private Endpoint Connection resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateEndpointConnectionInner approve( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { + final PrivateEndpointConnectionInner body = null; + return approveAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, body).block(); + } + + /** + * Manual approve private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @param privateEndpointConnectionName The private endpoint connection name of Azure Managed Grafana. + * @param body The Private Endpoint Connection 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 Private Endpoint Connection resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateEndpointConnectionInner approve( + String resourceGroupName, + String workspaceName, + String privateEndpointConnectionName, + PrivateEndpointConnectionInner body, + Context context) { + return approveAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, body, context).block(); + } + + /** + * Delete private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @param privateEndpointConnectionName The private endpoint connection name of Azure Managed Grafana. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 workspaceName, String privateEndpointConnectionName) { + 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + this.client.getApiVersion(), + privateEndpointConnectionName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @param privateEndpointConnectionName The private endpoint connection name of Azure Managed Grafana. + * @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 workspaceName, String privateEndpointConnectionName, 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + this.client.getApiVersion(), + privateEndpointConnectionName, + accept, + context); + } + + /** + * Delete private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @param privateEndpointConnectionName The private endpoint connection name of Azure Managed Grafana. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 workspaceName, String privateEndpointConnectionName) { + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Delete private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @param privateEndpointConnectionName The private endpoint connection name of Azure Managed Grafana. + * @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 workspaceName, String privateEndpointConnectionName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Delete private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @param privateEndpointConnectionName The private endpoint connection name of Azure Managed Grafana. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 workspaceName, String privateEndpointConnectionName) { + return beginDeleteAsync(resourceGroupName, workspaceName, privateEndpointConnectionName).getSyncPoller(); + } + + /** + * Delete private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @param privateEndpointConnectionName The private endpoint connection name of Azure Managed Grafana. + * @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 workspaceName, String privateEndpointConnectionName, Context context) { + return beginDeleteAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, context) + .getSyncPoller(); + } + + /** + * Delete private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @param privateEndpointConnectionName The private endpoint connection name of Azure Managed Grafana. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 workspaceName, String privateEndpointConnectionName) { + return beginDeleteAsync(resourceGroupName, workspaceName, privateEndpointConnectionName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @param privateEndpointConnectionName The private endpoint connection name of Azure Managed Grafana. + * @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 workspaceName, String privateEndpointConnectionName, Context context) { + return beginDeleteAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @param privateEndpointConnectionName The private endpoint connection name of Azure Managed Grafana. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 workspaceName, String privateEndpointConnectionName) { + deleteAsync(resourceGroupName, workspaceName, privateEndpointConnectionName).block(); + } + + /** + * Delete private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @param privateEndpointConnectionName The private endpoint connection name of Azure Managed Grafana. + * @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 workspaceName, String privateEndpointConnectionName, Context context) { + deleteAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, context).block(); + } + + /** + * Get private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return private endpoint connection along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String workspaceName) { + 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + 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())); + } + + /** + * Get private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @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 private endpoint connection along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String workspaceName, 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + this.client.getApiVersion(), + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return private endpoint connection as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Get private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @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 private endpoint connection as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, String workspaceName, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Get private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return private endpoint connection as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName) { + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName)); + } + + /** + * Get private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @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 private endpoint connection as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, String workspaceName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink 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 list of private endpoint connection associated with the specified storage account 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 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 list of private endpoint connection associated with the specified storage account 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/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/implementation/PrivateEndpointConnectionsImpl.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/implementation/PrivateEndpointConnectionsImpl.java new file mode 100644 index 000000000000..50228131b8ae --- /dev/null +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/implementation/PrivateEndpointConnectionsImpl.java @@ -0,0 +1,210 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dashboard.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.dashboard.fluent.PrivateEndpointConnectionsClient; +import com.azure.resourcemanager.dashboard.fluent.models.PrivateEndpointConnectionInner; +import com.azure.resourcemanager.dashboard.models.PrivateEndpointConnection; +import com.azure.resourcemanager.dashboard.models.PrivateEndpointConnections; + +public final class PrivateEndpointConnectionsImpl implements PrivateEndpointConnections { + private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionsImpl.class); + + private final PrivateEndpointConnectionsClient innerClient; + + private final com.azure.resourcemanager.dashboard.DashboardManager serviceManager; + + public PrivateEndpointConnectionsImpl( + PrivateEndpointConnectionsClient innerClient, + com.azure.resourcemanager.dashboard.DashboardManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PrivateEndpointConnection get( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { + PrivateEndpointConnectionInner inner = + this.serviceClient().get(resourceGroupName, workspaceName, privateEndpointConnectionName); + if (inner != null) { + return new PrivateEndpointConnectionImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context) { + Response inner = + this + .serviceClient() + .getWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new PrivateEndpointConnectionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { + this.serviceClient().delete(resourceGroupName, workspaceName, privateEndpointConnectionName); + } + + public void delete( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context) { + this.serviceClient().delete(resourceGroupName, workspaceName, privateEndpointConnectionName, context); + } + + public PagedIterable list(String resourceGroupName, String workspaceName) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, workspaceName); + return Utils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())); + } + + public PagedIterable list( + String resourceGroupName, String workspaceName, Context context) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, workspaceName, context); + return Utils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())); + } + + public PrivateEndpointConnection 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 workspaceName = Utils.getValueFromIdByName(id, "grafana"); + if (workspaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'grafana'.", id))); + } + String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections"); + if (privateEndpointConnectionName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", + id))); + } + return this + .getWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, 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 workspaceName = Utils.getValueFromIdByName(id, "grafana"); + if (workspaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'grafana'.", id))); + } + String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections"); + if (privateEndpointConnectionName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", + id))); + } + return this.getWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, 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 workspaceName = Utils.getValueFromIdByName(id, "grafana"); + if (workspaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'grafana'.", id))); + } + String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections"); + if (privateEndpointConnectionName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", + id))); + } + this.delete(resourceGroupName, workspaceName, privateEndpointConnectionName, 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 workspaceName = Utils.getValueFromIdByName(id, "grafana"); + if (workspaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'grafana'.", id))); + } + String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections"); + if (privateEndpointConnectionName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", + id))); + } + this.delete(resourceGroupName, workspaceName, privateEndpointConnectionName, context); + } + + private PrivateEndpointConnectionsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.dashboard.DashboardManager manager() { + return this.serviceManager; + } + + public PrivateEndpointConnectionImpl define(String name) { + return new PrivateEndpointConnectionImpl(name, this.manager()); + } +} diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/implementation/PrivateLinkResourceImpl.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/implementation/PrivateLinkResourceImpl.java new file mode 100644 index 000000000000..1ac9b55bf24b --- /dev/null +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/implementation/PrivateLinkResourceImpl.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dashboard.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.dashboard.fluent.models.PrivateLinkResourceInner; +import com.azure.resourcemanager.dashboard.models.PrivateLinkResource; +import com.azure.resourcemanager.dashboard.models.ProvisioningState; +import java.util.Collections; +import java.util.List; + +public final class PrivateLinkResourceImpl implements PrivateLinkResource { + private PrivateLinkResourceInner innerObject; + + private final com.azure.resourcemanager.dashboard.DashboardManager serviceManager; + + PrivateLinkResourceImpl( + PrivateLinkResourceInner innerObject, com.azure.resourcemanager.dashboard.DashboardManager 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 String groupId() { + return this.innerModel().groupId(); + } + + public List requiredMembers() { + List inner = this.innerModel().requiredMembers(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List requiredZoneNames() { + List inner = this.innerModel().requiredZoneNames(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public PrivateLinkResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.dashboard.DashboardManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/implementation/PrivateLinkResourcesClientImpl.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/implementation/PrivateLinkResourcesClientImpl.java new file mode 100644 index 000000000000..b99c9f4e6626 --- /dev/null +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/implementation/PrivateLinkResourcesClientImpl.java @@ -0,0 +1,519 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dashboard.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.dashboard.fluent.PrivateLinkResourcesClient; +import com.azure.resourcemanager.dashboard.fluent.models.PrivateLinkResourceInner; +import com.azure.resourcemanager.dashboard.models.PrivateLinkResourceListResult; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. */ +public final class PrivateLinkResourcesClientImpl implements PrivateLinkResourcesClient { + /** The proxy service used to perform REST calls. */ + private final PrivateLinkResourcesService service; + + /** The service client containing this operation class. */ + private final DashboardManagementClientImpl client; + + /** + * Initializes an instance of PrivateLinkResourcesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + PrivateLinkResourcesClientImpl(DashboardManagementClientImpl client) { + this.service = + RestProxy + .create(PrivateLinkResourcesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for DashboardManagementClientPrivateLinkResources to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "DashboardManagementC") + private interface PrivateLinkResourcesService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/grafana" + + "/{workspaceName}/privateLinkResources") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/grafana" + + "/{workspaceName}/privateLinkResources/{privateLinkResourceName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @QueryParam("api-version") String apiVersion, + @PathParam("privateLinkResourceName") String privateLinkResourceName, + @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 all private link resources information for this grafana resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 private link resources along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String workspaceName) { + 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + 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 all private link resources information for this grafana resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @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 private link resources along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String workspaceName, 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + this.client.getApiVersion(), + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List all private link resources information for this grafana resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 private link resources as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List all private link resources information for this grafana resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @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 private link resources as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, String workspaceName, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List all private link resources information for this grafana resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 private link resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName) { + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName)); + } + + /** + * List all private link resources information for this grafana resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @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 private link resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, String workspaceName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, context)); + } + + /** + * Get specific private link resource information for this grafana resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @param privateLinkResourceName The privateLinkResourceName 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 specific private link resource information for this grafana resource along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String workspaceName, String privateLinkResourceName) { + 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (privateLinkResourceName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter privateLinkResourceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + this.client.getApiVersion(), + privateLinkResourceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get specific private link resource information for this grafana resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @param privateLinkResourceName The privateLinkResourceName 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 specific private link resource information for this grafana resource along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String workspaceName, String privateLinkResourceName, 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (privateLinkResourceName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter privateLinkResourceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + this.client.getApiVersion(), + privateLinkResourceName, + accept, + context); + } + + /** + * Get specific private link resource information for this grafana resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @param privateLinkResourceName The privateLinkResourceName 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 specific private link resource information for this grafana resource on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String workspaceName, String privateLinkResourceName) { + return getWithResponseAsync(resourceGroupName, workspaceName, privateLinkResourceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get specific private link resource information for this grafana resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @param privateLinkResourceName The privateLinkResourceName 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 specific private link resource information for this grafana resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateLinkResourceInner get( + String resourceGroupName, String workspaceName, String privateLinkResourceName) { + return getAsync(resourceGroupName, workspaceName, privateLinkResourceName).block(); + } + + /** + * Get specific private link resource information for this grafana resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @param privateLinkResourceName The privateLinkResourceName 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 specific private link resource information for this grafana resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String workspaceName, String privateLinkResourceName, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, privateLinkResourceName, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink 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 private link resources 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 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 private link resources 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/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/implementation/PrivateLinkResourcesImpl.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/implementation/PrivateLinkResourcesImpl.java new file mode 100644 index 000000000000..b2d8aeaf854c --- /dev/null +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/implementation/PrivateLinkResourcesImpl.java @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dashboard.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.dashboard.fluent.PrivateLinkResourcesClient; +import com.azure.resourcemanager.dashboard.fluent.models.PrivateLinkResourceInner; +import com.azure.resourcemanager.dashboard.models.PrivateLinkResource; +import com.azure.resourcemanager.dashboard.models.PrivateLinkResources; + +public final class PrivateLinkResourcesImpl implements PrivateLinkResources { + private static final ClientLogger LOGGER = new ClientLogger(PrivateLinkResourcesImpl.class); + + private final PrivateLinkResourcesClient innerClient; + + private final com.azure.resourcemanager.dashboard.DashboardManager serviceManager; + + public PrivateLinkResourcesImpl( + PrivateLinkResourcesClient innerClient, com.azure.resourcemanager.dashboard.DashboardManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String workspaceName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); + return Utils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String workspaceName, Context context) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, workspaceName, context); + return Utils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager())); + } + + public PrivateLinkResource get(String resourceGroupName, String workspaceName, String privateLinkResourceName) { + PrivateLinkResourceInner inner = + this.serviceClient().get(resourceGroupName, workspaceName, privateLinkResourceName); + if (inner != null) { + return new PrivateLinkResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse( + String resourceGroupName, String workspaceName, String privateLinkResourceName, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, workspaceName, privateLinkResourceName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new PrivateLinkResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + private PrivateLinkResourcesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.dashboard.DashboardManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/ActionType.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/ActionType.java index bd00af77d5d8..29faed045c8d 100644 --- a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/ActionType.java +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/ActionType.java @@ -24,7 +24,11 @@ public static ActionType fromString(String name) { return fromString(name, ActionType.class); } - /** @return known ActionType values. */ + /** + * Gets known ActionType values. + * + * @return known ActionType values. + */ public static Collection values() { return values(ActionType.class); } diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/ApiKey.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/ApiKey.java new file mode 100644 index 000000000000..73a3d6824bb4 --- /dev/null +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/ApiKey.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.dashboard.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for ApiKey. */ +public final class ApiKey extends ExpandableStringEnum { + /** Static value Disabled for ApiKey. */ + public static final ApiKey DISABLED = fromString("Disabled"); + + /** Static value Enabled for ApiKey. */ + public static final ApiKey ENABLED = fromString("Enabled"); + + /** + * Creates or finds a ApiKey from its string representation. + * + * @param name a name to look for. + * @return the corresponding ApiKey. + */ + @JsonCreator + public static ApiKey fromString(String name) { + return fromString(name, ApiKey.class); + } + + /** + * Gets known ApiKey values. + * + * @return known ApiKey values. + */ + public static Collection values() { + return values(ApiKey.class); + } +} diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/AutoGeneratedDomainNameLabelScope.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/AutoGeneratedDomainNameLabelScope.java index aa81e76962c4..e6aa7202547e 100644 --- a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/AutoGeneratedDomainNameLabelScope.java +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/AutoGeneratedDomainNameLabelScope.java @@ -24,7 +24,11 @@ public static AutoGeneratedDomainNameLabelScope fromString(String name) { return fromString(name, AutoGeneratedDomainNameLabelScope.class); } - /** @return known AutoGeneratedDomainNameLabelScope values. */ + /** + * Gets known AutoGeneratedDomainNameLabelScope values. + * + * @return known AutoGeneratedDomainNameLabelScope values. + */ public static Collection values() { return values(AutoGeneratedDomainNameLabelScope.class); } diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/AzureMonitorWorkspaceIntegration.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/AzureMonitorWorkspaceIntegration.java new file mode 100644 index 000000000000..3e2c3f87c585 --- /dev/null +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/AzureMonitorWorkspaceIntegration.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.dashboard.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Integrations for Azure Monitor Workspace. */ +@Fluent +public final class AzureMonitorWorkspaceIntegration { + /* + * The resource Id of the connected Azure Monitor Workspace. + */ + @JsonProperty(value = "azureMonitorWorkspaceResourceId") + private String azureMonitorWorkspaceResourceId; + + /** + * Get the azureMonitorWorkspaceResourceId property: The resource Id of the connected Azure Monitor Workspace. + * + * @return the azureMonitorWorkspaceResourceId value. + */ + public String azureMonitorWorkspaceResourceId() { + return this.azureMonitorWorkspaceResourceId; + } + + /** + * Set the azureMonitorWorkspaceResourceId property: The resource Id of the connected Azure Monitor Workspace. + * + * @param azureMonitorWorkspaceResourceId the azureMonitorWorkspaceResourceId value to set. + * @return the AzureMonitorWorkspaceIntegration object itself. + */ + public AzureMonitorWorkspaceIntegration withAzureMonitorWorkspaceResourceId( + String azureMonitorWorkspaceResourceId) { + this.azureMonitorWorkspaceResourceId = azureMonitorWorkspaceResourceId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/DeterministicOutboundIp.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/DeterministicOutboundIp.java new file mode 100644 index 000000000000..a59266be3f57 --- /dev/null +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/DeterministicOutboundIp.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.dashboard.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for DeterministicOutboundIp. */ +public final class DeterministicOutboundIp extends ExpandableStringEnum { + /** Static value Disabled for DeterministicOutboundIp. */ + public static final DeterministicOutboundIp DISABLED = fromString("Disabled"); + + /** Static value Enabled for DeterministicOutboundIp. */ + public static final DeterministicOutboundIp ENABLED = fromString("Enabled"); + + /** + * Creates or finds a DeterministicOutboundIp from its string representation. + * + * @param name a name to look for. + * @return the corresponding DeterministicOutboundIp. + */ + @JsonCreator + public static DeterministicOutboundIp fromString(String name) { + return fromString(name, DeterministicOutboundIp.class); + } + + /** + * Gets known DeterministicOutboundIp values. + * + * @return known DeterministicOutboundIp values. + */ + public static Collection values() { + return values(DeterministicOutboundIp.class); + } +} diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/GrafanaIntegrations.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/GrafanaIntegrations.java new file mode 100644 index 000000000000..846cb1b8f30f --- /dev/null +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/GrafanaIntegrations.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dashboard.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * GrafanaIntegrations is a bundled observability experience (e.g. pre-configured data source, tailored Grafana + * dashboards, alerting defaults) for common monitoring scenarios. + */ +@Fluent +public final class GrafanaIntegrations { + /* + * The azureMonitorWorkspaceIntegrations property. + */ + @JsonProperty(value = "azureMonitorWorkspaceIntegrations") + private List azureMonitorWorkspaceIntegrations; + + /** + * Get the azureMonitorWorkspaceIntegrations property: The azureMonitorWorkspaceIntegrations property. + * + * @return the azureMonitorWorkspaceIntegrations value. + */ + public List azureMonitorWorkspaceIntegrations() { + return this.azureMonitorWorkspaceIntegrations; + } + + /** + * Set the azureMonitorWorkspaceIntegrations property: The azureMonitorWorkspaceIntegrations property. + * + * @param azureMonitorWorkspaceIntegrations the azureMonitorWorkspaceIntegrations value to set. + * @return the GrafanaIntegrations object itself. + */ + public GrafanaIntegrations withAzureMonitorWorkspaceIntegrations( + List azureMonitorWorkspaceIntegrations) { + this.azureMonitorWorkspaceIntegrations = azureMonitorWorkspaceIntegrations; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (azureMonitorWorkspaceIntegrations() != null) { + azureMonitorWorkspaceIntegrations().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/IdentityType.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/IdentityType.java deleted file mode 100644 index 55136b1d01cc..000000000000 --- a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/IdentityType.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dashboard.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for IdentityType. */ -public final class IdentityType extends ExpandableStringEnum { - /** Static value None for IdentityType. */ - public static final IdentityType NONE = fromString("None"); - - /** Static value SystemAssigned for IdentityType. */ - public static final IdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); - - /** - * Creates or finds a IdentityType from its string representation. - * - * @param name a name to look for. - * @return the corresponding IdentityType. - */ - @JsonCreator - public static IdentityType fromString(String name) { - return fromString(name, IdentityType.class); - } - - /** @return known IdentityType values. */ - public static Collection values() { - return values(IdentityType.class); - } -} diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/ManagedGrafana.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/ManagedGrafana.java index 0e1c18b25ec8..0b9b593e8418 100644 --- a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/ManagedGrafana.java +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/ManagedGrafana.java @@ -66,7 +66,7 @@ public interface ManagedGrafana { * * @return the identity value. */ - ManagedIdentity identity(); + ManagedServiceIdentity identity(); /** * Gets the systemData property: The system meta data relating to this grafana resource. @@ -89,6 +89,13 @@ public interface ManagedGrafana { */ String regionName(); + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + /** * Gets the inner com.azure.resourcemanager.dashboard.fluent.models.ManagedGrafanaInner object. * @@ -198,7 +205,7 @@ interface WithIdentity { * @param identity The managed identity of the grafana resource. * @return the next definition stage. */ - WithCreate withIdentity(ManagedIdentity identity); + WithCreate withIdentity(ManagedServiceIdentity identity); } } /** @@ -209,7 +216,7 @@ interface WithIdentity { ManagedGrafana.Update update(); /** The template for ManagedGrafana update. */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity { + interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithProperties { /** * Executes the update request. * @@ -245,7 +252,17 @@ interface WithIdentity { * @param identity The managed identity of the grafana resource. * @return the next definition stage. */ - Update withIdentity(ManagedIdentity identity); + Update withIdentity(ManagedServiceIdentity identity); + } + /** The stage of the ManagedGrafana update allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: Properties specific to the managed grafana resource.. + * + * @param properties Properties specific to the managed grafana resource. + * @return the next definition stage. + */ + Update withProperties(ManagedGrafanaPropertiesUpdateParameters properties); } } /** diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/ManagedGrafanaProperties.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/ManagedGrafanaProperties.java index c81120ff32c6..9f779ddd58e4 100644 --- a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/ManagedGrafanaProperties.java +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/ManagedGrafanaProperties.java @@ -5,7 +5,9 @@ package com.azure.resourcemanager.dashboard.models; import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.dashboard.fluent.models.PrivateEndpointConnectionInner; import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; /** Properties specific to the grafana resource. */ @Fluent @@ -13,7 +15,7 @@ public final class ManagedGrafanaProperties { /* * Provisioning state of the resource. */ - @JsonProperty(value = "provisioningState") + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private ProvisioningState provisioningState; /* @@ -29,17 +31,54 @@ public final class ManagedGrafanaProperties { private String endpoint; /* - * The zoneRedundancy property. + * Indicate the state for enable or disable traffic over the public interface. + */ + @JsonProperty(value = "publicNetworkAccess") + private PublicNetworkAccess publicNetworkAccess; + + /* + * The zone redundancy setting of the Grafana instance. */ @JsonProperty(value = "zoneRedundancy") private ZoneRedundancy zoneRedundancy; /* - * The autoGeneratedDomainNameLabelScope property. + * The api key setting of the Grafana instance. + */ + @JsonProperty(value = "apiKey") + private ApiKey apiKey; + + /* + * Whether a Grafana instance uses deterministic outbound IPs. + */ + @JsonProperty(value = "deterministicOutboundIP") + private DeterministicOutboundIp deterministicOutboundIp; + + /* + * List of outbound IPs if deterministicOutboundIP is enabled. + */ + @JsonProperty(value = "outboundIPs", access = JsonProperty.Access.WRITE_ONLY) + private List outboundIPs; + + /* + * The private endpoint connections of the Grafana instance. + */ + @JsonProperty(value = "privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY) + private List privateEndpointConnections; + + /* + * Scope for dns deterministic name hash calculation. */ @JsonProperty(value = "autoGeneratedDomainNameLabelScope") private AutoGeneratedDomainNameLabelScope autoGeneratedDomainNameLabelScope; + /* + * GrafanaIntegrations is a bundled observability experience (e.g. pre-configured data source, tailored Grafana + * dashboards, alerting defaults) for common monitoring scenarios. + */ + @JsonProperty(value = "grafanaIntegrations") + private GrafanaIntegrations grafanaIntegrations; + /** * Get the provisioningState property: Provisioning state of the resource. * @@ -49,17 +88,6 @@ public ProvisioningState provisioningState() { return this.provisioningState; } - /** - * Set the provisioningState property: Provisioning state of the resource. - * - * @param provisioningState the provisioningState value to set. - * @return the ManagedGrafanaProperties object itself. - */ - public ManagedGrafanaProperties withProvisioningState(ProvisioningState provisioningState) { - this.provisioningState = provisioningState; - return this; - } - /** * Get the grafanaVersion property: The Grafana software version. * @@ -79,7 +107,27 @@ public String endpoint() { } /** - * Get the zoneRedundancy property: The zoneRedundancy property. + * Get the publicNetworkAccess property: Indicate the state for enable or disable traffic over the public interface. + * + * @return the publicNetworkAccess value. + */ + public PublicNetworkAccess publicNetworkAccess() { + return this.publicNetworkAccess; + } + + /** + * Set the publicNetworkAccess property: Indicate the state for enable or disable traffic over the public interface. + * + * @param publicNetworkAccess the publicNetworkAccess value to set. + * @return the ManagedGrafanaProperties object itself. + */ + public ManagedGrafanaProperties withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { + this.publicNetworkAccess = publicNetworkAccess; + return this; + } + + /** + * Get the zoneRedundancy property: The zone redundancy setting of the Grafana instance. * * @return the zoneRedundancy value. */ @@ -88,7 +136,7 @@ public ZoneRedundancy zoneRedundancy() { } /** - * Set the zoneRedundancy property: The zoneRedundancy property. + * Set the zoneRedundancy property: The zone redundancy setting of the Grafana instance. * * @param zoneRedundancy the zoneRedundancy value to set. * @return the ManagedGrafanaProperties object itself. @@ -99,7 +147,65 @@ public ManagedGrafanaProperties withZoneRedundancy(ZoneRedundancy zoneRedundancy } /** - * Get the autoGeneratedDomainNameLabelScope property: The autoGeneratedDomainNameLabelScope property. + * Get the apiKey property: The api key setting of the Grafana instance. + * + * @return the apiKey value. + */ + public ApiKey apiKey() { + return this.apiKey; + } + + /** + * Set the apiKey property: The api key setting of the Grafana instance. + * + * @param apiKey the apiKey value to set. + * @return the ManagedGrafanaProperties object itself. + */ + public ManagedGrafanaProperties withApiKey(ApiKey apiKey) { + this.apiKey = apiKey; + return this; + } + + /** + * Get the deterministicOutboundIp property: Whether a Grafana instance uses deterministic outbound IPs. + * + * @return the deterministicOutboundIp value. + */ + public DeterministicOutboundIp deterministicOutboundIp() { + return this.deterministicOutboundIp; + } + + /** + * Set the deterministicOutboundIp property: Whether a Grafana instance uses deterministic outbound IPs. + * + * @param deterministicOutboundIp the deterministicOutboundIp value to set. + * @return the ManagedGrafanaProperties object itself. + */ + public ManagedGrafanaProperties withDeterministicOutboundIp(DeterministicOutboundIp deterministicOutboundIp) { + this.deterministicOutboundIp = deterministicOutboundIp; + return this; + } + + /** + * Get the outboundIPs property: List of outbound IPs if deterministicOutboundIP is enabled. + * + * @return the outboundIPs value. + */ + public List outboundIPs() { + return this.outboundIPs; + } + + /** + * Get the privateEndpointConnections property: The private endpoint connections of the Grafana instance. + * + * @return the privateEndpointConnections value. + */ + public List privateEndpointConnections() { + return this.privateEndpointConnections; + } + + /** + * Get the autoGeneratedDomainNameLabelScope property: Scope for dns deterministic name hash calculation. * * @return the autoGeneratedDomainNameLabelScope value. */ @@ -108,7 +214,7 @@ public AutoGeneratedDomainNameLabelScope autoGeneratedDomainNameLabelScope() { } /** - * Set the autoGeneratedDomainNameLabelScope property: The autoGeneratedDomainNameLabelScope property. + * Set the autoGeneratedDomainNameLabelScope property: Scope for dns deterministic name hash calculation. * * @param autoGeneratedDomainNameLabelScope the autoGeneratedDomainNameLabelScope value to set. * @return the ManagedGrafanaProperties object itself. @@ -119,11 +225,39 @@ public ManagedGrafanaProperties withAutoGeneratedDomainNameLabelScope( return this; } + /** + * Get the grafanaIntegrations property: GrafanaIntegrations is a bundled observability experience (e.g. + * pre-configured data source, tailored Grafana dashboards, alerting defaults) for common monitoring scenarios. + * + * @return the grafanaIntegrations value. + */ + public GrafanaIntegrations grafanaIntegrations() { + return this.grafanaIntegrations; + } + + /** + * Set the grafanaIntegrations property: GrafanaIntegrations is a bundled observability experience (e.g. + * pre-configured data source, tailored Grafana dashboards, alerting defaults) for common monitoring scenarios. + * + * @param grafanaIntegrations the grafanaIntegrations value to set. + * @return the ManagedGrafanaProperties object itself. + */ + public ManagedGrafanaProperties withGrafanaIntegrations(GrafanaIntegrations grafanaIntegrations) { + this.grafanaIntegrations = grafanaIntegrations; + return this; + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (privateEndpointConnections() != null) { + privateEndpointConnections().forEach(e -> e.validate()); + } + if (grafanaIntegrations() != null) { + grafanaIntegrations().validate(); + } } } diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/ManagedGrafanaPropertiesUpdateParameters.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/ManagedGrafanaPropertiesUpdateParameters.java new file mode 100644 index 000000000000..2445f02a0a89 --- /dev/null +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/ManagedGrafanaPropertiesUpdateParameters.java @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dashboard.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The properties parameters for a PATCH request to a grafana resource. */ +@Fluent +public final class ManagedGrafanaPropertiesUpdateParameters { + /* + * The zone redundancy setting of the Grafana instance. + */ + @JsonProperty(value = "zoneRedundancy") + private ZoneRedundancy zoneRedundancy; + + /* + * The api key setting of the Grafana instance. + */ + @JsonProperty(value = "apiKey") + private ApiKey apiKey; + + /* + * Whether a Grafana instance uses deterministic outbound IPs. + */ + @JsonProperty(value = "deterministicOutboundIP") + private DeterministicOutboundIp deterministicOutboundIp; + + /* + * Indicate the state for enable or disable traffic over the public interface. + */ + @JsonProperty(value = "publicNetworkAccess") + private PublicNetworkAccess publicNetworkAccess; + + /* + * GrafanaIntegrations is a bundled observability experience (e.g. pre-configured data source, tailored Grafana + * dashboards, alerting defaults) for common monitoring scenarios. + */ + @JsonProperty(value = "grafanaIntegrations") + private GrafanaIntegrations grafanaIntegrations; + + /** + * Get the zoneRedundancy property: The zone redundancy setting of the Grafana instance. + * + * @return the zoneRedundancy value. + */ + public ZoneRedundancy zoneRedundancy() { + return this.zoneRedundancy; + } + + /** + * Set the zoneRedundancy property: The zone redundancy setting of the Grafana instance. + * + * @param zoneRedundancy the zoneRedundancy value to set. + * @return the ManagedGrafanaPropertiesUpdateParameters object itself. + */ + public ManagedGrafanaPropertiesUpdateParameters withZoneRedundancy(ZoneRedundancy zoneRedundancy) { + this.zoneRedundancy = zoneRedundancy; + return this; + } + + /** + * Get the apiKey property: The api key setting of the Grafana instance. + * + * @return the apiKey value. + */ + public ApiKey apiKey() { + return this.apiKey; + } + + /** + * Set the apiKey property: The api key setting of the Grafana instance. + * + * @param apiKey the apiKey value to set. + * @return the ManagedGrafanaPropertiesUpdateParameters object itself. + */ + public ManagedGrafanaPropertiesUpdateParameters withApiKey(ApiKey apiKey) { + this.apiKey = apiKey; + return this; + } + + /** + * Get the deterministicOutboundIp property: Whether a Grafana instance uses deterministic outbound IPs. + * + * @return the deterministicOutboundIp value. + */ + public DeterministicOutboundIp deterministicOutboundIp() { + return this.deterministicOutboundIp; + } + + /** + * Set the deterministicOutboundIp property: Whether a Grafana instance uses deterministic outbound IPs. + * + * @param deterministicOutboundIp the deterministicOutboundIp value to set. + * @return the ManagedGrafanaPropertiesUpdateParameters object itself. + */ + public ManagedGrafanaPropertiesUpdateParameters withDeterministicOutboundIp( + DeterministicOutboundIp deterministicOutboundIp) { + this.deterministicOutboundIp = deterministicOutboundIp; + return this; + } + + /** + * Get the publicNetworkAccess property: Indicate the state for enable or disable traffic over the public interface. + * + * @return the publicNetworkAccess value. + */ + public PublicNetworkAccess publicNetworkAccess() { + return this.publicNetworkAccess; + } + + /** + * Set the publicNetworkAccess property: Indicate the state for enable or disable traffic over the public interface. + * + * @param publicNetworkAccess the publicNetworkAccess value to set. + * @return the ManagedGrafanaPropertiesUpdateParameters object itself. + */ + public ManagedGrafanaPropertiesUpdateParameters withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { + this.publicNetworkAccess = publicNetworkAccess; + return this; + } + + /** + * Get the grafanaIntegrations property: GrafanaIntegrations is a bundled observability experience (e.g. + * pre-configured data source, tailored Grafana dashboards, alerting defaults) for common monitoring scenarios. + * + * @return the grafanaIntegrations value. + */ + public GrafanaIntegrations grafanaIntegrations() { + return this.grafanaIntegrations; + } + + /** + * Set the grafanaIntegrations property: GrafanaIntegrations is a bundled observability experience (e.g. + * pre-configured data source, tailored Grafana dashboards, alerting defaults) for common monitoring scenarios. + * + * @param grafanaIntegrations the grafanaIntegrations value to set. + * @return the ManagedGrafanaPropertiesUpdateParameters object itself. + */ + public ManagedGrafanaPropertiesUpdateParameters withGrafanaIntegrations(GrafanaIntegrations grafanaIntegrations) { + this.grafanaIntegrations = grafanaIntegrations; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (grafanaIntegrations() != null) { + grafanaIntegrations().validate(); + } + } +} diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/ManagedGrafanaUpdateParameters.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/ManagedGrafanaUpdateParameters.java index 1d0be5880840..8e0fb99bac78 100644 --- a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/ManagedGrafanaUpdateParameters.java +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/ManagedGrafanaUpdateParameters.java @@ -16,7 +16,7 @@ public final class ManagedGrafanaUpdateParameters { * The managed identity of the grafana resource. */ @JsonProperty(value = "identity") - private ManagedIdentity identity; + private ManagedServiceIdentity identity; /* * The new tags of the grafana resource. @@ -25,12 +25,18 @@ public final class ManagedGrafanaUpdateParameters { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; + /* + * Properties specific to the managed grafana resource. + */ + @JsonProperty(value = "properties") + private ManagedGrafanaPropertiesUpdateParameters properties; + /** * Get the identity property: The managed identity of the grafana resource. * * @return the identity value. */ - public ManagedIdentity identity() { + public ManagedServiceIdentity identity() { return this.identity; } @@ -40,7 +46,7 @@ public ManagedIdentity identity() { * @param identity the identity value to set. * @return the ManagedGrafanaUpdateParameters object itself. */ - public ManagedGrafanaUpdateParameters withIdentity(ManagedIdentity identity) { + public ManagedGrafanaUpdateParameters withIdentity(ManagedServiceIdentity identity) { this.identity = identity; return this; } @@ -65,6 +71,26 @@ public ManagedGrafanaUpdateParameters withTags(Map tags) { return this; } + /** + * Get the properties property: Properties specific to the managed grafana resource. + * + * @return the properties value. + */ + public ManagedGrafanaPropertiesUpdateParameters properties() { + return this.properties; + } + + /** + * Set the properties property: Properties specific to the managed grafana resource. + * + * @param properties the properties value to set. + * @return the ManagedGrafanaUpdateParameters object itself. + */ + public ManagedGrafanaUpdateParameters withProperties(ManagedGrafanaPropertiesUpdateParameters properties) { + this.properties = properties; + return this; + } + /** * Validates the instance. * @@ -74,5 +100,8 @@ public void validate() { if (identity() != null) { identity().validate(); } + if (properties() != null) { + properties().validate(); + } } } diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/ManagedIdentity.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/ManagedIdentity.java deleted file mode 100644 index fbf64af62624..000000000000 --- a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/ManagedIdentity.java +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dashboard.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** The managed identity of a resource. */ -@Fluent -public class ManagedIdentity { - /* - * The type 'SystemAssigned, UserAssigned' includes both an implicitly - * created identity and a set of user assigned identities. The type 'None' - * will remove any identities from the resource. - */ - @JsonProperty(value = "type") - private IdentityType type; - - /* - * The principal id of the system assigned identity. - */ - @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) - private String principalId; - - /* - * The tenant id of the system assigned identity. - */ - @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) - private String tenantId; - - /* - * Dictionary of user assigned identities. - */ - @JsonProperty(value = "userAssignedIdentities") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map userAssignedIdentities; - - /** - * Get the type property: The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a - * set of user assigned identities. The type 'None' will remove any identities from the resource. - * - * @return the type value. - */ - public IdentityType type() { - return this.type; - } - - /** - * Set the type property: The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a - * set of user assigned identities. The type 'None' will remove any identities from the resource. - * - * @param type the type value to set. - * @return the ManagedIdentity object itself. - */ - public ManagedIdentity withType(IdentityType type) { - this.type = type; - return this; - } - - /** - * Get the principalId property: The principal id of the system assigned identity. - * - * @return the principalId value. - */ - public String principalId() { - return this.principalId; - } - - /** - * Get the tenantId property: The tenant id of the system assigned identity. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.tenantId; - } - - /** - * Get the userAssignedIdentities property: Dictionary of user assigned identities. - * - * @return the userAssignedIdentities value. - */ - public Map userAssignedIdentities() { - return this.userAssignedIdentities; - } - - /** - * Set the userAssignedIdentities property: Dictionary of user assigned identities. - * - * @param userAssignedIdentities the userAssignedIdentities value to set. - * @return the ManagedIdentity object itself. - */ - public ManagedIdentity withUserAssignedIdentities(Map userAssignedIdentities) { - this.userAssignedIdentities = userAssignedIdentities; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (userAssignedIdentities() != null) { - userAssignedIdentities() - .values() - .forEach( - e -> { - if (e != null) { - e.validate(); - } - }); - } - } -} diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/ManagedServiceIdentity.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/ManagedServiceIdentity.java new file mode 100644 index 000000000000..6e78446c7362 --- /dev/null +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/ManagedServiceIdentity.java @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dashboard.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; +import java.util.UUID; + +/** Managed service identity (system assigned and/or user assigned identities). */ +@Fluent +public class ManagedServiceIdentity { + /* + * The service principal ID of the system assigned identity. This property will only be provided for a system + * assigned identity. + */ + @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) + private UUID principalId; + + /* + * The tenant ID of the system assigned identity. This property will only be provided for a system assigned + * identity. + */ + @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) + private UUID tenantId; + + /* + * Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + */ + @JsonProperty(value = "type", required = true) + private ManagedServiceIdentityType type; + + /* + * The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys + * will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + * The dictionary values can be empty objects ({}) in requests. + */ + @JsonProperty(value = "userAssignedIdentities") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map userAssignedIdentities; + + /** + * Get the principalId property: The service principal ID of the system assigned identity. This property will only + * be provided for a system assigned identity. + * + * @return the principalId value. + */ + public UUID principalId() { + return this.principalId; + } + + /** + * Get the tenantId property: The tenant ID of the system assigned identity. This property will only be provided for + * a system assigned identity. + * + * @return the tenantId value. + */ + public UUID tenantId() { + return this.tenantId; + } + + /** + * Get the type property: Type of managed service identity (where both SystemAssigned and UserAssigned types are + * allowed). + * + * @return the type value. + */ + public ManagedServiceIdentityType type() { + return this.type; + } + + /** + * Set the type property: Type of managed service identity (where both SystemAssigned and UserAssigned types are + * allowed). + * + * @param type the type value to set. + * @return the ManagedServiceIdentity object itself. + */ + public ManagedServiceIdentity withType(ManagedServiceIdentityType type) { + this.type = type; + return this; + } + + /** + * Get the userAssignedIdentities property: The set of user assigned identities associated with the resource. The + * userAssignedIdentities dictionary keys will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + * The dictionary values can be empty objects ({}) in requests. + * + * @return the userAssignedIdentities value. + */ + public Map userAssignedIdentities() { + return this.userAssignedIdentities; + } + + /** + * Set the userAssignedIdentities property: The set of user assigned identities associated with the resource. The + * userAssignedIdentities dictionary keys will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + * The dictionary values can be empty objects ({}) in requests. + * + * @param userAssignedIdentities the userAssignedIdentities value to set. + * @return the ManagedServiceIdentity object itself. + */ + public ManagedServiceIdentity withUserAssignedIdentities(Map userAssignedIdentities) { + this.userAssignedIdentities = userAssignedIdentities; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (type() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property type in model ManagedServiceIdentity")); + } + if (userAssignedIdentities() != null) { + userAssignedIdentities() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ManagedServiceIdentity.class); +} diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/ManagedServiceIdentityType.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/ManagedServiceIdentityType.java new file mode 100644 index 000000000000..87b07cbae551 --- /dev/null +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/ManagedServiceIdentityType.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dashboard.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for ManagedServiceIdentityType. */ +public final class ManagedServiceIdentityType extends ExpandableStringEnum { + /** Static value None for ManagedServiceIdentityType. */ + public static final ManagedServiceIdentityType NONE = fromString("None"); + + /** Static value SystemAssigned for ManagedServiceIdentityType. */ + public static final ManagedServiceIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); + + /** Static value UserAssigned for ManagedServiceIdentityType. */ + public static final ManagedServiceIdentityType USER_ASSIGNED = fromString("UserAssigned"); + + /** Static value SystemAssigned,UserAssigned for ManagedServiceIdentityType. */ + public static final ManagedServiceIdentityType SYSTEM_ASSIGNED_USER_ASSIGNED = + fromString("SystemAssigned,UserAssigned"); + + /** + * Creates or finds a ManagedServiceIdentityType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ManagedServiceIdentityType. + */ + @JsonCreator + public static ManagedServiceIdentityType fromString(String name) { + return fromString(name, ManagedServiceIdentityType.class); + } + + /** + * Gets known ManagedServiceIdentityType values. + * + * @return known ManagedServiceIdentityType values. + */ + public static Collection values() { + return values(ManagedServiceIdentityType.class); + } +} diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/OperationResult.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/Operation.java similarity index 58% rename from sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/OperationResult.java rename to sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/Operation.java index d4a2a9878421..7b78766e275c 100644 --- a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/OperationResult.java +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/Operation.java @@ -4,19 +4,20 @@ package com.azure.resourcemanager.dashboard.models; -import com.azure.resourcemanager.dashboard.fluent.models.OperationResultInner; +import com.azure.resourcemanager.dashboard.fluent.models.OperationInner; -/** An immutable client-side representation of OperationResult. */ -public interface OperationResult { +/** An immutable client-side representation of Operation. */ +public interface Operation { /** - * Gets the name property: Operation name, i.e., {provider}/{resource}/{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: Indicates whether the operation applies to data-plane. Set "true" for data-plane + * 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. @@ -31,24 +32,25 @@ public interface OperationResult { OperationDisplay display(); /** - * Gets the origin property: The intended executor of the operation. + * 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: Indicates the action type. "Internal" refers to actions that are for internal only - * APIs. + * 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.dashboard.fluent.models.OperationResultInner object. + * Gets the inner com.azure.resourcemanager.dashboard.fluent.models.OperationInner object. * * @return the inner object. */ - OperationResultInner innerModel(); + OperationInner innerModel(); } diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/OperationDisplay.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/OperationDisplay.java index b935069995e4..b291155522c9 100644 --- a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/OperationDisplay.java +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/OperationDisplay.java @@ -11,33 +11,35 @@ @Immutable public final class OperationDisplay { /* - * The localized friendly form of the resource provider name, i.e., - * Microsoft.Dashboard. + * 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., 'grafana'. + * 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; /* - * Operation type, e.g., read, write, delete, etc. + * 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; /* - * Description of the operation, e.g., 'Read grafana'. + * 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; /** - * Get the provider property: The localized friendly form of the resource provider name, i.e., Microsoft.Dashboard. + * 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. */ @@ -46,8 +48,8 @@ public String provider() { } /** - * Get the resource property: The localized friendly name of the resource type related to this operation, e.g., - * 'grafana'. + * 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. */ @@ -56,7 +58,8 @@ public String resource() { } /** - * Get the operation property: Operation type, e.g., read, write, delete, etc. + * 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. */ @@ -65,7 +68,8 @@ public String operation() { } /** - * Get the description property: Description of the operation, e.g., 'Read grafana'. + * Get the description property: The short, localized friendly description of the operation; suitable for tool tips + * and detailed views. * * @return the description value. */ diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/OperationListResult.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/OperationListResult.java index d26174cef834..4bfdfe3ed1b7 100644 --- a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/OperationListResult.java +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/OperationListResult.java @@ -5,39 +5,39 @@ package com.azure.resourcemanager.dashboard.models; import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.dashboard.fluent.models.OperationResultInner; +import com.azure.resourcemanager.dashboard.fluent.models.OperationInner; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** - * A list of REST API operations supported by Microsoft.Dashboard provider. It contains an URL link to get the next set - * of results. + * 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 Microsoft.Dashboard provider. + * List of operations supported by the resource provider */ @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; + private List value; /* - * URL to get the next set of operation list results if there are any. + * 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; /** - * Get the value property: List of operations supported by the Microsoft.Dashboard provider. + * Get the value property: List of operations supported by the resource provider. * * @return the value value. */ - public List 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. + * Get the nextLink property: URL to get the next set of operation list results (if there are any). * * @return the nextLink value. */ diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/Operations.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/Operations.java index ae1a6cd046cf..572e2aadedb1 100644 --- a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/Operations.java +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/Operations.java @@ -14,10 +14,10 @@ public interface Operations { * * @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 Microsoft.Dashboard provider as paginated response with {@link + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link * PagedIterable}. */ - PagedIterable list(); + PagedIterable list(); /** * List all available API operations provided by Microsoft.Dashboard. @@ -26,8 +26,8 @@ public interface Operations { * @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 Microsoft.Dashboard provider as paginated response with {@link + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link * PagedIterable}. */ - PagedIterable list(Context context); + PagedIterable list(Context context); } diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/Origin.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/Origin.java index c8771de66be2..c8dfcc40002c 100644 --- a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/Origin.java +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/Origin.java @@ -30,7 +30,11 @@ public static Origin fromString(String name) { return fromString(name, Origin.class); } - /** @return known Origin values. */ + /** + * Gets known Origin values. + * + * @return known Origin values. + */ public static Collection values() { return values(Origin.class); } diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/PrivateEndpoint.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/PrivateEndpoint.java new file mode 100644 index 000000000000..30c5f60d474b --- /dev/null +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/PrivateEndpoint.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.dashboard.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The Private Endpoint resource. */ +@Immutable +public final class PrivateEndpoint { + /* + * The ARM identifier for Private Endpoint + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /** + * Get the id property: The ARM identifier for Private Endpoint. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/PrivateEndpointConnection.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/PrivateEndpointConnection.java new file mode 100644 index 000000000000..c827421beab3 --- /dev/null +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/PrivateEndpointConnection.java @@ -0,0 +1,241 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dashboard.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.dashboard.fluent.models.PrivateEndpointConnectionInner; +import java.util.List; + +/** An immutable client-side representation of PrivateEndpointConnection. */ +public interface PrivateEndpointConnection { + /** + * 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 privateEndpoint property: The resource of private end point. + * + * @return the privateEndpoint value. + */ + PrivateEndpoint privateEndpoint(); + + /** + * Gets the privateLinkServiceConnectionState property: A collection of information about the state of the + * connection between service consumer and provider. + * + * @return the privateLinkServiceConnectionState value. + */ + PrivateLinkServiceConnectionState privateLinkServiceConnectionState(); + + /** + * Gets the groupIds property: The private endpoint connection group ids. + * + * @return the groupIds value. + */ + List groupIds(); + + /** + * Gets the provisioningState property: The provisioning state of the private endpoint connection resource. + * + * @return the provisioningState value. + */ + PrivateEndpointConnectionProvisioningState provisioningState(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.dashboard.fluent.models.PrivateEndpointConnectionInner object. + * + * @return the inner object. + */ + PrivateEndpointConnectionInner innerModel(); + + /** The entirety of the PrivateEndpointConnection definition. */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + /** The PrivateEndpointConnection definition stages. */ + interface DefinitionStages { + /** The first stage of the PrivateEndpointConnection definition. */ + interface Blank extends WithParentResource { + } + /** The stage of the PrivateEndpointConnection definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, workspaceName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @return the next definition stage. + */ + WithCreate withExistingGrafana(String resourceGroupName, String workspaceName); + } + /** + * The stage of the PrivateEndpointConnection 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.WithPrivateEndpoint, + DefinitionStages.WithPrivateLinkServiceConnectionState, + DefinitionStages.WithGroupIds { + /** + * Executes the create request. + * + * @return the created resource. + */ + PrivateEndpointConnection create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + PrivateEndpointConnection create(Context context); + } + /** The stage of the PrivateEndpointConnection definition allowing to specify privateEndpoint. */ + interface WithPrivateEndpoint { + /** + * Specifies the privateEndpoint property: The resource of private end point.. + * + * @param privateEndpoint The resource of private end point. + * @return the next definition stage. + */ + WithCreate withPrivateEndpoint(PrivateEndpoint privateEndpoint); + } + /** + * The stage of the PrivateEndpointConnection definition allowing to specify privateLinkServiceConnectionState. + */ + interface WithPrivateLinkServiceConnectionState { + /** + * Specifies the privateLinkServiceConnectionState property: A collection of information about the state of + * the connection between service consumer and provider.. + * + * @param privateLinkServiceConnectionState A collection of information about the state of the connection + * between service consumer and provider. + * @return the next definition stage. + */ + WithCreate withPrivateLinkServiceConnectionState( + PrivateLinkServiceConnectionState privateLinkServiceConnectionState); + } + /** The stage of the PrivateEndpointConnection definition allowing to specify groupIds. */ + interface WithGroupIds { + /** + * Specifies the groupIds property: The private endpoint connection group ids.. + * + * @param groupIds The private endpoint connection group ids. + * @return the next definition stage. + */ + WithCreate withGroupIds(List groupIds); + } + } + /** + * Begins update for the PrivateEndpointConnection resource. + * + * @return the stage of resource update. + */ + PrivateEndpointConnection.Update update(); + + /** The template for PrivateEndpointConnection update. */ + interface Update + extends UpdateStages.WithPrivateEndpoint, + UpdateStages.WithPrivateLinkServiceConnectionState, + UpdateStages.WithGroupIds { + /** + * Executes the update request. + * + * @return the updated resource. + */ + PrivateEndpointConnection apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + PrivateEndpointConnection apply(Context context); + } + /** The PrivateEndpointConnection update stages. */ + interface UpdateStages { + /** The stage of the PrivateEndpointConnection update allowing to specify privateEndpoint. */ + interface WithPrivateEndpoint { + /** + * Specifies the privateEndpoint property: The resource of private end point.. + * + * @param privateEndpoint The resource of private end point. + * @return the next definition stage. + */ + Update withPrivateEndpoint(PrivateEndpoint privateEndpoint); + } + /** The stage of the PrivateEndpointConnection update allowing to specify privateLinkServiceConnectionState. */ + interface WithPrivateLinkServiceConnectionState { + /** + * Specifies the privateLinkServiceConnectionState property: A collection of information about the state of + * the connection between service consumer and provider.. + * + * @param privateLinkServiceConnectionState A collection of information about the state of the connection + * between service consumer and provider. + * @return the next definition stage. + */ + Update withPrivateLinkServiceConnectionState( + PrivateLinkServiceConnectionState privateLinkServiceConnectionState); + } + /** The stage of the PrivateEndpointConnection update allowing to specify groupIds. */ + interface WithGroupIds { + /** + * Specifies the groupIds property: The private endpoint connection group ids.. + * + * @param groupIds The private endpoint connection group ids. + * @return the next definition stage. + */ + Update withGroupIds(List groupIds); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + PrivateEndpointConnection refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + PrivateEndpointConnection refresh(Context context); +} diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/PrivateEndpointConnectionListResult.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/PrivateEndpointConnectionListResult.java new file mode 100644 index 000000000000..758280811702 --- /dev/null +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/PrivateEndpointConnectionListResult.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dashboard.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.dashboard.fluent.models.PrivateEndpointConnectionInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** List of private endpoint connection associated with the specified storage account. */ +@Fluent +public final class PrivateEndpointConnectionListResult { + /* + * Array of private endpoint connections + */ + @JsonProperty(value = "value") + 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; + + /** + * Get the value property: Array of private endpoint connections. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Array of private endpoint connections. + * + * @param value the value value to set. + * @return the PrivateEndpointConnectionListResult object itself. + */ + public PrivateEndpointConnectionListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * 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/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/PrivateEndpointConnectionProvisioningState.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/PrivateEndpointConnectionProvisioningState.java new file mode 100644 index 000000000000..265d51156ca7 --- /dev/null +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/PrivateEndpointConnectionProvisioningState.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dashboard.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for PrivateEndpointConnectionProvisioningState. */ +public final class PrivateEndpointConnectionProvisioningState + extends ExpandableStringEnum { + /** Static value Succeeded for PrivateEndpointConnectionProvisioningState. */ + public static final PrivateEndpointConnectionProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Creating for PrivateEndpointConnectionProvisioningState. */ + public static final PrivateEndpointConnectionProvisioningState CREATING = fromString("Creating"); + + /** Static value Deleting for PrivateEndpointConnectionProvisioningState. */ + public static final PrivateEndpointConnectionProvisioningState DELETING = fromString("Deleting"); + + /** Static value Failed for PrivateEndpointConnectionProvisioningState. */ + public static final PrivateEndpointConnectionProvisioningState FAILED = fromString("Failed"); + + /** + * Creates or finds a PrivateEndpointConnectionProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding PrivateEndpointConnectionProvisioningState. + */ + @JsonCreator + public static PrivateEndpointConnectionProvisioningState fromString(String name) { + return fromString(name, PrivateEndpointConnectionProvisioningState.class); + } + + /** + * Gets known PrivateEndpointConnectionProvisioningState values. + * + * @return known PrivateEndpointConnectionProvisioningState values. + */ + public static Collection values() { + return values(PrivateEndpointConnectionProvisioningState.class); + } +} diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/PrivateEndpointConnections.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/PrivateEndpointConnections.java new file mode 100644 index 000000000000..1c8bc8a04582 --- /dev/null +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/PrivateEndpointConnections.java @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dashboard.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 PrivateEndpointConnections. */ +public interface PrivateEndpointConnections { + /** + * Get private endpoint connections. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @param privateEndpointConnectionName The private endpoint connection name of Azure Managed Grafana. + * @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 private endpoint connections. + */ + PrivateEndpointConnection get(String resourceGroupName, String workspaceName, String privateEndpointConnectionName); + + /** + * Get private endpoint connections. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @param privateEndpointConnectionName The private endpoint connection name of Azure Managed Grafana. + * @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 private endpoint connections along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context); + + /** + * Delete private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @param privateEndpointConnectionName The private endpoint connection name of Azure Managed Grafana. + * @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 workspaceName, String privateEndpointConnectionName); + + /** + * Delete private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @param privateEndpointConnectionName The private endpoint connection name of Azure Managed Grafana. + * @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 workspaceName, String privateEndpointConnectionName, Context context); + + /** + * Get private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @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 private endpoint connection as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * Get private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @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 private endpoint connection as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName, Context context); + + /** + * Get private endpoint connections. + * + * @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 private endpoint connections along with {@link Response}. + */ + PrivateEndpointConnection getById(String id); + + /** + * Get private endpoint connections. + * + * @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 private endpoint connections along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete private endpoint connection. + * + * @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 private endpoint connection. + * + * @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 PrivateEndpointConnection resource. + * + * @param name resource name. + * @return the first stage of the new PrivateEndpointConnection definition. + */ + PrivateEndpointConnection.DefinitionStages.Blank define(String name); +} diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/PrivateEndpointServiceConnectionStatus.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/PrivateEndpointServiceConnectionStatus.java new file mode 100644 index 000000000000..5ff06aa89e31 --- /dev/null +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/PrivateEndpointServiceConnectionStatus.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dashboard.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for PrivateEndpointServiceConnectionStatus. */ +public final class PrivateEndpointServiceConnectionStatus + extends ExpandableStringEnum { + /** Static value Pending for PrivateEndpointServiceConnectionStatus. */ + public static final PrivateEndpointServiceConnectionStatus PENDING = fromString("Pending"); + + /** Static value Approved for PrivateEndpointServiceConnectionStatus. */ + public static final PrivateEndpointServiceConnectionStatus APPROVED = fromString("Approved"); + + /** Static value Rejected for PrivateEndpointServiceConnectionStatus. */ + public static final PrivateEndpointServiceConnectionStatus REJECTED = fromString("Rejected"); + + /** + * Creates or finds a PrivateEndpointServiceConnectionStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding PrivateEndpointServiceConnectionStatus. + */ + @JsonCreator + public static PrivateEndpointServiceConnectionStatus fromString(String name) { + return fromString(name, PrivateEndpointServiceConnectionStatus.class); + } + + /** + * Gets known PrivateEndpointServiceConnectionStatus values. + * + * @return known PrivateEndpointServiceConnectionStatus values. + */ + public static Collection values() { + return values(PrivateEndpointServiceConnectionStatus.class); + } +} diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/PrivateLinkResource.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/PrivateLinkResource.java new file mode 100644 index 000000000000..971fca6a2396 --- /dev/null +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/PrivateLinkResource.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dashboard.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.dashboard.fluent.models.PrivateLinkResourceInner; +import java.util.List; + +/** An immutable client-side representation of PrivateLinkResource. */ +public interface PrivateLinkResource { + /** + * 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: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the groupId property: The private link resource group id. + * + * @return the groupId value. + */ + String groupId(); + + /** + * Gets the requiredMembers property: The private link resource required member names. + * + * @return the requiredMembers value. + */ + List requiredMembers(); + + /** + * Gets the requiredZoneNames property: The private link resource Private link DNS zone name. + * + * @return the requiredZoneNames value. + */ + List requiredZoneNames(); + + /** + * Gets the inner com.azure.resourcemanager.dashboard.fluent.models.PrivateLinkResourceInner object. + * + * @return the inner object. + */ + PrivateLinkResourceInner innerModel(); +} diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/PrivateLinkResourceListResult.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/PrivateLinkResourceListResult.java new file mode 100644 index 000000000000..1035d50abcc7 --- /dev/null +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/PrivateLinkResourceListResult.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dashboard.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.dashboard.fluent.models.PrivateLinkResourceInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** A list of private link resources. */ +@Fluent +public final class PrivateLinkResourceListResult { + /* + * Array of private link resources + */ + @JsonProperty(value = "value") + 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; + + /** + * Get the value property: Array of private link resources. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Array of private link resources. + * + * @param value the value value to set. + * @return the PrivateLinkResourceListResult object itself. + */ + public PrivateLinkResourceListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * 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/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/PrivateLinkResources.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/PrivateLinkResources.java new file mode 100644 index 000000000000..7f62c4af40ba --- /dev/null +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/PrivateLinkResources.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.dashboard.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 PrivateLinkResources. */ +public interface PrivateLinkResources { + /** + * List all private link resources information for this grafana resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @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 private link resources as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * List all private link resources information for this grafana resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @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 private link resources as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName, Context context); + + /** + * Get specific private link resource information for this grafana resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @param privateLinkResourceName The privateLinkResourceName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specific private link resource information for this grafana resource. + */ + PrivateLinkResource get(String resourceGroupName, String workspaceName, String privateLinkResourceName); + + /** + * Get specific private link resource information for this grafana resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The workspace name of Azure Managed Grafana. + * @param privateLinkResourceName The privateLinkResourceName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specific private link resource information for this grafana resource along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String workspaceName, String privateLinkResourceName, Context context); +} diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/PrivateLinkServiceConnectionState.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/PrivateLinkServiceConnectionState.java new file mode 100644 index 000000000000..72ae16b1f692 --- /dev/null +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/PrivateLinkServiceConnectionState.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dashboard.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** A collection of information about the state of the connection between service consumer and provider. */ +@Fluent +public final class PrivateLinkServiceConnectionState { + /* + * Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. + */ + @JsonProperty(value = "status") + private PrivateEndpointServiceConnectionStatus status; + + /* + * The reason for approval/rejection of the connection. + */ + @JsonProperty(value = "description") + private String description; + + /* + * A message indicating if changes on the service provider require any updates on the consumer. + */ + @JsonProperty(value = "actionsRequired") + private String actionsRequired; + + /** + * Get the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the + * service. + * + * @return the status value. + */ + public PrivateEndpointServiceConnectionStatus status() { + return this.status; + } + + /** + * Set the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the + * service. + * + * @param status the status value to set. + * @return the PrivateLinkServiceConnectionState object itself. + */ + public PrivateLinkServiceConnectionState withStatus(PrivateEndpointServiceConnectionStatus status) { + this.status = status; + return this; + } + + /** + * Get the description property: The reason for approval/rejection of the connection. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The reason for approval/rejection of the connection. + * + * @param description the description value to set. + * @return the PrivateLinkServiceConnectionState object itself. + */ + public PrivateLinkServiceConnectionState withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the actionsRequired property: A message indicating if changes on the service provider require any updates on + * the consumer. + * + * @return the actionsRequired value. + */ + public String actionsRequired() { + return this.actionsRequired; + } + + /** + * Set the actionsRequired property: A message indicating if changes on the service provider require any updates on + * the consumer. + * + * @param actionsRequired the actionsRequired value to set. + * @return the PrivateLinkServiceConnectionState object itself. + */ + public PrivateLinkServiceConnectionState withActionsRequired(String actionsRequired) { + this.actionsRequired = actionsRequired; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/ProvisioningState.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/ProvisioningState.java index 5d1df91f64aa..6d0b1bf897ad 100644 --- a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/ProvisioningState.java +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/ProvisioningState.java @@ -48,7 +48,11 @@ public static ProvisioningState fromString(String name) { return fromString(name, ProvisioningState.class); } - /** @return known ProvisioningState values. */ + /** + * Gets known ProvisioningState values. + * + * @return known ProvisioningState values. + */ public static Collection values() { return values(ProvisioningState.class); } diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/PublicNetworkAccess.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/PublicNetworkAccess.java new file mode 100644 index 000000000000..ea1899f74ad7 --- /dev/null +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/PublicNetworkAccess.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.dashboard.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for PublicNetworkAccess. */ +public final class PublicNetworkAccess extends ExpandableStringEnum { + /** Static value Enabled for PublicNetworkAccess. */ + public static final PublicNetworkAccess ENABLED = fromString("Enabled"); + + /** Static value Disabled for PublicNetworkAccess. */ + public static final PublicNetworkAccess DISABLED = fromString("Disabled"); + + /** + * Creates or finds a PublicNetworkAccess from its string representation. + * + * @param name a name to look for. + * @return the corresponding PublicNetworkAccess. + */ + @JsonCreator + public static PublicNetworkAccess fromString(String name) { + return fromString(name, PublicNetworkAccess.class); + } + + /** + * Gets known PublicNetworkAccess values. + * + * @return known PublicNetworkAccess values. + */ + public static Collection values() { + return values(PublicNetworkAccess.class); + } +} diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/UserAssignedIdentity.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/UserAssignedIdentity.java index ba6a703844d8..f0fadeb4522d 100644 --- a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/UserAssignedIdentity.java +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/UserAssignedIdentity.java @@ -6,37 +6,38 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.UUID; -/** The UserAssignedIdentity model. */ +/** User assigned identity properties. */ @Immutable public class UserAssignedIdentity { /* - * The principal id of user assigned identity. + * The principal ID of the assigned identity. */ @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) - private String principalId; + private UUID principalId; /* - * The client id of user assigned identity. + * The client ID of the assigned identity. */ @JsonProperty(value = "clientId", access = JsonProperty.Access.WRITE_ONLY) - private String clientId; + private UUID clientId; /** - * Get the principalId property: The principal id of user assigned identity. + * Get the principalId property: The principal ID of the assigned identity. * * @return the principalId value. */ - public String principalId() { + public UUID principalId() { return this.principalId; } /** - * Get the clientId property: The client id of user assigned identity. + * Get the clientId property: The client ID of the assigned identity. * * @return the clientId value. */ - public String clientId() { + public UUID clientId() { return this.clientId; } diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/ZoneRedundancy.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/ZoneRedundancy.java index af6b859b6e91..e0df74dc8ae2 100644 --- a/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/ZoneRedundancy.java +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/main/java/com/azure/resourcemanager/dashboard/models/ZoneRedundancy.java @@ -27,7 +27,11 @@ public static ZoneRedundancy fromString(String name) { return fromString(name, ZoneRedundancy.class); } - /** @return known ZoneRedundancy values. */ + /** + * Gets known ZoneRedundancy values. + * + * @return known ZoneRedundancy values. + */ public static Collection values() { return values(ZoneRedundancy.class); } diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/samples/java/com/azure/resourcemanager/dashboard/generated/GrafanaCreateSamples.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/samples/java/com/azure/resourcemanager/dashboard/generated/GrafanaCreateSamples.java index 43566b1ff42f..fcbc9ab82df8 100644 --- a/sdk/dashboard/azure-resourcemanager-dashboard/src/samples/java/com/azure/resourcemanager/dashboard/generated/GrafanaCreateSamples.java +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/samples/java/com/azure/resourcemanager/dashboard/generated/GrafanaCreateSamples.java @@ -4,19 +4,24 @@ package com.azure.resourcemanager.dashboard.generated; -import com.azure.resourcemanager.dashboard.models.IdentityType; +import com.azure.resourcemanager.dashboard.models.ApiKey; +import com.azure.resourcemanager.dashboard.models.AzureMonitorWorkspaceIntegration; +import com.azure.resourcemanager.dashboard.models.DeterministicOutboundIp; +import com.azure.resourcemanager.dashboard.models.GrafanaIntegrations; import com.azure.resourcemanager.dashboard.models.ManagedGrafanaProperties; -import com.azure.resourcemanager.dashboard.models.ManagedIdentity; -import com.azure.resourcemanager.dashboard.models.ProvisioningState; +import com.azure.resourcemanager.dashboard.models.ManagedServiceIdentity; +import com.azure.resourcemanager.dashboard.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.dashboard.models.PublicNetworkAccess; import com.azure.resourcemanager.dashboard.models.ResourceSku; import com.azure.resourcemanager.dashboard.models.ZoneRedundancy; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; /** Samples for Grafana Create. */ public final class GrafanaCreateSamples { /* - * x-ms-original-file: specification/dashboard/resource-manager/Microsoft.Dashboard/preview/2021-09-01-preview/examples/Grafana_Create.json + * x-ms-original-file: specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2022-08-01/examples/Grafana_Create.json */ /** * Sample code: Grafana_Create. @@ -33,9 +38,19 @@ public static void grafanaCreate(com.azure.resourcemanager.dashboard.DashboardMa .withSku(new ResourceSku().withName("Standard")) .withProperties( new ManagedGrafanaProperties() - .withProvisioningState(ProvisioningState.ACCEPTED) - .withZoneRedundancy(ZoneRedundancy.ENABLED)) - .withIdentity(new ManagedIdentity().withType(IdentityType.SYSTEM_ASSIGNED)) + .withPublicNetworkAccess(PublicNetworkAccess.ENABLED) + .withZoneRedundancy(ZoneRedundancy.ENABLED) + .withApiKey(ApiKey.ENABLED) + .withDeterministicOutboundIp(DeterministicOutboundIp.ENABLED) + .withGrafanaIntegrations( + new GrafanaIntegrations() + .withAzureMonitorWorkspaceIntegrations( + Arrays + .asList( + new AzureMonitorWorkspaceIntegration() + .withAzureMonitorWorkspaceResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.monitor/accounts/myAzureMonitorWorkspace"))))) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED)) .create(); } diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/samples/java/com/azure/resourcemanager/dashboard/generated/GrafanaDeleteSamples.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/samples/java/com/azure/resourcemanager/dashboard/generated/GrafanaDeleteSamples.java index fd629688bc26..d1ae4a4296cc 100644 --- a/sdk/dashboard/azure-resourcemanager-dashboard/src/samples/java/com/azure/resourcemanager/dashboard/generated/GrafanaDeleteSamples.java +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/samples/java/com/azure/resourcemanager/dashboard/generated/GrafanaDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for Grafana Delete. */ public final class GrafanaDeleteSamples { /* - * x-ms-original-file: specification/dashboard/resource-manager/Microsoft.Dashboard/preview/2021-09-01-preview/examples/Grafana_Delete.json + * x-ms-original-file: specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2022-08-01/examples/Grafana_Delete.json */ /** * Sample code: Grafana_Delete. diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/samples/java/com/azure/resourcemanager/dashboard/generated/GrafanaGetByResourceGroupSamples.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/samples/java/com/azure/resourcemanager/dashboard/generated/GrafanaGetByResourceGroupSamples.java index b8359034e531..bd3041a94c8b 100644 --- a/sdk/dashboard/azure-resourcemanager-dashboard/src/samples/java/com/azure/resourcemanager/dashboard/generated/GrafanaGetByResourceGroupSamples.java +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/samples/java/com/azure/resourcemanager/dashboard/generated/GrafanaGetByResourceGroupSamples.java @@ -9,7 +9,7 @@ /** Samples for Grafana GetByResourceGroup. */ public final class GrafanaGetByResourceGroupSamples { /* - * x-ms-original-file: specification/dashboard/resource-manager/Microsoft.Dashboard/preview/2021-09-01-preview/examples/Grafana_Get.json + * x-ms-original-file: specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2022-08-01/examples/Grafana_Get.json */ /** * Sample code: Grafana_Get. diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/samples/java/com/azure/resourcemanager/dashboard/generated/GrafanaListByResourceGroupSamples.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/samples/java/com/azure/resourcemanager/dashboard/generated/GrafanaListByResourceGroupSamples.java index 6d11b3976188..19aa5c98b656 100644 --- a/sdk/dashboard/azure-resourcemanager-dashboard/src/samples/java/com/azure/resourcemanager/dashboard/generated/GrafanaListByResourceGroupSamples.java +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/samples/java/com/azure/resourcemanager/dashboard/generated/GrafanaListByResourceGroupSamples.java @@ -9,7 +9,7 @@ /** Samples for Grafana ListByResourceGroup. */ public final class GrafanaListByResourceGroupSamples { /* - * x-ms-original-file: specification/dashboard/resource-manager/Microsoft.Dashboard/preview/2021-09-01-preview/examples/Grafana_ListByResourceGroup.json + * x-ms-original-file: specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2022-08-01/examples/Grafana_ListByResourceGroup.json */ /** * Sample code: Grafana_ListByResourceGroup. diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/samples/java/com/azure/resourcemanager/dashboard/generated/GrafanaListSamples.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/samples/java/com/azure/resourcemanager/dashboard/generated/GrafanaListSamples.java index b19a4d5a7109..8c577d892cef 100644 --- a/sdk/dashboard/azure-resourcemanager-dashboard/src/samples/java/com/azure/resourcemanager/dashboard/generated/GrafanaListSamples.java +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/samples/java/com/azure/resourcemanager/dashboard/generated/GrafanaListSamples.java @@ -9,7 +9,7 @@ /** Samples for Grafana List. */ public final class GrafanaListSamples { /* - * x-ms-original-file: specification/dashboard/resource-manager/Microsoft.Dashboard/preview/2021-09-01-preview/examples/Grafana_List.json + * x-ms-original-file: specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2022-08-01/examples/Grafana_List.json */ /** * Sample code: Grafana_List. diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/samples/java/com/azure/resourcemanager/dashboard/generated/GrafanaUpdateSamples.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/samples/java/com/azure/resourcemanager/dashboard/generated/GrafanaUpdateSamples.java index 0472e1a8597f..91b62269524f 100644 --- a/sdk/dashboard/azure-resourcemanager-dashboard/src/samples/java/com/azure/resourcemanager/dashboard/generated/GrafanaUpdateSamples.java +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/samples/java/com/azure/resourcemanager/dashboard/generated/GrafanaUpdateSamples.java @@ -5,14 +5,20 @@ package com.azure.resourcemanager.dashboard.generated; import com.azure.core.util.Context; +import com.azure.resourcemanager.dashboard.models.ApiKey; +import com.azure.resourcemanager.dashboard.models.AzureMonitorWorkspaceIntegration; +import com.azure.resourcemanager.dashboard.models.DeterministicOutboundIp; +import com.azure.resourcemanager.dashboard.models.GrafanaIntegrations; import com.azure.resourcemanager.dashboard.models.ManagedGrafana; +import com.azure.resourcemanager.dashboard.models.ManagedGrafanaPropertiesUpdateParameters; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; /** Samples for Grafana Update. */ public final class GrafanaUpdateSamples { /* - * x-ms-original-file: specification/dashboard/resource-manager/Microsoft.Dashboard/preview/2021-09-01-preview/examples/Grafana_Update.json + * x-ms-original-file: specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2022-08-01/examples/Grafana_Update.json */ /** * Sample code: Grafana_Update. @@ -25,7 +31,22 @@ public static void grafanaUpdate(com.azure.resourcemanager.dashboard.DashboardMa .grafanas() .getByResourceGroupWithResponse("myResourceGroup", "myWorkspace", Context.NONE) .getValue(); - resource.update().withTags(mapOf("Environment", "Dev 2")).apply(); + resource + .update() + .withTags(mapOf("Environment", "Dev 2")) + .withProperties( + new ManagedGrafanaPropertiesUpdateParameters() + .withApiKey(ApiKey.ENABLED) + .withDeterministicOutboundIp(DeterministicOutboundIp.ENABLED) + .withGrafanaIntegrations( + new GrafanaIntegrations() + .withAzureMonitorWorkspaceIntegrations( + Arrays + .asList( + new AzureMonitorWorkspaceIntegration() + .withAzureMonitorWorkspaceResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.monitor/accounts/myAzureMonitorWorkspace"))))) + .apply(); } @SuppressWarnings("unchecked") diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/samples/java/com/azure/resourcemanager/dashboard/generated/OperationsListSamples.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/samples/java/com/azure/resourcemanager/dashboard/generated/OperationsListSamples.java index c1a4a8d8f4c6..de14a0dc589d 100644 --- a/sdk/dashboard/azure-resourcemanager-dashboard/src/samples/java/com/azure/resourcemanager/dashboard/generated/OperationsListSamples.java +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/samples/java/com/azure/resourcemanager/dashboard/generated/OperationsListSamples.java @@ -9,7 +9,7 @@ /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/dashboard/resource-manager/Microsoft.Dashboard/preview/2021-09-01-preview/examples/Operations_List.json + * x-ms-original-file: specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2022-08-01/examples/Operations_List.json */ /** * Sample code: Operations_List. diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/samples/java/com/azure/resourcemanager/dashboard/generated/PrivateEndpointConnectionsApproveSamples.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/samples/java/com/azure/resourcemanager/dashboard/generated/PrivateEndpointConnectionsApproveSamples.java new file mode 100644 index 000000000000..7b7a8007f401 --- /dev/null +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/samples/java/com/azure/resourcemanager/dashboard/generated/PrivateEndpointConnectionsApproveSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dashboard.generated; + +/** Samples for PrivateEndpointConnections Approve. */ +public final class PrivateEndpointConnectionsApproveSamples { + /* + * x-ms-original-file: specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2022-08-01/examples/PrivateEndpointConnections_Approve.json + */ + /** + * Sample code: PrivateEndpointConnections_Approve. + * + * @param manager Entry point to DashboardManager. + */ + public static void privateEndpointConnectionsApprove(com.azure.resourcemanager.dashboard.DashboardManager manager) { + manager + .privateEndpointConnections() + .define("myConnection") + .withExistingGrafana("myResourceGroup", "myWorkspace") + .create(); + } +} diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/samples/java/com/azure/resourcemanager/dashboard/generated/PrivateEndpointConnectionsDeleteSamples.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/samples/java/com/azure/resourcemanager/dashboard/generated/PrivateEndpointConnectionsDeleteSamples.java new file mode 100644 index 000000000000..82e642edc58b --- /dev/null +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/samples/java/com/azure/resourcemanager/dashboard/generated/PrivateEndpointConnectionsDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dashboard.generated; + +import com.azure.core.util.Context; + +/** Samples for PrivateEndpointConnections Delete. */ +public final class PrivateEndpointConnectionsDeleteSamples { + /* + * x-ms-original-file: specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2022-08-01/examples/PrivateEndpointConnections_Delete.json + */ + /** + * Sample code: PrivateEndpointConnections_Delete. + * + * @param manager Entry point to DashboardManager. + */ + public static void privateEndpointConnectionsDelete(com.azure.resourcemanager.dashboard.DashboardManager manager) { + manager.privateEndpointConnections().delete("myResourceGroup", "myWorkspace", "myConnection", Context.NONE); + } +} diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/samples/java/com/azure/resourcemanager/dashboard/generated/PrivateEndpointConnectionsGetSamples.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/samples/java/com/azure/resourcemanager/dashboard/generated/PrivateEndpointConnectionsGetSamples.java new file mode 100644 index 000000000000..1fe68d9b6a7b --- /dev/null +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/samples/java/com/azure/resourcemanager/dashboard/generated/PrivateEndpointConnectionsGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dashboard.generated; + +import com.azure.core.util.Context; + +/** Samples for PrivateEndpointConnections Get. */ +public final class PrivateEndpointConnectionsGetSamples { + /* + * x-ms-original-file: specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2022-08-01/examples/PrivateEndpointConnections_Get.json + */ + /** + * Sample code: PrivateEndpointConnections_Get. + * + * @param manager Entry point to DashboardManager. + */ + public static void privateEndpointConnectionsGet(com.azure.resourcemanager.dashboard.DashboardManager manager) { + manager + .privateEndpointConnections() + .getWithResponse("myResourceGroup", "myWorkspace", "myConnection", Context.NONE); + } +} diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/samples/java/com/azure/resourcemanager/dashboard/generated/PrivateEndpointConnectionsListSamples.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/samples/java/com/azure/resourcemanager/dashboard/generated/PrivateEndpointConnectionsListSamples.java new file mode 100644 index 000000000000..db5f55789073 --- /dev/null +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/samples/java/com/azure/resourcemanager/dashboard/generated/PrivateEndpointConnectionsListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dashboard.generated; + +import com.azure.core.util.Context; + +/** Samples for PrivateEndpointConnections List. */ +public final class PrivateEndpointConnectionsListSamples { + /* + * x-ms-original-file: specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2022-08-01/examples/PrivateEndpointConnections_List.json + */ + /** + * Sample code: PrivateEndpointConnections_List. + * + * @param manager Entry point to DashboardManager. + */ + public static void privateEndpointConnectionsList(com.azure.resourcemanager.dashboard.DashboardManager manager) { + manager.privateEndpointConnections().list("myResourceGroup", "myWorkspace", Context.NONE); + } +} diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/samples/java/com/azure/resourcemanager/dashboard/generated/PrivateLinkResourcesGetSamples.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/samples/java/com/azure/resourcemanager/dashboard/generated/PrivateLinkResourcesGetSamples.java new file mode 100644 index 000000000000..ca1e815d2a10 --- /dev/null +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/samples/java/com/azure/resourcemanager/dashboard/generated/PrivateLinkResourcesGetSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dashboard.generated; + +import com.azure.core.util.Context; + +/** Samples for PrivateLinkResources Get. */ +public final class PrivateLinkResourcesGetSamples { + /* + * x-ms-original-file: specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2022-08-01/examples/PrivateLinkResources_Get.json + */ + /** + * Sample code: PrivateLinkResources_Get. + * + * @param manager Entry point to DashboardManager. + */ + public static void privateLinkResourcesGet(com.azure.resourcemanager.dashboard.DashboardManager manager) { + manager.privateLinkResources().getWithResponse("myResourceGroup", "myWorkspace", "grafana", Context.NONE); + } +} diff --git a/sdk/dashboard/azure-resourcemanager-dashboard/src/samples/java/com/azure/resourcemanager/dashboard/generated/PrivateLinkResourcesListSamples.java b/sdk/dashboard/azure-resourcemanager-dashboard/src/samples/java/com/azure/resourcemanager/dashboard/generated/PrivateLinkResourcesListSamples.java new file mode 100644 index 000000000000..4ae583991a60 --- /dev/null +++ b/sdk/dashboard/azure-resourcemanager-dashboard/src/samples/java/com/azure/resourcemanager/dashboard/generated/PrivateLinkResourcesListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dashboard.generated; + +import com.azure.core.util.Context; + +/** Samples for PrivateLinkResources List. */ +public final class PrivateLinkResourcesListSamples { + /* + * x-ms-original-file: specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2022-08-01/examples/PrivateLinkResources_List.json + */ + /** + * Sample code: PrivateLinkResources_List. + * + * @param manager Entry point to DashboardManager. + */ + public static void privateLinkResourcesList(com.azure.resourcemanager.dashboard.DashboardManager manager) { + manager.privateLinkResources().list("myResourceGroup", "myWorkspace", Context.NONE); + } +}