diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/ArmGrafanaModelFactory.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/ArmGrafanaModelFactory.cs
index 45c781e4e4e2..9e61d52a288b 100644
--- a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/ArmGrafanaModelFactory.cs
+++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/ArmGrafanaModelFactory.cs
@@ -8,43 +8,45 @@
using System;
using System.Collections.Generic;
using System.Linq;
+using Azure;
using Azure.Core;
+using Azure.ResourceManager.Grafana;
using Azure.ResourceManager.Models;
namespace Azure.ResourceManager.Grafana.Models
{
- /// Model factory for models.
+ /// A factory class for creating instances of the models for mocking.
public static partial class ArmGrafanaModelFactory
{
- /// Initializes a new instance of .
- /// The id.
- /// The name.
- /// The resourceType.
- /// The systemData.
- /// The tags.
- /// The location.
+
+ /// The grafana resource type.
+ /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
+ /// The name of the resource.
+ /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
+ /// Azure Resource Manager metadata containing createdBy and modifiedBy information.
/// Properties specific to the grafana resource.
/// The Sku of the grafana resource.
+ /// Resource tags.
+ /// The geo-location where the resource lives.
/// The managed service identities assigned to this resource.
/// A new instance for mocking.
- public static ManagedGrafanaData ManagedGrafanaData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedGrafanaProperties properties = null, ManagedGrafanaSku sku = null, ManagedServiceIdentity identity = null)
+ public static ManagedGrafanaData ManagedGrafanaData(string id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, ManagedGrafanaProperties properties = default, ManagedGrafanaSku sku = default, IDictionary tags = default, string location = default, ManagedServiceIdentity identity = default)
{
- tags ??= new Dictionary();
+ tags ??= new ChangeTrackingDictionary();
return new ManagedGrafanaData(
id,
name,
resourceType,
systemData,
- tags,
- location,
+ additionalBinaryDataProperties: null,
properties,
sku,
- identity,
- serializedAdditionalRawData: null);
+ tags,
+ location,
+ identity);
}
- /// Initializes a new instance of .
/// Provisioning state of the resource.
/// The Grafana software version.
/// The endpoint of the Grafana instance.
@@ -56,18 +58,17 @@ public static ManagedGrafanaData ManagedGrafanaData(ResourceIdentifier id = null
/// List of outbound IPs if deterministicOutboundIP is enabled.
/// The private endpoint connections of the Grafana instance.
/// Scope for dns deterministic name hash calculation.
- /// GrafanaIntegrations is a bundled observability experience (e.g. pre-configured data source, tailored Grafana dashboards, alerting defaults) for common monitoring scenarios.
+ /// Gets the MonitorWorkspaceIntegrations.
/// Enterprise settings of a Grafana instance.
/// Server configurations of a Grafana instance.
/// Installed plugin list of the Grafana instance. Key is plugin id, value is plugin definition.
/// The major Grafana software version to target.
/// A new instance for mocking.
- public static ManagedGrafanaProperties ManagedGrafanaProperties(GrafanaProvisioningState? provisioningState = null, string grafanaVersion = null, string endpoint = null, GrafanaPublicNetworkAccess? publicNetworkAccess = null, GrafanaZoneRedundancy? zoneRedundancy = null, GrafanaApiKey? apiKey = null, GrafanaCreatorCanAdmin? creatorCanAdmin = null, DeterministicOutboundIP? deterministicOutboundIP = null, IEnumerable outboundIPs = null, IEnumerable privateEndpointConnections = null, AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = null, IEnumerable monitorWorkspaceIntegrations = null, EnterpriseConfigurations enterpriseConfigurations = null, GrafanaConfigurations grafanaConfigurations = null, IDictionary grafanaPlugins = null, string grafanaMajorVersion = null)
+ public static ManagedGrafanaProperties ManagedGrafanaProperties(GrafanaProvisioningState? provisioningState = default, string grafanaVersion = default, string endpoint = default, GrafanaPublicNetworkAccess? publicNetworkAccess = default, GrafanaZoneRedundancy? zoneRedundancy = default, GrafanaApiKey? apiKey = default, GrafanaCreatorCanAdmin? creatorCanAdmin = default, DeterministicOutboundIP? deterministicOutboundIP = default, IEnumerable outboundIPs = default, IEnumerable privateEndpointConnections = default, AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = default, IEnumerable monitorWorkspaceIntegrations = default, EnterpriseConfigurations enterpriseConfigurations = default, GrafanaConfigurations grafanaConfigurations = default, IDictionary grafanaPlugins = default, string grafanaMajorVersion = default)
{
- outboundIPs ??= new List();
- privateEndpointConnections ??= new List();
- monitorWorkspaceIntegrations ??= new List();
- grafanaPlugins ??= new Dictionary();
+ outboundIPs ??= new ChangeTrackingList();
+ privateEndpointConnections ??= new ChangeTrackingList();
+ grafanaPlugins ??= new ChangeTrackingDictionary();
return new ManagedGrafanaProperties(
provisioningState,
@@ -78,137 +79,176 @@ public static ManagedGrafanaProperties ManagedGrafanaProperties(GrafanaProvision
apiKey,
creatorCanAdmin,
deterministicOutboundIP,
- outboundIPs?.ToList(),
- privateEndpointConnections?.ToList(),
+ outboundIPs.ToList(),
+ privateEndpointConnections.ToList(),
autoGeneratedDomainNameLabelScope,
- monitorWorkspaceIntegrations != null ? new GrafanaIntegrations(monitorWorkspaceIntegrations?.ToList(), serializedAdditionalRawData: null) : null,
+ monitorWorkspaceIntegrations is null ? default : new GrafanaIntegrations((monitorWorkspaceIntegrations ?? new ChangeTrackingList()).ToList(), null),
enterpriseConfigurations,
grafanaConfigurations,
grafanaPlugins,
grafanaMajorVersion,
- serializedAdditionalRawData: null);
+ additionalBinaryDataProperties: null);
}
- /// Initializes a new instance of .
- /// The id.
- /// The name.
- /// The resourceType.
- /// The systemData.
- /// The resource of private end point.
+ /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
+ /// The name of the resource.
+ /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
+ /// Azure Resource Manager metadata containing createdBy and modifiedBy information.
/// A collection of information about the state of the connection between service consumer and provider.
/// The private endpoint connection group ids.
/// The provisioning state of the private endpoint connection resource.
+ /// The resource identifier of the private endpoint.
/// A new instance for mocking.
- public static GrafanaPrivateEndpointConnectionData GrafanaPrivateEndpointConnectionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ResourceIdentifier privateEndpointId = null, GrafanaPrivateLinkServiceConnectionState connectionState = null, IEnumerable groupIds = null, GrafanaPrivateEndpointConnectionProvisioningState? provisioningState = null)
+ public static GrafanaPrivateEndpointConnectionData GrafanaPrivateEndpointConnectionData(string id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, GrafanaPrivateLinkServiceConnectionState connectionState = default, IEnumerable groupIds = default, GrafanaPrivateEndpointConnectionProvisioningState? provisioningState = default, string privateEndpointId = default)
{
- groupIds ??= new List();
-
return new GrafanaPrivateEndpointConnectionData(
id,
name,
resourceType,
systemData,
- privateEndpointId != null ? ResourceManagerModelFactory.SubResource(privateEndpointId) : null,
- connectionState,
- groupIds?.ToList(),
- provisioningState,
- serializedAdditionalRawData: null);
+ additionalBinaryDataProperties: null,
+ connectionState is null && groupIds is null && provisioningState is null && privateEndpointId is null ? default : new PrivateEndpointConnectionProperties(new PrivateEndpoint(privateEndpointId, null), connectionState, (groupIds ?? new ChangeTrackingList()).ToList(), provisioningState, null));
}
- /// Initializes a new instance of .
+ /// Plugin of Grafana.
/// Grafana plugin id.
/// A new instance for mocking.
- public static GrafanaPlugin GrafanaPlugin(string pluginId = null)
+ public static GrafanaPlugin GrafanaPlugin(string pluginId = default)
+ {
+ return new GrafanaPlugin(pluginId, additionalBinaryDataProperties: null);
+ }
+
+ /// The parameters for a PATCH request to a grafana resource.
+ ///
+ /// The managed identity of the grafana resource.
+ /// The new tags of the grafana resource.
+ /// Properties specific to the managed grafana resource.
+ /// A new instance for mocking.
+ public static ManagedGrafanaPatch ManagedGrafanaPatch(ManagedGrafanaSku sku = default, ManagedServiceIdentity identity = default, IDictionary tags = default, ManagedGrafanaPatchProperties properties = default)
+ {
+ tags ??= new ChangeTrackingDictionary();
+
+ return new ManagedGrafanaPatch(sku, identity, tags, properties, additionalBinaryDataProperties: null);
+ }
+
+ /// The zone redundancy setting of the Grafana instance.
+ /// The api key setting of the Grafana instance.
+ /// The creator will have admin access for the Grafana instance.
+ /// Whether a Grafana instance uses deterministic outbound IPs.
+ /// Indicate the state for enable or disable traffic over the public interface.
+ /// Gets the MonitorWorkspaceIntegrations.
+ /// Enterprise settings of a Grafana instance.
+ /// Server configurations of a Grafana instance.
+ /// Update of Grafana plugin. Key is plugin id, value is plugin definition. If plugin definition is null, plugin with given plugin id will be removed. Otherwise, given plugin will be installed.
+ /// The major Grafana software version to target.
+ /// A new instance for mocking.
+ public static ManagedGrafanaPatchProperties ManagedGrafanaPatchProperties(GrafanaZoneRedundancy? zoneRedundancy = default, GrafanaApiKey? apiKey = default, GrafanaCreatorCanAdmin? creatorCanAdmin = default, DeterministicOutboundIP? deterministicOutboundIP = default, GrafanaPublicNetworkAccess? publicNetworkAccess = default, IEnumerable monitorWorkspaceIntegrations = default, EnterpriseConfigurations enterpriseConfigurations = default, GrafanaConfigurations grafanaConfigurations = default, IDictionary grafanaPlugins = default, string grafanaMajorVersion = default)
{
- return new GrafanaPlugin(pluginId, serializedAdditionalRawData: null);
+ grafanaPlugins ??= new ChangeTrackingDictionary();
+
+ return new ManagedGrafanaPatchProperties(
+ zoneRedundancy,
+ apiKey,
+ creatorCanAdmin,
+ deterministicOutboundIP,
+ publicNetworkAccess,
+ monitorWorkspaceIntegrations is null ? default : new GrafanaIntegrations((monitorWorkspaceIntegrations ?? new ChangeTrackingList()).ToList(), null),
+ enterpriseConfigurations,
+ grafanaConfigurations,
+ grafanaPlugins,
+ grafanaMajorVersion,
+ additionalBinaryDataProperties: null);
}
- /// Initializes a new instance of .
+ /// Enterprise details of a Grafana instance.
/// SaaS subscription details of a Grafana instance.
/// The allocation details of the per subscription free trial slot of the subscription.
/// A new instance for mocking.
- public static EnterpriseDetails EnterpriseDetails(SaasSubscriptionDetails saasSubscriptionDetails = null, MarketplaceTrialQuota marketplaceTrialQuota = null)
+ public static EnterpriseDetails EnterpriseDetails(SaasSubscriptionDetails saasSubscriptionDetails = default, MarketplaceTrialQuota marketplaceTrialQuota = default)
{
- return new EnterpriseDetails(saasSubscriptionDetails, marketplaceTrialQuota, serializedAdditionalRawData: null);
+ return new EnterpriseDetails(saasSubscriptionDetails, marketplaceTrialQuota, additionalBinaryDataProperties: null);
}
- /// Initializes a new instance of .
+ /// SaaS subscription details of a Grafana instance.
/// The plan Id of the SaaS subscription.
/// The offer Id of the SaaS subscription.
/// The publisher Id of the SaaS subscription.
/// The billing term of the SaaS Subscription.
/// A new instance for mocking.
- public static SaasSubscriptionDetails SaasSubscriptionDetails(string planId = null, string offerId = null, string publisherId = null, SubscriptionTerm term = null)
+ public static SaasSubscriptionDetails SaasSubscriptionDetails(string planId = default, string offerId = default, string publisherId = default, SubscriptionTerm term = default)
{
- return new SaasSubscriptionDetails(planId, offerId, publisherId, term, serializedAdditionalRawData: null);
+ return new SaasSubscriptionDetails(planId, offerId, publisherId, term, additionalBinaryDataProperties: null);
}
- /// Initializes a new instance of .
+ /// The current billing term of the SaaS Subscription.
/// The unit of the billing term.
/// The date and time in UTC of when the billing term starts.
/// The date and time in UTC of when the billing term ends.
/// A new instance for mocking.
- public static SubscriptionTerm SubscriptionTerm(string termUnit = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null)
+ public static SubscriptionTerm SubscriptionTerm(string termUnit = default, DateTimeOffset? startOn = default, DateTimeOffset? endOn = default)
{
- return new SubscriptionTerm(termUnit, startOn, endOn, serializedAdditionalRawData: null);
+ return new SubscriptionTerm(termUnit, startOn, endOn, additionalBinaryDataProperties: null);
}
- /// Initializes a new instance of .
+ /// The allocation details of the per subscription free trial slot of the subscription.
/// Available enterprise promotion for the subscription.
/// Resource Id of the Grafana resource which is doing the trial.
/// The date and time in UTC of when the trial starts.
/// The date and time in UTC of when the trial ends.
/// A new instance for mocking.
- public static MarketplaceTrialQuota MarketplaceTrialQuota(AvailablePromotion? availablePromotion = null, ResourceIdentifier grafanaResourceId = null, DateTimeOffset? trialStartOn = null, DateTimeOffset? trialEndOn = null)
+ public static MarketplaceTrialQuota MarketplaceTrialQuota(AvailablePromotion? availablePromotion = default, ResourceIdentifier grafanaResourceId = default, DateTimeOffset? trialStartOn = default, DateTimeOffset? trialEndOn = default)
{
- return new MarketplaceTrialQuota(availablePromotion, grafanaResourceId, trialStartOn, trialEndOn, serializedAdditionalRawData: null);
+ return new MarketplaceTrialQuota(availablePromotion, grafanaResourceId, trialStartOn, trialEndOn, additionalBinaryDataProperties: null);
}
- /// Initializes a new instance of .
+ /// The GrafanaAvailablePluginListResponse.
+ ///
+ ///
+ /// A new instance for mocking.
+ public static GrafanaAvailablePluginListResponse GrafanaAvailablePluginListResponse(IEnumerable value = default, string nextLink = default)
+ {
+ value ??= new ChangeTrackingList();
+
+ return new GrafanaAvailablePluginListResponse(value.ToList(), nextLink, additionalBinaryDataProperties: null);
+ }
+
+ /// Available plugins of grafana.
/// Grafana plugin id.
/// Grafana plugin display name.
/// Grafana plugin type.
/// Grafana plugin author/publisher name.
/// A new instance for mocking.
- public static GrafanaAvailablePlugin GrafanaAvailablePlugin(string pluginId = null, string name = null, string type = null, string author = null)
+ public static GrafanaAvailablePlugin GrafanaAvailablePlugin(string pluginId = default, string name = default, string @type = default, string author = default)
{
- return new GrafanaAvailablePlugin(pluginId, name, type, author, serializedAdditionalRawData: null);
+ return new GrafanaAvailablePlugin(pluginId, name, @type, author, additionalBinaryDataProperties: null);
}
- /// Initializes a new instance of .
- /// The id.
- /// The name.
- /// The resourceType.
- /// The systemData.
+ /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
+ /// The name of the resource.
+ /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
+ /// Azure Resource Manager metadata containing createdBy and modifiedBy information.
/// Provisioning state of the resource.
/// The private link resource group id.
/// The private link resource required member names.
/// The private link resource Private link DNS zone name.
/// A new instance for mocking.
- public static GrafanaPrivateLinkResourceData GrafanaPrivateLinkResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, GrafanaProvisioningState? provisioningState = null, string groupId = null, IEnumerable requiredMembers = null, IEnumerable requiredZoneNames = null)
+ public static GrafanaPrivateLinkResourceData GrafanaPrivateLinkResourceData(string id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, GrafanaProvisioningState? provisioningState = default, string groupId = default, IEnumerable requiredMembers = default, IEnumerable requiredZoneNames = default)
{
- requiredMembers ??= new List();
- requiredZoneNames ??= new List();
-
return new GrafanaPrivateLinkResourceData(
id,
name,
resourceType,
systemData,
- provisioningState,
- groupId,
- requiredMembers?.ToList(),
- requiredZoneNames?.ToList(),
- serializedAdditionalRawData: null);
+ additionalBinaryDataProperties: null,
+ provisioningState is null && groupId is null && requiredMembers is null && requiredZoneNames is null ? default : new GrafanaPrivateLinkResourceProperties(provisioningState, groupId, (requiredMembers ?? new ChangeTrackingList()).ToList(), (requiredZoneNames ?? new ChangeTrackingList()).ToList(), null));
}
- /// Initializes a new instance of .
- /// The id.
- /// The name.
- /// The resourceType.
- /// The systemData.
- /// The tags.
- /// The location.
+ /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
+ /// The name of the resource.
+ /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
+ /// Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ /// Resource tags.
+ /// The geo-location where the resource lives.
/// Provisioning state of the resource.
/// The ARM resource ID of the resource for which the managed private endpoint is pointing to.
/// The region of the resource to which the managed private endpoint is pointing to.
@@ -218,97 +258,154 @@ public static GrafanaPrivateLinkResourceData GrafanaPrivateLinkResourceData(Reso
/// The URL of the data store behind the private link service. It would be the URL in the Grafana data source configuration page without the protocol and port.
/// The private IP of private endpoint after approval. This property is empty before connection is approved.
/// A new instance for mocking.
- public static ManagedPrivateEndpointModelData ManagedPrivateEndpointModelData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, GrafanaProvisioningState? provisioningState = null, ResourceIdentifier privateLinkResourceId = null, string privateLinkResourceRegion = null, IEnumerable groupIds = null, string requestMessage = null, ManagedPrivateEndpointConnectionState connectionState = null, Uri privateLinkServiceUri = null, string privateLinkServicePrivateIP = null)
+ public static ManagedPrivateEndpointModelData ManagedPrivateEndpointModelData(string id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, IDictionary tags = default, AzureLocation location = default, GrafanaProvisioningState? provisioningState = default, ResourceIdentifier privateLinkResourceId = default, string privateLinkResourceRegion = default, IEnumerable groupIds = default, string requestMessage = default, ManagedPrivateEndpointConnectionState connectionState = default, Uri privateLinkServiceUri = default, string privateLinkServicePrivateIP = default)
{
- tags ??= new Dictionary();
- groupIds ??= new List();
+ tags ??= new ChangeTrackingDictionary();
return new ManagedPrivateEndpointModelData(
id,
name,
resourceType,
systemData,
+ additionalBinaryDataProperties: null,
tags,
location,
- provisioningState,
- privateLinkResourceId,
- privateLinkResourceRegion,
- groupIds?.ToList(),
- requestMessage,
- connectionState,
- privateLinkServiceUri,
- privateLinkServicePrivateIP,
- serializedAdditionalRawData: null);
+ provisioningState is null && privateLinkResourceId is null && privateLinkResourceRegion is null && groupIds is null && requestMessage is null && connectionState is null && privateLinkServiceUri is null && privateLinkServicePrivateIP is null ? default : new ManagedPrivateEndpointModelProperties(
+ provisioningState,
+ privateLinkResourceId,
+ privateLinkResourceRegion,
+ (groupIds ?? new ChangeTrackingList()).ToList(),
+ requestMessage,
+ connectionState,
+ privateLinkServiceUri,
+ privateLinkServicePrivateIP,
+ null));
}
- /// Initializes a new instance of .
+ /// The state of managed private endpoint connection.
/// The approval/rejection status of managed private endpoint connection.
/// Gets or sets the reason for approval/rejection of the connection.
/// A new instance for mocking.
- public static ManagedPrivateEndpointConnectionState ManagedPrivateEndpointConnectionState(ManagedPrivateEndpointConnectionStatus? status = null, string description = null)
+ public static ManagedPrivateEndpointConnectionState ManagedPrivateEndpointConnectionState(ManagedPrivateEndpointConnectionStatus? status = default, string description = default)
+ {
+ return new ManagedPrivateEndpointConnectionState(status, description, additionalBinaryDataProperties: null);
+ }
+
+ /// The parameters for a PATCH request to a managed private endpoint.
+ /// The new tags of the managed private endpoint.
+ /// A new instance for mocking.
+ public static ManagedPrivateEndpointModelPatch ManagedPrivateEndpointModelPatch(IDictionary tags = default)
{
- return new ManagedPrivateEndpointConnectionState(status, description, serializedAdditionalRawData: null);
+ tags ??= new ChangeTrackingDictionary();
+
+ return new ManagedPrivateEndpointModelPatch(tags, additionalBinaryDataProperties: null);
}
- /// Initializes a new instance of .
- /// The id.
- /// The name.
- /// The resourceType.
- /// The systemData.
- /// The tags.
- /// The location.
+ /// The integration fabric resource type.
+ /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
+ /// The name of the resource.
+ /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
+ /// Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ /// Resource tags.
+ /// The geo-location where the resource lives.
///
/// A new instance for mocking.
- public static GrafanaIntegrationFabricData GrafanaIntegrationFabricData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, GrafanaIntegrationFabricProperties properties = null)
+ public static GrafanaIntegrationFabricData GrafanaIntegrationFabricData(string id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, IDictionary tags = default, AzureLocation location = default, GrafanaIntegrationFabricProperties properties = default)
{
- tags ??= new Dictionary();
+ tags ??= new ChangeTrackingDictionary();
return new GrafanaIntegrationFabricData(
id,
name,
resourceType,
systemData,
+ additionalBinaryDataProperties: null,
tags,
location,
- properties,
- serializedAdditionalRawData: null);
+ properties);
}
- /// Initializes a new instance of .
+ /// The GrafanaIntegrationFabricProperties.
/// Provisioning state of the resource.
/// The resource Id of the Azure resource being integrated with Azure Managed Grafana. E.g., an Azure Kubernetes Service cluster.
/// The resource Id of the Azure resource which is used to configure Grafana data source. E.g., an Azure Monitor Workspace, an Azure Data Explorer cluster, etc.
/// A list of integration scenarios covered by this integration fabric.
/// A new instance for mocking.
- public static GrafanaIntegrationFabricProperties GrafanaIntegrationFabricProperties(GrafanaProvisioningState? provisioningState = null, ResourceIdentifier targetResourceId = null, ResourceIdentifier dataSourceResourceId = null, IEnumerable scenarios = null)
+ public static GrafanaIntegrationFabricProperties GrafanaIntegrationFabricProperties(GrafanaProvisioningState? provisioningState = default, ResourceIdentifier targetResourceId = default, ResourceIdentifier dataSourceResourceId = default, IEnumerable scenarios = default)
+ {
+ scenarios ??= new ChangeTrackingList();
+
+ return new GrafanaIntegrationFabricProperties(provisioningState, targetResourceId, dataSourceResourceId, scenarios.ToList(), additionalBinaryDataProperties: null);
+ }
+
+ /// The new tags of the Integration Fabric resource.
+ /// The new integration scenarios covered by this integration fabric.
+ /// A new instance for mocking.
+ public static GrafanaIntegrationFabricPatch GrafanaIntegrationFabricPatch(IDictionary tags = default, IEnumerable integrationFabricPropertiesUpdateParametersScenarios = default)
{
- scenarios ??= new List();
+ tags ??= new ChangeTrackingDictionary();
- return new GrafanaIntegrationFabricProperties(provisioningState, targetResourceId, dataSourceResourceId, scenarios?.ToList(), serializedAdditionalRawData: null);
+ return new GrafanaIntegrationFabricPatch(tags, integrationFabricPropertiesUpdateParametersScenarios is null ? default : new IntegrationFabricPropertiesUpdateParameters((integrationFabricPropertiesUpdateParametersScenarios ?? new ChangeTrackingList()).ToList(), null), additionalBinaryDataProperties: null);
}
- /// Initializes a new instance of .
- /// The id.
- /// The name.
- /// The resourceType.
- /// The systemData.
- /// The tags.
- /// The location.
+ /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
+ /// The name of the resource.
+ /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
+ /// Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ /// Resource tags.
+ /// The geo-location where the resource lives.
/// Provisioning state of the resource.
/// A new instance for mocking.
- public static ManagedDashboardData ManagedDashboardData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, GrafanaProvisioningState? provisioningState = null)
+ public static ManagedDashboardData ManagedDashboardData(string id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, IDictionary tags = default, AzureLocation location = default, GrafanaProvisioningState? provisioningState = default)
{
- tags ??= new Dictionary();
+ tags ??= new ChangeTrackingDictionary();
return new ManagedDashboardData(
id,
name,
resourceType,
systemData,
+ additionalBinaryDataProperties: null,
tags,
location,
- provisioningState,
- serializedAdditionalRawData: null);
+ provisioningState is null ? default : new ManagedDashboardProperties(provisioningState, null));
+ }
+
+ /// The parameters for a PATCH request to a managed dashboard resource.
+ /// The new tags of the managed dashboard resource.
+ /// A new instance for mocking.
+ public static ManagedDashboardPatch ManagedDashboardPatch(IDictionary tags = default)
+ {
+ tags ??= new ChangeTrackingDictionary();
+
+ return new ManagedDashboardPatch(tags, additionalBinaryDataProperties: null);
+ }
+
+ /// The dashboard definition resource type.
+ /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
+ /// The name of the resource.
+ /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
+ /// Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ /// Properties specific to the dashboard definition resource.
+ /// A new instance for mocking.
+ public static DashboardDefinitionData DashboardDefinitionData(string id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, DashboardDefinitionProperties properties = default)
+ {
+ return new DashboardDefinitionData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ additionalBinaryDataProperties: null,
+ properties);
+ }
+
+ /// Properties specific to the dashboard definition.
+ /// The dashboard definition data in JSON format.
+ /// The provisioning state of the dashboard definition resource.
+ /// A new instance for mocking.
+ public static DashboardDefinitionProperties DashboardDefinitionProperties(string serializedData = default, GrafanaProvisioningState? provisioningState = default)
+ {
+ return new DashboardDefinitionProperties(serializedData, provisioningState, additionalBinaryDataProperties: null);
}
}
}
diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/CollectionResults/DashboardDefinitionsGetAllAsyncCollectionResultOfT.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/CollectionResults/DashboardDefinitionsGetAllAsyncCollectionResultOfT.cs
new file mode 100644
index 000000000000..54a1e0cfa32c
--- /dev/null
+++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/CollectionResults/DashboardDefinitionsGetAllAsyncCollectionResultOfT.cs
@@ -0,0 +1,84 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager.Grafana.Models;
+
+namespace Azure.ResourceManager.Grafana
+{
+ internal partial class DashboardDefinitionsGetAllAsyncCollectionResultOfT : AsyncPageable
+ {
+ private readonly DashboardDefinitions _client;
+ private readonly string _subscriptionId;
+ private readonly string _resourceGroupName;
+ private readonly string _dashboardName;
+ private readonly RequestContext _context;
+
+ /// Initializes a new instance of DashboardDefinitionsGetAllAsyncCollectionResultOfT, which is used to iterate over the pages of a collection.
+ /// The DashboardDefinitions client used to send requests.
+ /// The ID of the target subscription. The value must be an UUID.
+ /// The name of the resource group. The name is case insensitive.
+ /// The name of the Azure Managed Dashboard.
+ /// The request options, which can override default behaviors of the client pipeline on a per-call basis.
+ public DashboardDefinitionsGetAllAsyncCollectionResultOfT(DashboardDefinitions client, string subscriptionId, string resourceGroupName, string dashboardName, RequestContext context) : base(context?.CancellationToken ?? default)
+ {
+ _client = client;
+ _subscriptionId = subscriptionId;
+ _resourceGroupName = resourceGroupName;
+ _dashboardName = dashboardName;
+ _context = context;
+ }
+
+ /// Gets the pages of DashboardDefinitionsGetAllAsyncCollectionResultOfT as an enumerable collection.
+ /// A continuation token indicating where to resume paging.
+ /// The number of items per page.
+ /// The pages of DashboardDefinitionsGetAllAsyncCollectionResultOfT as an enumerable collection.
+ public override async IAsyncEnumerable> AsPages(string continuationToken, int? pageSizeHint)
+ {
+ Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null;
+ while (true)
+ {
+ Response response = await GetNextResponseAsync(pageSizeHint, nextPage).ConfigureAwait(false);
+ if (response is null)
+ {
+ yield break;
+ }
+ DashboardDefinitionListResponse result = DashboardDefinitionListResponse.FromResponse(response);
+ yield return Page.FromValues((IReadOnlyList)result.Value, nextPage?.AbsoluteUri, response);
+ nextPage = result.NextLink;
+ if (nextPage == null)
+ {
+ yield break;
+ }
+ }
+ }
+
+ /// Get next page.
+ /// The number of items per page.
+ /// The next link to use for the next page of results.
+ private async ValueTask GetNextResponseAsync(int? pageSizeHint, Uri nextLink)
+ {
+ HttpMessage message = nextLink != null ? _client.CreateNextGetAllRequest(nextLink, _subscriptionId, _resourceGroupName, _dashboardName, _context) : _client.CreateGetAllRequest(_subscriptionId, _resourceGroupName, _dashboardName, _context);
+ using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("DashboardDefinitionCollection.GetAll");
+ scope.Start();
+ try
+ {
+ return await _client.Pipeline.ProcessMessageAsync(message, _context).ConfigureAwait(false);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/CollectionResults/DashboardDefinitionsGetAllCollectionResultOfT.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/CollectionResults/DashboardDefinitionsGetAllCollectionResultOfT.cs
new file mode 100644
index 000000000000..751f32f09e30
--- /dev/null
+++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/CollectionResults/DashboardDefinitionsGetAllCollectionResultOfT.cs
@@ -0,0 +1,83 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager.Grafana.Models;
+
+namespace Azure.ResourceManager.Grafana
+{
+ internal partial class DashboardDefinitionsGetAllCollectionResultOfT : Pageable
+ {
+ private readonly DashboardDefinitions _client;
+ private readonly string _subscriptionId;
+ private readonly string _resourceGroupName;
+ private readonly string _dashboardName;
+ private readonly RequestContext _context;
+
+ /// Initializes a new instance of DashboardDefinitionsGetAllCollectionResultOfT, which is used to iterate over the pages of a collection.
+ /// The DashboardDefinitions client used to send requests.
+ /// The ID of the target subscription. The value must be an UUID.
+ /// The name of the resource group. The name is case insensitive.
+ /// The name of the Azure Managed Dashboard.
+ /// The request options, which can override default behaviors of the client pipeline on a per-call basis.
+ public DashboardDefinitionsGetAllCollectionResultOfT(DashboardDefinitions client, string subscriptionId, string resourceGroupName, string dashboardName, RequestContext context) : base(context?.CancellationToken ?? default)
+ {
+ _client = client;
+ _subscriptionId = subscriptionId;
+ _resourceGroupName = resourceGroupName;
+ _dashboardName = dashboardName;
+ _context = context;
+ }
+
+ /// Gets the pages of DashboardDefinitionsGetAllCollectionResultOfT as an enumerable collection.
+ /// A continuation token indicating where to resume paging.
+ /// The number of items per page.
+ /// The pages of DashboardDefinitionsGetAllCollectionResultOfT as an enumerable collection.
+ public override IEnumerable> AsPages(string continuationToken, int? pageSizeHint)
+ {
+ Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null;
+ while (true)
+ {
+ Response response = GetNextResponse(pageSizeHint, nextPage);
+ if (response is null)
+ {
+ yield break;
+ }
+ DashboardDefinitionListResponse result = DashboardDefinitionListResponse.FromResponse(response);
+ yield return Page.FromValues((IReadOnlyList)result.Value, nextPage?.AbsoluteUri, response);
+ nextPage = result.NextLink;
+ if (nextPage == null)
+ {
+ yield break;
+ }
+ }
+ }
+
+ /// Get next page.
+ /// The number of items per page.
+ /// The next link to use for the next page of results.
+ private Response GetNextResponse(int? pageSizeHint, Uri nextLink)
+ {
+ HttpMessage message = nextLink != null ? _client.CreateNextGetAllRequest(nextLink, _subscriptionId, _resourceGroupName, _dashboardName, _context) : _client.CreateGetAllRequest(_subscriptionId, _resourceGroupName, _dashboardName, _context);
+ using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("DashboardDefinitionCollection.GetAll");
+ scope.Start();
+ try
+ {
+ return _client.Pipeline.ProcessMessage(message, _context);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/CollectionResults/IntegrationFabricsGetAllAsyncCollectionResultOfT.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/CollectionResults/IntegrationFabricsGetAllAsyncCollectionResultOfT.cs
new file mode 100644
index 000000000000..c50a305dffbf
--- /dev/null
+++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/CollectionResults/IntegrationFabricsGetAllAsyncCollectionResultOfT.cs
@@ -0,0 +1,84 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager.Grafana.Models;
+
+namespace Azure.ResourceManager.Grafana
+{
+ internal partial class IntegrationFabricsGetAllAsyncCollectionResultOfT : AsyncPageable
+ {
+ private readonly IntegrationFabrics _client;
+ private readonly string _subscriptionId;
+ private readonly string _resourceGroupName;
+ private readonly string _workspaceName;
+ private readonly RequestContext _context;
+
+ /// Initializes a new instance of IntegrationFabricsGetAllAsyncCollectionResultOfT, which is used to iterate over the pages of a collection.
+ /// The IntegrationFabrics client used to send requests.
+ /// The ID of the target subscription. The value must be an UUID.
+ /// The name of the resource group. The name is case insensitive.
+ /// The workspace name of Azure Managed Grafana.
+ /// The request options, which can override default behaviors of the client pipeline on a per-call basis.
+ public IntegrationFabricsGetAllAsyncCollectionResultOfT(IntegrationFabrics client, string subscriptionId, string resourceGroupName, string workspaceName, RequestContext context) : base(context?.CancellationToken ?? default)
+ {
+ _client = client;
+ _subscriptionId = subscriptionId;
+ _resourceGroupName = resourceGroupName;
+ _workspaceName = workspaceName;
+ _context = context;
+ }
+
+ /// Gets the pages of IntegrationFabricsGetAllAsyncCollectionResultOfT as an enumerable collection.
+ /// A continuation token indicating where to resume paging.
+ /// The number of items per page.
+ /// The pages of IntegrationFabricsGetAllAsyncCollectionResultOfT as an enumerable collection.
+ public override async IAsyncEnumerable> AsPages(string continuationToken, int? pageSizeHint)
+ {
+ Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null;
+ while (true)
+ {
+ Response response = await GetNextResponseAsync(pageSizeHint, nextPage).ConfigureAwait(false);
+ if (response is null)
+ {
+ yield break;
+ }
+ IntegrationFabricListResponse result = IntegrationFabricListResponse.FromResponse(response);
+ yield return Page.FromValues((IReadOnlyList)result.Value, nextPage?.AbsoluteUri, response);
+ nextPage = result.NextLink;
+ if (nextPage == null)
+ {
+ yield break;
+ }
+ }
+ }
+
+ /// Get next page.
+ /// The number of items per page.
+ /// The next link to use for the next page of results.
+ private async ValueTask GetNextResponseAsync(int? pageSizeHint, Uri nextLink)
+ {
+ HttpMessage message = nextLink != null ? _client.CreateNextGetAllRequest(nextLink, _subscriptionId, _resourceGroupName, _workspaceName, _context) : _client.CreateGetAllRequest(_subscriptionId, _resourceGroupName, _workspaceName, _context);
+ using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("GrafanaIntegrationFabricCollection.GetAll");
+ scope.Start();
+ try
+ {
+ return await _client.Pipeline.ProcessMessageAsync(message, _context).ConfigureAwait(false);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/CollectionResults/IntegrationFabricsGetAllCollectionResultOfT.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/CollectionResults/IntegrationFabricsGetAllCollectionResultOfT.cs
new file mode 100644
index 000000000000..ff7bf781a618
--- /dev/null
+++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/CollectionResults/IntegrationFabricsGetAllCollectionResultOfT.cs
@@ -0,0 +1,83 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager.Grafana.Models;
+
+namespace Azure.ResourceManager.Grafana
+{
+ internal partial class IntegrationFabricsGetAllCollectionResultOfT : Pageable
+ {
+ private readonly IntegrationFabrics _client;
+ private readonly string _subscriptionId;
+ private readonly string _resourceGroupName;
+ private readonly string _workspaceName;
+ private readonly RequestContext _context;
+
+ /// Initializes a new instance of IntegrationFabricsGetAllCollectionResultOfT, which is used to iterate over the pages of a collection.
+ /// The IntegrationFabrics client used to send requests.
+ /// The ID of the target subscription. The value must be an UUID.
+ /// The name of the resource group. The name is case insensitive.
+ /// The workspace name of Azure Managed Grafana.
+ /// The request options, which can override default behaviors of the client pipeline on a per-call basis.
+ public IntegrationFabricsGetAllCollectionResultOfT(IntegrationFabrics client, string subscriptionId, string resourceGroupName, string workspaceName, RequestContext context) : base(context?.CancellationToken ?? default)
+ {
+ _client = client;
+ _subscriptionId = subscriptionId;
+ _resourceGroupName = resourceGroupName;
+ _workspaceName = workspaceName;
+ _context = context;
+ }
+
+ /// Gets the pages of IntegrationFabricsGetAllCollectionResultOfT as an enumerable collection.
+ /// A continuation token indicating where to resume paging.
+ /// The number of items per page.
+ /// The pages of IntegrationFabricsGetAllCollectionResultOfT as an enumerable collection.
+ public override IEnumerable> AsPages(string continuationToken, int? pageSizeHint)
+ {
+ Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null;
+ while (true)
+ {
+ Response response = GetNextResponse(pageSizeHint, nextPage);
+ if (response is null)
+ {
+ yield break;
+ }
+ IntegrationFabricListResponse result = IntegrationFabricListResponse.FromResponse(response);
+ yield return Page.FromValues((IReadOnlyList)result.Value, nextPage?.AbsoluteUri, response);
+ nextPage = result.NextLink;
+ if (nextPage == null)
+ {
+ yield break;
+ }
+ }
+ }
+
+ /// Get next page.
+ /// The number of items per page.
+ /// The next link to use for the next page of results.
+ private Response GetNextResponse(int? pageSizeHint, Uri nextLink)
+ {
+ HttpMessage message = nextLink != null ? _client.CreateNextGetAllRequest(nextLink, _subscriptionId, _resourceGroupName, _workspaceName, _context) : _client.CreateGetAllRequest(_subscriptionId, _resourceGroupName, _workspaceName, _context);
+ using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("GrafanaIntegrationFabricCollection.GetAll");
+ scope.Start();
+ try
+ {
+ return _client.Pipeline.ProcessMessage(message, _context);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/CollectionResults/ManagedDashboardsGetAllAsyncCollectionResultOfT.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/CollectionResults/ManagedDashboardsGetAllAsyncCollectionResultOfT.cs
new file mode 100644
index 000000000000..12e83c349f57
--- /dev/null
+++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/CollectionResults/ManagedDashboardsGetAllAsyncCollectionResultOfT.cs
@@ -0,0 +1,81 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager.Grafana.Models;
+
+namespace Azure.ResourceManager.Grafana
+{
+ internal partial class ManagedDashboardsGetAllAsyncCollectionResultOfT : AsyncPageable
+ {
+ private readonly ManagedDashboards _client;
+ private readonly string _subscriptionId;
+ private readonly string _resourceGroupName;
+ private readonly RequestContext _context;
+
+ /// Initializes a new instance of ManagedDashboardsGetAllAsyncCollectionResultOfT, which is used to iterate over the pages of a collection.
+ /// The ManagedDashboards client used to send requests.
+ /// The ID of the target subscription. The value must be an UUID.
+ /// The name of the resource group. The name is case insensitive.
+ /// The request options, which can override default behaviors of the client pipeline on a per-call basis.
+ public ManagedDashboardsGetAllAsyncCollectionResultOfT(ManagedDashboards client, string subscriptionId, string resourceGroupName, RequestContext context) : base(context?.CancellationToken ?? default)
+ {
+ _client = client;
+ _subscriptionId = subscriptionId;
+ _resourceGroupName = resourceGroupName;
+ _context = context;
+ }
+
+ /// Gets the pages of ManagedDashboardsGetAllAsyncCollectionResultOfT as an enumerable collection.
+ /// A continuation token indicating where to resume paging.
+ /// The number of items per page.
+ /// The pages of ManagedDashboardsGetAllAsyncCollectionResultOfT as an enumerable collection.
+ public override async IAsyncEnumerable> AsPages(string continuationToken, int? pageSizeHint)
+ {
+ Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null;
+ while (true)
+ {
+ Response response = await GetNextResponseAsync(pageSizeHint, nextPage).ConfigureAwait(false);
+ if (response is null)
+ {
+ yield break;
+ }
+ ManagedDashboardListResponse result = ManagedDashboardListResponse.FromResponse(response);
+ yield return Page.FromValues((IReadOnlyList)result.Value, nextPage?.AbsoluteUri, response);
+ nextPage = result.NextLink;
+ if (nextPage == null)
+ {
+ yield break;
+ }
+ }
+ }
+
+ /// Get next page.
+ /// The number of items per page.
+ /// The next link to use for the next page of results.
+ private async ValueTask GetNextResponseAsync(int? pageSizeHint, Uri nextLink)
+ {
+ HttpMessage message = nextLink != null ? _client.CreateNextGetAllRequest(nextLink, _subscriptionId, _resourceGroupName, _context) : _client.CreateGetAllRequest(_subscriptionId, _resourceGroupName, _context);
+ using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("ManagedDashboardCollection.GetAll");
+ scope.Start();
+ try
+ {
+ return await _client.Pipeline.ProcessMessageAsync(message, _context).ConfigureAwait(false);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/CollectionResults/ManagedDashboardsGetAllCollectionResultOfT.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/CollectionResults/ManagedDashboardsGetAllCollectionResultOfT.cs
new file mode 100644
index 000000000000..9d5aa750713a
--- /dev/null
+++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/CollectionResults/ManagedDashboardsGetAllCollectionResultOfT.cs
@@ -0,0 +1,80 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager.Grafana.Models;
+
+namespace Azure.ResourceManager.Grafana
+{
+ internal partial class ManagedDashboardsGetAllCollectionResultOfT : Pageable
+ {
+ private readonly ManagedDashboards _client;
+ private readonly string _subscriptionId;
+ private readonly string _resourceGroupName;
+ private readonly RequestContext _context;
+
+ /// Initializes a new instance of ManagedDashboardsGetAllCollectionResultOfT, which is used to iterate over the pages of a collection.
+ /// The ManagedDashboards client used to send requests.
+ /// The ID of the target subscription. The value must be an UUID.
+ /// The name of the resource group. The name is case insensitive.
+ /// The request options, which can override default behaviors of the client pipeline on a per-call basis.
+ public ManagedDashboardsGetAllCollectionResultOfT(ManagedDashboards client, string subscriptionId, string resourceGroupName, RequestContext context) : base(context?.CancellationToken ?? default)
+ {
+ _client = client;
+ _subscriptionId = subscriptionId;
+ _resourceGroupName = resourceGroupName;
+ _context = context;
+ }
+
+ /// Gets the pages of ManagedDashboardsGetAllCollectionResultOfT as an enumerable collection.
+ /// A continuation token indicating where to resume paging.
+ /// The number of items per page.
+ /// The pages of ManagedDashboardsGetAllCollectionResultOfT as an enumerable collection.
+ public override IEnumerable> AsPages(string continuationToken, int? pageSizeHint)
+ {
+ Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null;
+ while (true)
+ {
+ Response response = GetNextResponse(pageSizeHint, nextPage);
+ if (response is null)
+ {
+ yield break;
+ }
+ ManagedDashboardListResponse result = ManagedDashboardListResponse.FromResponse(response);
+ yield return Page.FromValues((IReadOnlyList)result.Value, nextPage?.AbsoluteUri, response);
+ nextPage = result.NextLink;
+ if (nextPage == null)
+ {
+ yield break;
+ }
+ }
+ }
+
+ /// Get next page.
+ /// The number of items per page.
+ /// The next link to use for the next page of results.
+ private Response GetNextResponse(int? pageSizeHint, Uri nextLink)
+ {
+ HttpMessage message = nextLink != null ? _client.CreateNextGetAllRequest(nextLink, _subscriptionId, _resourceGroupName, _context) : _client.CreateGetAllRequest(_subscriptionId, _resourceGroupName, _context);
+ using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("ManagedDashboardCollection.GetAll");
+ scope.Start();
+ try
+ {
+ return _client.Pipeline.ProcessMessage(message, _context);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/CollectionResults/ManagedDashboardsGetBySubscriptionAsyncCollectionResultOfT.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/CollectionResults/ManagedDashboardsGetBySubscriptionAsyncCollectionResultOfT.cs
new file mode 100644
index 000000000000..b0e194f52ecb
--- /dev/null
+++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/CollectionResults/ManagedDashboardsGetBySubscriptionAsyncCollectionResultOfT.cs
@@ -0,0 +1,78 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager.Grafana.Models;
+
+namespace Azure.ResourceManager.Grafana
+{
+ internal partial class ManagedDashboardsGetBySubscriptionAsyncCollectionResultOfT : AsyncPageable
+ {
+ private readonly ManagedDashboards _client;
+ private readonly string _subscriptionId;
+ private readonly RequestContext _context;
+
+ /// Initializes a new instance of ManagedDashboardsGetBySubscriptionAsyncCollectionResultOfT, which is used to iterate over the pages of a collection.
+ /// The ManagedDashboards client used to send requests.
+ /// The ID of the target subscription. The value must be an UUID.
+ /// The request options, which can override default behaviors of the client pipeline on a per-call basis.
+ public ManagedDashboardsGetBySubscriptionAsyncCollectionResultOfT(ManagedDashboards client, string subscriptionId, RequestContext context) : base(context?.CancellationToken ?? default)
+ {
+ _client = client;
+ _subscriptionId = subscriptionId;
+ _context = context;
+ }
+
+ /// Gets the pages of ManagedDashboardsGetBySubscriptionAsyncCollectionResultOfT as an enumerable collection.
+ /// A continuation token indicating where to resume paging.
+ /// The number of items per page.
+ /// The pages of ManagedDashboardsGetBySubscriptionAsyncCollectionResultOfT as an enumerable collection.
+ public override async IAsyncEnumerable> AsPages(string continuationToken, int? pageSizeHint)
+ {
+ Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null;
+ while (true)
+ {
+ Response response = await GetNextResponseAsync(pageSizeHint, nextPage).ConfigureAwait(false);
+ if (response is null)
+ {
+ yield break;
+ }
+ ManagedDashboardListResponse result = ManagedDashboardListResponse.FromResponse(response);
+ yield return Page.FromValues((IReadOnlyList)result.Value, nextPage?.AbsoluteUri, response);
+ nextPage = result.NextLink;
+ if (nextPage == null)
+ {
+ yield break;
+ }
+ }
+ }
+
+ /// Get next page.
+ /// The number of items per page.
+ /// The next link to use for the next page of results.
+ private async ValueTask GetNextResponseAsync(int? pageSizeHint, Uri nextLink)
+ {
+ HttpMessage message = nextLink != null ? _client.CreateNextGetBySubscriptionRequest(nextLink, _subscriptionId, _context) : _client.CreateGetBySubscriptionRequest(_subscriptionId, _context);
+ using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("MockableGrafanaSubscriptionResource.GetManagedDashboards");
+ scope.Start();
+ try
+ {
+ return await _client.Pipeline.ProcessMessageAsync(message, _context).ConfigureAwait(false);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/CollectionResults/ManagedDashboardsGetBySubscriptionCollectionResultOfT.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/CollectionResults/ManagedDashboardsGetBySubscriptionCollectionResultOfT.cs
new file mode 100644
index 000000000000..a9a1f516b238
--- /dev/null
+++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/CollectionResults/ManagedDashboardsGetBySubscriptionCollectionResultOfT.cs
@@ -0,0 +1,77 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager.Grafana.Models;
+
+namespace Azure.ResourceManager.Grafana
+{
+ internal partial class ManagedDashboardsGetBySubscriptionCollectionResultOfT : Pageable
+ {
+ private readonly ManagedDashboards _client;
+ private readonly string _subscriptionId;
+ private readonly RequestContext _context;
+
+ /// Initializes a new instance of ManagedDashboardsGetBySubscriptionCollectionResultOfT, which is used to iterate over the pages of a collection.
+ /// The ManagedDashboards client used to send requests.
+ /// The ID of the target subscription. The value must be an UUID.
+ /// The request options, which can override default behaviors of the client pipeline on a per-call basis.
+ public ManagedDashboardsGetBySubscriptionCollectionResultOfT(ManagedDashboards client, string subscriptionId, RequestContext context) : base(context?.CancellationToken ?? default)
+ {
+ _client = client;
+ _subscriptionId = subscriptionId;
+ _context = context;
+ }
+
+ /// Gets the pages of ManagedDashboardsGetBySubscriptionCollectionResultOfT as an enumerable collection.
+ /// A continuation token indicating where to resume paging.
+ /// The number of items per page.
+ /// The pages of ManagedDashboardsGetBySubscriptionCollectionResultOfT as an enumerable collection.
+ public override IEnumerable> AsPages(string continuationToken, int? pageSizeHint)
+ {
+ Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null;
+ while (true)
+ {
+ Response response = GetNextResponse(pageSizeHint, nextPage);
+ if (response is null)
+ {
+ yield break;
+ }
+ ManagedDashboardListResponse result = ManagedDashboardListResponse.FromResponse(response);
+ yield return Page.FromValues((IReadOnlyList)result.Value, nextPage?.AbsoluteUri, response);
+ nextPage = result.NextLink;
+ if (nextPage == null)
+ {
+ yield break;
+ }
+ }
+ }
+
+ /// Get next page.
+ /// The number of items per page.
+ /// The next link to use for the next page of results.
+ private Response GetNextResponse(int? pageSizeHint, Uri nextLink)
+ {
+ HttpMessage message = nextLink != null ? _client.CreateNextGetBySubscriptionRequest(nextLink, _subscriptionId, _context) : _client.CreateGetBySubscriptionRequest(_subscriptionId, _context);
+ using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("MockableGrafanaSubscriptionResource.GetManagedDashboards");
+ scope.Start();
+ try
+ {
+ return _client.Pipeline.ProcessMessage(message, _context);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/CollectionResults/ManagedGrafanasGetAllAsyncCollectionResultOfT.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/CollectionResults/ManagedGrafanasGetAllAsyncCollectionResultOfT.cs
new file mode 100644
index 000000000000..54558ebb45aa
--- /dev/null
+++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/CollectionResults/ManagedGrafanasGetAllAsyncCollectionResultOfT.cs
@@ -0,0 +1,78 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager.Grafana.Models;
+
+namespace Azure.ResourceManager.Grafana
+{
+ internal partial class ManagedGrafanasGetAllAsyncCollectionResultOfT : AsyncPageable
+ {
+ private readonly ManagedGrafanas _client;
+ private readonly string _subscriptionId;
+ private readonly RequestContext _context;
+
+ /// Initializes a new instance of ManagedGrafanasGetAllAsyncCollectionResultOfT, which is used to iterate over the pages of a collection.
+ /// The ManagedGrafanas client used to send requests.
+ /// The ID of the target subscription. The value must be an UUID.
+ /// The request options, which can override default behaviors of the client pipeline on a per-call basis.
+ public ManagedGrafanasGetAllAsyncCollectionResultOfT(ManagedGrafanas client, string subscriptionId, RequestContext context) : base(context?.CancellationToken ?? default)
+ {
+ _client = client;
+ _subscriptionId = subscriptionId;
+ _context = context;
+ }
+
+ /// Gets the pages of ManagedGrafanasGetAllAsyncCollectionResultOfT as an enumerable collection.
+ /// A continuation token indicating where to resume paging.
+ /// The number of items per page.
+ /// The pages of ManagedGrafanasGetAllAsyncCollectionResultOfT as an enumerable collection.
+ public override async IAsyncEnumerable> AsPages(string continuationToken, int? pageSizeHint)
+ {
+ Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null;
+ while (true)
+ {
+ Response response = await GetNextResponseAsync(pageSizeHint, nextPage).ConfigureAwait(false);
+ if (response is null)
+ {
+ yield break;
+ }
+ ManagedGrafanaListResponse result = ManagedGrafanaListResponse.FromResponse(response);
+ yield return Page.FromValues((IReadOnlyList)result.Value, nextPage?.AbsoluteUri, response);
+ nextPage = result.NextLink;
+ if (nextPage == null)
+ {
+ yield break;
+ }
+ }
+ }
+
+ /// Get next page.
+ /// The number of items per page.
+ /// The next link to use for the next page of results.
+ private async ValueTask GetNextResponseAsync(int? pageSizeHint, Uri nextLink)
+ {
+ HttpMessage message = nextLink != null ? _client.CreateNextGetAllRequest(nextLink, _subscriptionId, _context) : _client.CreateGetAllRequest(_subscriptionId, _context);
+ using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("MockableGrafanaSubscriptionResource.GetManagedGrafanas");
+ scope.Start();
+ try
+ {
+ return await _client.Pipeline.ProcessMessageAsync(message, _context).ConfigureAwait(false);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/CollectionResults/ManagedGrafanasGetAllCollectionResultOfT.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/CollectionResults/ManagedGrafanasGetAllCollectionResultOfT.cs
new file mode 100644
index 000000000000..fedc937199ef
--- /dev/null
+++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/CollectionResults/ManagedGrafanasGetAllCollectionResultOfT.cs
@@ -0,0 +1,77 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager.Grafana.Models;
+
+namespace Azure.ResourceManager.Grafana
+{
+ internal partial class ManagedGrafanasGetAllCollectionResultOfT : Pageable
+ {
+ private readonly ManagedGrafanas _client;
+ private readonly string _subscriptionId;
+ private readonly RequestContext _context;
+
+ /// Initializes a new instance of ManagedGrafanasGetAllCollectionResultOfT, which is used to iterate over the pages of a collection.
+ /// The ManagedGrafanas client used to send requests.
+ /// The ID of the target subscription. The value must be an UUID.
+ /// The request options, which can override default behaviors of the client pipeline on a per-call basis.
+ public ManagedGrafanasGetAllCollectionResultOfT(ManagedGrafanas client, string subscriptionId, RequestContext context) : base(context?.CancellationToken ?? default)
+ {
+ _client = client;
+ _subscriptionId = subscriptionId;
+ _context = context;
+ }
+
+ /// Gets the pages of ManagedGrafanasGetAllCollectionResultOfT as an enumerable collection.
+ /// A continuation token indicating where to resume paging.
+ /// The number of items per page.
+ /// The pages of ManagedGrafanasGetAllCollectionResultOfT as an enumerable collection.
+ public override IEnumerable> AsPages(string continuationToken, int? pageSizeHint)
+ {
+ Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null;
+ while (true)
+ {
+ Response response = GetNextResponse(pageSizeHint, nextPage);
+ if (response is null)
+ {
+ yield break;
+ }
+ ManagedGrafanaListResponse result = ManagedGrafanaListResponse.FromResponse(response);
+ yield return Page.FromValues((IReadOnlyList)result.Value, nextPage?.AbsoluteUri, response);
+ nextPage = result.NextLink;
+ if (nextPage == null)
+ {
+ yield break;
+ }
+ }
+ }
+
+ /// Get next page.
+ /// The number of items per page.
+ /// The next link to use for the next page of results.
+ private Response GetNextResponse(int? pageSizeHint, Uri nextLink)
+ {
+ HttpMessage message = nextLink != null ? _client.CreateNextGetAllRequest(nextLink, _subscriptionId, _context) : _client.CreateGetAllRequest(_subscriptionId, _context);
+ using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("MockableGrafanaSubscriptionResource.GetManagedGrafanas");
+ scope.Start();
+ try
+ {
+ return _client.Pipeline.ProcessMessage(message, _context);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/CollectionResults/ManagedGrafanasGetByResourceGroupAsyncCollectionResultOfT.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/CollectionResults/ManagedGrafanasGetByResourceGroupAsyncCollectionResultOfT.cs
new file mode 100644
index 000000000000..441c3f348b56
--- /dev/null
+++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/CollectionResults/ManagedGrafanasGetByResourceGroupAsyncCollectionResultOfT.cs
@@ -0,0 +1,81 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager.Grafana.Models;
+
+namespace Azure.ResourceManager.Grafana
+{
+ internal partial class ManagedGrafanasGetByResourceGroupAsyncCollectionResultOfT : AsyncPageable
+ {
+ private readonly ManagedGrafanas _client;
+ private readonly string _subscriptionId;
+ private readonly string _resourceGroupName;
+ private readonly RequestContext _context;
+
+ /// Initializes a new instance of ManagedGrafanasGetByResourceGroupAsyncCollectionResultOfT, which is used to iterate over the pages of a collection.
+ /// The ManagedGrafanas client used to send requests.
+ /// The ID of the target subscription. The value must be an UUID.
+ /// The name of the resource group. The name is case insensitive.
+ /// The request options, which can override default behaviors of the client pipeline on a per-call basis.
+ public ManagedGrafanasGetByResourceGroupAsyncCollectionResultOfT(ManagedGrafanas client, string subscriptionId, string resourceGroupName, RequestContext context) : base(context?.CancellationToken ?? default)
+ {
+ _client = client;
+ _subscriptionId = subscriptionId;
+ _resourceGroupName = resourceGroupName;
+ _context = context;
+ }
+
+ /// Gets the pages of ManagedGrafanasGetByResourceGroupAsyncCollectionResultOfT as an enumerable collection.
+ /// A continuation token indicating where to resume paging.
+ /// The number of items per page.
+ /// The pages of ManagedGrafanasGetByResourceGroupAsyncCollectionResultOfT as an enumerable collection.
+ public override async IAsyncEnumerable> AsPages(string continuationToken, int? pageSizeHint)
+ {
+ Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null;
+ while (true)
+ {
+ Response response = await GetNextResponseAsync(pageSizeHint, nextPage).ConfigureAwait(false);
+ if (response is null)
+ {
+ yield break;
+ }
+ ManagedGrafanaListResponse result = ManagedGrafanaListResponse.FromResponse(response);
+ yield return Page.FromValues((IReadOnlyList)result.Value, nextPage?.AbsoluteUri, response);
+ nextPage = result.NextLink;
+ if (nextPage == null)
+ {
+ yield break;
+ }
+ }
+ }
+
+ /// Get next page.
+ /// The number of items per page.
+ /// The next link to use for the next page of results.
+ private async ValueTask GetNextResponseAsync(int? pageSizeHint, Uri nextLink)
+ {
+ HttpMessage message = nextLink != null ? _client.CreateNextGetByResourceGroupRequest(nextLink, _subscriptionId, _resourceGroupName, _context) : _client.CreateGetByResourceGroupRequest(_subscriptionId, _resourceGroupName, _context);
+ using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("ManagedGrafanaCollection.GetAll");
+ scope.Start();
+ try
+ {
+ return await _client.Pipeline.ProcessMessageAsync(message, _context).ConfigureAwait(false);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/CollectionResults/ManagedGrafanasGetByResourceGroupCollectionResultOfT.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/CollectionResults/ManagedGrafanasGetByResourceGroupCollectionResultOfT.cs
new file mode 100644
index 000000000000..abd8ecb3c4cb
--- /dev/null
+++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/CollectionResults/ManagedGrafanasGetByResourceGroupCollectionResultOfT.cs
@@ -0,0 +1,80 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager.Grafana.Models;
+
+namespace Azure.ResourceManager.Grafana
+{
+ internal partial class ManagedGrafanasGetByResourceGroupCollectionResultOfT : Pageable
+ {
+ private readonly ManagedGrafanas _client;
+ private readonly string _subscriptionId;
+ private readonly string _resourceGroupName;
+ private readonly RequestContext _context;
+
+ /// Initializes a new instance of ManagedGrafanasGetByResourceGroupCollectionResultOfT, which is used to iterate over the pages of a collection.
+ /// The ManagedGrafanas client used to send requests.
+ /// The ID of the target subscription. The value must be an UUID.
+ /// The name of the resource group. The name is case insensitive.
+ /// The request options, which can override default behaviors of the client pipeline on a per-call basis.
+ public ManagedGrafanasGetByResourceGroupCollectionResultOfT(ManagedGrafanas client, string subscriptionId, string resourceGroupName, RequestContext context) : base(context?.CancellationToken ?? default)
+ {
+ _client = client;
+ _subscriptionId = subscriptionId;
+ _resourceGroupName = resourceGroupName;
+ _context = context;
+ }
+
+ /// Gets the pages of ManagedGrafanasGetByResourceGroupCollectionResultOfT as an enumerable collection.
+ /// A continuation token indicating where to resume paging.
+ /// The number of items per page.
+ /// The pages of ManagedGrafanasGetByResourceGroupCollectionResultOfT as an enumerable collection.
+ public override IEnumerable> AsPages(string continuationToken, int? pageSizeHint)
+ {
+ Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null;
+ while (true)
+ {
+ Response response = GetNextResponse(pageSizeHint, nextPage);
+ if (response is null)
+ {
+ yield break;
+ }
+ ManagedGrafanaListResponse result = ManagedGrafanaListResponse.FromResponse(response);
+ yield return Page.FromValues((IReadOnlyList)result.Value, nextPage?.AbsoluteUri, response);
+ nextPage = result.NextLink;
+ if (nextPage == null)
+ {
+ yield break;
+ }
+ }
+ }
+
+ /// Get next page.
+ /// The number of items per page.
+ /// The next link to use for the next page of results.
+ private Response GetNextResponse(int? pageSizeHint, Uri nextLink)
+ {
+ HttpMessage message = nextLink != null ? _client.CreateNextGetByResourceGroupRequest(nextLink, _subscriptionId, _resourceGroupName, _context) : _client.CreateGetByResourceGroupRequest(_subscriptionId, _resourceGroupName, _context);
+ using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("ManagedGrafanaCollection.GetAll");
+ scope.Start();
+ try
+ {
+ return _client.Pipeline.ProcessMessage(message, _context);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/CollectionResults/ManagedPrivateEndpointModelsGetAllAsyncCollectionResultOfT.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/CollectionResults/ManagedPrivateEndpointModelsGetAllAsyncCollectionResultOfT.cs
new file mode 100644
index 000000000000..8f97d06cca24
--- /dev/null
+++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/CollectionResults/ManagedPrivateEndpointModelsGetAllAsyncCollectionResultOfT.cs
@@ -0,0 +1,84 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager.Grafana.Models;
+
+namespace Azure.ResourceManager.Grafana
+{
+ internal partial class ManagedPrivateEndpointModelsGetAllAsyncCollectionResultOfT : AsyncPageable
+ {
+ private readonly ManagedPrivateEndpointModels _client;
+ private readonly string _subscriptionId;
+ private readonly string _resourceGroupName;
+ private readonly string _workspaceName;
+ private readonly RequestContext _context;
+
+ /// Initializes a new instance of ManagedPrivateEndpointModelsGetAllAsyncCollectionResultOfT, which is used to iterate over the pages of a collection.
+ /// The ManagedPrivateEndpointModels client used to send requests.
+ /// The ID of the target subscription. The value must be an UUID.
+ /// The name of the resource group. The name is case insensitive.
+ /// The workspace name of Azure Managed Grafana.
+ /// The request options, which can override default behaviors of the client pipeline on a per-call basis.
+ public ManagedPrivateEndpointModelsGetAllAsyncCollectionResultOfT(ManagedPrivateEndpointModels client, string subscriptionId, string resourceGroupName, string workspaceName, RequestContext context) : base(context?.CancellationToken ?? default)
+ {
+ _client = client;
+ _subscriptionId = subscriptionId;
+ _resourceGroupName = resourceGroupName;
+ _workspaceName = workspaceName;
+ _context = context;
+ }
+
+ /// Gets the pages of ManagedPrivateEndpointModelsGetAllAsyncCollectionResultOfT as an enumerable collection.
+ /// A continuation token indicating where to resume paging.
+ /// The number of items per page.
+ /// The pages of ManagedPrivateEndpointModelsGetAllAsyncCollectionResultOfT as an enumerable collection.
+ public override async IAsyncEnumerable> AsPages(string continuationToken, int? pageSizeHint)
+ {
+ Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null;
+ while (true)
+ {
+ Response response = await GetNextResponseAsync(pageSizeHint, nextPage).ConfigureAwait(false);
+ if (response is null)
+ {
+ yield break;
+ }
+ ManagedPrivateEndpointModelListResponse result = ManagedPrivateEndpointModelListResponse.FromResponse(response);
+ yield return Page.FromValues((IReadOnlyList)result.Value, nextPage?.AbsoluteUri, response);
+ nextPage = result.NextLink;
+ if (nextPage == null)
+ {
+ yield break;
+ }
+ }
+ }
+
+ /// Get next page.
+ /// The number of items per page.
+ /// The next link to use for the next page of results.
+ private async ValueTask GetNextResponseAsync(int? pageSizeHint, Uri nextLink)
+ {
+ HttpMessage message = nextLink != null ? _client.CreateNextGetAllRequest(nextLink, _subscriptionId, _resourceGroupName, _workspaceName, _context) : _client.CreateGetAllRequest(_subscriptionId, _resourceGroupName, _workspaceName, _context);
+ using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("ManagedPrivateEndpointModelCollection.GetAll");
+ scope.Start();
+ try
+ {
+ return await _client.Pipeline.ProcessMessageAsync(message, _context).ConfigureAwait(false);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/CollectionResults/ManagedPrivateEndpointModelsGetAllCollectionResultOfT.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/CollectionResults/ManagedPrivateEndpointModelsGetAllCollectionResultOfT.cs
new file mode 100644
index 000000000000..681197885d95
--- /dev/null
+++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/CollectionResults/ManagedPrivateEndpointModelsGetAllCollectionResultOfT.cs
@@ -0,0 +1,83 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager.Grafana.Models;
+
+namespace Azure.ResourceManager.Grafana
+{
+ internal partial class ManagedPrivateEndpointModelsGetAllCollectionResultOfT : Pageable
+ {
+ private readonly ManagedPrivateEndpointModels _client;
+ private readonly string _subscriptionId;
+ private readonly string _resourceGroupName;
+ private readonly string _workspaceName;
+ private readonly RequestContext _context;
+
+ /// Initializes a new instance of ManagedPrivateEndpointModelsGetAllCollectionResultOfT, which is used to iterate over the pages of a collection.
+ /// The ManagedPrivateEndpointModels client used to send requests.
+ /// The ID of the target subscription. The value must be an UUID.
+ /// The name of the resource group. The name is case insensitive.
+ /// The workspace name of Azure Managed Grafana.
+ /// The request options, which can override default behaviors of the client pipeline on a per-call basis.
+ public ManagedPrivateEndpointModelsGetAllCollectionResultOfT(ManagedPrivateEndpointModels client, string subscriptionId, string resourceGroupName, string workspaceName, RequestContext context) : base(context?.CancellationToken ?? default)
+ {
+ _client = client;
+ _subscriptionId = subscriptionId;
+ _resourceGroupName = resourceGroupName;
+ _workspaceName = workspaceName;
+ _context = context;
+ }
+
+ /// Gets the pages of ManagedPrivateEndpointModelsGetAllCollectionResultOfT as an enumerable collection.
+ /// A continuation token indicating where to resume paging.
+ /// The number of items per page.
+ /// The pages of ManagedPrivateEndpointModelsGetAllCollectionResultOfT as an enumerable collection.
+ public override IEnumerable> AsPages(string continuationToken, int? pageSizeHint)
+ {
+ Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null;
+ while (true)
+ {
+ Response response = GetNextResponse(pageSizeHint, nextPage);
+ if (response is null)
+ {
+ yield break;
+ }
+ ManagedPrivateEndpointModelListResponse result = ManagedPrivateEndpointModelListResponse.FromResponse(response);
+ yield return Page.FromValues((IReadOnlyList)result.Value, nextPage?.AbsoluteUri, response);
+ nextPage = result.NextLink;
+ if (nextPage == null)
+ {
+ yield break;
+ }
+ }
+ }
+
+ /// Get next page.
+ /// The number of items per page.
+ /// The next link to use for the next page of results.
+ private Response GetNextResponse(int? pageSizeHint, Uri nextLink)
+ {
+ HttpMessage message = nextLink != null ? _client.CreateNextGetAllRequest(nextLink, _subscriptionId, _resourceGroupName, _workspaceName, _context) : _client.CreateGetAllRequest(_subscriptionId, _resourceGroupName, _workspaceName, _context);
+ using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("ManagedPrivateEndpointModelCollection.GetAll");
+ scope.Start();
+ try
+ {
+ return _client.Pipeline.ProcessMessage(message, _context);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/CollectionResults/PrivateEndpointConnectionsGetAllAsyncCollectionResultOfT.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/CollectionResults/PrivateEndpointConnectionsGetAllAsyncCollectionResultOfT.cs
new file mode 100644
index 000000000000..2a7231688b93
--- /dev/null
+++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/CollectionResults/PrivateEndpointConnectionsGetAllAsyncCollectionResultOfT.cs
@@ -0,0 +1,84 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager.Grafana.Models;
+
+namespace Azure.ResourceManager.Grafana
+{
+ internal partial class PrivateEndpointConnectionsGetAllAsyncCollectionResultOfT : AsyncPageable
+ {
+ private readonly PrivateEndpointConnections _client;
+ private readonly string _subscriptionId;
+ private readonly string _resourceGroupName;
+ private readonly string _workspaceName;
+ private readonly RequestContext _context;
+
+ /// Initializes a new instance of PrivateEndpointConnectionsGetAllAsyncCollectionResultOfT, which is used to iterate over the pages of a collection.
+ /// The PrivateEndpointConnections client used to send requests.
+ /// The ID of the target subscription. The value must be an UUID.
+ /// The name of the resource group. The name is case insensitive.
+ /// The workspace name of Azure Managed Grafana.
+ /// The request options, which can override default behaviors of the client pipeline on a per-call basis.
+ public PrivateEndpointConnectionsGetAllAsyncCollectionResultOfT(PrivateEndpointConnections client, string subscriptionId, string resourceGroupName, string workspaceName, RequestContext context) : base(context?.CancellationToken ?? default)
+ {
+ _client = client;
+ _subscriptionId = subscriptionId;
+ _resourceGroupName = resourceGroupName;
+ _workspaceName = workspaceName;
+ _context = context;
+ }
+
+ /// Gets the pages of PrivateEndpointConnectionsGetAllAsyncCollectionResultOfT as an enumerable collection.
+ /// A continuation token indicating where to resume paging.
+ /// The number of items per page.
+ /// The pages of PrivateEndpointConnectionsGetAllAsyncCollectionResultOfT as an enumerable collection.
+ public override async IAsyncEnumerable> AsPages(string continuationToken, int? pageSizeHint)
+ {
+ Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null;
+ while (true)
+ {
+ Response response = await GetNextResponseAsync(pageSizeHint, nextPage).ConfigureAwait(false);
+ if (response is null)
+ {
+ yield break;
+ }
+ GrafanaPrivateEndpointConnectionListResult result = GrafanaPrivateEndpointConnectionListResult.FromResponse(response);
+ yield return Page.FromValues((IReadOnlyList)result.Value, nextPage?.AbsoluteUri, response);
+ nextPage = result.NextLink;
+ if (nextPage == null)
+ {
+ yield break;
+ }
+ }
+ }
+
+ /// Get next page.
+ /// The number of items per page.
+ /// The next link to use for the next page of results.
+ private async ValueTask GetNextResponseAsync(int? pageSizeHint, Uri nextLink)
+ {
+ HttpMessage message = nextLink != null ? _client.CreateNextGetAllRequest(nextLink, _subscriptionId, _resourceGroupName, _workspaceName, _context) : _client.CreateGetAllRequest(_subscriptionId, _resourceGroupName, _workspaceName, _context);
+ using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("GrafanaPrivateEndpointConnectionCollection.GetAll");
+ scope.Start();
+ try
+ {
+ return await _client.Pipeline.ProcessMessageAsync(message, _context).ConfigureAwait(false);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/CollectionResults/PrivateEndpointConnectionsGetAllCollectionResultOfT.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/CollectionResults/PrivateEndpointConnectionsGetAllCollectionResultOfT.cs
new file mode 100644
index 000000000000..5dcde2c7e46f
--- /dev/null
+++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/CollectionResults/PrivateEndpointConnectionsGetAllCollectionResultOfT.cs
@@ -0,0 +1,83 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager.Grafana.Models;
+
+namespace Azure.ResourceManager.Grafana
+{
+ internal partial class PrivateEndpointConnectionsGetAllCollectionResultOfT : Pageable
+ {
+ private readonly PrivateEndpointConnections _client;
+ private readonly string _subscriptionId;
+ private readonly string _resourceGroupName;
+ private readonly string _workspaceName;
+ private readonly RequestContext _context;
+
+ /// Initializes a new instance of PrivateEndpointConnectionsGetAllCollectionResultOfT, which is used to iterate over the pages of a collection.
+ /// The PrivateEndpointConnections client used to send requests.
+ /// The ID of the target subscription. The value must be an UUID.
+ /// The name of the resource group. The name is case insensitive.
+ /// The workspace name of Azure Managed Grafana.
+ /// The request options, which can override default behaviors of the client pipeline on a per-call basis.
+ public PrivateEndpointConnectionsGetAllCollectionResultOfT(PrivateEndpointConnections client, string subscriptionId, string resourceGroupName, string workspaceName, RequestContext context) : base(context?.CancellationToken ?? default)
+ {
+ _client = client;
+ _subscriptionId = subscriptionId;
+ _resourceGroupName = resourceGroupName;
+ _workspaceName = workspaceName;
+ _context = context;
+ }
+
+ /// Gets the pages of PrivateEndpointConnectionsGetAllCollectionResultOfT as an enumerable collection.
+ /// A continuation token indicating where to resume paging.
+ /// The number of items per page.
+ /// The pages of PrivateEndpointConnectionsGetAllCollectionResultOfT as an enumerable collection.
+ public override IEnumerable> AsPages(string continuationToken, int? pageSizeHint)
+ {
+ Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null;
+ while (true)
+ {
+ Response response = GetNextResponse(pageSizeHint, nextPage);
+ if (response is null)
+ {
+ yield break;
+ }
+ GrafanaPrivateEndpointConnectionListResult result = GrafanaPrivateEndpointConnectionListResult.FromResponse(response);
+ yield return Page.FromValues((IReadOnlyList)result.Value, nextPage?.AbsoluteUri, response);
+ nextPage = result.NextLink;
+ if (nextPage == null)
+ {
+ yield break;
+ }
+ }
+ }
+
+ /// Get next page.
+ /// The number of items per page.
+ /// The next link to use for the next page of results.
+ private Response GetNextResponse(int? pageSizeHint, Uri nextLink)
+ {
+ HttpMessage message = nextLink != null ? _client.CreateNextGetAllRequest(nextLink, _subscriptionId, _resourceGroupName, _workspaceName, _context) : _client.CreateGetAllRequest(_subscriptionId, _resourceGroupName, _workspaceName, _context);
+ using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("GrafanaPrivateEndpointConnectionCollection.GetAll");
+ scope.Start();
+ try
+ {
+ return _client.Pipeline.ProcessMessage(message, _context);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/CollectionResults/PrivateLinkResourcesGetAllAsyncCollectionResultOfT.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/CollectionResults/PrivateLinkResourcesGetAllAsyncCollectionResultOfT.cs
new file mode 100644
index 000000000000..fa9a8c5ca950
--- /dev/null
+++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/CollectionResults/PrivateLinkResourcesGetAllAsyncCollectionResultOfT.cs
@@ -0,0 +1,84 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager.Grafana.Models;
+
+namespace Azure.ResourceManager.Grafana
+{
+ internal partial class PrivateLinkResourcesGetAllAsyncCollectionResultOfT : AsyncPageable
+ {
+ private readonly PrivateLinkResources _client;
+ private readonly string _subscriptionId;
+ private readonly string _resourceGroupName;
+ private readonly string _workspaceName;
+ private readonly RequestContext _context;
+
+ /// Initializes a new instance of PrivateLinkResourcesGetAllAsyncCollectionResultOfT, which is used to iterate over the pages of a collection.
+ /// The PrivateLinkResources client used to send requests.
+ /// The ID of the target subscription. The value must be an UUID.
+ /// The name of the resource group. The name is case insensitive.
+ /// The workspace name of Azure Managed Grafana.
+ /// The request options, which can override default behaviors of the client pipeline on a per-call basis.
+ public PrivateLinkResourcesGetAllAsyncCollectionResultOfT(PrivateLinkResources client, string subscriptionId, string resourceGroupName, string workspaceName, RequestContext context) : base(context?.CancellationToken ?? default)
+ {
+ _client = client;
+ _subscriptionId = subscriptionId;
+ _resourceGroupName = resourceGroupName;
+ _workspaceName = workspaceName;
+ _context = context;
+ }
+
+ /// Gets the pages of PrivateLinkResourcesGetAllAsyncCollectionResultOfT as an enumerable collection.
+ /// A continuation token indicating where to resume paging.
+ /// The number of items per page.
+ /// The pages of PrivateLinkResourcesGetAllAsyncCollectionResultOfT as an enumerable collection.
+ public override async IAsyncEnumerable> AsPages(string continuationToken, int? pageSizeHint)
+ {
+ Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null;
+ while (true)
+ {
+ Response response = await GetNextResponseAsync(pageSizeHint, nextPage).ConfigureAwait(false);
+ if (response is null)
+ {
+ yield break;
+ }
+ GrafanaPrivateLinkResourceListResult result = GrafanaPrivateLinkResourceListResult.FromResponse(response);
+ yield return Page.FromValues((IReadOnlyList)result.Value, nextPage?.AbsoluteUri, response);
+ nextPage = result.NextLink;
+ if (nextPage == null)
+ {
+ yield break;
+ }
+ }
+ }
+
+ /// Get next page.
+ /// The number of items per page.
+ /// The next link to use for the next page of results.
+ private async ValueTask GetNextResponseAsync(int? pageSizeHint, Uri nextLink)
+ {
+ HttpMessage message = nextLink != null ? _client.CreateNextGetAllRequest(nextLink, _subscriptionId, _resourceGroupName, _workspaceName, _context) : _client.CreateGetAllRequest(_subscriptionId, _resourceGroupName, _workspaceName, _context);
+ using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("GrafanaPrivateLinkResourceCollection.GetAll");
+ scope.Start();
+ try
+ {
+ return await _client.Pipeline.ProcessMessageAsync(message, _context).ConfigureAwait(false);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/CollectionResults/PrivateLinkResourcesGetAllCollectionResultOfT.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/CollectionResults/PrivateLinkResourcesGetAllCollectionResultOfT.cs
new file mode 100644
index 000000000000..efe4339fa549
--- /dev/null
+++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/CollectionResults/PrivateLinkResourcesGetAllCollectionResultOfT.cs
@@ -0,0 +1,83 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager.Grafana.Models;
+
+namespace Azure.ResourceManager.Grafana
+{
+ internal partial class PrivateLinkResourcesGetAllCollectionResultOfT : Pageable
+ {
+ private readonly PrivateLinkResources _client;
+ private readonly string _subscriptionId;
+ private readonly string _resourceGroupName;
+ private readonly string _workspaceName;
+ private readonly RequestContext _context;
+
+ /// Initializes a new instance of PrivateLinkResourcesGetAllCollectionResultOfT, which is used to iterate over the pages of a collection.
+ /// The PrivateLinkResources client used to send requests.
+ /// The ID of the target subscription. The value must be an UUID.
+ /// The name of the resource group. The name is case insensitive.
+ /// The workspace name of Azure Managed Grafana.
+ /// The request options, which can override default behaviors of the client pipeline on a per-call basis.
+ public PrivateLinkResourcesGetAllCollectionResultOfT(PrivateLinkResources client, string subscriptionId, string resourceGroupName, string workspaceName, RequestContext context) : base(context?.CancellationToken ?? default)
+ {
+ _client = client;
+ _subscriptionId = subscriptionId;
+ _resourceGroupName = resourceGroupName;
+ _workspaceName = workspaceName;
+ _context = context;
+ }
+
+ /// Gets the pages of PrivateLinkResourcesGetAllCollectionResultOfT as an enumerable collection.
+ /// A continuation token indicating where to resume paging.
+ /// The number of items per page.
+ /// The pages of PrivateLinkResourcesGetAllCollectionResultOfT as an enumerable collection.
+ public override IEnumerable> AsPages(string continuationToken, int? pageSizeHint)
+ {
+ Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null;
+ while (true)
+ {
+ Response response = GetNextResponse(pageSizeHint, nextPage);
+ if (response is null)
+ {
+ yield break;
+ }
+ GrafanaPrivateLinkResourceListResult result = GrafanaPrivateLinkResourceListResult.FromResponse(response);
+ yield return Page.FromValues((IReadOnlyList)result.Value, nextPage?.AbsoluteUri, response);
+ nextPage = result.NextLink;
+ if (nextPage == null)
+ {
+ yield break;
+ }
+ }
+ }
+
+ /// Get next page.
+ /// The number of items per page.
+ /// The next link to use for the next page of results.
+ private Response GetNextResponse(int? pageSizeHint, Uri nextLink)
+ {
+ HttpMessage message = nextLink != null ? _client.CreateNextGetAllRequest(nextLink, _subscriptionId, _resourceGroupName, _workspaceName, _context) : _client.CreateGetAllRequest(_subscriptionId, _resourceGroupName, _workspaceName, _context);
+ using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("GrafanaPrivateLinkResourceCollection.GetAll");
+ scope.Start();
+ try
+ {
+ return _client.Pipeline.ProcessMessage(message, _context);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/DashboardDefinitionCollection.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/DashboardDefinitionCollection.cs
new file mode 100644
index 000000000000..ea1c870bc19b
--- /dev/null
+++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/DashboardDefinitionCollection.cs
@@ -0,0 +1,573 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager;
+
+namespace Azure.ResourceManager.Grafana
+{
+ ///
+ /// A class representing a collection of and their operations.
+ /// Each in the collection will belong to the same instance of .
+ /// To get a instance call the GetDashboardDefinitions method from an instance of .
+ ///
+ public partial class DashboardDefinitionCollection : ArmCollection, IEnumerable, IAsyncEnumerable
+ {
+ private readonly ClientDiagnostics _dashboardDefinitionsClientDiagnostics;
+ private readonly DashboardDefinitions _dashboardDefinitionsRestClient;
+
+ /// Initializes a new instance of DashboardDefinitionCollection for mocking.
+ protected DashboardDefinitionCollection()
+ {
+ }
+
+ /// Initializes a new instance of class.
+ /// The client parameters to use in these operations.
+ /// The identifier of the resource that is the target of operations.
+ internal DashboardDefinitionCollection(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ TryGetApiVersion(DashboardDefinitionResource.ResourceType, out string dashboardDefinitionApiVersion);
+ _dashboardDefinitionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Grafana", DashboardDefinitionResource.ResourceType.Namespace, Diagnostics);
+ _dashboardDefinitionsRestClient = new DashboardDefinitions(_dashboardDefinitionsClientDiagnostics, Pipeline, Endpoint, dashboardDefinitionApiVersion ?? "2025-09-01-preview");
+ ValidateResourceId(id);
+ }
+
+ ///
+ [Conditional("DEBUG")]
+ internal static void ValidateResourceId(ResourceIdentifier id)
+ {
+ if (id.ResourceType != ManagedDashboardResource.ResourceType)
+ {
+ throw new ArgumentException(string.Format("Invalid resource type {0} expected {1}", id.ResourceType, ManagedDashboardResource.ResourceType), id);
+ }
+ }
+
+ ///
+ /// Create a dashboard definition to update dashboard resource.
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/dashboards/{dashboardName}/dashboardDefinitions/{definitionName}.
+ ///
+ /// -
+ /// Operation Id.
+ /// DashboardDefinitions_Create.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2025-09-01-preview.
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The name of the Dashboard Definition.
+ /// The dashboard definition resource to create or update.
+ /// The cancellation token to use.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string definitionName, DashboardDefinitionData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(definitionName, nameof(definitionName));
+ Argument.AssertNotNull(data, nameof(data));
+
+ using DiagnosticScope scope = _dashboardDefinitionsClientDiagnostics.CreateScope("DashboardDefinitionCollection.CreateOrUpdate");
+ scope.Start();
+ try
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ HttpMessage message = _dashboardDefinitionsRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, definitionName, DashboardDefinitionData.ToRequestContent(data), context);
+ Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false);
+ Response response = Response.FromValue(DashboardDefinitionData.FromResponse(result), result);
+ RequestUriBuilder uri = message.Request.Uri;
+ RehydrationToken rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString());
+ GrafanaArmOperation operation = new GrafanaArmOperation(Response.FromValue(new DashboardDefinitionResource(Client, response.Value), response.GetRawResponse()), rehydrationToken);
+ if (waitUntil == WaitUntil.Completed)
+ {
+ await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
+ }
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Create a dashboard definition to update dashboard resource.
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/dashboards/{dashboardName}/dashboardDefinitions/{definitionName}.
+ ///
+ /// -
+ /// Operation Id.
+ /// DashboardDefinitions_Create.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2025-09-01-preview.
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The name of the Dashboard Definition.
+ /// The dashboard definition resource to create or update.
+ /// The cancellation token to use.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string definitionName, DashboardDefinitionData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(definitionName, nameof(definitionName));
+ Argument.AssertNotNull(data, nameof(data));
+
+ using DiagnosticScope scope = _dashboardDefinitionsClientDiagnostics.CreateScope("DashboardDefinitionCollection.CreateOrUpdate");
+ scope.Start();
+ try
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ HttpMessage message = _dashboardDefinitionsRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, definitionName, DashboardDefinitionData.ToRequestContent(data), context);
+ Response result = Pipeline.ProcessMessage(message, context);
+ Response response = Response.FromValue(DashboardDefinitionData.FromResponse(result), result);
+ RequestUriBuilder uri = message.Request.Uri;
+ RehydrationToken rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString());
+ GrafanaArmOperation operation = new GrafanaArmOperation(Response.FromValue(new DashboardDefinitionResource(Client, response.Value), response.GetRawResponse()), rehydrationToken);
+ if (waitUntil == WaitUntil.Completed)
+ {
+ operation.WaitForCompletion(cancellationToken);
+ }
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get the properties of a specific dashboard definition.
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/dashboards/{dashboardName}/dashboardDefinitions/{definitionName}.
+ ///
+ /// -
+ /// Operation Id.
+ /// DashboardDefinitions_Get.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2025-09-01-preview.
+ ///
+ ///
+ ///
+ /// The name of the Dashboard Definition.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ public virtual async Task> GetAsync(string definitionName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(definitionName, nameof(definitionName));
+
+ using DiagnosticScope scope = _dashboardDefinitionsClientDiagnostics.CreateScope("DashboardDefinitionCollection.Get");
+ scope.Start();
+ try
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ HttpMessage message = _dashboardDefinitionsRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, definitionName, context);
+ Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false);
+ Response response = Response.FromValue(DashboardDefinitionData.FromResponse(result), result);
+ if (response.Value == null)
+ {
+ throw new RequestFailedException(response.GetRawResponse());
+ }
+ return Response.FromValue(new DashboardDefinitionResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get the properties of a specific dashboard definition.
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/dashboards/{dashboardName}/dashboardDefinitions/{definitionName}.
+ ///
+ /// -
+ /// Operation Id.
+ /// DashboardDefinitions_Get.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2025-09-01-preview.
+ ///
+ ///
+ ///
+ /// The name of the Dashboard Definition.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ public virtual Response Get(string definitionName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(definitionName, nameof(definitionName));
+
+ using DiagnosticScope scope = _dashboardDefinitionsClientDiagnostics.CreateScope("DashboardDefinitionCollection.Get");
+ scope.Start();
+ try
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ HttpMessage message = _dashboardDefinitionsRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, definitionName, context);
+ Response result = Pipeline.ProcessMessage(message, context);
+ Response response = Response.FromValue(DashboardDefinitionData.FromResponse(result), result);
+ if (response.Value == null)
+ {
+ throw new RequestFailedException(response.GetRawResponse());
+ }
+ return Response.FromValue(new DashboardDefinitionResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// List all dashboard definitions under the specified dashboard.
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/dashboards/{dashboardName}/dashboardDefinitions.
+ ///
+ /// -
+ /// Operation Id.
+ /// DashboardDefinitions_List.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2025-09-01-preview.
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default)
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ return new AsyncPageableWrapper(new DashboardDefinitionsGetAllAsyncCollectionResultOfT(_dashboardDefinitionsRestClient, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, context), data => new DashboardDefinitionResource(Client, data));
+ }
+
+ ///
+ /// List all dashboard definitions under the specified dashboard.
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/dashboards/{dashboardName}/dashboardDefinitions.
+ ///
+ /// -
+ /// Operation Id.
+ /// DashboardDefinitions_List.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2025-09-01-preview.
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual Pageable GetAll(CancellationToken cancellationToken = default)
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ return new PageableWrapper(new DashboardDefinitionsGetAllCollectionResultOfT(_dashboardDefinitionsRestClient, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, context), data => new DashboardDefinitionResource(Client, data));
+ }
+
+ ///
+ /// Get the properties of a specific dashboard definition.
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/dashboards/{dashboardName}/dashboardDefinitions/{definitionName}.
+ ///
+ /// -
+ /// Operation Id.
+ /// DashboardDefinitions_Get.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2025-09-01-preview.
+ ///
+ ///
+ ///
+ /// The name of the Dashboard Definition.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ public virtual async Task> ExistsAsync(string definitionName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(definitionName, nameof(definitionName));
+
+ using DiagnosticScope scope = _dashboardDefinitionsClientDiagnostics.CreateScope("DashboardDefinitionCollection.Exists");
+ scope.Start();
+ try
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ HttpMessage message = _dashboardDefinitionsRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, definitionName, context);
+ await Pipeline.SendAsync(message, context.CancellationToken).ConfigureAwait(false);
+ Response result = message.Response;
+ Response response = default;
+ switch (result.Status)
+ {
+ case 200:
+ response = Response.FromValue(DashboardDefinitionData.FromResponse(result), result);
+ break;
+ case 404:
+ response = Response.FromValue((DashboardDefinitionData)null, result);
+ break;
+ default:
+ throw new RequestFailedException(result);
+ }
+ return Response.FromValue(response.Value != null, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get the properties of a specific dashboard definition.
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/dashboards/{dashboardName}/dashboardDefinitions/{definitionName}.
+ ///
+ /// -
+ /// Operation Id.
+ /// DashboardDefinitions_Get.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2025-09-01-preview.
+ ///
+ ///
+ ///
+ /// The name of the Dashboard Definition.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ public virtual Response Exists(string definitionName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(definitionName, nameof(definitionName));
+
+ using DiagnosticScope scope = _dashboardDefinitionsClientDiagnostics.CreateScope("DashboardDefinitionCollection.Exists");
+ scope.Start();
+ try
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ HttpMessage message = _dashboardDefinitionsRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, definitionName, context);
+ Pipeline.Send(message, context.CancellationToken);
+ Response result = message.Response;
+ Response response = default;
+ switch (result.Status)
+ {
+ case 200:
+ response = Response.FromValue(DashboardDefinitionData.FromResponse(result), result);
+ break;
+ case 404:
+ response = Response.FromValue((DashboardDefinitionData)null, result);
+ break;
+ default:
+ throw new RequestFailedException(result);
+ }
+ return Response.FromValue(response.Value != null, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get the properties of a specific dashboard definition.
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/dashboards/{dashboardName}/dashboardDefinitions/{definitionName}.
+ ///
+ /// -
+ /// Operation Id.
+ /// DashboardDefinitions_Get.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2025-09-01-preview.
+ ///
+ ///
+ ///
+ /// The name of the Dashboard Definition.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ public virtual async Task> GetIfExistsAsync(string definitionName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(definitionName, nameof(definitionName));
+
+ using DiagnosticScope scope = _dashboardDefinitionsClientDiagnostics.CreateScope("DashboardDefinitionCollection.GetIfExists");
+ scope.Start();
+ try
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ HttpMessage message = _dashboardDefinitionsRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, definitionName, context);
+ await Pipeline.SendAsync(message, context.CancellationToken).ConfigureAwait(false);
+ Response result = message.Response;
+ Response response = default;
+ switch (result.Status)
+ {
+ case 200:
+ response = Response.FromValue(DashboardDefinitionData.FromResponse(result), result);
+ break;
+ case 404:
+ response = Response.FromValue((DashboardDefinitionData)null, result);
+ break;
+ default:
+ throw new RequestFailedException(result);
+ }
+ if (response.Value == null)
+ {
+ return new NoValueResponse(response.GetRawResponse());
+ }
+ return Response.FromValue(new DashboardDefinitionResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get the properties of a specific dashboard definition.
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/dashboards/{dashboardName}/dashboardDefinitions/{definitionName}.
+ ///
+ /// -
+ /// Operation Id.
+ /// DashboardDefinitions_Get.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2025-09-01-preview.
+ ///
+ ///
+ ///
+ /// The name of the Dashboard Definition.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ public virtual NullableResponse GetIfExists(string definitionName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(definitionName, nameof(definitionName));
+
+ using DiagnosticScope scope = _dashboardDefinitionsClientDiagnostics.CreateScope("DashboardDefinitionCollection.GetIfExists");
+ scope.Start();
+ try
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ HttpMessage message = _dashboardDefinitionsRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, definitionName, context);
+ Pipeline.Send(message, context.CancellationToken);
+ Response result = message.Response;
+ Response response = default;
+ switch (result.Status)
+ {
+ case 200:
+ response = Response.FromValue(DashboardDefinitionData.FromResponse(result), result);
+ break;
+ case 404:
+ response = Response.FromValue((DashboardDefinitionData)null, result);
+ break;
+ default:
+ throw new RequestFailedException(result);
+ }
+ if (response.Value == null)
+ {
+ return new NoValueResponse(response.GetRawResponse());
+ }
+ return Response.FromValue(new DashboardDefinitionResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetAll().GetEnumerator();
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetAll().GetEnumerator();
+ }
+
+ /// The cancellation token to use.
+ IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken)
+ {
+ return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken);
+ }
+ }
+}
diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/DashboardDefinitionData.Serialization.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/DashboardDefinitionData.Serialization.cs
new file mode 100644
index 000000000000..2dc2b3950247
--- /dev/null
+++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/DashboardDefinitionData.Serialization.cs
@@ -0,0 +1,192 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text;
+using System.Text.Json;
+using Azure;
+using Azure.Core;
+using Azure.ResourceManager.Grafana.Models;
+using Azure.ResourceManager.Models;
+
+namespace Azure.ResourceManager.Grafana
+{
+ /// The dashboard definition resource type.
+ public partial class DashboardDefinitionData : ResourceData, IJsonModel
+ {
+ /// The JSON writer.
+ /// The client options for reading and writing models.
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ writer.WriteStartObject();
+ JsonModelWriteCore(writer, options);
+ writer.WriteEndObject();
+ }
+
+ /// The JSON writer.
+ /// The client options for reading and writing models.
+ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(DashboardDefinitionData)} does not support writing '{format}' format.");
+ }
+ base.JsonModelWriteCore(writer, options);
+ if (Optional.IsDefined(Properties))
+ {
+ writer.WritePropertyName("properties"u8);
+ writer.WriteObjectValue(Properties, options);
+ }
+ }
+
+ /// The JSON reader.
+ /// The client options for reading and writing models.
+ DashboardDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (DashboardDefinitionData)JsonModelCreateCore(ref reader, options);
+
+ /// The JSON reader.
+ /// The client options for reading and writing models.
+ protected virtual ResourceData JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ {
+ string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(DashboardDefinitionData)} does not support reading '{format}' format.");
+ }
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeDashboardDefinitionData(document.RootElement, options);
+ }
+
+ /// The JSON element to deserialize.
+ /// The client options for reading and writing models.
+ internal static DashboardDefinitionData DeserializeDashboardDefinitionData(JsonElement element, ModelReaderWriterOptions options)
+ {
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ string id = default;
+ string name = default;
+ ResourceType resourceType = default;
+ SystemData systemData = default;
+ IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary();
+ DashboardDefinitionProperties properties = default;
+ foreach (var prop in element.EnumerateObject())
+ {
+ if (prop.NameEquals("id"u8))
+ {
+ id = prop.Value.GetString();
+ continue;
+ }
+ if (prop.NameEquals("name"u8))
+ {
+ name = prop.Value.GetString();
+ continue;
+ }
+ if (prop.NameEquals("type"u8))
+ {
+ if (prop.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ resourceType = new ResourceType(prop.Value.GetString());
+ continue;
+ }
+ if (prop.NameEquals("systemData"u8))
+ {
+ if (prop.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(prop.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerGrafanaContext.Default);
+ continue;
+ }
+ if (prop.NameEquals("properties"u8))
+ {
+ if (prop.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ properties = DashboardDefinitionProperties.DeserializeDashboardDefinitionProperties(prop.Value, options);
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText()));
+ }
+ }
+ return new DashboardDefinitionData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ additionalBinaryDataProperties,
+ properties);
+ }
+
+ /// The client options for reading and writing models.
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options);
+
+ /// The client options for reading and writing models.
+ protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options)
+ {
+ string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ switch (format)
+ {
+ case "J":
+ return ModelReaderWriter.Write(this, options, AzureResourceManagerGrafanaContext.Default);
+ default:
+ throw new FormatException($"The model {nameof(DashboardDefinitionData)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ /// The data to parse.
+ /// The client options for reading and writing models.
+ DashboardDefinitionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (DashboardDefinitionData)PersistableModelCreateCore(data, options);
+
+ /// The data to parse.
+ /// The client options for reading and writing models.
+ protected virtual ResourceData PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options)
+ {
+ string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ switch (format)
+ {
+ case "J":
+ using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions))
+ {
+ return DeserializeDashboardDefinitionData(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(DashboardDefinitionData)} does not support reading '{options.Format}' format.");
+ }
+ }
+
+ /// The client options for reading and writing models.
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+
+ /// The to serialize into .
+ internal static RequestContent ToRequestContent(DashboardDefinitionData dashboardDefinitionData)
+ {
+ if (dashboardDefinitionData == null)
+ {
+ return null;
+ }
+ Utf8JsonRequestContent content = new Utf8JsonRequestContent();
+ content.JsonWriter.WriteObjectValue(dashboardDefinitionData, ModelSerializationExtensions.WireOptions);
+ return content;
+ }
+
+ /// The to deserialize the from.
+ internal static DashboardDefinitionData FromResponse(Response response)
+ {
+ using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeDashboardDefinitionData(document.RootElement, ModelSerializationExtensions.WireOptions);
+ }
+ }
+}
diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/DashboardDefinitionData.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/DashboardDefinitionData.cs
new file mode 100644
index 000000000000..be546127e2bb
--- /dev/null
+++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/DashboardDefinitionData.cs
@@ -0,0 +1,43 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using Azure.Core;
+using Azure.ResourceManager.Grafana.Models;
+using Azure.ResourceManager.Models;
+
+namespace Azure.ResourceManager.Grafana
+{
+ /// The dashboard definition resource type.
+ public partial class DashboardDefinitionData : ResourceData
+ {
+ /// Keeps track of any properties unknown to the library.
+ private protected readonly IDictionary _additionalBinaryDataProperties;
+
+ /// Initializes a new instance of .
+ public DashboardDefinitionData()
+ {
+ }
+
+ /// Initializes a new instance of .
+ /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
+ /// The name of the resource.
+ /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
+ /// Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ /// Keeps track of any properties unknown to the library.
+ /// Properties specific to the dashboard definition resource.
+ internal DashboardDefinitionData(string id, string name, ResourceType resourceType, SystemData systemData, IDictionary additionalBinaryDataProperties, DashboardDefinitionProperties properties) : base(id, name, resourceType, systemData)
+ {
+ _additionalBinaryDataProperties = additionalBinaryDataProperties;
+ Properties = properties;
+ }
+
+ /// Properties specific to the dashboard definition resource.
+ public DashboardDefinitionProperties Properties { get; set; }
+ }
+}
diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/DashboardDefinitionResource.Serialization.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/DashboardDefinitionResource.Serialization.cs
new file mode 100644
index 000000000000..bdd381127b3a
--- /dev/null
+++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/DashboardDefinitionResource.Serialization.cs
@@ -0,0 +1,39 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Text.Json;
+
+namespace Azure.ResourceManager.Grafana
+{
+ ///
+ public partial class DashboardDefinitionResource : IJsonModel
+ {
+ private static IJsonModel s_dataDeserializationInstance;
+
+ private static IJsonModel DataDeserializationInstance => s_dataDeserializationInstance ??= new DashboardDefinitionData();
+
+ /// The writer to serialize the model to.
+ /// The client options for reading and writing models.
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options);
+
+ /// The reader for deserializing the model.
+ /// The client options for reading and writing models.
+ DashboardDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => DataDeserializationInstance.Create(ref reader, options);
+
+ /// The client options for reading and writing models.
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerGrafanaContext.Default);
+
+ /// The binary data to be processed.
+ /// The client options for reading and writing models.
+ DashboardDefinitionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerGrafanaContext.Default);
+
+ /// The client options for reading and writing models.
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => DataDeserializationInstance.GetFormatFromOptions(options);
+ }
+}
diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/DashboardDefinitionResource.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/DashboardDefinitionResource.cs
new file mode 100644
index 000000000000..26bf8cdfb039
--- /dev/null
+++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/DashboardDefinitionResource.cs
@@ -0,0 +1,404 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Diagnostics;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager;
+
+namespace Azure.ResourceManager.Grafana
+{
+ ///
+ /// A class representing a DashboardDefinition along with the instance operations that can be performed on it.
+ /// If you have a you can construct a from an instance of using the GetResource method.
+ /// Otherwise you can get one from its parent resource using the GetDashboardDefinitions method.
+ ///
+ public partial class DashboardDefinitionResource : ArmResource
+ {
+ private readonly ClientDiagnostics _dashboardDefinitionsClientDiagnostics;
+ private readonly DashboardDefinitions _dashboardDefinitionsRestClient;
+ private readonly DashboardDefinitionData _data;
+ /// Gets the resource type for the operations.
+ public static readonly ResourceType ResourceType = "Microsoft.Dashboard/dashboards/dashboardDefinitions";
+
+ /// Initializes a new instance of DashboardDefinitionResource for mocking.
+ protected DashboardDefinitionResource()
+ {
+ }
+
+ /// Initializes a new instance of class.
+ /// The client parameters to use in these operations.
+ /// The resource that is the target of operations.
+ internal DashboardDefinitionResource(ArmClient client, DashboardDefinitionData data) : this(client, data.Id)
+ {
+ HasData = true;
+ _data = data;
+ }
+
+ /// Initializes a new instance of class.
+ /// The client parameters to use in these operations.
+ /// The identifier of the resource that is the target of operations.
+ internal DashboardDefinitionResource(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ TryGetApiVersion(ResourceType, out string dashboardDefinitionApiVersion);
+ _dashboardDefinitionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Grafana", ResourceType.Namespace, Diagnostics);
+ _dashboardDefinitionsRestClient = new DashboardDefinitions(_dashboardDefinitionsClientDiagnostics, Pipeline, Endpoint, dashboardDefinitionApiVersion ?? "2025-09-01-preview");
+ ValidateResourceId(id);
+ }
+
+ /// Gets whether or not the current instance has data.
+ public virtual bool HasData { get; }
+
+ /// Gets the data representing this Feature.
+ public virtual DashboardDefinitionData Data
+ {
+ get
+ {
+ if (!HasData)
+ {
+ throw new InvalidOperationException("The current instance does not have data, you must call Get first.");
+ }
+ return _data;
+ }
+ }
+
+ /// Generate the resource identifier for this resource.
+ /// The subscriptionId.
+ /// The resourceGroupName.
+ /// The dashboardName.
+ /// The definitionName.
+ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string dashboardName, string definitionName)
+ {
+ string resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/dashboards/{dashboardName}/dashboardDefinitions/{definitionName}";
+ return new ResourceIdentifier(resourceId);
+ }
+
+ ///
+ [Conditional("DEBUG")]
+ internal static void ValidateResourceId(ResourceIdentifier id)
+ {
+ if (id.ResourceType != ResourceType)
+ {
+ throw new ArgumentException(string.Format("Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), id);
+ }
+ }
+
+ ///
+ /// Get the properties of a specific dashboard definition.
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/dashboards/{dashboardName}/dashboardDefinitions/{definitionName}.
+ ///
+ /// -
+ /// Operation Id.
+ /// DashboardDefinitions_Get.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2025-09-01-preview.
+ ///
+ /// -
+ /// Resource.
+ /// .
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual async Task> GetAsync(CancellationToken cancellationToken = default)
+ {
+ using DiagnosticScope scope = _dashboardDefinitionsClientDiagnostics.CreateScope("DashboardDefinitionResource.Get");
+ scope.Start();
+ try
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ HttpMessage message = _dashboardDefinitionsRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, context);
+ Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false);
+ Response response = Response.FromValue(DashboardDefinitionData.FromResponse(result), result);
+ if (response.Value == null)
+ {
+ throw new RequestFailedException(response.GetRawResponse());
+ }
+ return Response.FromValue(new DashboardDefinitionResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get the properties of a specific dashboard definition.
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/dashboards/{dashboardName}/dashboardDefinitions/{definitionName}.
+ ///
+ /// -
+ /// Operation Id.
+ /// DashboardDefinitions_Get.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2025-09-01-preview.
+ ///
+ /// -
+ /// Resource.
+ /// .
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual Response Get(CancellationToken cancellationToken = default)
+ {
+ using DiagnosticScope scope = _dashboardDefinitionsClientDiagnostics.CreateScope("DashboardDefinitionResource.Get");
+ scope.Start();
+ try
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ HttpMessage message = _dashboardDefinitionsRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, context);
+ Response result = Pipeline.ProcessMessage(message, context);
+ Response response = Response.FromValue(DashboardDefinitionData.FromResponse(result), result);
+ if (response.Value == null)
+ {
+ throw new RequestFailedException(response.GetRawResponse());
+ }
+ return Response.FromValue(new DashboardDefinitionResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Delete a dashboard definition.
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/dashboards/{dashboardName}/dashboardDefinitions/{definitionName}.
+ ///
+ /// -
+ /// Operation Id.
+ /// DashboardDefinitions_Delete.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2025-09-01-preview.
+ ///
+ /// -
+ /// Resource.
+ /// .
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The cancellation token to use.
+ public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default)
+ {
+ using DiagnosticScope scope = _dashboardDefinitionsClientDiagnostics.CreateScope("DashboardDefinitionResource.Delete");
+ scope.Start();
+ try
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ HttpMessage message = _dashboardDefinitionsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, context);
+ Response response = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false);
+ RequestUriBuilder uri = message.Request.Uri;
+ RehydrationToken rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString());
+ GrafanaArmOperation operation = new GrafanaArmOperation(response, rehydrationToken);
+ if (waitUntil == WaitUntil.Completed)
+ {
+ await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false);
+ }
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Delete a dashboard definition.
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/dashboards/{dashboardName}/dashboardDefinitions/{definitionName}.
+ ///
+ /// -
+ /// Operation Id.
+ /// DashboardDefinitions_Delete.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2025-09-01-preview.
+ ///
+ /// -
+ /// Resource.
+ /// .
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The cancellation token to use.
+ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default)
+ {
+ using DiagnosticScope scope = _dashboardDefinitionsClientDiagnostics.CreateScope("DashboardDefinitionResource.Delete");
+ scope.Start();
+ try
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ HttpMessage message = _dashboardDefinitionsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, context);
+ Response response = Pipeline.ProcessMessage(message, context);
+ RequestUriBuilder uri = message.Request.Uri;
+ RehydrationToken rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString());
+ GrafanaArmOperation operation = new GrafanaArmOperation(response, rehydrationToken);
+ if (waitUntil == WaitUntil.Completed)
+ {
+ operation.WaitForCompletionResponse(cancellationToken);
+ }
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Create a dashboard definition to update dashboard resource.
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/dashboards/{dashboardName}/dashboardDefinitions/{definitionName}.
+ ///
+ /// -
+ /// Operation Id.
+ /// DashboardDefinitions_Create.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2025-09-01-preview.
+ ///
+ /// -
+ /// Resource.
+ /// .
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The dashboard definition resource to create or update.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual async Task> UpdateAsync(WaitUntil waitUntil, DashboardDefinitionData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(data, nameof(data));
+
+ using DiagnosticScope scope = _dashboardDefinitionsClientDiagnostics.CreateScope("DashboardDefinitionResource.Update");
+ scope.Start();
+ try
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ HttpMessage message = _dashboardDefinitionsRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, DashboardDefinitionData.ToRequestContent(data), context);
+ Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false);
+ Response response = Response.FromValue(DashboardDefinitionData.FromResponse(result), result);
+ RequestUriBuilder uri = message.Request.Uri;
+ RehydrationToken rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString());
+ GrafanaArmOperation operation = new GrafanaArmOperation(Response.FromValue(new DashboardDefinitionResource(Client, response.Value), response.GetRawResponse()), rehydrationToken);
+ if (waitUntil == WaitUntil.Completed)
+ {
+ await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
+ }
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Create a dashboard definition to update dashboard resource.
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/dashboards/{dashboardName}/dashboardDefinitions/{definitionName}.
+ ///
+ /// -
+ /// Operation Id.
+ /// DashboardDefinitions_Create.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2025-09-01-preview.
+ ///
+ /// -
+ /// Resource.
+ /// .
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The dashboard definition resource to create or update.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual ArmOperation Update(WaitUntil waitUntil, DashboardDefinitionData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(data, nameof(data));
+
+ using DiagnosticScope scope = _dashboardDefinitionsClientDiagnostics.CreateScope("DashboardDefinitionResource.Update");
+ scope.Start();
+ try
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ HttpMessage message = _dashboardDefinitionsRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, DashboardDefinitionData.ToRequestContent(data), context);
+ Response result = Pipeline.ProcessMessage(message, context);
+ Response response = Response.FromValue(DashboardDefinitionData.FromResponse(result), result);
+ RequestUriBuilder uri = message.Request.Uri;
+ RehydrationToken rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString());
+ GrafanaArmOperation operation = new GrafanaArmOperation(Response.FromValue(new DashboardDefinitionResource(Client, response.Value), response.GetRawResponse()), rehydrationToken);
+ if (waitUntil == WaitUntil.Completed)
+ {
+ operation.WaitForCompletion(cancellationToken);
+ }
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Extensions/GrafanaExtensions.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Extensions/GrafanaExtensions.cs
index 72abbcb0ed3e..1a29b8039964 100644
--- a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Extensions/GrafanaExtensions.cs
+++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Extensions/GrafanaExtensions.cs
@@ -8,7 +8,9 @@
using System;
using System.Threading;
using System.Threading.Tasks;
+using Azure;
using Azure.Core;
+using Azure.ResourceManager;
using Azure.ResourceManager.Grafana.Mocking;
using Azure.ResourceManager.Resources;
@@ -17,30 +19,32 @@ namespace Azure.ResourceManager.Grafana
/// A class to add extension methods to Azure.ResourceManager.Grafana.
public static partial class GrafanaExtensions
{
+ ///
private static MockableGrafanaArmClient GetMockableGrafanaArmClient(ArmClient client)
{
- return client.GetCachedClient(client0 => new MockableGrafanaArmClient(client0));
+ return client.GetCachedClient(client0 => new MockableGrafanaArmClient(client0, ResourceIdentifier.Root));
}
- private static MockableGrafanaResourceGroupResource GetMockableGrafanaResourceGroupResource(ArmResource resource)
+ ///
+ private static MockableGrafanaResourceGroupResource GetMockableGrafanaResourceGroupResource(ResourceGroupResource resourceGroupResource)
{
- return resource.GetCachedClient(client => new MockableGrafanaResourceGroupResource(client, resource.Id));
+ return resourceGroupResource.GetCachedClient(client => new MockableGrafanaResourceGroupResource(client, resourceGroupResource.Id));
}
- private static MockableGrafanaSubscriptionResource GetMockableGrafanaSubscriptionResource(ArmResource resource)
+ ///
+ private static MockableGrafanaSubscriptionResource GetMockableGrafanaSubscriptionResource(SubscriptionResource subscriptionResource)
{
- return resource.GetCachedClient(client => new MockableGrafanaSubscriptionResource(client, resource.Id));
+ return subscriptionResource.GetCachedClient(client => new MockableGrafanaSubscriptionResource(client, subscriptionResource.Id));
}
///
- /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
- /// You can use to create a from its components.
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
/// -
- /// Mocking
- /// To mock this method, please mock instead.
+ /// Mocking.
+ /// To mock this method, please mock instead.
///
///
- /// The instance the method will execute against.
+ /// The the method will execute against.
/// The resource ID of the resource to get.
/// is null.
/// Returns a object.
@@ -52,14 +56,13 @@ public static ManagedGrafanaResource GetManagedGrafanaResource(this ArmClient cl
}
///
- /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
- /// You can use to create a from its components.
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
/// -
- /// Mocking
- /// To mock this method, please mock instead.
+ /// Mocking.
+ /// To mock this method, please mock instead.
///
///
- /// The instance the method will execute against.
+ /// The the method will execute against.
/// The resource ID of the resource to get.
/// is null.
/// Returns a object.
@@ -71,14 +74,13 @@ public static GrafanaPrivateEndpointConnectionResource GetGrafanaPrivateEndpoint
}
///
- /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
- /// You can use to create a from its components.
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
/// -
- /// Mocking
- /// To mock this method, please mock instead.
+ /// Mocking.
+ /// To mock this method, please mock instead.
///
///
- /// The instance the method will execute against.
+ /// The the method will execute against.
/// The resource ID of the resource to get.
/// is null.
/// Returns a object.
@@ -90,14 +92,13 @@ public static GrafanaPrivateLinkResource GetGrafanaPrivateLinkResource(this ArmC
}
///
- /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
- /// You can use to create a from its components.
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
/// -
- /// Mocking
- /// To mock this method, please mock instead.
+ /// Mocking.
+ /// To mock this method, please mock instead.
///
///
- /// The instance the method will execute against.
+ /// The the method will execute against.
/// The resource ID of the resource to get.
/// is null.
/// Returns a object.
@@ -109,14 +110,13 @@ public static ManagedPrivateEndpointModelResource GetManagedPrivateEndpointModel
}
///
- /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
- /// You can use to create a from its components.
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
/// -
- /// Mocking
- /// To mock this method, please mock instead.
+ /// Mocking.
+ /// To mock this method, please mock instead.
///
///
- /// The instance the method will execute against.
+ /// The the method will execute against.
/// The resource ID of the resource to get.
/// is null.
/// Returns a object.
@@ -128,14 +128,13 @@ public static GrafanaIntegrationFabricResource GetGrafanaIntegrationFabricResour
}
///
- /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
- /// You can use to create a from its components.
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
/// -
- /// Mocking
- /// To mock this method, please mock instead.
+ /// Mocking.
+ /// To mock this method, please mock instead.
///
///
- /// The instance the method will execute against.
+ /// The the method will execute against.
/// The resource ID of the resource to get.
/// is null.
/// Returns a object.
@@ -147,15 +146,33 @@ public static ManagedDashboardResource GetManagedDashboardResource(this ArmClien
}
///
- /// Gets a collection of ManagedGrafanaResources in the ResourceGroupResource.
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
/// -
- /// Mocking
- /// To mock this method, please mock instead.
+ /// Mocking.
+ /// To mock this method, please mock instead.
///
///
- /// The instance the method will execute against.
+ /// The the method will execute against.
+ /// The resource ID of the resource to get.
+ /// is null.
+ /// Returns a object.
+ public static DashboardDefinitionResource GetDashboardDefinitionResource(this ArmClient client, ResourceIdentifier id)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return GetMockableGrafanaArmClient(client).GetDashboardDefinitionResource(id);
+ }
+
+ ///
+ /// Gets a collection of ManagedGrafanas in the
+ /// -
+ /// Mocking.
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The the method will execute against.
/// is null.
- /// An object representing collection of ManagedGrafanaResources and their operations over a ManagedGrafanaResource.
+ /// An object representing collection of ManagedGrafanas and their operations over a ManagedGrafanaResource.
public static ManagedGrafanaCollection GetManagedGrafanas(this ResourceGroupResource resourceGroupResource)
{
Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource));
@@ -165,34 +182,15 @@ public static ManagedGrafanaCollection GetManagedGrafanas(this ResourceGroupReso
///
/// Get the properties of a specific workspace for Grafana resource.
- ///
- /// -
- /// Request Path
- /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/grafana/{workspaceName}
- ///
/// -
- /// Operation Id
- /// ManagedGrafana_Get
- ///
- /// -
- /// Default Api Version
- /// 2025-08-01
- ///
- /// -
- /// Resource
- ///
- ///
- ///
- /// -
- /// Mocking
- /// To mock this method, please mock instead.
+ /// Mocking.
+ /// To mock this method, please mock instead.
///
///
- /// The instance the method will execute against.
+ /// The the method will execute against.
/// The workspace name of Azure Managed Grafana.
/// The cancellation token to use.
- /// or is null.
- /// is an empty string, and was expected to be non-empty.
+ /// is null.
[ForwardsClientCalls]
public static async Task> GetManagedGrafanaAsync(this ResourceGroupResource resourceGroupResource, string workspaceName, CancellationToken cancellationToken = default)
{
@@ -203,34 +201,15 @@ public static async Task> GetManagedGrafanaAsyn
///
/// Get the properties of a specific workspace for Grafana resource.
- ///
- /// -
- /// Request Path
- /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/grafana/{workspaceName}
- ///
- /// -
- /// Operation Id
- /// ManagedGrafana_Get
- ///
- /// -
- /// Default Api Version
- /// 2025-08-01
- ///
- /// -
- /// Resource
- ///
- ///
- ///
/// -
- /// Mocking
- /// To mock this method, please mock instead.
+ /// Mocking.
+ /// To mock this method, please mock instead.
///
///
- /// The instance the method will execute against.
+ /// The the method will execute against.
/// The workspace name of Azure Managed Grafana.
/// The cancellation token to use.
- /// or is null.
- /// is an empty string, and was expected to be non-empty.
+ /// is null.
[ForwardsClientCalls]
public static Response GetManagedGrafana(this ResourceGroupResource resourceGroupResource, string workspaceName, CancellationToken cancellationToken = default)
{
@@ -240,15 +219,15 @@ public static Response GetManagedGrafana(this ResourceGr
}
///
- /// Gets a collection of ManagedDashboardResources in the ResourceGroupResource.
+ /// Gets a collection of ManagedDashboards in the
/// -
- /// Mocking
- /// To mock this method, please mock instead.
+ /// Mocking.
+ /// To mock this method, please mock instead.
///
///
- /// The instance the method will execute against.
+ /// The the method will execute against.
/// is null.
- /// An object representing collection of ManagedDashboardResources and their operations over a ManagedDashboardResource.
+ /// An object representing collection of ManagedDashboards and their operations over a ManagedDashboardResource.
public static ManagedDashboardCollection GetManagedDashboards(this ResourceGroupResource resourceGroupResource)
{
Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource));
@@ -258,34 +237,15 @@ public static ManagedDashboardCollection GetManagedDashboards(this ResourceGroup
///
/// Get the properties of a specific dashboard for grafana resource.
- ///
/// -
- /// Request Path
- /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/dashboards/{dashboardName}
- ///
- /// -
- /// Operation Id
- /// ManagedDashboard_Get
- ///
- /// -
- /// Default Api Version
- /// 2025-08-01
- ///
- /// -
- /// Resource
- ///
- ///
- ///
- /// -
- /// Mocking
- /// To mock this method, please mock instead.
+ /// Mocking.
+ /// To mock this method, please mock instead.
///
///
- /// The instance the method will execute against.
+ /// The the method will execute against.
/// The name of the Azure Managed Dashboard.
/// The cancellation token to use.
- /// or is null.
- /// is an empty string, and was expected to be non-empty.
+ /// is null.
[ForwardsClientCalls]
public static async Task> GetManagedDashboardAsync(this ResourceGroupResource resourceGroupResource, string dashboardName, CancellationToken cancellationToken = default)
{
@@ -296,34 +256,15 @@ public static async Task> GetManagedDashboard
///
/// Get the properties of a specific dashboard for grafana resource.
- ///
/// -
- /// Request Path
- /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/dashboards/{dashboardName}
- ///
- /// -
- /// Operation Id
- /// ManagedDashboard_Get
- ///
- /// -
- /// Default Api Version
- /// 2025-08-01
- ///
- /// -
- /// Resource
- ///
- ///
- ///
- /// -
- /// Mocking
- /// To mock this method, please mock instead.
+ /// Mocking.
+ /// To mock this method, please mock instead.
///
///
- /// The instance the method will execute against.
+ /// The the method will execute against.
/// The name of the Azure Managed Dashboard.
/// The cancellation token to use.
- /// or is null.
- /// is an empty string, and was expected to be non-empty.
+ /// is null.
[ForwardsClientCalls]
public static Response GetManagedDashboard(this ResourceGroupResource resourceGroupResource, string dashboardName, CancellationToken cancellationToken = default)
{
@@ -333,34 +274,58 @@ public static Response GetManagedDashboard(this Resour
}
///
- /// List all resources of workspaces for Grafana under the specified subscription.
- ///
- /// -
- /// Request Path
- /// /subscriptions/{subscriptionId}/providers/Microsoft.Dashboard/grafana
- ///
+ /// Manual approve private endpoint connection
/// -
- /// Operation Id
- /// ManagedGrafana_List
- ///
- /// -
- /// Default Api Version
- /// 2025-08-01
+ /// Mocking.
+ /// To mock this method, please mock instead.
///
+ ///
+ /// The the method will execute against.
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The workspace name of Azure Managed Grafana.
+ /// The private endpoint connection name of Azure Managed Grafana.
+ ///
+ /// The cancellation token to use.
+ /// is null.
+ public static async Task> ApproveAsync(this ResourceGroupResource resourceGroupResource, WaitUntil waitUntil, string workspaceName, string privateEndpointConnectionName, GrafanaPrivateEndpointConnectionData data = default, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource));
+
+ return await GetMockableGrafanaResourceGroupResource(resourceGroupResource).ApproveAsync(waitUntil, workspaceName, privateEndpointConnectionName, data, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Manual approve private endpoint connection
/// -
- /// Resource
- ///
+ /// Mocking.
+ /// To mock this method, please mock instead.
///
- ///
+ ///
+ /// The the method will execute against.
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The workspace name of Azure Managed Grafana.
+ /// The private endpoint connection name of Azure Managed Grafana.
+ ///
+ /// The cancellation token to use.
+ /// is null.
+ public static ArmOperation Approve(this ResourceGroupResource resourceGroupResource, WaitUntil waitUntil, string workspaceName, string privateEndpointConnectionName, GrafanaPrivateEndpointConnectionData data = default, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource));
+
+ return GetMockableGrafanaResourceGroupResource(resourceGroupResource).Approve(waitUntil, workspaceName, privateEndpointConnectionName, data, cancellationToken);
+ }
+
+ ///
+ /// List all resources of workspaces for Grafana under the specified subscription.
/// -
- /// Mocking
- /// To mock this method, please mock instead.
+ /// Mocking.
+ /// To mock this method, please mock instead.
///
///
- /// The instance the method will execute against.
+ /// The the method will execute against.
/// The cancellation token to use.
/// is null.
- /// An async collection of that may take multiple service requests to iterate over.
+ /// A collection of that may take multiple service requests to iterate over.
public static AsyncPageable GetManagedGrafanasAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource));
@@ -370,30 +335,12 @@ public static AsyncPageable GetManagedGrafanasAsync(this
///
/// List all resources of workspaces for Grafana under the specified subscription.
- ///
/// -
- /// Request Path
- /// /subscriptions/{subscriptionId}/providers/Microsoft.Dashboard/grafana
- ///
- /// -
- /// Operation Id
- /// ManagedGrafana_List
- ///
- /// -
- /// Default Api Version
- /// 2025-08-01
- ///
- /// -
- /// Resource
- ///
- ///
- ///
- /// -
- /// Mocking
- /// To mock this method, please mock instead.
+ /// Mocking.
+ /// To mock this method, please mock instead.
///
///
- /// The instance the method will execute against.
+ /// The the method will execute against.
/// The cancellation token to use.
/// is null.
/// A collection of that may take multiple service requests to iterate over.
@@ -406,33 +353,15 @@ public static Pageable GetManagedGrafanas(this Subscript
///
/// List all resources of dashboards under the specified subscription.
- ///
- /// -
- /// Request Path
- /// /subscriptions/{subscriptionId}/providers/Microsoft.Dashboard/dashboards
- ///
- /// -
- /// Operation Id
- /// ManagedDashboard_ListBySubscription
- ///
- /// -
- /// Default Api Version
- /// 2025-08-01
- ///
- /// -
- /// Resource
- ///
- ///
- ///
/// -
- /// Mocking
- /// To mock this method, please mock instead.
+ /// Mocking.
+ /// To mock this method, please mock instead.
///
///
- /// The instance the method will execute against.
+ /// The the method will execute against.
/// The cancellation token to use.
/// is null.
- /// An async collection of that may take multiple service requests to iterate over.
+ /// A collection of that may take multiple service requests to iterate over.
public static AsyncPageable GetManagedDashboardsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource));
@@ -442,30 +371,12 @@ public static AsyncPageable GetManagedDashboardsAsync(
///
/// List all resources of dashboards under the specified subscription.
- ///
- /// -
- /// Request Path
- /// /subscriptions/{subscriptionId}/providers/Microsoft.Dashboard/dashboards
- ///
- /// -
- /// Operation Id
- /// ManagedDashboard_ListBySubscription
- ///
- /// -
- /// Default Api Version
- /// 2025-08-01
- ///
- /// -
- /// Resource
- ///
- ///
- ///
/// -
- /// Mocking
- /// To mock this method, please mock instead.
+ /// Mocking.
+ /// To mock this method, please mock instead.
///
///
- /// The instance the method will execute against.
+ /// The the method will execute against.
/// The cancellation token to use.
/// is null.
/// A collection of that may take multiple service requests to iterate over.
diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Extensions/MockableGrafanaArmClient.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Extensions/MockableGrafanaArmClient.cs
index 9ca0de85722f..20ce023a3e55 100644
--- a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Extensions/MockableGrafanaArmClient.cs
+++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Extensions/MockableGrafanaArmClient.cs
@@ -6,38 +6,27 @@
#nullable disable
using Azure.Core;
+using Azure.ResourceManager;
+using Azure.ResourceManager.Grafana;
namespace Azure.ResourceManager.Grafana.Mocking
{
- /// A class to add extension methods to ArmClient.
+ /// A class to add extension methods to .
public partial class MockableGrafanaArmClient : ArmResource
{
- /// Initializes a new instance of the class for mocking.
+ /// Initializes a new instance of MockableGrafanaArmClient for mocking.
protected MockableGrafanaArmClient()
{
}
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of class.
/// The client parameters to use in these operations.
/// The identifier of the resource that is the target of operations.
internal MockableGrafanaArmClient(ArmClient client, ResourceIdentifier id) : base(client, id)
{
}
- internal MockableGrafanaArmClient(ArmClient client) : this(client, ResourceIdentifier.Root)
- {
- }
-
- private string GetApiVersionOrNull(ResourceType resourceType)
- {
- TryGetApiVersion(resourceType, out string apiVersion);
- return apiVersion;
- }
-
- ///
- /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
- /// You can use to create a from its components.
- ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
/// The resource ID of the resource to get.
/// Returns a object.
public virtual ManagedGrafanaResource GetManagedGrafanaResource(ResourceIdentifier id)
@@ -46,10 +35,7 @@ public virtual ManagedGrafanaResource GetManagedGrafanaResource(ResourceIdentifi
return new ManagedGrafanaResource(Client, id);
}
- ///
- /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
- /// You can use to create a from its components.
- ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
/// The resource ID of the resource to get.
/// Returns a object.
public virtual GrafanaPrivateEndpointConnectionResource GetGrafanaPrivateEndpointConnectionResource(ResourceIdentifier id)
@@ -58,10 +44,7 @@ public virtual GrafanaPrivateEndpointConnectionResource GetGrafanaPrivateEndpoin
return new GrafanaPrivateEndpointConnectionResource(Client, id);
}
- ///
- /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
- /// You can use to create a from its components.
- ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
/// The resource ID of the resource to get.
/// Returns a object.
public virtual GrafanaPrivateLinkResource GetGrafanaPrivateLinkResource(ResourceIdentifier id)
@@ -70,10 +53,7 @@ public virtual GrafanaPrivateLinkResource GetGrafanaPrivateLinkResource(Resource
return new GrafanaPrivateLinkResource(Client, id);
}
- ///
- /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
- /// You can use to create a from its components.
- ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
/// The resource ID of the resource to get.
/// Returns a object.
public virtual ManagedPrivateEndpointModelResource GetManagedPrivateEndpointModelResource(ResourceIdentifier id)
@@ -82,10 +62,7 @@ public virtual ManagedPrivateEndpointModelResource GetManagedPrivateEndpointMode
return new ManagedPrivateEndpointModelResource(Client, id);
}
- ///
- /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
- /// You can use to create a from its components.
- ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
/// The resource ID of the resource to get.
/// Returns a object.
public virtual GrafanaIntegrationFabricResource GetGrafanaIntegrationFabricResource(ResourceIdentifier id)
@@ -94,10 +71,7 @@ public virtual GrafanaIntegrationFabricResource GetGrafanaIntegrationFabricResou
return new GrafanaIntegrationFabricResource(Client, id);
}
- ///
- /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
- /// You can use to create a from its components.
- ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
/// The resource ID of the resource to get.
/// Returns a object.
public virtual ManagedDashboardResource GetManagedDashboardResource(ResourceIdentifier id)
@@ -105,5 +79,14 @@ public virtual ManagedDashboardResource GetManagedDashboardResource(ResourceIden
ManagedDashboardResource.ValidateResourceId(id);
return new ManagedDashboardResource(Client, id);
}
+
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// The resource ID of the resource to get.
+ /// Returns a object.
+ public virtual DashboardDefinitionResource GetDashboardDefinitionResource(ResourceIdentifier id)
+ {
+ DashboardDefinitionResource.ValidateResourceId(id);
+ return new DashboardDefinitionResource(Client, id);
+ }
}
}
diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Extensions/MockableGrafanaResourceGroupResource.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Extensions/MockableGrafanaResourceGroupResource.cs
index eb5a78fe3476..6750d26a2fde 100644
--- a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Extensions/MockableGrafanaResourceGroupResource.cs
+++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Extensions/MockableGrafanaResourceGroupResource.cs
@@ -8,33 +8,39 @@
using System;
using System.Threading;
using System.Threading.Tasks;
+using Azure;
using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager;
+using Azure.ResourceManager.Grafana;
+using Azure.ResourceManager.Resources;
namespace Azure.ResourceManager.Grafana.Mocking
{
- /// A class to add extension methods to ResourceGroupResource.
+ /// A class to add extension methods to .
public partial class MockableGrafanaResourceGroupResource : ArmResource
{
- /// Initializes a new instance of the class for mocking.
+ private ClientDiagnostics _privateEndpointConnectionsClientDiagnostics;
+ private PrivateEndpointConnections _privateEndpointConnectionsRestClient;
+
+ /// Initializes a new instance of MockableGrafanaResourceGroupResource for mocking.
protected MockableGrafanaResourceGroupResource()
{
}
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of class.
/// The client parameters to use in these operations.
/// The identifier of the resource that is the target of operations.
internal MockableGrafanaResourceGroupResource(ArmClient client, ResourceIdentifier id) : base(client, id)
{
}
- private string GetApiVersionOrNull(ResourceType resourceType)
- {
- TryGetApiVersion(resourceType, out string apiVersion);
- return apiVersion;
- }
+ private ClientDiagnostics PrivateEndpointConnectionsClientDiagnostics => _privateEndpointConnectionsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Grafana.Mocking", ProviderConstants.DefaultProviderNamespace, Diagnostics);
- /// Gets a collection of ManagedGrafanaResources in the ResourceGroupResource.
- /// An object representing collection of ManagedGrafanaResources and their operations over a ManagedGrafanaResource.
+ private PrivateEndpointConnections PrivateEndpointConnectionsRestClient => _privateEndpointConnectionsRestClient ??= new PrivateEndpointConnections(PrivateEndpointConnectionsClientDiagnostics, Pipeline, Endpoint, "2025-09-01-preview");
+
+ /// Gets a collection of ManagedGrafanas in the .
+ /// An object representing collection of ManagedGrafanas and their operations over a ManagedGrafanaResource.
public virtual ManagedGrafanaCollection GetManagedGrafanas()
{
return GetCachedClient(client => new ManagedGrafanaCollection(client, Id));
@@ -44,20 +50,16 @@ public virtual ManagedGrafanaCollection GetManagedGrafanas()
/// Get the properties of a specific workspace for Grafana resource.
///
/// -
- /// Request Path
- /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/grafana/{workspaceName}
- ///
- /// -
- /// Operation Id
- /// ManagedGrafana_Get
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/grafana/{workspaceName}.
///
/// -
- /// Default Api Version
- /// 2025-08-01
+ /// Operation Id.
+ /// ManagedGrafanas_Get.
///
/// -
- /// Resource
- ///
+ /// Default Api Version.
+ /// 2025-09-01-preview.
///
///
///
@@ -68,6 +70,8 @@ public virtual ManagedGrafanaCollection GetManagedGrafanas()
[ForwardsClientCalls]
public virtual async Task> GetManagedGrafanaAsync(string workspaceName, CancellationToken cancellationToken = default)
{
+ Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName));
+
return await GetManagedGrafanas().GetAsync(workspaceName, cancellationToken).ConfigureAwait(false);
}
@@ -75,20 +79,16 @@ public virtual async Task> GetManagedGrafanaAsy
/// Get the properties of a specific workspace for Grafana resource.
///
/// -
- /// Request Path
- /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/grafana/{workspaceName}
- ///
- /// -
- /// Operation Id
- /// ManagedGrafana_Get
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/grafana/{workspaceName}.
///
/// -
- /// Default Api Version
- /// 2025-08-01
+ /// Operation Id.
+ /// ManagedGrafanas_Get.
///
/// -
- /// Resource
- ///
+ /// Default Api Version.
+ /// 2025-09-01-preview.
///
///
///
@@ -99,11 +99,13 @@ public virtual async Task> GetManagedGrafanaAsy
[ForwardsClientCalls]
public virtual Response GetManagedGrafana(string workspaceName, CancellationToken cancellationToken = default)
{
+ Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName));
+
return GetManagedGrafanas().Get(workspaceName, cancellationToken);
}
- /// Gets a collection of ManagedDashboardResources in the ResourceGroupResource.
- /// An object representing collection of ManagedDashboardResources and their operations over a ManagedDashboardResource.
+ /// Gets a collection of ManagedDashboards in the .
+ /// An object representing collection of ManagedDashboards and their operations over a ManagedDashboardResource.
public virtual ManagedDashboardCollection GetManagedDashboards()
{
return GetCachedClient(client => new ManagedDashboardCollection(client, Id));
@@ -113,20 +115,16 @@ public virtual ManagedDashboardCollection GetManagedDashboards()
/// Get the properties of a specific dashboard for grafana resource.
///
/// -
- /// Request Path
- /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/dashboards/{dashboardName}
- ///
- /// -
- /// Operation Id
- /// ManagedDashboard_Get
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/dashboards/{dashboardName}.
///
/// -
- /// Default Api Version
- /// 2025-08-01
+ /// Operation Id.
+ /// ManagedDashboards_Get.
///
/// -
- /// Resource
- ///
+ /// Default Api Version.
+ /// 2025-09-01-preview.
///
///
///
@@ -137,6 +135,8 @@ public virtual ManagedDashboardCollection GetManagedDashboards()
[ForwardsClientCalls]
public virtual async Task> GetManagedDashboardAsync(string dashboardName, CancellationToken cancellationToken = default)
{
+ Argument.AssertNotNullOrEmpty(dashboardName, nameof(dashboardName));
+
return await GetManagedDashboards().GetAsync(dashboardName, cancellationToken).ConfigureAwait(false);
}
@@ -144,20 +144,16 @@ public virtual async Task> GetManagedDashboar
/// Get the properties of a specific dashboard for grafana resource.
///
/// -
- /// Request Path
- /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/dashboards/{dashboardName}
- ///
- /// -
- /// Operation Id
- /// ManagedDashboard_Get
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/dashboards/{dashboardName}.
///
/// -
- /// Default Api Version
- /// 2025-08-01
+ /// Operation Id.
+ /// ManagedDashboards_Get.
///
/// -
- /// Resource
- ///
+ /// Default Api Version.
+ /// 2025-09-01-preview.
///
///
///
@@ -168,7 +164,127 @@ public virtual async Task> GetManagedDashboar
[ForwardsClientCalls]
public virtual Response GetManagedDashboard(string dashboardName, CancellationToken cancellationToken = default)
{
+ Argument.AssertNotNullOrEmpty(dashboardName, nameof(dashboardName));
+
return GetManagedDashboards().Get(dashboardName, cancellationToken);
}
+
+ ///
+ /// Manual approve private endpoint connection
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/grafana/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}.
+ ///
+ /// -
+ /// Operation Id.
+ /// PrivateEndpointConnections_Approve.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2025-09-01-preview.
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The workspace name of Azure Managed Grafana.
+ /// The private endpoint connection name of Azure Managed Grafana.
+ ///
+ /// The cancellation token to use.
+ /// or is null.
+ /// or is an empty string, and was expected to be non-empty.
+ public virtual async Task> ApproveAsync(WaitUntil waitUntil, string workspaceName, string privateEndpointConnectionName, GrafanaPrivateEndpointConnectionData data = default, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName));
+ Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName));
+
+ using DiagnosticScope scope = PrivateEndpointConnectionsClientDiagnostics.CreateScope("MockableGrafanaResourceGroupResource.Approve");
+ scope.Start();
+ try
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ HttpMessage message = PrivateEndpointConnectionsRestClient.CreateApproveRequest(Id.SubscriptionId, Id.ResourceGroupName, workspaceName, privateEndpointConnectionName, GrafanaPrivateEndpointConnectionData.ToRequestContent(data), context);
+ Response response = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false);
+ GrafanaArmOperation operation = new GrafanaArmOperation(
+ new GrafanaPrivateEndpointConnectionOperationSource(Client),
+ PrivateEndpointConnectionsClientDiagnostics,
+ Pipeline,
+ message.Request,
+ response,
+ OperationFinalStateVia.AzureAsyncOperation);
+ if (waitUntil == WaitUntil.Completed)
+ {
+ await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
+ }
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Manual approve private endpoint connection
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/grafana/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}.
+ ///
+ /// -
+ /// Operation Id.
+ /// PrivateEndpointConnections_Approve.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2025-09-01-preview.
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The workspace name of Azure Managed Grafana.
+ /// The private endpoint connection name of Azure Managed Grafana.
+ ///
+ /// The cancellation token to use.
+ /// or is null.
+ /// or is an empty string, and was expected to be non-empty.
+ public virtual ArmOperation Approve(WaitUntil waitUntil, string workspaceName, string privateEndpointConnectionName, GrafanaPrivateEndpointConnectionData data = default, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName));
+ Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName));
+
+ using DiagnosticScope scope = PrivateEndpointConnectionsClientDiagnostics.CreateScope("MockableGrafanaResourceGroupResource.Approve");
+ scope.Start();
+ try
+ {
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ HttpMessage message = PrivateEndpointConnectionsRestClient.CreateApproveRequest(Id.SubscriptionId, Id.ResourceGroupName, workspaceName, privateEndpointConnectionName, GrafanaPrivateEndpointConnectionData.ToRequestContent(data), context);
+ Response response = Pipeline.ProcessMessage(message, context);
+ GrafanaArmOperation operation = new GrafanaArmOperation(
+ new GrafanaPrivateEndpointConnectionOperationSource(Client),
+ PrivateEndpointConnectionsClientDiagnostics,
+ Pipeline,
+ message.Request,
+ response,
+ OperationFinalStateVia.AzureAsyncOperation);
+ if (waitUntil == WaitUntil.Completed)
+ {
+ operation.WaitForCompletion(cancellationToken);
+ }
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
}
}
diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Extensions/MockableGrafanaSubscriptionResource.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Extensions/MockableGrafanaSubscriptionResource.cs
index 82da93d7eedc..538c76119c53 100644
--- a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Extensions/MockableGrafanaSubscriptionResource.cs
+++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/Extensions/MockableGrafanaSubscriptionResource.cs
@@ -6,91 +6,85 @@
#nullable disable
using System.Threading;
-using Autorest.CSharp.Core;
+using Azure;
using Azure.Core;
using Azure.Core.Pipeline;
+using Azure.ResourceManager;
+using Azure.ResourceManager.Grafana;
+using Azure.ResourceManager.Resources;
namespace Azure.ResourceManager.Grafana.Mocking
{
- /// A class to add extension methods to SubscriptionResource.
+ /// A class to add extension methods to .
public partial class MockableGrafanaSubscriptionResource : ArmResource
{
- private ClientDiagnostics _managedGrafanaClientDiagnostics;
- private ManagedGrafanasRestOperations _managedGrafanaRestClient;
- private ClientDiagnostics _managedDashboardClientDiagnostics;
- private ManagedDashboardsRestOperations _managedDashboardRestClient;
+ private ClientDiagnostics _managedGrafanasClientDiagnostics;
+ private ManagedGrafanas _managedGrafanasRestClient;
+ private ClientDiagnostics _managedDashboardsClientDiagnostics;
+ private ManagedDashboards _managedDashboardsRestClient;
- /// Initializes a new instance of the class for mocking.
+ /// Initializes a new instance of MockableGrafanaSubscriptionResource for mocking.
protected MockableGrafanaSubscriptionResource()
{
}
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of class.
/// The client parameters to use in these operations.
/// The identifier of the resource that is the target of operations.
internal MockableGrafanaSubscriptionResource(ArmClient client, ResourceIdentifier id) : base(client, id)
{
}
- private ClientDiagnostics ManagedGrafanaClientDiagnostics => _managedGrafanaClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Grafana", ManagedGrafanaResource.ResourceType.Namespace, Diagnostics);
- private ManagedGrafanasRestOperations ManagedGrafanaRestClient => _managedGrafanaRestClient ??= new ManagedGrafanasRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(ManagedGrafanaResource.ResourceType));
- private ClientDiagnostics ManagedDashboardClientDiagnostics => _managedDashboardClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Grafana", ManagedDashboardResource.ResourceType.Namespace, Diagnostics);
- private ManagedDashboardsRestOperations ManagedDashboardRestClient => _managedDashboardRestClient ??= new ManagedDashboardsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(ManagedDashboardResource.ResourceType));
+ private ClientDiagnostics ManagedGrafanasClientDiagnostics => _managedGrafanasClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Grafana.Mocking", ProviderConstants.DefaultProviderNamespace, Diagnostics);
- private string GetApiVersionOrNull(ResourceType resourceType)
- {
- TryGetApiVersion(resourceType, out string apiVersion);
- return apiVersion;
- }
+ private ManagedGrafanas ManagedGrafanasRestClient => _managedGrafanasRestClient ??= new ManagedGrafanas(ManagedGrafanasClientDiagnostics, Pipeline, Endpoint, "2025-09-01-preview");
+
+ private ClientDiagnostics ManagedDashboardsClientDiagnostics => _managedDashboardsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Grafana.Mocking", ProviderConstants.DefaultProviderNamespace, Diagnostics);
+
+ private ManagedDashboards ManagedDashboardsRestClient => _managedDashboardsRestClient ??= new ManagedDashboards(ManagedDashboardsClientDiagnostics, Pipeline, Endpoint, "2025-09-01-preview");
///
/// List all resources of workspaces for Grafana under the specified subscription.
///
/// -
- /// Request Path
- /// /subscriptions/{subscriptionId}/providers/Microsoft.Dashboard/grafana
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.Dashboard/grafana.
///
/// -
- /// Operation Id
- /// ManagedGrafana_List
+ /// Operation Id.
+ /// ManagedGrafanas_List.
///
/// -
- /// Default Api Version
- /// 2025-08-01
- ///
- /// -
- /// Resource
- ///
+ /// Default Api Version.
+ /// 2025-09-01-preview.
///
///
///
/// The cancellation token to use.
- /// An async collection of that may take multiple service requests to iterate over.
+ /// A collection of that may take multiple service requests to iterate over.
public virtual AsyncPageable GetManagedGrafanasAsync(CancellationToken cancellationToken = default)
{
- HttpMessage FirstPageRequest(int? pageSizeHint) => ManagedGrafanaRestClient.CreateListRequest(Id.SubscriptionId);
- HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ManagedGrafanaRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId);
- return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ManagedGrafanaResource(Client, ManagedGrafanaData.DeserializeManagedGrafanaData(e)), ManagedGrafanaClientDiagnostics, Pipeline, "MockableGrafanaSubscriptionResource.GetManagedGrafanas", "value", "nextLink", cancellationToken);
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ return new AsyncPageableWrapper(new ManagedGrafanasGetAllAsyncCollectionResultOfT(ManagedGrafanasRestClient, Id.SubscriptionId, context), data => new ManagedGrafanaResource(Client, data));
}
///
/// List all resources of workspaces for Grafana under the specified subscription.
///
/// -
- ///