From d60ee361db9775f5e08ffb85cee14778677907ce Mon Sep 17 00:00:00 2001 From: Chengming <61542202+dvbb@users.noreply.github.com> Date: Mon, 29 May 2023 17:45:00 +0800 Subject: [PATCH] enable model factory (#36582) --- .../CHANGELOG.md | 12 +- ...Manager.NotificationHubs.netstandard2.0.cs | 14 + .../ArmNotificationHubsModelFactory.cs | 272 +++++++++ .../src/autorest.md | 1 - .../CHANGELOG.md | 2 +- ...ceManager.EnergyServices.netstandard2.0.cs | 8 + .../ArmEnergyServicesModelFactory.cs | 78 +++ .../src/autorest.md | 1 - .../CHANGELOG.md | 9 +- ...ager.OperationalInsights.netstandard2.0.cs | 35 ++ .../ArmOperationalInsightsModelFactory.cs | 520 ++++++++++++++++++ .../src/autorest.md | 1 - .../CHANGELOG.md | 9 +- ....ResourceManager.Orbital.netstandard2.0.cs | 12 + .../src/Generated/ArmOrbitalModelFactory.cs | 179 ++++++ .../src/autorest.md | 1 - .../CHANGELOG.md | 9 +- ....ResourceManager.Peering.netstandard2.0.cs | 25 + .../src/Generated/ArmPeeringModelFactory.cs | 355 ++++++++++++ .../src/autorest.md | 1 - 20 files changed, 1520 insertions(+), 24 deletions(-) create mode 100644 sdk/notificationhubs/Azure.ResourceManager.NotificationHubs/src/Generated/ArmNotificationHubsModelFactory.cs create mode 100644 sdk/openenergyplatform/Azure.ResourceManager.EnergyServices/src/Generated/ArmEnergyServicesModelFactory.cs create mode 100644 sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/ArmOperationalInsightsModelFactory.cs create mode 100644 sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/ArmOrbitalModelFactory.cs create mode 100644 sdk/peering/Azure.ResourceManager.Peering/src/Generated/ArmPeeringModelFactory.cs diff --git a/sdk/notificationhubs/Azure.ResourceManager.NotificationHubs/CHANGELOG.md b/sdk/notificationhubs/Azure.ResourceManager.NotificationHubs/CHANGELOG.md index 80ce3c7d5c17..db623d0b31bb 100644 --- a/sdk/notificationhubs/Azure.ResourceManager.NotificationHubs/CHANGELOG.md +++ b/sdk/notificationhubs/Azure.ResourceManager.NotificationHubs/CHANGELOG.md @@ -1,18 +1,18 @@ # Release History -## 1.1.0-beta.1 (Unreleased) +## 1.1.0-beta.1 (2023-05-31) ### Features Added +- Enable the model factory feature for model mocking, more information can be found [here](https://azure.github.io/azure-sdk/dotnet_introduction.html#dotnet-mocking-factory-builder). - Added `NotificationHubApnsCredential.ThumbprintString`, `NotificationHubMpnsCredential.ThumbprintString` to return the hexadecimal string representation of the SHA-1 hash of the certificate. `NotificationHubApnsCredential.Thumbprint`, `NotificationHubMpnsCredential.Thumbprint` have been hidden but are still available. - -### Breaking Changes - -### Bugs Fixed - + ### Other Changes +- Upgraded dependent Azure.Core to 1.32.0. +- Upgraded dependent Azure.ResourceManager to 1.6.0. + ## 1.0.1 (2023-02-20) ### Other Changes diff --git a/sdk/notificationhubs/Azure.ResourceManager.NotificationHubs/api/Azure.ResourceManager.NotificationHubs.netstandard2.0.cs b/sdk/notificationhubs/Azure.ResourceManager.NotificationHubs/api/Azure.ResourceManager.NotificationHubs.netstandard2.0.cs index 91712ffba904..6c6cfa5a78f1 100644 --- a/sdk/notificationhubs/Azure.ResourceManager.NotificationHubs/api/Azure.ResourceManager.NotificationHubs.netstandard2.0.cs +++ b/sdk/notificationhubs/Azure.ResourceManager.NotificationHubs/api/Azure.ResourceManager.NotificationHubs.netstandard2.0.cs @@ -215,6 +215,20 @@ public static partial class NotificationHubsExtensions } namespace Azure.ResourceManager.NotificationHubs.Models { + public static partial class ArmNotificationHubsModelFactory + { + public static Azure.ResourceManager.NotificationHubs.NotificationHubAuthorizationRuleData NotificationHubAuthorizationRuleData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), System.Collections.Generic.IEnumerable rights = null, string primaryKey = null, string secondaryKey = null, string keyName = null, string claimType = null, string claimValue = null, System.DateTimeOffset? modifiedOn = default(System.DateTimeOffset?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), int? revision = default(int?), Azure.ResourceManager.NotificationHubs.Models.NotificationHubSku sku = null) { throw null; } + public static Azure.ResourceManager.NotificationHubs.Models.NotificationHubAvailabilityResult NotificationHubAvailabilityResult(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), bool? isAvailiable = default(bool?), Azure.ResourceManager.NotificationHubs.Models.NotificationHubSku sku = null) { throw null; } + public static Azure.ResourceManager.NotificationHubs.Models.NotificationHubCreateOrUpdateContent NotificationHubCreateOrUpdateContent(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string notificationHubName = null, System.TimeSpan? registrationTtl = default(System.TimeSpan?), System.Collections.Generic.IEnumerable authorizationRules = null, Azure.ResourceManager.NotificationHubs.Models.NotificationHubApnsCredential apnsCredential = null, Azure.ResourceManager.NotificationHubs.Models.NotificationHubWnsCredential wnsCredential = null, Azure.ResourceManager.NotificationHubs.Models.NotificationHubGcmCredential gcmCredential = null, Azure.ResourceManager.NotificationHubs.Models.NotificationHubMpnsCredential mpnsCredential = null, Azure.ResourceManager.NotificationHubs.Models.NotificationHubAdmCredential admCredential = null, Azure.ResourceManager.NotificationHubs.Models.NotificationHubBaiduCredential baiduCredential = null, Azure.ResourceManager.NotificationHubs.Models.NotificationHubSku sku = null) { throw null; } + public static Azure.ResourceManager.NotificationHubs.NotificationHubData NotificationHubData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string notificationHubName = null, System.TimeSpan? registrationTtl = default(System.TimeSpan?), System.Collections.Generic.IEnumerable authorizationRules = null, Azure.ResourceManager.NotificationHubs.Models.NotificationHubApnsCredential apnsCredential = null, Azure.ResourceManager.NotificationHubs.Models.NotificationHubWnsCredential wnsCredential = null, Azure.ResourceManager.NotificationHubs.Models.NotificationHubGcmCredential gcmCredential = null, Azure.ResourceManager.NotificationHubs.Models.NotificationHubMpnsCredential mpnsCredential = null, Azure.ResourceManager.NotificationHubs.Models.NotificationHubAdmCredential admCredential = null, Azure.ResourceManager.NotificationHubs.Models.NotificationHubBaiduCredential baiduCredential = null, Azure.ResourceManager.NotificationHubs.Models.NotificationHubSku sku = null) { throw null; } + public static Azure.ResourceManager.NotificationHubs.Models.NotificationHubNamespaceCreateOrUpdateContent NotificationHubNamespaceCreateOrUpdateContent(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string namespaceName = null, string provisioningState = null, string region = null, string metricId = null, string status = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? updatedOn = default(System.DateTimeOffset?), System.Uri serviceBusEndpoint = null, string subscriptionId = null, string scaleUnit = null, bool? isEnabled = default(bool?), bool? isCritical = default(bool?), string dataCenter = null, Azure.ResourceManager.NotificationHubs.Models.NotificationHubNamespaceType? namespaceType = default(Azure.ResourceManager.NotificationHubs.Models.NotificationHubNamespaceType?), Azure.ResourceManager.NotificationHubs.Models.NotificationHubSku sku = null) { throw null; } + public static Azure.ResourceManager.NotificationHubs.NotificationHubNamespaceData NotificationHubNamespaceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string namespaceName = null, string provisioningState = null, string region = null, string metricId = null, string status = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? updatedOn = default(System.DateTimeOffset?), System.Uri serviceBusEndpoint = null, string subscriptionId = null, string scaleUnit = null, bool? isEnabled = default(bool?), bool? isCritical = default(bool?), string dataCenter = null, Azure.ResourceManager.NotificationHubs.Models.NotificationHubNamespaceType? namespaceType = default(Azure.ResourceManager.NotificationHubs.Models.NotificationHubNamespaceType?), Azure.ResourceManager.NotificationHubs.Models.NotificationHubSku sku = null) { throw null; } + public static Azure.ResourceManager.NotificationHubs.Models.NotificationHubPatch NotificationHubPatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string notificationHubName = null, System.TimeSpan? registrationTtl = default(System.TimeSpan?), System.Collections.Generic.IEnumerable authorizationRules = null, Azure.ResourceManager.NotificationHubs.Models.NotificationHubApnsCredential apnsCredential = null, Azure.ResourceManager.NotificationHubs.Models.NotificationHubWnsCredential wnsCredential = null, Azure.ResourceManager.NotificationHubs.Models.NotificationHubGcmCredential gcmCredential = null, Azure.ResourceManager.NotificationHubs.Models.NotificationHubMpnsCredential mpnsCredential = null, Azure.ResourceManager.NotificationHubs.Models.NotificationHubAdmCredential admCredential = null, Azure.ResourceManager.NotificationHubs.Models.NotificationHubBaiduCredential baiduCredential = null, Azure.ResourceManager.NotificationHubs.Models.NotificationHubSku sku = null) { throw null; } + public static Azure.ResourceManager.NotificationHubs.Models.NotificationHubPnsCredentials NotificationHubPnsCredentials(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.NotificationHubs.Models.NotificationHubApnsCredential apnsCredential = null, Azure.ResourceManager.NotificationHubs.Models.NotificationHubWnsCredential wnsCredential = null, Azure.ResourceManager.NotificationHubs.Models.NotificationHubGcmCredential gcmCredential = null, Azure.ResourceManager.NotificationHubs.Models.NotificationHubMpnsCredential mpnsCredential = null, Azure.ResourceManager.NotificationHubs.Models.NotificationHubAdmCredential admCredential = null, Azure.ResourceManager.NotificationHubs.Models.NotificationHubBaiduCredential baiduCredential = null, Azure.ResourceManager.NotificationHubs.Models.NotificationHubSku sku = null) { throw null; } + public static Azure.ResourceManager.NotificationHubs.Models.NotificationHubResourceKeys NotificationHubResourceKeys(string primaryConnectionString = null, string secondaryConnectionString = null, string primaryKey = null, string secondaryKey = null, string keyName = null) { throw null; } + public static Azure.ResourceManager.NotificationHubs.Models.NotificationHubTestSendResult NotificationHubTestSendResult(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), int? success = default(int?), int? failure = default(int?), System.BinaryData results = null, Azure.ResourceManager.NotificationHubs.Models.NotificationHubSku sku = null) { throw null; } + public static Azure.ResourceManager.NotificationHubs.Models.SharedAccessAuthorizationRuleProperties SharedAccessAuthorizationRuleProperties(System.Collections.Generic.IEnumerable rights = null, string primaryKey = null, string secondaryKey = null, string keyName = null, string claimType = null, string claimValue = null, System.DateTimeOffset? modifiedOn = default(System.DateTimeOffset?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), int? revision = default(int?)) { throw null; } + } public enum AuthorizationRuleAccessRight { Manage = 0, diff --git a/sdk/notificationhubs/Azure.ResourceManager.NotificationHubs/src/Generated/ArmNotificationHubsModelFactory.cs b/sdk/notificationhubs/Azure.ResourceManager.NotificationHubs/src/Generated/ArmNotificationHubsModelFactory.cs new file mode 100644 index 000000000000..a3b335296e3a --- /dev/null +++ b/sdk/notificationhubs/Azure.ResourceManager.NotificationHubs/src/Generated/ArmNotificationHubsModelFactory.cs @@ -0,0 +1,272 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.NotificationHubs; + +namespace Azure.ResourceManager.NotificationHubs.Models +{ + /// Model factory for models. + public static partial class ArmNotificationHubsModelFactory + { + /// Initializes a new instance of NotificationHubAvailabilityResult. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// True if the name is available and can be used to create new Namespace/NotificationHub. Otherwise false. + /// The sku of the created namespace. + /// A new instance for mocking. + public static NotificationHubAvailabilityResult NotificationHubAvailabilityResult(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, bool? isAvailiable = null, NotificationHubSku sku = null) + { + tags ??= new Dictionary(); + + return new NotificationHubAvailabilityResult(id, name, resourceType, systemData, tags, location, isAvailiable, sku); + } + + /// Initializes a new instance of NotificationHubNamespaceCreateOrUpdateContent. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The name of the namespace. + /// Provisioning state of the Namespace. + /// Specifies the targeted region in which the namespace should be created. It can be any of the following values: Australia East, Australia Southeast, Central US, East US, East US 2, West US, North Central US, South Central US, East Asia, Southeast Asia, Brazil South, Japan East, Japan West, North Europe, West Europe. + /// Identifier for Azure Insights metrics. + /// Status of the namespace. It can be any of these values:1 = Created/Active2 = Creating3 = Suspended4 = Deleting. + /// The time the namespace was created. + /// The time the namespace was updated. + /// Endpoint you can use to perform NotificationHub operations. + /// The Id of the Azure subscription associated with the namespace. + /// ScaleUnit where the namespace gets created. + /// Whether or not the namespace is currently enabled. + /// Whether or not the namespace is set as Critical. + /// Data center for the namespace. + /// The namespace type. + /// The sku of the created namespace. + /// A new instance for mocking. + public static NotificationHubNamespaceCreateOrUpdateContent NotificationHubNamespaceCreateOrUpdateContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string namespaceName = null, string provisioningState = null, string region = null, string metricId = null, string status = null, DateTimeOffset? createdOn = null, DateTimeOffset? updatedOn = null, Uri serviceBusEndpoint = null, string subscriptionId = null, string scaleUnit = null, bool? isEnabled = null, bool? isCritical = null, string dataCenter = null, NotificationHubNamespaceType? namespaceType = null, NotificationHubSku sku = null) + { + tags ??= new Dictionary(); + + return new NotificationHubNamespaceCreateOrUpdateContent(id, name, resourceType, systemData, tags, location, namespaceName, provisioningState, region, metricId, status, createdOn, updatedOn, serviceBusEndpoint, subscriptionId, scaleUnit, isEnabled, isCritical, dataCenter, namespaceType, sku); + } + + /// Initializes a new instance of NotificationHubNamespaceData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The name of the namespace. + /// Provisioning state of the Namespace. + /// Specifies the targeted region in which the namespace should be created. It can be any of the following values: Australia East, Australia Southeast, Central US, East US, East US 2, West US, North Central US, South Central US, East Asia, Southeast Asia, Brazil South, Japan East, Japan West, North Europe, West Europe. + /// Identifier for Azure Insights metrics. + /// Status of the namespace. It can be any of these values:1 = Created/Active2 = Creating3 = Suspended4 = Deleting. + /// The time the namespace was created. + /// The time the namespace was updated. + /// Endpoint you can use to perform NotificationHub operations. + /// The Id of the Azure subscription associated with the namespace. + /// ScaleUnit where the namespace gets created. + /// Whether or not the namespace is currently enabled. + /// Whether or not the namespace is set as Critical. + /// Data center for the namespace. + /// The namespace type. + /// The sku of the created namespace. + /// A new instance for mocking. + public static NotificationHubNamespaceData NotificationHubNamespaceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string namespaceName = null, string provisioningState = null, string region = null, string metricId = null, string status = null, DateTimeOffset? createdOn = null, DateTimeOffset? updatedOn = null, Uri serviceBusEndpoint = null, string subscriptionId = null, string scaleUnit = null, bool? isEnabled = null, bool? isCritical = null, string dataCenter = null, NotificationHubNamespaceType? namespaceType = null, NotificationHubSku sku = null) + { + tags ??= new Dictionary(); + + return new NotificationHubNamespaceData(id, name, resourceType, systemData, tags, location, namespaceName, provisioningState, region, metricId, status, createdOn, updatedOn, serviceBusEndpoint, subscriptionId, scaleUnit, isEnabled, isCritical, dataCenter, namespaceType, sku); + } + + /// Initializes a new instance of SharedAccessAuthorizationRuleProperties. + /// The rights associated with the rule. + /// A base64-encoded 256-bit primary key for signing and validating the SAS token. + /// A base64-encoded 256-bit primary key for signing and validating the SAS token. + /// A string that describes the authorization rule. + /// A string that describes the claim type. + /// A string that describes the claim value. + /// The last modified time for this rule. + /// The created time for this rule. + /// The revision number for the rule. + /// A new instance for mocking. + public static SharedAccessAuthorizationRuleProperties SharedAccessAuthorizationRuleProperties(IEnumerable rights = null, string primaryKey = null, string secondaryKey = null, string keyName = null, string claimType = null, string claimValue = null, DateTimeOffset? modifiedOn = null, DateTimeOffset? createdOn = null, int? revision = null) + { + rights ??= new List(); + + return new SharedAccessAuthorizationRuleProperties(rights?.ToList(), primaryKey, secondaryKey, keyName, claimType, claimValue, modifiedOn, createdOn, revision); + } + + /// Initializes a new instance of NotificationHubAuthorizationRuleData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The rights associated with the rule. + /// A base64-encoded 256-bit primary key for signing and validating the SAS token. + /// A base64-encoded 256-bit primary key for signing and validating the SAS token. + /// A string that describes the authorization rule. + /// A string that describes the claim type. + /// A string that describes the claim value. + /// The last modified time for this rule. + /// The created time for this rule. + /// The revision number for the rule. + /// The sku of the created namespace. + /// A new instance for mocking. + public static NotificationHubAuthorizationRuleData NotificationHubAuthorizationRuleData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, IEnumerable rights = null, string primaryKey = null, string secondaryKey = null, string keyName = null, string claimType = null, string claimValue = null, DateTimeOffset? modifiedOn = null, DateTimeOffset? createdOn = null, int? revision = null, NotificationHubSku sku = null) + { + tags ??= new Dictionary(); + rights ??= new List(); + + return new NotificationHubAuthorizationRuleData(id, name, resourceType, systemData, tags, location, rights?.ToList(), primaryKey, secondaryKey, keyName, claimType, claimValue, modifiedOn, createdOn, revision, sku); + } + + /// Initializes a new instance of NotificationHubResourceKeys. + /// PrimaryConnectionString of the AuthorizationRule. + /// SecondaryConnectionString of the created AuthorizationRule. + /// PrimaryKey of the created AuthorizationRule. + /// SecondaryKey of the created AuthorizationRule. + /// KeyName of the created AuthorizationRule. + /// A new instance for mocking. + public static NotificationHubResourceKeys NotificationHubResourceKeys(string primaryConnectionString = null, string secondaryConnectionString = null, string primaryKey = null, string secondaryKey = null, string keyName = null) + { + return new NotificationHubResourceKeys(primaryConnectionString, secondaryConnectionString, primaryKey, secondaryKey, keyName); + } + + /// Initializes a new instance of NotificationHubCreateOrUpdateContent. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The NotificationHub name. + /// The RegistrationTtl of the created NotificationHub. + /// The AuthorizationRules of the created NotificationHub. + /// The ApnsCredential of the created NotificationHub. + /// The WnsCredential of the created NotificationHub. + /// The GcmCredential of the created NotificationHub. + /// The MpnsCredential of the created NotificationHub. + /// The AdmCredential of the created NotificationHub. + /// The BaiduCredential of the created NotificationHub. + /// The sku of the created namespace. + /// A new instance for mocking. + public static NotificationHubCreateOrUpdateContent NotificationHubCreateOrUpdateContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string notificationHubName = null, TimeSpan? registrationTtl = null, IEnumerable authorizationRules = null, NotificationHubApnsCredential apnsCredential = null, NotificationHubWnsCredential wnsCredential = null, NotificationHubGcmCredential gcmCredential = null, NotificationHubMpnsCredential mpnsCredential = null, NotificationHubAdmCredential admCredential = null, NotificationHubBaiduCredential baiduCredential = null, NotificationHubSku sku = null) + { + tags ??= new Dictionary(); + authorizationRules ??= new List(); + + return new NotificationHubCreateOrUpdateContent(id, name, resourceType, systemData, tags, location, notificationHubName, registrationTtl, authorizationRules?.ToList(), apnsCredential, wnsCredential, gcmCredential, mpnsCredential, admCredential, baiduCredential, sku); + } + + /// Initializes a new instance of NotificationHubData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The NotificationHub name. + /// The RegistrationTtl of the created NotificationHub. + /// The AuthorizationRules of the created NotificationHub. + /// The ApnsCredential of the created NotificationHub. + /// The WnsCredential of the created NotificationHub. + /// The GcmCredential of the created NotificationHub. + /// The MpnsCredential of the created NotificationHub. + /// The AdmCredential of the created NotificationHub. + /// The BaiduCredential of the created NotificationHub. + /// The sku of the created namespace. + /// A new instance for mocking. + public static NotificationHubData NotificationHubData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string notificationHubName = null, TimeSpan? registrationTtl = null, IEnumerable authorizationRules = null, NotificationHubApnsCredential apnsCredential = null, NotificationHubWnsCredential wnsCredential = null, NotificationHubGcmCredential gcmCredential = null, NotificationHubMpnsCredential mpnsCredential = null, NotificationHubAdmCredential admCredential = null, NotificationHubBaiduCredential baiduCredential = null, NotificationHubSku sku = null) + { + tags ??= new Dictionary(); + authorizationRules ??= new List(); + + return new NotificationHubData(id, name, resourceType, systemData, tags, location, notificationHubName, registrationTtl, authorizationRules?.ToList(), apnsCredential, wnsCredential, gcmCredential, mpnsCredential, admCredential, baiduCredential, sku); + } + + /// Initializes a new instance of NotificationHubPatch. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The NotificationHub name. + /// The RegistrationTtl of the created NotificationHub. + /// The AuthorizationRules of the created NotificationHub. + /// The ApnsCredential of the created NotificationHub. + /// The WnsCredential of the created NotificationHub. + /// The GcmCredential of the created NotificationHub. + /// The MpnsCredential of the created NotificationHub. + /// The AdmCredential of the created NotificationHub. + /// The BaiduCredential of the created NotificationHub. + /// The sku of the created namespace. + /// A new instance for mocking. + public static NotificationHubPatch NotificationHubPatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string notificationHubName = null, TimeSpan? registrationTtl = null, IEnumerable authorizationRules = null, NotificationHubApnsCredential apnsCredential = null, NotificationHubWnsCredential wnsCredential = null, NotificationHubGcmCredential gcmCredential = null, NotificationHubMpnsCredential mpnsCredential = null, NotificationHubAdmCredential admCredential = null, NotificationHubBaiduCredential baiduCredential = null, NotificationHubSku sku = null) + { + tags ??= new Dictionary(); + authorizationRules ??= new List(); + + return new NotificationHubPatch(id, name, resourceType, systemData, tags, location, notificationHubName, registrationTtl, authorizationRules?.ToList(), apnsCredential, wnsCredential, gcmCredential, mpnsCredential, admCredential, baiduCredential, sku); + } + + /// Initializes a new instance of NotificationHubTestSendResult. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// successful send. + /// send failure. + /// actual failure description. + /// The sku of the created namespace. + /// A new instance for mocking. + public static NotificationHubTestSendResult NotificationHubTestSendResult(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, int? success = null, int? failure = null, BinaryData results = null, NotificationHubSku sku = null) + { + tags ??= new Dictionary(); + + return new NotificationHubTestSendResult(id, name, resourceType, systemData, tags, location, success, failure, results, sku); + } + + /// Initializes a new instance of NotificationHubPnsCredentials. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The ApnsCredential of the created NotificationHub. + /// The WnsCredential of the created NotificationHub. + /// The GcmCredential of the created NotificationHub. + /// The MpnsCredential of the created NotificationHub. + /// The AdmCredential of the created NotificationHub. + /// The BaiduCredential of the created NotificationHub. + /// The sku of the created namespace. + /// A new instance for mocking. + public static NotificationHubPnsCredentials NotificationHubPnsCredentials(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, NotificationHubApnsCredential apnsCredential = null, NotificationHubWnsCredential wnsCredential = null, NotificationHubGcmCredential gcmCredential = null, NotificationHubMpnsCredential mpnsCredential = null, NotificationHubAdmCredential admCredential = null, NotificationHubBaiduCredential baiduCredential = null, NotificationHubSku sku = null) + { + tags ??= new Dictionary(); + + return new NotificationHubPnsCredentials(id, name, resourceType, systemData, tags, location, apnsCredential, wnsCredential, gcmCredential, mpnsCredential, admCredential, baiduCredential, sku); + } + } +} diff --git a/sdk/notificationhubs/Azure.ResourceManager.NotificationHubs/src/autorest.md b/sdk/notificationhubs/Azure.ResourceManager.NotificationHubs/src/autorest.md index c0350150c8b1..bd79138aaaeb 100644 --- a/sdk/notificationhubs/Azure.ResourceManager.NotificationHubs/src/autorest.md +++ b/sdk/notificationhubs/Azure.ResourceManager.NotificationHubs/src/autorest.md @@ -5,7 +5,6 @@ Run `dotnet build /t:GenerateCode` to generate code. ``` yaml azure-arm: true -generate-model-factory: false csharp: true library-name: NotificationHubs namespace: Azure.ResourceManager.NotificationHubs diff --git a/sdk/openenergyplatform/Azure.ResourceManager.EnergyServices/CHANGELOG.md b/sdk/openenergyplatform/Azure.ResourceManager.EnergyServices/CHANGELOG.md index 23f86d1e896e..5483ae7d0d62 100644 --- a/sdk/openenergyplatform/Azure.ResourceManager.EnergyServices/CHANGELOG.md +++ b/sdk/openenergyplatform/Azure.ResourceManager.EnergyServices/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.0.0-beta.1 (Unreleased) +## 1.0.0-beta.1 (2023-05-31) ### General New Features diff --git a/sdk/openenergyplatform/Azure.ResourceManager.EnergyServices/api/Azure.ResourceManager.EnergyServices.netstandard2.0.cs b/sdk/openenergyplatform/Azure.ResourceManager.EnergyServices/api/Azure.ResourceManager.EnergyServices.netstandard2.0.cs index 774ac4ff2cfe..956d87b10cc5 100644 --- a/sdk/openenergyplatform/Azure.ResourceManager.EnergyServices/api/Azure.ResourceManager.EnergyServices.netstandard2.0.cs +++ b/sdk/openenergyplatform/Azure.ResourceManager.EnergyServices/api/Azure.ResourceManager.EnergyServices.netstandard2.0.cs @@ -60,6 +60,14 @@ public static partial class EnergyServicesExtensions } namespace Azure.ResourceManager.EnergyServices.Models { + public static partial class ArmEnergyServicesModelFactory + { + public static Azure.ResourceManager.EnergyServices.Models.DataPartition DataPartition(string name = null, string provisioningState = null) { throw null; } + public static Azure.ResourceManager.EnergyServices.Models.DataPartitionsListResult DataPartitionsListResult(System.Collections.Generic.IEnumerable dataPartitionInfo = null) { throw null; } + public static Azure.ResourceManager.EnergyServices.EnergyServiceData EnergyServiceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.EnergyServices.Models.EnergyServiceProperties properties = null) { throw null; } + public static Azure.ResourceManager.EnergyServices.Models.EnergyServiceNameAvailabilityResult EnergyServiceNameAvailabilityResult(bool? nameAvailable = default(bool?), Azure.ResourceManager.EnergyServices.Models.EnergyServiceNameUnavailableReason? reason = default(Azure.ResourceManager.EnergyServices.Models.EnergyServiceNameUnavailableReason?), string message = null) { throw null; } + public static Azure.ResourceManager.EnergyServices.Models.EnergyServiceProperties EnergyServiceProperties(string dnsName = null, Azure.ResourceManager.EnergyServices.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.EnergyServices.Models.ProvisioningState?), string authAppId = null, System.Collections.Generic.IEnumerable dataPartitionNames = null) { throw null; } + } public partial class DataPartition { internal DataPartition() { } diff --git a/sdk/openenergyplatform/Azure.ResourceManager.EnergyServices/src/Generated/ArmEnergyServicesModelFactory.cs b/sdk/openenergyplatform/Azure.ResourceManager.EnergyServices/src/Generated/ArmEnergyServicesModelFactory.cs new file mode 100644 index 000000000000..71fee5e21754 --- /dev/null +++ b/sdk/openenergyplatform/Azure.ResourceManager.EnergyServices/src/Generated/ArmEnergyServicesModelFactory.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.Linq; +using Azure.Core; +using Azure.ResourceManager.EnergyServices; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.EnergyServices.Models +{ + /// Model factory for models. + public static partial class ArmEnergyServicesModelFactory + { + /// Initializes a new instance of EnergyServiceNameAvailabilityResult. + /// Indicates if the resource name is available. + /// The reason why the given name is not available. + /// Detailed reason why the given name is available. + /// A new instance for mocking. + public static EnergyServiceNameAvailabilityResult EnergyServiceNameAvailabilityResult(bool? nameAvailable = null, EnergyServiceNameUnavailableReason? reason = null, string message = null) + { + return new EnergyServiceNameAvailabilityResult(nameAvailable, reason, message); + } + + /// Initializes a new instance of EnergyServiceData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// + /// A new instance for mocking. + public static EnergyServiceData EnergyServiceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, EnergyServiceProperties properties = null) + { + tags ??= new Dictionary(); + + return new EnergyServiceData(id, name, resourceType, systemData, tags, location, properties); + } + + /// Initializes a new instance of EnergyServiceProperties. + /// + /// + /// + /// + /// A new instance for mocking. + public static EnergyServiceProperties EnergyServiceProperties(string dnsName = null, ProvisioningState? provisioningState = null, string authAppId = null, IEnumerable dataPartitionNames = null) + { + dataPartitionNames ??= new List(); + + return new EnergyServiceProperties(dnsName, provisioningState, authAppId, dataPartitionNames?.ToList()); + } + + /// Initializes a new instance of DataPartitionsListResult. + /// List of data partitions along with their properties in a given OEP resource. + /// A new instance for mocking. + public static DataPartitionsListResult DataPartitionsListResult(IEnumerable dataPartitionInfo = null) + { + dataPartitionInfo ??= new List(); + + return new DataPartitionsListResult(dataPartitionInfo?.ToList()); + } + + /// Initializes a new instance of DataPartition. + /// Name of the data partition. + /// Name of the data partition. + /// A new instance for mocking. + public static DataPartition DataPartition(string name = null, string provisioningState = null) + { + return new DataPartition(name, provisioningState); + } + } +} diff --git a/sdk/openenergyplatform/Azure.ResourceManager.EnergyServices/src/autorest.md b/sdk/openenergyplatform/Azure.ResourceManager.EnergyServices/src/autorest.md index 4b198a5f901b..07e44a305a86 100644 --- a/sdk/openenergyplatform/Azure.ResourceManager.EnergyServices/src/autorest.md +++ b/sdk/openenergyplatform/Azure.ResourceManager.EnergyServices/src/autorest.md @@ -5,7 +5,6 @@ Run `dotnet build /t:GenerateCode` to generate code. ``` yaml azure-arm: true -generate-model-factory: false csharp: true library-name: EnergyServices namespace: Azure.ResourceManager.EnergyServices diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/CHANGELOG.md b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/CHANGELOG.md index a0f28ffbe578..d0f2b036dd4b 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/CHANGELOG.md +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/CHANGELOG.md @@ -1,15 +1,16 @@ # Release History -## 1.2.0-beta.1 (Unreleased) +## 1.2.0-beta.1 (2023-05-31) ### Features Added -### Breaking Changes - -### Bugs Fixed +- Enable the model factory feature for model mocking, more information can be found [here](https://azure.github.io/azure-sdk/dotnet_introduction.html#dotnet-mocking-factory-builder). ### Other Changes +- Upgraded dependent Azure.Core to 1.32.0. +- Upgraded dependent Azure.ResourceManager to 1.6.0. + ## 1.1.0 (2023-02-13) ### Bugs Fixed diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/api/Azure.ResourceManager.OperationalInsights.netstandard2.0.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/api/Azure.ResourceManager.OperationalInsights.netstandard2.0.cs index 8ed49b169e62..ce1cc79744c1 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/api/Azure.ResourceManager.OperationalInsights.netstandard2.0.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/api/Azure.ResourceManager.OperationalInsights.netstandard2.0.cs @@ -573,6 +573,41 @@ protected StorageInsightResource() { } } namespace Azure.ResourceManager.OperationalInsights.Models { + public static partial class ArmOperationalInsightsModelFactory + { + public static Azure.ResourceManager.OperationalInsights.LogAnalyticsQueryData LogAnalyticsQueryData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Guid? applicationId = default(System.Guid?), string displayName = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? modifiedOn = default(System.DateTimeOffset?), string author = null, string description = null, string body = null, Azure.ResourceManager.OperationalInsights.Models.LogAnalyticsQueryRelatedMetadata related = null, System.Collections.Generic.IDictionary> tags = null, System.BinaryData properties = null) { throw null; } + public static Azure.ResourceManager.OperationalInsights.LogAnalyticsQueryPackData LogAnalyticsQueryPackData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), System.Guid? queryPackId = default(System.Guid?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? modifiedOn = default(System.DateTimeOffset?), string provisioningState = null) { throw null; } + public static Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsAvailableServiceTier OperationalInsightsAvailableServiceTier(Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsSkuName? serviceTier = default(Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsSkuName?), bool? isEnabled = default(bool?), long? minimumRetention = default(long?), long? maximumRetention = default(long?), long? defaultRetention = default(long?), long? capacityReservationLevel = default(long?), System.DateTimeOffset? lastSkuUpdatedOn = default(System.DateTimeOffset?)) { throw null; } + public static Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsCapacityReservationProperties OperationalInsightsCapacityReservationProperties(System.DateTimeOffset? lastSkuUpdatedOn = default(System.DateTimeOffset?), long? minCapacity = default(long?)) { throw null; } + public static Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsClusterAssociatedWorkspace OperationalInsightsClusterAssociatedWorkspace(System.Guid? workspaceId = default(System.Guid?), string workspaceName = null, Azure.Core.ResourceIdentifier resourceId = null, System.DateTimeOffset? associatedOn = default(System.DateTimeOffset?)) { throw null; } + public static Azure.ResourceManager.OperationalInsights.OperationalInsightsClusterData OperationalInsightsClusterData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsClusterSku sku = null, System.Guid? clusterId = default(System.Guid?), Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsClusterEntityStatus? provisioningState = default(Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsClusterEntityStatus?), bool? isDoubleEncryptionEnabled = default(bool?), bool? isAvailabilityZonesEnabled = default(bool?), Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsBillingType? billingType = default(Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsBillingType?), Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsKeyVaultProperties keyVaultProperties = null, System.DateTimeOffset? lastModifiedOn = default(System.DateTimeOffset?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable associatedWorkspaces = null, Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsCapacityReservationProperties capacityReservationProperties = null) { throw null; } + public static Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsColumn OperationalInsightsColumn(string name = null, Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsColumnType? columnType = default(Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsColumnType?), Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsColumnDataTypeHint? dataTypeHint = default(Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsColumnDataTypeHint?), string displayName = null, string description = null, bool? isDefaultDisplay = default(bool?), bool? isHidden = default(bool?)) { throw null; } + public static Azure.ResourceManager.OperationalInsights.OperationalInsightsDataExportData OperationalInsightsDataExportData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Guid? dataExportId = default(System.Guid?), System.Collections.Generic.IEnumerable tableNames = null, bool? isEnabled = default(bool?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? lastModifiedOn = default(System.DateTimeOffset?), Azure.Core.ResourceIdentifier resourceId = null, Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsDataExportDestinationType? destinationType = default(Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsDataExportDestinationType?), string eventHubName = null) { throw null; } + public static Azure.ResourceManager.OperationalInsights.OperationalInsightsDataSourceData OperationalInsightsDataSourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.BinaryData properties = null, Azure.ETag? etag = default(Azure.ETag?), Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsDataSourceKind kind = default(Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsDataSourceKind), System.Collections.Generic.IDictionary tags = null) { throw null; } + public static Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsIntelligencePack OperationalInsightsIntelligencePack(string name = null, bool? isEnabled = default(bool?), string displayName = null) { throw null; } + public static Azure.ResourceManager.OperationalInsights.OperationalInsightsLinkedServiceData OperationalInsightsLinkedServiceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.ResourceIdentifier resourceId = null, Azure.Core.ResourceIdentifier writeAccessResourceId = null, Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsLinkedServiceEntityStatus? provisioningState = default(Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsLinkedServiceEntityStatus?)) { throw null; } + public static Azure.ResourceManager.OperationalInsights.OperationalInsightsLinkedStorageAccountsData OperationalInsightsLinkedStorageAccountsData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsDataSourceType? dataSourceType = default(Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsDataSourceType?), System.Collections.Generic.IEnumerable storageAccountIds = null) { throw null; } + public static Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsManagementGroup OperationalInsightsManagementGroup(int? serverCount = default(int?), bool? isGateway = default(bool?), string name = null, string id = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? dataReceivedOn = default(System.DateTimeOffset?), string version = null, string sku = null) { throw null; } + public static Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsMetricName OperationalInsightsMetricName(string value = null, string localizedValue = null) { throw null; } + public static Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsPrivateLinkScopedResourceInfo OperationalInsightsPrivateLinkScopedResourceInfo(Azure.Core.ResourceIdentifier resourceId = null, string scopeId = null) { throw null; } + public static Azure.ResourceManager.OperationalInsights.OperationalInsightsSavedSearchData OperationalInsightsSavedSearchData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ETag? etag = default(Azure.ETag?), string category = null, string displayName = null, string query = null, string functionAlias = null, string functionParameters = null, long? version = default(long?), System.Collections.Generic.IEnumerable tags = null) { throw null; } + public static Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsSchema OperationalInsightsSchema(string name = null, string displayName = null, string description = null, System.Collections.Generic.IEnumerable columns = null, System.Collections.Generic.IEnumerable standardColumns = null, System.Collections.Generic.IEnumerable categories = null, System.Collections.Generic.IEnumerable labels = null, Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsTableCreator? source = default(Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsTableCreator?), Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsTableType? tableType = default(Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsTableType?), Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsTableSubType? tableSubType = default(Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsTableSubType?), System.Collections.Generic.IEnumerable solutions = null) { throw null; } + public static Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsSearchSchemaValue OperationalInsightsSearchSchemaValue(string name = null, string displayName = null, string searchSchemaValueType = null, bool indexed = false, bool stored = false, bool facet = false, System.Collections.Generic.IEnumerable ownerType = null) { throw null; } + public static Azure.ResourceManager.OperationalInsights.OperationalInsightsTableData OperationalInsightsTableData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, int? retentionInDays = default(int?), int? totalRetentionInDays = default(int?), int? archiveRetentionInDays = default(int?), Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsTableSearchResults searchResults = null, Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsTableRestoredLogs restoredLogs = null, Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsTableResultStatistics resultStatistics = null, Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsTablePlan? plan = default(Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsTablePlan?), string lastPlanModifiedDate = null, Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsSchema schema = null, Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsTableProvisioningState? provisioningState = default(Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsTableProvisioningState?), Azure.ResourceManager.OperationalInsights.Models.RetentionInDaysAsDefaultState? retentionInDaysAsDefault = default(Azure.ResourceManager.OperationalInsights.Models.RetentionInDaysAsDefaultState?), Azure.ResourceManager.OperationalInsights.Models.TotalRetentionInDaysAsDefaultState? totalRetentionInDaysAsDefault = default(Azure.ResourceManager.OperationalInsights.Models.TotalRetentionInDaysAsDefaultState?)) { throw null; } + public static Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsTableRestoredLogs OperationalInsightsTableRestoredLogs(System.DateTimeOffset? startRestoreOn = default(System.DateTimeOffset?), System.DateTimeOffset? endRestoreOn = default(System.DateTimeOffset?), string sourceTable = null, System.Guid? azureAsyncOperationId = default(System.Guid?)) { throw null; } + public static Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsTableResultStatistics OperationalInsightsTableResultStatistics(float? progress = default(float?), int? ingestedRecords = default(int?), float? scannedGB = default(float?)) { throw null; } + public static Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsTableSearchResults OperationalInsightsTableSearchResults(string query = null, string description = null, int? limit = default(int?), System.DateTimeOffset? startSearchOn = default(System.DateTimeOffset?), System.DateTimeOffset? endSearchOn = default(System.DateTimeOffset?), string sourceTable = null, System.Guid? azureAsyncOperationId = default(System.Guid?)) { throw null; } + public static Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsUsageMetric OperationalInsightsUsageMetric(Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsMetricName name = null, string unit = null, double? currentValue = default(double?), double? limit = default(double?), System.DateTimeOffset? nextResetOn = default(System.DateTimeOffset?), string quotaPeriod = null) { throw null; } + public static Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsWorkspaceCapping OperationalInsightsWorkspaceCapping(double? dailyQuotaInGB = default(double?), string quotaNextResetTime = null, Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsDataIngestionStatus? dataIngestionStatus = default(Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsDataIngestionStatus?)) { throw null; } + public static Azure.ResourceManager.OperationalInsights.OperationalInsightsWorkspaceData OperationalInsightsWorkspaceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ETag? etag = default(Azure.ETag?), Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsWorkspaceEntityStatus? provisioningState = default(Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsWorkspaceEntityStatus?), System.Guid? customerId = default(System.Guid?), Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsWorkspaceSku sku = null, int? retentionInDays = default(int?), Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsWorkspaceCapping workspaceCapping = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? modifiedOn = default(System.DateTimeOffset?), Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsPublicNetworkAccessType? publicNetworkAccessForIngestion = default(Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsPublicNetworkAccessType?), Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsPublicNetworkAccessType? publicNetworkAccessForQuery = default(Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsPublicNetworkAccessType?), bool? forceCmkForQuery = default(bool?), System.Collections.Generic.IEnumerable privateLinkScopedResources = null, Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsWorkspaceFeatures features = null, Azure.Core.ResourceIdentifier defaultDataCollectionRuleResourceId = null) { throw null; } + public static Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsWorkspacePatch OperationalInsightsWorkspacePatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsWorkspaceEntityStatus? provisioningState = default(Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsWorkspaceEntityStatus?), System.Guid? customerId = default(System.Guid?), Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsWorkspaceSku sku = null, int? retentionInDays = default(int?), Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsWorkspaceCapping workspaceCapping = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? modifiedOn = default(System.DateTimeOffset?), Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsPublicNetworkAccessType? publicNetworkAccessForIngestion = default(Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsPublicNetworkAccessType?), Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsPublicNetworkAccessType? publicNetworkAccessForQuery = default(Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsPublicNetworkAccessType?), bool? forceCmkForQuery = default(bool?), System.Collections.Generic.IEnumerable privateLinkScopedResources = null, Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsWorkspaceFeatures features = null, Azure.Core.ResourceIdentifier defaultDataCollectionRuleResourceId = null, Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsWorkspacePurgeResult OperationalInsightsWorkspacePurgeResult(System.Guid operationId = default(System.Guid)) { throw null; } + public static Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsWorkspacePurgeStatusResult OperationalInsightsWorkspacePurgeStatusResult(Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsWorkspacePurgeState status = default(Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsWorkspacePurgeState)) { throw null; } + public static Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsWorkspaceSharedKeys OperationalInsightsWorkspaceSharedKeys(string primarySharedKey = null, string secondarySharedKey = null) { throw null; } + public static Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsWorkspaceSku OperationalInsightsWorkspaceSku(Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsWorkspaceSkuName name = default(Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsWorkspaceSkuName), Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsWorkspaceCapacityReservationLevel? capacityReservationLevel = default(Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsWorkspaceCapacityReservationLevel?), System.DateTimeOffset? lastSkuUpdatedOn = default(System.DateTimeOffset?)) { throw null; } + public static Azure.ResourceManager.OperationalInsights.StorageInsightData StorageInsightData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ETag? etag = default(Azure.ETag?), System.Collections.Generic.IDictionary tags = null, System.Collections.Generic.IEnumerable containers = null, System.Collections.Generic.IEnumerable tables = null, Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsStorageAccount storageAccount = null, Azure.ResourceManager.OperationalInsights.Models.StorageInsightStatus status = null) { throw null; } + public static Azure.ResourceManager.OperationalInsights.Models.StorageInsightStatus StorageInsightStatus(Azure.ResourceManager.OperationalInsights.Models.StorageInsightState state = default(Azure.ResourceManager.OperationalInsights.Models.StorageInsightState), string description = null) { throw null; } + } public partial class LogAnalyticsQueryPackPatch { public LogAnalyticsQueryPackPatch() { } diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/ArmOperationalInsightsModelFactory.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/ArmOperationalInsightsModelFactory.cs new file mode 100644 index 000000000000..721c378f4468 --- /dev/null +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/ArmOperationalInsightsModelFactory.cs @@ -0,0 +1,520 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.OperationalInsights; + +namespace Azure.ResourceManager.OperationalInsights.Models +{ + /// Model factory for models. + public static partial class ArmOperationalInsightsModelFactory + { + /// Initializes a new instance of LogAnalyticsQueryPackData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The unique ID of your application. This field cannot be changed. + /// Creation Date for the Log Analytics QueryPack, in ISO 8601 format. + /// Last modified date of the Log Analytics QueryPack, in ISO 8601 format. + /// Current state of this QueryPack: whether or not is has been provisioned within the resource group it is defined. Users cannot change this value but are able to read from it. Values will include Succeeded, Deploying, Canceled, and Failed. + /// A new instance for mocking. + public static LogAnalyticsQueryPackData LogAnalyticsQueryPackData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, Guid? queryPackId = null, DateTimeOffset? createdOn = null, DateTimeOffset? modifiedOn = null, string provisioningState = null) + { + tags ??= new Dictionary(); + + return new LogAnalyticsQueryPackData(id, name, resourceType, systemData, tags, location, queryPackId, createdOn, modifiedOn, provisioningState); + } + + /// Initializes a new instance of LogAnalyticsQueryData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The unique ID of your application. This field cannot be changed. + /// Unique display name for your query within the Query Pack. + /// Creation Date for the Log Analytics Query, in ISO 8601 format. + /// Last modified date of the Log Analytics Query, in ISO 8601 format. + /// Object Id of user creating the query. + /// Description of the query. + /// Body of the query. + /// The related metadata items for the function. + /// Tags associated with the query. + /// Additional properties that can be set for the query. + /// A new instance for mocking. + public static LogAnalyticsQueryData LogAnalyticsQueryData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, Guid? applicationId = null, string displayName = null, DateTimeOffset? createdOn = null, DateTimeOffset? modifiedOn = null, string author = null, string description = null, string body = null, LogAnalyticsQueryRelatedMetadata related = null, IDictionary> tags = null, BinaryData properties = null) + { + tags ??= new Dictionary>(); + + return new LogAnalyticsQueryData(id, name, resourceType, systemData, applicationId, displayName, createdOn, modifiedOn, author, description, body, related, tags, properties); + } + + /// Initializes a new instance of OperationalInsightsDataExportData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The data export rule ID. + /// An array of tables to export, for example: [“Heartbeat, SecurityEvent”]. + /// Active when enabled. + /// The latest data export rule modification time. + /// Date and time when the export was last modified. + /// The destination resource ID. This can be copied from the Properties entry of the destination resource in Azure. + /// The type of the destination resource. + /// Optional. Allows to define an Event Hub name. Not applicable when destination is Storage Account. + /// A new instance for mocking. + public static OperationalInsightsDataExportData OperationalInsightsDataExportData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, Guid? dataExportId = null, IEnumerable tableNames = null, bool? isEnabled = null, DateTimeOffset? createdOn = null, DateTimeOffset? lastModifiedOn = null, ResourceIdentifier resourceId = null, OperationalInsightsDataExportDestinationType? destinationType = null, string eventHubName = null) + { + tableNames ??= new List(); + + return new OperationalInsightsDataExportData(id, name, resourceType, systemData, dataExportId, tableNames?.ToList(), isEnabled, createdOn, lastModifiedOn, resourceId, destinationType, eventHubName); + } + + /// Initializes a new instance of OperationalInsightsDataSourceData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The data source properties in raw json format, each kind of data source have it's own schema. + /// The ETag of the data source. + /// The kind of the DataSource. + /// Resource tags. + /// A new instance for mocking. + public static OperationalInsightsDataSourceData OperationalInsightsDataSourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, BinaryData properties = null, ETag? etag = null, OperationalInsightsDataSourceKind kind = default, IDictionary tags = null) + { + tags ??= new Dictionary(); + + return new OperationalInsightsDataSourceData(id, name, resourceType, systemData, properties, etag, kind, tags); + } + + /// Initializes a new instance of OperationalInsightsIntelligencePack. + /// The name of the intelligence pack. + /// The enabled boolean for the intelligence pack. + /// The display name of the intelligence pack. + /// A new instance for mocking. + public static OperationalInsightsIntelligencePack OperationalInsightsIntelligencePack(string name = null, bool? isEnabled = null, string displayName = null) + { + return new OperationalInsightsIntelligencePack(name, isEnabled, displayName); + } + + /// Initializes a new instance of OperationalInsightsLinkedServiceData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Resource tags. + /// The resource id of the resource that will be linked to the workspace. This should be used for linking resources which require read access. + /// The resource id of the resource that will be linked to the workspace. This should be used for linking resources which require write access. + /// The provisioning state of the linked service. + /// A new instance for mocking. + public static OperationalInsightsLinkedServiceData OperationalInsightsLinkedServiceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, ResourceIdentifier resourceId = null, ResourceIdentifier writeAccessResourceId = null, OperationalInsightsLinkedServiceEntityStatus? provisioningState = null) + { + tags ??= new Dictionary(); + + return new OperationalInsightsLinkedServiceData(id, name, resourceType, systemData, tags, resourceId, writeAccessResourceId, provisioningState); + } + + /// Initializes a new instance of OperationalInsightsLinkedStorageAccountsData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Linked storage accounts type. + /// Linked storage accounts resources ids. + /// A new instance for mocking. + public static OperationalInsightsLinkedStorageAccountsData OperationalInsightsLinkedStorageAccountsData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, OperationalInsightsDataSourceType? dataSourceType = null, IEnumerable storageAccountIds = null) + { + storageAccountIds ??= new List(); + + return new OperationalInsightsLinkedStorageAccountsData(id, name, resourceType, systemData, dataSourceType, storageAccountIds?.ToList()); + } + + /// Initializes a new instance of OperationalInsightsManagementGroup. + /// The number of servers connected to the management group. + /// Gets or sets a value indicating whether the management group is a gateway. + /// The name of the management group. + /// The unique ID of the management group. + /// The datetime that the management group was created. + /// The last datetime that the management group received data. + /// The version of System Center that is managing the management group. + /// The SKU of System Center that is managing the management group. + /// A new instance for mocking. + public static OperationalInsightsManagementGroup OperationalInsightsManagementGroup(int? serverCount = null, bool? isGateway = null, string name = null, string id = null, DateTimeOffset? createdOn = null, DateTimeOffset? dataReceivedOn = null, string version = null, string sku = null) + { + return new OperationalInsightsManagementGroup(serverCount, isGateway, name, id, createdOn, dataReceivedOn, version, sku); + } + + /// Initializes a new instance of OperationalInsightsWorkspaceSharedKeys. + /// The primary shared key of a workspace. + /// The secondary shared key of a workspace. + /// A new instance for mocking. + public static OperationalInsightsWorkspaceSharedKeys OperationalInsightsWorkspaceSharedKeys(string primarySharedKey = null, string secondarySharedKey = null) + { + return new OperationalInsightsWorkspaceSharedKeys(primarySharedKey, secondarySharedKey); + } + + /// Initializes a new instance of OperationalInsightsUsageMetric. + /// The name of the metric. + /// The units used for the metric. + /// The current value of the metric. + /// The quota limit for the metric. + /// The time that the metric's value will reset. + /// The quota period that determines the length of time between value resets. + /// A new instance for mocking. + public static OperationalInsightsUsageMetric OperationalInsightsUsageMetric(OperationalInsightsMetricName name = null, string unit = null, double? currentValue = null, double? limit = null, DateTimeOffset? nextResetOn = null, string quotaPeriod = null) + { + return new OperationalInsightsUsageMetric(name, unit, currentValue, limit, nextResetOn, quotaPeriod); + } + + /// Initializes a new instance of OperationalInsightsMetricName. + /// The system name of the metric. + /// The localized name of the metric. + /// A new instance for mocking. + public static OperationalInsightsMetricName OperationalInsightsMetricName(string value = null, string localizedValue = null) + { + return new OperationalInsightsMetricName(value, localizedValue); + } + + /// Initializes a new instance of StorageInsightData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The ETag of the storage insight. + /// Resource tags. + /// The names of the blob containers that the workspace should read. + /// The names of the Azure tables that the workspace should read. + /// The storage account connection details. + /// The status of the storage insight. + /// A new instance for mocking. + public static StorageInsightData StorageInsightData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ETag? etag = null, IDictionary tags = null, IEnumerable containers = null, IEnumerable tables = null, OperationalInsightsStorageAccount storageAccount = null, StorageInsightStatus status = null) + { + tags ??= new Dictionary(); + containers ??= new List(); + tables ??= new List(); + + return new StorageInsightData(id, name, resourceType, systemData, etag, tags, containers?.ToList(), tables?.ToList(), storageAccount, status); + } + + /// Initializes a new instance of StorageInsightStatus. + /// The state of the storage insight connection to the workspace. + /// Description of the state of the storage insight. + /// A new instance for mocking. + public static StorageInsightStatus StorageInsightStatus(StorageInsightState state = default, string description = null) + { + return new StorageInsightStatus(state, description); + } + + /// Initializes a new instance of OperationalInsightsSavedSearchData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The ETag of the saved search. To override an existing saved search, use "*" or specify the current Etag. + /// The category of the saved search. This helps the user to find a saved search faster. + /// Saved search display name. + /// The query expression for the saved search. + /// The function alias if query serves as a function. + /// The optional function parameters if query serves as a function. Value should be in the following format: 'param-name1:type1 = default_value1, param-name2:type2 = default_value2'. For more examples and proper syntax please refer to https://docs.microsoft.com/en-us/azure/kusto/query/functions/user-defined-functions. + /// The version number of the query language. The current version is 2 and is the default. + /// The tags attached to the saved search. + /// A new instance for mocking. + public static OperationalInsightsSavedSearchData OperationalInsightsSavedSearchData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ETag? etag = null, string category = null, string displayName = null, string query = null, string functionAlias = null, string functionParameters = null, long? version = null, IEnumerable tags = null) + { + tags ??= new List(); + + return new OperationalInsightsSavedSearchData(id, name, resourceType, systemData, etag, category, displayName, query, functionAlias, functionParameters, version, tags?.ToList()); + } + + /// Initializes a new instance of OperationalInsightsAvailableServiceTier. + /// The name of the Service Tier. + /// True if the Service Tier is enabled for the workspace. + /// The minimum retention for the Service Tier, in days. + /// The maximum retention for the Service Tier, in days. + /// The default retention for the Service Tier, in days. + /// The capacity reservation level in GB per day. Returned for the Capacity Reservation Service Tier. + /// Time when the sku was last updated for the workspace. Returned for the Capacity Reservation Service Tier. + /// A new instance for mocking. + public static OperationalInsightsAvailableServiceTier OperationalInsightsAvailableServiceTier(OperationalInsightsSkuName? serviceTier = null, bool? isEnabled = null, long? minimumRetention = null, long? maximumRetention = null, long? defaultRetention = null, long? capacityReservationLevel = null, DateTimeOffset? lastSkuUpdatedOn = null) + { + return new OperationalInsightsAvailableServiceTier(serviceTier, isEnabled, minimumRetention, maximumRetention, defaultRetention, capacityReservationLevel, lastSkuUpdatedOn); + } + + /// Initializes a new instance of OperationalInsightsSearchSchemaValue. + /// The name of the schema. + /// The display name of the schema. + /// The type. + /// The boolean that indicates the field is searchable as free text. + /// The boolean that indicates whether or not the field is stored. + /// The boolean that indicates whether or not the field is a facet. + /// The array of workflows containing the field. + /// A new instance for mocking. + public static OperationalInsightsSearchSchemaValue OperationalInsightsSearchSchemaValue(string name = null, string displayName = null, string searchSchemaValueType = null, bool indexed = default, bool stored = default, bool facet = default, IEnumerable ownerType = null) + { + ownerType ??= new List(); + + return new OperationalInsightsSearchSchemaValue(name, displayName, searchSchemaValueType, indexed, stored, facet, ownerType?.ToList()); + } + + /// Initializes a new instance of OperationalInsightsWorkspacePurgeResult. + /// Id to use when querying for status for a particular purge operation. + /// A new instance for mocking. + public static OperationalInsightsWorkspacePurgeResult OperationalInsightsWorkspacePurgeResult(Guid operationId = default) + { + return new OperationalInsightsWorkspacePurgeResult(operationId); + } + + /// Initializes a new instance of OperationalInsightsWorkspacePurgeStatusResult. + /// Status of the operation represented by the requested Id. + /// A new instance for mocking. + public static OperationalInsightsWorkspacePurgeStatusResult OperationalInsightsWorkspacePurgeStatusResult(OperationalInsightsWorkspacePurgeState status = default) + { + return new OperationalInsightsWorkspacePurgeStatusResult(status); + } + + /// Initializes a new instance of OperationalInsightsClusterData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The identity of the resource. Current supported identity types: None, SystemAssigned, UserAssigned. + /// The sku properties. + /// The ID associated with the cluster. + /// The provisioning state of the cluster. + /// Configures whether cluster will use double encryption. This Property can not be modified after cluster creation. Default value is 'true'. + /// Sets whether the cluster will support availability zones. This can be set as true only in regions where Azure Data Explorer support Availability Zones. This Property can not be modified after cluster creation. Default value is 'true' if region supports Availability Zones. + /// The cluster's billing type. + /// The associated key properties. + /// The last time the cluster was updated. + /// The cluster creation time. + /// The list of Log Analytics workspaces associated with the cluster. + /// Additional properties for capacity reservation. + /// A new instance for mocking. + public static OperationalInsightsClusterData OperationalInsightsClusterData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, OperationalInsightsClusterSku sku = null, Guid? clusterId = null, OperationalInsightsClusterEntityStatus? provisioningState = null, bool? isDoubleEncryptionEnabled = null, bool? isAvailabilityZonesEnabled = null, OperationalInsightsBillingType? billingType = null, OperationalInsightsKeyVaultProperties keyVaultProperties = null, DateTimeOffset? lastModifiedOn = null, DateTimeOffset? createdOn = null, IEnumerable associatedWorkspaces = null, OperationalInsightsCapacityReservationProperties capacityReservationProperties = null) + { + tags ??= new Dictionary(); + associatedWorkspaces ??= new List(); + + return new OperationalInsightsClusterData(id, name, resourceType, systemData, tags, location, identity, sku, clusterId, provisioningState, isDoubleEncryptionEnabled, isAvailabilityZonesEnabled, billingType, keyVaultProperties, lastModifiedOn, createdOn, associatedWorkspaces?.ToList(), capacityReservationProperties); + } + + /// Initializes a new instance of OperationalInsightsClusterAssociatedWorkspace. + /// The id of the assigned workspace. + /// The name id the assigned workspace. + /// The ResourceId id the assigned workspace. + /// The time of workspace association. + /// A new instance for mocking. + public static OperationalInsightsClusterAssociatedWorkspace OperationalInsightsClusterAssociatedWorkspace(Guid? workspaceId = null, string workspaceName = null, ResourceIdentifier resourceId = null, DateTimeOffset? associatedOn = null) + { + return new OperationalInsightsClusterAssociatedWorkspace(workspaceId, workspaceName, resourceId, associatedOn); + } + + /// Initializes a new instance of OperationalInsightsCapacityReservationProperties. + /// The last time Sku was updated. + /// Minimum CapacityReservation value in GB. + /// A new instance for mocking. + public static OperationalInsightsCapacityReservationProperties OperationalInsightsCapacityReservationProperties(DateTimeOffset? lastSkuUpdatedOn = null, long? minCapacity = null) + { + return new OperationalInsightsCapacityReservationProperties(lastSkuUpdatedOn, minCapacity); + } + + /// Initializes a new instance of OperationalInsightsWorkspaceData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The identity of the resource. Current supported identity types: None, SystemAssigned, UserAssigned. + /// The etag of the workspace. + /// The provisioning state of the workspace. + /// This is a read-only property. Represents the ID associated with the workspace. + /// The SKU of the workspace. + /// The workspace data retention in days. Allowed values are per pricing plan. See pricing tiers documentation for details. + /// The daily volume cap for ingestion. + /// Workspace creation date. + /// Workspace modification date. + /// The network access type for accessing Log Analytics ingestion. + /// The network access type for accessing Log Analytics query. + /// Indicates whether customer managed storage is mandatory for query management. + /// List of linked private link scope resources. + /// Workspace features. + /// The resource ID of the default Data Collection Rule to use for this workspace. Expected format is - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules/{dcrName}. + /// A new instance for mocking. + public static OperationalInsightsWorkspaceData OperationalInsightsWorkspaceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, ETag? etag = null, OperationalInsightsWorkspaceEntityStatus? provisioningState = null, Guid? customerId = null, OperationalInsightsWorkspaceSku sku = null, int? retentionInDays = null, OperationalInsightsWorkspaceCapping workspaceCapping = null, DateTimeOffset? createdOn = null, DateTimeOffset? modifiedOn = null, OperationalInsightsPublicNetworkAccessType? publicNetworkAccessForIngestion = null, OperationalInsightsPublicNetworkAccessType? publicNetworkAccessForQuery = null, bool? forceCmkForQuery = null, IEnumerable privateLinkScopedResources = null, OperationalInsightsWorkspaceFeatures features = null, ResourceIdentifier defaultDataCollectionRuleResourceId = null) + { + tags ??= new Dictionary(); + privateLinkScopedResources ??= new List(); + + return new OperationalInsightsWorkspaceData(id, name, resourceType, systemData, tags, location, identity, etag, provisioningState, customerId, sku, retentionInDays, workspaceCapping, createdOn, modifiedOn, publicNetworkAccessForIngestion, publicNetworkAccessForQuery, forceCmkForQuery, privateLinkScopedResources?.ToList(), features, defaultDataCollectionRuleResourceId); + } + + /// Initializes a new instance of OperationalInsightsWorkspaceSku. + /// The name of the SKU. + /// The capacity reservation level in GB for this workspace, when CapacityReservation sku is selected. + /// The last time when the sku was updated. + /// A new instance for mocking. + public static OperationalInsightsWorkspaceSku OperationalInsightsWorkspaceSku(OperationalInsightsWorkspaceSkuName name = default, OperationalInsightsWorkspaceCapacityReservationLevel? capacityReservationLevel = null, DateTimeOffset? lastSkuUpdatedOn = null) + { + return new OperationalInsightsWorkspaceSku(name, capacityReservationLevel, lastSkuUpdatedOn); + } + + /// Initializes a new instance of OperationalInsightsWorkspaceCapping. + /// The workspace daily quota for ingestion. + /// The time when the quota will be rest. + /// The status of data ingestion for this workspace. + /// A new instance for mocking. + public static OperationalInsightsWorkspaceCapping OperationalInsightsWorkspaceCapping(double? dailyQuotaInGB = null, string quotaNextResetTime = null, OperationalInsightsDataIngestionStatus? dataIngestionStatus = null) + { + return new OperationalInsightsWorkspaceCapping(dailyQuotaInGB, quotaNextResetTime, dataIngestionStatus); + } + + /// Initializes a new instance of OperationalInsightsPrivateLinkScopedResourceInfo. + /// The full resource Id of the private link scope resource. + /// The private link scope unique Identifier. + /// A new instance for mocking. + public static OperationalInsightsPrivateLinkScopedResourceInfo OperationalInsightsPrivateLinkScopedResourceInfo(ResourceIdentifier resourceId = null, string scopeId = null) + { + return new OperationalInsightsPrivateLinkScopedResourceInfo(resourceId, scopeId); + } + + /// Initializes a new instance of OperationalInsightsWorkspacePatch. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The identity of the resource. Current supported identity types: None, SystemAssigned, UserAssigned. + /// Resource tags. Optional. + /// The provisioning state of the workspace. + /// This is a read-only property. Represents the ID associated with the workspace. + /// The SKU of the workspace. + /// The workspace data retention in days. Allowed values are per pricing plan. See pricing tiers documentation for details. + /// The daily volume cap for ingestion. + /// Workspace creation date. + /// Workspace modification date. + /// The network access type for accessing Log Analytics ingestion. + /// The network access type for accessing Log Analytics query. + /// Indicates whether customer managed storage is mandatory for query management. + /// List of linked private link scope resources. + /// Workspace features. + /// The resource ID of the default Data Collection Rule to use for this workspace. Expected format is - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules/{dcrName}. + /// Resource Etag. + /// A new instance for mocking. + public static OperationalInsightsWorkspacePatch OperationalInsightsWorkspacePatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ManagedServiceIdentity identity = null, IDictionary tags = null, OperationalInsightsWorkspaceEntityStatus? provisioningState = null, Guid? customerId = null, OperationalInsightsWorkspaceSku sku = null, int? retentionInDays = null, OperationalInsightsWorkspaceCapping workspaceCapping = null, DateTimeOffset? createdOn = null, DateTimeOffset? modifiedOn = null, OperationalInsightsPublicNetworkAccessType? publicNetworkAccessForIngestion = null, OperationalInsightsPublicNetworkAccessType? publicNetworkAccessForQuery = null, bool? forceCmkForQuery = null, IEnumerable privateLinkScopedResources = null, OperationalInsightsWorkspaceFeatures features = null, ResourceIdentifier defaultDataCollectionRuleResourceId = null, ETag? etag = null) + { + tags ??= new Dictionary(); + privateLinkScopedResources ??= new List(); + + return new OperationalInsightsWorkspacePatch(id, name, resourceType, systemData, identity, tags, provisioningState, customerId, sku, retentionInDays, workspaceCapping, createdOn, modifiedOn, publicNetworkAccessForIngestion, publicNetworkAccessForQuery, forceCmkForQuery, privateLinkScopedResources?.ToList(), features, defaultDataCollectionRuleResourceId, etag); + } + + /// Initializes a new instance of OperationalInsightsTableData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The table retention in days, between 4 and 730. Setting this property to -1 will default to the workspace retention. + /// The table total retention in days, between 4 and 2555. Setting this property to -1 will default to table retention. + /// The table data archive retention in days. Calculated as (totalRetentionInDays-retentionInDays). + /// Parameters of the search job that initiated this table. + /// Parameters of the restore operation that initiated this table. + /// Search job execution statistics. + /// Instruct the system how to handle and charge the logs ingested to this table. + /// The timestamp that table plan was last modified (UTC). + /// Table schema. + /// Table's current provisioning state. If set to 'updating', indicates a resource lock due to ongoing operation, forbidding any update to the table until the ongoing operation is concluded. + /// True - Value originates from workspace retention in days, False - Customer specific. + /// True - Value originates from retention in days, False - Customer specific. + /// A new instance for mocking. + public static OperationalInsightsTableData OperationalInsightsTableData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, int? retentionInDays = null, int? totalRetentionInDays = null, int? archiveRetentionInDays = null, OperationalInsightsTableSearchResults searchResults = null, OperationalInsightsTableRestoredLogs restoredLogs = null, OperationalInsightsTableResultStatistics resultStatistics = null, OperationalInsightsTablePlan? plan = null, string lastPlanModifiedDate = null, OperationalInsightsSchema schema = null, OperationalInsightsTableProvisioningState? provisioningState = null, RetentionInDaysAsDefaultState? retentionInDaysAsDefault = null, TotalRetentionInDaysAsDefaultState? totalRetentionInDaysAsDefault = null) + { + return new OperationalInsightsTableData(id, name, resourceType, systemData, retentionInDays, totalRetentionInDays, archiveRetentionInDays, searchResults, restoredLogs, resultStatistics, plan, lastPlanModifiedDate, schema, provisioningState, retentionInDaysAsDefault, totalRetentionInDaysAsDefault); + } + + /// Initializes a new instance of OperationalInsightsTableSearchResults. + /// Search job query. + /// Search job Description. + /// Limit the search job to return up to specified number of rows. + /// The timestamp to start the search from (UTC). + /// The timestamp to end the search by (UTC). + /// The table used in the search job. + /// Search results table async operation id. + /// A new instance for mocking. + public static OperationalInsightsTableSearchResults OperationalInsightsTableSearchResults(string query = null, string description = null, int? limit = null, DateTimeOffset? startSearchOn = null, DateTimeOffset? endSearchOn = null, string sourceTable = null, Guid? azureAsyncOperationId = null) + { + return new OperationalInsightsTableSearchResults(query, description, limit, startSearchOn, endSearchOn, sourceTable, azureAsyncOperationId); + } + + /// Initializes a new instance of OperationalInsightsTableRestoredLogs. + /// The timestamp to start the restore from (UTC). + /// The timestamp to end the restore by (UTC). + /// The table to restore data from. + /// Search results table async operation id. + /// A new instance for mocking. + public static OperationalInsightsTableRestoredLogs OperationalInsightsTableRestoredLogs(DateTimeOffset? startRestoreOn = null, DateTimeOffset? endRestoreOn = null, string sourceTable = null, Guid? azureAsyncOperationId = null) + { + return new OperationalInsightsTableRestoredLogs(startRestoreOn, endRestoreOn, sourceTable, azureAsyncOperationId); + } + + /// Initializes a new instance of OperationalInsightsTableResultStatistics. + /// Search job completion percentage. + /// The number of rows that were returned by the search job. + /// Search job: Amount of scanned data. + /// A new instance for mocking. + public static OperationalInsightsTableResultStatistics OperationalInsightsTableResultStatistics(float? progress = null, int? ingestedRecords = null, float? scannedGB = null) + { + return new OperationalInsightsTableResultStatistics(progress, ingestedRecords, scannedGB); + } + + /// Initializes a new instance of OperationalInsightsSchema. + /// Table name. + /// Table display name. + /// Table description. + /// A list of table custom columns. + /// A list of table standard columns. + /// Table category. + /// Table labels. + /// Table's creator. + /// Table's creator. + /// The subtype describes what APIs can be used to interact with the table, and what features are available against it. + /// List of solutions the table is affiliated with. + /// A new instance for mocking. + public static OperationalInsightsSchema OperationalInsightsSchema(string name = null, string displayName = null, string description = null, IEnumerable columns = null, IEnumerable standardColumns = null, IEnumerable categories = null, IEnumerable labels = null, OperationalInsightsTableCreator? source = null, OperationalInsightsTableType? tableType = null, OperationalInsightsTableSubType? tableSubType = null, IEnumerable solutions = null) + { + columns ??= new List(); + standardColumns ??= new List(); + categories ??= new List(); + labels ??= new List(); + solutions ??= new List(); + + return new OperationalInsightsSchema(name, displayName, description, columns?.ToList(), standardColumns?.ToList(), categories?.ToList(), labels?.ToList(), source, tableType, tableSubType, solutions?.ToList()); + } + + /// Initializes a new instance of OperationalInsightsColumn. + /// Column name. + /// Column data type. + /// Column data type logical hint. + /// Column display name. + /// Column description. + /// Is displayed by default. + /// Is column hidden. + /// A new instance for mocking. + public static OperationalInsightsColumn OperationalInsightsColumn(string name = null, OperationalInsightsColumnType? columnType = null, OperationalInsightsColumnDataTypeHint? dataTypeHint = null, string displayName = null, string description = null, bool? isDefaultDisplay = null, bool? isHidden = null) + { + return new OperationalInsightsColumn(name, columnType, dataTypeHint, displayName, description, isDefaultDisplay, isHidden); + } + } +} diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/autorest.md b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/autorest.md index 762ae32f501c..2cbe7c745139 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/autorest.md +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/autorest.md @@ -4,7 +4,6 @@ Run `dotnet build /t:GenerateCode` to generate code. ``` yaml azure-arm: true -generate-model-factory: false csharp: true library-name: OperationalInsights namespace: Azure.ResourceManager.OperationalInsights diff --git a/sdk/orbital/Azure.ResourceManager.Orbital/CHANGELOG.md b/sdk/orbital/Azure.ResourceManager.Orbital/CHANGELOG.md index e572b090393e..378c71cfe8a8 100644 --- a/sdk/orbital/Azure.ResourceManager.Orbital/CHANGELOG.md +++ b/sdk/orbital/Azure.ResourceManager.Orbital/CHANGELOG.md @@ -1,15 +1,16 @@ # Release History -## 1.1.0-beta.1 (Unreleased) +## 1.1.0-beta.1 (2023-05-31) ### Features Added -### Breaking Changes - -### Bugs Fixed +- Enable the model factory feature for model mocking, more information can be found [here](https://azure.github.io/azure-sdk/dotnet_introduction.html#dotnet-mocking-factory-builder). ### Other Changes +- Upgraded dependent Azure.Core to 1.32.0. +- Upgraded dependent Azure.ResourceManager to 1.6.0. + ## 1.0.1 (2023-02-20) ### Other Changes diff --git a/sdk/orbital/Azure.ResourceManager.Orbital/api/Azure.ResourceManager.Orbital.netstandard2.0.cs b/sdk/orbital/Azure.ResourceManager.Orbital/api/Azure.ResourceManager.Orbital.netstandard2.0.cs index ab29a47fc330..dd7317a57e15 100644 --- a/sdk/orbital/Azure.ResourceManager.Orbital/api/Azure.ResourceManager.Orbital.netstandard2.0.cs +++ b/sdk/orbital/Azure.ResourceManager.Orbital/api/Azure.ResourceManager.Orbital.netstandard2.0.cs @@ -203,6 +203,18 @@ protected OrbitalSpacecraftResource() { } } namespace Azure.ResourceManager.Orbital.Models { + public static partial class ArmOrbitalModelFactory + { + public static Azure.ResourceManager.Orbital.Models.AuthorizedGroundStation AuthorizedGroundStation(string groundStationName = null, System.DateTimeOffset? expireOn = default(System.DateTimeOffset?)) { throw null; } + public static Azure.ResourceManager.Orbital.AvailableGroundStationData AvailableGroundStationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), string city = null, string providerName = null, float? longitudeDegrees = default(float?), float? latitudeDegrees = default(float?), float? altitudeMeters = default(float?), Azure.ResourceManager.Orbital.Models.GroundStationReleaseMode? releaseMode = default(Azure.ResourceManager.Orbital.Models.GroundStationReleaseMode?)) { throw null; } + public static Azure.ResourceManager.Orbital.Models.OrbitalAvailableContact OrbitalAvailableContact(Azure.Core.ResourceIdentifier spacecraftId = null, string groundStationName = null, float? maximumElevationDegrees = default(float?), System.DateTimeOffset? txStartOn = default(System.DateTimeOffset?), System.DateTimeOffset? txEndOn = default(System.DateTimeOffset?), System.DateTimeOffset? rxStartOn = default(System.DateTimeOffset?), System.DateTimeOffset? rxEndOn = default(System.DateTimeOffset?), float? startAzimuthDegrees = default(float?), float? endAzimuthDegrees = default(float?), float? startElevationDegrees = default(float?), float? endElevationDegrees = default(float?)) { throw null; } + public static Azure.ResourceManager.Orbital.Models.OrbitalAvailableContactsResult OrbitalAvailableContactsResult(System.Collections.Generic.IEnumerable values = null) { throw null; } + public static Azure.ResourceManager.Orbital.Models.OrbitalContactAntennaConfiguration OrbitalContactAntennaConfiguration(System.Net.IPAddress destinationIP = null, System.Collections.Generic.IEnumerable sourceIPs = null) { throw null; } + public static Azure.ResourceManager.Orbital.OrbitalContactData OrbitalContactData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ETag? etag = default(Azure.ETag?), Azure.ResourceManager.Orbital.Models.OrbitalProvisioningState? provisioningState = default(Azure.ResourceManager.Orbital.Models.OrbitalProvisioningState?), Azure.ResourceManager.Orbital.Models.OrbitalContactStatus? status = default(Azure.ResourceManager.Orbital.Models.OrbitalContactStatus?), System.DateTimeOffset? reservationStartOn = default(System.DateTimeOffset?), System.DateTimeOffset? reservationEndOn = default(System.DateTimeOffset?), System.DateTimeOffset? rxStartOn = default(System.DateTimeOffset?), System.DateTimeOffset? rxEndOn = default(System.DateTimeOffset?), System.DateTimeOffset? txStartOn = default(System.DateTimeOffset?), System.DateTimeOffset? txEndOn = default(System.DateTimeOffset?), string errorMessage = null, float? maximumElevationDegrees = default(float?), float? startAzimuthDegrees = default(float?), float? endAzimuthDegrees = default(float?), string groundStationName = null, float? startElevationDegrees = default(float?), float? endElevationDegrees = default(float?), Azure.ResourceManager.Orbital.Models.OrbitalContactAntennaConfiguration antennaConfiguration = null, Azure.Core.ResourceIdentifier contactProfileId = null) { throw null; } + public static Azure.ResourceManager.Orbital.OrbitalContactProfileData OrbitalContactProfileData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), Azure.ResourceManager.Orbital.Models.OrbitalProvisioningState? provisioningState = default(Azure.ResourceManager.Orbital.Models.OrbitalProvisioningState?), System.TimeSpan? minimumViableContactDuration = default(System.TimeSpan?), float? minimumElevationDegrees = default(float?), Azure.ResourceManager.Orbital.Models.AutoTrackingConfiguration? autoTrackingConfiguration = default(Azure.ResourceManager.Orbital.Models.AutoTrackingConfiguration?), System.Uri eventHubUri = null, Azure.Core.ResourceIdentifier networkSubnetId = null, System.Collections.Generic.IEnumerable links = null) { throw null; } + public static Azure.ResourceManager.Orbital.OrbitalSpacecraftData OrbitalSpacecraftData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), Azure.ResourceManager.Orbital.Models.OrbitalProvisioningState? provisioningState = default(Azure.ResourceManager.Orbital.Models.OrbitalProvisioningState?), string noradId = null, string titleLine = null, string tleLine1 = null, string tleLine2 = null, System.Collections.Generic.IEnumerable links = null) { throw null; } + public static Azure.ResourceManager.Orbital.Models.OrbitalSpacecraftLink OrbitalSpacecraftLink(string name = null, float centerFrequencyMHz = 0f, float bandwidthMHz = 0f, Azure.ResourceManager.Orbital.Models.OrbitalLinkDirection direction = default(Azure.ResourceManager.Orbital.Models.OrbitalLinkDirection), Azure.ResourceManager.Orbital.Models.OrbitalLinkPolarization polarization = default(Azure.ResourceManager.Orbital.Models.OrbitalLinkPolarization), System.Collections.Generic.IEnumerable authorizations = null) { throw null; } + } public partial class AuthorizedGroundStation { internal AuthorizedGroundStation() { } diff --git a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/ArmOrbitalModelFactory.cs b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/ArmOrbitalModelFactory.cs new file mode 100644 index 000000000000..b1acecaae953 --- /dev/null +++ b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/ArmOrbitalModelFactory.cs @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using Azure; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.Orbital; + +namespace Azure.ResourceManager.Orbital.Models +{ + /// Model factory for models. + public static partial class ArmOrbitalModelFactory + { + /// Initializes a new instance of OrbitalSpacecraftData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// A unique read-only string that changes whenever the resource is updated. + /// The current state of the resource's creation, deletion, or modification. + /// NORAD ID of the spacecraft. + /// Title line of the two-line element set (TLE). + /// Line 1 of the two-line element set (TLE). + /// Line 2 of the two-line element set (TLE). + /// Immutable list of Spacecraft links. + /// A new instance for mocking. + public static OrbitalSpacecraftData OrbitalSpacecraftData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, OrbitalProvisioningState? provisioningState = null, string noradId = null, string titleLine = null, string tleLine1 = null, string tleLine2 = null, IEnumerable links = null) + { + tags ??= new Dictionary(); + links ??= new List(); + + return new OrbitalSpacecraftData(id, name, resourceType, systemData, tags, location, etag, provisioningState, noradId, titleLine, tleLine1, tleLine2, links?.ToList()); + } + + /// Initializes a new instance of OrbitalSpacecraftLink. + /// Link name. + /// Center Frequency in MHz. + /// Bandwidth in MHz. + /// Direction (uplink or downlink). + /// Polarization. e.g. (RHCP, LHCP). + /// Authorized Ground Stations. + /// A new instance for mocking. + public static OrbitalSpacecraftLink OrbitalSpacecraftLink(string name = null, float centerFrequencyMHz = default, float bandwidthMHz = default, OrbitalLinkDirection direction = default, OrbitalLinkPolarization polarization = default, IEnumerable authorizations = null) + { + authorizations ??= new List(); + + return new OrbitalSpacecraftLink(name, centerFrequencyMHz, bandwidthMHz, direction, polarization, authorizations?.ToList()); + } + + /// Initializes a new instance of AuthorizedGroundStation. + /// Groundstation name. + /// Date of authorization expiration. + /// A new instance for mocking. + public static AuthorizedGroundStation AuthorizedGroundStation(string groundStationName = null, DateTimeOffset? expireOn = null) + { + return new AuthorizedGroundStation(groundStationName, expireOn); + } + + /// Initializes a new instance of OrbitalContactData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// A unique read-only string that changes whenever the resource is updated. + /// The current state of the resource's creation, deletion, or modification. + /// Status of a contact. + /// Reservation start time of a contact (ISO 8601 UTC standard). + /// Reservation end time of a contact (ISO 8601 UTC standard). + /// Receive start time of a contact (ISO 8601 UTC standard). + /// Receive end time of a contact (ISO 8601 UTC standard). + /// Transmit start time of a contact (ISO 8601 UTC standard). + /// Transmit end time of a contact (ISO 8601 UTC standard). + /// Any error message while scheduling a contact. + /// Maximum elevation of the antenna during the contact in decimal degrees. + /// Azimuth of the antenna at the start of the contact in decimal degrees. + /// Azimuth of the antenna at the end of the contact in decimal degrees. + /// Azure Ground Station name. + /// Spacecraft elevation above the horizon at contact start. + /// Spacecraft elevation above the horizon at contact end. + /// The configuration associated with the allocated antenna. + /// The reference to the contact profile resource. + /// A new instance for mocking. + public static OrbitalContactData OrbitalContactData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ETag? etag = null, OrbitalProvisioningState? provisioningState = null, OrbitalContactStatus? status = null, DateTimeOffset? reservationStartOn = null, DateTimeOffset? reservationEndOn = null, DateTimeOffset? rxStartOn = null, DateTimeOffset? rxEndOn = null, DateTimeOffset? txStartOn = null, DateTimeOffset? txEndOn = null, string errorMessage = null, float? maximumElevationDegrees = null, float? startAzimuthDegrees = null, float? endAzimuthDegrees = null, string groundStationName = null, float? startElevationDegrees = null, float? endElevationDegrees = null, OrbitalContactAntennaConfiguration antennaConfiguration = null, ResourceIdentifier contactProfileId = null) + { + return new OrbitalContactData(id, name, resourceType, systemData, etag, provisioningState, status, reservationStartOn, reservationEndOn, rxStartOn, rxEndOn, txStartOn, txEndOn, errorMessage, maximumElevationDegrees, startAzimuthDegrees, endAzimuthDegrees, groundStationName, startElevationDegrees, endElevationDegrees, antennaConfiguration, contactProfileId != null ? ResourceManagerModelFactory.WritableSubResource(contactProfileId) : null); + } + + /// Initializes a new instance of OrbitalContactAntennaConfiguration. + /// The destination IP a packet can be sent to. This would for example be the TCP endpoint you would send data to. + /// List of Source IP. + /// A new instance for mocking. + public static OrbitalContactAntennaConfiguration OrbitalContactAntennaConfiguration(IPAddress destinationIP = null, IEnumerable sourceIPs = null) + { + sourceIPs ??= new List(); + + return new OrbitalContactAntennaConfiguration(destinationIP, sourceIPs?.ToList()); + } + + /// Initializes a new instance of OrbitalAvailableContactsResult. + /// A list of available contacts. + /// A new instance for mocking. + public static OrbitalAvailableContactsResult OrbitalAvailableContactsResult(IEnumerable values = null) + { + values ??= new List(); + + return new OrbitalAvailableContactsResult(values?.ToList()); + } + + /// Initializes a new instance of OrbitalAvailableContact. + /// The reference to the spacecraft resource. + /// Name of Azure Ground Station. + /// Maximum elevation of the antenna during the contact in decimal degrees. + /// Time at which antenna transmit will be enabled (ISO 8601 UTC standard). + /// Time at which antenna transmit will be disabled (ISO 8601 UTC standard). + /// Earliest time to receive a signal (ISO 8601 UTC standard). + /// Time to lost receiving a signal (ISO 8601 UTC standard). + /// Azimuth of the antenna at the start of the contact in decimal degrees. + /// Azimuth of the antenna at the end of the contact in decimal degrees. + /// Spacecraft elevation above the horizon at contact start. + /// Spacecraft elevation above the horizon at contact end. + /// A new instance for mocking. + public static OrbitalAvailableContact OrbitalAvailableContact(ResourceIdentifier spacecraftId = null, string groundStationName = null, float? maximumElevationDegrees = null, DateTimeOffset? txStartOn = null, DateTimeOffset? txEndOn = null, DateTimeOffset? rxStartOn = null, DateTimeOffset? rxEndOn = null, float? startAzimuthDegrees = null, float? endAzimuthDegrees = null, float? startElevationDegrees = null, float? endElevationDegrees = null) + { + return new OrbitalAvailableContact(spacecraftId != null ? ResourceManagerModelFactory.WritableSubResource(spacecraftId) : null, groundStationName, maximumElevationDegrees, txStartOn, txEndOn, rxStartOn, rxEndOn, startAzimuthDegrees, endAzimuthDegrees, startElevationDegrees, endElevationDegrees); + } + + /// Initializes a new instance of OrbitalContactProfileData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// A unique read-only string that changes whenever the resource is updated. + /// The current state of the resource's creation, deletion, or modification. + /// Minimum viable contact duration in ISO 8601 format. Used for listing the available contacts with a spacecraft at a given ground station. + /// Minimum viable elevation for the contact in decimal degrees. Used for listing the available contacts with a spacecraft at a given ground station. + /// Auto-tracking configuration. + /// ARM resource identifier of the Event Hub used for telemetry. Requires granting Orbital Resource Provider the rights to send telemetry into the hub. + /// Network configuration of customer virtual network. + /// Links of the Contact Profile. Describes RF links, modem processing, and IP endpoints. + /// A new instance for mocking. + public static OrbitalContactProfileData OrbitalContactProfileData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, OrbitalProvisioningState? provisioningState = null, TimeSpan? minimumViableContactDuration = null, float? minimumElevationDegrees = null, AutoTrackingConfiguration? autoTrackingConfiguration = null, Uri eventHubUri = null, ResourceIdentifier networkSubnetId = null, IEnumerable links = null) + { + tags ??= new Dictionary(); + links ??= new List(); + + return new OrbitalContactProfileData(id, name, resourceType, systemData, tags, location, etag, provisioningState, minimumViableContactDuration, minimumElevationDegrees, autoTrackingConfiguration, eventHubUri, networkSubnetId != null ? new ContactProfilesPropertiesNetworkConfiguration(networkSubnetId) : null, links?.ToList()); + } + + /// Initializes a new instance of AvailableGroundStationData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Azure region. + /// City of ground station. + /// Ground station provider name. + /// Longitude of the ground station in decimal degrees. + /// Latitude of the ground station in decimal degrees. + /// Altitude of the ground station. + /// Release Status of a ground station. + /// A new instance for mocking. + public static AvailableGroundStationData AvailableGroundStationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AzureLocation? location = null, string city = null, string providerName = null, float? longitudeDegrees = null, float? latitudeDegrees = null, float? altitudeMeters = null, GroundStationReleaseMode? releaseMode = null) + { + return new AvailableGroundStationData(id, name, resourceType, systemData, location, city, providerName, longitudeDegrees, latitudeDegrees, altitudeMeters, releaseMode); + } + } +} diff --git a/sdk/orbital/Azure.ResourceManager.Orbital/src/autorest.md b/sdk/orbital/Azure.ResourceManager.Orbital/src/autorest.md index af3ced70f363..9a47f35909be 100644 --- a/sdk/orbital/Azure.ResourceManager.Orbital/src/autorest.md +++ b/sdk/orbital/Azure.ResourceManager.Orbital/src/autorest.md @@ -5,7 +5,6 @@ Run `dotnet build /t:GenerateCode` to generate code. ``` yaml azure-arm: true -generate-model-factory: false csharp: true library-name: Orbital namespace: Azure.ResourceManager.Orbital diff --git a/sdk/peering/Azure.ResourceManager.Peering/CHANGELOG.md b/sdk/peering/Azure.ResourceManager.Peering/CHANGELOG.md index f64f2bda0c45..05baad7cdaf6 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/CHANGELOG.md +++ b/sdk/peering/Azure.ResourceManager.Peering/CHANGELOG.md @@ -1,15 +1,16 @@ # Release History -## 1.2.0-beta.1 (Unreleased) +## 1.2.0-beta.1 (2023-05-31) ### Features Added -### Breaking Changes - -### Bugs Fixed +- Enable the model factory feature for model mocking, more information can be found [here](https://azure.github.io/azure-sdk/dotnet_introduction.html#dotnet-mocking-factory-builder). ### Other Changes +- Upgraded dependent Azure.Core to 1.32.0. +- Upgraded dependent Azure.ResourceManager to 1.6.0. + ## 1.1.1 (2023-02-16) ### Other Changes diff --git a/sdk/peering/Azure.ResourceManager.Peering/api/Azure.ResourceManager.Peering.netstandard2.0.cs b/sdk/peering/Azure.ResourceManager.Peering/api/Azure.ResourceManager.Peering.netstandard2.0.cs index 515b8a684ca1..139e768c8f70 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/api/Azure.ResourceManager.Peering.netstandard2.0.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/api/Azure.ResourceManager.Peering.netstandard2.0.cs @@ -345,6 +345,31 @@ protected PeeringServiceResource() { } } namespace Azure.ResourceManager.Peering.Models { + public static partial class ArmPeeringModelFactory + { + public static Azure.ResourceManager.Peering.Models.CdnPeeringPrefix CdnPeeringPrefix(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string prefix = null, Azure.Core.AzureLocation? azureRegion = default(Azure.Core.AzureLocation?), string azureService = null, bool? isPrimaryRegion = default(bool?), string bgpCommunity = null) { throw null; } + public static Azure.ResourceManager.Peering.ConnectionMonitorTestData ConnectionMonitorTestData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string sourceAgent = null, string destination = null, int? destinationPort = default(int?), int? testFrequencyInSec = default(int?), bool? isTestSuccessful = default(bool?), System.Collections.Generic.IEnumerable path = null, Azure.ResourceManager.Peering.Models.PeeringProvisioningState? provisioningState = default(Azure.ResourceManager.Peering.Models.PeeringProvisioningState?)) { throw null; } + public static Azure.ResourceManager.Peering.Models.DirectPeeringProperties DirectPeeringProperties(System.Collections.Generic.IEnumerable connections = null, bool? useForPeeringService = default(bool?), Azure.Core.ResourceIdentifier peerAsnId = null, Azure.ResourceManager.Peering.Models.DirectPeeringType? directPeeringType = default(Azure.ResourceManager.Peering.Models.DirectPeeringType?)) { throw null; } + public static Azure.ResourceManager.Peering.Models.LookingGlassOutput LookingGlassOutput(Azure.ResourceManager.Peering.Models.LookingGlassCommand? command = default(Azure.ResourceManager.Peering.Models.LookingGlassCommand?), string output = null) { throw null; } + public static Azure.ResourceManager.Peering.PeerAsnData PeerAsnData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, int? peerAsn = default(int?), System.Collections.Generic.IEnumerable peerContactDetail = null, string peerName = null, Azure.ResourceManager.Peering.Models.PeerAsnValidationState? validationState = default(Azure.ResourceManager.Peering.Models.PeerAsnValidationState?), string errorMessage = null) { throw null; } + public static Azure.ResourceManager.Peering.Models.PeeringBgpSession PeeringBgpSession(string sessionPrefixV4 = null, string sessionPrefixV6 = null, System.Net.IPAddress microsoftSessionIPv4Address = null, System.Net.IPAddress microsoftSessionIPv6Address = null, System.Net.IPAddress peerSessionIPv4Address = null, System.Net.IPAddress peerSessionIPv6Address = null, Azure.ResourceManager.Peering.Models.PeeringSessionStateV4? sessionStateV4 = default(Azure.ResourceManager.Peering.Models.PeeringSessionStateV4?), Azure.ResourceManager.Peering.Models.PeeringSessionStateV6? sessionStateV6 = default(Azure.ResourceManager.Peering.Models.PeeringSessionStateV6?), int? maxPrefixesAdvertisedV4 = default(int?), int? maxPrefixesAdvertisedV6 = default(int?), string md5AuthenticationKey = null) { throw null; } + public static Azure.ResourceManager.Peering.PeeringData PeeringData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Peering.Models.PeeringSku sku = null, Azure.ResourceManager.Peering.Models.PeeringKind kind = default(Azure.ResourceManager.Peering.Models.PeeringKind), Azure.ResourceManager.Peering.Models.DirectPeeringProperties direct = null, Azure.ResourceManager.Peering.Models.ExchangePeeringProperties exchange = null, string peeringLocation = null, Azure.ResourceManager.Peering.Models.PeeringProvisioningState? provisioningState = default(Azure.ResourceManager.Peering.Models.PeeringProvisioningState?)) { throw null; } + public static Azure.ResourceManager.Peering.Models.PeeringDirectConnection PeeringDirectConnection(int? bandwidthInMbps = default(int?), int? provisionedBandwidthInMbps = default(int?), Azure.ResourceManager.Peering.Models.PeeringSessionAddressProvider? sessionAddressProvider = default(Azure.ResourceManager.Peering.Models.PeeringSessionAddressProvider?), bool? useForPeeringService = default(bool?), string microsoftTrackingId = null, int? peeringDBFacilityId = default(int?), Azure.ResourceManager.Peering.Models.PeeringConnectionState? connectionState = default(Azure.ResourceManager.Peering.Models.PeeringConnectionState?), Azure.ResourceManager.Peering.Models.PeeringBgpSession bgpSession = null, string connectionIdentifier = null, string errorMessage = null) { throw null; } + public static Azure.ResourceManager.Peering.Models.PeeringExchangeConnection PeeringExchangeConnection(int? peeringDBFacilityId = default(int?), Azure.ResourceManager.Peering.Models.PeeringConnectionState? connectionState = default(Azure.ResourceManager.Peering.Models.PeeringConnectionState?), Azure.ResourceManager.Peering.Models.PeeringBgpSession bgpSession = null, System.Guid? connectionIdentifier = default(System.Guid?), string errorMessage = null) { throw null; } + public static Azure.ResourceManager.Peering.Models.PeeringLocation PeeringLocation(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Peering.Models.PeeringKind? kind = default(Azure.ResourceManager.Peering.Models.PeeringKind?), Azure.ResourceManager.Peering.Models.DirectPeeringLocationProperties direct = null, System.Collections.Generic.IEnumerable exchangePeeringFacilities = null, string peeringLocationValue = null, string country = null, Azure.Core.AzureLocation? azureRegion = default(Azure.Core.AzureLocation?)) { throw null; } + public static Azure.ResourceManager.Peering.Models.PeeringLogAnalyticsWorkspaceProperties PeeringLogAnalyticsWorkspaceProperties(string workspaceId = null, string key = null, System.Collections.Generic.IEnumerable connectedAgents = null) { throw null; } + public static Azure.ResourceManager.Peering.Models.PeeringReceivedRoute PeeringReceivedRoute(string prefix = null, string nextHop = null, string asPath = null, string originAsValidationState = null, string rpkiValidationState = null, string trustAnchor = null, string receivedTimestamp = null) { throw null; } + public static Azure.ResourceManager.Peering.PeeringRegisteredAsnData PeeringRegisteredAsnData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, int? asn = default(int?), string peeringServicePrefixKey = null, Azure.ResourceManager.Peering.Models.PeeringProvisioningState? provisioningState = default(Azure.ResourceManager.Peering.Models.PeeringProvisioningState?)) { throw null; } + public static Azure.ResourceManager.Peering.PeeringRegisteredPrefixData PeeringRegisteredPrefixData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string prefix = null, Azure.ResourceManager.Peering.Models.PeeringPrefixValidationState? prefixValidationState = default(Azure.ResourceManager.Peering.Models.PeeringPrefixValidationState?), string peeringServicePrefixKey = null, string errorMessage = null, Azure.ResourceManager.Peering.Models.PeeringProvisioningState? provisioningState = default(Azure.ResourceManager.Peering.Models.PeeringProvisioningState?)) { throw null; } + public static Azure.ResourceManager.Peering.Models.PeeringServiceCountry PeeringServiceCountry(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null) { throw null; } + public static Azure.ResourceManager.Peering.PeeringServiceData PeeringServiceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string skuName = null, string peeringServiceLocation = null, string peeringServiceProvider = null, Azure.ResourceManager.Peering.Models.PeeringProvisioningState? provisioningState = default(Azure.ResourceManager.Peering.Models.PeeringProvisioningState?), string providerPrimaryPeeringLocation = null, string providerBackupPeeringLocation = null, Azure.ResourceManager.Peering.Models.PeeringLogAnalyticsWorkspaceProperties logAnalyticsWorkspaceProperties = null) { throw null; } + public static Azure.ResourceManager.Peering.Models.PeeringServiceLocation PeeringServiceLocation(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string country = null, string state = null, Azure.Core.AzureLocation? azureRegion = default(Azure.Core.AzureLocation?)) { throw null; } + public static Azure.ResourceManager.Peering.PeeringServicePrefixData PeeringServicePrefixData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string prefix = null, Azure.ResourceManager.Peering.Models.PeeringPrefixValidationState? prefixValidationState = default(Azure.ResourceManager.Peering.Models.PeeringPrefixValidationState?), Azure.ResourceManager.Peering.Models.PeeringLearnedType? learnedType = default(Azure.ResourceManager.Peering.Models.PeeringLearnedType?), string errorMessage = null, System.Collections.Generic.IEnumerable events = null, string peeringServicePrefixKey = null, Azure.ResourceManager.Peering.Models.PeeringProvisioningState? provisioningState = default(Azure.ResourceManager.Peering.Models.PeeringProvisioningState?)) { throw null; } + public static Azure.ResourceManager.Peering.Models.PeeringServicePrefixEvent PeeringServicePrefixEvent(System.DateTimeOffset? eventTimestamp = default(System.DateTimeOffset?), string eventType = null, string eventSummary = null, string eventLevel = null, string eventDescription = null) { throw null; } + public static Azure.ResourceManager.Peering.Models.PeeringServiceProvider PeeringServiceProvider(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string serviceProviderName = null, System.Collections.Generic.IEnumerable peeringLocations = null) { throw null; } + public static Azure.ResourceManager.Peering.Models.PeeringSku PeeringSku(string name = null, Azure.ResourceManager.Peering.Models.PeeringTier? tier = default(Azure.ResourceManager.Peering.Models.PeeringTier?), Azure.ResourceManager.Peering.Models.PeeringFamily? family = default(Azure.ResourceManager.Peering.Models.PeeringFamily?), Azure.ResourceManager.Peering.Models.PeeringSize? size = default(Azure.ResourceManager.Peering.Models.PeeringSize?)) { throw null; } + public static Azure.ResourceManager.Peering.Models.RoutingPreferenceUnbilledPrefix RoutingPreferenceUnbilledPrefix(string prefix = null, Azure.Core.AzureLocation? azureRegion = default(Azure.Core.AzureLocation?), int? peerAsn = default(int?)) { throw null; } + } public partial class CdnPeeringPrefix : Azure.ResourceManager.Models.ResourceData { public CdnPeeringPrefix() { } diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/ArmPeeringModelFactory.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/ArmPeeringModelFactory.cs new file mode 100644 index 000000000000..b5f5cb26afcc --- /dev/null +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/ArmPeeringModelFactory.cs @@ -0,0 +1,355 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.Peering; + +namespace Azure.ResourceManager.Peering.Models +{ + /// Model factory for models. + public static partial class ArmPeeringModelFactory + { + /// Initializes a new instance of CdnPeeringPrefix. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The prefix. + /// The Azure region. + /// The Azure service. + /// The flag that indicates whether or not this is the primary region. + /// The BGP Community. + /// A new instance for mocking. + public static CdnPeeringPrefix CdnPeeringPrefix(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string prefix = null, AzureLocation? azureRegion = null, string azureService = null, bool? isPrimaryRegion = null, string bgpCommunity = null) + { + return new CdnPeeringPrefix(id, name, resourceType, systemData, prefix, azureRegion, azureService, isPrimaryRegion, bgpCommunity); + } + + /// Initializes a new instance of PeeringData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The SKU that defines the tier and kind of the peering. + /// The kind of the peering. + /// The properties that define a direct peering. + /// The properties that define an exchange peering. + /// The location of the peering. + /// The provisioning state of the resource. + /// A new instance for mocking. + public static PeeringData PeeringData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, PeeringSku sku = null, PeeringKind kind = default, DirectPeeringProperties direct = null, ExchangePeeringProperties exchange = null, string peeringLocation = null, PeeringProvisioningState? provisioningState = null) + { + tags ??= new Dictionary(); + + return new PeeringData(id, name, resourceType, systemData, tags, location, sku, kind, direct, exchange, peeringLocation, provisioningState); + } + + /// Initializes a new instance of PeeringSku. + /// The name of the peering SKU. + /// The tier of the peering SKU. + /// The family of the peering SKU. + /// The size of the peering SKU. + /// A new instance for mocking. + public static PeeringSku PeeringSku(string name = null, PeeringTier? tier = null, PeeringFamily? family = null, PeeringSize? size = null) + { + return new PeeringSku(name, tier, family, size); + } + + /// Initializes a new instance of DirectPeeringProperties. + /// The set of connections that constitute a direct peering. + /// The flag that indicates whether or not the peering is used for peering service. + /// The reference of the peer ASN. + /// The type of direct peering. + /// A new instance for mocking. + public static DirectPeeringProperties DirectPeeringProperties(IEnumerable connections = null, bool? useForPeeringService = null, ResourceIdentifier peerAsnId = null, DirectPeeringType? directPeeringType = null) + { + connections ??= new List(); + + return new DirectPeeringProperties(connections?.ToList(), useForPeeringService, peerAsnId != null ? ResourceManagerModelFactory.WritableSubResource(peerAsnId) : null, directPeeringType); + } + + /// Initializes a new instance of PeeringDirectConnection. + /// The bandwidth of the connection. + /// The bandwidth that is actually provisioned. + /// The field indicating if Microsoft provides session ip addresses. + /// The flag that indicates whether or not the connection is used for peering service. + /// The ID used within Microsoft's peering provisioning system to track the connection. + /// The PeeringDB.com ID of the facility at which the connection has to be set up. + /// The state of the connection. + /// The BGP session associated with the connection. + /// The unique identifier (GUID) for the connection. + /// The error message related to the connection state, if any. + /// A new instance for mocking. + public static PeeringDirectConnection PeeringDirectConnection(int? bandwidthInMbps = null, int? provisionedBandwidthInMbps = null, PeeringSessionAddressProvider? sessionAddressProvider = null, bool? useForPeeringService = null, string microsoftTrackingId = null, int? peeringDBFacilityId = null, PeeringConnectionState? connectionState = null, PeeringBgpSession bgpSession = null, string connectionIdentifier = null, string errorMessage = null) + { + return new PeeringDirectConnection(bandwidthInMbps, provisionedBandwidthInMbps, sessionAddressProvider, useForPeeringService, microsoftTrackingId, peeringDBFacilityId, connectionState, bgpSession, connectionIdentifier, errorMessage); + } + + /// Initializes a new instance of PeeringBgpSession. + /// The IPv4 prefix that contains both ends' IPv4 addresses. + /// The IPv6 prefix that contains both ends' IPv6 addresses. + /// The IPv4 session address on Microsoft's end. + /// The IPv6 session address on Microsoft's end. + /// The IPv4 session address on peer's end. + /// The IPv6 session address on peer's end. + /// The state of the IPv4 session. + /// The state of the IPv6 session. + /// The maximum number of prefixes advertised over the IPv4 session. + /// The maximum number of prefixes advertised over the IPv6 session. + /// The MD5 authentication key of the session. + /// A new instance for mocking. + public static PeeringBgpSession PeeringBgpSession(string sessionPrefixV4 = null, string sessionPrefixV6 = null, IPAddress microsoftSessionIPv4Address = null, IPAddress microsoftSessionIPv6Address = null, IPAddress peerSessionIPv4Address = null, IPAddress peerSessionIPv6Address = null, PeeringSessionStateV4? sessionStateV4 = null, PeeringSessionStateV6? sessionStateV6 = null, int? maxPrefixesAdvertisedV4 = null, int? maxPrefixesAdvertisedV6 = null, string md5AuthenticationKey = null) + { + return new PeeringBgpSession(sessionPrefixV4, sessionPrefixV6, microsoftSessionIPv4Address, microsoftSessionIPv6Address, peerSessionIPv4Address, peerSessionIPv6Address, sessionStateV4, sessionStateV6, maxPrefixesAdvertisedV4, maxPrefixesAdvertisedV6, md5AuthenticationKey); + } + + /// Initializes a new instance of PeeringExchangeConnection. + /// The PeeringDB.com ID of the facility at which the connection has to be set up. + /// The state of the connection. + /// The BGP session associated with the connection. + /// The unique identifier (GUID) for the connection. + /// The error message related to the connection state, if any. + /// A new instance for mocking. + public static PeeringExchangeConnection PeeringExchangeConnection(int? peeringDBFacilityId = null, PeeringConnectionState? connectionState = null, PeeringBgpSession bgpSession = null, Guid? connectionIdentifier = null, string errorMessage = null) + { + return new PeeringExchangeConnection(peeringDBFacilityId, connectionState, bgpSession, connectionIdentifier, errorMessage); + } + + /// Initializes a new instance of LookingGlassOutput. + /// Invoked command. + /// Output of the command. + /// A new instance for mocking. + public static LookingGlassOutput LookingGlassOutput(LookingGlassCommand? command = null, string output = null) + { + return new LookingGlassOutput(command, output); + } + + /// Initializes a new instance of PeerAsnData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The Autonomous System Number (ASN) of the peer. + /// The contact details of the peer. + /// The name of the peer. + /// The validation state of the ASN associated with the peer. + /// The error message for the validation state. + /// A new instance for mocking. + public static PeerAsnData PeerAsnData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, int? peerAsn = null, IEnumerable peerContactDetail = null, string peerName = null, PeerAsnValidationState? validationState = null, string errorMessage = null) + { + peerContactDetail ??= new List(); + + return new PeerAsnData(id, name, resourceType, systemData, peerAsn, peerContactDetail?.ToList(), peerName, validationState, errorMessage); + } + + /// Initializes a new instance of PeeringLocation. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The kind of peering that the peering location supports. + /// The properties that define a direct peering location. + /// The properties that define an exchange peering location. + /// The name of the peering location. + /// The country in which the peering location exists. + /// The Azure region associated with the peering location. + /// A new instance for mocking. + public static PeeringLocation PeeringLocation(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, PeeringKind? kind = null, DirectPeeringLocationProperties direct = null, IEnumerable exchangePeeringFacilities = null, string peeringLocationValue = null, string country = null, AzureLocation? azureRegion = null) + { + exchangePeeringFacilities ??= new List(); + + return new PeeringLocation(id, name, resourceType, systemData, kind, direct, exchangePeeringFacilities != null ? new PeeringLocationPropertiesExchange(exchangePeeringFacilities?.ToList()) : null, peeringLocationValue, country, azureRegion); + } + + /// Initializes a new instance of PeeringRegisteredAsnData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The customer's ASN from which traffic originates. + /// The peering service prefix key that is to be shared with the customer. + /// The provisioning state of the resource. + /// A new instance for mocking. + public static PeeringRegisteredAsnData PeeringRegisteredAsnData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, int? asn = null, string peeringServicePrefixKey = null, PeeringProvisioningState? provisioningState = null) + { + return new PeeringRegisteredAsnData(id, name, resourceType, systemData, asn, peeringServicePrefixKey, provisioningState); + } + + /// Initializes a new instance of PeeringRegisteredPrefixData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The customer's prefix from which traffic originates. + /// The prefix validation state. + /// The peering service prefix key that is to be shared with the customer. + /// The error message associated with the validation state, if any. + /// The provisioning state of the resource. + /// A new instance for mocking. + public static PeeringRegisteredPrefixData PeeringRegisteredPrefixData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string prefix = null, PeeringPrefixValidationState? prefixValidationState = null, string peeringServicePrefixKey = null, string errorMessage = null, PeeringProvisioningState? provisioningState = null) + { + return new PeeringRegisteredPrefixData(id, name, resourceType, systemData, prefix, prefixValidationState, peeringServicePrefixKey, errorMessage, provisioningState); + } + + /// Initializes a new instance of PeeringReceivedRoute. + /// The prefix. + /// The next hop for the prefix. + /// The AS path for the prefix. + /// The origin AS change information for the prefix. + /// The RPKI validation state for the prefix and origin AS that's listed in the AS path. + /// The authority which holds the Route Origin Authorization record for the prefix, if any. + /// The received timestamp associated with the prefix. + /// A new instance for mocking. + public static PeeringReceivedRoute PeeringReceivedRoute(string prefix = null, string nextHop = null, string asPath = null, string originAsValidationState = null, string rpkiValidationState = null, string trustAnchor = null, string receivedTimestamp = null) + { + return new PeeringReceivedRoute(prefix, nextHop, asPath, originAsValidationState, rpkiValidationState, trustAnchor, receivedTimestamp); + } + + /// Initializes a new instance of ConnectionMonitorTestData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The Connection Monitor test source agent. + /// The Connection Monitor test destination. + /// The Connection Monitor test destination port. + /// The Connection Monitor test frequency in seconds. + /// The flag that indicates if the Connection Monitor test is successful or not. + /// The path representing the Connection Monitor test. + /// The provisioning state of the resource. + /// A new instance for mocking. + public static ConnectionMonitorTestData ConnectionMonitorTestData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string sourceAgent = null, string destination = null, int? destinationPort = null, int? testFrequencyInSec = null, bool? isTestSuccessful = null, IEnumerable path = null, PeeringProvisioningState? provisioningState = null) + { + path ??= new List(); + + return new ConnectionMonitorTestData(id, name, resourceType, systemData, sourceAgent, destination, destinationPort, testFrequencyInSec, isTestSuccessful, path?.ToList(), provisioningState); + } + + /// Initializes a new instance of PeeringServiceCountry. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// A new instance for mocking. + public static PeeringServiceCountry PeeringServiceCountry(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null) + { + return new PeeringServiceCountry(id, name, resourceType, systemData); + } + + /// Initializes a new instance of PeeringServiceLocation. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Country of the customer. + /// State of the customer. + /// Azure region for the location. + /// A new instance for mocking. + public static PeeringServiceLocation PeeringServiceLocation(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string country = null, string state = null, AzureLocation? azureRegion = null) + { + return new PeeringServiceLocation(id, name, resourceType, systemData, country, state, azureRegion); + } + + /// Initializes a new instance of PeeringServicePrefixData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The prefix from which your traffic originates. + /// The prefix validation state. + /// The prefix learned type. + /// The error message for validation state. + /// The list of events for peering service prefix. + /// The peering service prefix key. + /// The provisioning state of the resource. + /// A new instance for mocking. + public static PeeringServicePrefixData PeeringServicePrefixData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string prefix = null, PeeringPrefixValidationState? prefixValidationState = null, PeeringLearnedType? learnedType = null, string errorMessage = null, IEnumerable events = null, string peeringServicePrefixKey = null, PeeringProvisioningState? provisioningState = null) + { + events ??= new List(); + + return new PeeringServicePrefixData(id, name, resourceType, systemData, prefix, prefixValidationState, learnedType, errorMessage, events?.ToList(), peeringServicePrefixKey, provisioningState); + } + + /// Initializes a new instance of PeeringServicePrefixEvent. + /// The timestamp of the event associated with a prefix. + /// The type of the event associated with a prefix. + /// The summary of the event associated with a prefix. + /// The level of the event associated with a prefix. + /// The description of the event associated with a prefix. + /// A new instance for mocking. + public static PeeringServicePrefixEvent PeeringServicePrefixEvent(DateTimeOffset? eventTimestamp = null, string eventType = null, string eventSummary = null, string eventLevel = null, string eventDescription = null) + { + return new PeeringServicePrefixEvent(eventTimestamp, eventType, eventSummary, eventLevel, eventDescription); + } + + /// Initializes a new instance of PeeringServiceProvider. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The name of the service provider. + /// The list of locations at which the service provider peers with Microsoft. + /// A new instance for mocking. + public static PeeringServiceProvider PeeringServiceProvider(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string serviceProviderName = null, IEnumerable peeringLocations = null) + { + peeringLocations ??= new List(); + + return new PeeringServiceProvider(id, name, resourceType, systemData, serviceProviderName, peeringLocations?.ToList()); + } + + /// Initializes a new instance of PeeringServiceData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The SKU that defines the type of the peering service. + /// The location (state/province) of the customer. + /// The name of the service provider. + /// The provisioning state of the resource. + /// The primary peering (Microsoft/service provider) location to be used for customer traffic. + /// The backup peering (Microsoft/service provider) location to be used for customer traffic. + /// The Log Analytics Workspace Properties. + /// A new instance for mocking. + public static PeeringServiceData PeeringServiceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string skuName = null, string peeringServiceLocation = null, string peeringServiceProvider = null, PeeringProvisioningState? provisioningState = null, string providerPrimaryPeeringLocation = null, string providerBackupPeeringLocation = null, PeeringLogAnalyticsWorkspaceProperties logAnalyticsWorkspaceProperties = null) + { + tags ??= new Dictionary(); + + return new PeeringServiceData(id, name, resourceType, systemData, tags, location, skuName != null ? new PeeringServiceSku(skuName) : null, peeringServiceLocation, peeringServiceProvider, provisioningState, providerPrimaryPeeringLocation, providerBackupPeeringLocation, logAnalyticsWorkspaceProperties); + } + + /// Initializes a new instance of PeeringLogAnalyticsWorkspaceProperties. + /// The Workspace ID. + /// The Workspace Key. + /// The list of connected agents. + /// A new instance for mocking. + public static PeeringLogAnalyticsWorkspaceProperties PeeringLogAnalyticsWorkspaceProperties(string workspaceId = null, string key = null, IEnumerable connectedAgents = null) + { + connectedAgents ??= new List(); + + return new PeeringLogAnalyticsWorkspaceProperties(workspaceId, key, connectedAgents?.ToList()); + } + + /// Initializes a new instance of RoutingPreferenceUnbilledPrefix. + /// The prefix. + /// The Azure region. + /// The peer ASN. + /// A new instance for mocking. + public static RoutingPreferenceUnbilledPrefix RoutingPreferenceUnbilledPrefix(string prefix = null, AzureLocation? azureRegion = null, int? peerAsn = null) + { + return new RoutingPreferenceUnbilledPrefix(prefix, azureRegion, peerAsn); + } + } +} diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/autorest.md b/sdk/peering/Azure.ResourceManager.Peering/src/autorest.md index 3f952056f30b..5b05fe49d6c1 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/autorest.md +++ b/sdk/peering/Azure.ResourceManager.Peering/src/autorest.md @@ -5,7 +5,6 @@ Run `dotnet build /t:GenerateCode` to generate code. ``` yaml azure-arm: true -generate-model-factory: false csharp: true library-name: Peering namespace: Azure.ResourceManager.Peering