From d8a7c415911c78cb82df0ca3527a243da45f3971 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Sun, 7 Aug 2022 12:48:19 +0000 Subject: [PATCH] CodeGen from PR 20090 in Azure/azure-rest-api-specs Merge 0e1c57e5fc797070b2a44cf23514b70bab9b3fa1 into 2feaf7f24cc26a7274c9fd79015ae62b1d273986 --- ...eManager.StreamAnalytics.netstandard2.0.cs | 90 +++++++- .../SubscriptionResourceExtensionClient.cs | 2 +- .../src/Generated/Models/DataRefreshType.cs | 6 - ...eReferenceInputDataSource.Serialization.cs | 63 ++++++ .../Models/FileReferenceInputDataSource.cs | 31 +++ .../GetStreamingJobSkuResult.Serialization.cs | 56 +++++ .../Models/GetStreamingJobSkuResult.cs | 42 ++++ ...tStreamingJobSkuResultSku.Serialization.cs | 34 +++ .../Models/GetStreamingJobSkuResultSku.cs | 28 +++ ...GetStreamingJobSkuResults.Serialization.cs | 46 +++++ .../Models/GetStreamingJobSkuResults.cs | 36 ++++ .../ReferenceInputDataSource.Serialization.cs | 1 + .../Models/ReferenceInputDataSource.cs | 2 +- .../Models/ReferenceInputProperties.cs | 4 +- .../src/Generated/Models/ResourceType.cs | 48 +++++ .../Models/SkuCapacity.Serialization.cs | 84 ++++++++ .../src/Generated/Models/SkuCapacity.cs | 48 +++++ .../Generated/Models/SkuCapacityScaleType.cs | 54 +++++ ...treamAnalyticsClusterData.Serialization.cs | 4 +- ...lyticsPrivateEndpointData.Serialization.cs | 4 +- .../StreamAnalyticsSku.Serialization.cs | 20 +- .../Generated/Models/StreamAnalyticsSku.cs | 8 +- ...treamAnalyticsSubResource.Serialization.cs | 4 +- .../Models/StreamAnalyticsSubResource.cs | 4 +- ...nalyticsSubscriptionQuota.Serialization.cs | 4 +- .../StreamAnalyticsSubscriptionQuota.cs | 2 +- .../Models/StreamingJobData.Serialization.cs | 30 ++- .../StreamingJobFunctionData.Serialization.cs | 4 +- .../StreamingJobInputData.Serialization.cs | 4 +- .../StreamingJobOutputData.Serialization.cs | 4 +- ...ngJobRefreshConfiguration.Serialization.cs | 4 +- .../StreamingJobRefreshConfiguration.cs | 4 +- .../Models/UpdatableUdfRefreshType.cs | 51 +++++ .../RestOperations/SkuRestOperations.cs | 195 ++++++++++++++++++ .../Generated/StreamAnalyticsClusterData.cs | 2 +- .../StreamAnalyticsClusterResource.cs | 2 +- .../StreamAnalyticsPrivateEndpointData.cs | 2 +- .../src/Generated/StreamingJobData.cs | 24 +-- .../src/Generated/StreamingJobFunctionData.cs | 2 +- .../Generated/StreamingJobFunctionResource.cs | 2 +- .../src/Generated/StreamingJobInputData.cs | 2 +- .../Generated/StreamingJobInputResource.cs | 2 +- .../src/Generated/StreamingJobOutputData.cs | 2 +- .../Generated/StreamingJobOutputResource.cs | 2 +- .../src/Generated/StreamingJobResource.cs | 90 +++++++- .../StreamingJobTransformationData.cs | 2 +- .../src/autorest.md | 2 +- 47 files changed, 1083 insertions(+), 74 deletions(-) create mode 100644 sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/FileReferenceInputDataSource.Serialization.cs create mode 100644 sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/FileReferenceInputDataSource.cs create mode 100644 sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/GetStreamingJobSkuResult.Serialization.cs create mode 100644 sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/GetStreamingJobSkuResult.cs create mode 100644 sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/GetStreamingJobSkuResultSku.Serialization.cs create mode 100644 sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/GetStreamingJobSkuResultSku.cs create mode 100644 sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/GetStreamingJobSkuResults.Serialization.cs create mode 100644 sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/GetStreamingJobSkuResults.cs create mode 100644 sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/ResourceType.cs create mode 100644 sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/SkuCapacity.Serialization.cs create mode 100644 sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/SkuCapacity.cs create mode 100644 sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/SkuCapacityScaleType.cs create mode 100644 sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/UpdatableUdfRefreshType.cs create mode 100644 sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/RestOperations/SkuRestOperations.cs diff --git a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/api/Azure.ResourceManager.StreamAnalytics.netstandard2.0.cs b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/api/Azure.ResourceManager.StreamAnalytics.netstandard2.0.cs index 97ebd9855497..3f833ca73397 100644 --- a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/api/Azure.ResourceManager.StreamAnalytics.netstandard2.0.cs +++ b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/api/Azure.ResourceManager.StreamAnalytics.netstandard2.0.cs @@ -155,7 +155,8 @@ public StreamingJobData(Azure.Core.AzureLocation location) : base (default(Azure public Azure.ResourceManager.StreamAnalytics.Models.StreamingJobOutputStartMode? OutputStartMode { get { throw null; } set { } } public System.DateTimeOffset? OutputStartOn { get { throw null; } set { } } public string ProvisioningState { get { throw null; } } - public Azure.ResourceManager.StreamAnalytics.Models.StreamAnalyticsSkuName? SkuName { get { throw null; } set { } } + public Azure.ResourceManager.StreamAnalytics.Models.StreamAnalyticsSku Sku { get { throw null; } set { } } + public Azure.ResourceManager.StreamAnalytics.Models.StreamAnalyticsSku SkuPropertiesSku { get { throw null; } set { } } public Azure.ResourceManager.StreamAnalytics.StreamingJobTransformationData Transformation { get { throw null; } set { } } } public partial class StreamingJobFunctionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable @@ -288,6 +289,8 @@ protected StreamingJobResource() { } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetSkus(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetSkusAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetStreamingJobFunction(string functionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetStreamingJobFunctionAsync(string functionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.StreamAnalytics.StreamingJobFunctionCollection GetStreamingJobFunctions() { throw null; } @@ -456,8 +459,6 @@ public DataLakeStoreOutputDataSource() { } private readonly object _dummy; private readonly int _dummyPrimitive; public DataRefreshType(string value) { throw null; } - public static Azure.ResourceManager.StreamAnalytics.Models.DataRefreshType Blocking { get { throw null; } } - public static Azure.ResourceManager.StreamAnalytics.Models.DataRefreshType Nonblocking { get { throw null; } } public static Azure.ResourceManager.StreamAnalytics.Models.DataRefreshType RefreshPeriodicallyWithDelta { get { throw null; } } public static Azure.ResourceManager.StreamAnalytics.Models.DataRefreshType RefreshPeriodicallyWithFull { get { throw null; } } public static Azure.ResourceManager.StreamAnalytics.Models.DataRefreshType Static { get { throw null; } } @@ -583,6 +584,11 @@ public EventHubV2StreamInputDataSource() { } public static bool operator !=(Azure.ResourceManager.StreamAnalytics.Models.EventsOutOfOrderPolicy left, Azure.ResourceManager.StreamAnalytics.Models.EventsOutOfOrderPolicy right) { throw null; } public override string ToString() { throw null; } } + public partial class FileReferenceInputDataSource : Azure.ResourceManager.StreamAnalytics.Models.ReferenceInputDataSource + { + public FileReferenceInputDataSource() { } + public string Path { get { throw null; } set { } } + } public partial class FunctionOutputDataSource : Azure.ResourceManager.StreamAnalytics.Models.StreamingJobOutputDataSource { public FunctionOutputDataSource() { } @@ -606,6 +612,13 @@ public partial class GatewayMessageBusStreamInputDataSource : Azure.ResourceMana public GatewayMessageBusStreamInputDataSource() { } public string Topic { get { throw null; } set { } } } + public partial class GetStreamingJobSkuResult + { + internal GetStreamingJobSkuResult() { } + public Azure.ResourceManager.StreamAnalytics.Models.SkuCapacity Capacity { get { throw null; } } + public Azure.ResourceManager.StreamAnalytics.Models.ResourceType? ResourceType { get { throw null; } } + public Azure.ResourceManager.StreamAnalytics.Models.StreamAnalyticsSkuName? SkuName { get { throw null; } } + } public partial class IoTHubStreamInputDataSource : Azure.ResourceManager.StreamAnalytics.Models.StreamInputDataSource { public IoTHubStreamInputDataSource() { } @@ -767,6 +780,23 @@ public partial class ReferenceInputProperties : Azure.ResourceManager.StreamAnal public ReferenceInputProperties() { } public Azure.ResourceManager.StreamAnalytics.Models.ReferenceInputDataSource Datasource { get { throw null; } set { } } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ResourceType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ResourceType(string value) { throw null; } + public static Azure.ResourceManager.StreamAnalytics.Models.ResourceType MicrosoftStreamAnalyticsStreamingjobs { get { throw null; } } + public bool Equals(Azure.ResourceManager.StreamAnalytics.Models.ResourceType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.StreamAnalytics.Models.ResourceType left, Azure.ResourceManager.StreamAnalytics.Models.ResourceType right) { throw null; } + public static implicit operator Azure.ResourceManager.StreamAnalytics.Models.ResourceType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.StreamAnalytics.Models.ResourceType left, Azure.ResourceManager.StreamAnalytics.Models.ResourceType right) { throw null; } + public override string ToString() { throw null; } + } public partial class ScalarFunctionProperties : Azure.ResourceManager.StreamAnalytics.Models.StreamingJobFunctionProperties { public ScalarFunctionProperties() { } @@ -798,6 +828,34 @@ public ServiceBusTopicOutputDataSource() { } public System.Collections.Generic.IDictionary SystemPropertyColumns { get { throw null; } } public string TopicName { get { throw null; } set { } } } + public partial class SkuCapacity + { + internal SkuCapacity() { } + public System.Collections.Generic.IReadOnlyList AllowedValues { get { throw null; } } + public int? Default { get { throw null; } } + public int? Maximum { get { throw null; } } + public int? Minimum { get { throw null; } } + public Azure.ResourceManager.StreamAnalytics.Models.SkuCapacityScaleType? ScaleType { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SkuCapacityScaleType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SkuCapacityScaleType(string value) { throw null; } + public static Azure.ResourceManager.StreamAnalytics.Models.SkuCapacityScaleType Automatic { get { throw null; } } + public static Azure.ResourceManager.StreamAnalytics.Models.SkuCapacityScaleType Manual { get { throw null; } } + public static Azure.ResourceManager.StreamAnalytics.Models.SkuCapacityScaleType None { get { throw null; } } + public bool Equals(Azure.ResourceManager.StreamAnalytics.Models.SkuCapacityScaleType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.StreamAnalytics.Models.SkuCapacityScaleType left, Azure.ResourceManager.StreamAnalytics.Models.SkuCapacityScaleType right) { throw null; } + public static implicit operator Azure.ResourceManager.StreamAnalytics.Models.SkuCapacityScaleType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.StreamAnalytics.Models.SkuCapacityScaleType left, Azure.ResourceManager.StreamAnalytics.Models.SkuCapacityScaleType right) { throw null; } + public override string ToString() { throw null; } + } public partial class SqlDatabaseOutputDataSource : Azure.ResourceManager.StreamAnalytics.Models.StreamingJobOutputDataSource { public SqlDatabaseOutputDataSource() { } @@ -1077,6 +1135,12 @@ internal StreamAnalyticsSampleInputResult() { } public static bool operator !=(Azure.ResourceManager.StreamAnalytics.Models.StreamAnalyticsSampleInputResultStatus left, Azure.ResourceManager.StreamAnalytics.Models.StreamAnalyticsSampleInputResultStatus right) { throw null; } public override string ToString() { throw null; } } + public partial class StreamAnalyticsSku + { + public StreamAnalyticsSku() { } + public int? Capacity { get { throw null; } set { } } + public Azure.ResourceManager.StreamAnalytics.Models.StreamAnalyticsSkuName? Name { get { throw null; } set { } } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct StreamAnalyticsSkuName : System.IEquatable { @@ -1382,7 +1446,7 @@ public StreamingJobRefreshConfiguration() { } public string DateFormat { get { throw null; } set { } } public string PathPattern { get { throw null; } set { } } public string RefreshInterval { get { throw null; } set { } } - public Azure.ResourceManager.StreamAnalytics.Models.DataRefreshType? RefreshType { get { throw null; } set { } } + public Azure.ResourceManager.StreamAnalytics.Models.UpdatableUdfRefreshType? RefreshType { get { throw null; } set { } } public string TimeFormat { get { throw null; } set { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] @@ -1463,4 +1527,22 @@ public TableOutputDataSource() { } public string RowKey { get { throw null; } set { } } public string Table { get { throw null; } set { } } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct UpdatableUdfRefreshType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public UpdatableUdfRefreshType(string value) { throw null; } + public static Azure.ResourceManager.StreamAnalytics.Models.UpdatableUdfRefreshType Blocking { get { throw null; } } + public static Azure.ResourceManager.StreamAnalytics.Models.UpdatableUdfRefreshType Nonblocking { get { throw null; } } + public bool Equals(Azure.ResourceManager.StreamAnalytics.Models.UpdatableUdfRefreshType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.StreamAnalytics.Models.UpdatableUdfRefreshType left, Azure.ResourceManager.StreamAnalytics.Models.UpdatableUdfRefreshType right) { throw null; } + public static implicit operator Azure.ResourceManager.StreamAnalytics.Models.UpdatableUdfRefreshType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.StreamAnalytics.Models.UpdatableUdfRefreshType left, Azure.ResourceManager.StreamAnalytics.Models.UpdatableUdfRefreshType right) { throw null; } + public override string ToString() { throw null; } + } } diff --git a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs index e66143d8f8c0..b3fb4503bca8 100644 --- a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs +++ b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs @@ -46,7 +46,7 @@ internal SubscriptionResourceExtensionClient(ArmClient client, ResourceIdentifie private ClientDiagnostics StreamAnalyticsClusterClustersClientDiagnostics => _streamAnalyticsClusterClustersClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.StreamAnalytics", StreamAnalyticsClusterResource.ResourceType.Namespace, Diagnostics); private ClustersRestOperations StreamAnalyticsClusterClustersRestClient => _streamAnalyticsClusterClustersRestClient ??= new ClustersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(StreamAnalyticsClusterResource.ResourceType)); - private string GetApiVersionOrNull(ResourceType resourceType) + private string GetApiVersionOrNull(Core.ResourceType resourceType) { TryGetApiVersion(resourceType, out string apiVersion); return apiVersion; diff --git a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/DataRefreshType.cs b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/DataRefreshType.cs index 2189e878fb96..073952f1a220 100644 --- a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/DataRefreshType.cs +++ b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/DataRefreshType.cs @@ -25,8 +25,6 @@ public DataRefreshType(string value) private const string StaticValue = "Static"; private const string RefreshPeriodicallyWithFullValue = "RefreshPeriodicallyWithFull"; private const string RefreshPeriodicallyWithDeltaValue = "RefreshPeriodicallyWithDelta"; - private const string BlockingValue = "Blocking"; - private const string NonblockingValue = "Nonblocking"; /// Static. public static DataRefreshType Static { get; } = new DataRefreshType(StaticValue); @@ -34,10 +32,6 @@ public DataRefreshType(string value) public static DataRefreshType RefreshPeriodicallyWithFull { get; } = new DataRefreshType(RefreshPeriodicallyWithFullValue); /// RefreshPeriodicallyWithDelta. public static DataRefreshType RefreshPeriodicallyWithDelta { get; } = new DataRefreshType(RefreshPeriodicallyWithDeltaValue); - /// Blocking. - public static DataRefreshType Blocking { get; } = new DataRefreshType(BlockingValue); - /// Nonblocking. - public static DataRefreshType Nonblocking { get; } = new DataRefreshType(NonblockingValue); /// Determines if two values are the same. public static bool operator ==(DataRefreshType left, DataRefreshType right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/FileReferenceInputDataSource.Serialization.cs b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/FileReferenceInputDataSource.Serialization.cs new file mode 100644 index 000000000000..4413765ad275 --- /dev/null +++ b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/FileReferenceInputDataSource.Serialization.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.StreamAnalytics.Models +{ + public partial class FileReferenceInputDataSource : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(ReferenceInputDataSourceType); + writer.WritePropertyName("properties"); + writer.WriteStartObject(); + if (Optional.IsDefined(Path)) + { + writer.WritePropertyName("path"); + writer.WriteStringValue(Path); + } + writer.WriteEndObject(); + writer.WriteEndObject(); + } + + internal static FileReferenceInputDataSource DeserializeFileReferenceInputDataSource(JsonElement element) + { + string type = default; + Optional path = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("path")) + { + path = property0.Value.GetString(); + continue; + } + } + continue; + } + } + return new FileReferenceInputDataSource(type, path.Value); + } + } +} diff --git a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/FileReferenceInputDataSource.cs b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/FileReferenceInputDataSource.cs new file mode 100644 index 000000000000..c987e86f8529 --- /dev/null +++ b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/FileReferenceInputDataSource.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.StreamAnalytics.Models +{ + /// Describes a file input data source that contains reference data. + public partial class FileReferenceInputDataSource : ReferenceInputDataSource + { + /// Initializes a new instance of FileReferenceInputDataSource. + public FileReferenceInputDataSource() + { + ReferenceInputDataSourceType = "File"; + } + + /// Initializes a new instance of FileReferenceInputDataSource. + /// Indicates the type of input data source containing reference data. Required on PUT (CreateOrReplace) requests. + /// The path of the file. + internal FileReferenceInputDataSource(string referenceInputDataSourceType, string path) : base(referenceInputDataSourceType) + { + Path = path; + ReferenceInputDataSourceType = referenceInputDataSourceType ?? "File"; + } + + /// The path of the file. + public string Path { get; set; } + } +} diff --git a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/GetStreamingJobSkuResult.Serialization.cs b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/GetStreamingJobSkuResult.Serialization.cs new file mode 100644 index 000000000000..6acd1cc7750d --- /dev/null +++ b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/GetStreamingJobSkuResult.Serialization.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.StreamAnalytics.Models +{ + public partial class GetStreamingJobSkuResult + { + internal static GetStreamingJobSkuResult DeserializeGetStreamingJobSkuResult(JsonElement element) + { + Optional resourceType = default; + Optional sku = default; + Optional capacity = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resourceType")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + resourceType = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("sku")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + sku = GetStreamingJobSkuResultSku.DeserializeGetStreamingJobSkuResultSku(property.Value); + continue; + } + if (property.NameEquals("capacity")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + capacity = SkuCapacity.DeserializeSkuCapacity(property.Value); + continue; + } + } + return new GetStreamingJobSkuResult(Optional.ToNullable(resourceType), sku.Value, capacity.Value); + } + } +} diff --git a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/GetStreamingJobSkuResult.cs b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/GetStreamingJobSkuResult.cs new file mode 100644 index 000000000000..5eac502ff9b2 --- /dev/null +++ b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/GetStreamingJobSkuResult.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.StreamAnalytics.Models +{ + /// Describes an available SKU information. + public partial class GetStreamingJobSkuResult + { + /// Initializes a new instance of GetStreamingJobSkuResult. + internal GetStreamingJobSkuResult() + { + } + + /// Initializes a new instance of GetStreamingJobSkuResult. + /// The type of resource the SKU applies to. + /// The properties that are associated with a SKU. + /// Describes scaling information of a SKU. + internal GetStreamingJobSkuResult(ResourceType? resourceType, GetStreamingJobSkuResultSku sku, SkuCapacity capacity) + { + ResourceType = resourceType; + Sku = sku; + Capacity = capacity; + } + + /// The type of resource the SKU applies to. + public ResourceType? ResourceType { get; } + /// The properties that are associated with a SKU. + internal GetStreamingJobSkuResultSku Sku { get; } + /// The name of the SKU. + public StreamAnalyticsSkuName? SkuName + { + get => Sku?.Name; + } + + /// Describes scaling information of a SKU. + public SkuCapacity Capacity { get; } + } +} diff --git a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/GetStreamingJobSkuResultSku.Serialization.cs b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/GetStreamingJobSkuResultSku.Serialization.cs new file mode 100644 index 000000000000..1a71ab6c3eb6 --- /dev/null +++ b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/GetStreamingJobSkuResultSku.Serialization.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.StreamAnalytics.Models +{ + internal partial class GetStreamingJobSkuResultSku + { + internal static GetStreamingJobSkuResultSku DeserializeGetStreamingJobSkuResultSku(JsonElement element) + { + Optional name = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + name = new StreamAnalyticsSkuName(property.Value.GetString()); + continue; + } + } + return new GetStreamingJobSkuResultSku(Optional.ToNullable(name)); + } + } +} diff --git a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/GetStreamingJobSkuResultSku.cs b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/GetStreamingJobSkuResultSku.cs new file mode 100644 index 000000000000..a93522b30bce --- /dev/null +++ b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/GetStreamingJobSkuResultSku.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.StreamAnalytics.Models +{ + /// The properties that are associated with a SKU. + internal partial class GetStreamingJobSkuResultSku + { + /// Initializes a new instance of GetStreamingJobSkuResultSku. + internal GetStreamingJobSkuResultSku() + { + } + + /// Initializes a new instance of GetStreamingJobSkuResultSku. + /// The name of the SKU. + internal GetStreamingJobSkuResultSku(StreamAnalyticsSkuName? name) + { + Name = name; + } + + /// The name of the SKU. + public StreamAnalyticsSkuName? Name { get; } + } +} diff --git a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/GetStreamingJobSkuResults.Serialization.cs b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/GetStreamingJobSkuResults.Serialization.cs new file mode 100644 index 000000000000..8d5dc35a9fe3 --- /dev/null +++ b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/GetStreamingJobSkuResults.Serialization.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.StreamAnalytics.Models +{ + internal partial class GetStreamingJobSkuResults + { + internal static GetStreamingJobSkuResults DeserializeGetStreamingJobSkuResults(JsonElement element) + { + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(GetStreamingJobSkuResult.DeserializeGetStreamingJobSkuResult(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink")) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new GetStreamingJobSkuResults(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/GetStreamingJobSkuResults.cs b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/GetStreamingJobSkuResults.cs new file mode 100644 index 000000000000..8a0576c5fadb --- /dev/null +++ b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/GetStreamingJobSkuResults.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.StreamAnalytics.Models +{ + /// Result of the request to get streaming job SKUs. + internal partial class GetStreamingJobSkuResults + { + /// Initializes a new instance of GetStreamingJobSkuResults. + internal GetStreamingJobSkuResults() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of GetStreamingJobSkuResults. + /// The list of available SKUs that the streaming job can use. + /// The link (url) to the next page of results. + internal GetStreamingJobSkuResults(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// The list of available SKUs that the streaming job can use. + public IReadOnlyList Value { get; } + /// The link (url) to the next page of results. + public string NextLink { get; } + } +} diff --git a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/ReferenceInputDataSource.Serialization.cs b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/ReferenceInputDataSource.Serialization.cs index a29ae28c8f40..73d6ddcd5fb7 100644 --- a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/ReferenceInputDataSource.Serialization.cs +++ b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/ReferenceInputDataSource.Serialization.cs @@ -26,6 +26,7 @@ internal static ReferenceInputDataSource DeserializeReferenceInputDataSource(Jso { switch (discriminator.GetString()) { + case "File": return FileReferenceInputDataSource.DeserializeFileReferenceInputDataSource(element); case "Microsoft.Sql/Server/Database": return SqlReferenceInputDataSource.DeserializeSqlReferenceInputDataSource(element); case "Microsoft.Storage/Blob": return BlobReferenceInputDataSource.DeserializeBlobReferenceInputDataSource(element); case "Raw": return RawReferenceInputDataSource.DeserializeRawReferenceInputDataSource(element); diff --git a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/ReferenceInputDataSource.cs b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/ReferenceInputDataSource.cs index 7a61e2969730..9bed20b8e2cd 100644 --- a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/ReferenceInputDataSource.cs +++ b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/ReferenceInputDataSource.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.StreamAnalytics.Models /// /// Describes an input data source that contains reference data. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . + /// The available derived classes include , , and . /// public partial class ReferenceInputDataSource { diff --git a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/ReferenceInputProperties.cs b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/ReferenceInputProperties.cs index c8c6da16dbdc..2dc7cd12d86d 100644 --- a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/ReferenceInputProperties.cs +++ b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/ReferenceInputProperties.cs @@ -33,7 +33,7 @@ public ReferenceInputProperties() /// /// Describes an input data source that contains reference data. Required on PUT (CreateOrReplace) requests. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . + /// The available derived classes include , , and . /// internal ReferenceInputProperties(string inputPropertiesType, StreamAnalyticsDataSerialization serialization, StreamingJobDiagnostics diagnostics, ETag? etag, StreamingCompression compression, string partitionKey, StreamingJobInputWatermarkProperties watermarkSettings, ReferenceInputDataSource datasource) : base(inputPropertiesType, serialization, diagnostics, etag, compression, partitionKey, watermarkSettings) { @@ -44,7 +44,7 @@ internal ReferenceInputProperties(string inputPropertiesType, StreamAnalyticsDat /// /// Describes an input data source that contains reference data. Required on PUT (CreateOrReplace) requests. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . + /// The available derived classes include , , and . /// public ReferenceInputDataSource Datasource { get; set; } } diff --git a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/ResourceType.cs b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/ResourceType.cs new file mode 100644 index 000000000000..b4989affc20a --- /dev/null +++ b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/ResourceType.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.StreamAnalytics.Models +{ + /// The type of resource the SKU applies to. + public readonly partial struct ResourceType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ResourceType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string MicrosoftStreamAnalyticsStreamingjobsValue = "Microsoft.StreamAnalytics/streamingjobs"; + + /// Microsoft.StreamAnalytics/streamingjobs. + public static ResourceType MicrosoftStreamAnalyticsStreamingjobs { get; } = new ResourceType(MicrosoftStreamAnalyticsStreamingjobsValue); + /// Determines if two values are the same. + public static bool operator ==(ResourceType left, ResourceType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ResourceType left, ResourceType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ResourceType(string value) => new ResourceType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ResourceType other && Equals(other); + /// + public bool Equals(ResourceType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/SkuCapacity.Serialization.cs b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/SkuCapacity.Serialization.cs new file mode 100644 index 000000000000..1f4ea2588e38 --- /dev/null +++ b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/SkuCapacity.Serialization.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.StreamAnalytics.Models +{ + public partial class SkuCapacity + { + internal static SkuCapacity DeserializeSkuCapacity(JsonElement element) + { + Optional minimum = default; + Optional maximum = default; + Optional @default = default; + Optional scaleType = default; + Optional> allowedValues = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("minimum")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + minimum = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("maximum")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + maximum = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("default")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + @default = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("scaleType")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + scaleType = new SkuCapacityScaleType(property.Value.GetString()); + continue; + } + if (property.NameEquals("allowedValues")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetInt32()); + } + allowedValues = array; + continue; + } + } + return new SkuCapacity(Optional.ToNullable(minimum), Optional.ToNullable(maximum), Optional.ToNullable(@default), Optional.ToNullable(scaleType), Optional.ToList(allowedValues)); + } + } +} diff --git a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/SkuCapacity.cs b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/SkuCapacity.cs new file mode 100644 index 000000000000..8e8283e2cea2 --- /dev/null +++ b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/SkuCapacity.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.StreamAnalytics.Models +{ + /// Describes scaling information of a SKU. + public partial class SkuCapacity + { + /// Initializes a new instance of SkuCapacity. + internal SkuCapacity() + { + AllowedValues = new ChangeTrackingList(); + } + + /// Initializes a new instance of SkuCapacity. + /// Specifies the minimum streaming units that the streaming job can use. + /// Specifies the maximum streaming units that the streaming job can use. + /// Specifies the default streaming units that the streaming job can use. + /// The scale type applicable to the SKU. + /// Specifies the valid streaming units a streaming job can scale to. + internal SkuCapacity(int? minimum, int? maximum, int? @default, SkuCapacityScaleType? scaleType, IReadOnlyList allowedValues) + { + Minimum = minimum; + Maximum = maximum; + Default = @default; + ScaleType = scaleType; + AllowedValues = allowedValues; + } + + /// Specifies the minimum streaming units that the streaming job can use. + public int? Minimum { get; } + /// Specifies the maximum streaming units that the streaming job can use. + public int? Maximum { get; } + /// Specifies the default streaming units that the streaming job can use. + public int? Default { get; } + /// The scale type applicable to the SKU. + public SkuCapacityScaleType? ScaleType { get; } + /// Specifies the valid streaming units a streaming job can scale to. + public IReadOnlyList AllowedValues { get; } + } +} diff --git a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/SkuCapacityScaleType.cs b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/SkuCapacityScaleType.cs new file mode 100644 index 000000000000..b5b326bd120f --- /dev/null +++ b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/SkuCapacityScaleType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.StreamAnalytics.Models +{ + /// The scale type applicable to the SKU. + public readonly partial struct SkuCapacityScaleType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SkuCapacityScaleType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AutomaticValue = "automatic"; + private const string ManualValue = "manual"; + private const string NoneValue = "none"; + + /// Supported scale type automatic. + public static SkuCapacityScaleType Automatic { get; } = new SkuCapacityScaleType(AutomaticValue); + /// Supported scale type manual. + public static SkuCapacityScaleType Manual { get; } = new SkuCapacityScaleType(ManualValue); + /// Scaling not supported. + public static SkuCapacityScaleType None { get; } = new SkuCapacityScaleType(NoneValue); + /// Determines if two values are the same. + public static bool operator ==(SkuCapacityScaleType left, SkuCapacityScaleType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SkuCapacityScaleType left, SkuCapacityScaleType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator SkuCapacityScaleType(string value) => new SkuCapacityScaleType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SkuCapacityScaleType other && Equals(other); + /// + public bool Equals(SkuCapacityScaleType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/StreamAnalyticsClusterData.Serialization.cs b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/StreamAnalyticsClusterData.Serialization.cs index a3203911baf7..78b365cb0ae2 100644 --- a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/StreamAnalyticsClusterData.Serialization.cs +++ b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/StreamAnalyticsClusterData.Serialization.cs @@ -54,7 +54,7 @@ internal static StreamAnalyticsClusterData DeserializeStreamAnalyticsClusterData AzureLocation location = default; ResourceIdentifier id = default; string name = default; - ResourceType type = default; + Core.ResourceType type = default; Optional systemData = default; foreach (var property in element.EnumerateObject()) { @@ -120,7 +120,7 @@ internal static StreamAnalyticsClusterData DeserializeStreamAnalyticsClusterData } if (property.NameEquals("type")) { - type = new ResourceType(property.Value.GetString()); + type = new Core.ResourceType(property.Value.GetString()); continue; } if (property.NameEquals("systemData")) diff --git a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/StreamAnalyticsPrivateEndpointData.Serialization.cs b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/StreamAnalyticsPrivateEndpointData.Serialization.cs index beb58f2c6e87..941794f309f4 100644 --- a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/StreamAnalyticsPrivateEndpointData.Serialization.cs +++ b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/StreamAnalyticsPrivateEndpointData.Serialization.cs @@ -32,7 +32,7 @@ internal static StreamAnalyticsPrivateEndpointData DeserializeStreamAnalyticsPri Optional etag = default; ResourceIdentifier id = default; string name = default; - ResourceType type = default; + Core.ResourceType type = default; Optional systemData = default; foreach (var property in element.EnumerateObject()) { @@ -68,7 +68,7 @@ internal static StreamAnalyticsPrivateEndpointData DeserializeStreamAnalyticsPri } if (property.NameEquals("type")) { - type = new ResourceType(property.Value.GetString()); + type = new Core.ResourceType(property.Value.GetString()); continue; } if (property.NameEquals("systemData")) diff --git a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/StreamAnalyticsSku.Serialization.cs b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/StreamAnalyticsSku.Serialization.cs index b721f5240cc6..367c61e8fb8e 100644 --- a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/StreamAnalyticsSku.Serialization.cs +++ b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/StreamAnalyticsSku.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.StreamAnalytics.Models { - internal partial class StreamAnalyticsSku : IUtf8JsonSerializable + public partial class StreamAnalyticsSku : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -20,12 +20,18 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("name"); writer.WriteStringValue(Name.Value.ToString()); } + if (Optional.IsDefined(Capacity)) + { + writer.WritePropertyName("capacity"); + writer.WriteNumberValue(Capacity.Value); + } writer.WriteEndObject(); } internal static StreamAnalyticsSku DeserializeStreamAnalyticsSku(JsonElement element) { Optional name = default; + Optional capacity = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("name")) @@ -38,8 +44,18 @@ internal static StreamAnalyticsSku DeserializeStreamAnalyticsSku(JsonElement ele name = new StreamAnalyticsSkuName(property.Value.GetString()); continue; } + if (property.NameEquals("capacity")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + capacity = property.Value.GetInt32(); + continue; + } } - return new StreamAnalyticsSku(Optional.ToNullable(name)); + return new StreamAnalyticsSku(Optional.ToNullable(name), Optional.ToNullable(capacity)); } } } diff --git a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/StreamAnalyticsSku.cs b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/StreamAnalyticsSku.cs index 84cea4e8ccfc..229dd44fe76c 100644 --- a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/StreamAnalyticsSku.cs +++ b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/StreamAnalyticsSku.cs @@ -8,7 +8,7 @@ namespace Azure.ResourceManager.StreamAnalytics.Models { /// The properties that are associated with a SKU. - internal partial class StreamAnalyticsSku + public partial class StreamAnalyticsSku { /// Initializes a new instance of StreamAnalyticsSku. public StreamAnalyticsSku() @@ -17,12 +17,16 @@ public StreamAnalyticsSku() /// Initializes a new instance of StreamAnalyticsSku. /// The name of the SKU. Required on PUT (CreateOrReplace) requests. - internal StreamAnalyticsSku(StreamAnalyticsSkuName? name) + /// The capacity of the SKU. + internal StreamAnalyticsSku(StreamAnalyticsSkuName? name, int? capacity) { Name = name; + Capacity = capacity; } /// The name of the SKU. Required on PUT (CreateOrReplace) requests. public StreamAnalyticsSkuName? Name { get; set; } + /// The capacity of the SKU. + public int? Capacity { get; set; } } } diff --git a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/StreamAnalyticsSubResource.Serialization.cs b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/StreamAnalyticsSubResource.Serialization.cs index cc9e109efbd9..2c49c8e3fb5d 100644 --- a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/StreamAnalyticsSubResource.Serialization.cs +++ b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/StreamAnalyticsSubResource.Serialization.cs @@ -27,7 +27,7 @@ internal static StreamAnalyticsSubResource DeserializeStreamAnalyticsSubResource { Optional id = default; Optional name = default; - Optional type = default; + Optional type = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("id")) @@ -52,7 +52,7 @@ internal static StreamAnalyticsSubResource DeserializeStreamAnalyticsSubResource property.ThrowNonNullablePropertyIsNull(); continue; } - type = new ResourceType(property.Value.GetString()); + type = new Core.ResourceType(property.Value.GetString()); continue; } } diff --git a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/StreamAnalyticsSubResource.cs b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/StreamAnalyticsSubResource.cs index 6ce9214d1504..debbad14ae67 100644 --- a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/StreamAnalyticsSubResource.cs +++ b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/StreamAnalyticsSubResource.cs @@ -21,7 +21,7 @@ public StreamAnalyticsSubResource() /// Resource Id. /// Resource name. /// Resource type. - internal StreamAnalyticsSubResource(ResourceIdentifier id, string name, ResourceType? resourceType) + internal StreamAnalyticsSubResource(ResourceIdentifier id, string name, Core.ResourceType? resourceType) { Id = id; Name = name; @@ -33,6 +33,6 @@ internal StreamAnalyticsSubResource(ResourceIdentifier id, string name, Resource /// Resource name. public string Name { get; set; } /// Resource type. - public ResourceType? ResourceType { get; } + public Core.ResourceType? ResourceType { get; } } } diff --git a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/StreamAnalyticsSubscriptionQuota.Serialization.cs b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/StreamAnalyticsSubscriptionQuota.Serialization.cs index 0b767a1bff28..0a5b21c5dded 100644 --- a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/StreamAnalyticsSubscriptionQuota.Serialization.cs +++ b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/StreamAnalyticsSubscriptionQuota.Serialization.cs @@ -30,7 +30,7 @@ internal static StreamAnalyticsSubscriptionQuota DeserializeStreamAnalyticsSubsc { Optional id = default; Optional name = default; - Optional type = default; + Optional type = default; Optional maxCount = default; Optional currentCount = default; foreach (var property in element.EnumerateObject()) @@ -57,7 +57,7 @@ internal static StreamAnalyticsSubscriptionQuota DeserializeStreamAnalyticsSubsc property.ThrowNonNullablePropertyIsNull(); continue; } - type = new ResourceType(property.Value.GetString()); + type = new Core.ResourceType(property.Value.GetString()); continue; } if (property.NameEquals("properties")) diff --git a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/StreamAnalyticsSubscriptionQuota.cs b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/StreamAnalyticsSubscriptionQuota.cs index 7f24df4b8377..d6bd07c37576 100644 --- a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/StreamAnalyticsSubscriptionQuota.cs +++ b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/StreamAnalyticsSubscriptionQuota.cs @@ -23,7 +23,7 @@ public StreamAnalyticsSubscriptionQuota() /// Resource type. /// The max permitted usage of this resource. /// The current usage of this resource. - internal StreamAnalyticsSubscriptionQuota(ResourceIdentifier id, string name, ResourceType? resourceType, int? maxCount, int? currentCount) : base(id, name, resourceType) + internal StreamAnalyticsSubscriptionQuota(ResourceIdentifier id, string name, Core.ResourceType? resourceType, int? maxCount, int? currentCount) : base(id, name, resourceType) { MaxCount = maxCount; CurrentCount = currentCount; diff --git a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/StreamingJobData.Serialization.cs b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/StreamingJobData.Serialization.cs index f649f07a4765..aa071d7874bd 100644 --- a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/StreamingJobData.Serialization.cs +++ b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/StreamingJobData.Serialization.cs @@ -21,6 +21,11 @@ public partial class StreamingJobData : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); + if (Optional.IsDefined(Sku)) + { + writer.WritePropertyName("sku"); + writer.WriteObjectValue(Sku); + } if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"); @@ -42,10 +47,10 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteStringValue(Location); writer.WritePropertyName("properties"); writer.WriteStartObject(); - if (Optional.IsDefined(Sku)) + if (Optional.IsDefined(SkuPropertiesSku)) { writer.WritePropertyName("sku"); - writer.WriteObjectValue(Sku); + writer.WriteObjectValue(SkuPropertiesSku); } if (Optional.IsDefined(JobType)) { @@ -153,14 +158,15 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) internal static StreamingJobData DeserializeStreamingJobData(JsonElement element) { + Optional sku = default; Optional identity = default; Optional> tags = default; AzureLocation location = default; ResourceIdentifier id = default; string name = default; - ResourceType type = default; + Core.ResourceType type = default; Optional systemData = default; - Optional sku = default; + Optional sku0 = default; Optional jobId = default; Optional provisioningState = default; Optional jobState = default; @@ -186,6 +192,16 @@ internal static StreamingJobData DeserializeStreamingJobData(JsonElement element Optional cluster = default; foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("sku")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + sku = StreamAnalyticsSku.DeserializeStreamAnalyticsSku(property.Value); + continue; + } if (property.NameEquals("identity")) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -229,7 +245,7 @@ internal static StreamingJobData DeserializeStreamingJobData(JsonElement element } if (property.NameEquals("type")) { - type = new ResourceType(property.Value.GetString()); + type = new Core.ResourceType(property.Value.GetString()); continue; } if (property.NameEquals("systemData")) @@ -258,7 +274,7 @@ internal static StreamingJobData DeserializeStreamingJobData(JsonElement element property0.ThrowNonNullablePropertyIsNull(); continue; } - sku = StreamAnalyticsSku.DeserializeStreamAnalyticsSku(property0.Value); + sku0 = StreamAnalyticsSku.DeserializeStreamAnalyticsSku(property0.Value); continue; } if (property0.NameEquals("jobId")) @@ -500,7 +516,7 @@ internal static StreamingJobData DeserializeStreamingJobData(JsonElement element continue; } } - return new StreamingJobData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, identity, sku.Value, Optional.ToNullable(jobId), provisioningState.Value, jobState.Value, Optional.ToNullable(jobType), Optional.ToNullable(outputStartMode), Optional.ToNullable(outputStartTime), Optional.ToNullable(lastOutputEventTime), Optional.ToNullable(eventsOutOfOrderPolicy), Optional.ToNullable(outputErrorPolicy), Optional.ToNullable(eventsOutOfOrderMaxDelayInSeconds), Optional.ToNullable(eventsLateArrivalMaxDelayInSeconds), Optional.ToNullable(dataLocale), Optional.ToNullable(compatibilityLevel), Optional.ToNullable(createdDate), Optional.ToList(inputs), transformation.Value, Optional.ToList(outputs), Optional.ToList(functions), Optional.ToNullable(etag), jobStorageAccount.Value, Optional.ToNullable(contentStoragePolicy), externals.Value, cluster); + return new StreamingJobData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, sku.Value, identity, sku0.Value, Optional.ToNullable(jobId), provisioningState.Value, jobState.Value, Optional.ToNullable(jobType), Optional.ToNullable(outputStartMode), Optional.ToNullable(outputStartTime), Optional.ToNullable(lastOutputEventTime), Optional.ToNullable(eventsOutOfOrderPolicy), Optional.ToNullable(outputErrorPolicy), Optional.ToNullable(eventsOutOfOrderMaxDelayInSeconds), Optional.ToNullable(eventsLateArrivalMaxDelayInSeconds), Optional.ToNullable(dataLocale), Optional.ToNullable(compatibilityLevel), Optional.ToNullable(createdDate), Optional.ToList(inputs), transformation.Value, Optional.ToList(outputs), Optional.ToList(functions), Optional.ToNullable(etag), jobStorageAccount.Value, Optional.ToNullable(contentStoragePolicy), externals.Value, cluster); } } } diff --git a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/StreamingJobFunctionData.Serialization.cs b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/StreamingJobFunctionData.Serialization.cs index 8be4b4f71a44..d510b8393c66 100644 --- a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/StreamingJobFunctionData.Serialization.cs +++ b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/StreamingJobFunctionData.Serialization.cs @@ -34,7 +34,7 @@ internal static StreamingJobFunctionData DeserializeStreamingJobFunctionData(Jso Optional properties = default; Optional id = default; Optional name = default; - Optional type = default; + Optional type = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("properties")) @@ -69,7 +69,7 @@ internal static StreamingJobFunctionData DeserializeStreamingJobFunctionData(Jso property.ThrowNonNullablePropertyIsNull(); continue; } - type = new ResourceType(property.Value.GetString()); + type = new Core.ResourceType(property.Value.GetString()); continue; } } diff --git a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/StreamingJobInputData.Serialization.cs b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/StreamingJobInputData.Serialization.cs index 60cb749edb3d..df98622b5bc2 100644 --- a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/StreamingJobInputData.Serialization.cs +++ b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/StreamingJobInputData.Serialization.cs @@ -34,7 +34,7 @@ internal static StreamingJobInputData DeserializeStreamingJobInputData(JsonEleme Optional properties = default; Optional id = default; Optional name = default; - Optional type = default; + Optional type = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("properties")) @@ -69,7 +69,7 @@ internal static StreamingJobInputData DeserializeStreamingJobInputData(JsonEleme property.ThrowNonNullablePropertyIsNull(); continue; } - type = new ResourceType(property.Value.GetString()); + type = new Core.ResourceType(property.Value.GetString()); continue; } } diff --git a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/StreamingJobOutputData.Serialization.cs b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/StreamingJobOutputData.Serialization.cs index 51008dec239d..0bb75a23127a 100644 --- a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/StreamingJobOutputData.Serialization.cs +++ b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/StreamingJobOutputData.Serialization.cs @@ -59,7 +59,7 @@ internal static StreamingJobOutputData DeserializeStreamingJobOutputData(JsonEle { Optional id = default; Optional name = default; - Optional type = default; + Optional type = default; Optional datasource = default; Optional timeWindow = default; Optional sizeWindow = default; @@ -92,7 +92,7 @@ internal static StreamingJobOutputData DeserializeStreamingJobOutputData(JsonEle property.ThrowNonNullablePropertyIsNull(); continue; } - type = new ResourceType(property.Value.GetString()); + type = new Core.ResourceType(property.Value.GetString()); continue; } if (property.NameEquals("properties")) diff --git a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/StreamingJobRefreshConfiguration.Serialization.cs b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/StreamingJobRefreshConfiguration.Serialization.cs index 7fbbb00fe839..035c9b0cb83e 100644 --- a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/StreamingJobRefreshConfiguration.Serialization.cs +++ b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/StreamingJobRefreshConfiguration.Serialization.cs @@ -49,7 +49,7 @@ internal static StreamingJobRefreshConfiguration DeserializeStreamingJobRefreshC Optional dateFormat = default; Optional timeFormat = default; Optional refreshInterval = default; - Optional refreshType = default; + Optional refreshType = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("pathPattern")) @@ -79,7 +79,7 @@ internal static StreamingJobRefreshConfiguration DeserializeStreamingJobRefreshC property.ThrowNonNullablePropertyIsNull(); continue; } - refreshType = new DataRefreshType(property.Value.GetString()); + refreshType = new UpdatableUdfRefreshType(property.Value.GetString()); continue; } } diff --git a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/StreamingJobRefreshConfiguration.cs b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/StreamingJobRefreshConfiguration.cs index fb3430e09755..9cd65cacbf37 100644 --- a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/StreamingJobRefreshConfiguration.cs +++ b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/StreamingJobRefreshConfiguration.cs @@ -21,7 +21,7 @@ public StreamingJobRefreshConfiguration() /// The time format. Wherever {time} appears in pathPattern, the value of this property is used as the time format instead. /// The refresh interval. /// This property indicates which data refresh option to use, Blocking or Nonblocking. - internal StreamingJobRefreshConfiguration(string pathPattern, string dateFormat, string timeFormat, string refreshInterval, DataRefreshType? refreshType) + internal StreamingJobRefreshConfiguration(string pathPattern, string dateFormat, string timeFormat, string refreshInterval, UpdatableUdfRefreshType? refreshType) { PathPattern = pathPattern; DateFormat = dateFormat; @@ -39,6 +39,6 @@ internal StreamingJobRefreshConfiguration(string pathPattern, string dateFormat, /// The refresh interval. public string RefreshInterval { get; set; } /// This property indicates which data refresh option to use, Blocking or Nonblocking. - public DataRefreshType? RefreshType { get; set; } + public UpdatableUdfRefreshType? RefreshType { get; set; } } } diff --git a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/UpdatableUdfRefreshType.cs b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/UpdatableUdfRefreshType.cs new file mode 100644 index 000000000000..168ef2fd7ef3 --- /dev/null +++ b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/Models/UpdatableUdfRefreshType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.StreamAnalytics.Models +{ + /// This property indicates which data refresh option to use, Blocking or Nonblocking. + public readonly partial struct UpdatableUdfRefreshType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public UpdatableUdfRefreshType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string BlockingValue = "Blocking"; + private const string NonblockingValue = "Nonblocking"; + + /// Blocking. + public static UpdatableUdfRefreshType Blocking { get; } = new UpdatableUdfRefreshType(BlockingValue); + /// Nonblocking. + public static UpdatableUdfRefreshType Nonblocking { get; } = new UpdatableUdfRefreshType(NonblockingValue); + /// Determines if two values are the same. + public static bool operator ==(UpdatableUdfRefreshType left, UpdatableUdfRefreshType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(UpdatableUdfRefreshType left, UpdatableUdfRefreshType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator UpdatableUdfRefreshType(string value) => new UpdatableUdfRefreshType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is UpdatableUdfRefreshType other && Equals(other); + /// + public bool Equals(UpdatableUdfRefreshType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/RestOperations/SkuRestOperations.cs b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/RestOperations/SkuRestOperations.cs new file mode 100644 index 000000000000..c14737c834bf --- /dev/null +++ b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/RestOperations/SkuRestOperations.cs @@ -0,0 +1,195 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.StreamAnalytics.Models; + +namespace Azure.ResourceManager.StreamAnalytics +{ + internal partial class SkuRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of SkuRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public SkuRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2021-10-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string jobName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourcegroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.StreamAnalytics/streamingjobs/", false); + uri.AppendPath(jobName, true); + uri.AppendPath("/skus", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a list of available SKUs about the specified streaming job. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the streaming job. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string jobName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, jobName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + GetStreamingJobSkuResults value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = GetStreamingJobSkuResults.DeserializeGetStreamingJobSkuResults(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a list of available SKUs about the specified streaming job. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the streaming job. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string jobName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, jobName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + GetStreamingJobSkuResults value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = GetStreamingJobSkuResults.DeserializeGetStreamingJobSkuResults(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string jobName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a list of available SKUs about the specified streaming job. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the streaming job. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string jobName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, jobName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + GetStreamingJobSkuResults value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = GetStreamingJobSkuResults.DeserializeGetStreamingJobSkuResults(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a list of available SKUs about the specified streaming job. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the streaming job. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string jobName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, jobName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + GetStreamingJobSkuResults value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = GetStreamingJobSkuResults.DeserializeGetStreamingJobSkuResults(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamAnalyticsClusterData.cs b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamAnalyticsClusterData.cs index fef9ea8f2e7d..d426ff659631 100644 --- a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamAnalyticsClusterData.cs +++ b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamAnalyticsClusterData.cs @@ -32,7 +32,7 @@ public StreamAnalyticsClusterData(AzureLocation location) : base(location) /// The SKU of the cluster. This determines the size/capacity of the cluster. Required on PUT (CreateOrUpdate) requests. /// The current entity tag for the cluster. This is an opaque string. You can use it to detect whether the resource has changed between requests. You can also use it in the If-Match or If-None-Match headers for write operations for optimistic concurrency. /// The properties associated with a Stream Analytics cluster. - internal StreamAnalyticsClusterData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, StreamAnalyticsClusterSku sku, ETag? etag, StreamAnalyticsClusterProperties properties) : base(id, name, resourceType, systemData, tags, location) + internal StreamAnalyticsClusterData(ResourceIdentifier id, string name, Core.ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, StreamAnalyticsClusterSku sku, ETag? etag, StreamAnalyticsClusterProperties properties) : base(id, name, resourceType, systemData, tags, location) { Sku = sku; ETag = etag; diff --git a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamAnalyticsClusterResource.cs b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamAnalyticsClusterResource.cs index 491c8ea2b60c..5e19ba3047ad 100644 --- a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamAnalyticsClusterResource.cs +++ b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamAnalyticsClusterResource.cs @@ -66,7 +66,7 @@ internal StreamAnalyticsClusterResource(ArmClient client, ResourceIdentifier id) } /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.StreamAnalytics/clusters"; + public static readonly Core.ResourceType ResourceType = "Microsoft.StreamAnalytics/clusters"; /// Gets whether or not the current instance has data. public virtual bool HasData { get; } diff --git a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamAnalyticsPrivateEndpointData.cs b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamAnalyticsPrivateEndpointData.cs index faaeceb9ae79..b7b64ed36b46 100644 --- a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamAnalyticsPrivateEndpointData.cs +++ b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamAnalyticsPrivateEndpointData.cs @@ -27,7 +27,7 @@ public StreamAnalyticsPrivateEndpointData() /// The systemData. /// The properties associated with a private endpoint. /// Unique opaque string (generally a GUID) that represents the metadata state of the resource (private endpoint) and changes whenever the resource is updated. Required on PUT (CreateOrUpdate) requests. - internal StreamAnalyticsPrivateEndpointData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, StreamAnalyticsPrivateEndpointProperties properties, ETag? etag) : base(id, name, resourceType, systemData) + internal StreamAnalyticsPrivateEndpointData(ResourceIdentifier id, string name, Core.ResourceType resourceType, SystemData systemData, StreamAnalyticsPrivateEndpointProperties properties, ETag? etag) : base(id, name, resourceType, systemData) { Properties = properties; ETag = etag; diff --git a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamingJobData.cs b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamingJobData.cs index 27c6ce90251a..34d367ce1851 100644 --- a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamingJobData.cs +++ b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamingJobData.cs @@ -34,8 +34,9 @@ public StreamingJobData(AzureLocation location) : base(location) /// The systemData. /// The tags. /// The location. - /// Describes the managed identity assigned to this job that can be used to authenticate with inputs and outputs. Current supported identity types: SystemAssigned, UserAssigned, SystemAssigned,UserAssigned. /// Describes the SKU of the streaming job. Required on PUT (CreateOrReplace) requests. + /// Describes the managed identity assigned to this job that can be used to authenticate with inputs and outputs. Current supported identity types: SystemAssigned, UserAssigned, SystemAssigned,UserAssigned. + /// Describes the SKU of the streaming job. Required on PUT (CreateOrReplace) requests. /// A GUID uniquely identifying the streaming job. This GUID is generated upon creation of the streaming job. /// Describes the provisioning status of the streaming job. /// Describes the state of the streaming job. @@ -59,10 +60,11 @@ public StreamingJobData(AzureLocation location) : base(location) /// Valid values are JobStorageAccount and SystemAccount. If set to JobStorageAccount, this requires the user to also specify jobStorageAccount property. . /// The storage account where the custom code artifacts are located. /// The cluster which streaming jobs will run on. - internal StreamingJobData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, StreamAnalyticsSku sku, Guid? jobId, string provisioningState, string jobState, StreamingJobType? jobType, StreamingJobOutputStartMode? outputStartMode, DateTimeOffset? outputStartOn, DateTimeOffset? lastOutputEventOn, EventsOutOfOrderPolicy? eventsOutOfOrderPolicy, StreamingJobOutputErrorPolicy? outputErrorPolicy, int? eventsOutOfOrderMaxDelayInSeconds, int? eventsLateArrivalMaxDelayInSeconds, AzureLocation? dataLocalion, StreamingJobCompatibilityLevel? compatibilityLevel, DateTimeOffset? createdOn, IList inputs, StreamingJobTransformationData transformation, IList outputs, IList functions, ETag? etag, StreamingJobStorageAccount jobStorageAccount, StreamingJobContentStoragePolicy? contentStoragePolicy, StreamingJobExternal externals, WritableSubResource cluster) : base(id, name, resourceType, systemData, tags, location) + internal StreamingJobData(ResourceIdentifier id, string name, Core.ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, StreamAnalyticsSku sku, ManagedServiceIdentity identity, StreamAnalyticsSku skuPropertiesSku, Guid? jobId, string provisioningState, string jobState, StreamingJobType? jobType, StreamingJobOutputStartMode? outputStartMode, DateTimeOffset? outputStartOn, DateTimeOffset? lastOutputEventOn, EventsOutOfOrderPolicy? eventsOutOfOrderPolicy, StreamingJobOutputErrorPolicy? outputErrorPolicy, int? eventsOutOfOrderMaxDelayInSeconds, int? eventsLateArrivalMaxDelayInSeconds, AzureLocation? dataLocalion, StreamingJobCompatibilityLevel? compatibilityLevel, DateTimeOffset? createdOn, IList inputs, StreamingJobTransformationData transformation, IList outputs, IList functions, ETag? etag, StreamingJobStorageAccount jobStorageAccount, StreamingJobContentStoragePolicy? contentStoragePolicy, StreamingJobExternal externals, WritableSubResource cluster) : base(id, name, resourceType, systemData, tags, location) { - Identity = identity; Sku = sku; + Identity = identity; + SkuPropertiesSku = skuPropertiesSku; JobId = jobId; ProvisioningState = provisioningState; JobState = jobState; @@ -88,22 +90,12 @@ internal StreamingJobData(ResourceIdentifier id, string name, ResourceType resou Cluster = cluster; } + /// Describes the SKU of the streaming job. Required on PUT (CreateOrReplace) requests. + public StreamAnalyticsSku Sku { get; set; } /// Describes the managed identity assigned to this job that can be used to authenticate with inputs and outputs. Current supported identity types: SystemAssigned, UserAssigned, SystemAssigned,UserAssigned. public ManagedServiceIdentity Identity { get; set; } /// Describes the SKU of the streaming job. Required on PUT (CreateOrReplace) requests. - internal StreamAnalyticsSku Sku { get; set; } - /// The name of the SKU. Required on PUT (CreateOrReplace) requests. - public StreamAnalyticsSkuName? SkuName - { - get => Sku is null ? default : Sku.Name; - set - { - if (Sku is null) - Sku = new StreamAnalyticsSku(); - Sku.Name = value; - } - } - + public StreamAnalyticsSku SkuPropertiesSku { get; set; } /// A GUID uniquely identifying the streaming job. This GUID is generated upon creation of the streaming job. public Guid? JobId { get; } /// Describes the provisioning status of the streaming job. diff --git a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamingJobFunctionData.cs b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamingJobFunctionData.cs index 652ff2381738..16ada44c9d2d 100644 --- a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamingJobFunctionData.cs +++ b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamingJobFunctionData.cs @@ -27,7 +27,7 @@ public StreamingJobFunctionData() /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include and . /// - internal StreamingJobFunctionData(ResourceIdentifier id, string name, ResourceType? resourceType, StreamingJobFunctionProperties properties) : base(id, name, resourceType) + internal StreamingJobFunctionData(ResourceIdentifier id, string name, Core.ResourceType? resourceType, StreamingJobFunctionProperties properties) : base(id, name, resourceType) { Properties = properties; } diff --git a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamingJobFunctionResource.cs b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamingJobFunctionResource.cs index 2f9a2e55d7f0..5e909a8dd5a7 100644 --- a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamingJobFunctionResource.cs +++ b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamingJobFunctionResource.cs @@ -64,7 +64,7 @@ internal StreamingJobFunctionResource(ArmClient client, ResourceIdentifier id) : } /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.StreamAnalytics/streamingjobs/functions"; + public static readonly Core.ResourceType ResourceType = "Microsoft.StreamAnalytics/streamingjobs/functions"; /// Gets whether or not the current instance has data. public virtual bool HasData { get; } diff --git a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamingJobInputData.cs b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamingJobInputData.cs index 7f6a3e04f91e..be5f50c18dda 100644 --- a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamingJobInputData.cs +++ b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamingJobInputData.cs @@ -27,7 +27,7 @@ public StreamingJobInputData() /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include and . /// - internal StreamingJobInputData(ResourceIdentifier id, string name, ResourceType? resourceType, StreamingJobInputProperties properties) : base(id, name, resourceType) + internal StreamingJobInputData(ResourceIdentifier id, string name, Core.ResourceType? resourceType, StreamingJobInputProperties properties) : base(id, name, resourceType) { Properties = properties; } diff --git a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamingJobInputResource.cs b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamingJobInputResource.cs index 28aa7dabdd09..8cb43501930d 100644 --- a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamingJobInputResource.cs +++ b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamingJobInputResource.cs @@ -64,7 +64,7 @@ internal StreamingJobInputResource(ArmClient client, ResourceIdentifier id) : ba } /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.StreamAnalytics/streamingjobs/inputs"; + public static readonly Core.ResourceType ResourceType = "Microsoft.StreamAnalytics/streamingjobs/inputs"; /// Gets whether or not the current instance has data. public virtual bool HasData { get; } diff --git a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamingJobOutputData.cs b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamingJobOutputData.cs index 13ac2ad60d7b..6a07ee9698da 100644 --- a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamingJobOutputData.cs +++ b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamingJobOutputData.cs @@ -42,7 +42,7 @@ public StreamingJobOutputData() /// The current entity tag for the output. This is an opaque string. You can use it to detect whether the resource has changed between requests. You can also use it in the If-Match or If-None-Match headers for write operations for optimistic concurrency. /// A list of the last output event times for each output partition. The index of the array corresponds to the partition number. /// Settings which determine whether to send watermarks to downstream. - internal StreamingJobOutputData(ResourceIdentifier id, string name, ResourceType? resourceType, StreamingJobOutputDataSource datasource, DateTimeOffset? timeWindow, float? sizeWindow, StreamAnalyticsDataSerialization serialization, StreamingJobDiagnostics diagnostics, ETag? etag, IReadOnlyList lastOutputEventTimestamps, StreamingJobOutputWatermarkProperties watermarkSettings) : base(id, name, resourceType) + internal StreamingJobOutputData(ResourceIdentifier id, string name, Core.ResourceType? resourceType, StreamingJobOutputDataSource datasource, DateTimeOffset? timeWindow, float? sizeWindow, StreamAnalyticsDataSerialization serialization, StreamingJobDiagnostics diagnostics, ETag? etag, IReadOnlyList lastOutputEventTimestamps, StreamingJobOutputWatermarkProperties watermarkSettings) : base(id, name, resourceType) { Datasource = datasource; TimeWindow = timeWindow; diff --git a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamingJobOutputResource.cs b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamingJobOutputResource.cs index 5eb7dbe7c4b6..41fb6640aabc 100644 --- a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamingJobOutputResource.cs +++ b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamingJobOutputResource.cs @@ -64,7 +64,7 @@ internal StreamingJobOutputResource(ArmClient client, ResourceIdentifier id) : b } /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.StreamAnalytics/streamingjobs/outputs"; + public static readonly Core.ResourceType ResourceType = "Microsoft.StreamAnalytics/streamingjobs/outputs"; /// Gets whether or not the current instance has data. public virtual bool HasData { get; } diff --git a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamingJobResource.cs b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamingJobResource.cs index fd16474068e7..0a18ca341ae8 100644 --- a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamingJobResource.cs +++ b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamingJobResource.cs @@ -36,6 +36,8 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, private readonly ClientDiagnostics _streamingJobClientDiagnostics; private readonly StreamingJobsRestOperations _streamingJobRestClient; + private readonly ClientDiagnostics _skuClientDiagnostics; + private readonly SkuRestOperations _skuRestClient; private readonly StreamingJobData _data; /// Initializes a new instance of the class for mocking. @@ -60,13 +62,15 @@ internal StreamingJobResource(ArmClient client, ResourceIdentifier id) : base(cl _streamingJobClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.StreamAnalytics", ResourceType.Namespace, Diagnostics); TryGetApiVersion(ResourceType, out string streamingJobApiVersion); _streamingJobRestClient = new StreamingJobsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, streamingJobApiVersion); + _skuClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.StreamAnalytics", ProviderConstants.DefaultProviderNamespace, Diagnostics); + _skuRestClient = new SkuRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); #if DEBUG ValidateResourceId(Id); #endif } /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.StreamAnalytics/streamingjobs"; + public static readonly Core.ResourceType ResourceType = "Microsoft.StreamAnalytics/streamingjobs"; /// Gets whether or not the current instance has data. public virtual bool HasData { get; } @@ -553,6 +557,90 @@ public virtual ArmOperation Scale(WaitUntil waitUntil, ScaleStreamingJobContent } } + /// + /// Gets a list of available SKUs about the specified streaming job. + /// Request Path: /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/skus + /// Operation Id: Sku_List + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetSkusAsync(CancellationToken cancellationToken = default) + { + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _skuClientDiagnostics.CreateScope("StreamingJobResource.GetSkus"); + scope.Start(); + try + { + var response = await _skuRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _skuClientDiagnostics.CreateScope("StreamingJobResource.GetSkus"); + scope.Start(); + try + { + var response = await _skuRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// Gets a list of available SKUs about the specified streaming job. + /// Request Path: /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/skus + /// Operation Id: Sku_List + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetSkus(CancellationToken cancellationToken = default) + { + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _skuClientDiagnostics.CreateScope("StreamingJobResource.GetSkus"); + scope.Start(); + try + { + var response = _skuRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _skuClientDiagnostics.CreateScope("StreamingJobResource.GetSkus"); + scope.Start(); + try + { + var response = _skuRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + /// /// Add a tag to the current resource. /// Request Path: /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName} diff --git a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamingJobTransformationData.cs b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamingJobTransformationData.cs index 77d4a5298af4..78a93a7fa56c 100644 --- a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamingJobTransformationData.cs +++ b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamingJobTransformationData.cs @@ -29,7 +29,7 @@ public StreamingJobTransformationData() /// Specifies the valid streaming units a streaming job can scale to. /// Specifies the query that will be run in the streaming job. You can learn more about the Stream Analytics Query Language (SAQL) here: https://msdn.microsoft.com/library/azure/dn834998 . Required on PUT (CreateOrReplace) requests. /// The current entity tag for the transformation. This is an opaque string. You can use it to detect whether the resource has changed between requests. You can also use it in the If-Match or If-None-Match headers for write operations for optimistic concurrency. - internal StreamingJobTransformationData(ResourceIdentifier id, string name, ResourceType? resourceType, int? streamingUnits, IList validStreamingUnits, string query, ETag? etag) : base(id, name, resourceType) + internal StreamingJobTransformationData(ResourceIdentifier id, string name, Core.ResourceType? resourceType, int? streamingUnits, IList validStreamingUnits, string query, ETag? etag) : base(id, name, resourceType) { StreamingUnits = streamingUnits; ValidStreamingUnits = validStreamingUnits; diff --git a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/autorest.md b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/autorest.md index 41b1483124a5..b6ccd6c7e0e6 100644 --- a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/autorest.md +++ b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/autorest.md @@ -8,7 +8,7 @@ azure-arm: true csharp: true library-name: StreamAnalytics namespace: Azure.ResourceManager.StreamAnalytics -require: https://github.com/Azure/azure-rest-api-specs/blob/692cb8b5eb71505afa267cfbbee322d520eb15ff/specification/streamanalytics/resource-manager/readme.md +require: /mnt/vss/_work/1/s/azure-rest-api-specs/specification/streamanalytics/resource-manager/readme.md tag: package-2021-10-preview output-folder: $(this-folder)/Generated clear-output-folder: true