diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AnalyticsDefenderEasmModelFactory.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AnalyticsDefenderEasmModelFactory.cs index 6333520b7dc2..2bf401df1344 100644 --- a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AnalyticsDefenderEasmModelFactory.cs +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AnalyticsDefenderEasmModelFactory.cs @@ -1979,6 +1979,139 @@ public static TaskResource TaskResource(string id = null, DateTimeOffset? starte serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The total number of elements. + /// The summary of observation counts by priority. + /// The list of observation results. + /// A new instance for mocking. + public static ObservationPageResult ObservationPageResult(long totalElements = default, IReadOnlyDictionary prioritySummary = null, IEnumerable value = null) + { + prioritySummary ??= new Dictionary(); + value ??= new List(); + + return new ObservationPageResult(totalElements, prioritySummary, value?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The name of the observation. + /// The list of applicable types. + /// The priority of the observation. + /// The CVSS v2 score. + /// The CVSS v3 score. + /// A new instance for mocking. + public static ObservationResult ObservationResult(string name = null, IEnumerable types = null, ObservationPriority priority = default, double cvssScoreV2 = default, double cvssScoreV3 = default) + { + types ??= new List(); + + return new ObservationResult( + name, + types?.ToList(), + priority, + cvssScoreV2, + cvssScoreV3, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The type of delta detail to retrieve. + /// The number of days prior to retrieve deltas for. + /// The type of asset. + /// expected format to be: yyyy-MM-dd. + /// A new instance for mocking. + public static DeltaDetailsRequest DeltaDetailsRequest(DeltaDetailType deltaDetailType = default, int? priorDays = null, GlobalAssetType kind = default, string date = null) + { + return new DeltaDetailsRequest(deltaDetailType, priorDays, kind, date, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Shows the asset kind. + /// Shows the asset name. + /// Shows the date when the asset was originally created. + /// Shows the date when the asset was last updated, usually the date the we trying to pull up the results for. + /// Shows the inventory state. + /// A new instance for mocking. + public static DeltaResult DeltaResult(GlobalAssetType kind = default, string name = null, DateTimeOffset createdAt = default, DateTimeOffset updatedAt = default, GlobalInventoryState state = default) + { + return new DeltaResult( + kind, + name, + createdAt, + updatedAt, + state, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Contains added, removed, and difference values for the whole range either 7 or 30 days. + /// Contains added, removed, count, and difference values for each day. + /// A new instance for mocking. + public static DeltaSummaryResult DeltaSummaryResult(DeltaRangeResult summary = null, IEnumerable daily = null) + { + daily ??= new List(); + + return new DeltaSummaryResult(summary, daily?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The range of dates requested. + /// The total amount of assets removed over a date range. + /// The total amount of assets added over a date range. + /// The total amount of assets changed removed over a date range. + /// A list of summary changes per asset kind. + /// A new instance for mocking. + public static DeltaRangeResult DeltaRangeResult(long range = default, long removed = default, long added = default, long difference = default, IEnumerable kindSummaries = null) + { + kindSummaries ??= new List(); + + return new DeltaRangeResult( + range, + removed, + added, + difference, + kindSummaries?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The kind of asset. + /// The amount of assets removed for one asset kind. + /// The amount of assets added for one asset kind. + /// The amount of assets changed for one asset kind. + /// A new instance for mocking. + public static DeltaTypeResponse DeltaTypeResponse(GlobalAssetType kind = default, long removed = default, long added = default, long difference = default) + { + return new DeltaTypeResponse(kind, removed, added, difference, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The date that is being requested. + /// A list of summary counts per day. + /// A new instance for mocking. + public static DeltaDateResult DeltaDateResult(DateTimeOffset date = default, IEnumerable deltas = null) + { + deltas ??= new List(); + + return new DeltaDateResult(date, deltas?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The kind of asset. + /// The amount of assets removed for one asset kind. + /// The amount of assets added for one asset kind. + /// The amount of assets changed for one asset kind. + /// The current number of assets for one asset kind. + /// A new instance for mocking. + public static DailyDeltaTypeResponse DailyDeltaTypeResponse(GlobalAssetType kind = default, long removed = default, long added = default, long difference = default, long count = default) + { + return new DailyDeltaTypeResponse( + kind, + removed, + added, + difference, + serializedAdditionalRawData: null, + count); + } + /// Initializes a new instance of . /// Discriminator property for DataConnection. /// The system generated unique id for the resource. @@ -2218,6 +2351,47 @@ public static DiscoveryRunResult DiscoveryRunResult(DateTimeOffset? submittedDat serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// A list of asset chain summaries per asset kind. + /// A list of disco group summaries. + /// The list of exceptions. + /// A new instance for mocking. + public static AssetChainSummaryResult AssetChainSummaryResult(IEnumerable affectedAssetsSummary = null, IEnumerable affectedGroupsSummary = null, IEnumerable errors = null) + { + affectedAssetsSummary ??= new List(); + affectedGroupsSummary ??= new List(); + errors ??= new List(); + + return new AssetChainSummaryResult(affectedAssetsSummary?.ToList(), affectedGroupsSummary?.ToList(), errors?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The kind of asset. + /// The amount of assets affected for a given asset kind. + /// A new instance for mocking. + public static AssetChainKindSummaryResult AssetChainKindSummaryResult(AssetKind kind = default, long affectedCount = default) + { + return new AssetChainKindSummaryResult(kind, affectedCount, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The system generated unique id for the resource. + /// The caller provided unique name for the resource. + /// The name that can be used for display purposes. + /// A new instance for mocking. + public static DiscoGroupSummaryResult DiscoGroupSummaryResult(string id = null, string name = null, string displayName = null) + { + return new DiscoGroupSummaryResult(id, name, displayName, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The error object. + /// A new instance for mocking. + public static ErrorResponse ErrorResponse(ResponseError error = null) + { + return new ErrorResponse(error, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The system generated unique id for the resource. /// The caller provided unique name for the resource. @@ -2374,5 +2548,35 @@ public static SavedFilter SavedFilter(string id = null, string name = null, stri description, serializedAdditionalRawData: null); } + + /// Initializes a new instance of . + /// The CVE ID of the vulnerability in the format CVE-YYYY-NNNN, note that the number portion can have more than 4 digits. + /// The vendor or project name for the vulnerability. + /// The vulnerability product. + /// The name of the vulnerability. + /// A short description of the vulnerability. + /// The required action to address the vulnerability. + /// Any additional notes about the vulnerability. + /// The date the vulnerability was added to the catalog in the format YYYY-MM-DD. + /// The date the required action is due in the format YYYY-MM-DD. + /// The date the vulnerability was updated. + /// The number of assets affected by the vulnerability. + /// A new instance for mocking. + public static CisaCveResult CisaCveResult(string cveId = null, string vendorProject = null, string product = null, string vulnerabilityName = null, string shortDescription = null, string requiredAction = null, string notes = null, DateTimeOffset dateAdded = default, DateTimeOffset dueDate = default, DateTimeOffset updatedAt = default, long count = default) + { + return new CisaCveResult( + cveId, + vendorProject, + product, + vulnerabilityName, + shortDescription, + requiredAction, + notes, + dateAdded, + dueDate, + updatedAt, + count, + serializedAdditionalRawData: null); + } } } diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AssetChainKindSummaryResult.Serialization.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AssetChainKindSummaryResult.Serialization.cs new file mode 100644 index 000000000000..26d0aef4c3ac --- /dev/null +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AssetChainKindSummaryResult.Serialization.cs @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Defender.Easm +{ + public partial class AssetChainKindSummaryResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AssetChainKindSummaryResult)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.ToString()); + writer.WritePropertyName("affectedCount"u8); + writer.WriteNumberValue(AffectedCount); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AssetChainKindSummaryResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AssetChainKindSummaryResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAssetChainKindSummaryResult(document.RootElement, options); + } + + internal static AssetChainKindSummaryResult DeserializeAssetChainKindSummaryResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AssetKind kind = default; + long affectedCount = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("kind"u8)) + { + kind = new AssetKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("affectedCount"u8)) + { + affectedCount = property.Value.GetInt64(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AssetChainKindSummaryResult(kind, affectedCount, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AssetChainKindSummaryResult)} does not support writing '{options.Format}' format."); + } + } + + AssetChainKindSummaryResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAssetChainKindSummaryResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AssetChainKindSummaryResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AssetChainKindSummaryResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAssetChainKindSummaryResult(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AssetChainKindSummaryResult.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AssetChainKindSummaryResult.cs new file mode 100644 index 000000000000..255ca689194f --- /dev/null +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AssetChainKindSummaryResult.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Defender.Easm +{ + /// A list of asset chain summaries per asset kind. + public partial class AssetChainKindSummaryResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The kind of asset. + /// The amount of assets affected for a given asset kind. + internal AssetChainKindSummaryResult(AssetKind kind, long affectedCount) + { + Kind = kind; + AffectedCount = affectedCount; + } + + /// Initializes a new instance of . + /// The kind of asset. + /// The amount of assets affected for a given asset kind. + /// Keeps track of any properties unknown to the library. + internal AssetChainKindSummaryResult(AssetKind kind, long affectedCount, IDictionary serializedAdditionalRawData) + { + Kind = kind; + AffectedCount = affectedCount; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AssetChainKindSummaryResult() + { + } + + /// The kind of asset. + public AssetKind Kind { get; } + /// The amount of assets affected for a given asset kind. + public long AffectedCount { get; } + } +} diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AssetChainRequest.Serialization.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AssetChainRequest.Serialization.cs new file mode 100644 index 000000000000..41374cb8a377 --- /dev/null +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AssetChainRequest.Serialization.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Defender.Easm +{ + public partial class AssetChainRequest : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AssetChainRequest)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("assetChainSource"u8); + writer.WriteStringValue(AssetChainSource.ToString()); + writer.WritePropertyName("sourceIds"u8); + writer.WriteStartArray(); + foreach (var item in SourceIds) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AssetChainRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AssetChainRequest)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAssetChainRequest(document.RootElement, options); + } + + internal static AssetChainRequest DeserializeAssetChainRequest(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AssetChainSource assetChainSource = default; + IList sourceIds = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("assetChainSource"u8)) + { + assetChainSource = new AssetChainSource(property.Value.GetString()); + continue; + } + if (property.NameEquals("sourceIds"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + sourceIds = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AssetChainRequest(assetChainSource, sourceIds, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AssetChainRequest)} does not support writing '{options.Format}' format."); + } + } + + AssetChainRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAssetChainRequest(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AssetChainRequest)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AssetChainRequest FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAssetChainRequest(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AssetChainRequest.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AssetChainRequest.cs new file mode 100644 index 000000000000..31ae0976c45c --- /dev/null +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AssetChainRequest.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.Analytics.Defender.Easm +{ + /// AssetChainRequest containing information needed for the retrieval of the asset chain summary. + public partial class AssetChainRequest + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Asset chain source. + /// A collection of asset chain source ids. + /// is null. + public AssetChainRequest(AssetChainSource assetChainSource, IEnumerable sourceIds) + { + Argument.AssertNotNull(sourceIds, nameof(sourceIds)); + + AssetChainSource = assetChainSource; + SourceIds = sourceIds.ToList(); + } + + /// Initializes a new instance of . + /// Asset chain source. + /// A collection of asset chain source ids. + /// Keeps track of any properties unknown to the library. + internal AssetChainRequest(AssetChainSource assetChainSource, IList sourceIds, IDictionary serializedAdditionalRawData) + { + AssetChainSource = assetChainSource; + SourceIds = sourceIds; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AssetChainRequest() + { + } + + /// Asset chain source. + public AssetChainSource AssetChainSource { get; } + /// A collection of asset chain source ids. + public IList SourceIds { get; } + } +} diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AssetChainSource.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AssetChainSource.cs new file mode 100644 index 000000000000..954a437fd2a3 --- /dev/null +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AssetChainSource.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.Analytics.Defender.Easm +{ + /// A list of asset chain sources. + public readonly partial struct AssetChainSource : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AssetChainSource(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DISCOGROUPValue = "DISCO_GROUP"; + private const string ASSETValue = "ASSET"; + + /// discovery group. + public static AssetChainSource DISCOGROUP { get; } = new AssetChainSource(DISCOGROUPValue); + /// asset. + public static AssetChainSource ASSET { get; } = new AssetChainSource(ASSETValue); + /// Determines if two values are the same. + public static bool operator ==(AssetChainSource left, AssetChainSource right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AssetChainSource left, AssetChainSource right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator AssetChainSource(string value) => new AssetChainSource(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AssetChainSource other && Equals(other); + /// + public bool Equals(AssetChainSource other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AssetChainSummaryResult.Serialization.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AssetChainSummaryResult.Serialization.cs new file mode 100644 index 000000000000..15cfb6fd12a4 --- /dev/null +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AssetChainSummaryResult.Serialization.cs @@ -0,0 +1,188 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Defender.Easm +{ + public partial class AssetChainSummaryResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AssetChainSummaryResult)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("affectedAssetsSummary"u8); + writer.WriteStartArray(); + foreach (var item in AffectedAssetsSummary) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + writer.WritePropertyName("affectedGroupsSummary"u8); + writer.WriteStartArray(); + foreach (var item in AffectedGroupsSummary) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsCollectionDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AssetChainSummaryResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AssetChainSummaryResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAssetChainSummaryResult(document.RootElement, options); + } + + internal static AssetChainSummaryResult DeserializeAssetChainSummaryResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList affectedAssetsSummary = default; + IReadOnlyList affectedGroupsSummary = default; + IReadOnlyList errors = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("affectedAssetsSummary"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AssetChainKindSummaryResult.DeserializeAssetChainKindSummaryResult(item, options)); + } + affectedAssetsSummary = array; + continue; + } + if (property.NameEquals("affectedGroupsSummary"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DiscoGroupSummaryResult.DeserializeDiscoGroupSummaryResult(item, options)); + } + affectedGroupsSummary = array; + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ErrorResponse.DeserializeErrorResponse(item, options)); + } + errors = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AssetChainSummaryResult(affectedAssetsSummary, affectedGroupsSummary, errors ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AssetChainSummaryResult)} does not support writing '{options.Format}' format."); + } + } + + AssetChainSummaryResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAssetChainSummaryResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AssetChainSummaryResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AssetChainSummaryResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAssetChainSummaryResult(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AssetChainSummaryResult.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AssetChainSummaryResult.cs new file mode 100644 index 000000000000..b97b8cdb4826 --- /dev/null +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AssetChainSummaryResult.cs @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.Analytics.Defender.Easm +{ + /// Response for the asset chain summary. + public partial class AssetChainSummaryResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// A list of asset chain summaries per asset kind. + /// A list of disco group summaries. + /// or is null. + internal AssetChainSummaryResult(IEnumerable affectedAssetsSummary, IEnumerable affectedGroupsSummary) + { + Argument.AssertNotNull(affectedAssetsSummary, nameof(affectedAssetsSummary)); + Argument.AssertNotNull(affectedGroupsSummary, nameof(affectedGroupsSummary)); + + AffectedAssetsSummary = affectedAssetsSummary.ToList(); + AffectedGroupsSummary = affectedGroupsSummary.ToList(); + Errors = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// A list of asset chain summaries per asset kind. + /// A list of disco group summaries. + /// The list of exceptions. + /// Keeps track of any properties unknown to the library. + internal AssetChainSummaryResult(IReadOnlyList affectedAssetsSummary, IReadOnlyList affectedGroupsSummary, IReadOnlyList errors, IDictionary serializedAdditionalRawData) + { + AffectedAssetsSummary = affectedAssetsSummary; + AffectedGroupsSummary = affectedGroupsSummary; + Errors = errors; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AssetChainSummaryResult() + { + } + + /// A list of asset chain summaries per asset kind. + public IReadOnlyList AffectedAssetsSummary { get; } + /// A list of disco group summaries. + public IReadOnlyList AffectedGroupsSummary { get; } + /// The list of exceptions. + public IReadOnlyList Errors { get; } + } +} diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AssetKind.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AssetKind.cs new file mode 100644 index 000000000000..971d63ae8fd7 --- /dev/null +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AssetKind.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Defender.Easm +{ + /// The kind of asset. + public readonly partial struct AssetKind : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AssetKind(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AsValue = "as"; + private const string ContactValue = "contact"; + private const string DomainValue = "domain"; + private const string HostValue = "host"; + private const string IpAddressValue = "ipAddress"; + private const string IpBlockValue = "ipBlock"; + private const string PageValue = "page"; + private const string SslCertValue = "sslCert"; + + /// as. + public static AssetKind As { get; } = new AssetKind(AsValue); + /// contact. + public static AssetKind Contact { get; } = new AssetKind(ContactValue); + /// domain. + public static AssetKind Domain { get; } = new AssetKind(DomainValue); + /// host. + public static AssetKind Host { get; } = new AssetKind(HostValue); + /// ipAddress. + public static AssetKind IpAddress { get; } = new AssetKind(IpAddressValue); + /// ipBlock. + public static AssetKind IpBlock { get; } = new AssetKind(IpBlockValue); + /// page. + public static AssetKind Page { get; } = new AssetKind(PageValue); + /// sslCert. + public static AssetKind SslCert { get; } = new AssetKind(SslCertValue); + /// Determines if two values are the same. + public static bool operator ==(AssetKind left, AssetKind right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AssetKind left, AssetKind right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator AssetKind(string value) => new AssetKind(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AssetKind other && Equals(other); + /// + public bool Equals(AssetKind other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AssetResponseType.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AssetResponseType.cs new file mode 100644 index 000000000000..662ea951ed20 --- /dev/null +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AssetResponseType.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Defender.Easm +{ + /// A list of asset response type. + public readonly partial struct AssetResponseType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AssetResponseType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string IdValue = "id"; + private const string StandardValue = "standard"; + private const string FullValue = "full"; + private const string ReducedValue = "reduced"; + + /// Return only the asset id. + public static AssetResponseType Id { get; } = new AssetResponseType(IdValue); + /// Return the standard set of asset fields. + public static AssetResponseType Standard { get; } = new AssetResponseType(StandardValue); + /// Return the full set of asset fields. + public static AssetResponseType Full { get; } = new AssetResponseType(FullValue); + /// Return a reduced set of fields. + public static AssetResponseType Reduced { get; } = new AssetResponseType(ReducedValue); + /// Determines if two values are the same. + public static bool operator ==(AssetResponseType left, AssetResponseType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AssetResponseType left, AssetResponseType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator AssetResponseType(string value) => new AssetResponseType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AssetResponseType other && Equals(other); + /// + public bool Equals(AssetResponseType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AssetsExportRequest.Serialization.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AssetsExportRequest.Serialization.cs new file mode 100644 index 000000000000..df18ef2d43cd --- /dev/null +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AssetsExportRequest.Serialization.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Defender.Easm +{ + public partial class AssetsExportRequest : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AssetsExportRequest)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("fileName"u8); + writer.WriteStringValue(FileName); + writer.WritePropertyName("columns"u8); + writer.WriteStartArray(); + foreach (var item in Columns) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AssetsExportRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AssetsExportRequest)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAssetsExportRequest(document.RootElement, options); + } + + internal static AssetsExportRequest DeserializeAssetsExportRequest(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string fileName = default; + IList columns = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("fileName"u8)) + { + fileName = property.Value.GetString(); + continue; + } + if (property.NameEquals("columns"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + columns = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AssetsExportRequest(fileName, columns, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AssetsExportRequest)} does not support writing '{options.Format}' format."); + } + } + + AssetsExportRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAssetsExportRequest(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AssetsExportRequest)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AssetsExportRequest FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAssetsExportRequest(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AssetsExportRequest.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AssetsExportRequest.cs new file mode 100644 index 000000000000..a32f3acef2e9 --- /dev/null +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AssetsExportRequest.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.Analytics.Defender.Easm +{ + /// A request body used to export an asset. + public partial class AssetsExportRequest + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The name of the file to export. + /// The columns to export. + /// or is null. + public AssetsExportRequest(string fileName, IEnumerable columns) + { + Argument.AssertNotNull(fileName, nameof(fileName)); + Argument.AssertNotNull(columns, nameof(columns)); + + FileName = fileName; + Columns = columns.ToList(); + } + + /// Initializes a new instance of . + /// The name of the file to export. + /// The columns to export. + /// Keeps track of any properties unknown to the library. + internal AssetsExportRequest(string fileName, IList columns, IDictionary serializedAdditionalRawData) + { + FileName = fileName; + Columns = columns; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AssetsExportRequest() + { + } + + /// The name of the file to export. + public string FileName { get; } + /// The columns to export. + public IList Columns { get; } + } +} diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AzureDataExplorerDataConnectionPayload.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AzureDataExplorerDataConnectionPayload.cs index b98a0f227ee5..10d82d783d74 100644 --- a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AzureDataExplorerDataConnectionPayload.cs +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AzureDataExplorerDataConnectionPayload.cs @@ -25,7 +25,7 @@ public AzureDataExplorerDataConnectionPayload(AzureDataExplorerDataConnectionPro } /// Initializes a new instance of . - /// Discriminator property for DataConnectionPayload. + /// Discriminator property for DataConnectionData. /// The name of data connection. /// The type of data the data connection will transfer. /// The rate at which the data connection will receive updates. diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/CisaCveResult.Serialization.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/CisaCveResult.Serialization.cs new file mode 100644 index 000000000000..9e20c938f789 --- /dev/null +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/CisaCveResult.Serialization.cs @@ -0,0 +1,230 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Defender.Easm +{ + public partial class CisaCveResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CisaCveResult)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (options.Format != "W") + { + writer.WritePropertyName("cveId"u8); + writer.WriteStringValue(CveId); + } + writer.WritePropertyName("vendorProject"u8); + writer.WriteStringValue(VendorProject); + writer.WritePropertyName("product"u8); + writer.WriteStringValue(Product); + writer.WritePropertyName("vulnerabilityName"u8); + writer.WriteStringValue(VulnerabilityName); + writer.WritePropertyName("shortDescription"u8); + writer.WriteStringValue(ShortDescription); + writer.WritePropertyName("requiredAction"u8); + writer.WriteStringValue(RequiredAction); + writer.WritePropertyName("notes"u8); + writer.WriteStringValue(Notes); + writer.WritePropertyName("dateAdded"u8); + writer.WriteStringValue(DateAdded, "O"); + writer.WritePropertyName("dueDate"u8); + writer.WriteStringValue(DueDate, "O"); + writer.WritePropertyName("updatedAt"u8); + writer.WriteStringValue(UpdatedAt, "O"); + writer.WritePropertyName("count"u8); + writer.WriteNumberValue(Count); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + CisaCveResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CisaCveResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCisaCveResult(document.RootElement, options); + } + + internal static CisaCveResult DeserializeCisaCveResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string cveId = default; + string vendorProject = default; + string product = default; + string vulnerabilityName = default; + string shortDescription = default; + string requiredAction = default; + string notes = default; + DateTimeOffset dateAdded = default; + DateTimeOffset dueDate = default; + DateTimeOffset updatedAt = default; + long count = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("cveId"u8)) + { + cveId = property.Value.GetString(); + continue; + } + if (property.NameEquals("vendorProject"u8)) + { + vendorProject = property.Value.GetString(); + continue; + } + if (property.NameEquals("product"u8)) + { + product = property.Value.GetString(); + continue; + } + if (property.NameEquals("vulnerabilityName"u8)) + { + vulnerabilityName = property.Value.GetString(); + continue; + } + if (property.NameEquals("shortDescription"u8)) + { + shortDescription = property.Value.GetString(); + continue; + } + if (property.NameEquals("requiredAction"u8)) + { + requiredAction = property.Value.GetString(); + continue; + } + if (property.NameEquals("notes"u8)) + { + notes = property.Value.GetString(); + continue; + } + if (property.NameEquals("dateAdded"u8)) + { + dateAdded = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("dueDate"u8)) + { + dueDate = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("updatedAt"u8)) + { + updatedAt = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("count"u8)) + { + count = property.Value.GetInt64(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CisaCveResult( + cveId, + vendorProject, + product, + vulnerabilityName, + shortDescription, + requiredAction, + notes, + dateAdded, + dueDate, + updatedAt, + count, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CisaCveResult)} does not support writing '{options.Format}' format."); + } + } + + CisaCveResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeCisaCveResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CisaCveResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static CisaCveResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeCisaCveResult(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/CisaCveResult.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/CisaCveResult.cs new file mode 100644 index 000000000000..b232b946b07f --- /dev/null +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/CisaCveResult.cs @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Defender.Easm +{ + /// cisa cve in a given workspace. + public partial class CisaCveResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The vendor or project name for the vulnerability. + /// The vulnerability product. + /// The name of the vulnerability. + /// A short description of the vulnerability. + /// The required action to address the vulnerability. + /// Any additional notes about the vulnerability. + /// The date the vulnerability was added to the catalog in the format YYYY-MM-DD. + /// The date the required action is due in the format YYYY-MM-DD. + /// The date the vulnerability was updated. + /// The number of assets affected by the vulnerability. + /// , , , , or is null. + internal CisaCveResult(string vendorProject, string product, string vulnerabilityName, string shortDescription, string requiredAction, string notes, DateTimeOffset dateAdded, DateTimeOffset dueDate, DateTimeOffset updatedAt, long count) + { + Argument.AssertNotNull(vendorProject, nameof(vendorProject)); + Argument.AssertNotNull(product, nameof(product)); + Argument.AssertNotNull(vulnerabilityName, nameof(vulnerabilityName)); + Argument.AssertNotNull(shortDescription, nameof(shortDescription)); + Argument.AssertNotNull(requiredAction, nameof(requiredAction)); + Argument.AssertNotNull(notes, nameof(notes)); + + VendorProject = vendorProject; + Product = product; + VulnerabilityName = vulnerabilityName; + ShortDescription = shortDescription; + RequiredAction = requiredAction; + Notes = notes; + DateAdded = dateAdded; + DueDate = dueDate; + UpdatedAt = updatedAt; + Count = count; + } + + /// Initializes a new instance of . + /// The CVE ID of the vulnerability in the format CVE-YYYY-NNNN, note that the number portion can have more than 4 digits. + /// The vendor or project name for the vulnerability. + /// The vulnerability product. + /// The name of the vulnerability. + /// A short description of the vulnerability. + /// The required action to address the vulnerability. + /// Any additional notes about the vulnerability. + /// The date the vulnerability was added to the catalog in the format YYYY-MM-DD. + /// The date the required action is due in the format YYYY-MM-DD. + /// The date the vulnerability was updated. + /// The number of assets affected by the vulnerability. + /// Keeps track of any properties unknown to the library. + internal CisaCveResult(string cveId, string vendorProject, string product, string vulnerabilityName, string shortDescription, string requiredAction, string notes, DateTimeOffset dateAdded, DateTimeOffset dueDate, DateTimeOffset updatedAt, long count, IDictionary serializedAdditionalRawData) + { + CveId = cveId; + VendorProject = vendorProject; + Product = product; + VulnerabilityName = vulnerabilityName; + ShortDescription = shortDescription; + RequiredAction = requiredAction; + Notes = notes; + DateAdded = dateAdded; + DueDate = dueDate; + UpdatedAt = updatedAt; + Count = count; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal CisaCveResult() + { + } + + /// The CVE ID of the vulnerability in the format CVE-YYYY-NNNN, note that the number portion can have more than 4 digits. + public string CveId { get; } + /// The vendor or project name for the vulnerability. + public string VendorProject { get; } + /// The vulnerability product. + public string Product { get; } + /// The name of the vulnerability. + public string VulnerabilityName { get; } + /// A short description of the vulnerability. + public string ShortDescription { get; } + /// The required action to address the vulnerability. + public string RequiredAction { get; } + /// Any additional notes about the vulnerability. + public string Notes { get; } + /// The date the vulnerability was added to the catalog in the format YYYY-MM-DD. + public DateTimeOffset DateAdded { get; } + /// The date the required action is due in the format YYYY-MM-DD. + public DateTimeOffset DueDate { get; } + /// The date the vulnerability was updated. + public DateTimeOffset UpdatedAt { get; } + /// The number of assets affected by the vulnerability. + public long Count { get; } + } +} diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DailyDeltaTypeResponse.Serialization.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DailyDeltaTypeResponse.Serialization.cs new file mode 100644 index 000000000000..0655299fd965 --- /dev/null +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DailyDeltaTypeResponse.Serialization.cs @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Defender.Easm +{ + public partial class DailyDeltaTypeResponse : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DailyDeltaTypeResponse)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("count"u8); + writer.WriteNumberValue(Count); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.ToString()); + writer.WritePropertyName("removed"u8); + writer.WriteNumberValue(Removed); + writer.WritePropertyName("added"u8); + writer.WriteNumberValue(Added); + writer.WritePropertyName("difference"u8); + writer.WriteNumberValue(Difference); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + DailyDeltaTypeResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DailyDeltaTypeResponse)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDailyDeltaTypeResponse(document.RootElement, options); + } + + internal static DailyDeltaTypeResponse DeserializeDailyDeltaTypeResponse(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + long count = default; + GlobalAssetType kind = default; + long removed = default; + long added = default; + long difference = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("count"u8)) + { + count = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("kind"u8)) + { + kind = new GlobalAssetType(property.Value.GetString()); + continue; + } + if (property.NameEquals("removed"u8)) + { + removed = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("added"u8)) + { + added = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("difference"u8)) + { + difference = property.Value.GetInt64(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DailyDeltaTypeResponse( + kind, + removed, + added, + difference, + serializedAdditionalRawData, + count); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DailyDeltaTypeResponse)} does not support writing '{options.Format}' format."); + } + } + + DailyDeltaTypeResponse IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDailyDeltaTypeResponse(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DailyDeltaTypeResponse)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new DailyDeltaTypeResponse FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDailyDeltaTypeResponse(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DailyDeltaTypeResponse.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DailyDeltaTypeResponse.cs new file mode 100644 index 000000000000..bf7813c7e4e5 --- /dev/null +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DailyDeltaTypeResponse.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Defender.Easm +{ + /// Delta response for each day. + public partial class DailyDeltaTypeResponse : DeltaTypeResponse + { + /// Initializes a new instance of . + /// The kind of asset. + /// The amount of assets removed for one asset kind. + /// The amount of assets added for one asset kind. + /// The amount of assets changed for one asset kind. + /// The current number of assets for one asset kind. + internal DailyDeltaTypeResponse(GlobalAssetType kind, long removed, long added, long difference, long count) : base(kind, removed, added, difference) + { + Count = count; + } + + /// Initializes a new instance of . + /// The kind of asset. + /// The amount of assets removed for one asset kind. + /// The amount of assets added for one asset kind. + /// The amount of assets changed for one asset kind. + /// Keeps track of any properties unknown to the library. + /// The current number of assets for one asset kind. + internal DailyDeltaTypeResponse(GlobalAssetType kind, long removed, long added, long difference, IDictionary serializedAdditionalRawData, long count) : base(kind, removed, added, difference, serializedAdditionalRawData) + { + Count = count; + } + + /// Initializes a new instance of for deserialization. + internal DailyDeltaTypeResponse() + { + } + + /// The current number of assets for one asset kind. + public long Count { get; } + } +} diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DataConnectionPayload.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DataConnectionPayload.cs index a10e83a8ee34..d059fceb8aa5 100644 --- a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DataConnectionPayload.cs +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DataConnectionPayload.cs @@ -55,7 +55,7 @@ protected DataConnectionPayload() } /// Initializes a new instance of . - /// Discriminator property for DataConnectionPayload. + /// Discriminator property for DataConnectionData. /// The name of data connection. /// The type of data the data connection will transfer. /// The rate at which the data connection will receive updates. @@ -71,7 +71,7 @@ internal DataConnectionPayload(string kind, string name, DataConnectionContent? _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Discriminator property for DataConnectionPayload. + /// Discriminator property for DataConnectionData. internal string Kind { get; set; } /// The name of data connection. public string Name { get; set; } diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DeltaDateResult.Serialization.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DeltaDateResult.Serialization.cs new file mode 100644 index 000000000000..e2df53fc4e8f --- /dev/null +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DeltaDateResult.Serialization.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Defender.Easm +{ + public partial class DeltaDateResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeltaDateResult)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("date"u8); + writer.WriteStringValue(Date, "O"); + writer.WritePropertyName("deltas"u8); + writer.WriteStartArray(); + foreach (var item in Deltas) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + DeltaDateResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeltaDateResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDeltaDateResult(document.RootElement, options); + } + + internal static DeltaDateResult DeserializeDeltaDateResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset date = default; + IReadOnlyList deltas = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("date"u8)) + { + date = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("deltas"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DailyDeltaTypeResponse.DeserializeDailyDeltaTypeResponse(item, options)); + } + deltas = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DeltaDateResult(date, deltas, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DeltaDateResult)} does not support writing '{options.Format}' format."); + } + } + + DeltaDateResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDeltaDateResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DeltaDateResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DeltaDateResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDeltaDateResult(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DeltaDateResult.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DeltaDateResult.cs new file mode 100644 index 000000000000..ee5af7f2ec93 --- /dev/null +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DeltaDateResult.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.Analytics.Defender.Easm +{ + /// Date information for the delta response. + public partial class DeltaDateResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The date that is being requested. + /// A list of summary counts per day. + /// is null. + internal DeltaDateResult(DateTimeOffset date, IEnumerable deltas) + { + Argument.AssertNotNull(deltas, nameof(deltas)); + + Date = date; + Deltas = deltas.ToList(); + } + + /// Initializes a new instance of . + /// The date that is being requested. + /// A list of summary counts per day. + /// Keeps track of any properties unknown to the library. + internal DeltaDateResult(DateTimeOffset date, IReadOnlyList deltas, IDictionary serializedAdditionalRawData) + { + Date = date; + Deltas = deltas; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DeltaDateResult() + { + } + + /// The date that is being requested. + public DateTimeOffset Date { get; } + /// A list of summary counts per day. + public IReadOnlyList Deltas { get; } + } +} diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DeltaDetailType.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DeltaDetailType.cs new file mode 100644 index 000000000000..47e92ef2723d --- /dev/null +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DeltaDetailType.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.Analytics.Defender.Easm +{ + /// A list of delta detail type. + public readonly partial struct DeltaDetailType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DeltaDetailType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AddedValue = "added"; + private const string RemovedValue = "removed"; + + /// added. + public static DeltaDetailType Added { get; } = new DeltaDetailType(AddedValue); + /// removed. + public static DeltaDetailType Removed { get; } = new DeltaDetailType(RemovedValue); + /// Determines if two values are the same. + public static bool operator ==(DeltaDetailType left, DeltaDetailType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DeltaDetailType left, DeltaDetailType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator DeltaDetailType(string value) => new DeltaDetailType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DeltaDetailType other && Equals(other); + /// + public bool Equals(DeltaDetailType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DeltaDetailsRequest.Serialization.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DeltaDetailsRequest.Serialization.cs new file mode 100644 index 000000000000..5034fd50e00c --- /dev/null +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DeltaDetailsRequest.Serialization.cs @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Defender.Easm +{ + public partial class DeltaDetailsRequest : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeltaDetailsRequest)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("deltaDetailType"u8); + writer.WriteStringValue(DeltaDetailType.ToString()); + if (Optional.IsDefined(PriorDays)) + { + writer.WritePropertyName("priorDays"u8); + writer.WriteNumberValue(PriorDays.Value); + } + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.ToString()); + if (Optional.IsDefined(Date)) + { + writer.WritePropertyName("date"u8); + writer.WriteStringValue(Date); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + DeltaDetailsRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeltaDetailsRequest)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDeltaDetailsRequest(document.RootElement, options); + } + + internal static DeltaDetailsRequest DeserializeDeltaDetailsRequest(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DeltaDetailType deltaDetailType = default; + int? priorDays = default; + GlobalAssetType kind = default; + string date = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("deltaDetailType"u8)) + { + deltaDetailType = new DeltaDetailType(property.Value.GetString()); + continue; + } + if (property.NameEquals("priorDays"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + priorDays = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("kind"u8)) + { + kind = new GlobalAssetType(property.Value.GetString()); + continue; + } + if (property.NameEquals("date"u8)) + { + date = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DeltaDetailsRequest(deltaDetailType, priorDays, kind, date, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DeltaDetailsRequest)} does not support writing '{options.Format}' format."); + } + } + + DeltaDetailsRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDeltaDetailsRequest(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DeltaDetailsRequest)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DeltaDetailsRequest FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDeltaDetailsRequest(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DeltaDetailsRequest.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DeltaDetailsRequest.cs new file mode 100644 index 000000000000..42095a187362 --- /dev/null +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DeltaDetailsRequest.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Defender.Easm +{ + /// A request body used to retrieve a list of deltas. + public partial class DeltaDetailsRequest + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The type of delta detail to retrieve. + /// The type of asset. + public DeltaDetailsRequest(DeltaDetailType deltaDetailType, GlobalAssetType kind) + { + DeltaDetailType = deltaDetailType; + Kind = kind; + } + + /// Initializes a new instance of . + /// The type of delta detail to retrieve. + /// The number of days prior to retrieve deltas for. + /// The type of asset. + /// expected format to be: yyyy-MM-dd. + /// Keeps track of any properties unknown to the library. + internal DeltaDetailsRequest(DeltaDetailType deltaDetailType, int? priorDays, GlobalAssetType kind, string date, IDictionary serializedAdditionalRawData) + { + DeltaDetailType = deltaDetailType; + PriorDays = priorDays; + Kind = kind; + Date = date; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DeltaDetailsRequest() + { + } + + /// The type of delta detail to retrieve. + public DeltaDetailType DeltaDetailType { get; } + /// The number of days prior to retrieve deltas for. + public int? PriorDays { get; set; } + /// The type of asset. + public GlobalAssetType Kind { get; } + /// expected format to be: yyyy-MM-dd. + public string Date { get; set; } + } +} diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DeltaRangeResult.Serialization.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DeltaRangeResult.Serialization.cs new file mode 100644 index 000000000000..b20a31665806 --- /dev/null +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DeltaRangeResult.Serialization.cs @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Defender.Easm +{ + public partial class DeltaRangeResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeltaRangeResult)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("range"u8); + writer.WriteNumberValue(Range); + writer.WritePropertyName("removed"u8); + writer.WriteNumberValue(Removed); + writer.WritePropertyName("added"u8); + writer.WriteNumberValue(Added); + writer.WritePropertyName("difference"u8); + writer.WriteNumberValue(Difference); + writer.WritePropertyName("kindSummaries"u8); + writer.WriteStartArray(); + foreach (var item in KindSummaries) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + DeltaRangeResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeltaRangeResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDeltaRangeResult(document.RootElement, options); + } + + internal static DeltaRangeResult DeserializeDeltaRangeResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + long range = default; + long removed = default; + long added = default; + long difference = default; + IReadOnlyList kindSummaries = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("range"u8)) + { + range = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("removed"u8)) + { + removed = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("added"u8)) + { + added = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("difference"u8)) + { + difference = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("kindSummaries"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DeltaTypeResponse.DeserializeDeltaTypeResponse(item, options)); + } + kindSummaries = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DeltaRangeResult( + range, + removed, + added, + difference, + kindSummaries, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DeltaRangeResult)} does not support writing '{options.Format}' format."); + } + } + + DeltaRangeResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDeltaRangeResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DeltaRangeResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DeltaRangeResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDeltaRangeResult(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DeltaRangeResult.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DeltaRangeResult.cs new file mode 100644 index 000000000000..2a64af73cbc1 --- /dev/null +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DeltaRangeResult.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.Analytics.Defender.Easm +{ + /// Contains added, removed, and difference values for the whole range either 7 or 30 days. + public partial class DeltaRangeResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The range of dates requested. + /// The total amount of assets removed over a date range. + /// The total amount of assets added over a date range. + /// The total amount of assets changed removed over a date range. + /// A list of summary changes per asset kind. + /// is null. + internal DeltaRangeResult(long range, long removed, long added, long difference, IEnumerable kindSummaries) + { + Argument.AssertNotNull(kindSummaries, nameof(kindSummaries)); + + Range = range; + Removed = removed; + Added = added; + Difference = difference; + KindSummaries = kindSummaries.ToList(); + } + + /// Initializes a new instance of . + /// The range of dates requested. + /// The total amount of assets removed over a date range. + /// The total amount of assets added over a date range. + /// The total amount of assets changed removed over a date range. + /// A list of summary changes per asset kind. + /// Keeps track of any properties unknown to the library. + internal DeltaRangeResult(long range, long removed, long added, long difference, IReadOnlyList kindSummaries, IDictionary serializedAdditionalRawData) + { + Range = range; + Removed = removed; + Added = added; + Difference = difference; + KindSummaries = kindSummaries; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DeltaRangeResult() + { + } + + /// The range of dates requested. + public long Range { get; } + /// The total amount of assets removed over a date range. + public long Removed { get; } + /// The total amount of assets added over a date range. + public long Added { get; } + /// The total amount of assets changed removed over a date range. + public long Difference { get; } + /// A list of summary changes per asset kind. + public IReadOnlyList KindSummaries { get; } + } +} diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DeltaResult.Serialization.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DeltaResult.Serialization.cs new file mode 100644 index 000000000000..f4e149b5498e --- /dev/null +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DeltaResult.Serialization.cs @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Defender.Easm +{ + public partial class DeltaResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeltaResult)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.ToString()); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("createdAt"u8); + writer.WriteStringValue(CreatedAt, "O"); + writer.WritePropertyName("updatedAt"u8); + writer.WriteStringValue(UpdatedAt, "O"); + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + DeltaResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeltaResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDeltaResult(document.RootElement, options); + } + + internal static DeltaResult DeserializeDeltaResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + GlobalAssetType kind = default; + string name = default; + DateTimeOffset createdAt = default; + DateTimeOffset updatedAt = default; + GlobalInventoryState state = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("kind"u8)) + { + kind = new GlobalAssetType(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdAt"u8)) + { + createdAt = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("updatedAt"u8)) + { + updatedAt = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("state"u8)) + { + state = new GlobalInventoryState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DeltaResult( + kind, + name, + createdAt, + updatedAt, + state, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DeltaResult)} does not support writing '{options.Format}' format."); + } + } + + DeltaResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDeltaResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DeltaResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DeltaResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDeltaResult(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DeltaResult.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DeltaResult.cs new file mode 100644 index 000000000000..574e2526e978 --- /dev/null +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DeltaResult.cs @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Defender.Easm +{ + /// Result for each of the delta detail response. + public partial class DeltaResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Shows the asset kind. + /// Shows the asset name. + /// Shows the date when the asset was originally created. + /// Shows the date when the asset was last updated, usually the date the we trying to pull up the results for. + /// Shows the inventory state. + /// is null. + internal DeltaResult(GlobalAssetType kind, string name, DateTimeOffset createdAt, DateTimeOffset updatedAt, GlobalInventoryState state) + { + Argument.AssertNotNull(name, nameof(name)); + + Kind = kind; + Name = name; + CreatedAt = createdAt; + UpdatedAt = updatedAt; + State = state; + } + + /// Initializes a new instance of . + /// Shows the asset kind. + /// Shows the asset name. + /// Shows the date when the asset was originally created. + /// Shows the date when the asset was last updated, usually the date the we trying to pull up the results for. + /// Shows the inventory state. + /// Keeps track of any properties unknown to the library. + internal DeltaResult(GlobalAssetType kind, string name, DateTimeOffset createdAt, DateTimeOffset updatedAt, GlobalInventoryState state, IDictionary serializedAdditionalRawData) + { + Kind = kind; + Name = name; + CreatedAt = createdAt; + UpdatedAt = updatedAt; + State = state; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DeltaResult() + { + } + + /// Shows the asset kind. + public GlobalAssetType Kind { get; } + /// Shows the asset name. + public string Name { get; } + /// Shows the date when the asset was originally created. + public DateTimeOffset CreatedAt { get; } + /// Shows the date when the asset was last updated, usually the date the we trying to pull up the results for. + public DateTimeOffset UpdatedAt { get; } + /// Shows the inventory state. + public GlobalInventoryState State { get; } + } +} diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DeltaSummaryRequest.Serialization.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DeltaSummaryRequest.Serialization.cs new file mode 100644 index 000000000000..5d81ed2d1590 --- /dev/null +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DeltaSummaryRequest.Serialization.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Defender.Easm +{ + public partial class DeltaSummaryRequest : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeltaSummaryRequest)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(PriorDays)) + { + writer.WritePropertyName("priorDays"u8); + writer.WriteNumberValue(PriorDays.Value); + } + if (Optional.IsDefined(Date)) + { + writer.WritePropertyName("date"u8); + writer.WriteStringValue(Date); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + DeltaSummaryRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeltaSummaryRequest)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDeltaSummaryRequest(document.RootElement, options); + } + + internal static DeltaSummaryRequest DeserializeDeltaSummaryRequest(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? priorDays = default; + string date = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("priorDays"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + priorDays = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("date"u8)) + { + date = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DeltaSummaryRequest(priorDays, date, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DeltaSummaryRequest)} does not support writing '{options.Format}' format."); + } + } + + DeltaSummaryRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDeltaSummaryRequest(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DeltaSummaryRequest)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DeltaSummaryRequest FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDeltaSummaryRequest(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DeltaSummaryRequest.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DeltaSummaryRequest.cs new file mode 100644 index 000000000000..b28a577ccb9c --- /dev/null +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DeltaSummaryRequest.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Defender.Easm +{ + /// A request body used to retrieve a delta summary. + public partial class DeltaSummaryRequest + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DeltaSummaryRequest() + { + } + + /// Initializes a new instance of . + /// The number of days prior to retrieve deltas for. + /// expected format to be: yyyy-MM-dd. + /// Keeps track of any properties unknown to the library. + internal DeltaSummaryRequest(int? priorDays, string date, IDictionary serializedAdditionalRawData) + { + PriorDays = priorDays; + Date = date; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The number of days prior to retrieve deltas for. + public int? PriorDays { get; set; } + /// expected format to be: yyyy-MM-dd. + public string Date { get; set; } + } +} diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DeltaSummaryResult.Serialization.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DeltaSummaryResult.Serialization.cs new file mode 100644 index 000000000000..bb74f2943fd8 --- /dev/null +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DeltaSummaryResult.Serialization.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Defender.Easm +{ + public partial class DeltaSummaryResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeltaSummaryResult)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("summary"u8); + writer.WriteObjectValue(Summary, options); + writer.WritePropertyName("daily"u8); + writer.WriteStartArray(); + foreach (var item in Daily) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + DeltaSummaryResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeltaSummaryResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDeltaSummaryResult(document.RootElement, options); + } + + internal static DeltaSummaryResult DeserializeDeltaSummaryResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DeltaRangeResult summary = default; + IReadOnlyList daily = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("summary"u8)) + { + summary = DeltaRangeResult.DeserializeDeltaRangeResult(property.Value, options); + continue; + } + if (property.NameEquals("daily"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DeltaDateResult.DeserializeDeltaDateResult(item, options)); + } + daily = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DeltaSummaryResult(summary, daily, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DeltaSummaryResult)} does not support writing '{options.Format}' format."); + } + } + + DeltaSummaryResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDeltaSummaryResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DeltaSummaryResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DeltaSummaryResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDeltaSummaryResult(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DeltaSummaryResult.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DeltaSummaryResult.cs new file mode 100644 index 000000000000..659416679db8 --- /dev/null +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DeltaSummaryResult.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.Analytics.Defender.Easm +{ + /// Define response body for getting delta summary. + public partial class DeltaSummaryResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Contains added, removed, and difference values for the whole range either 7 or 30 days. + /// Contains added, removed, count, and difference values for each day. + /// or is null. + internal DeltaSummaryResult(DeltaRangeResult summary, IEnumerable daily) + { + Argument.AssertNotNull(summary, nameof(summary)); + Argument.AssertNotNull(daily, nameof(daily)); + + Summary = summary; + Daily = daily.ToList(); + } + + /// Initializes a new instance of . + /// Contains added, removed, and difference values for the whole range either 7 or 30 days. + /// Contains added, removed, count, and difference values for each day. + /// Keeps track of any properties unknown to the library. + internal DeltaSummaryResult(DeltaRangeResult summary, IReadOnlyList daily, IDictionary serializedAdditionalRawData) + { + Summary = summary; + Daily = daily; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DeltaSummaryResult() + { + } + + /// Contains added, removed, and difference values for the whole range either 7 or 30 days. + public DeltaRangeResult Summary { get; } + /// Contains added, removed, count, and difference values for each day. + public IReadOnlyList Daily { get; } + } +} diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DeltaTypeResponse.Serialization.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DeltaTypeResponse.Serialization.cs new file mode 100644 index 000000000000..549773661b6d --- /dev/null +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DeltaTypeResponse.Serialization.cs @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Defender.Easm +{ + public partial class DeltaTypeResponse : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeltaTypeResponse)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.ToString()); + writer.WritePropertyName("removed"u8); + writer.WriteNumberValue(Removed); + writer.WritePropertyName("added"u8); + writer.WriteNumberValue(Added); + writer.WritePropertyName("difference"u8); + writer.WriteNumberValue(Difference); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + DeltaTypeResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeltaTypeResponse)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDeltaTypeResponse(document.RootElement, options); + } + + internal static DeltaTypeResponse DeserializeDeltaTypeResponse(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + GlobalAssetType kind = default; + long removed = default; + long added = default; + long difference = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("kind"u8)) + { + kind = new GlobalAssetType(property.Value.GetString()); + continue; + } + if (property.NameEquals("removed"u8)) + { + removed = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("added"u8)) + { + added = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("difference"u8)) + { + difference = property.Value.GetInt64(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DeltaTypeResponse(kind, removed, added, difference, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DeltaTypeResponse)} does not support writing '{options.Format}' format."); + } + } + + DeltaTypeResponse IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDeltaTypeResponse(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DeltaTypeResponse)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DeltaTypeResponse FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDeltaTypeResponse(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DeltaTypeResponse.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DeltaTypeResponse.cs new file mode 100644 index 000000000000..ad7b5a9d5f8a --- /dev/null +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DeltaTypeResponse.cs @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Defender.Easm +{ + /// The type of Delta response for each asset kind. + public partial class DeltaTypeResponse + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The kind of asset. + /// The amount of assets removed for one asset kind. + /// The amount of assets added for one asset kind. + /// The amount of assets changed for one asset kind. + internal DeltaTypeResponse(GlobalAssetType kind, long removed, long added, long difference) + { + Kind = kind; + Removed = removed; + Added = added; + Difference = difference; + } + + /// Initializes a new instance of . + /// The kind of asset. + /// The amount of assets removed for one asset kind. + /// The amount of assets added for one asset kind. + /// The amount of assets changed for one asset kind. + /// Keeps track of any properties unknown to the library. + internal DeltaTypeResponse(GlobalAssetType kind, long removed, long added, long difference, IDictionary serializedAdditionalRawData) + { + Kind = kind; + Removed = removed; + Added = added; + Difference = difference; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DeltaTypeResponse() + { + } + + /// The kind of asset. + public GlobalAssetType Kind { get; } + /// The amount of assets removed for one asset kind. + public long Removed { get; } + /// The amount of assets added for one asset kind. + public long Added { get; } + /// The amount of assets changed for one asset kind. + public long Difference { get; } + } +} diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DiscoGroupSummaryResult.Serialization.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DiscoGroupSummaryResult.Serialization.cs new file mode 100644 index 000000000000..e0b589805745 --- /dev/null +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DiscoGroupSummaryResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Defender.Easm +{ + public partial class DiscoGroupSummaryResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DiscoGroupSummaryResult)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + DiscoGroupSummaryResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DiscoGroupSummaryResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDiscoGroupSummaryResult(document.RootElement, options); + } + + internal static DiscoGroupSummaryResult DeserializeDiscoGroupSummaryResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string id = default; + string name = default; + string displayName = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DiscoGroupSummaryResult(id, name, displayName, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DiscoGroupSummaryResult)} does not support writing '{options.Format}' format."); + } + } + + DiscoGroupSummaryResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDiscoGroupSummaryResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DiscoGroupSummaryResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DiscoGroupSummaryResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDiscoGroupSummaryResult(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DiscoGroupSummaryResult.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DiscoGroupSummaryResult.cs new file mode 100644 index 000000000000..8a3fcd7758d4 --- /dev/null +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/DiscoGroupSummaryResult.cs @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Defender.Easm +{ + /// A list of disco group summaries. + public partial class DiscoGroupSummaryResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The system generated unique id for the resource. + /// The caller provided unique name for the resource. + /// The name that can be used for display purposes. + /// , or is null. + internal DiscoGroupSummaryResult(string id, string name, string displayName) + { + Argument.AssertNotNull(id, nameof(id)); + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(displayName, nameof(displayName)); + + Id = id; + Name = name; + DisplayName = displayName; + } + + /// Initializes a new instance of . + /// The system generated unique id for the resource. + /// The caller provided unique name for the resource. + /// The name that can be used for display purposes. + /// Keeps track of any properties unknown to the library. + internal DiscoGroupSummaryResult(string id, string name, string displayName, IDictionary serializedAdditionalRawData) + { + Id = id; + Name = name; + DisplayName = displayName; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DiscoGroupSummaryResult() + { + } + + /// The system generated unique id for the resource. + public string Id { get; } + /// The caller provided unique name for the resource. + public string Name { get; } + /// The name that can be used for display purposes. + public string DisplayName { get; } + } +} diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/Docs/EasmClient.xml b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/Docs/EasmClient.xml index 6df56c7d8216..e882122e65b1 100644 --- a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/Docs/EasmClient.xml +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/Docs/EasmClient.xml @@ -269,6 +269,420 @@ Console.WriteLine(result.GetProperty("auditTrail")[0].GetProperty("displayName") Console.WriteLine(result.GetProperty("auditTrail")[0].GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("auditTrail")[0].GetProperty("reason").ToString()); Console.WriteLine(result.GetProperty("reason").ToString()); +]]> + + + +This sample shows how to call GetAssetsExportAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +AssetsExportRequest body = new AssetsExportRequest("", new string[] { "" }); +Response response = await client.GetAssetsExportAsync(body); +]]> +This sample shows how to call GetAssetsExportAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +AssetsExportRequest body = new AssetsExportRequest("", new string[] { "" }); +Response response = await client.GetAssetsExportAsync(body, filter: "", orderby: ""); +]]> + + + +This sample shows how to call GetAssetsExport. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +AssetsExportRequest body = new AssetsExportRequest("", new string[] { "" }); +Response response = client.GetAssetsExport(body); +]]> +This sample shows how to call GetAssetsExport with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +AssetsExportRequest body = new AssetsExportRequest("", new string[] { "" }); +Response response = client.GetAssetsExport(body, filter: "", orderby: ""); +]]> + + + +This sample shows how to call GetAssetsExportAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + fileName = "", + columns = new object[] + { + "" + }, +}); +Response response = await client.GetAssetsExportAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +]]> +This sample shows how to call GetAssetsExportAsync with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + fileName = "", + columns = new object[] + { + "" + }, +}); +Response response = await client.GetAssetsExportAsync(content, filter: "", orderby: ""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("startedAt").ToString()); +Console.WriteLine(result.GetProperty("completedAt").ToString()); +Console.WriteLine(result.GetProperty("lastPolledAt").ToString()); +Console.WriteLine(result.GetProperty("state").ToString()); +Console.WriteLine(result.GetProperty("phase").ToString()); +Console.WriteLine(result.GetProperty("reason").ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +]]> + + + +This sample shows how to call GetAssetsExport and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + fileName = "", + columns = new object[] + { + "" + }, +}); +Response response = client.GetAssetsExport(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +]]> +This sample shows how to call GetAssetsExport with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + fileName = "", + columns = new object[] + { + "" + }, +}); +Response response = client.GetAssetsExport(content, filter: "", orderby: ""); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("startedAt").ToString()); +Console.WriteLine(result.GetProperty("completedAt").ToString()); +Console.WriteLine(result.GetProperty("lastPolledAt").ToString()); +Console.WriteLine(result.GetProperty("state").ToString()); +Console.WriteLine(result.GetProperty("phase").ToString()); +Console.WriteLine(result.GetProperty("reason").ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +]]> + + + +This sample shows how to call GetObservationsAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +Response response = await client.GetObservationsAsync(""); +]]> +This sample shows how to call GetObservationsAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +Response response = await client.GetObservationsAsync("", filter: "", orderby: "", skip: 1234, maxpagesize: 1234); +]]> + + + +This sample shows how to call GetObservations. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +Response response = client.GetObservations(""); +]]> +This sample shows how to call GetObservations with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +Response response = client.GetObservations("", filter: "", orderby: "", skip: 1234, maxpagesize: 1234); +]]> + + + +This sample shows how to call GetObservationsAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +Response response = await client.GetObservationsAsync("", null, null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("totalElements").ToString()); +Console.WriteLine(result.GetProperty("prioritySummary").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("types")[0].ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("priority").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("cvssScoreV2").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("cvssScoreV3").ToString()); +]]> +This sample shows how to call GetObservationsAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +Response response = await client.GetObservationsAsync("", "", "", 1234, 1234, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("totalElements").ToString()); +Console.WriteLine(result.GetProperty("prioritySummary").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("types")[0].ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("priority").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("cvssScoreV2").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("cvssScoreV3").ToString()); +]]> + + + +This sample shows how to call GetObservations and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +Response response = client.GetObservations("", null, null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("totalElements").ToString()); +Console.WriteLine(result.GetProperty("prioritySummary").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("types")[0].ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("priority").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("cvssScoreV2").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("cvssScoreV3").ToString()); +]]> +This sample shows how to call GetObservations with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +Response response = client.GetObservations("", "", "", 1234, 1234, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("totalElements").ToString()); +Console.WriteLine(result.GetProperty("prioritySummary").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("types")[0].ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("priority").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("cvssScoreV2").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("cvssScoreV3").ToString()); +]]> + + + +This sample shows how to call GetDeltaSummaryAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +DeltaSummaryRequest body = new DeltaSummaryRequest(); +Response response = await client.GetDeltaSummaryAsync(body); +]]> +This sample shows how to call GetDeltaSummaryAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +DeltaSummaryRequest body = new DeltaSummaryRequest +{ + PriorDays = 1234, + Date = "", +}; +Response response = await client.GetDeltaSummaryAsync(body); +]]> + + + +This sample shows how to call GetDeltaSummary. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +DeltaSummaryRequest body = new DeltaSummaryRequest(); +Response response = client.GetDeltaSummary(body); +]]> +This sample shows how to call GetDeltaSummary with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +DeltaSummaryRequest body = new DeltaSummaryRequest +{ + PriorDays = 1234, + Date = "", +}; +Response response = client.GetDeltaSummary(body); +]]> + + + +This sample shows how to call GetDeltaSummaryAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new object()); +Response response = await client.GetDeltaSummaryAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("summary").GetProperty("range").ToString()); +Console.WriteLine(result.GetProperty("summary").GetProperty("removed").ToString()); +Console.WriteLine(result.GetProperty("summary").GetProperty("added").ToString()); +Console.WriteLine(result.GetProperty("summary").GetProperty("difference").ToString()); +Console.WriteLine(result.GetProperty("summary").GetProperty("kindSummaries")[0].GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("summary").GetProperty("kindSummaries")[0].GetProperty("removed").ToString()); +Console.WriteLine(result.GetProperty("summary").GetProperty("kindSummaries")[0].GetProperty("added").ToString()); +Console.WriteLine(result.GetProperty("summary").GetProperty("kindSummaries")[0].GetProperty("difference").ToString()); +Console.WriteLine(result.GetProperty("daily")[0].GetProperty("date").ToString()); +Console.WriteLine(result.GetProperty("daily")[0].GetProperty("deltas")[0].GetProperty("count").ToString()); +Console.WriteLine(result.GetProperty("daily")[0].GetProperty("deltas")[0].GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("daily")[0].GetProperty("deltas")[0].GetProperty("removed").ToString()); +Console.WriteLine(result.GetProperty("daily")[0].GetProperty("deltas")[0].GetProperty("added").ToString()); +Console.WriteLine(result.GetProperty("daily")[0].GetProperty("deltas")[0].GetProperty("difference").ToString()); +]]> +This sample shows how to call GetDeltaSummaryAsync with all request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + priorDays = 1234, + date = "", +}); +Response response = await client.GetDeltaSummaryAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("summary").GetProperty("range").ToString()); +Console.WriteLine(result.GetProperty("summary").GetProperty("removed").ToString()); +Console.WriteLine(result.GetProperty("summary").GetProperty("added").ToString()); +Console.WriteLine(result.GetProperty("summary").GetProperty("difference").ToString()); +Console.WriteLine(result.GetProperty("summary").GetProperty("kindSummaries")[0].GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("summary").GetProperty("kindSummaries")[0].GetProperty("removed").ToString()); +Console.WriteLine(result.GetProperty("summary").GetProperty("kindSummaries")[0].GetProperty("added").ToString()); +Console.WriteLine(result.GetProperty("summary").GetProperty("kindSummaries")[0].GetProperty("difference").ToString()); +Console.WriteLine(result.GetProperty("daily")[0].GetProperty("date").ToString()); +Console.WriteLine(result.GetProperty("daily")[0].GetProperty("deltas")[0].GetProperty("count").ToString()); +Console.WriteLine(result.GetProperty("daily")[0].GetProperty("deltas")[0].GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("daily")[0].GetProperty("deltas")[0].GetProperty("removed").ToString()); +Console.WriteLine(result.GetProperty("daily")[0].GetProperty("deltas")[0].GetProperty("added").ToString()); +Console.WriteLine(result.GetProperty("daily")[0].GetProperty("deltas")[0].GetProperty("difference").ToString()); +]]> + + + +This sample shows how to call GetDeltaSummary and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new object()); +Response response = client.GetDeltaSummary(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("summary").GetProperty("range").ToString()); +Console.WriteLine(result.GetProperty("summary").GetProperty("removed").ToString()); +Console.WriteLine(result.GetProperty("summary").GetProperty("added").ToString()); +Console.WriteLine(result.GetProperty("summary").GetProperty("difference").ToString()); +Console.WriteLine(result.GetProperty("summary").GetProperty("kindSummaries")[0].GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("summary").GetProperty("kindSummaries")[0].GetProperty("removed").ToString()); +Console.WriteLine(result.GetProperty("summary").GetProperty("kindSummaries")[0].GetProperty("added").ToString()); +Console.WriteLine(result.GetProperty("summary").GetProperty("kindSummaries")[0].GetProperty("difference").ToString()); +Console.WriteLine(result.GetProperty("daily")[0].GetProperty("date").ToString()); +Console.WriteLine(result.GetProperty("daily")[0].GetProperty("deltas")[0].GetProperty("count").ToString()); +Console.WriteLine(result.GetProperty("daily")[0].GetProperty("deltas")[0].GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("daily")[0].GetProperty("deltas")[0].GetProperty("removed").ToString()); +Console.WriteLine(result.GetProperty("daily")[0].GetProperty("deltas")[0].GetProperty("added").ToString()); +Console.WriteLine(result.GetProperty("daily")[0].GetProperty("deltas")[0].GetProperty("difference").ToString()); +]]> +This sample shows how to call GetDeltaSummary with all request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + priorDays = 1234, + date = "", +}); +Response response = client.GetDeltaSummary(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("summary").GetProperty("range").ToString()); +Console.WriteLine(result.GetProperty("summary").GetProperty("removed").ToString()); +Console.WriteLine(result.GetProperty("summary").GetProperty("added").ToString()); +Console.WriteLine(result.GetProperty("summary").GetProperty("difference").ToString()); +Console.WriteLine(result.GetProperty("summary").GetProperty("kindSummaries")[0].GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("summary").GetProperty("kindSummaries")[0].GetProperty("removed").ToString()); +Console.WriteLine(result.GetProperty("summary").GetProperty("kindSummaries")[0].GetProperty("added").ToString()); +Console.WriteLine(result.GetProperty("summary").GetProperty("kindSummaries")[0].GetProperty("difference").ToString()); +Console.WriteLine(result.GetProperty("daily")[0].GetProperty("date").ToString()); +Console.WriteLine(result.GetProperty("daily")[0].GetProperty("deltas")[0].GetProperty("count").ToString()); +Console.WriteLine(result.GetProperty("daily")[0].GetProperty("deltas")[0].GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("daily")[0].GetProperty("deltas")[0].GetProperty("removed").ToString()); +Console.WriteLine(result.GetProperty("daily")[0].GetProperty("deltas")[0].GetProperty("added").ToString()); +Console.WriteLine(result.GetProperty("daily")[0].GetProperty("deltas")[0].GetProperty("difference").ToString()); ]]> @@ -757,18 +1171,18 @@ Response response = client.DeleteDataConnection(""); Console.WriteLine(response.Status); ]]> - + -This sample shows how to call ValidateDiscoveryGroupAsync. +This sample shows how to call ValidateDiscoGroupAsync. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); DiscoveryGroupPayload body = new DiscoveryGroupPayload(); -Response response = await client.ValidateDiscoveryGroupAsync(body); +Response response = await client.ValidateDiscoGroupAsync(body); ]]> -This sample shows how to call ValidateDiscoveryGroupAsync with all parameters. +This sample shows how to call ValidateDiscoGroupAsync with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); @@ -789,21 +1203,21 @@ DiscoveryGroupPayload body = new DiscoveryGroupPayload Excludes = { default }, TemplateId = "", }; -Response response = await client.ValidateDiscoveryGroupAsync(body); +Response response = await client.ValidateDiscoGroupAsync(body); ]]> - + -This sample shows how to call ValidateDiscoveryGroup. +This sample shows how to call ValidateDiscoGroup. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); DiscoveryGroupPayload body = new DiscoveryGroupPayload(); -Response response = client.ValidateDiscoveryGroup(body); +Response response = client.ValidateDiscoGroup(body); ]]> -This sample shows how to call ValidateDiscoveryGroup with all parameters. +This sample shows how to call ValidateDiscoGroup with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); @@ -824,24 +1238,24 @@ DiscoveryGroupPayload body = new DiscoveryGroupPayload Excludes = { default }, TemplateId = "", }; -Response response = client.ValidateDiscoveryGroup(body); +Response response = client.ValidateDiscoGroup(body); ]]> - + -This sample shows how to call ValidateDiscoveryGroupAsync and parse the result. +This sample shows how to call ValidateDiscoGroupAsync and parse the result. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); using RequestContent content = RequestContent.Create(new object()); -Response response = await client.ValidateDiscoveryGroupAsync(content); +Response response = await client.ValidateDiscoGroupAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call ValidateDiscoveryGroupAsync with all request content and parse the result. +This sample shows how to call ValidateDiscoGroupAsync with all request content and parse the result. "); TokenCredential credential = new DefaultAzureCredential(); @@ -871,7 +1285,7 @@ using RequestContent content = RequestContent.Create(new }, templateId = "", }); -Response response = await client.ValidateDiscoveryGroupAsync(content); +Response response = await client.ValidateDiscoGroupAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); @@ -881,21 +1295,21 @@ Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetPrope Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("value").ToString()); ]]> - + -This sample shows how to call ValidateDiscoveryGroup and parse the result. +This sample shows how to call ValidateDiscoGroup and parse the result. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); using RequestContent content = RequestContent.Create(new object()); -Response response = client.ValidateDiscoveryGroup(content); +Response response = client.ValidateDiscoGroup(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call ValidateDiscoveryGroup with all request content and parse the result. +This sample shows how to call ValidateDiscoGroup with all request content and parse the result. "); TokenCredential credential = new DefaultAzureCredential(); @@ -925,7 +1339,7 @@ using RequestContent content = RequestContent.Create(new }, templateId = "", }); -Response response = client.ValidateDiscoveryGroup(content); +Response response = client.ValidateDiscoGroup(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); @@ -935,64 +1349,64 @@ Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetPrope Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("value").ToString()); ]]> - + -This sample shows how to call GetDiscoveryGroupAsync. +This sample shows how to call GetDiscoGroupAsync. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = await client.GetDiscoveryGroupAsync(""); +Response response = await client.GetDiscoGroupAsync(""); ]]> -This sample shows how to call GetDiscoveryGroupAsync with all parameters. +This sample shows how to call GetDiscoGroupAsync with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = await client.GetDiscoveryGroupAsync(""); +Response response = await client.GetDiscoGroupAsync(""); ]]> - + -This sample shows how to call GetDiscoveryGroup. +This sample shows how to call GetDiscoGroup. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = client.GetDiscoveryGroup(""); +Response response = client.GetDiscoGroup(""); ]]> -This sample shows how to call GetDiscoveryGroup with all parameters. +This sample shows how to call GetDiscoGroup with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = client.GetDiscoveryGroup(""); +Response response = client.GetDiscoGroup(""); ]]> - + -This sample shows how to call GetDiscoveryGroupAsync and parse the result. +This sample shows how to call GetDiscoGroupAsync and parse the result. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = await client.GetDiscoveryGroupAsync("", null); +Response response = await client.GetDiscoGroupAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); ]]> -This sample shows how to call GetDiscoveryGroupAsync with all parameters and parse the result. +This sample shows how to call GetDiscoGroupAsync with all parameters and parse the result. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = await client.GetDiscoveryGroupAsync("", null); +Response response = await client.GetDiscoGroupAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -1021,26 +1435,26 @@ Console.WriteLine(result.GetProperty("createdDate").ToString()); Console.WriteLine(result.GetProperty("templateId").ToString()); ]]> - + -This sample shows how to call GetDiscoveryGroup and parse the result. +This sample shows how to call GetDiscoGroup and parse the result. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = client.GetDiscoveryGroup("", null); +Response response = client.GetDiscoGroup("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); ]]> -This sample shows how to call GetDiscoveryGroup with all parameters and parse the result. +This sample shows how to call GetDiscoGroup with all parameters and parse the result. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = client.GetDiscoveryGroup("", null); +Response response = client.GetDiscoGroup("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -1069,53 +1483,99 @@ Console.WriteLine(result.GetProperty("createdDate").ToString()); Console.WriteLine(result.GetProperty("templateId").ToString()); ]]> - + -This sample shows how to call CreateOrReplaceDiscoveryGroupAsync. +This sample shows how to call DeleteDiscoGroupAsync. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -DiscoveryGroupPayload body = new DiscoveryGroupPayload(); -Response response = await client.CreateOrReplaceDiscoveryGroupAsync("", body); +Response response = await client.DeleteDiscoGroupAsync(""); + +Console.WriteLine(response.Status); ]]> -This sample shows how to call CreateOrReplaceDiscoveryGroupAsync with all parameters. +This sample shows how to call DeleteDiscoGroupAsync with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -DiscoveryGroupPayload body = new DiscoveryGroupPayload -{ - Name = "", - Description = "", - Tier = "", - FrequencyMilliseconds = 1234L, - Seeds = {new DiscoverySource - { - Kind = DiscoverySourceKind.As, - Name = "", - }}, +Response response = await client.DeleteDiscoGroupAsync(""); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call DeleteDiscoGroup. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +Response response = client.DeleteDiscoGroup(""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call DeleteDiscoGroup with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +Response response = client.DeleteDiscoGroup(""); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call CreateOrReplaceDiscoGroupAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +DiscoveryGroupPayload body = new DiscoveryGroupPayload(); +Response response = await client.CreateOrReplaceDiscoGroupAsync("", body); +]]> +This sample shows how to call CreateOrReplaceDiscoGroupAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +DiscoveryGroupPayload body = new DiscoveryGroupPayload +{ + Name = "", + Description = "", + Tier = "", + FrequencyMilliseconds = 1234L, + Seeds = {new DiscoverySource + { + Kind = DiscoverySourceKind.As, + Name = "", + }}, Names = { "" }, Excludes = { default }, TemplateId = "", }; -Response response = await client.CreateOrReplaceDiscoveryGroupAsync("", body); +Response response = await client.CreateOrReplaceDiscoGroupAsync("", body); ]]> - + -This sample shows how to call CreateOrReplaceDiscoveryGroup. +This sample shows how to call CreateOrReplaceDiscoGroup. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); DiscoveryGroupPayload body = new DiscoveryGroupPayload(); -Response response = client.CreateOrReplaceDiscoveryGroup("", body); +Response response = client.CreateOrReplaceDiscoGroup("", body); ]]> -This sample shows how to call CreateOrReplaceDiscoveryGroup with all parameters. +This sample shows how to call CreateOrReplaceDiscoGroup with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); @@ -1136,24 +1596,24 @@ DiscoveryGroupPayload body = new DiscoveryGroupPayload Excludes = { default }, TemplateId = "", }; -Response response = client.CreateOrReplaceDiscoveryGroup("", body); +Response response = client.CreateOrReplaceDiscoGroup("", body); ]]> - + -This sample shows how to call CreateOrReplaceDiscoveryGroupAsync and parse the result. +This sample shows how to call CreateOrReplaceDiscoGroupAsync and parse the result. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); using RequestContent content = RequestContent.Create(new object()); -Response response = await client.CreateOrReplaceDiscoveryGroupAsync("", content); +Response response = await client.CreateOrReplaceDiscoGroupAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); ]]> -This sample shows how to call CreateOrReplaceDiscoveryGroupAsync with all parameters and request content and parse the result. +This sample shows how to call CreateOrReplaceDiscoGroupAsync with all parameters and request content and parse the result. "); TokenCredential credential = new DefaultAzureCredential(); @@ -1183,7 +1643,7 @@ using RequestContent content = RequestContent.Create(new }, templateId = "", }); -Response response = await client.CreateOrReplaceDiscoveryGroupAsync("", content); +Response response = await client.CreateOrReplaceDiscoGroupAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -1212,21 +1672,21 @@ Console.WriteLine(result.GetProperty("createdDate").ToString()); Console.WriteLine(result.GetProperty("templateId").ToString()); ]]> - + -This sample shows how to call CreateOrReplaceDiscoveryGroup and parse the result. +This sample shows how to call CreateOrReplaceDiscoGroup and parse the result. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); using RequestContent content = RequestContent.Create(new object()); -Response response = client.CreateOrReplaceDiscoveryGroup("", content); +Response response = client.CreateOrReplaceDiscoGroup("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); ]]> -This sample shows how to call CreateOrReplaceDiscoveryGroup with all parameters and request content and parse the result. +This sample shows how to call CreateOrReplaceDiscoGroup with all parameters and request content and parse the result. "); TokenCredential credential = new DefaultAzureCredential(); @@ -1256,7 +1716,7 @@ using RequestContent content = RequestContent.Create(new }, templateId = "", }); -Response response = client.CreateOrReplaceDiscoveryGroup("", content); +Response response = client.CreateOrReplaceDiscoGroup("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -1285,110 +1745,398 @@ Console.WriteLine(result.GetProperty("createdDate").ToString()); Console.WriteLine(result.GetProperty("templateId").ToString()); ]]> - + -This sample shows how to call RunDiscoveryGroupAsync. +This sample shows how to call RunDiscoGroupAsync. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = await client.RunDiscoveryGroupAsync(""); +Response response = await client.RunDiscoGroupAsync(""); Console.WriteLine(response.Status); ]]> -This sample shows how to call RunDiscoveryGroupAsync with all parameters. +This sample shows how to call RunDiscoGroupAsync with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = await client.RunDiscoveryGroupAsync(""); +Response response = await client.RunDiscoGroupAsync(""); Console.WriteLine(response.Status); ]]> - + -This sample shows how to call RunDiscoveryGroup. +This sample shows how to call RunDiscoGroup. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = client.RunDiscoveryGroup(""); +Response response = client.RunDiscoGroup(""); Console.WriteLine(response.Status); ]]> -This sample shows how to call RunDiscoveryGroup with all parameters. +This sample shows how to call RunDiscoGroup with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = client.RunDiscoveryGroup(""); +Response response = client.RunDiscoGroup(""); Console.WriteLine(response.Status); ]]> - + + +This sample shows how to call GetAssetChainSummaryAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +AssetChainRequest body = new AssetChainRequest(AssetChainSource.DISCOGROUP, new string[] { "" }); +Response response = await client.GetAssetChainSummaryAsync(body); +]]> +This sample shows how to call GetAssetChainSummaryAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +AssetChainRequest body = new AssetChainRequest(AssetChainSource.DISCOGROUP, new string[] { "" }); +Response response = await client.GetAssetChainSummaryAsync(body); +]]> + + + +This sample shows how to call GetAssetChainSummary. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +AssetChainRequest body = new AssetChainRequest(AssetChainSource.DISCOGROUP, new string[] { "" }); +Response response = client.GetAssetChainSummary(body); +]]> +This sample shows how to call GetAssetChainSummary with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +AssetChainRequest body = new AssetChainRequest(AssetChainSource.DISCOGROUP, new string[] { "" }); +Response response = client.GetAssetChainSummary(body); +]]> + + + +This sample shows how to call GetAssetChainSummaryAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + assetChainSource = "DISCO_GROUP", + sourceIds = new object[] + { + "" + }, +}); +Response response = await client.GetAssetChainSummaryAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("affectedAssetsSummary")[0].GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("affectedAssetsSummary")[0].GetProperty("affectedCount").ToString()); +Console.WriteLine(result.GetProperty("affectedGroupsSummary")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("affectedGroupsSummary")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("affectedGroupsSummary")[0].GetProperty("displayName").ToString()); +]]> +This sample shows how to call GetAssetChainSummaryAsync with all request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + assetChainSource = "DISCO_GROUP", + sourceIds = new object[] + { + "" + }, +}); +Response response = await client.GetAssetChainSummaryAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("affectedAssetsSummary")[0].GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("affectedAssetsSummary")[0].GetProperty("affectedCount").ToString()); +Console.WriteLine(result.GetProperty("affectedGroupsSummary")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("affectedGroupsSummary")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("affectedGroupsSummary")[0].GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("error").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("error").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("error").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("error").GetProperty("innererror").GetProperty("value").ToString()); +]]> + + + +This sample shows how to call GetAssetChainSummary and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + assetChainSource = "DISCO_GROUP", + sourceIds = new object[] + { + "" + }, +}); +Response response = client.GetAssetChainSummary(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("affectedAssetsSummary")[0].GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("affectedAssetsSummary")[0].GetProperty("affectedCount").ToString()); +Console.WriteLine(result.GetProperty("affectedGroupsSummary")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("affectedGroupsSummary")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("affectedGroupsSummary")[0].GetProperty("displayName").ToString()); +]]> +This sample shows how to call GetAssetChainSummary with all request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + assetChainSource = "DISCO_GROUP", + sourceIds = new object[] + { + "" + }, +}); +Response response = client.GetAssetChainSummary(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("affectedAssetsSummary")[0].GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("affectedAssetsSummary")[0].GetProperty("affectedCount").ToString()); +Console.WriteLine(result.GetProperty("affectedGroupsSummary")[0].GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("affectedGroupsSummary")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("affectedGroupsSummary")[0].GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("error").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("error").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("error").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("error").GetProperty("innererror").GetProperty("value").ToString()); +]]> + + + +This sample shows how to call DismissAssetChainAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +AssetChainRequest body = new AssetChainRequest(AssetChainSource.DISCOGROUP, new string[] { "" }); +Response response = await client.DismissAssetChainAsync(body); +]]> +This sample shows how to call DismissAssetChainAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +AssetChainRequest body = new AssetChainRequest(AssetChainSource.DISCOGROUP, new string[] { "" }); +Response response = await client.DismissAssetChainAsync(body); +]]> + + + +This sample shows how to call DismissAssetChain. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +AssetChainRequest body = new AssetChainRequest(AssetChainSource.DISCOGROUP, new string[] { "" }); +Response response = client.DismissAssetChain(body); +]]> +This sample shows how to call DismissAssetChain with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +AssetChainRequest body = new AssetChainRequest(AssetChainSource.DISCOGROUP, new string[] { "" }); +Response response = client.DismissAssetChain(body); +]]> + + + +This sample shows how to call DismissAssetChainAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + assetChainSource = "DISCO_GROUP", + sourceIds = new object[] + { + "" + }, +}); +Response response = await client.DismissAssetChainAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +]]> +This sample shows how to call DismissAssetChainAsync with all request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + assetChainSource = "DISCO_GROUP", + sourceIds = new object[] + { + "" + }, +}); +Response response = await client.DismissAssetChainAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("startedAt").ToString()); +Console.WriteLine(result.GetProperty("completedAt").ToString()); +Console.WriteLine(result.GetProperty("lastPolledAt").ToString()); +Console.WriteLine(result.GetProperty("state").ToString()); +Console.WriteLine(result.GetProperty("phase").ToString()); +Console.WriteLine(result.GetProperty("reason").ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +]]> + + + +This sample shows how to call DismissAssetChain and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + assetChainSource = "DISCO_GROUP", + sourceIds = new object[] + { + "" + }, +}); +Response response = client.DismissAssetChain(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +]]> +This sample shows how to call DismissAssetChain with all request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + assetChainSource = "DISCO_GROUP", + sourceIds = new object[] + { + "" + }, +}); +Response response = client.DismissAssetChain(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("startedAt").ToString()); +Console.WriteLine(result.GetProperty("completedAt").ToString()); +Console.WriteLine(result.GetProperty("lastPolledAt").ToString()); +Console.WriteLine(result.GetProperty("state").ToString()); +Console.WriteLine(result.GetProperty("phase").ToString()); +Console.WriteLine(result.GetProperty("reason").ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +]]> + + -This sample shows how to call GetDiscoveryTemplateAsync. +This sample shows how to call GetDiscoTemplateAsync. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = await client.GetDiscoveryTemplateAsync(""); +Response response = await client.GetDiscoTemplateAsync(""); ]]> -This sample shows how to call GetDiscoveryTemplateAsync with all parameters. +This sample shows how to call GetDiscoTemplateAsync with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = await client.GetDiscoveryTemplateAsync(""); +Response response = await client.GetDiscoTemplateAsync(""); ]]> - + -This sample shows how to call GetDiscoveryTemplate. +This sample shows how to call GetDiscoTemplate. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = client.GetDiscoveryTemplate(""); +Response response = client.GetDiscoTemplate(""); ]]> -This sample shows how to call GetDiscoveryTemplate with all parameters. +This sample shows how to call GetDiscoTemplate with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = client.GetDiscoveryTemplate(""); +Response response = client.GetDiscoTemplate(""); ]]> - + -This sample shows how to call GetDiscoveryTemplateAsync and parse the result. +This sample shows how to call GetDiscoTemplateAsync and parse the result. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = await client.GetDiscoveryTemplateAsync("", null); +Response response = await client.GetDiscoTemplateAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); ]]> -This sample shows how to call GetDiscoveryTemplateAsync with all parameters and parse the result. +This sample shows how to call GetDiscoTemplateAsync with all parameters and parse the result. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = await client.GetDiscoveryTemplateAsync("", null); +Response response = await client.GetDiscoTemplateAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -1404,26 +2152,26 @@ Console.WriteLine(result.GetProperty("seeds")[0].GetProperty("name").ToString()) Console.WriteLine(result.GetProperty("names")[0].ToString()); ]]> - + -This sample shows how to call GetDiscoveryTemplate and parse the result. +This sample shows how to call GetDiscoTemplate and parse the result. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = client.GetDiscoveryTemplate("", null); +Response response = client.GetDiscoTemplate("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); ]]> -This sample shows how to call GetDiscoveryTemplate with all parameters and parse the result. +This sample shows how to call GetDiscoTemplate with all parameters and parse the result. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = client.GetDiscoveryTemplate("", null); +Response response = client.GetDiscoTemplate("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -1883,64 +2631,200 @@ Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children" Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("link").ToString()); ]]> - + -This sample shows how to call GetSavedFilterAsync. +This sample shows how to call GetSnapshotExportAsync. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = await client.GetSavedFilterAsync(""); +ReportAssetSnapshotExportPayload body = new ReportAssetSnapshotExportPayload(); +Response response = await client.GetSnapshotExportAsync(body); ]]> -This sample shows how to call GetSavedFilterAsync with all parameters. +This sample shows how to call GetSnapshotExportAsync with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = await client.GetSavedFilterAsync(""); +ReportAssetSnapshotExportPayload body = new ReportAssetSnapshotExportPayload +{ + Metric = "", + FileName = "", + Columns = { "" }, +}; +Response response = await client.GetSnapshotExportAsync(body); ]]> - + -This sample shows how to call GetSavedFilter. +This sample shows how to call GetSnapshotExport. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = client.GetSavedFilter(""); +ReportAssetSnapshotExportPayload body = new ReportAssetSnapshotExportPayload(); +Response response = client.GetSnapshotExport(body); ]]> -This sample shows how to call GetSavedFilter with all parameters. +This sample shows how to call GetSnapshotExport with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = client.GetSavedFilter(""); +ReportAssetSnapshotExportPayload body = new ReportAssetSnapshotExportPayload +{ + Metric = "", + FileName = "", + Columns = { "" }, +}; +Response response = client.GetSnapshotExport(body); ]]> - + -This sample shows how to call GetSavedFilterAsync and parse the result. +This sample shows how to call GetSnapshotExportAsync and parse the result. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = await client.GetSavedFilterAsync("", null); +using RequestContent content = RequestContent.Create(new object()); +Response response = await client.GetSnapshotExportAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("id").ToString()); ]]> -This sample shows how to call GetSavedFilterAsync with all parameters and parse the result. +This sample shows how to call GetSnapshotExportAsync with all request content and parse the result. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = await client.GetSavedFilterAsync("", null); +using RequestContent content = RequestContent.Create(new +{ + metric = "", + fileName = "", + columns = new object[] + { + "" + }, +}); +Response response = await client.GetSnapshotExportAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("startedAt").ToString()); +Console.WriteLine(result.GetProperty("completedAt").ToString()); +Console.WriteLine(result.GetProperty("lastPolledAt").ToString()); +Console.WriteLine(result.GetProperty("state").ToString()); +Console.WriteLine(result.GetProperty("phase").ToString()); +Console.WriteLine(result.GetProperty("reason").ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +]]> + + + +This sample shows how to call GetSnapshotExport and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new object()); +Response response = client.GetSnapshotExport(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +]]> +This sample shows how to call GetSnapshotExport with all request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + metric = "", + fileName = "", + columns = new object[] + { + "" + }, +}); +Response response = client.GetSnapshotExport(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("startedAt").ToString()); +Console.WriteLine(result.GetProperty("completedAt").ToString()); +Console.WriteLine(result.GetProperty("lastPolledAt").ToString()); +Console.WriteLine(result.GetProperty("state").ToString()); +Console.WriteLine(result.GetProperty("phase").ToString()); +Console.WriteLine(result.GetProperty("reason").ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +]]> + + + +This sample shows how to call GetSavedFilterAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +Response response = await client.GetSavedFilterAsync(""); +]]> +This sample shows how to call GetSavedFilterAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +Response response = await client.GetSavedFilterAsync(""); +]]> + + + +This sample shows how to call GetSavedFilter. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +Response response = client.GetSavedFilter(""); +]]> +This sample shows how to call GetSavedFilter with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +Response response = client.GetSavedFilter(""); +]]> + + + +This sample shows how to call GetSavedFilterAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +Response response = await client.GetSavedFilterAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("name").ToString()); +]]> +This sample shows how to call GetSavedFilterAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +Response response = await client.GetSavedFilterAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -2134,75 +3018,381 @@ Response response = client.DeleteSavedFilter(""); Console.WriteLine(response.Status); ]]> -This sample shows how to call DeleteSavedFilter with all parameters. +This sample shows how to call DeleteSavedFilter with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +Response response = client.DeleteSavedFilter(""); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call GetTaskAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +Response response = await client.GetTaskAsync(""); +]]> +This sample shows how to call GetTaskAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +Response response = await client.GetTaskAsync(""); +]]> + + + +This sample shows how to call GetTask. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +Response response = client.GetTask(""); +]]> +This sample shows how to call GetTask with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +Response response = client.GetTask(""); +]]> + + + +This sample shows how to call GetTaskAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +Response response = await client.GetTaskAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +]]> +This sample shows how to call GetTaskAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +Response response = await client.GetTaskAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("startedAt").ToString()); +Console.WriteLine(result.GetProperty("completedAt").ToString()); +Console.WriteLine(result.GetProperty("lastPolledAt").ToString()); +Console.WriteLine(result.GetProperty("state").ToString()); +Console.WriteLine(result.GetProperty("phase").ToString()); +Console.WriteLine(result.GetProperty("reason").ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +]]> + + + +This sample shows how to call GetTask and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +Response response = client.GetTask("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +]]> +This sample shows how to call GetTask with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +Response response = client.GetTask("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("startedAt").ToString()); +Console.WriteLine(result.GetProperty("completedAt").ToString()); +Console.WriteLine(result.GetProperty("lastPolledAt").ToString()); +Console.WriteLine(result.GetProperty("state").ToString()); +Console.WriteLine(result.GetProperty("phase").ToString()); +Console.WriteLine(result.GetProperty("reason").ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +]]> + + + +This sample shows how to call CancelTaskAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +Response response = await client.CancelTaskAsync(""); +]]> +This sample shows how to call CancelTaskAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +Response response = await client.CancelTaskAsync(""); +]]> + + + +This sample shows how to call CancelTask. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +Response response = client.CancelTask(""); +]]> +This sample shows how to call CancelTask with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +Response response = client.CancelTask(""); +]]> + + + +This sample shows how to call CancelTaskAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +Response response = await client.CancelTaskAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +]]> +This sample shows how to call CancelTaskAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +Response response = await client.CancelTaskAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("startedAt").ToString()); +Console.WriteLine(result.GetProperty("completedAt").ToString()); +Console.WriteLine(result.GetProperty("lastPolledAt").ToString()); +Console.WriteLine(result.GetProperty("state").ToString()); +Console.WriteLine(result.GetProperty("phase").ToString()); +Console.WriteLine(result.GetProperty("reason").ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +]]> + + + +This sample shows how to call CancelTask and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +Response response = client.CancelTask("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +]]> +This sample shows how to call CancelTask with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +Response response = client.CancelTask("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("startedAt").ToString()); +Console.WriteLine(result.GetProperty("completedAt").ToString()); +Console.WriteLine(result.GetProperty("lastPolledAt").ToString()); +Console.WriteLine(result.GetProperty("state").ToString()); +Console.WriteLine(result.GetProperty("phase").ToString()); +Console.WriteLine(result.GetProperty("reason").ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +]]> + + + +This sample shows how to call RunTaskAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +Response response = await client.RunTaskAsync(""); +]]> +This sample shows how to call RunTaskAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +Response response = await client.RunTaskAsync(""); +]]> + + + +This sample shows how to call RunTask. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +Response response = client.RunTask(""); +]]> +This sample shows how to call RunTask with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +Response response = client.RunTask(""); +]]> + + + +This sample shows how to call RunTaskAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +Response response = await client.RunTaskAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +]]> +This sample shows how to call RunTaskAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +Response response = await client.RunTaskAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("startedAt").ToString()); +Console.WriteLine(result.GetProperty("completedAt").ToString()); +Console.WriteLine(result.GetProperty("lastPolledAt").ToString()); +Console.WriteLine(result.GetProperty("state").ToString()); +Console.WriteLine(result.GetProperty("phase").ToString()); +Console.WriteLine(result.GetProperty("reason").ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +]]> + + + +This sample shows how to call RunTask and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +Response response = client.RunTask("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +]]> +This sample shows how to call RunTask with all parameters and parse the result. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = client.DeleteSavedFilter(""); +Response response = client.RunTask("", null); -Console.WriteLine(response.Status); +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("startedAt").ToString()); +Console.WriteLine(result.GetProperty("completedAt").ToString()); +Console.WriteLine(result.GetProperty("lastPolledAt").ToString()); +Console.WriteLine(result.GetProperty("state").ToString()); +Console.WriteLine(result.GetProperty("phase").ToString()); +Console.WriteLine(result.GetProperty("reason").ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); ]]> - + -This sample shows how to call GetTaskAsync. +This sample shows how to call DownloadTaskAsync. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = await client.GetTaskAsync(""); +Response response = await client.DownloadTaskAsync(""); ]]> -This sample shows how to call GetTaskAsync with all parameters. +This sample shows how to call DownloadTaskAsync with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = await client.GetTaskAsync(""); +Response response = await client.DownloadTaskAsync(""); ]]> - + -This sample shows how to call GetTask. +This sample shows how to call DownloadTask. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = client.GetTask(""); +Response response = client.DownloadTask(""); ]]> -This sample shows how to call GetTask with all parameters. +This sample shows how to call DownloadTask with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = client.GetTask(""); +Response response = client.DownloadTask(""); ]]> - + -This sample shows how to call GetTaskAsync and parse the result. +This sample shows how to call DownloadTaskAsync and parse the result. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = await client.GetTaskAsync("", null); +Response response = await client.DownloadTaskAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); ]]> -This sample shows how to call GetTaskAsync with all parameters and parse the result. +This sample shows how to call DownloadTaskAsync with all parameters and parse the result. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = await client.GetTaskAsync("", null); +Response response = await client.DownloadTaskAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -2215,26 +3405,26 @@ Console.WriteLine(result.GetProperty("reason").ToString()); Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); ]]> - + -This sample shows how to call GetTask and parse the result. +This sample shows how to call DownloadTask and parse the result. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = client.GetTask("", null); +Response response = client.DownloadTask("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); ]]> -This sample shows how to call GetTask with all parameters and parse the result. +This sample shows how to call DownloadTask with all parameters and parse the result. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = client.GetTask("", null); +Response response = client.DownloadTask("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -2247,109 +3437,135 @@ Console.WriteLine(result.GetProperty("reason").ToString()); Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); ]]> - + -This sample shows how to call CancelTaskAsync. +This sample shows how to call GetCisaCveAsync. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = await client.CancelTaskAsync(""); +Response response = await client.GetCisaCveAsync(""); ]]> -This sample shows how to call CancelTaskAsync with all parameters. +This sample shows how to call GetCisaCveAsync with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = await client.CancelTaskAsync(""); +Response response = await client.GetCisaCveAsync(""); ]]> - + -This sample shows how to call CancelTask. +This sample shows how to call GetCisaCve. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = client.CancelTask(""); +Response response = client.GetCisaCve(""); ]]> -This sample shows how to call CancelTask with all parameters. +This sample shows how to call GetCisaCve with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = client.CancelTask(""); +Response response = client.GetCisaCve(""); ]]> - + -This sample shows how to call CancelTaskAsync and parse the result. +This sample shows how to call GetCisaCveAsync and parse the result. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = await client.CancelTaskAsync("", null); +Response response = await client.GetCisaCveAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("cveId").ToString()); +Console.WriteLine(result.GetProperty("vendorProject").ToString()); +Console.WriteLine(result.GetProperty("product").ToString()); +Console.WriteLine(result.GetProperty("vulnerabilityName").ToString()); +Console.WriteLine(result.GetProperty("shortDescription").ToString()); +Console.WriteLine(result.GetProperty("requiredAction").ToString()); +Console.WriteLine(result.GetProperty("notes").ToString()); +Console.WriteLine(result.GetProperty("dateAdded").ToString()); +Console.WriteLine(result.GetProperty("dueDate").ToString()); +Console.WriteLine(result.GetProperty("updatedAt").ToString()); +Console.WriteLine(result.GetProperty("count").ToString()); ]]> -This sample shows how to call CancelTaskAsync with all parameters and parse the result. +This sample shows how to call GetCisaCveAsync with all parameters and parse the result. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = await client.CancelTaskAsync("", null); +Response response = await client.GetCisaCveAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("startedAt").ToString()); -Console.WriteLine(result.GetProperty("completedAt").ToString()); -Console.WriteLine(result.GetProperty("lastPolledAt").ToString()); -Console.WriteLine(result.GetProperty("state").ToString()); -Console.WriteLine(result.GetProperty("phase").ToString()); -Console.WriteLine(result.GetProperty("reason").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("cveId").ToString()); +Console.WriteLine(result.GetProperty("vendorProject").ToString()); +Console.WriteLine(result.GetProperty("product").ToString()); +Console.WriteLine(result.GetProperty("vulnerabilityName").ToString()); +Console.WriteLine(result.GetProperty("shortDescription").ToString()); +Console.WriteLine(result.GetProperty("requiredAction").ToString()); +Console.WriteLine(result.GetProperty("notes").ToString()); +Console.WriteLine(result.GetProperty("dateAdded").ToString()); +Console.WriteLine(result.GetProperty("dueDate").ToString()); +Console.WriteLine(result.GetProperty("updatedAt").ToString()); +Console.WriteLine(result.GetProperty("count").ToString()); ]]> - + -This sample shows how to call CancelTask and parse the result. +This sample shows how to call GetCisaCve and parse the result. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = client.CancelTask("", null); +Response response = client.GetCisaCve("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("cveId").ToString()); +Console.WriteLine(result.GetProperty("vendorProject").ToString()); +Console.WriteLine(result.GetProperty("product").ToString()); +Console.WriteLine(result.GetProperty("vulnerabilityName").ToString()); +Console.WriteLine(result.GetProperty("shortDescription").ToString()); +Console.WriteLine(result.GetProperty("requiredAction").ToString()); +Console.WriteLine(result.GetProperty("notes").ToString()); +Console.WriteLine(result.GetProperty("dateAdded").ToString()); +Console.WriteLine(result.GetProperty("dueDate").ToString()); +Console.WriteLine(result.GetProperty("updatedAt").ToString()); +Console.WriteLine(result.GetProperty("count").ToString()); ]]> -This sample shows how to call CancelTask with all parameters and parse the result. +This sample shows how to call GetCisaCve with all parameters and parse the result. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -Response response = client.CancelTask("", null); +Response response = client.GetCisaCve("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("id").ToString()); -Console.WriteLine(result.GetProperty("startedAt").ToString()); -Console.WriteLine(result.GetProperty("completedAt").ToString()); -Console.WriteLine(result.GetProperty("lastPolledAt").ToString()); -Console.WriteLine(result.GetProperty("state").ToString()); -Console.WriteLine(result.GetProperty("phase").ToString()); -Console.WriteLine(result.GetProperty("reason").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("cveId").ToString()); +Console.WriteLine(result.GetProperty("vendorProject").ToString()); +Console.WriteLine(result.GetProperty("product").ToString()); +Console.WriteLine(result.GetProperty("vulnerabilityName").ToString()); +Console.WriteLine(result.GetProperty("shortDescription").ToString()); +Console.WriteLine(result.GetProperty("requiredAction").ToString()); +Console.WriteLine(result.GetProperty("notes").ToString()); +Console.WriteLine(result.GetProperty("dateAdded").ToString()); +Console.WriteLine(result.GetProperty("dueDate").ToString()); +Console.WriteLine(result.GetProperty("updatedAt").ToString()); +Console.WriteLine(result.GetProperty("count").ToString()); ]]> - + This sample shows how to call GetAssetResourcesAsync. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -await foreach (AssetResource item in client.GetAssetResourcesAsync(filter: "", orderby: "", skip: 1234, maxpagesize: 1234, mark: "")) +await foreach (AssetResource item in client.GetAssetResourcesAsync(filter: "", orderby: "", skip: 1234, maxpagesize: 1234, mark: "", responseType: AssetResponseType.Id, responseIncludes: new string[] { "" }, recentOnly: true)) { } ]]> - + This sample shows how to call GetAssetResources. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -foreach (AssetResource item in client.GetAssetResources(filter: "", orderby: "", skip: 1234, maxpagesize: 1234, mark: "")) +foreach (AssetResource item in client.GetAssetResources(filter: "", orderby: "", skip: 1234, maxpagesize: 1234, mark: "", responseType: AssetResponseType.Id, responseIncludes: new string[] { "" }, recentOnly: true)) { } ]]> - + This sample shows how to call GetAssetResourcesAsync and parse the result. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -await foreach (BinaryData item in client.GetAssetResourcesAsync(null, null, null, null, null, null)) +await foreach (BinaryData item in client.GetAssetResourcesAsync(null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); @@ -2416,7 +3632,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -await foreach (BinaryData item in client.GetAssetResourcesAsync("", "", 1234, 1234, "", null)) +await foreach (BinaryData item in client.GetAssetResourcesAsync("", "", 1234, 1234, "", "id", new string[] { "" }, true, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); @@ -2440,7 +3656,7 @@ await foreach (BinaryData item in client.GetAssetResourcesAsync("", " - + This sample shows how to call GetAssetResources and parse the result. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -foreach (BinaryData item in client.GetAssetResources(null, null, null, null, null, null)) +foreach (BinaryData item in client.GetAssetResources(null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); @@ -2461,7 +3677,7 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -foreach (BinaryData item in client.GetAssetResources("", "", 1234, 1234, "", null)) +foreach (BinaryData item in client.GetAssetResources("", "", 1234, 1234, "", "id", new string[] { "" }, true, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); @@ -2483,6 +3699,158 @@ foreach (BinaryData item in client.GetAssetResources("", "", 12 Console.WriteLine(result.GetProperty("auditTrail")[0].GetProperty("reason").ToString()); Console.WriteLine(result.GetProperty("reason").ToString()); } +]]> + + + +This sample shows how to call GetDeltaDetailsAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +DeltaDetailsRequest body = new DeltaDetailsRequest(DeltaDetailType.Added, GlobalAssetType.Page); +await foreach (DeltaResult item in client.GetDeltaDetailsAsync(body)) +{ +} +]]> +This sample shows how to call GetDeltaDetailsAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +DeltaDetailsRequest body = new DeltaDetailsRequest(DeltaDetailType.Added, GlobalAssetType.Page) +{ + PriorDays = 1234, + Date = "", +}; +await foreach (DeltaResult item in client.GetDeltaDetailsAsync(body, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetDeltaDetails. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +DeltaDetailsRequest body = new DeltaDetailsRequest(DeltaDetailType.Added, GlobalAssetType.Page); +foreach (DeltaResult item in client.GetDeltaDetails(body)) +{ +} +]]> +This sample shows how to call GetDeltaDetails with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +DeltaDetailsRequest body = new DeltaDetailsRequest(DeltaDetailType.Added, GlobalAssetType.Page) +{ + PriorDays = 1234, + Date = "", +}; +foreach (DeltaResult item in client.GetDeltaDetails(body, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetDeltaDetailsAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + deltaDetailType = "added", + kind = "page", +}); +await foreach (BinaryData item in client.GetDeltaDetailsAsync(content)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("createdAt").ToString()); + Console.WriteLine(result.GetProperty("updatedAt").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); +} +]]> +This sample shows how to call GetDeltaDetailsAsync with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + deltaDetailType = "added", + priorDays = 1234, + kind = "page", + date = "", +}); +await foreach (BinaryData item in client.GetDeltaDetailsAsync(content, skip: 1234, maxpagesize: 1234)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("createdAt").ToString()); + Console.WriteLine(result.GetProperty("updatedAt").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); +} +]]> + + + +This sample shows how to call GetDeltaDetails and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + deltaDetailType = "added", + kind = "page", +}); +foreach (BinaryData item in client.GetDeltaDetails(content)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("createdAt").ToString()); + Console.WriteLine(result.GetProperty("updatedAt").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); +} +]]> +This sample shows how to call GetDeltaDetails with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + deltaDetailType = "added", + priorDays = 1234, + kind = "page", + date = "", +}); +foreach (BinaryData item in client.GetDeltaDetails(content, skip: 1234, maxpagesize: 1234)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("createdAt").ToString()); + Console.WriteLine(result.GetProperty("updatedAt").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); +} ]]> @@ -2609,73 +3977,73 @@ foreach (BinaryData item in client.GetDataConnections(1234, 1234, null)) } ]]> - + -This sample shows how to call GetDiscoveryGroupsAsync. +This sample shows how to call GetDiscoGroupsAsync. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -await foreach (DiscoveryGroup item in client.GetDiscoveryGroupsAsync()) +await foreach (DiscoveryGroup item in client.GetDiscoGroupsAsync()) { } ]]> -This sample shows how to call GetDiscoveryGroupsAsync with all parameters. +This sample shows how to call GetDiscoGroupsAsync with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -await foreach (DiscoveryGroup item in client.GetDiscoveryGroupsAsync(filter: "", skip: 1234, maxpagesize: 1234)) +await foreach (DiscoveryGroup item in client.GetDiscoGroupsAsync(filter: "", skip: 1234, maxpagesize: 1234)) { } ]]> - + -This sample shows how to call GetDiscoveryGroups. +This sample shows how to call GetDiscoGroups. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -foreach (DiscoveryGroup item in client.GetDiscoveryGroups()) +foreach (DiscoveryGroup item in client.GetDiscoGroups()) { } ]]> -This sample shows how to call GetDiscoveryGroups with all parameters. +This sample shows how to call GetDiscoGroups with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -foreach (DiscoveryGroup item in client.GetDiscoveryGroups(filter: "", skip: 1234, maxpagesize: 1234)) +foreach (DiscoveryGroup item in client.GetDiscoGroups(filter: "", skip: 1234, maxpagesize: 1234)) { } ]]> - + -This sample shows how to call GetDiscoveryGroupsAsync and parse the result. +This sample shows how to call GetDiscoGroupsAsync and parse the result. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -await foreach (BinaryData item in client.GetDiscoveryGroupsAsync(null, null, null, null)) +await foreach (BinaryData item in client.GetDiscoGroupsAsync(null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); } ]]> -This sample shows how to call GetDiscoveryGroupsAsync with all parameters and parse the result. +This sample shows how to call GetDiscoGroupsAsync with all parameters and parse the result. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -await foreach (BinaryData item in client.GetDiscoveryGroupsAsync("", 1234, 1234, null)) +await foreach (BinaryData item in client.GetDiscoGroupsAsync("", 1234, 1234, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -2705,27 +4073,27 @@ await foreach (BinaryData item in client.GetDiscoveryGroupsAsync("", 123 } ]]> - + -This sample shows how to call GetDiscoveryGroups and parse the result. +This sample shows how to call GetDiscoGroups and parse the result. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -foreach (BinaryData item in client.GetDiscoveryGroups(null, null, null, null)) +foreach (BinaryData item in client.GetDiscoGroups(null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); } ]]> -This sample shows how to call GetDiscoveryGroups with all parameters and parse the result. +This sample shows how to call GetDiscoGroups with all parameters and parse the result. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -foreach (BinaryData item in client.GetDiscoveryGroups("", 1234, 1234, null)) +foreach (BinaryData item in client.GetDiscoGroups("", 1234, 1234, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -2755,73 +4123,73 @@ foreach (BinaryData item in client.GetDiscoveryGroups("", 1234, 1234, nu } ]]> - + -This sample shows how to call GetDiscoveryGroupRunsAsync. +This sample shows how to call GetRunsAsync. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -await foreach (DiscoveryRunResult item in client.GetDiscoveryGroupRunsAsync("")) +await foreach (DiscoveryRunResult item in client.GetRunsAsync("")) { } ]]> -This sample shows how to call GetDiscoveryGroupRunsAsync with all parameters. +This sample shows how to call GetRunsAsync with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -await foreach (DiscoveryRunResult item in client.GetDiscoveryGroupRunsAsync("", filter: "", skip: 1234, maxpagesize: 1234)) +await foreach (DiscoveryRunResult item in client.GetRunsAsync("", filter: "", skip: 1234, maxpagesize: 1234)) { } ]]> - + -This sample shows how to call GetDiscoveryGroupRuns. +This sample shows how to call GetRuns. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -foreach (DiscoveryRunResult item in client.GetDiscoveryGroupRuns("")) +foreach (DiscoveryRunResult item in client.GetRuns("")) { } ]]> -This sample shows how to call GetDiscoveryGroupRuns with all parameters. +This sample shows how to call GetRuns with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -foreach (DiscoveryRunResult item in client.GetDiscoveryGroupRuns("", filter: "", skip: 1234, maxpagesize: 1234)) +foreach (DiscoveryRunResult item in client.GetRuns("", filter: "", skip: 1234, maxpagesize: 1234)) { } ]]> - + -This sample shows how to call GetDiscoveryGroupRunsAsync and parse the result. +This sample shows how to call GetRunsAsync and parse the result. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -await foreach (BinaryData item in client.GetDiscoveryGroupRunsAsync("", null, null, null, null)) +await foreach (BinaryData item in client.GetRunsAsync("", null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.ToString()); } ]]> -This sample shows how to call GetDiscoveryGroupRunsAsync with all parameters and parse the result. +This sample shows how to call GetRunsAsync with all parameters and parse the result. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -await foreach (BinaryData item in client.GetDiscoveryGroupRunsAsync("", "", 1234, 1234, null)) +await foreach (BinaryData item in client.GetRunsAsync("", "", 1234, 1234, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("submittedDate").ToString()); @@ -2838,27 +4206,27 @@ await foreach (BinaryData item in client.GetDiscoveryGroupRunsAsync(" } ]]> - + -This sample shows how to call GetDiscoveryGroupRuns and parse the result. +This sample shows how to call GetRuns and parse the result. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -foreach (BinaryData item in client.GetDiscoveryGroupRuns("", null, null, null, null)) +foreach (BinaryData item in client.GetRuns("", null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.ToString()); } ]]> -This sample shows how to call GetDiscoveryGroupRuns with all parameters and parse the result. +This sample shows how to call GetRuns with all parameters and parse the result. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -foreach (BinaryData item in client.GetDiscoveryGroupRuns("", "", 1234, 1234, null)) +foreach (BinaryData item in client.GetRuns("", "", 1234, 1234, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("submittedDate").ToString()); @@ -2875,73 +4243,73 @@ foreach (BinaryData item in client.GetDiscoveryGroupRuns("", " - + -This sample shows how to call GetDiscoveryTemplatesAsync. +This sample shows how to call GetDiscoTemplatesAsync. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -await foreach (DiscoveryTemplate item in client.GetDiscoveryTemplatesAsync()) +await foreach (DiscoveryTemplate item in client.GetDiscoTemplatesAsync()) { } ]]> -This sample shows how to call GetDiscoveryTemplatesAsync with all parameters. +This sample shows how to call GetDiscoTemplatesAsync with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -await foreach (DiscoveryTemplate item in client.GetDiscoveryTemplatesAsync(filter: "", skip: 1234, maxpagesize: 1234)) +await foreach (DiscoveryTemplate item in client.GetDiscoTemplatesAsync(filter: "", skip: 1234, maxpagesize: 1234)) { } ]]> - + -This sample shows how to call GetDiscoveryTemplates. +This sample shows how to call GetDiscoTemplates. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -foreach (DiscoveryTemplate item in client.GetDiscoveryTemplates()) +foreach (DiscoveryTemplate item in client.GetDiscoTemplates()) { } ]]> -This sample shows how to call GetDiscoveryTemplates with all parameters. +This sample shows how to call GetDiscoTemplates with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -foreach (DiscoveryTemplate item in client.GetDiscoveryTemplates(filter: "", skip: 1234, maxpagesize: 1234)) +foreach (DiscoveryTemplate item in client.GetDiscoTemplates(filter: "", skip: 1234, maxpagesize: 1234)) { } ]]> - + -This sample shows how to call GetDiscoveryTemplatesAsync and parse the result. +This sample shows how to call GetDiscoTemplatesAsync and parse the result. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -await foreach (BinaryData item in client.GetDiscoveryTemplatesAsync(null, null, null, null)) +await foreach (BinaryData item in client.GetDiscoTemplatesAsync(null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); } ]]> -This sample shows how to call GetDiscoveryTemplatesAsync with all parameters and parse the result. +This sample shows how to call GetDiscoTemplatesAsync with all parameters and parse the result. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -await foreach (BinaryData item in client.GetDiscoveryTemplatesAsync("", 1234, 1234, null)) +await foreach (BinaryData item in client.GetDiscoTemplatesAsync("", 1234, 1234, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -2958,27 +4326,27 @@ await foreach (BinaryData item in client.GetDiscoveryTemplatesAsync("", } ]]> - + -This sample shows how to call GetDiscoveryTemplates and parse the result. +This sample shows how to call GetDiscoTemplates and parse the result. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -foreach (BinaryData item in client.GetDiscoveryTemplates(null, null, null, null)) +foreach (BinaryData item in client.GetDiscoTemplates(null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); } ]]> -This sample shows how to call GetDiscoveryTemplates with all parameters and parse the result. +This sample shows how to call GetDiscoTemplates with all parameters and parse the result. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -foreach (BinaryData item in client.GetDiscoveryTemplates("", 1234, 1234, null)) +foreach (BinaryData item in client.GetDiscoTemplates("", 1234, 1234, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -3215,6 +4583,146 @@ foreach (BinaryData item in client.GetTasks("", "", 1234, 1234, Console.WriteLine(result.GetProperty("reason").ToString()); Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); } +]]> + + + +This sample shows how to call GetCisaCvesAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +await foreach (CisaCveResult item in client.GetCisaCvesAsync()) +{ +} +]]> +This sample shows how to call GetCisaCvesAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +await foreach (CisaCveResult item in client.GetCisaCvesAsync()) +{ +} +]]> + + + +This sample shows how to call GetCisaCves. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +foreach (CisaCveResult item in client.GetCisaCves()) +{ +} +]]> +This sample shows how to call GetCisaCves with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +foreach (CisaCveResult item in client.GetCisaCves()) +{ +} +]]> + + + +This sample shows how to call GetCisaCvesAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +await foreach (BinaryData item in client.GetCisaCvesAsync(null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("cveId").ToString()); + Console.WriteLine(result.GetProperty("vendorProject").ToString()); + Console.WriteLine(result.GetProperty("product").ToString()); + Console.WriteLine(result.GetProperty("vulnerabilityName").ToString()); + Console.WriteLine(result.GetProperty("shortDescription").ToString()); + Console.WriteLine(result.GetProperty("requiredAction").ToString()); + Console.WriteLine(result.GetProperty("notes").ToString()); + Console.WriteLine(result.GetProperty("dateAdded").ToString()); + Console.WriteLine(result.GetProperty("dueDate").ToString()); + Console.WriteLine(result.GetProperty("updatedAt").ToString()); + Console.WriteLine(result.GetProperty("count").ToString()); +} +]]> +This sample shows how to call GetCisaCvesAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +await foreach (BinaryData item in client.GetCisaCvesAsync(null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("cveId").ToString()); + Console.WriteLine(result.GetProperty("vendorProject").ToString()); + Console.WriteLine(result.GetProperty("product").ToString()); + Console.WriteLine(result.GetProperty("vulnerabilityName").ToString()); + Console.WriteLine(result.GetProperty("shortDescription").ToString()); + Console.WriteLine(result.GetProperty("requiredAction").ToString()); + Console.WriteLine(result.GetProperty("notes").ToString()); + Console.WriteLine(result.GetProperty("dateAdded").ToString()); + Console.WriteLine(result.GetProperty("dueDate").ToString()); + Console.WriteLine(result.GetProperty("updatedAt").ToString()); + Console.WriteLine(result.GetProperty("count").ToString()); +} +]]> + + + +This sample shows how to call GetCisaCves and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +foreach (BinaryData item in client.GetCisaCves(null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("cveId").ToString()); + Console.WriteLine(result.GetProperty("vendorProject").ToString()); + Console.WriteLine(result.GetProperty("product").ToString()); + Console.WriteLine(result.GetProperty("vulnerabilityName").ToString()); + Console.WriteLine(result.GetProperty("shortDescription").ToString()); + Console.WriteLine(result.GetProperty("requiredAction").ToString()); + Console.WriteLine(result.GetProperty("notes").ToString()); + Console.WriteLine(result.GetProperty("dateAdded").ToString()); + Console.WriteLine(result.GetProperty("dueDate").ToString()); + Console.WriteLine(result.GetProperty("updatedAt").ToString()); + Console.WriteLine(result.GetProperty("count").ToString()); +} +]]> +This sample shows how to call GetCisaCves with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +EasmClient client = new EasmClient(endpoint, credential); + +foreach (BinaryData item in client.GetCisaCves(null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("cveId").ToString()); + Console.WriteLine(result.GetProperty("vendorProject").ToString()); + Console.WriteLine(result.GetProperty("product").ToString()); + Console.WriteLine(result.GetProperty("vulnerabilityName").ToString()); + Console.WriteLine(result.GetProperty("shortDescription").ToString()); + Console.WriteLine(result.GetProperty("requiredAction").ToString()); + Console.WriteLine(result.GetProperty("notes").ToString()); + Console.WriteLine(result.GetProperty("dateAdded").ToString()); + Console.WriteLine(result.GetProperty("dueDate").ToString()); + Console.WriteLine(result.GetProperty("updatedAt").ToString()); + Console.WriteLine(result.GetProperty("count").ToString()); +} ]]> diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/EasmClient.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/EasmClient.cs index 3a076e236d9c..52614c3bb0e7 100644 --- a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/EasmClient.cs +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/EasmClient.cs @@ -6,6 +6,7 @@ #nullable disable using System; +using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using Autorest.CSharp.Core; @@ -287,38 +288,42 @@ public virtual Response GetAssetResource(string assetId, RequestContext context) } } - /// Validate a data connection with a given dataConnectionName. + /// Export a list of assets for the provided search parameters. /// Body parameter. + /// Filter the result list using the given expression. + /// A list of expressions that specify the order of the returned resources. /// The cancellation token to use. /// is null. - /// - public virtual async Task> ValidateDataConnectionAsync(DataConnectionPayload body, CancellationToken cancellationToken = default) + /// + public virtual async Task> GetAssetsExportAsync(AssetsExportRequest body, string filter = null, string orderby = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(body, nameof(body)); using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); - Response response = await ValidateDataConnectionAsync(content, context).ConfigureAwait(false); - return Response.FromValue(ValidateResult.FromResponse(response), response); + Response response = await GetAssetsExportAsync(content, filter, orderby, context).ConfigureAwait(false); + return Response.FromValue(TaskResource.FromResponse(response), response); } - /// Validate a data connection with a given dataConnectionName. + /// Export a list of assets for the provided search parameters. /// Body parameter. + /// Filter the result list using the given expression. + /// A list of expressions that specify the order of the returned resources. /// The cancellation token to use. /// is null. - /// - public virtual Response ValidateDataConnection(DataConnectionPayload body, CancellationToken cancellationToken = default) + /// + public virtual Response GetAssetsExport(AssetsExportRequest body, string filter = null, string orderby = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(body, nameof(body)); using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); - Response response = ValidateDataConnection(content, context); - return Response.FromValue(ValidateResult.FromResponse(response), response); + Response response = GetAssetsExport(content, filter, orderby, context); + return Response.FromValue(TaskResource.FromResponse(response), response); } /// - /// [Protocol Method] Validate a data connection with a given dataConnectionName. + /// [Protocol Method] Export a list of assets for the provided search parameters. /// /// /// @@ -327,26 +332,28 @@ public virtual Response ValidateDataConnection(DataConnectionPay /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// /// /// The content to send as the body of the request. + /// Filter the result list using the given expression. + /// A list of expressions that specify the order of the returned resources. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// is null. /// Service returned a non-success status code. /// The response returned from the service. - /// - public virtual async Task ValidateDataConnectionAsync(RequestContent content, RequestContext context = null) + /// + public virtual async Task GetAssetsExportAsync(RequestContent content, string filter = null, string orderby = null, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); - using var scope = ClientDiagnostics.CreateScope("EasmClient.ValidateDataConnection"); + using var scope = ClientDiagnostics.CreateScope("EasmClient.GetAssetsExport"); scope.Start(); try { - using HttpMessage message = CreateValidateDataConnectionRequest(content, context); + using HttpMessage message = CreateGetAssetsExportRequest(content, filter, orderby, context); return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); } catch (Exception e) @@ -357,7 +364,7 @@ public virtual async Task ValidateDataConnectionAsync(RequestContent c } /// - /// [Protocol Method] Validate a data connection with a given dataConnectionName. + /// [Protocol Method] Export a list of assets for the provided search parameters. /// /// /// @@ -366,26 +373,28 @@ public virtual async Task ValidateDataConnectionAsync(RequestContent c /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// /// /// The content to send as the body of the request. + /// Filter the result list using the given expression. + /// A list of expressions that specify the order of the returned resources. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// is null. /// Service returned a non-success status code. /// The response returned from the service. - /// - public virtual Response ValidateDataConnection(RequestContent content, RequestContext context = null) + /// + public virtual Response GetAssetsExport(RequestContent content, string filter = null, string orderby = null, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); - using var scope = ClientDiagnostics.CreateScope("EasmClient.ValidateDataConnection"); + using var scope = ClientDiagnostics.CreateScope("EasmClient.GetAssetsExport"); scope.Start(); try { - using HttpMessage message = CreateValidateDataConnectionRequest(content, context); + using HttpMessage message = CreateGetAssetsExportRequest(content, filter, orderby, context); return _pipeline.ProcessMessage(message, context); } catch (Exception e) @@ -395,38 +404,46 @@ public virtual Response ValidateDataConnection(RequestContent content, RequestCo } } - /// Retrieve a data connection with a given dataConnectionName. - /// The caller provided unique name for the resource. + /// Retrieve observations on an asset. + /// The system generated unique id for the resource. + /// Filter the result list using the given expression. + /// A list of expressions that specify the order of the returned resources. + /// The number of result items to skip. + /// The maximum number of result items per page. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - /// - public virtual async Task> GetDataConnectionAsync(string dataConnectionName, CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetObservationsAsync(string assetId, string filter = null, string orderby = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(dataConnectionName, nameof(dataConnectionName)); + Argument.AssertNotNullOrEmpty(assetId, nameof(assetId)); RequestContext context = FromCancellationToken(cancellationToken); - Response response = await GetDataConnectionAsync(dataConnectionName, context).ConfigureAwait(false); - return Response.FromValue(DataConnection.FromResponse(response), response); + Response response = await GetObservationsAsync(assetId, filter, orderby, skip, maxpagesize, context).ConfigureAwait(false); + return Response.FromValue(ObservationPageResult.FromResponse(response), response); } - /// Retrieve a data connection with a given dataConnectionName. - /// The caller provided unique name for the resource. + /// Retrieve observations on an asset. + /// The system generated unique id for the resource. + /// Filter the result list using the given expression. + /// A list of expressions that specify the order of the returned resources. + /// The number of result items to skip. + /// The maximum number of result items per page. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - /// - public virtual Response GetDataConnection(string dataConnectionName, CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response GetObservations(string assetId, string filter = null, string orderby = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(dataConnectionName, nameof(dataConnectionName)); + Argument.AssertNotNullOrEmpty(assetId, nameof(assetId)); RequestContext context = FromCancellationToken(cancellationToken); - Response response = GetDataConnection(dataConnectionName, context); - return Response.FromValue(DataConnection.FromResponse(response), response); + Response response = GetObservations(assetId, filter, orderby, skip, maxpagesize, context); + return Response.FromValue(ObservationPageResult.FromResponse(response), response); } /// - /// [Protocol Method] Retrieve a data connection with a given dataConnectionName. + /// [Protocol Method] Retrieve observations on an asset /// /// /// @@ -435,27 +452,31 @@ public virtual Response GetDataConnection(string dataConnectionN /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// /// - /// The caller provided unique name for the resource. + /// The system generated unique id for the resource. + /// Filter the result list using the given expression. + /// A list of expressions that specify the order of the returned resources. + /// The number of result items to skip. + /// The maximum number of result items per page. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// - public virtual async Task GetDataConnectionAsync(string dataConnectionName, RequestContext context) + /// + public virtual async Task GetObservationsAsync(string assetId, string filter, string orderby, int? skip, int? maxpagesize, RequestContext context) { - Argument.AssertNotNullOrEmpty(dataConnectionName, nameof(dataConnectionName)); + Argument.AssertNotNullOrEmpty(assetId, nameof(assetId)); - using var scope = ClientDiagnostics.CreateScope("EasmClient.GetDataConnection"); + using var scope = ClientDiagnostics.CreateScope("EasmClient.GetObservations"); scope.Start(); try { - using HttpMessage message = CreateGetDataConnectionRequest(dataConnectionName, context); + using HttpMessage message = CreateGetObservationsRequest(assetId, filter, orderby, skip, maxpagesize, context); return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); } catch (Exception e) @@ -466,7 +487,7 @@ public virtual async Task GetDataConnectionAsync(string dataConnection } /// - /// [Protocol Method] Retrieve a data connection with a given dataConnectionName. + /// [Protocol Method] Retrieve observations on an asset /// /// /// @@ -475,27 +496,31 @@ public virtual async Task GetDataConnectionAsync(string dataConnection /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// /// - /// The caller provided unique name for the resource. + /// The system generated unique id for the resource. + /// Filter the result list using the given expression. + /// A list of expressions that specify the order of the returned resources. + /// The number of result items to skip. + /// The maximum number of result items per page. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// - public virtual Response GetDataConnection(string dataConnectionName, RequestContext context) + /// + public virtual Response GetObservations(string assetId, string filter, string orderby, int? skip, int? maxpagesize, RequestContext context) { - Argument.AssertNotNullOrEmpty(dataConnectionName, nameof(dataConnectionName)); + Argument.AssertNotNullOrEmpty(assetId, nameof(assetId)); - using var scope = ClientDiagnostics.CreateScope("EasmClient.GetDataConnection"); + using var scope = ClientDiagnostics.CreateScope("EasmClient.GetObservations"); scope.Start(); try { - using HttpMessage message = CreateGetDataConnectionRequest(dataConnectionName, context); + using HttpMessage message = CreateGetObservationsRequest(assetId, filter, orderby, skip, maxpagesize, context); return _pipeline.ProcessMessage(message, context); } catch (Exception e) @@ -505,44 +530,38 @@ public virtual Response GetDataConnection(string dataConnectionName, RequestCont } } - /// Create or replace a data connection with a given dataConnectionName. - /// The caller provided unique name for the resource. + /// Retrieve a list of deltas with overall summary changes for the provided time range. /// Body parameter. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - /// - public virtual async Task> CreateOrReplaceDataConnectionAsync(string dataConnectionName, DataConnectionPayload body, CancellationToken cancellationToken = default) + /// is null. + /// + public virtual async Task> GetDeltaSummaryAsync(DeltaSummaryRequest body, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(dataConnectionName, nameof(dataConnectionName)); Argument.AssertNotNull(body, nameof(body)); using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); - Response response = await CreateOrReplaceDataConnectionAsync(dataConnectionName, content, context).ConfigureAwait(false); - return Response.FromValue(DataConnection.FromResponse(response), response); + Response response = await GetDeltaSummaryAsync(content, context).ConfigureAwait(false); + return Response.FromValue(DeltaSummaryResult.FromResponse(response), response); } - /// Create or replace a data connection with a given dataConnectionName. - /// The caller provided unique name for the resource. + /// Retrieve a list of deltas with overall summary changes for the provided time range. /// Body parameter. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - /// - public virtual Response CreateOrReplaceDataConnection(string dataConnectionName, DataConnectionPayload body, CancellationToken cancellationToken = default) + /// is null. + /// + public virtual Response GetDeltaSummary(DeltaSummaryRequest body, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(dataConnectionName, nameof(dataConnectionName)); Argument.AssertNotNull(body, nameof(body)); using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); - Response response = CreateOrReplaceDataConnection(dataConnectionName, content, context); - return Response.FromValue(DataConnection.FromResponse(response), response); + Response response = GetDeltaSummary(content, context); + return Response.FromValue(DeltaSummaryResult.FromResponse(response), response); } /// - /// [Protocol Method] Create or replace a data connection with a given dataConnectionName. + /// [Protocol Method] Retrieve a list of deltas with overall summary changes for the provided time range. /// /// /// @@ -551,29 +570,26 @@ public virtual Response CreateOrReplaceDataConnection(string dat /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// /// - /// The caller provided unique name for the resource. /// The content to send as the body of the request. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// or is null. - /// is an empty string, and was expected to be non-empty. + /// is null. /// Service returned a non-success status code. /// The response returned from the service. - /// - public virtual async Task CreateOrReplaceDataConnectionAsync(string dataConnectionName, RequestContent content, RequestContext context = null) + /// + public virtual async Task GetDeltaSummaryAsync(RequestContent content, RequestContext context = null) { - Argument.AssertNotNullOrEmpty(dataConnectionName, nameof(dataConnectionName)); Argument.AssertNotNull(content, nameof(content)); - using var scope = ClientDiagnostics.CreateScope("EasmClient.CreateOrReplaceDataConnection"); + using var scope = ClientDiagnostics.CreateScope("EasmClient.GetDeltaSummary"); scope.Start(); try { - using HttpMessage message = CreateCreateOrReplaceDataConnectionRequest(dataConnectionName, content, context); + using HttpMessage message = CreateGetDeltaSummaryRequest(content, context); return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); } catch (Exception e) @@ -584,7 +600,7 @@ public virtual async Task CreateOrReplaceDataConnectionAsync(string da } /// - /// [Protocol Method] Create or replace a data connection with a given dataConnectionName. + /// [Protocol Method] Retrieve a list of deltas with overall summary changes for the provided time range. /// /// /// @@ -593,101 +609,26 @@ public virtual async Task CreateOrReplaceDataConnectionAsync(string da /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// /// - /// The caller provided unique name for the resource. /// The content to send as the body of the request. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// or is null. - /// is an empty string, and was expected to be non-empty. + /// is null. /// Service returned a non-success status code. /// The response returned from the service. - /// - public virtual Response CreateOrReplaceDataConnection(string dataConnectionName, RequestContent content, RequestContext context = null) + /// + public virtual Response GetDeltaSummary(RequestContent content, RequestContext context = null) { - Argument.AssertNotNullOrEmpty(dataConnectionName, nameof(dataConnectionName)); Argument.AssertNotNull(content, nameof(content)); - using var scope = ClientDiagnostics.CreateScope("EasmClient.CreateOrReplaceDataConnection"); - scope.Start(); - try - { - using HttpMessage message = CreateCreateOrReplaceDataConnectionRequest(dataConnectionName, content, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method - /// - /// [Protocol Method] Delete a data connection with a given dataConnectionName. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// The caller provided unique name for the resource. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// is null. - /// is an empty string, and was expected to be non-empty. - /// Service returned a non-success status code. - /// The response returned from the service. - /// - public virtual async Task DeleteDataConnectionAsync(string dataConnectionName, RequestContext context = null) - { - Argument.AssertNotNullOrEmpty(dataConnectionName, nameof(dataConnectionName)); - - using var scope = ClientDiagnostics.CreateScope("EasmClient.DeleteDataConnection"); - scope.Start(); - try - { - using HttpMessage message = CreateDeleteDataConnectionRequest(dataConnectionName, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method - /// - /// [Protocol Method] Delete a data connection with a given dataConnectionName. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// The caller provided unique name for the resource. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// is null. - /// is an empty string, and was expected to be non-empty. - /// Service returned a non-success status code. - /// The response returned from the service. - /// - public virtual Response DeleteDataConnection(string dataConnectionName, RequestContext context = null) - { - Argument.AssertNotNullOrEmpty(dataConnectionName, nameof(dataConnectionName)); - - using var scope = ClientDiagnostics.CreateScope("EasmClient.DeleteDataConnection"); + using var scope = ClientDiagnostics.CreateScope("EasmClient.GetDeltaSummary"); scope.Start(); try { - using HttpMessage message = CreateDeleteDataConnectionRequest(dataConnectionName, context); + using HttpMessage message = CreateGetDeltaSummaryRequest(content, context); return _pipeline.ProcessMessage(message, context); } catch (Exception e) @@ -697,38 +638,38 @@ public virtual Response DeleteDataConnection(string dataConnectionName, RequestC } } - /// Validate a discovery group with a given groupName. + /// Validate a data connection with a given dataConnectionName. /// Body parameter. /// The cancellation token to use. /// is null. - /// - public virtual async Task> ValidateDiscoveryGroupAsync(DiscoveryGroupPayload body, CancellationToken cancellationToken = default) + /// + public virtual async Task> ValidateDataConnectionAsync(DataConnectionPayload body, CancellationToken cancellationToken = default) { Argument.AssertNotNull(body, nameof(body)); using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); - Response response = await ValidateDiscoveryGroupAsync(content, context).ConfigureAwait(false); + Response response = await ValidateDataConnectionAsync(content, context).ConfigureAwait(false); return Response.FromValue(ValidateResult.FromResponse(response), response); } - /// Validate a discovery group with a given groupName. + /// Validate a data connection with a given dataConnectionName. /// Body parameter. /// The cancellation token to use. /// is null. - /// - public virtual Response ValidateDiscoveryGroup(DiscoveryGroupPayload body, CancellationToken cancellationToken = default) + /// + public virtual Response ValidateDataConnection(DataConnectionPayload body, CancellationToken cancellationToken = default) { Argument.AssertNotNull(body, nameof(body)); using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); - Response response = ValidateDiscoveryGroup(content, context); + Response response = ValidateDataConnection(content, context); return Response.FromValue(ValidateResult.FromResponse(response), response); } /// - /// [Protocol Method] Validate a discovery group with a given groupName. + /// [Protocol Method] Validate a data connection with a given dataConnectionName. /// /// /// @@ -737,7 +678,7 @@ public virtual Response ValidateDiscoveryGroup(DiscoveryGroupPay /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -747,16 +688,16 @@ public virtual Response ValidateDiscoveryGroup(DiscoveryGroupPay /// is null. /// Service returned a non-success status code. /// The response returned from the service. - /// - public virtual async Task ValidateDiscoveryGroupAsync(RequestContent content, RequestContext context = null) + /// + public virtual async Task ValidateDataConnectionAsync(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); - using var scope = ClientDiagnostics.CreateScope("EasmClient.ValidateDiscoveryGroup"); + using var scope = ClientDiagnostics.CreateScope("EasmClient.ValidateDataConnection"); scope.Start(); try { - using HttpMessage message = CreateValidateDiscoveryGroupRequest(content, context); + using HttpMessage message = CreateValidateDataConnectionRequest(content, context); return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); } catch (Exception e) @@ -767,7 +708,7 @@ public virtual async Task ValidateDiscoveryGroupAsync(RequestContent c } /// - /// [Protocol Method] Validate a discovery group with a given groupName. + /// [Protocol Method] Validate a data connection with a given dataConnectionName. /// /// /// @@ -776,7 +717,7 @@ public virtual async Task ValidateDiscoveryGroupAsync(RequestContent c /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -786,16 +727,16 @@ public virtual async Task ValidateDiscoveryGroupAsync(RequestContent c /// is null. /// Service returned a non-success status code. /// The response returned from the service. - /// - public virtual Response ValidateDiscoveryGroup(RequestContent content, RequestContext context = null) + /// + public virtual Response ValidateDataConnection(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); - using var scope = ClientDiagnostics.CreateScope("EasmClient.ValidateDiscoveryGroup"); + using var scope = ClientDiagnostics.CreateScope("EasmClient.ValidateDataConnection"); scope.Start(); try { - using HttpMessage message = CreateValidateDiscoveryGroupRequest(content, context); + using HttpMessage message = CreateValidateDataConnectionRequest(content, context); return _pipeline.ProcessMessage(message, context); } catch (Exception e) @@ -805,38 +746,38 @@ public virtual Response ValidateDiscoveryGroup(RequestContent content, RequestCo } } - /// Retrieve a discovery group with a given groupName. - /// The caller provided unique name for the resource. + /// Retrieve a data connection with a given dataConnectionName. + /// The caller provided unique name for the resource. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - /// - public virtual async Task> GetDiscoveryGroupAsync(string groupName, CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetDataConnectionAsync(string dataConnectionName, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); + Argument.AssertNotNullOrEmpty(dataConnectionName, nameof(dataConnectionName)); RequestContext context = FromCancellationToken(cancellationToken); - Response response = await GetDiscoveryGroupAsync(groupName, context).ConfigureAwait(false); - return Response.FromValue(DiscoveryGroup.FromResponse(response), response); + Response response = await GetDataConnectionAsync(dataConnectionName, context).ConfigureAwait(false); + return Response.FromValue(DataConnection.FromResponse(response), response); } - /// Retrieve a discovery group with a given groupName. - /// The caller provided unique name for the resource. + /// Retrieve a data connection with a given dataConnectionName. + /// The caller provided unique name for the resource. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - /// - public virtual Response GetDiscoveryGroup(string groupName, CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response GetDataConnection(string dataConnectionName, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); + Argument.AssertNotNullOrEmpty(dataConnectionName, nameof(dataConnectionName)); RequestContext context = FromCancellationToken(cancellationToken); - Response response = GetDiscoveryGroup(groupName, context); - return Response.FromValue(DiscoveryGroup.FromResponse(response), response); + Response response = GetDataConnection(dataConnectionName, context); + return Response.FromValue(DataConnection.FromResponse(response), response); } /// - /// [Protocol Method] Retrieve a discovery group with a given groupName. + /// [Protocol Method] Retrieve a data connection with a given dataConnectionName. /// /// /// @@ -845,27 +786,27 @@ public virtual Response GetDiscoveryGroup(string groupName, Canc /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// /// - /// The caller provided unique name for the resource. + /// The caller provided unique name for the resource. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// - public virtual async Task GetDiscoveryGroupAsync(string groupName, RequestContext context) + /// + public virtual async Task GetDataConnectionAsync(string dataConnectionName, RequestContext context) { - Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); + Argument.AssertNotNullOrEmpty(dataConnectionName, nameof(dataConnectionName)); - using var scope = ClientDiagnostics.CreateScope("EasmClient.GetDiscoveryGroup"); + using var scope = ClientDiagnostics.CreateScope("EasmClient.GetDataConnection"); scope.Start(); try { - using HttpMessage message = CreateGetDiscoveryGroupRequest(groupName, context); + using HttpMessage message = CreateGetDataConnectionRequest(dataConnectionName, context); return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); } catch (Exception e) @@ -876,7 +817,7 @@ public virtual async Task GetDiscoveryGroupAsync(string groupName, Req } /// - /// [Protocol Method] Retrieve a discovery group with a given groupName. + /// [Protocol Method] Retrieve a data connection with a given dataConnectionName. /// /// /// @@ -885,27 +826,27 @@ public virtual async Task GetDiscoveryGroupAsync(string groupName, Req /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// /// - /// The caller provided unique name for the resource. + /// The caller provided unique name for the resource. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// - public virtual Response GetDiscoveryGroup(string groupName, RequestContext context) + /// + public virtual Response GetDataConnection(string dataConnectionName, RequestContext context) { - Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); + Argument.AssertNotNullOrEmpty(dataConnectionName, nameof(dataConnectionName)); - using var scope = ClientDiagnostics.CreateScope("EasmClient.GetDiscoveryGroup"); + using var scope = ClientDiagnostics.CreateScope("EasmClient.GetDataConnection"); scope.Start(); try { - using HttpMessage message = CreateGetDiscoveryGroupRequest(groupName, context); + using HttpMessage message = CreateGetDataConnectionRequest(dataConnectionName, context); return _pipeline.ProcessMessage(message, context); } catch (Exception e) @@ -915,44 +856,44 @@ public virtual Response GetDiscoveryGroup(string groupName, RequestContext conte } } - /// Create a discovery group with a given groupName. - /// The caller provided unique name for the resource. + /// Create or replace a data connection with a given dataConnectionName. + /// The caller provided unique name for the resource. /// Body parameter. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - /// - public virtual async Task> CreateOrReplaceDiscoveryGroupAsync(string groupName, DiscoveryGroupPayload body, CancellationToken cancellationToken = default) + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> CreateOrReplaceDataConnectionAsync(string dataConnectionName, DataConnectionPayload body, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); + Argument.AssertNotNullOrEmpty(dataConnectionName, nameof(dataConnectionName)); Argument.AssertNotNull(body, nameof(body)); using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); - Response response = await CreateOrReplaceDiscoveryGroupAsync(groupName, content, context).ConfigureAwait(false); - return Response.FromValue(DiscoveryGroup.FromResponse(response), response); + Response response = await CreateOrReplaceDataConnectionAsync(dataConnectionName, content, context).ConfigureAwait(false); + return Response.FromValue(DataConnection.FromResponse(response), response); } - /// Create a discovery group with a given groupName. - /// The caller provided unique name for the resource. + /// Create or replace a data connection with a given dataConnectionName. + /// The caller provided unique name for the resource. /// Body parameter. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - /// - public virtual Response CreateOrReplaceDiscoveryGroup(string groupName, DiscoveryGroupPayload body, CancellationToken cancellationToken = default) + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response CreateOrReplaceDataConnection(string dataConnectionName, DataConnectionPayload body, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); + Argument.AssertNotNullOrEmpty(dataConnectionName, nameof(dataConnectionName)); Argument.AssertNotNull(body, nameof(body)); using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); - Response response = CreateOrReplaceDiscoveryGroup(groupName, content, context); - return Response.FromValue(DiscoveryGroup.FromResponse(response), response); + Response response = CreateOrReplaceDataConnection(dataConnectionName, content, context); + return Response.FromValue(DataConnection.FromResponse(response), response); } /// - /// [Protocol Method] Create a discovery group with a given groupName. + /// [Protocol Method] Create or replace a data connection with a given dataConnectionName. /// /// /// @@ -961,29 +902,29 @@ public virtual Response CreateOrReplaceDiscoveryGroup(string gro /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// /// - /// The caller provided unique name for the resource. + /// The caller provided unique name for the resource. /// The content to send as the body of the request. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// or is null. - /// is an empty string, and was expected to be non-empty. + /// or is null. + /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// - public virtual async Task CreateOrReplaceDiscoveryGroupAsync(string groupName, RequestContent content, RequestContext context = null) + /// + public virtual async Task CreateOrReplaceDataConnectionAsync(string dataConnectionName, RequestContent content, RequestContext context = null) { - Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); + Argument.AssertNotNullOrEmpty(dataConnectionName, nameof(dataConnectionName)); Argument.AssertNotNull(content, nameof(content)); - using var scope = ClientDiagnostics.CreateScope("EasmClient.CreateOrReplaceDiscoveryGroup"); + using var scope = ClientDiagnostics.CreateScope("EasmClient.CreateOrReplaceDataConnection"); scope.Start(); try { - using HttpMessage message = CreateCreateOrReplaceDiscoveryGroupRequest(groupName, content, context); + using HttpMessage message = CreateCreateOrReplaceDataConnectionRequest(dataConnectionName, content, context); return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); } catch (Exception e) @@ -994,7 +935,7 @@ public virtual async Task CreateOrReplaceDiscoveryGroupAsync(string gr } /// - /// [Protocol Method] Create a discovery group with a given groupName. + /// [Protocol Method] Create or replace a data connection with a given dataConnectionName. /// /// /// @@ -1003,29 +944,29 @@ public virtual async Task CreateOrReplaceDiscoveryGroupAsync(string gr /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// /// - /// The caller provided unique name for the resource. + /// The caller provided unique name for the resource. /// The content to send as the body of the request. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// or is null. - /// is an empty string, and was expected to be non-empty. + /// or is null. + /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// - public virtual Response CreateOrReplaceDiscoveryGroup(string groupName, RequestContent content, RequestContext context = null) + /// + public virtual Response CreateOrReplaceDataConnection(string dataConnectionName, RequestContent content, RequestContext context = null) { - Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); + Argument.AssertNotNullOrEmpty(dataConnectionName, nameof(dataConnectionName)); Argument.AssertNotNull(content, nameof(content)); - using var scope = ClientDiagnostics.CreateScope("EasmClient.CreateOrReplaceDiscoveryGroup"); + using var scope = ClientDiagnostics.CreateScope("EasmClient.CreateOrReplaceDataConnection"); scope.Start(); try { - using HttpMessage message = CreateCreateOrReplaceDiscoveryGroupRequest(groupName, content, context); + using HttpMessage message = CreateCreateOrReplaceDataConnectionRequest(dataConnectionName, content, context); return _pipeline.ProcessMessage(message, context); } catch (Exception e) @@ -1037,7 +978,7 @@ public virtual Response CreateOrReplaceDiscoveryGroup(string groupName, RequestC // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method /// - /// [Protocol Method] Run a discovery group with a given groupName. + /// [Protocol Method] Delete a data connection with a given dataConnectionName. /// /// /// @@ -1046,22 +987,22 @@ public virtual Response CreateOrReplaceDiscoveryGroup(string groupName, RequestC /// /// /// - /// The caller provided unique name for the resource. + /// The caller provided unique name for the resource. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// - public virtual async Task RunDiscoveryGroupAsync(string groupName, RequestContext context = null) + /// + public virtual async Task DeleteDataConnectionAsync(string dataConnectionName, RequestContext context = null) { - Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); + Argument.AssertNotNullOrEmpty(dataConnectionName, nameof(dataConnectionName)); - using var scope = ClientDiagnostics.CreateScope("EasmClient.RunDiscoveryGroup"); + using var scope = ClientDiagnostics.CreateScope("EasmClient.DeleteDataConnection"); scope.Start(); try { - using HttpMessage message = CreateRunDiscoveryGroupRequest(groupName, context); + using HttpMessage message = CreateDeleteDataConnectionRequest(dataConnectionName, context); return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); } catch (Exception e) @@ -1073,7 +1014,7 @@ public virtual async Task RunDiscoveryGroupAsync(string groupName, Req // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method /// - /// [Protocol Method] Run a discovery group with a given groupName. + /// [Protocol Method] Delete a data connection with a given dataConnectionName. /// /// /// @@ -1082,22 +1023,22 @@ public virtual async Task RunDiscoveryGroupAsync(string groupName, Req /// /// /// - /// The caller provided unique name for the resource. + /// The caller provided unique name for the resource. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// - public virtual Response RunDiscoveryGroup(string groupName, RequestContext context = null) + /// + public virtual Response DeleteDataConnection(string dataConnectionName, RequestContext context = null) { - Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); + Argument.AssertNotNullOrEmpty(dataConnectionName, nameof(dataConnectionName)); - using var scope = ClientDiagnostics.CreateScope("EasmClient.RunDiscoveryGroup"); + using var scope = ClientDiagnostics.CreateScope("EasmClient.DeleteDataConnection"); scope.Start(); try { - using HttpMessage message = CreateRunDiscoveryGroupRequest(groupName, context); + using HttpMessage message = CreateDeleteDataConnectionRequest(dataConnectionName, context); return _pipeline.ProcessMessage(message, context); } catch (Exception e) @@ -1107,38 +1048,38 @@ public virtual Response RunDiscoveryGroup(string groupName, RequestContext conte } } - /// Retrieve a disco template with a given templateId. - /// The system generated unique id for the resource. + /// Validate a discovery group with a given groupName. + /// Body parameter. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - /// - public virtual async Task> GetDiscoveryTemplateAsync(string templateId, CancellationToken cancellationToken = default) + /// is null. + /// + public virtual async Task> ValidateDiscoGroupAsync(DiscoveryGroupPayload body, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(templateId, nameof(templateId)); + Argument.AssertNotNull(body, nameof(body)); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); - Response response = await GetDiscoveryTemplateAsync(templateId, context).ConfigureAwait(false); - return Response.FromValue(DiscoveryTemplate.FromResponse(response), response); + Response response = await ValidateDiscoGroupAsync(content, context).ConfigureAwait(false); + return Response.FromValue(ValidateResult.FromResponse(response), response); } - /// Retrieve a disco template with a given templateId. - /// The system generated unique id for the resource. + /// Validate a discovery group with a given groupName. + /// Body parameter. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - /// - public virtual Response GetDiscoveryTemplate(string templateId, CancellationToken cancellationToken = default) + /// is null. + /// + public virtual Response ValidateDiscoGroup(DiscoveryGroupPayload body, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(templateId, nameof(templateId)); + Argument.AssertNotNull(body, nameof(body)); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); - Response response = GetDiscoveryTemplate(templateId, context); - return Response.FromValue(DiscoveryTemplate.FromResponse(response), response); + Response response = ValidateDiscoGroup(content, context); + return Response.FromValue(ValidateResult.FromResponse(response), response); } /// - /// [Protocol Method] Retrieve a disco template with a given templateId. + /// [Protocol Method] Validate a discovery group with a given groupName. /// /// /// @@ -1147,27 +1088,26 @@ public virtual Response GetDiscoveryTemplate(string templateI /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// /// - /// The system generated unique id for the resource. + /// The content to send as the body of the request. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. /// Service returned a non-success status code. /// The response returned from the service. - /// - public virtual async Task GetDiscoveryTemplateAsync(string templateId, RequestContext context) + /// + public virtual async Task ValidateDiscoGroupAsync(RequestContent content, RequestContext context = null) { - Argument.AssertNotNullOrEmpty(templateId, nameof(templateId)); + Argument.AssertNotNull(content, nameof(content)); - using var scope = ClientDiagnostics.CreateScope("EasmClient.GetDiscoveryTemplate"); + using var scope = ClientDiagnostics.CreateScope("EasmClient.ValidateDiscoGroup"); scope.Start(); try { - using HttpMessage message = CreateGetDiscoveryTemplateRequest(templateId, context); + using HttpMessage message = CreateValidateDiscoGroupRequest(content, context); return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); } catch (Exception e) @@ -1178,7 +1118,7 @@ public virtual async Task GetDiscoveryTemplateAsync(string templateId, } /// - /// [Protocol Method] Retrieve a disco template with a given templateId. + /// [Protocol Method] Validate a discovery group with a given groupName. /// /// /// @@ -1187,27 +1127,26 @@ public virtual async Task GetDiscoveryTemplateAsync(string templateId, /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// /// - /// The system generated unique id for the resource. + /// The content to send as the body of the request. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. /// Service returned a non-success status code. /// The response returned from the service. - /// - public virtual Response GetDiscoveryTemplate(string templateId, RequestContext context) + /// + public virtual Response ValidateDiscoGroup(RequestContent content, RequestContext context = null) { - Argument.AssertNotNullOrEmpty(templateId, nameof(templateId)); + Argument.AssertNotNull(content, nameof(content)); - using var scope = ClientDiagnostics.CreateScope("EasmClient.GetDiscoveryTemplate"); + using var scope = ClientDiagnostics.CreateScope("EasmClient.ValidateDiscoGroup"); scope.Start(); try { - using HttpMessage message = CreateGetDiscoveryTemplateRequest(templateId, context); + using HttpMessage message = CreateValidateDiscoGroupRequest(content, context); return _pipeline.ProcessMessage(message, context); } catch (Exception e) @@ -1217,28 +1156,38 @@ public virtual Response GetDiscoveryTemplate(string templateId, RequestContext c } } - /// Get billable assets summary for the workspace. + /// Retrieve a discovery group with a given groupName. + /// The caller provided unique name for the resource. /// The cancellation token to use. - /// - public virtual async Task> GetBillableAsync(CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetDiscoGroupAsync(string groupName, CancellationToken cancellationToken = default) { + Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); + RequestContext context = FromCancellationToken(cancellationToken); - Response response = await GetBillableAsync(context).ConfigureAwait(false); - return Response.FromValue(ReportBillableAssetSummaryResult.FromResponse(response), response); + Response response = await GetDiscoGroupAsync(groupName, context).ConfigureAwait(false); + return Response.FromValue(DiscoveryGroup.FromResponse(response), response); } - /// Get billable assets summary for the workspace. + /// Retrieve a discovery group with a given groupName. + /// The caller provided unique name for the resource. /// The cancellation token to use. - /// - public virtual Response GetBillable(CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response GetDiscoGroup(string groupName, CancellationToken cancellationToken = default) { + Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); + RequestContext context = FromCancellationToken(cancellationToken); - Response response = GetBillable(context); - return Response.FromValue(ReportBillableAssetSummaryResult.FromResponse(response), response); + Response response = GetDiscoGroup(groupName, context); + return Response.FromValue(DiscoveryGroup.FromResponse(response), response); } /// - /// [Protocol Method] Get billable assets summary for the workspace. + /// [Protocol Method] Retrieve a discovery group with a given groupName. /// /// /// @@ -1247,22 +1196,27 @@ public virtual Response GetBillable(Cancellati /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// /// + /// The caller provided unique name for the resource. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// - public virtual async Task GetBillableAsync(RequestContext context) + /// + public virtual async Task GetDiscoGroupAsync(string groupName, RequestContext context) { - using var scope = ClientDiagnostics.CreateScope("EasmClient.GetBillable"); + Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); + + using var scope = ClientDiagnostics.CreateScope("EasmClient.GetDiscoGroup"); scope.Start(); try { - using HttpMessage message = CreateGetBillableRequest(context); + using HttpMessage message = CreateGetDiscoGroupRequest(groupName, context); return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); } catch (Exception e) @@ -1273,7 +1227,7 @@ public virtual async Task GetBillableAsync(RequestContext context) } /// - /// [Protocol Method] Get billable assets summary for the workspace. + /// [Protocol Method] Retrieve a discovery group with a given groupName. /// /// /// @@ -1282,22 +1236,27 @@ public virtual async Task GetBillableAsync(RequestContext context) /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// /// + /// The caller provided unique name for the resource. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// - public virtual Response GetBillable(RequestContext context) + /// + public virtual Response GetDiscoGroup(string groupName, RequestContext context) { - using var scope = ClientDiagnostics.CreateScope("EasmClient.GetBillable"); + Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); + + using var scope = ClientDiagnostics.CreateScope("EasmClient.GetDiscoGroup"); scope.Start(); try { - using HttpMessage message = CreateGetBillableRequest(context); + using HttpMessage message = CreateGetDiscoGroupRequest(groupName, context); return _pipeline.ProcessMessage(message, context); } catch (Exception e) @@ -1307,66 +1266,33 @@ public virtual Response GetBillable(RequestContext context) } } - /// Get the most recent snapshot of asset summary values for the snapshot request. - /// Body parameter. - /// The cancellation token to use. - /// is null. - /// - public virtual async Task> GetSnapshotAsync(ReportAssetSnapshotPayload body, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(body, nameof(body)); - - using RequestContent content = body.ToRequestContent(); - RequestContext context = FromCancellationToken(cancellationToken); - Response response = await GetSnapshotAsync(content, context).ConfigureAwait(false); - return Response.FromValue(ReportAssetSnapshotResult.FromResponse(response), response); - } - - /// Get the most recent snapshot of asset summary values for the snapshot request. - /// Body parameter. - /// The cancellation token to use. - /// is null. - /// - public virtual Response GetSnapshot(ReportAssetSnapshotPayload body, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(body, nameof(body)); - - using RequestContent content = body.ToRequestContent(); - RequestContext context = FromCancellationToken(cancellationToken); - Response response = GetSnapshot(content, context); - return Response.FromValue(ReportAssetSnapshotResult.FromResponse(response), response); - } - + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method /// - /// [Protocol Method] Get the most recent snapshot of asset summary values for the snapshot request. + /// [Protocol Method] Delete a discovery group with a given discovery group name. /// /// /// /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. /// /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// /// /// - /// The content to send as the body of the request. + /// The caller provided unique name for the resource. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// is null. + /// is null. + /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// - public virtual async Task GetSnapshotAsync(RequestContent content, RequestContext context = null) + /// + public virtual async Task DeleteDiscoGroupAsync(string groupName, RequestContext context = null) { - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); - using var scope = ClientDiagnostics.CreateScope("EasmClient.GetSnapshot"); + using var scope = ClientDiagnostics.CreateScope("EasmClient.DeleteDiscoGroup"); scope.Start(); try { - using HttpMessage message = CreateGetSnapshotRequest(content, context); + using HttpMessage message = CreateDeleteDiscoGroupRequest(groupName, context); return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); } catch (Exception e) @@ -1376,36 +1302,33 @@ public virtual async Task GetSnapshotAsync(RequestContent content, Req } } + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method /// - /// [Protocol Method] Get the most recent snapshot of asset summary values for the snapshot request. + /// [Protocol Method] Delete a discovery group with a given discovery group name. /// /// /// /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. /// /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// /// /// - /// The content to send as the body of the request. + /// The caller provided unique name for the resource. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// is null. + /// is null. + /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// - public virtual Response GetSnapshot(RequestContent content, RequestContext context = null) + /// + public virtual Response DeleteDiscoGroup(string groupName, RequestContext context = null) { - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); - using var scope = ClientDiagnostics.CreateScope("EasmClient.GetSnapshot"); + using var scope = ClientDiagnostics.CreateScope("EasmClient.DeleteDiscoGroup"); scope.Start(); try { - using HttpMessage message = CreateGetSnapshotRequest(content, context); + using HttpMessage message = CreateDeleteDiscoGroupRequest(groupName, context); return _pipeline.ProcessMessage(message, context); } catch (Exception e) @@ -1415,38 +1338,44 @@ public virtual Response GetSnapshot(RequestContent content, RequestContext conte } } - /// Get asset summary details for the summary request. + /// Create a discovery group with a given groupName. + /// The caller provided unique name for the resource. /// Body parameter. /// The cancellation token to use. - /// is null. - /// - public virtual async Task> GetSummaryAsync(ReportAssetSummaryPayload body, CancellationToken cancellationToken = default) + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> CreateOrReplaceDiscoGroupAsync(string groupName, DiscoveryGroupPayload body, CancellationToken cancellationToken = default) { + Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); Argument.AssertNotNull(body, nameof(body)); using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); - Response response = await GetSummaryAsync(content, context).ConfigureAwait(false); - return Response.FromValue(ReportAssetSummaryResult.FromResponse(response), response); + Response response = await CreateOrReplaceDiscoGroupAsync(groupName, content, context).ConfigureAwait(false); + return Response.FromValue(DiscoveryGroup.FromResponse(response), response); } - /// Get asset summary details for the summary request. + /// Create a discovery group with a given groupName. + /// The caller provided unique name for the resource. /// Body parameter. /// The cancellation token to use. - /// is null. - /// - public virtual Response GetSummary(ReportAssetSummaryPayload body, CancellationToken cancellationToken = default) + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response CreateOrReplaceDiscoGroup(string groupName, DiscoveryGroupPayload body, CancellationToken cancellationToken = default) { + Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); Argument.AssertNotNull(body, nameof(body)); using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); - Response response = GetSummary(content, context); - return Response.FromValue(ReportAssetSummaryResult.FromResponse(response), response); + Response response = CreateOrReplaceDiscoGroup(groupName, content, context); + return Response.FromValue(DiscoveryGroup.FromResponse(response), response); } /// - /// [Protocol Method] Get asset summary details for the summary request. + /// [Protocol Method] Create a discovery group with a given groupName. /// /// /// @@ -1455,26 +1384,29 @@ public virtual Response GetSummary(ReportAssetSummaryP /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// /// + /// The caller provided unique name for the resource. /// The content to send as the body of the request. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// is null. + /// or is null. + /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// - public virtual async Task GetSummaryAsync(RequestContent content, RequestContext context = null) + /// + public virtual async Task CreateOrReplaceDiscoGroupAsync(string groupName, RequestContent content, RequestContext context = null) { + Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); Argument.AssertNotNull(content, nameof(content)); - using var scope = ClientDiagnostics.CreateScope("EasmClient.GetSummary"); + using var scope = ClientDiagnostics.CreateScope("EasmClient.CreateOrReplaceDiscoGroup"); scope.Start(); try { - using HttpMessage message = CreateGetSummaryRequest(content, context); + using HttpMessage message = CreateCreateOrReplaceDiscoGroupRequest(groupName, content, context); return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); } catch (Exception e) @@ -1485,7 +1417,7 @@ public virtual async Task GetSummaryAsync(RequestContent content, Requ } /// - /// [Protocol Method] Get asset summary details for the summary request. + /// [Protocol Method] Create a discovery group with a given groupName. /// /// /// @@ -1494,26 +1426,29 @@ public virtual async Task GetSummaryAsync(RequestContent content, Requ /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// /// + /// The caller provided unique name for the resource. /// The content to send as the body of the request. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// is null. + /// or is null. + /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// - public virtual Response GetSummary(RequestContent content, RequestContext context = null) + /// + public virtual Response CreateOrReplaceDiscoGroup(string groupName, RequestContent content, RequestContext context = null) { + Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); Argument.AssertNotNull(content, nameof(content)); - using var scope = ClientDiagnostics.CreateScope("EasmClient.GetSummary"); + using var scope = ClientDiagnostics.CreateScope("EasmClient.CreateOrReplaceDiscoGroup"); scope.Start(); try { - using HttpMessage message = CreateGetSummaryRequest(content, context); + using HttpMessage message = CreateCreateOrReplaceDiscoGroupRequest(groupName, content, context); return _pipeline.ProcessMessage(message, context); } catch (Exception e) @@ -1523,38 +1458,110 @@ public virtual Response GetSummary(RequestContent content, RequestContext contex } } - /// Retrieve a saved filter by filterName. - /// The caller provided unique name for the resource. + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Run a discovery group with a given groupName. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The caller provided unique name for the resource. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task RunDiscoGroupAsync(string groupName, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); + + using var scope = ClientDiagnostics.CreateScope("EasmClient.RunDiscoGroup"); + scope.Start(); + try + { + using HttpMessage message = CreateRunDiscoGroupRequest(groupName, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Run a discovery group with a given groupName. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The caller provided unique name for the resource. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response RunDiscoGroup(string groupName, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); + + using var scope = ClientDiagnostics.CreateScope("EasmClient.RunDiscoGroup"); + scope.Start(); + try + { + using HttpMessage message = CreateRunDiscoGroupRequest(groupName, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Retrieve an asset chain summary. + /// Body parameter. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - /// - public virtual async Task> GetSavedFilterAsync(string filterName, CancellationToken cancellationToken = default) + /// is null. + /// + public virtual async Task> GetAssetChainSummaryAsync(AssetChainRequest body, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(filterName, nameof(filterName)); + Argument.AssertNotNull(body, nameof(body)); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); - Response response = await GetSavedFilterAsync(filterName, context).ConfigureAwait(false); - return Response.FromValue(SavedFilter.FromResponse(response), response); + Response response = await GetAssetChainSummaryAsync(content, context).ConfigureAwait(false); + return Response.FromValue(AssetChainSummaryResult.FromResponse(response), response); } - /// Retrieve a saved filter by filterName. - /// The caller provided unique name for the resource. + /// Retrieve an asset chain summary. + /// Body parameter. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - /// - public virtual Response GetSavedFilter(string filterName, CancellationToken cancellationToken = default) + /// is null. + /// + public virtual Response GetAssetChainSummary(AssetChainRequest body, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(filterName, nameof(filterName)); + Argument.AssertNotNull(body, nameof(body)); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); - Response response = GetSavedFilter(filterName, context); - return Response.FromValue(SavedFilter.FromResponse(response), response); + Response response = GetAssetChainSummary(content, context); + return Response.FromValue(AssetChainSummaryResult.FromResponse(response), response); } /// - /// [Protocol Method] Retrieve a saved filter by filterName. + /// [Protocol Method] Retrieve an asset chain summary. /// /// /// @@ -1563,27 +1570,26 @@ public virtual Response GetSavedFilter(string filterName, Cancellat /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// /// - /// The caller provided unique name for the resource. + /// The content to send as the body of the request. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. /// Service returned a non-success status code. /// The response returned from the service. - /// - public virtual async Task GetSavedFilterAsync(string filterName, RequestContext context) + /// + public virtual async Task GetAssetChainSummaryAsync(RequestContent content, RequestContext context = null) { - Argument.AssertNotNullOrEmpty(filterName, nameof(filterName)); + Argument.AssertNotNull(content, nameof(content)); - using var scope = ClientDiagnostics.CreateScope("EasmClient.GetSavedFilter"); + using var scope = ClientDiagnostics.CreateScope("EasmClient.GetAssetChainSummary"); scope.Start(); try { - using HttpMessage message = CreateGetSavedFilterRequest(filterName, context); + using HttpMessage message = CreateGetAssetChainSummaryRequest(content, context); return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); } catch (Exception e) @@ -1594,7 +1600,7 @@ public virtual async Task GetSavedFilterAsync(string filterName, Reque } /// - /// [Protocol Method] Retrieve a saved filter by filterName. + /// [Protocol Method] Retrieve an asset chain summary. /// /// /// @@ -1603,27 +1609,26 @@ public virtual async Task GetSavedFilterAsync(string filterName, Reque /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// /// - /// The caller provided unique name for the resource. + /// The content to send as the body of the request. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. /// Service returned a non-success status code. /// The response returned from the service. - /// - public virtual Response GetSavedFilter(string filterName, RequestContext context) + /// + public virtual Response GetAssetChainSummary(RequestContent content, RequestContext context = null) { - Argument.AssertNotNullOrEmpty(filterName, nameof(filterName)); + Argument.AssertNotNull(content, nameof(content)); - using var scope = ClientDiagnostics.CreateScope("EasmClient.GetSavedFilter"); + using var scope = ClientDiagnostics.CreateScope("EasmClient.GetAssetChainSummary"); scope.Start(); try { - using HttpMessage message = CreateGetSavedFilterRequest(filterName, context); + using HttpMessage message = CreateGetAssetChainSummaryRequest(content, context); return _pipeline.ProcessMessage(message, context); } catch (Exception e) @@ -1633,44 +1638,38 @@ public virtual Response GetSavedFilter(string filterName, RequestContext context } } - /// Create or replace a saved filter with a given filterName. - /// The caller provided unique name for the resource. + /// Dismiss discovery chain for a given asset chain source. /// Body parameter. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - /// - public virtual async Task> CreateOrReplaceSavedFilterAsync(string filterName, SavedFilterPayload body, CancellationToken cancellationToken = default) + /// is null. + /// + public virtual async Task> DismissAssetChainAsync(AssetChainRequest body, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(filterName, nameof(filterName)); Argument.AssertNotNull(body, nameof(body)); using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); - Response response = await CreateOrReplaceSavedFilterAsync(filterName, content, context).ConfigureAwait(false); - return Response.FromValue(SavedFilter.FromResponse(response), response); + Response response = await DismissAssetChainAsync(content, context).ConfigureAwait(false); + return Response.FromValue(TaskResource.FromResponse(response), response); } - /// Create or replace a saved filter with a given filterName. - /// The caller provided unique name for the resource. + /// Dismiss discovery chain for a given asset chain source. /// Body parameter. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - /// - public virtual Response CreateOrReplaceSavedFilter(string filterName, SavedFilterPayload body, CancellationToken cancellationToken = default) + /// is null. + /// + public virtual Response DismissAssetChain(AssetChainRequest body, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(filterName, nameof(filterName)); Argument.AssertNotNull(body, nameof(body)); using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); - Response response = CreateOrReplaceSavedFilter(filterName, content, context); - return Response.FromValue(SavedFilter.FromResponse(response), response); + Response response = DismissAssetChain(content, context); + return Response.FromValue(TaskResource.FromResponse(response), response); } /// - /// [Protocol Method] Create or replace a saved filter with a given filterName. + /// [Protocol Method] Dismiss discovery chain for a given asset chain source /// /// /// @@ -1679,29 +1678,26 @@ public virtual Response CreateOrReplaceSavedFilter(string filterNam /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// /// - /// The caller provided unique name for the resource. /// The content to send as the body of the request. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// or is null. - /// is an empty string, and was expected to be non-empty. + /// is null. /// Service returned a non-success status code. /// The response returned from the service. - /// - public virtual async Task CreateOrReplaceSavedFilterAsync(string filterName, RequestContent content, RequestContext context = null) + /// + public virtual async Task DismissAssetChainAsync(RequestContent content, RequestContext context = null) { - Argument.AssertNotNullOrEmpty(filterName, nameof(filterName)); Argument.AssertNotNull(content, nameof(content)); - using var scope = ClientDiagnostics.CreateScope("EasmClient.CreateOrReplaceSavedFilter"); + using var scope = ClientDiagnostics.CreateScope("EasmClient.DismissAssetChain"); scope.Start(); try { - using HttpMessage message = CreateCreateOrReplaceSavedFilterRequest(filterName, content, context); + using HttpMessage message = CreateDismissAssetChainRequest(content, context); return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); } catch (Exception e) @@ -1712,7 +1708,7 @@ public virtual async Task CreateOrReplaceSavedFilterAsync(string filte } /// - /// [Protocol Method] Create or replace a saved filter with a given filterName. + /// [Protocol Method] Dismiss discovery chain for a given asset chain source /// /// /// @@ -1721,65 +1717,1142 @@ public virtual async Task CreateOrReplaceSavedFilterAsync(string filte /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// /// - /// The caller provided unique name for the resource. /// The content to send as the body of the request. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// or is null. - /// is an empty string, and was expected to be non-empty. + /// is null. /// Service returned a non-success status code. /// The response returned from the service. - /// - public virtual Response CreateOrReplaceSavedFilter(string filterName, RequestContent content, RequestContext context = null) + /// + public virtual Response DismissAssetChain(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("EasmClient.DismissAssetChain"); + scope.Start(); + try + { + using HttpMessage message = CreateDismissAssetChainRequest(content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Retrieve a disco template with a given templateId. + /// The system generated unique id for the resource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetDiscoTemplateAsync(string templateId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(templateId, nameof(templateId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetDiscoTemplateAsync(templateId, context).ConfigureAwait(false); + return Response.FromValue(DiscoveryTemplate.FromResponse(response), response); + } + + /// Retrieve a disco template with a given templateId. + /// The system generated unique id for the resource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response GetDiscoTemplate(string templateId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(templateId, nameof(templateId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetDiscoTemplate(templateId, context); + return Response.FromValue(DiscoveryTemplate.FromResponse(response), response); + } + + /// + /// [Protocol Method] Retrieve a disco template with a given templateId. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The system generated unique id for the resource. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetDiscoTemplateAsync(string templateId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(templateId, nameof(templateId)); + + using var scope = ClientDiagnostics.CreateScope("EasmClient.GetDiscoTemplate"); + scope.Start(); + try + { + using HttpMessage message = CreateGetDiscoTemplateRequest(templateId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Retrieve a disco template with a given templateId. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The system generated unique id for the resource. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetDiscoTemplate(string templateId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(templateId, nameof(templateId)); + + using var scope = ClientDiagnostics.CreateScope("EasmClient.GetDiscoTemplate"); + scope.Start(); + try + { + using HttpMessage message = CreateGetDiscoTemplateRequest(templateId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get billable assets summary for the workspace. + /// The cancellation token to use. + /// + public virtual async Task> GetBillableAsync(CancellationToken cancellationToken = default) + { + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetBillableAsync(context).ConfigureAwait(false); + return Response.FromValue(ReportBillableAssetSummaryResult.FromResponse(response), response); + } + + /// Get billable assets summary for the workspace. + /// The cancellation token to use. + /// + public virtual Response GetBillable(CancellationToken cancellationToken = default) + { + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetBillable(context); + return Response.FromValue(ReportBillableAssetSummaryResult.FromResponse(response), response); + } + + /// + /// [Protocol Method] Get billable assets summary for the workspace. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetBillableAsync(RequestContext context) + { + using var scope = ClientDiagnostics.CreateScope("EasmClient.GetBillable"); + scope.Start(); + try + { + using HttpMessage message = CreateGetBillableRequest(context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get billable assets summary for the workspace. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetBillable(RequestContext context) + { + using var scope = ClientDiagnostics.CreateScope("EasmClient.GetBillable"); + scope.Start(); + try + { + using HttpMessage message = CreateGetBillableRequest(context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get the most recent snapshot of asset summary values for the snapshot request. + /// Body parameter. + /// The cancellation token to use. + /// is null. + /// + public virtual async Task> GetSnapshotAsync(ReportAssetSnapshotPayload body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetSnapshotAsync(content, context).ConfigureAwait(false); + return Response.FromValue(ReportAssetSnapshotResult.FromResponse(response), response); + } + + /// Get the most recent snapshot of asset summary values for the snapshot request. + /// Body parameter. + /// The cancellation token to use. + /// is null. + /// + public virtual Response GetSnapshot(ReportAssetSnapshotPayload body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetSnapshot(content, context); + return Response.FromValue(ReportAssetSnapshotResult.FromResponse(response), response); + } + + /// + /// [Protocol Method] Get the most recent snapshot of asset summary values for the snapshot request. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetSnapshotAsync(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("EasmClient.GetSnapshot"); + scope.Start(); + try + { + using HttpMessage message = CreateGetSnapshotRequest(content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get the most recent snapshot of asset summary values for the snapshot request. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetSnapshot(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("EasmClient.GetSnapshot"); + scope.Start(); + try + { + using HttpMessage message = CreateGetSnapshotRequest(content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get asset summary details for the summary request. + /// Body parameter. + /// The cancellation token to use. + /// is null. + /// + public virtual async Task> GetSummaryAsync(ReportAssetSummaryPayload body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetSummaryAsync(content, context).ConfigureAwait(false); + return Response.FromValue(ReportAssetSummaryResult.FromResponse(response), response); + } + + /// Get asset summary details for the summary request. + /// Body parameter. + /// The cancellation token to use. + /// is null. + /// + public virtual Response GetSummary(ReportAssetSummaryPayload body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetSummary(content, context); + return Response.FromValue(ReportAssetSummaryResult.FromResponse(response), response); + } + + /// + /// [Protocol Method] Get asset summary details for the summary request. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetSummaryAsync(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("EasmClient.GetSummary"); + scope.Start(); + try + { + using HttpMessage message = CreateGetSummaryRequest(content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get asset summary details for the summary request. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetSummary(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("EasmClient.GetSummary"); + scope.Start(); + try + { + using HttpMessage message = CreateGetSummaryRequest(content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get the most recent snapshot of asset summary values for the snapshot request exported to a file. + /// Body parameter. + /// The cancellation token to use. + /// is null. + /// + public virtual async Task> GetSnapshotExportAsync(ReportAssetSnapshotExportPayload body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetSnapshotExportAsync(content, context).ConfigureAwait(false); + return Response.FromValue(TaskResource.FromResponse(response), response); + } + + /// Get the most recent snapshot of asset summary values for the snapshot request exported to a file. + /// Body parameter. + /// The cancellation token to use. + /// is null. + /// + public virtual Response GetSnapshotExport(ReportAssetSnapshotExportPayload body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetSnapshotExport(content, context); + return Response.FromValue(TaskResource.FromResponse(response), response); + } + + /// + /// [Protocol Method] Get the most recent snapshot of asset summary values for the snapshot request exported to a file. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetSnapshotExportAsync(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("EasmClient.GetSnapshotExport"); + scope.Start(); + try + { + using HttpMessage message = CreateGetSnapshotExportRequest(content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get the most recent snapshot of asset summary values for the snapshot request exported to a file. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetSnapshotExport(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("EasmClient.GetSnapshotExport"); + scope.Start(); + try + { + using HttpMessage message = CreateGetSnapshotExportRequest(content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Retrieve a saved filter by filterName. + /// The caller provided unique name for the resource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetSavedFilterAsync(string filterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(filterName, nameof(filterName)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetSavedFilterAsync(filterName, context).ConfigureAwait(false); + return Response.FromValue(SavedFilter.FromResponse(response), response); + } + + /// Retrieve a saved filter by filterName. + /// The caller provided unique name for the resource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response GetSavedFilter(string filterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(filterName, nameof(filterName)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetSavedFilter(filterName, context); + return Response.FromValue(SavedFilter.FromResponse(response), response); + } + + /// + /// [Protocol Method] Retrieve a saved filter by filterName. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The caller provided unique name for the resource. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetSavedFilterAsync(string filterName, RequestContext context) + { + Argument.AssertNotNullOrEmpty(filterName, nameof(filterName)); + + using var scope = ClientDiagnostics.CreateScope("EasmClient.GetSavedFilter"); + scope.Start(); + try + { + using HttpMessage message = CreateGetSavedFilterRequest(filterName, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Retrieve a saved filter by filterName. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The caller provided unique name for the resource. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetSavedFilter(string filterName, RequestContext context) + { + Argument.AssertNotNullOrEmpty(filterName, nameof(filterName)); + + using var scope = ClientDiagnostics.CreateScope("EasmClient.GetSavedFilter"); + scope.Start(); + try + { + using HttpMessage message = CreateGetSavedFilterRequest(filterName, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Create or replace a saved filter with a given filterName. + /// The caller provided unique name for the resource. + /// Body parameter. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> CreateOrReplaceSavedFilterAsync(string filterName, SavedFilterPayload body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(filterName, nameof(filterName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await CreateOrReplaceSavedFilterAsync(filterName, content, context).ConfigureAwait(false); + return Response.FromValue(SavedFilter.FromResponse(response), response); + } + + /// Create or replace a saved filter with a given filterName. + /// The caller provided unique name for the resource. + /// Body parameter. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response CreateOrReplaceSavedFilter(string filterName, SavedFilterPayload body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(filterName, nameof(filterName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = CreateOrReplaceSavedFilter(filterName, content, context); + return Response.FromValue(SavedFilter.FromResponse(response), response); + } + + /// + /// [Protocol Method] Create or replace a saved filter with a given filterName. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The caller provided unique name for the resource. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task CreateOrReplaceSavedFilterAsync(string filterName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(filterName, nameof(filterName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("EasmClient.CreateOrReplaceSavedFilter"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateOrReplaceSavedFilterRequest(filterName, content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Create or replace a saved filter with a given filterName. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The caller provided unique name for the resource. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response CreateOrReplaceSavedFilter(string filterName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(filterName, nameof(filterName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("EasmClient.CreateOrReplaceSavedFilter"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateOrReplaceSavedFilterRequest(filterName, content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Delete a saved filter with a given filterName. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The caller provided unique name for the resource. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task DeleteSavedFilterAsync(string filterName, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(filterName, nameof(filterName)); + + using var scope = ClientDiagnostics.CreateScope("EasmClient.DeleteSavedFilter"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteSavedFilterRequest(filterName, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Delete a saved filter with a given filterName. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The caller provided unique name for the resource. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response DeleteSavedFilter(string filterName, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(filterName, nameof(filterName)); + + using var scope = ClientDiagnostics.CreateScope("EasmClient.DeleteSavedFilter"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteSavedFilterRequest(filterName, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Retrieve a task by taskId. + /// The unique identifier of the task. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetTaskAsync(string taskId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(taskId, nameof(taskId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetTaskAsync(taskId, context).ConfigureAwait(false); + return Response.FromValue(TaskResource.FromResponse(response), response); + } + + /// Retrieve a task by taskId. + /// The unique identifier of the task. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response GetTask(string taskId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(taskId, nameof(taskId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetTask(taskId, context); + return Response.FromValue(TaskResource.FromResponse(response), response); + } + + /// + /// [Protocol Method] Retrieve a task by taskId. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The unique identifier of the task. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetTaskAsync(string taskId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(taskId, nameof(taskId)); + + using var scope = ClientDiagnostics.CreateScope("EasmClient.GetTask"); + scope.Start(); + try + { + using HttpMessage message = CreateGetTaskRequest(taskId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Retrieve a task by taskId. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The unique identifier of the task. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetTask(string taskId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(taskId, nameof(taskId)); + + using var scope = ClientDiagnostics.CreateScope("EasmClient.GetTask"); + scope.Start(); + try + { + using HttpMessage message = CreateGetTaskRequest(taskId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Cancel a task by taskId. + /// The unique identifier of the task. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> CancelTaskAsync(string taskId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(taskId, nameof(taskId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await CancelTaskAsync(taskId, context).ConfigureAwait(false); + return Response.FromValue(TaskResource.FromResponse(response), response); + } + + /// Cancel a task by taskId. + /// The unique identifier of the task. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response CancelTask(string taskId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(taskId, nameof(taskId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = CancelTask(taskId, context); + return Response.FromValue(TaskResource.FromResponse(response), response); + } + + /// + /// [Protocol Method] Cancel a task by taskId. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The unique identifier of the task. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task CancelTaskAsync(string taskId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(taskId, nameof(taskId)); + + using var scope = ClientDiagnostics.CreateScope("EasmClient.CancelTask"); + scope.Start(); + try + { + using HttpMessage message = CreateCancelTaskRequest(taskId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Cancel a task by taskId. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The unique identifier of the task. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response CancelTask(string taskId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(taskId, nameof(taskId)); + + using var scope = ClientDiagnostics.CreateScope("EasmClient.CancelTask"); + scope.Start(); + try + { + using HttpMessage message = CreateCancelTaskRequest(taskId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Run a task by taskId. + /// The unique identifier of the task. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> RunTaskAsync(string taskId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(taskId, nameof(taskId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await RunTaskAsync(taskId, context).ConfigureAwait(false); + return Response.FromValue(TaskResource.FromResponse(response), response); + } + + /// Run a task by taskId. + /// The unique identifier of the task. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response RunTask(string taskId, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(filterName, nameof(filterName)); - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNullOrEmpty(taskId, nameof(taskId)); - using var scope = ClientDiagnostics.CreateScope("EasmClient.CreateOrReplaceSavedFilter"); - scope.Start(); - try - { - using HttpMessage message = CreateCreateOrReplaceSavedFilterRequest(filterName, content, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } + RequestContext context = FromCancellationToken(cancellationToken); + Response response = RunTask(taskId, context); + return Response.FromValue(TaskResource.FromResponse(response), response); } - // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method /// - /// [Protocol Method] Delete a saved filter with a given filterName. + /// [Protocol Method] Run a task by taskId. /// /// /// /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. /// /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// /// /// - /// The caller provided unique name for the resource. + /// The unique identifier of the task. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// - public virtual async Task DeleteSavedFilterAsync(string filterName, RequestContext context = null) + /// + public virtual async Task RunTaskAsync(string taskId, RequestContext context) { - Argument.AssertNotNullOrEmpty(filterName, nameof(filterName)); + Argument.AssertNotNullOrEmpty(taskId, nameof(taskId)); - using var scope = ClientDiagnostics.CreateScope("EasmClient.DeleteSavedFilter"); + using var scope = ClientDiagnostics.CreateScope("EasmClient.RunTask"); scope.Start(); try { - using HttpMessage message = CreateDeleteSavedFilterRequest(filterName, context); + using HttpMessage message = CreateRunTaskRequest(taskId, context); return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); } catch (Exception e) @@ -1789,33 +2862,37 @@ public virtual async Task DeleteSavedFilterAsync(string filterName, Re } } - // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method /// - /// [Protocol Method] Delete a saved filter with a given filterName. + /// [Protocol Method] Run a task by taskId. /// /// /// /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. /// /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// /// /// - /// The caller provided unique name for the resource. + /// The unique identifier of the task. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// - public virtual Response DeleteSavedFilter(string filterName, RequestContext context = null) + /// + public virtual Response RunTask(string taskId, RequestContext context) { - Argument.AssertNotNullOrEmpty(filterName, nameof(filterName)); + Argument.AssertNotNullOrEmpty(taskId, nameof(taskId)); - using var scope = ClientDiagnostics.CreateScope("EasmClient.DeleteSavedFilter"); + using var scope = ClientDiagnostics.CreateScope("EasmClient.RunTask"); scope.Start(); try { - using HttpMessage message = CreateDeleteSavedFilterRequest(filterName, context); + using HttpMessage message = CreateRunTaskRequest(taskId, context); return _pipeline.ProcessMessage(message, context); } catch (Exception e) @@ -1825,38 +2902,38 @@ public virtual Response DeleteSavedFilter(string filterName, RequestContext cont } } - /// Retrieve a task by taskId. + /// Download a task. /// The unique identifier of the task. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. - /// - public virtual async Task> GetTaskAsync(string taskId, CancellationToken cancellationToken = default) + /// + public virtual async Task> DownloadTaskAsync(string taskId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(taskId, nameof(taskId)); RequestContext context = FromCancellationToken(cancellationToken); - Response response = await GetTaskAsync(taskId, context).ConfigureAwait(false); + Response response = await DownloadTaskAsync(taskId, context).ConfigureAwait(false); return Response.FromValue(TaskResource.FromResponse(response), response); } - /// Retrieve a task by taskId. + /// Download a task. /// The unique identifier of the task. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. - /// - public virtual Response GetTask(string taskId, CancellationToken cancellationToken = default) + /// + public virtual Response DownloadTask(string taskId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(taskId, nameof(taskId)); RequestContext context = FromCancellationToken(cancellationToken); - Response response = GetTask(taskId, context); + Response response = DownloadTask(taskId, context); return Response.FromValue(TaskResource.FromResponse(response), response); } /// - /// [Protocol Method] Retrieve a task by taskId. + /// [Protocol Method] Download a task. /// /// /// @@ -1865,7 +2942,7 @@ public virtual Response GetTask(string taskId, CancellationToken c /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -1876,16 +2953,16 @@ public virtual Response GetTask(string taskId, CancellationToken c /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// - public virtual async Task GetTaskAsync(string taskId, RequestContext context) + /// + public virtual async Task DownloadTaskAsync(string taskId, RequestContext context) { Argument.AssertNotNullOrEmpty(taskId, nameof(taskId)); - using var scope = ClientDiagnostics.CreateScope("EasmClient.GetTask"); + using var scope = ClientDiagnostics.CreateScope("EasmClient.DownloadTask"); scope.Start(); try { - using HttpMessage message = CreateGetTaskRequest(taskId, context); + using HttpMessage message = CreateDownloadTaskRequest(taskId, context); return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); } catch (Exception e) @@ -1896,7 +2973,7 @@ public virtual async Task GetTaskAsync(string taskId, RequestContext c } /// - /// [Protocol Method] Retrieve a task by taskId. + /// [Protocol Method] Download a task. /// /// /// @@ -1905,7 +2982,7 @@ public virtual async Task GetTaskAsync(string taskId, RequestContext c /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -1916,16 +2993,16 @@ public virtual async Task GetTaskAsync(string taskId, RequestContext c /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// - public virtual Response GetTask(string taskId, RequestContext context) + /// + public virtual Response DownloadTask(string taskId, RequestContext context) { Argument.AssertNotNullOrEmpty(taskId, nameof(taskId)); - using var scope = ClientDiagnostics.CreateScope("EasmClient.GetTask"); + using var scope = ClientDiagnostics.CreateScope("EasmClient.DownloadTask"); scope.Start(); try { - using HttpMessage message = CreateGetTaskRequest(taskId, context); + using HttpMessage message = CreateDownloadTaskRequest(taskId, context); return _pipeline.ProcessMessage(message, context); } catch (Exception e) @@ -1935,38 +3012,38 @@ public virtual Response GetTask(string taskId, RequestContext context) } } - /// Cancel a task by taskId. - /// The unique identifier of the task. + /// Retrieve details of CisaCve by cveId. + /// The CVE ID of the vulnerability in the format CVE-YYYY-NNNN, note that the number portion can have more than 4 digits. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - /// - public virtual async Task> CancelTaskAsync(string taskId, CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetCisaCveAsync(string cveId, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(taskId, nameof(taskId)); + Argument.AssertNotNullOrEmpty(cveId, nameof(cveId)); RequestContext context = FromCancellationToken(cancellationToken); - Response response = await CancelTaskAsync(taskId, context).ConfigureAwait(false); - return Response.FromValue(TaskResource.FromResponse(response), response); + Response response = await GetCisaCveAsync(cveId, context).ConfigureAwait(false); + return Response.FromValue(CisaCveResult.FromResponse(response), response); } - /// Cancel a task by taskId. - /// The unique identifier of the task. + /// Retrieve details of CisaCve by cveId. + /// The CVE ID of the vulnerability in the format CVE-YYYY-NNNN, note that the number portion can have more than 4 digits. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - /// - public virtual Response CancelTask(string taskId, CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response GetCisaCve(string cveId, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(taskId, nameof(taskId)); + Argument.AssertNotNullOrEmpty(cveId, nameof(cveId)); RequestContext context = FromCancellationToken(cancellationToken); - Response response = CancelTask(taskId, context); - return Response.FromValue(TaskResource.FromResponse(response), response); + Response response = GetCisaCve(cveId, context); + return Response.FromValue(CisaCveResult.FromResponse(response), response); } /// - /// [Protocol Method] Cancel a task by taskId. + /// [Protocol Method] Retrieve details of CisaCve by cveId /// /// /// @@ -1975,27 +3052,27 @@ public virtual Response CancelTask(string taskId, CancellationToke /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// /// - /// The unique identifier of the task. + /// The CVE ID of the vulnerability in the format CVE-YYYY-NNNN, note that the number portion can have more than 4 digits. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// - public virtual async Task CancelTaskAsync(string taskId, RequestContext context) + /// + public virtual async Task GetCisaCveAsync(string cveId, RequestContext context) { - Argument.AssertNotNullOrEmpty(taskId, nameof(taskId)); + Argument.AssertNotNullOrEmpty(cveId, nameof(cveId)); - using var scope = ClientDiagnostics.CreateScope("EasmClient.CancelTask"); + using var scope = ClientDiagnostics.CreateScope("EasmClient.GetCisaCve"); scope.Start(); try { - using HttpMessage message = CreateCancelTaskRequest(taskId, context); + using HttpMessage message = CreateGetCisaCveRequest(cveId, context); return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); } catch (Exception e) @@ -2006,7 +3083,7 @@ public virtual async Task CancelTaskAsync(string taskId, RequestContex } /// - /// [Protocol Method] Cancel a task by taskId. + /// [Protocol Method] Retrieve details of CisaCve by cveId /// /// /// @@ -2015,27 +3092,27 @@ public virtual async Task CancelTaskAsync(string taskId, RequestContex /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// /// - /// The unique identifier of the task. + /// The CVE ID of the vulnerability in the format CVE-YYYY-NNNN, note that the number portion can have more than 4 digits. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// - public virtual Response CancelTask(string taskId, RequestContext context) + /// + public virtual Response GetCisaCve(string cveId, RequestContext context) { - Argument.AssertNotNullOrEmpty(taskId, nameof(taskId)); + Argument.AssertNotNullOrEmpty(cveId, nameof(cveId)); - using var scope = ClientDiagnostics.CreateScope("EasmClient.CancelTask"); + using var scope = ClientDiagnostics.CreateScope("EasmClient.GetCisaCve"); scope.Start(); try { - using HttpMessage message = CreateCancelTaskRequest(taskId, context); + using HttpMessage message = CreateGetCisaCveRequest(cveId, context); return _pipeline.ProcessMessage(message, context); } catch (Exception e) @@ -2051,13 +3128,16 @@ public virtual Response CancelTask(string taskId, RequestContext context) /// The number of result items to skip. /// The maximum number of result items per page. /// Specify this value instead of 'skip' to use cursor-based searching. Initial value is '*' and subsequent values are returned in the response. + /// Specify the response type. The possible values are: ID, STANDARD, FULL, REDUCED. + /// The properties to include in the response. + /// If it's recent only. /// The cancellation token to use. - /// - public virtual AsyncPageable GetAssetResourcesAsync(string filter = null, string orderby = null, int? skip = null, int? maxpagesize = null, string mark = null, CancellationToken cancellationToken = default) + /// + public virtual AsyncPageable GetAssetResourcesAsync(string filter = null, string orderby = null, int? skip = null, int? maxpagesize = null, string mark = null, AssetResponseType? responseType = null, IEnumerable responseIncludes = null, bool? recentOnly = null, CancellationToken cancellationToken = default) { RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; - HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetAssetResourcesRequest(filter, orderby, skip, maxpagesize, mark, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetAssetResourcesNextPageRequest(nextLink, filter, orderby, skip, maxpagesize, mark, context); + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetAssetResourcesRequest(filter, orderby, skip, maxpagesize, mark, responseType?.ToString(), responseIncludes, recentOnly, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetAssetResourcesNextPageRequest(nextLink, filter, orderby, skip, maxpagesize, mark, responseType?.ToString(), responseIncludes, recentOnly, context); return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => AssetResource.DeserializeAssetResource(e), ClientDiagnostics, _pipeline, "EasmClient.GetAssetResources", "value", "nextLink", context); } @@ -2067,13 +3147,16 @@ public virtual AsyncPageable GetAssetResourcesAsync(string filter /// The number of result items to skip. /// The maximum number of result items per page. /// Specify this value instead of 'skip' to use cursor-based searching. Initial value is '*' and subsequent values are returned in the response. + /// Specify the response type. The possible values are: ID, STANDARD, FULL, REDUCED. + /// The properties to include in the response. + /// If it's recent only. /// The cancellation token to use. - /// - public virtual Pageable GetAssetResources(string filter = null, string orderby = null, int? skip = null, int? maxpagesize = null, string mark = null, CancellationToken cancellationToken = default) + /// + public virtual Pageable GetAssetResources(string filter = null, string orderby = null, int? skip = null, int? maxpagesize = null, string mark = null, AssetResponseType? responseType = null, IEnumerable responseIncludes = null, bool? recentOnly = null, CancellationToken cancellationToken = default) { RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; - HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetAssetResourcesRequest(filter, orderby, skip, maxpagesize, mark, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetAssetResourcesNextPageRequest(nextLink, filter, orderby, skip, maxpagesize, mark, context); + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetAssetResourcesRequest(filter, orderby, skip, maxpagesize, mark, responseType?.ToString(), responseIncludes, recentOnly, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetAssetResourcesNextPageRequest(nextLink, filter, orderby, skip, maxpagesize, mark, responseType?.ToString(), responseIncludes, recentOnly, context); return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => AssetResource.DeserializeAssetResource(e), ClientDiagnostics, _pipeline, "EasmClient.GetAssetResources", "value", "nextLink", context); } @@ -2087,7 +3170,7 @@ public virtual Pageable GetAssetResources(string filter = null, s /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -2097,14 +3180,17 @@ public virtual Pageable GetAssetResources(string filter = null, s /// The number of result items to skip. /// The maximum number of result items per page. /// Specify this value instead of 'skip' to use cursor-based searching. Initial value is '*' and subsequent values are returned in the response. + /// Specify the response type. The possible values are: ID, STANDARD, FULL, REDUCED. Allowed values: "id" | "standard" | "full" | "reduced". + /// The properties to include in the response. + /// If it's recent only. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. - /// - public virtual AsyncPageable GetAssetResourcesAsync(string filter, string orderby, int? skip, int? maxpagesize, string mark, RequestContext context) + /// + public virtual AsyncPageable GetAssetResourcesAsync(string filter, string orderby, int? skip, int? maxpagesize, string mark, string responseType, IEnumerable responseIncludes, bool? recentOnly, RequestContext context) { - HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetAssetResourcesRequest(filter, orderby, skip, maxpagesize, mark, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetAssetResourcesNextPageRequest(nextLink, filter, orderby, skip, maxpagesize, mark, context); + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetAssetResourcesRequest(filter, orderby, skip, maxpagesize, mark, responseType, responseIncludes, recentOnly, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetAssetResourcesNextPageRequest(nextLink, filter, orderby, skip, maxpagesize, mark, responseType, responseIncludes, recentOnly, context); return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "EasmClient.GetAssetResources", "value", "nextLink", context); } @@ -2118,7 +3204,7 @@ public virtual AsyncPageable GetAssetResourcesAsync(string filter, s /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -2128,17 +3214,120 @@ public virtual AsyncPageable GetAssetResourcesAsync(string filter, s /// The number of result items to skip. /// The maximum number of result items per page. /// Specify this value instead of 'skip' to use cursor-based searching. Initial value is '*' and subsequent values are returned in the response. + /// Specify the response type. The possible values are: ID, STANDARD, FULL, REDUCED. Allowed values: "id" | "standard" | "full" | "reduced". + /// The properties to include in the response. + /// If it's recent only. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. - /// - public virtual Pageable GetAssetResources(string filter, string orderby, int? skip, int? maxpagesize, string mark, RequestContext context) + /// + public virtual Pageable GetAssetResources(string filter, string orderby, int? skip, int? maxpagesize, string mark, string responseType, IEnumerable responseIncludes, bool? recentOnly, RequestContext context) { - HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetAssetResourcesRequest(filter, orderby, skip, maxpagesize, mark, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetAssetResourcesNextPageRequest(nextLink, filter, orderby, skip, maxpagesize, mark, context); + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetAssetResourcesRequest(filter, orderby, skip, maxpagesize, mark, responseType, responseIncludes, recentOnly, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetAssetResourcesNextPageRequest(nextLink, filter, orderby, skip, maxpagesize, mark, responseType, responseIncludes, recentOnly, context); return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "EasmClient.GetAssetResources", "value", "nextLink", context); } + /// Retrieve a list of deltas for the provided time range. + /// Body parameter. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// is null. + /// + public virtual AsyncPageable GetDeltaDetailsAsync(DeltaDetailsRequest body, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + RequestContent content = body.ToRequestContent(); + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDeltaDetailsRequest(content, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDeltaDetailsNextPageRequest(nextLink, content, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => DeltaResult.DeserializeDeltaResult(e), ClientDiagnostics, _pipeline, "EasmClient.GetDeltaDetails", "value", "nextLink", context); + } + + /// Retrieve a list of deltas for the provided time range. + /// Body parameter. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// is null. + /// + public virtual Pageable GetDeltaDetails(DeltaDetailsRequest body, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + RequestContent content = body.ToRequestContent(); + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDeltaDetailsRequest(content, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDeltaDetailsNextPageRequest(nextLink, content, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => DeltaResult.DeserializeDeltaResult(e), ClientDiagnostics, _pipeline, "EasmClient.GetDeltaDetails", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Retrieve a list of deltas for the provided time range. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual AsyncPageable GetDeltaDetailsAsync(RequestContent content, int? skip = null, int? maxpagesize = null, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDeltaDetailsRequest(content, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDeltaDetailsNextPageRequest(nextLink, content, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "EasmClient.GetDeltaDetails", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Retrieve a list of deltas for the provided time range. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual Pageable GetDeltaDetails(RequestContent content, int? skip = null, int? maxpagesize = null, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDeltaDetailsRequest(content, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDeltaDetailsNextPageRequest(nextLink, content, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "EasmClient.GetDeltaDetails", "value", "nextLink", context); + } + /// Retrieve a list of data connections. /// The number of result items to skip. /// The maximum number of result items per page. @@ -2226,13 +3415,13 @@ public virtual Pageable GetDataConnections(int? skip, int? maxpagesi /// The number of result items to skip. /// The maximum number of result items per page. /// The cancellation token to use. - /// - public virtual AsyncPageable GetDiscoveryGroupsAsync(string filter = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + /// + public virtual AsyncPageable GetDiscoGroupsAsync(string filter = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) { RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; - HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDiscoveryGroupsRequest(filter, skip, maxpagesize, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDiscoveryGroupsNextPageRequest(nextLink, filter, skip, maxpagesize, context); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => DiscoveryGroup.DeserializeDiscoveryGroup(e), ClientDiagnostics, _pipeline, "EasmClient.GetDiscoveryGroups", "value", "nextLink", context); + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDiscoGroupsRequest(filter, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDiscoGroupsNextPageRequest(nextLink, filter, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => DiscoveryGroup.DeserializeDiscoveryGroup(e), ClientDiagnostics, _pipeline, "EasmClient.GetDiscoGroups", "value", "nextLink", context); } /// Retrieve a list of discovery group for the provided search parameters. @@ -2240,13 +3429,13 @@ public virtual AsyncPageable GetDiscoveryGroupsAsync(string filt /// The number of result items to skip. /// The maximum number of result items per page. /// The cancellation token to use. - /// - public virtual Pageable GetDiscoveryGroups(string filter = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + /// + public virtual Pageable GetDiscoGroups(string filter = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) { RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; - HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDiscoveryGroupsRequest(filter, skip, maxpagesize, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDiscoveryGroupsNextPageRequest(nextLink, filter, skip, maxpagesize, context); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => DiscoveryGroup.DeserializeDiscoveryGroup(e), ClientDiagnostics, _pipeline, "EasmClient.GetDiscoveryGroups", "value", "nextLink", context); + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDiscoGroupsRequest(filter, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDiscoGroupsNextPageRequest(nextLink, filter, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => DiscoveryGroup.DeserializeDiscoveryGroup(e), ClientDiagnostics, _pipeline, "EasmClient.GetDiscoGroups", "value", "nextLink", context); } /// @@ -2259,7 +3448,7 @@ public virtual Pageable GetDiscoveryGroups(string filter = null, /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -2270,12 +3459,12 @@ public virtual Pageable GetDiscoveryGroups(string filter = null, /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. - /// - public virtual AsyncPageable GetDiscoveryGroupsAsync(string filter, int? skip, int? maxpagesize, RequestContext context) + /// + public virtual AsyncPageable GetDiscoGroupsAsync(string filter, int? skip, int? maxpagesize, RequestContext context) { - HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDiscoveryGroupsRequest(filter, skip, maxpagesize, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDiscoveryGroupsNextPageRequest(nextLink, filter, skip, maxpagesize, context); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "EasmClient.GetDiscoveryGroups", "value", "nextLink", context); + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDiscoGroupsRequest(filter, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDiscoGroupsNextPageRequest(nextLink, filter, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "EasmClient.GetDiscoGroups", "value", "nextLink", context); } /// @@ -2288,7 +3477,7 @@ public virtual AsyncPageable GetDiscoveryGroupsAsync(string filter, /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -2299,12 +3488,12 @@ public virtual AsyncPageable GetDiscoveryGroupsAsync(string filter, /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. - /// - public virtual Pageable GetDiscoveryGroups(string filter, int? skip, int? maxpagesize, RequestContext context) + /// + public virtual Pageable GetDiscoGroups(string filter, int? skip, int? maxpagesize, RequestContext context) { - HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDiscoveryGroupsRequest(filter, skip, maxpagesize, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDiscoveryGroupsNextPageRequest(nextLink, filter, skip, maxpagesize, context); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "EasmClient.GetDiscoveryGroups", "value", "nextLink", context); + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDiscoGroupsRequest(filter, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDiscoGroupsNextPageRequest(nextLink, filter, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "EasmClient.GetDiscoGroups", "value", "nextLink", context); } /// Retrieve a collection of discovery run results for a discovery group with a given groupName. @@ -2315,15 +3504,15 @@ public virtual Pageable GetDiscoveryGroups(string filter, int? skip, /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. - /// - public virtual AsyncPageable GetDiscoveryGroupRunsAsync(string groupName, string filter = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + /// + public virtual AsyncPageable GetRunsAsync(string groupName, string filter = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; - HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDiscoveryGroupRunsRequest(groupName, filter, skip, maxpagesize, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDiscoveryGroupRunsNextPageRequest(nextLink, groupName, filter, skip, maxpagesize, context); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => DiscoveryRunResult.DeserializeDiscoveryRunResult(e), ClientDiagnostics, _pipeline, "EasmClient.GetDiscoveryGroupRuns", "value", "nextLink", context); + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetRunsRequest(groupName, filter, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetRunsNextPageRequest(nextLink, groupName, filter, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => DiscoveryRunResult.DeserializeDiscoveryRunResult(e), ClientDiagnostics, _pipeline, "EasmClient.GetRuns", "value", "nextLink", context); } /// Retrieve a collection of discovery run results for a discovery group with a given groupName. @@ -2334,15 +3523,15 @@ public virtual AsyncPageable GetDiscoveryGroupRunsAsync(stri /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. - /// - public virtual Pageable GetDiscoveryGroupRuns(string groupName, string filter = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + /// + public virtual Pageable GetRuns(string groupName, string filter = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; - HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDiscoveryGroupRunsRequest(groupName, filter, skip, maxpagesize, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDiscoveryGroupRunsNextPageRequest(nextLink, groupName, filter, skip, maxpagesize, context); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => DiscoveryRunResult.DeserializeDiscoveryRunResult(e), ClientDiagnostics, _pipeline, "EasmClient.GetDiscoveryGroupRuns", "value", "nextLink", context); + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetRunsRequest(groupName, filter, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetRunsNextPageRequest(nextLink, groupName, filter, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => DiscoveryRunResult.DeserializeDiscoveryRunResult(e), ClientDiagnostics, _pipeline, "EasmClient.GetRuns", "value", "nextLink", context); } /// @@ -2355,7 +3544,7 @@ public virtual Pageable GetDiscoveryGroupRuns(string groupNa /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -2369,14 +3558,14 @@ public virtual Pageable GetDiscoveryGroupRuns(string groupNa /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. - /// - public virtual AsyncPageable GetDiscoveryGroupRunsAsync(string groupName, string filter, int? skip, int? maxpagesize, RequestContext context) + /// + public virtual AsyncPageable GetRunsAsync(string groupName, string filter, int? skip, int? maxpagesize, RequestContext context) { Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); - HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDiscoveryGroupRunsRequest(groupName, filter, skip, maxpagesize, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDiscoveryGroupRunsNextPageRequest(nextLink, groupName, filter, skip, maxpagesize, context); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "EasmClient.GetDiscoveryGroupRuns", "value", "nextLink", context); + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetRunsRequest(groupName, filter, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetRunsNextPageRequest(nextLink, groupName, filter, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "EasmClient.GetRuns", "value", "nextLink", context); } /// @@ -2389,7 +3578,7 @@ public virtual AsyncPageable GetDiscoveryGroupRunsAsync(string group /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -2403,14 +3592,14 @@ public virtual AsyncPageable GetDiscoveryGroupRunsAsync(string group /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. - /// - public virtual Pageable GetDiscoveryGroupRuns(string groupName, string filter, int? skip, int? maxpagesize, RequestContext context) + /// + public virtual Pageable GetRuns(string groupName, string filter, int? skip, int? maxpagesize, RequestContext context) { Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); - HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDiscoveryGroupRunsRequest(groupName, filter, skip, maxpagesize, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDiscoveryGroupRunsNextPageRequest(nextLink, groupName, filter, skip, maxpagesize, context); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "EasmClient.GetDiscoveryGroupRuns", "value", "nextLink", context); + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetRunsRequest(groupName, filter, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetRunsNextPageRequest(nextLink, groupName, filter, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "EasmClient.GetRuns", "value", "nextLink", context); } /// Retrieve a list of disco templates for the provided search parameters. @@ -2418,13 +3607,13 @@ public virtual Pageable GetDiscoveryGroupRuns(string groupName, stri /// The number of result items to skip. /// The maximum number of result items per page. /// The cancellation token to use. - /// - public virtual AsyncPageable GetDiscoveryTemplatesAsync(string filter = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + /// + public virtual AsyncPageable GetDiscoTemplatesAsync(string filter = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) { RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; - HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDiscoveryTemplatesRequest(filter, skip, maxpagesize, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDiscoveryTemplatesNextPageRequest(nextLink, filter, skip, maxpagesize, context); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => DiscoveryTemplate.DeserializeDiscoveryTemplate(e), ClientDiagnostics, _pipeline, "EasmClient.GetDiscoveryTemplates", "value", "nextLink", context); + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDiscoTemplatesRequest(filter, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDiscoTemplatesNextPageRequest(nextLink, filter, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => DiscoveryTemplate.DeserializeDiscoveryTemplate(e), ClientDiagnostics, _pipeline, "EasmClient.GetDiscoTemplates", "value", "nextLink", context); } /// Retrieve a list of disco templates for the provided search parameters. @@ -2432,13 +3621,13 @@ public virtual AsyncPageable GetDiscoveryTemplatesAsync(strin /// The number of result items to skip. /// The maximum number of result items per page. /// The cancellation token to use. - /// - public virtual Pageable GetDiscoveryTemplates(string filter = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + /// + public virtual Pageable GetDiscoTemplates(string filter = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) { RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; - HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDiscoveryTemplatesRequest(filter, skip, maxpagesize, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDiscoveryTemplatesNextPageRequest(nextLink, filter, skip, maxpagesize, context); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => DiscoveryTemplate.DeserializeDiscoveryTemplate(e), ClientDiagnostics, _pipeline, "EasmClient.GetDiscoveryTemplates", "value", "nextLink", context); + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDiscoTemplatesRequest(filter, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDiscoTemplatesNextPageRequest(nextLink, filter, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => DiscoveryTemplate.DeserializeDiscoveryTemplate(e), ClientDiagnostics, _pipeline, "EasmClient.GetDiscoTemplates", "value", "nextLink", context); } /// @@ -2451,7 +3640,7 @@ public virtual Pageable GetDiscoveryTemplates(string filter = /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -2462,12 +3651,12 @@ public virtual Pageable GetDiscoveryTemplates(string filter = /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. - /// - public virtual AsyncPageable GetDiscoveryTemplatesAsync(string filter, int? skip, int? maxpagesize, RequestContext context) + /// + public virtual AsyncPageable GetDiscoTemplatesAsync(string filter, int? skip, int? maxpagesize, RequestContext context) { - HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDiscoveryTemplatesRequest(filter, skip, maxpagesize, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDiscoveryTemplatesNextPageRequest(nextLink, filter, skip, maxpagesize, context); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "EasmClient.GetDiscoveryTemplates", "value", "nextLink", context); + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDiscoTemplatesRequest(filter, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDiscoTemplatesNextPageRequest(nextLink, filter, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "EasmClient.GetDiscoTemplates", "value", "nextLink", context); } /// @@ -2480,7 +3669,7 @@ public virtual AsyncPageable GetDiscoveryTemplatesAsync(string filte /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -2491,12 +3680,12 @@ public virtual AsyncPageable GetDiscoveryTemplatesAsync(string filte /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. - /// - public virtual Pageable GetDiscoveryTemplates(string filter, int? skip, int? maxpagesize, RequestContext context) + /// + public virtual Pageable GetDiscoTemplates(string filter, int? skip, int? maxpagesize, RequestContext context) { - HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDiscoveryTemplatesRequest(filter, skip, maxpagesize, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDiscoveryTemplatesNextPageRequest(nextLink, filter, skip, maxpagesize, context); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "EasmClient.GetDiscoveryTemplates", "value", "nextLink", context); + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDiscoTemplatesRequest(filter, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDiscoTemplatesNextPageRequest(nextLink, filter, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "EasmClient.GetDiscoTemplates", "value", "nextLink", context); } /// Retrieve a list of saved filters for the provided search parameters. @@ -2606,17 +3795,99 @@ public virtual AsyncPageable GetTasksAsync(string filter = null, s /// The number of result items to skip. /// The maximum number of result items per page. /// The cancellation token to use. - /// - public virtual Pageable GetTasks(string filter = null, string orderby = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + /// + public virtual Pageable GetTasks(string filter = null, string orderby = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTasksRequest(filter, orderby, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTasksNextPageRequest(nextLink, filter, orderby, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => TaskResource.DeserializeTaskResource(e), ClientDiagnostics, _pipeline, "EasmClient.GetTasks", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Retrieve a list of tasks for the provided search parameters. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// Filter the result list using the given expression. + /// A list of expressions that specify the order of the returned resources. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual AsyncPageable GetTasksAsync(string filter, string orderby, int? skip, int? maxpagesize, RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTasksRequest(filter, orderby, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTasksNextPageRequest(nextLink, filter, orderby, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "EasmClient.GetTasks", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Retrieve a list of tasks for the provided search parameters. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// Filter the result list using the given expression. + /// A list of expressions that specify the order of the returned resources. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual Pageable GetTasks(string filter, string orderby, int? skip, int? maxpagesize, RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTasksRequest(filter, orderby, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTasksNextPageRequest(nextLink, filter, orderby, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "EasmClient.GetTasks", "value", "nextLink", context); + } + + /// Retrieve a list of CisaCves for the provided search parameters. + /// The cancellation token to use. + /// + public virtual AsyncPageable GetCisaCvesAsync(CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetCisaCvesRequest(context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetCisaCvesNextPageRequest(nextLink, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => CisaCveResult.DeserializeCisaCveResult(e), ClientDiagnostics, _pipeline, "EasmClient.GetCisaCves", "value", "nextLink", context); + } + + /// Retrieve a list of CisaCves for the provided search parameters. + /// The cancellation token to use. + /// + public virtual Pageable GetCisaCves(CancellationToken cancellationToken = default) { RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; - HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTasksRequest(filter, orderby, skip, maxpagesize, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTasksNextPageRequest(nextLink, filter, orderby, skip, maxpagesize, context); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => TaskResource.DeserializeTaskResource(e), ClientDiagnostics, _pipeline, "EasmClient.GetTasks", "value", "nextLink", context); + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetCisaCvesRequest(context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetCisaCvesNextPageRequest(nextLink, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => CisaCveResult.DeserializeCisaCveResult(e), ClientDiagnostics, _pipeline, "EasmClient.GetCisaCves", "value", "nextLink", context); } /// - /// [Protocol Method] Retrieve a list of tasks for the provided search parameters. + /// [Protocol Method] Retrieve a list of CisaCves for the provided search parameters. /// /// /// @@ -2625,28 +3896,24 @@ public virtual Pageable GetTasks(string filter = null, string orde /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// /// - /// Filter the result list using the given expression. - /// A list of expressions that specify the order of the returned resources. - /// The number of result items to skip. - /// The maximum number of result items per page. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. - /// - public virtual AsyncPageable GetTasksAsync(string filter, string orderby, int? skip, int? maxpagesize, RequestContext context) + /// + public virtual AsyncPageable GetCisaCvesAsync(RequestContext context) { - HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTasksRequest(filter, orderby, skip, maxpagesize, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTasksNextPageRequest(nextLink, filter, orderby, skip, maxpagesize, context); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "EasmClient.GetTasks", "value", "nextLink", context); + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetCisaCvesRequest(context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetCisaCvesNextPageRequest(nextLink, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "EasmClient.GetCisaCves", "value", "nextLink", context); } /// - /// [Protocol Method] Retrieve a list of tasks for the provided search parameters. + /// [Protocol Method] Retrieve a list of CisaCves for the provided search parameters. /// /// /// @@ -2655,27 +3922,23 @@ public virtual AsyncPageable GetTasksAsync(string filter, string ord /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// /// - /// Filter the result list using the given expression. - /// A list of expressions that specify the order of the returned resources. - /// The number of result items to skip. - /// The maximum number of result items per page. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. - /// - public virtual Pageable GetTasks(string filter, string orderby, int? skip, int? maxpagesize, RequestContext context) + /// + public virtual Pageable GetCisaCves(RequestContext context) { - HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTasksRequest(filter, orderby, skip, maxpagesize, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTasksNextPageRequest(nextLink, filter, orderby, skip, maxpagesize, context); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "EasmClient.GetTasks", "value", "nextLink", context); + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetCisaCvesRequest(context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetCisaCvesNextPageRequest(nextLink, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "EasmClient.GetCisaCves", "value", "nextLink", context); } - internal HttpMessage CreateGetAssetResourcesRequest(string filter, string orderby, int? skip, int? maxpagesize, string mark, RequestContext context) + internal HttpMessage CreateGetAssetResourcesRequest(string filter, string orderby, int? skip, int? maxpagesize, string mark, string responseType, IEnumerable responseIncludes, bool? recentOnly, RequestContext context) { var message = _pipeline.CreateMessage(context, ResponseClassifier200); var request = message.Request; @@ -2704,6 +3967,18 @@ internal HttpMessage CreateGetAssetResourcesRequest(string filter, string orderb { uri.AppendQuery("mark", mark, true); } + if (responseType != null) + { + uri.AppendQuery("responseType", responseType, true); + } + if (responseIncludes != null && !(responseIncludes is ChangeTrackingList changeTrackingList && changeTrackingList.IsUndefined)) + { + uri.AppendQueryDelimited("responseIncludes", responseIncludes, ",", true); + } + if (recentOnly != null) + { + uri.AppendQuery("recentOnly", recentOnly.Value, true); + } request.Uri = uri; request.Headers.Add("Accept", "application/json"); return message; @@ -2741,6 +4016,102 @@ internal HttpMessage CreateGetAssetResourceRequest(string assetId, RequestContex return message; } + internal HttpMessage CreateGetAssetsExportRequest(RequestContent content, string filter, string orderby, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/assets:export", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (filter != null) + { + uri.AppendQuery("filter", filter, true); + } + if (orderby != null) + { + uri.AppendQuery("orderby", orderby, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateGetObservationsRequest(string assetId, string filter, string orderby, int? skip, int? maxpagesize, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/assets/", false); + uri.AppendPath(assetId, true); + uri.AppendPath(":getObservations", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (filter != null) + { + uri.AppendQuery("filter", filter, true); + } + if (orderby != null) + { + uri.AppendQuery("orderby", orderby, true); + } + if (skip != null) + { + uri.AppendQuery("skip", skip.Value, true); + } + if (maxpagesize != null) + { + uri.AppendQuery("maxpagesize", maxpagesize.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetDeltaDetailsRequest(RequestContent content, int? skip, int? maxpagesize, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/assets:getDeltaDetails", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (skip != null) + { + uri.AppendQuery("skip", skip.Value, true); + } + if (maxpagesize != null) + { + uri.AppendQuery("maxpagesize", maxpagesize.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateGetDeltaSummaryRequest(RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/assets:getDeltaSummary", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + internal HttpMessage CreateGetDataConnectionsRequest(int? skip, int? maxpagesize, RequestContext context) { var message = _pipeline.CreateMessage(context, ResponseClassifier200); @@ -2826,7 +4197,7 @@ internal HttpMessage CreateDeleteDataConnectionRequest(string dataConnectionName return message; } - internal HttpMessage CreateGetDiscoveryGroupsRequest(string filter, int? skip, int? maxpagesize, RequestContext context) + internal HttpMessage CreateGetDiscoGroupsRequest(string filter, int? skip, int? maxpagesize, RequestContext context) { var message = _pipeline.CreateMessage(context, ResponseClassifier200); var request = message.Request; @@ -2852,7 +4223,7 @@ internal HttpMessage CreateGetDiscoveryGroupsRequest(string filter, int? skip, i return message; } - internal HttpMessage CreateValidateDiscoveryGroupRequest(RequestContent content, RequestContext context) + internal HttpMessage CreateValidateDiscoGroupRequest(RequestContent content, RequestContext context) { var message = _pipeline.CreateMessage(context, ResponseClassifier200); var request = message.Request; @@ -2868,7 +4239,7 @@ internal HttpMessage CreateValidateDiscoveryGroupRequest(RequestContent content, return message; } - internal HttpMessage CreateGetDiscoveryGroupRequest(string groupName, RequestContext context) + internal HttpMessage CreateGetDiscoGroupRequest(string groupName, RequestContext context) { var message = _pipeline.CreateMessage(context, ResponseClassifier200); var request = message.Request; @@ -2883,7 +4254,22 @@ internal HttpMessage CreateGetDiscoveryGroupRequest(string groupName, RequestCon return message; } - internal HttpMessage CreateCreateOrReplaceDiscoveryGroupRequest(string groupName, RequestContent content, RequestContext context) + internal HttpMessage CreateDeleteDiscoGroupRequest(string groupName, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier204); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/discoGroups/", false); + uri.AppendPath(groupName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateCreateOrReplaceDiscoGroupRequest(string groupName, RequestContent content, RequestContext context) { var message = _pipeline.CreateMessage(context, ResponseClassifier200); var request = message.Request; @@ -2900,7 +4286,7 @@ internal HttpMessage CreateCreateOrReplaceDiscoveryGroupRequest(string groupName return message; } - internal HttpMessage CreateRunDiscoveryGroupRequest(string groupName, RequestContext context) + internal HttpMessage CreateRunDiscoGroupRequest(string groupName, RequestContext context) { var message = _pipeline.CreateMessage(context, ResponseClassifier204); var request = message.Request; @@ -2916,7 +4302,7 @@ internal HttpMessage CreateRunDiscoveryGroupRequest(string groupName, RequestCon return message; } - internal HttpMessage CreateGetDiscoveryGroupRunsRequest(string groupName, string filter, int? skip, int? maxpagesize, RequestContext context) + internal HttpMessage CreateGetRunsRequest(string groupName, string filter, int? skip, int? maxpagesize, RequestContext context) { var message = _pipeline.CreateMessage(context, ResponseClassifier200); var request = message.Request; @@ -2944,7 +4330,39 @@ internal HttpMessage CreateGetDiscoveryGroupRunsRequest(string groupName, string return message; } - internal HttpMessage CreateGetDiscoveryTemplatesRequest(string filter, int? skip, int? maxpagesize, RequestContext context) + internal HttpMessage CreateGetAssetChainSummaryRequest(RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/discoGroups:getAssetChainSummary", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateDismissAssetChainRequest(RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/discoGroups:dismissAssetChain", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateGetDiscoTemplatesRequest(string filter, int? skip, int? maxpagesize, RequestContext context) { var message = _pipeline.CreateMessage(context, ResponseClassifier200); var request = message.Request; @@ -2970,7 +4388,7 @@ internal HttpMessage CreateGetDiscoveryTemplatesRequest(string filter, int? skip return message; } - internal HttpMessage CreateGetDiscoveryTemplateRequest(string templateId, RequestContext context) + internal HttpMessage CreateGetDiscoTemplateRequest(string templateId, RequestContext context) { var message = _pipeline.CreateMessage(context, ResponseClassifier200); var request = message.Request; @@ -3031,6 +4449,22 @@ internal HttpMessage CreateGetSummaryRequest(RequestContent content, RequestCont return message; } + internal HttpMessage CreateGetSnapshotExportRequest(RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/reports/assets:getSnapshotExport", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + internal HttpMessage CreateGetSavedFiltersRequest(string filter, int? skip, int? maxpagesize, RequestContext context) { var message = _pipeline.CreateMessage(context, ResponseClassifier200); @@ -3165,7 +4599,81 @@ internal HttpMessage CreateCancelTaskRequest(string taskId, RequestContext conte return message; } - internal HttpMessage CreateGetAssetResourcesNextPageRequest(string nextLink, string filter, string orderby, int? skip, int? maxpagesize, string mark, RequestContext context) + internal HttpMessage CreateRunTaskRequest(string taskId, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/tasks/", false); + uri.AppendPath(taskId, true); + uri.AppendPath(":run", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateDownloadTaskRequest(string taskId, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/tasks/", false); + uri.AppendPath(taskId, true); + uri.AppendPath(":download", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetCisaCvesRequest(RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/cisaCves", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetCisaCveRequest(string cveId, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/cisaCves/", false); + uri.AppendPath(cveId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetAssetResourcesNextPageRequest(string nextLink, string filter, string orderby, int? skip, int? maxpagesize, string mark, string responseType, IEnumerable responseIncludes, bool? recentOnly, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + 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"); + return message; + } + + internal HttpMessage CreateGetDeltaDetailsNextPageRequest(string nextLink, RequestContent content, int? skip, int? maxpagesize, RequestContext context) { var message = _pipeline.CreateMessage(context, ResponseClassifier200); var request = message.Request; @@ -3191,7 +4699,7 @@ internal HttpMessage CreateGetDataConnectionsNextPageRequest(string nextLink, in return message; } - internal HttpMessage CreateGetDiscoveryGroupsNextPageRequest(string nextLink, string filter, int? skip, int? maxpagesize, RequestContext context) + internal HttpMessage CreateGetDiscoGroupsNextPageRequest(string nextLink, string filter, int? skip, int? maxpagesize, RequestContext context) { var message = _pipeline.CreateMessage(context, ResponseClassifier200); var request = message.Request; @@ -3204,7 +4712,7 @@ internal HttpMessage CreateGetDiscoveryGroupsNextPageRequest(string nextLink, st return message; } - internal HttpMessage CreateGetDiscoveryGroupRunsNextPageRequest(string nextLink, string groupName, string filter, int? skip, int? maxpagesize, RequestContext context) + internal HttpMessage CreateGetRunsNextPageRequest(string nextLink, string groupName, string filter, int? skip, int? maxpagesize, RequestContext context) { var message = _pipeline.CreateMessage(context, ResponseClassifier200); var request = message.Request; @@ -3217,7 +4725,7 @@ internal HttpMessage CreateGetDiscoveryGroupRunsNextPageRequest(string nextLink, return message; } - internal HttpMessage CreateGetDiscoveryTemplatesNextPageRequest(string nextLink, string filter, int? skip, int? maxpagesize, RequestContext context) + internal HttpMessage CreateGetDiscoTemplatesNextPageRequest(string nextLink, string filter, int? skip, int? maxpagesize, RequestContext context) { var message = _pipeline.CreateMessage(context, ResponseClassifier200); var request = message.Request; @@ -3256,6 +4764,19 @@ internal HttpMessage CreateGetTasksNextPageRequest(string nextLink, string filte return message; } + internal HttpMessage CreateGetCisaCvesNextPageRequest(string nextLink, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + 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"); + return message; + } + private static RequestContext DefaultRequestContext = new RequestContext(); internal static RequestContext FromCancellationToken(CancellationToken cancellationToken = default) { diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/EasmClientOptions.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/EasmClientOptions.cs index e5ea46ee7b0b..174ae8ecf817 100644 --- a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/EasmClientOptions.cs +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/EasmClientOptions.cs @@ -13,13 +13,15 @@ namespace Azure.Analytics.Defender.Easm /// Client options for EasmClient. public partial class EasmClientOptions : ClientOptions { - private const ServiceVersion LatestVersion = ServiceVersion.V2023_03_01_Preview; + private const ServiceVersion LatestVersion = ServiceVersion.V2024_03_01_Preview; /// The version of the service to use. public enum ServiceVersion { /// Service version "2023-03-01-preview". V2023_03_01_Preview = 1, + /// Service version "2024-03-01-preview". + V2024_03_01_Preview = 2, } internal string Version { get; } @@ -30,6 +32,7 @@ public EasmClientOptions(ServiceVersion version = LatestVersion) Version = version switch { ServiceVersion.V2023_03_01_Preview => "2023-03-01-preview", + ServiceVersion.V2024_03_01_Preview => "2024-03-01-preview", _ => throw new NotSupportedException() }; } diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/ErrorResponse.Serialization.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/ErrorResponse.Serialization.cs new file mode 100644 index 000000000000..09d57de93b30 --- /dev/null +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/ErrorResponse.Serialization.cs @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Defender.Easm +{ + public partial class ErrorResponse : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ErrorResponse)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("error"u8); + JsonSerializer.Serialize(writer, Error); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + ErrorResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ErrorResponse)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeErrorResponse(document.RootElement, options); + } + + internal static ErrorResponse DeserializeErrorResponse(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResponseError error = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("error"u8)) + { + error = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ErrorResponse(error, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ErrorResponse)} does not support writing '{options.Format}' format."); + } + } + + ErrorResponse IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeErrorResponse(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ErrorResponse)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ErrorResponse FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeErrorResponse(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/ErrorResponse.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/ErrorResponse.cs new file mode 100644 index 000000000000..0c6fbbace0f6 --- /dev/null +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/ErrorResponse.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Defender.Easm +{ + /// A response containing error details. + public partial class ErrorResponse + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The error object. + /// is null. + internal ErrorResponse(ResponseError error) + { + Argument.AssertNotNull(error, nameof(error)); + + Error = error; + } + + /// Initializes a new instance of . + /// The error object. + /// Keeps track of any properties unknown to the library. + internal ErrorResponse(ResponseError error, IDictionary serializedAdditionalRawData) + { + Error = error; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ErrorResponse() + { + } + + /// The error object. + public ResponseError Error { get; } + } +} diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/GlobalAssetType.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/GlobalAssetType.cs new file mode 100644 index 000000000000..393e48655fda --- /dev/null +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/GlobalAssetType.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Defender.Easm +{ + /// A list of global asset type. + public readonly partial struct GlobalAssetType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public GlobalAssetType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PageValue = "page"; + private const string ResourceValue = "resource"; + private const string MailServerValue = "mailServer"; + private const string NameServerValue = "nameServer"; + private const string HostValue = "host"; + private const string DomainValue = "domain"; + private const string IpAddressValue = "ipAddress"; + private const string IpBlockValue = "ipBlock"; + private const string AsValue = "as"; + private const string ContactValue = "contact"; + private const string SslCertValue = "sslCert"; + + /// page. + public static GlobalAssetType Page { get; } = new GlobalAssetType(PageValue); + /// resource. + public static GlobalAssetType Resource { get; } = new GlobalAssetType(ResourceValue); + /// mail server. + public static GlobalAssetType MailServer { get; } = new GlobalAssetType(MailServerValue); + /// name server. + public static GlobalAssetType NameServer { get; } = new GlobalAssetType(NameServerValue); + /// host. + public static GlobalAssetType Host { get; } = new GlobalAssetType(HostValue); + /// domain. + public static GlobalAssetType Domain { get; } = new GlobalAssetType(DomainValue); + /// ip address. + public static GlobalAssetType IpAddress { get; } = new GlobalAssetType(IpAddressValue); + /// ip block. + public static GlobalAssetType IpBlock { get; } = new GlobalAssetType(IpBlockValue); + /// autonomous system number. + public static GlobalAssetType As { get; } = new GlobalAssetType(AsValue); + /// contact. + public static GlobalAssetType Contact { get; } = new GlobalAssetType(ContactValue); + /// ssl certificate. + public static GlobalAssetType SslCert { get; } = new GlobalAssetType(SslCertValue); + /// Determines if two values are the same. + public static bool operator ==(GlobalAssetType left, GlobalAssetType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(GlobalAssetType left, GlobalAssetType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator GlobalAssetType(string value) => new GlobalAssetType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is GlobalAssetType other && Equals(other); + /// + public bool Equals(GlobalAssetType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/GlobalInventoryState.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/GlobalInventoryState.cs new file mode 100644 index 000000000000..a2d0a6ba5063 --- /dev/null +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/GlobalInventoryState.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Defender.Easm +{ + /// A list of global inventory states. + public readonly partial struct GlobalInventoryState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public GlobalInventoryState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CandidateValue = "candidate"; + private const string CandidateInvestigateValue = "candidateInvestigate"; + private const string ConfirmedValue = "confirmed"; + private const string AssociatedValue = "associated"; + private const string AssociatedPartnerValue = "associatedPartner"; + private const string AssociatedThirdPartyValue = "associatedThirdParty"; + private const string ArchivedValue = "archived"; + private const string DismissedValue = "dismissed"; + private const string AutoconfirmedValue = "autoconfirmed"; + + /// candidate. + public static GlobalInventoryState Candidate { get; } = new GlobalInventoryState(CandidateValue); + /// candidate investigate. + public static GlobalInventoryState CandidateInvestigate { get; } = new GlobalInventoryState(CandidateInvestigateValue); + /// confirmed. + public static GlobalInventoryState Confirmed { get; } = new GlobalInventoryState(ConfirmedValue); + /// associated. + public static GlobalInventoryState Associated { get; } = new GlobalInventoryState(AssociatedValue); + /// associated partner. + public static GlobalInventoryState AssociatedPartner { get; } = new GlobalInventoryState(AssociatedPartnerValue); + /// associated third party. + public static GlobalInventoryState AssociatedThirdParty { get; } = new GlobalInventoryState(AssociatedThirdPartyValue); + /// archived. + public static GlobalInventoryState Archived { get; } = new GlobalInventoryState(ArchivedValue); + /// dismissed. + public static GlobalInventoryState Dismissed { get; } = new GlobalInventoryState(DismissedValue); + /// auto confirmed. + public static GlobalInventoryState Autoconfirmed { get; } = new GlobalInventoryState(AutoconfirmedValue); + /// Determines if two values are the same. + public static bool operator ==(GlobalInventoryState left, GlobalInventoryState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(GlobalInventoryState left, GlobalInventoryState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator GlobalInventoryState(string value) => new GlobalInventoryState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is GlobalInventoryState other && Equals(other); + /// + public bool Equals(GlobalInventoryState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/LogAnalyticsDataConnectionPayload.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/LogAnalyticsDataConnectionPayload.cs index 8548b2b8e98f..e1613dab0c06 100644 --- a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/LogAnalyticsDataConnectionPayload.cs +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/LogAnalyticsDataConnectionPayload.cs @@ -25,7 +25,7 @@ public LogAnalyticsDataConnectionPayload(LogAnalyticsDataConnectionProperties pr } /// Initializes a new instance of . - /// Discriminator property for DataConnectionPayload. + /// Discriminator property for DataConnectionData. /// The name of data connection. /// The type of data the data connection will transfer. /// The rate at which the data connection will receive updates. diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/ObservationPageResult.Serialization.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/ObservationPageResult.Serialization.cs new file mode 100644 index 000000000000..0b9c4d8082ff --- /dev/null +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/ObservationPageResult.Serialization.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Defender.Easm +{ + public partial class ObservationPageResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ObservationPageResult)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("totalElements"u8); + writer.WriteNumberValue(TotalElements); + writer.WritePropertyName("prioritySummary"u8); + writer.WriteStartObject(); + foreach (var item in PrioritySummary) + { + writer.WritePropertyName(item.Key); + writer.WriteNumberValue(item.Value); + } + writer.WriteEndObject(); + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + ObservationPageResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ObservationPageResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeObservationPageResult(document.RootElement, options); + } + + internal static ObservationPageResult DeserializeObservationPageResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + long totalElements = default; + IReadOnlyDictionary prioritySummary = default; + IReadOnlyList value = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("totalElements"u8)) + { + totalElements = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("prioritySummary"u8)) + { + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetInt32()); + } + prioritySummary = dictionary; + continue; + } + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ObservationResult.DeserializeObservationResult(item, options)); + } + value = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ObservationPageResult(totalElements, prioritySummary, value, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ObservationPageResult)} does not support writing '{options.Format}' format."); + } + } + + ObservationPageResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeObservationPageResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ObservationPageResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ObservationPageResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeObservationPageResult(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/ObservationPageResult.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/ObservationPageResult.cs new file mode 100644 index 000000000000..78d316e3b890 --- /dev/null +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/ObservationPageResult.cs @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.Analytics.Defender.Easm +{ + /// The page result response for the observation. + public partial class ObservationPageResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The total number of elements. + /// The summary of observation counts by priority. + /// The list of observation results. + /// or is null. + internal ObservationPageResult(long totalElements, IReadOnlyDictionary prioritySummary, IEnumerable value) + { + Argument.AssertNotNull(prioritySummary, nameof(prioritySummary)); + Argument.AssertNotNull(value, nameof(value)); + + TotalElements = totalElements; + PrioritySummary = prioritySummary; + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The total number of elements. + /// The summary of observation counts by priority. + /// The list of observation results. + /// Keeps track of any properties unknown to the library. + internal ObservationPageResult(long totalElements, IReadOnlyDictionary prioritySummary, IReadOnlyList value, IDictionary serializedAdditionalRawData) + { + TotalElements = totalElements; + PrioritySummary = prioritySummary; + Value = value; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ObservationPageResult() + { + } + + /// The total number of elements. + public long TotalElements { get; } + /// The summary of observation counts by priority. + public IReadOnlyDictionary PrioritySummary { get; } + /// The list of observation results. + public IReadOnlyList Value { get; } + } +} diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/ObservationPriority.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/ObservationPriority.cs new file mode 100644 index 000000000000..bbed226dd2fe --- /dev/null +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/ObservationPriority.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Defender.Easm +{ + /// A list of observation priorities. + public readonly partial struct ObservationPriority : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ObservationPriority(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string HighValue = "high"; + private const string MediumValue = "medium"; + private const string LowValue = "low"; + private const string NoneValue = "none"; + + /// high. + public static ObservationPriority High { get; } = new ObservationPriority(HighValue); + /// medium. + public static ObservationPriority Medium { get; } = new ObservationPriority(MediumValue); + /// low. + public static ObservationPriority Low { get; } = new ObservationPriority(LowValue); + /// none. + public static ObservationPriority None { get; } = new ObservationPriority(NoneValue); + /// Determines if two values are the same. + public static bool operator ==(ObservationPriority left, ObservationPriority right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ObservationPriority left, ObservationPriority right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ObservationPriority(string value) => new ObservationPriority(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ObservationPriority other && Equals(other); + /// + public bool Equals(ObservationPriority other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/ObservationResult.Serialization.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/ObservationResult.Serialization.cs new file mode 100644 index 000000000000..914aee4ea3b8 --- /dev/null +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/ObservationResult.Serialization.cs @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Defender.Easm +{ + public partial class ObservationResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ObservationResult)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("types"u8); + writer.WriteStartArray(); + foreach (var item in Types) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); + writer.WritePropertyName("priority"u8); + writer.WriteStringValue(Priority.ToString()); + writer.WritePropertyName("cvssScoreV2"u8); + writer.WriteNumberValue(CvssScoreV2); + writer.WritePropertyName("cvssScoreV3"u8); + writer.WriteNumberValue(CvssScoreV3); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + ObservationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ObservationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeObservationResult(document.RootElement, options); + } + + internal static ObservationResult DeserializeObservationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + IReadOnlyList types = default; + ObservationPriority priority = default; + double cvssScoreV2 = default; + double cvssScoreV3 = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("types"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(new ObservationType(item.GetString())); + } + types = array; + continue; + } + if (property.NameEquals("priority"u8)) + { + priority = new ObservationPriority(property.Value.GetString()); + continue; + } + if (property.NameEquals("cvssScoreV2"u8)) + { + cvssScoreV2 = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("cvssScoreV3"u8)) + { + cvssScoreV3 = property.Value.GetDouble(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ObservationResult( + name, + types, + priority, + cvssScoreV2, + cvssScoreV3, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ObservationResult)} does not support writing '{options.Format}' format."); + } + } + + ObservationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeObservationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ObservationResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ObservationResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeObservationResult(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/ObservationResult.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/ObservationResult.cs new file mode 100644 index 000000000000..657dc7da0434 --- /dev/null +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/ObservationResult.cs @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.Analytics.Defender.Easm +{ + /// The result response for the observation. + public partial class ObservationResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The name of the observation. + /// The list of applicable types. + /// The priority of the observation. + /// The CVSS v2 score. + /// The CVSS v3 score. + /// or is null. + internal ObservationResult(string name, IEnumerable types, ObservationPriority priority, double cvssScoreV2, double cvssScoreV3) + { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(types, nameof(types)); + + Name = name; + Types = types.ToList(); + Priority = priority; + CvssScoreV2 = cvssScoreV2; + CvssScoreV3 = cvssScoreV3; + } + + /// Initializes a new instance of . + /// The name of the observation. + /// The list of applicable types. + /// The priority of the observation. + /// The CVSS v2 score. + /// The CVSS v3 score. + /// Keeps track of any properties unknown to the library. + internal ObservationResult(string name, IReadOnlyList types, ObservationPriority priority, double cvssScoreV2, double cvssScoreV3, IDictionary serializedAdditionalRawData) + { + Name = name; + Types = types; + Priority = priority; + CvssScoreV2 = cvssScoreV2; + CvssScoreV3 = cvssScoreV3; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ObservationResult() + { + } + + /// The name of the observation. + public string Name { get; } + /// The list of applicable types. + public IReadOnlyList Types { get; } + /// The priority of the observation. + public ObservationPriority Priority { get; } + /// The CVSS v2 score. + public double CvssScoreV2 { get; } + /// The CVSS v3 score. + public double CvssScoreV3 { get; } + } +} diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/ObservationType.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/ObservationType.cs new file mode 100644 index 000000000000..5de809a023cc --- /dev/null +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/ObservationType.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.Analytics.Defender.Easm +{ + /// A list of observation types. + public readonly partial struct ObservationType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ObservationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CveValue = "cve"; + private const string InsightValue = "insight"; + + /// common vulnerabilities and exposures. + public static ObservationType Cve { get; } = new ObservationType(CveValue); + /// insight. + public static ObservationType Insight { get; } = new ObservationType(InsightValue); + /// Determines if two values are the same. + public static bool operator ==(ObservationType left, ObservationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ObservationType left, ObservationType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ObservationType(string value) => new ObservationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ObservationType other && Equals(other); + /// + public bool Equals(ObservationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/ReportAssetSnapshotExportPayload.Serialization.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/ReportAssetSnapshotExportPayload.Serialization.cs new file mode 100644 index 000000000000..cc2db6d470f7 --- /dev/null +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/ReportAssetSnapshotExportPayload.Serialization.cs @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Analytics.Defender.Easm +{ + public partial class ReportAssetSnapshotExportPayload : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ReportAssetSnapshotExportPayload)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Metric)) + { + writer.WritePropertyName("metric"u8); + writer.WriteStringValue(Metric); + } + if (Optional.IsDefined(FileName)) + { + writer.WritePropertyName("fileName"u8); + writer.WriteStringValue(FileName); + } + if (Optional.IsCollectionDefined(Columns)) + { + writer.WritePropertyName("columns"u8); + writer.WriteStartArray(); + foreach (var item in Columns) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + ReportAssetSnapshotExportPayload IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ReportAssetSnapshotExportPayload)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeReportAssetSnapshotExportPayload(document.RootElement, options); + } + + internal static ReportAssetSnapshotExportPayload DeserializeReportAssetSnapshotExportPayload(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string metric = default; + string fileName = default; + IList columns = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("metric"u8)) + { + metric = property.Value.GetString(); + continue; + } + if (property.NameEquals("fileName"u8)) + { + fileName = property.Value.GetString(); + continue; + } + if (property.NameEquals("columns"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + columns = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ReportAssetSnapshotExportPayload(metric, fileName, columns ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ReportAssetSnapshotExportPayload)} does not support writing '{options.Format}' format."); + } + } + + ReportAssetSnapshotExportPayload IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeReportAssetSnapshotExportPayload(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ReportAssetSnapshotExportPayload)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ReportAssetSnapshotExportPayload FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeReportAssetSnapshotExportPayload(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/ReportAssetSnapshotExportPayload.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/ReportAssetSnapshotExportPayload.cs new file mode 100644 index 000000000000..afe9bdf23965 --- /dev/null +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/ReportAssetSnapshotExportPayload.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.Defender.Easm +{ + /// A request body used for an asset report snapshot export. + public partial class ReportAssetSnapshotExportPayload + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ReportAssetSnapshotExportPayload() + { + Columns = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The metric to retrieve a snapshot for. + /// The filename of the exported file. + /// The columns to include in the export. + /// Keeps track of any properties unknown to the library. + internal ReportAssetSnapshotExportPayload(string metric, string fileName, IList columns, IDictionary serializedAdditionalRawData) + { + Metric = metric; + FileName = fileName; + Columns = columns; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The metric to retrieve a snapshot for. + public string Metric { get; set; } + /// The filename of the exported file. + public string FileName { get; set; } + /// The columns to include in the export. + public IList Columns { get; } + } +} diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/UnknownDataConnectionPayload.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/UnknownDataConnectionPayload.cs index e675efb20269..a0229b61062a 100644 --- a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/UnknownDataConnectionPayload.cs +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/UnknownDataConnectionPayload.cs @@ -14,7 +14,7 @@ namespace Azure.Analytics.Defender.Easm internal partial class UnknownDataConnectionPayload : DataConnectionPayload { /// Initializes a new instance of . - /// Discriminator property for DataConnectionPayload. + /// Discriminator property for DataConnectionData. /// The name of data connection. /// The type of data the data connection will transfer. /// The rate at which the data connection will receive updates. diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/tests/Generated/Samples/Samples_EasmClient.cs b/sdk/easm/Azure.Analytics.Defender.Easm/tests/Generated/Samples/Samples_EasmClient.cs index b2dafd89b006..7064fbc18bdd 100644 --- a/sdk/easm/Azure.Analytics.Defender.Easm/tests/Generated/Samples/Samples_EasmClient.cs +++ b/sdk/easm/Azure.Analytics.Defender.Easm/tests/Generated/Samples/Samples_EasmClient.cs @@ -6,6 +6,7 @@ #nullable disable using System; +using System.Collections.Generic; using System.Text.Json; using System.Threading.Tasks; using Azure.Core; @@ -312,7 +313,7 @@ public async Task Example_AssetResource_GetAssetResource_AllParameters_Convenien [Test] [Ignore("Only validating compilation of examples")] - public void Example_EasmClient_ValidateDataConnection_ShortVersion() + public void Example_EasmClient_GetAssetsExport_ShortVersion() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -320,18 +321,21 @@ public void Example_EasmClient_ValidateDataConnection_ShortVersion() using RequestContent content = RequestContent.Create(new { - kind = "logAnalytics", - properties = new object(), + fileName = "", + columns = new object[] + { +"" + }, }); - Response response = client.ValidateDataConnection(content); + Response response = client.GetAssetsExport(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EasmClient_ValidateDataConnection_ShortVersion_Async() + public async Task Example_EasmClient_GetAssetsExport_ShortVersion_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -339,42 +343,45 @@ public async Task Example_EasmClient_ValidateDataConnection_ShortVersion_Async() using RequestContent content = RequestContent.Create(new { - kind = "logAnalytics", - properties = new object(), + fileName = "", + columns = new object[] + { +"" + }, }); - Response response = await client.ValidateDataConnectionAsync(content); + Response response = await client.GetAssetsExportAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_EasmClient_ValidateDataConnection_ShortVersion_Convenience() + public void Example_EasmClient_GetAssetsExport_ShortVersion_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - DataConnectionPayload body = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties()); - Response response = client.ValidateDataConnection(body); + AssetsExportRequest body = new AssetsExportRequest("", new string[] { "" }); + Response response = client.GetAssetsExport(body); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EasmClient_ValidateDataConnection_ShortVersion_Convenience_Async() + public async Task Example_EasmClient_GetAssetsExport_ShortVersion_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - DataConnectionPayload body = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties()); - Response response = await client.ValidateDataConnectionAsync(body); + AssetsExportRequest body = new AssetsExportRequest("", new string[] { "" }); + Response response = await client.GetAssetsExportAsync(body); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_EasmClient_ValidateDataConnection_AllParameters() + public void Example_EasmClient_GetAssetsExport_AllParameters() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -382,30 +389,28 @@ public void Example_EasmClient_ValidateDataConnection_AllParameters() using RequestContent content = RequestContent.Create(new { - kind = "logAnalytics", - properties = new - { - apiKey = "", - workspaceId = "", - }, - name = "", - content = "assets", - frequency = "daily", - frequencyOffset = 1234, + fileName = "", + columns = new object[] + { +"" + }, }); - Response response = client.ValidateDataConnection(content); + Response response = client.GetAssetsExport(content, filter: "", orderby: ""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("startedAt").ToString()); + Console.WriteLine(result.GetProperty("completedAt").ToString()); + Console.WriteLine(result.GetProperty("lastPolledAt").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("phase").ToString()); + Console.WriteLine(result.GetProperty("reason").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EasmClient_ValidateDataConnection_AllParameters_Async() + public async Task Example_EasmClient_GetAssetsExport_AllParameters_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -413,262 +418,256 @@ public async Task Example_EasmClient_ValidateDataConnection_AllParameters_Async( using RequestContent content = RequestContent.Create(new { - kind = "logAnalytics", - properties = new - { - apiKey = "", - workspaceId = "", - }, - name = "", - content = "assets", - frequency = "daily", - frequencyOffset = 1234, + fileName = "", + columns = new object[] + { +"" + }, }); - Response response = await client.ValidateDataConnectionAsync(content); + Response response = await client.GetAssetsExportAsync(content, filter: "", orderby: ""); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("startedAt").ToString()); + Console.WriteLine(result.GetProperty("completedAt").ToString()); + Console.WriteLine(result.GetProperty("lastPolledAt").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("phase").ToString()); + Console.WriteLine(result.GetProperty("reason").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_EasmClient_ValidateDataConnection_AllParameters_Convenience() + public void Example_EasmClient_GetAssetsExport_AllParameters_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - DataConnectionPayload body = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties - { - ApiKey = "", - WorkspaceId = "", - }) - { - Name = "", - Content = DataConnectionContent.Assets, - Frequency = DataConnectionFrequency.Daily, - FrequencyOffset = 1234, - }; - Response response = client.ValidateDataConnection(body); + AssetsExportRequest body = new AssetsExportRequest("", new string[] { "" }); + Response response = client.GetAssetsExport(body, filter: "", orderby: ""); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EasmClient_ValidateDataConnection_AllParameters_Convenience_Async() + public async Task Example_EasmClient_GetAssetsExport_AllParameters_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - DataConnectionPayload body = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties - { - ApiKey = "", - WorkspaceId = "", - }) - { - Name = "", - Content = DataConnectionContent.Assets, - Frequency = DataConnectionFrequency.Daily, - FrequencyOffset = 1234, - }; - Response response = await client.ValidateDataConnectionAsync(body); + AssetsExportRequest body = new AssetsExportRequest("", new string[] { "" }); + Response response = await client.GetAssetsExportAsync(body, filter: "", orderby: ""); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DataConnection_GetDataConnection_ShortVersion() + public void Example_EasmClient_GetObservations_ShortVersion() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = client.GetDataConnection("", null); + Response response = client.GetObservations("", null, null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("totalElements").ToString()); + Console.WriteLine(result.GetProperty("prioritySummary").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("types")[0].ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("priority").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("cvssScoreV2").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("cvssScoreV3").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DataConnection_GetDataConnection_ShortVersion_Async() + public async Task Example_EasmClient_GetObservations_ShortVersion_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = await client.GetDataConnectionAsync("", null); + Response response = await client.GetObservationsAsync("", null, null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("totalElements").ToString()); + Console.WriteLine(result.GetProperty("prioritySummary").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("types")[0].ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("priority").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("cvssScoreV2").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("cvssScoreV3").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DataConnection_GetDataConnection_ShortVersion_Convenience() + public void Example_EasmClient_GetObservations_ShortVersion_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = client.GetDataConnection(""); + Response response = client.GetObservations(""); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DataConnection_GetDataConnection_ShortVersion_Convenience_Async() + public async Task Example_EasmClient_GetObservations_ShortVersion_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = await client.GetDataConnectionAsync(""); + Response response = await client.GetObservationsAsync(""); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DataConnection_GetDataConnection_AllParameters() + public void Example_EasmClient_GetObservations_AllParameters() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = client.GetDataConnection("", null); + Response response = client.GetObservations("", "", "", 1234, 1234, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("createdDate").ToString()); - Console.WriteLine(result.GetProperty("frequency").ToString()); - Console.WriteLine(result.GetProperty("frequencyOffset").ToString()); - Console.WriteLine(result.GetProperty("updatedDate").ToString()); - Console.WriteLine(result.GetProperty("userUpdatedAt").ToString()); - Console.WriteLine(result.GetProperty("active").ToString()); - Console.WriteLine(result.GetProperty("inactiveMessage").ToString()); + Console.WriteLine(result.GetProperty("totalElements").ToString()); + Console.WriteLine(result.GetProperty("prioritySummary").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("types")[0].ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("priority").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("cvssScoreV2").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("cvssScoreV3").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DataConnection_GetDataConnection_AllParameters_Async() + public async Task Example_EasmClient_GetObservations_AllParameters_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = await client.GetDataConnectionAsync("", null); + Response response = await client.GetObservationsAsync("", "", "", 1234, 1234, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("createdDate").ToString()); - Console.WriteLine(result.GetProperty("frequency").ToString()); - Console.WriteLine(result.GetProperty("frequencyOffset").ToString()); - Console.WriteLine(result.GetProperty("updatedDate").ToString()); - Console.WriteLine(result.GetProperty("userUpdatedAt").ToString()); - Console.WriteLine(result.GetProperty("active").ToString()); - Console.WriteLine(result.GetProperty("inactiveMessage").ToString()); + Console.WriteLine(result.GetProperty("totalElements").ToString()); + Console.WriteLine(result.GetProperty("prioritySummary").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("types")[0].ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("priority").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("cvssScoreV2").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("cvssScoreV3").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DataConnection_GetDataConnection_AllParameters_Convenience() + public void Example_EasmClient_GetObservations_AllParameters_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = client.GetDataConnection(""); + Response response = client.GetObservations("", filter: "", orderby: "", skip: 1234, maxpagesize: 1234); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DataConnection_GetDataConnection_AllParameters_Convenience_Async() + public async Task Example_EasmClient_GetObservations_AllParameters_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = await client.GetDataConnectionAsync(""); + Response response = await client.GetObservationsAsync("", filter: "", orderby: "", skip: 1234, maxpagesize: 1234); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DataConnection_CreateOrReplaceDataConnection_ShortVersion() + public void Example_EasmClient_GetDeltaSummary_ShortVersion() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - using RequestContent content = RequestContent.Create(new - { - kind = "logAnalytics", - properties = new object(), - }); - Response response = client.CreateOrReplaceDataConnection("", content); + using RequestContent content = RequestContent.Create(new object()); + Response response = client.GetDeltaSummary(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("summary").GetProperty("range").ToString()); + Console.WriteLine(result.GetProperty("summary").GetProperty("removed").ToString()); + Console.WriteLine(result.GetProperty("summary").GetProperty("added").ToString()); + Console.WriteLine(result.GetProperty("summary").GetProperty("difference").ToString()); + Console.WriteLine(result.GetProperty("summary").GetProperty("kindSummaries")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("summary").GetProperty("kindSummaries")[0].GetProperty("removed").ToString()); + Console.WriteLine(result.GetProperty("summary").GetProperty("kindSummaries")[0].GetProperty("added").ToString()); + Console.WriteLine(result.GetProperty("summary").GetProperty("kindSummaries")[0].GetProperty("difference").ToString()); + Console.WriteLine(result.GetProperty("daily")[0].GetProperty("date").ToString()); + Console.WriteLine(result.GetProperty("daily")[0].GetProperty("deltas")[0].GetProperty("count").ToString()); + Console.WriteLine(result.GetProperty("daily")[0].GetProperty("deltas")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("daily")[0].GetProperty("deltas")[0].GetProperty("removed").ToString()); + Console.WriteLine(result.GetProperty("daily")[0].GetProperty("deltas")[0].GetProperty("added").ToString()); + Console.WriteLine(result.GetProperty("daily")[0].GetProperty("deltas")[0].GetProperty("difference").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DataConnection_CreateOrReplaceDataConnection_ShortVersion_Async() + public async Task Example_EasmClient_GetDeltaSummary_ShortVersion_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - using RequestContent content = RequestContent.Create(new - { - kind = "logAnalytics", - properties = new object(), - }); - Response response = await client.CreateOrReplaceDataConnectionAsync("", content); + using RequestContent content = RequestContent.Create(new object()); + Response response = await client.GetDeltaSummaryAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("summary").GetProperty("range").ToString()); + Console.WriteLine(result.GetProperty("summary").GetProperty("removed").ToString()); + Console.WriteLine(result.GetProperty("summary").GetProperty("added").ToString()); + Console.WriteLine(result.GetProperty("summary").GetProperty("difference").ToString()); + Console.WriteLine(result.GetProperty("summary").GetProperty("kindSummaries")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("summary").GetProperty("kindSummaries")[0].GetProperty("removed").ToString()); + Console.WriteLine(result.GetProperty("summary").GetProperty("kindSummaries")[0].GetProperty("added").ToString()); + Console.WriteLine(result.GetProperty("summary").GetProperty("kindSummaries")[0].GetProperty("difference").ToString()); + Console.WriteLine(result.GetProperty("daily")[0].GetProperty("date").ToString()); + Console.WriteLine(result.GetProperty("daily")[0].GetProperty("deltas")[0].GetProperty("count").ToString()); + Console.WriteLine(result.GetProperty("daily")[0].GetProperty("deltas")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("daily")[0].GetProperty("deltas")[0].GetProperty("removed").ToString()); + Console.WriteLine(result.GetProperty("daily")[0].GetProperty("deltas")[0].GetProperty("added").ToString()); + Console.WriteLine(result.GetProperty("daily")[0].GetProperty("deltas")[0].GetProperty("difference").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DataConnection_CreateOrReplaceDataConnection_ShortVersion_Convenience() + public void Example_EasmClient_GetDeltaSummary_ShortVersion_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - DataConnectionPayload body = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties()); - Response response = client.CreateOrReplaceDataConnection("", body); + DeltaSummaryRequest body = new DeltaSummaryRequest(); + Response response = client.GetDeltaSummary(body); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DataConnection_CreateOrReplaceDataConnection_ShortVersion_Convenience_Async() + public async Task Example_EasmClient_GetDeltaSummary_ShortVersion_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - DataConnectionPayload body = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties()); - Response response = await client.CreateOrReplaceDataConnectionAsync("", body); + DeltaSummaryRequest body = new DeltaSummaryRequest(); + Response response = await client.GetDeltaSummaryAsync(body); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DataConnection_CreateOrReplaceDataConnection_AllParameters() + public void Example_EasmClient_GetDeltaSummary_AllParameters() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -676,37 +675,31 @@ public void Example_DataConnection_CreateOrReplaceDataConnection_AllParameters() using RequestContent content = RequestContent.Create(new { - kind = "logAnalytics", - properties = new - { - apiKey = "", - workspaceId = "", - }, - name = "", - content = "assets", - frequency = "daily", - frequencyOffset = 1234, + priorDays = 1234, + date = "", }); - Response response = client.CreateOrReplaceDataConnection("", content); + Response response = client.GetDeltaSummary(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("createdDate").ToString()); - Console.WriteLine(result.GetProperty("frequency").ToString()); - Console.WriteLine(result.GetProperty("frequencyOffset").ToString()); - Console.WriteLine(result.GetProperty("updatedDate").ToString()); - Console.WriteLine(result.GetProperty("userUpdatedAt").ToString()); - Console.WriteLine(result.GetProperty("active").ToString()); - Console.WriteLine(result.GetProperty("inactiveMessage").ToString()); + Console.WriteLine(result.GetProperty("summary").GetProperty("range").ToString()); + Console.WriteLine(result.GetProperty("summary").GetProperty("removed").ToString()); + Console.WriteLine(result.GetProperty("summary").GetProperty("added").ToString()); + Console.WriteLine(result.GetProperty("summary").GetProperty("difference").ToString()); + Console.WriteLine(result.GetProperty("summary").GetProperty("kindSummaries")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("summary").GetProperty("kindSummaries")[0].GetProperty("removed").ToString()); + Console.WriteLine(result.GetProperty("summary").GetProperty("kindSummaries")[0].GetProperty("added").ToString()); + Console.WriteLine(result.GetProperty("summary").GetProperty("kindSummaries")[0].GetProperty("difference").ToString()); + Console.WriteLine(result.GetProperty("daily")[0].GetProperty("date").ToString()); + Console.WriteLine(result.GetProperty("daily")[0].GetProperty("deltas")[0].GetProperty("count").ToString()); + Console.WriteLine(result.GetProperty("daily")[0].GetProperty("deltas")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("daily")[0].GetProperty("deltas")[0].GetProperty("removed").ToString()); + Console.WriteLine(result.GetProperty("daily")[0].GetProperty("deltas")[0].GetProperty("added").ToString()); + Console.WriteLine(result.GetProperty("daily")[0].GetProperty("deltas")[0].GetProperty("difference").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DataConnection_CreateOrReplaceDataConnection_AllParameters_Async() + public async Task Example_EasmClient_GetDeltaSummary_AllParameters_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -714,155 +707,93 @@ public async Task Example_DataConnection_CreateOrReplaceDataConnection_AllParame using RequestContent content = RequestContent.Create(new { - kind = "logAnalytics", - properties = new - { - apiKey = "", - workspaceId = "", - }, - name = "", - content = "assets", - frequency = "daily", - frequencyOffset = 1234, + priorDays = 1234, + date = "", }); - Response response = await client.CreateOrReplaceDataConnectionAsync("", content); + Response response = await client.GetDeltaSummaryAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("content").ToString()); - Console.WriteLine(result.GetProperty("createdDate").ToString()); - Console.WriteLine(result.GetProperty("frequency").ToString()); - Console.WriteLine(result.GetProperty("frequencyOffset").ToString()); - Console.WriteLine(result.GetProperty("updatedDate").ToString()); - Console.WriteLine(result.GetProperty("userUpdatedAt").ToString()); - Console.WriteLine(result.GetProperty("active").ToString()); - Console.WriteLine(result.GetProperty("inactiveMessage").ToString()); + Console.WriteLine(result.GetProperty("summary").GetProperty("range").ToString()); + Console.WriteLine(result.GetProperty("summary").GetProperty("removed").ToString()); + Console.WriteLine(result.GetProperty("summary").GetProperty("added").ToString()); + Console.WriteLine(result.GetProperty("summary").GetProperty("difference").ToString()); + Console.WriteLine(result.GetProperty("summary").GetProperty("kindSummaries")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("summary").GetProperty("kindSummaries")[0].GetProperty("removed").ToString()); + Console.WriteLine(result.GetProperty("summary").GetProperty("kindSummaries")[0].GetProperty("added").ToString()); + Console.WriteLine(result.GetProperty("summary").GetProperty("kindSummaries")[0].GetProperty("difference").ToString()); + Console.WriteLine(result.GetProperty("daily")[0].GetProperty("date").ToString()); + Console.WriteLine(result.GetProperty("daily")[0].GetProperty("deltas")[0].GetProperty("count").ToString()); + Console.WriteLine(result.GetProperty("daily")[0].GetProperty("deltas")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("daily")[0].GetProperty("deltas")[0].GetProperty("removed").ToString()); + Console.WriteLine(result.GetProperty("daily")[0].GetProperty("deltas")[0].GetProperty("added").ToString()); + Console.WriteLine(result.GetProperty("daily")[0].GetProperty("deltas")[0].GetProperty("difference").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DataConnection_CreateOrReplaceDataConnection_AllParameters_Convenience() + public void Example_EasmClient_GetDeltaSummary_AllParameters_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - DataConnectionPayload body = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties - { - ApiKey = "", - WorkspaceId = "", - }) + DeltaSummaryRequest body = new DeltaSummaryRequest { - Name = "", - Content = DataConnectionContent.Assets, - Frequency = DataConnectionFrequency.Daily, - FrequencyOffset = 1234, + PriorDays = 1234, + Date = "", }; - Response response = client.CreateOrReplaceDataConnection("", body); + Response response = client.GetDeltaSummary(body); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DataConnection_CreateOrReplaceDataConnection_AllParameters_Convenience_Async() + public async Task Example_EasmClient_GetDeltaSummary_AllParameters_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - DataConnectionPayload body = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties - { - ApiKey = "", - WorkspaceId = "", - }) + DeltaSummaryRequest body = new DeltaSummaryRequest { - Name = "", - Content = DataConnectionContent.Assets, - Frequency = DataConnectionFrequency.Daily, - FrequencyOffset = 1234, + PriorDays = 1234, + Date = "", }; - Response response = await client.CreateOrReplaceDataConnectionAsync("", body); + Response response = await client.GetDeltaSummaryAsync(body); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DataConnection_DeleteDataConnection_ShortVersion() + public void Example_EasmClient_ValidateDataConnection_ShortVersion() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = client.DeleteDataConnection(""); + using RequestContent content = RequestContent.Create(new + { + kind = "logAnalytics", + properties = new object(), + }); + Response response = client.ValidateDataConnection(content); - Console.WriteLine(response.Status); + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DataConnection_DeleteDataConnection_ShortVersion_Async() + public async Task Example_EasmClient_ValidateDataConnection_ShortVersion_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = await client.DeleteDataConnectionAsync(""); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DataConnection_DeleteDataConnection_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - Response response = client.DeleteDataConnection(""); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DataConnection_DeleteDataConnection_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - Response response = await client.DeleteDataConnectionAsync(""); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_EasmClient_ValidateDiscoveryGroup_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new object()); - Response response = client.ValidateDiscoveryGroup(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_EasmClient_ValidateDiscoveryGroup_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new object()); - Response response = await client.ValidateDiscoveryGroupAsync(content); + using RequestContent content = RequestContent.Create(new + { + kind = "logAnalytics", + properties = new object(), + }); + Response response = await client.ValidateDataConnectionAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -870,31 +801,31 @@ public async Task Example_EasmClient_ValidateDiscoveryGroup_ShortVersion_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_EasmClient_ValidateDiscoveryGroup_ShortVersion_Convenience() + public void Example_EasmClient_ValidateDataConnection_ShortVersion_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - DiscoveryGroupPayload body = new DiscoveryGroupPayload(); - Response response = client.ValidateDiscoveryGroup(body); + DataConnectionPayload body = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties()); + Response response = client.ValidateDataConnection(body); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EasmClient_ValidateDiscoveryGroup_ShortVersion_Convenience_Async() + public async Task Example_EasmClient_ValidateDataConnection_ShortVersion_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - DiscoveryGroupPayload body = new DiscoveryGroupPayload(); - Response response = await client.ValidateDiscoveryGroupAsync(body); + DataConnectionPayload body = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties()); + Response response = await client.ValidateDataConnectionAsync(body); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_EasmClient_ValidateDiscoveryGroup_AllParameters() + public void Example_EasmClient_ValidateDataConnection_AllParameters() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -902,29 +833,18 @@ public void Example_EasmClient_ValidateDiscoveryGroup_AllParameters() using RequestContent content = RequestContent.Create(new { + kind = "logAnalytics", + properties = new + { + apiKey = "", + workspaceId = "", + }, name = "", - description = "", - tier = "", - frequencyMilliseconds = 1234L, - seeds = new object[] - { -new -{ -kind = "as", -name = "", -} - }, - names = new object[] - { -"" - }, - excludes = new object[] - { -null - }, - templateId = "", + content = "assets", + frequency = "daily", + frequencyOffset = 1234, }); - Response response = client.ValidateDiscoveryGroup(content); + Response response = client.ValidateDataConnection(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); @@ -936,7 +856,7 @@ public void Example_EasmClient_ValidateDiscoveryGroup_AllParameters() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EasmClient_ValidateDiscoveryGroup_AllParameters_Async() + public async Task Example_EasmClient_ValidateDataConnection_AllParameters_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -944,29 +864,18 @@ public async Task Example_EasmClient_ValidateDiscoveryGroup_AllParameters_Async( using RequestContent content = RequestContent.Create(new { + kind = "logAnalytics", + properties = new + { + apiKey = "", + workspaceId = "", + }, name = "", - description = "", - tier = "", - frequencyMilliseconds = 1234L, - seeds = new object[] - { -new -{ -kind = "as", -name = "", -} - }, - names = new object[] - { -"" - }, - excludes = new object[] - { -null - }, - templateId = "", + content = "assets", + frequency = "daily", + frequencyOffset = 1234, }); - Response response = await client.ValidateDiscoveryGroupAsync(content); + Response response = await client.ValidateDataConnectionAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); @@ -978,259 +887,239 @@ public async Task Example_EasmClient_ValidateDiscoveryGroup_AllParameters_Async( [Test] [Ignore("Only validating compilation of examples")] - public void Example_EasmClient_ValidateDiscoveryGroup_AllParameters_Convenience() + public void Example_EasmClient_ValidateDataConnection_AllParameters_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - DiscoveryGroupPayload body = new DiscoveryGroupPayload + DataConnectionPayload body = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties + { + ApiKey = "", + WorkspaceId = "", + }) { Name = "", - Description = "", - Tier = "", - FrequencyMilliseconds = 1234L, - Seeds = {new DiscoverySource -{ -Kind = DiscoverySourceKind.As, -Name = "", -}}, - Names = { "" }, - Excludes = { default }, - TemplateId = "", + Content = DataConnectionContent.Assets, + Frequency = DataConnectionFrequency.Daily, + FrequencyOffset = 1234, }; - Response response = client.ValidateDiscoveryGroup(body); + Response response = client.ValidateDataConnection(body); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EasmClient_ValidateDiscoveryGroup_AllParameters_Convenience_Async() + public async Task Example_EasmClient_ValidateDataConnection_AllParameters_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - DiscoveryGroupPayload body = new DiscoveryGroupPayload + DataConnectionPayload body = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties + { + ApiKey = "", + WorkspaceId = "", + }) { Name = "", - Description = "", - Tier = "", - FrequencyMilliseconds = 1234L, - Seeds = {new DiscoverySource -{ -Kind = DiscoverySourceKind.As, -Name = "", -}}, - Names = { "" }, - Excludes = { default }, - TemplateId = "", + Content = DataConnectionContent.Assets, + Frequency = DataConnectionFrequency.Daily, + FrequencyOffset = 1234, }; - Response response = await client.ValidateDiscoveryGroupAsync(body); + Response response = await client.ValidateDataConnectionAsync(body); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DiscoGroup_GetDiscoveryGroup_ShortVersion() + public void Example_DataConnection_GetDataConnection_ShortVersion() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = client.GetDiscoveryGroup("", null); + Response response = client.GetDataConnection("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DiscoGroup_GetDiscoveryGroup_ShortVersion_Async() + public async Task Example_DataConnection_GetDataConnection_ShortVersion_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = await client.GetDiscoveryGroupAsync("", null); + Response response = await client.GetDataConnectionAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DiscoGroup_GetDiscoveryGroup_ShortVersion_Convenience() + public void Example_DataConnection_GetDataConnection_ShortVersion_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = client.GetDiscoveryGroup(""); + Response response = client.GetDataConnection(""); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DiscoGroup_GetDiscoveryGroup_ShortVersion_Convenience_Async() + public async Task Example_DataConnection_GetDataConnection_ShortVersion_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = await client.GetDiscoveryGroupAsync(""); + Response response = await client.GetDataConnectionAsync(""); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DiscoGroup_GetDiscoveryGroup_AllParameters() + public void Example_DataConnection_GetDataConnection_AllParameters() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = client.GetDiscoveryGroup("", null); + Response response = client.GetDataConnection("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("tier").ToString()); - Console.WriteLine(result.GetProperty("frequencyMilliseconds").ToString()); - Console.WriteLine(result.GetProperty("seeds")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("seeds")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("names")[0].ToString()); - Console.WriteLine(result.GetProperty("excludes")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("excludes")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("submittedDate").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("startedDate").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("completedDate").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("tier").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("totalAssetsFoundCount").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("seeds")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("seeds")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("excludes")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("excludes")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("names")[0].ToString()); + Console.WriteLine(result.GetProperty("content").ToString()); Console.WriteLine(result.GetProperty("createdDate").ToString()); - Console.WriteLine(result.GetProperty("templateId").ToString()); + Console.WriteLine(result.GetProperty("frequency").ToString()); + Console.WriteLine(result.GetProperty("frequencyOffset").ToString()); + Console.WriteLine(result.GetProperty("updatedDate").ToString()); + Console.WriteLine(result.GetProperty("userUpdatedAt").ToString()); + Console.WriteLine(result.GetProperty("active").ToString()); + Console.WriteLine(result.GetProperty("inactiveMessage").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DiscoGroup_GetDiscoveryGroup_AllParameters_Async() + public async Task Example_DataConnection_GetDataConnection_AllParameters_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = await client.GetDiscoveryGroupAsync("", null); + Response response = await client.GetDataConnectionAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("tier").ToString()); - Console.WriteLine(result.GetProperty("frequencyMilliseconds").ToString()); - Console.WriteLine(result.GetProperty("seeds")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("seeds")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("names")[0].ToString()); - Console.WriteLine(result.GetProperty("excludes")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("excludes")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("submittedDate").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("startedDate").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("completedDate").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("tier").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("totalAssetsFoundCount").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("seeds")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("seeds")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("excludes")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("excludes")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("names")[0].ToString()); + Console.WriteLine(result.GetProperty("content").ToString()); Console.WriteLine(result.GetProperty("createdDate").ToString()); - Console.WriteLine(result.GetProperty("templateId").ToString()); + Console.WriteLine(result.GetProperty("frequency").ToString()); + Console.WriteLine(result.GetProperty("frequencyOffset").ToString()); + Console.WriteLine(result.GetProperty("updatedDate").ToString()); + Console.WriteLine(result.GetProperty("userUpdatedAt").ToString()); + Console.WriteLine(result.GetProperty("active").ToString()); + Console.WriteLine(result.GetProperty("inactiveMessage").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DiscoGroup_GetDiscoveryGroup_AllParameters_Convenience() + public void Example_DataConnection_GetDataConnection_AllParameters_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = client.GetDiscoveryGroup(""); + Response response = client.GetDataConnection(""); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DiscoGroup_GetDiscoveryGroup_AllParameters_Convenience_Async() + public async Task Example_DataConnection_GetDataConnection_AllParameters_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = await client.GetDiscoveryGroupAsync(""); + Response response = await client.GetDataConnectionAsync(""); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DiscoGroup_CreateOrReplaceDiscoveryGroup_ShortVersion() + public void Example_DataConnection_CreateOrReplaceDataConnection_ShortVersion() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - using RequestContent content = RequestContent.Create(new object()); - Response response = client.CreateOrReplaceDiscoveryGroup("", content); + using RequestContent content = RequestContent.Create(new + { + kind = "logAnalytics", + properties = new object(), + }); + Response response = client.CreateOrReplaceDataConnection("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DiscoGroup_CreateOrReplaceDiscoveryGroup_ShortVersion_Async() + public async Task Example_DataConnection_CreateOrReplaceDataConnection_ShortVersion_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - using RequestContent content = RequestContent.Create(new object()); - Response response = await client.CreateOrReplaceDiscoveryGroupAsync("", content); + using RequestContent content = RequestContent.Create(new + { + kind = "logAnalytics", + properties = new object(), + }); + Response response = await client.CreateOrReplaceDataConnectionAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DiscoGroup_CreateOrReplaceDiscoveryGroup_ShortVersion_Convenience() + public void Example_DataConnection_CreateOrReplaceDataConnection_ShortVersion_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - DiscoveryGroupPayload body = new DiscoveryGroupPayload(); - Response response = client.CreateOrReplaceDiscoveryGroup("", body); + DataConnectionPayload body = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties()); + Response response = client.CreateOrReplaceDataConnection("", body); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DiscoGroup_CreateOrReplaceDiscoveryGroup_ShortVersion_Convenience_Async() + public async Task Example_DataConnection_CreateOrReplaceDataConnection_ShortVersion_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - DiscoveryGroupPayload body = new DiscoveryGroupPayload(); - Response response = await client.CreateOrReplaceDiscoveryGroupAsync("", body); + DataConnectionPayload body = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties()); + Response response = await client.CreateOrReplaceDataConnectionAsync("", body); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DiscoGroup_CreateOrReplaceDiscoveryGroup_AllParameters() + public void Example_DataConnection_CreateOrReplaceDataConnection_AllParameters() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -1238,60 +1127,37 @@ public void Example_DiscoGroup_CreateOrReplaceDiscoveryGroup_AllParameters() using RequestContent content = RequestContent.Create(new { + kind = "logAnalytics", + properties = new + { + apiKey = "", + workspaceId = "", + }, name = "", - description = "", - tier = "", - frequencyMilliseconds = 1234L, - seeds = new object[] - { -new -{ -kind = "as", -name = "", -} - }, - names = new object[] - { -"" - }, - excludes = new object[] - { -null - }, - templateId = "", + content = "assets", + frequency = "daily", + frequencyOffset = 1234, }); - Response response = client.CreateOrReplaceDiscoveryGroup("", content); + Response response = client.CreateOrReplaceDataConnection("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("tier").ToString()); - Console.WriteLine(result.GetProperty("frequencyMilliseconds").ToString()); - Console.WriteLine(result.GetProperty("seeds")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("seeds")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("names")[0].ToString()); - Console.WriteLine(result.GetProperty("excludes")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("excludes")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("submittedDate").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("startedDate").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("completedDate").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("tier").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("totalAssetsFoundCount").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("seeds")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("seeds")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("excludes")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("excludes")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("names")[0].ToString()); + Console.WriteLine(result.GetProperty("content").ToString()); Console.WriteLine(result.GetProperty("createdDate").ToString()); - Console.WriteLine(result.GetProperty("templateId").ToString()); + Console.WriteLine(result.GetProperty("frequency").ToString()); + Console.WriteLine(result.GetProperty("frequencyOffset").ToString()); + Console.WriteLine(result.GetProperty("updatedDate").ToString()); + Console.WriteLine(result.GetProperty("userUpdatedAt").ToString()); + Console.WriteLine(result.GetProperty("active").ToString()); + Console.WriteLine(result.GetProperty("inactiveMessage").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DiscoGroup_CreateOrReplaceDiscoveryGroup_AllParameters_Async() + public async Task Example_DataConnection_CreateOrReplaceDataConnection_AllParameters_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -1299,444 +1165,2031 @@ public async Task Example_DiscoGroup_CreateOrReplaceDiscoveryGroup_AllParameters using RequestContent content = RequestContent.Create(new { + kind = "logAnalytics", + properties = new + { + apiKey = "", + workspaceId = "", + }, name = "", - description = "", - tier = "", - frequencyMilliseconds = 1234L, - seeds = new object[] - { -new -{ -kind = "as", -name = "", -} - }, - names = new object[] - { -"" - }, - excludes = new object[] - { -null - }, - templateId = "", + content = "assets", + frequency = "daily", + frequencyOffset = 1234, }); - Response response = await client.CreateOrReplaceDiscoveryGroupAsync("", content); + Response response = await client.CreateOrReplaceDataConnectionAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("tier").ToString()); - Console.WriteLine(result.GetProperty("frequencyMilliseconds").ToString()); - Console.WriteLine(result.GetProperty("seeds")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("seeds")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("names")[0].ToString()); - Console.WriteLine(result.GetProperty("excludes")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("excludes")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("submittedDate").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("startedDate").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("completedDate").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("tier").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("totalAssetsFoundCount").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("seeds")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("seeds")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("excludes")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("excludes")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("latestRun").GetProperty("names")[0].ToString()); + Console.WriteLine(result.GetProperty("content").ToString()); Console.WriteLine(result.GetProperty("createdDate").ToString()); - Console.WriteLine(result.GetProperty("templateId").ToString()); + Console.WriteLine(result.GetProperty("frequency").ToString()); + Console.WriteLine(result.GetProperty("frequencyOffset").ToString()); + Console.WriteLine(result.GetProperty("updatedDate").ToString()); + Console.WriteLine(result.GetProperty("userUpdatedAt").ToString()); + Console.WriteLine(result.GetProperty("active").ToString()); + Console.WriteLine(result.GetProperty("inactiveMessage").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DiscoGroup_CreateOrReplaceDiscoveryGroup_AllParameters_Convenience() + public void Example_DataConnection_CreateOrReplaceDataConnection_AllParameters_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - DiscoveryGroupPayload body = new DiscoveryGroupPayload + DataConnectionPayload body = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties + { + ApiKey = "", + WorkspaceId = "", + }) { Name = "", - Description = "", - Tier = "", - FrequencyMilliseconds = 1234L, - Seeds = {new DiscoverySource -{ -Kind = DiscoverySourceKind.As, -Name = "", -}}, - Names = { "" }, - Excludes = { default }, - TemplateId = "", + Content = DataConnectionContent.Assets, + Frequency = DataConnectionFrequency.Daily, + FrequencyOffset = 1234, }; - Response response = client.CreateOrReplaceDiscoveryGroup("", body); + Response response = client.CreateOrReplaceDataConnection("", body); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DiscoGroup_CreateOrReplaceDiscoveryGroup_AllParameters_Convenience_Async() + public async Task Example_DataConnection_CreateOrReplaceDataConnection_AllParameters_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - DiscoveryGroupPayload body = new DiscoveryGroupPayload + DataConnectionPayload body = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties + { + ApiKey = "", + WorkspaceId = "", + }) { Name = "", - Description = "", - Tier = "", - FrequencyMilliseconds = 1234L, - Seeds = {new DiscoverySource -{ -Kind = DiscoverySourceKind.As, -Name = "", -}}, - Names = { "" }, - Excludes = { default }, - TemplateId = "", + Content = DataConnectionContent.Assets, + Frequency = DataConnectionFrequency.Daily, + FrequencyOffset = 1234, }; - Response response = await client.CreateOrReplaceDiscoveryGroupAsync("", body); + Response response = await client.CreateOrReplaceDataConnectionAsync("", body); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_EasmClient_RunDiscoveryGroup_ShortVersion() + public void Example_DataConnection_DeleteDataConnection_ShortVersion() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = client.RunDiscoveryGroup(""); + Response response = client.DeleteDataConnection(""); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EasmClient_RunDiscoveryGroup_ShortVersion_Async() + public async Task Example_DataConnection_DeleteDataConnection_ShortVersion_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = await client.RunDiscoveryGroupAsync(""); + Response response = await client.DeleteDataConnectionAsync(""); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_EasmClient_RunDiscoveryGroup_AllParameters() + public void Example_DataConnection_DeleteDataConnection_AllParameters() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = client.RunDiscoveryGroup(""); + Response response = client.DeleteDataConnection(""); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EasmClient_RunDiscoveryGroup_AllParameters_Async() + public async Task Example_DataConnection_DeleteDataConnection_AllParameters_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = await client.RunDiscoveryGroupAsync(""); + Response response = await client.DeleteDataConnectionAsync(""); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DiscoTemplate_GetDiscoveryTemplate_ShortVersion() + public void Example_EasmClient_ValidateDiscoGroup_ShortVersion() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = client.GetDiscoveryTemplate("", null); + using RequestContent content = RequestContent.Create(new object()); + Response response = client.ValidateDiscoGroup(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DiscoTemplate_GetDiscoveryTemplate_ShortVersion_Async() + public async Task Example_EasmClient_ValidateDiscoGroup_ShortVersion_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = await client.GetDiscoveryTemplateAsync("", null); + using RequestContent content = RequestContent.Create(new object()); + Response response = await client.ValidateDiscoGroupAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DiscoTemplate_GetDiscoveryTemplate_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); - - Response response = client.GetDiscoveryTemplate(""); + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DiscoTemplate_GetDiscoveryTemplate_ShortVersion_Convenience_Async() + public void Example_EasmClient_ValidateDiscoGroup_ShortVersion_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = await client.GetDiscoveryTemplateAsync(""); + DiscoveryGroupPayload body = new DiscoveryGroupPayload(); + Response response = client.ValidateDiscoGroup(body); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DiscoTemplate_GetDiscoveryTemplate_AllParameters() + public async Task Example_EasmClient_ValidateDiscoGroup_ShortVersion_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = client.GetDiscoveryTemplate("", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("industry").ToString()); - Console.WriteLine(result.GetProperty("region").ToString()); - Console.WriteLine(result.GetProperty("countryCode").ToString()); - Console.WriteLine(result.GetProperty("stateCode").ToString()); - Console.WriteLine(result.GetProperty("city").ToString()); - Console.WriteLine(result.GetProperty("seeds")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("seeds")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("names")[0].ToString()); + DiscoveryGroupPayload body = new DiscoveryGroupPayload(); + Response response = await client.ValidateDiscoGroupAsync(body); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DiscoTemplate_GetDiscoveryTemplate_AllParameters_Async() + public void Example_EasmClient_ValidateDiscoGroup_AllParameters() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = await client.GetDiscoveryTemplateAsync("", null); + using RequestContent content = RequestContent.Create(new + { + name = "", + description = "", + tier = "", + frequencyMilliseconds = 1234L, + seeds = new object[] + { +new +{ +kind = "as", +name = "", +} + }, + names = new object[] + { +"" + }, + excludes = new object[] + { +null + }, + templateId = "", + }); + Response response = client.ValidateDiscoGroup(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("industry").ToString()); - Console.WriteLine(result.GetProperty("region").ToString()); - Console.WriteLine(result.GetProperty("countryCode").ToString()); - Console.WriteLine(result.GetProperty("stateCode").ToString()); - Console.WriteLine(result.GetProperty("city").ToString()); - Console.WriteLine(result.GetProperty("seeds")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("seeds")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("names")[0].ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("value").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DiscoTemplate_GetDiscoveryTemplate_AllParameters_Convenience() + public async Task Example_EasmClient_ValidateDiscoGroup_AllParameters_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = client.GetDiscoveryTemplate(""); + using RequestContent content = RequestContent.Create(new + { + name = "", + description = "", + tier = "", + frequencyMilliseconds = 1234L, + seeds = new object[] + { +new +{ +kind = "as", +name = "", +} + }, + names = new object[] + { +"" + }, + excludes = new object[] + { +null + }, + templateId = "", + }); + Response response = await client.ValidateDiscoGroupAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("value").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_EasmClient_ValidateDiscoGroup_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + DiscoveryGroupPayload body = new DiscoveryGroupPayload + { + Name = "", + Description = "", + Tier = "", + FrequencyMilliseconds = 1234L, + Seeds = {new DiscoverySource +{ +Kind = DiscoverySourceKind.As, +Name = "", +}}, + Names = { "" }, + Excludes = { default }, + TemplateId = "", + }; + Response response = client.ValidateDiscoGroup(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_EasmClient_ValidateDiscoGroup_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + DiscoveryGroupPayload body = new DiscoveryGroupPayload + { + Name = "", + Description = "", + Tier = "", + FrequencyMilliseconds = 1234L, + Seeds = {new DiscoverySource +{ +Kind = DiscoverySourceKind.As, +Name = "", +}}, + Names = { "" }, + Excludes = { default }, + TemplateId = "", + }; + Response response = await client.ValidateDiscoGroupAsync(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_DiscoGroup_GetDiscoGroup_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + Response response = client.GetDiscoGroup("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_DiscoGroup_GetDiscoGroup_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + Response response = await client.GetDiscoGroupAsync("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_DiscoGroup_GetDiscoGroup_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + Response response = client.GetDiscoGroup(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_DiscoGroup_GetDiscoGroup_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + Response response = await client.GetDiscoGroupAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_DiscoGroup_GetDiscoGroup_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + Response response = client.GetDiscoGroup("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("tier").ToString()); + Console.WriteLine(result.GetProperty("frequencyMilliseconds").ToString()); + Console.WriteLine(result.GetProperty("seeds")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("seeds")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("names")[0].ToString()); + Console.WriteLine(result.GetProperty("excludes")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("excludes")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("submittedDate").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("startedDate").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("completedDate").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("tier").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("totalAssetsFoundCount").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("seeds")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("seeds")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("excludes")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("excludes")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("names")[0].ToString()); + Console.WriteLine(result.GetProperty("createdDate").ToString()); + Console.WriteLine(result.GetProperty("templateId").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_DiscoGroup_GetDiscoGroup_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + Response response = await client.GetDiscoGroupAsync("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("tier").ToString()); + Console.WriteLine(result.GetProperty("frequencyMilliseconds").ToString()); + Console.WriteLine(result.GetProperty("seeds")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("seeds")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("names")[0].ToString()); + Console.WriteLine(result.GetProperty("excludes")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("excludes")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("submittedDate").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("startedDate").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("completedDate").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("tier").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("totalAssetsFoundCount").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("seeds")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("seeds")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("excludes")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("excludes")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("names")[0].ToString()); + Console.WriteLine(result.GetProperty("createdDate").ToString()); + Console.WriteLine(result.GetProperty("templateId").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_DiscoGroup_GetDiscoGroup_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + Response response = client.GetDiscoGroup(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_DiscoGroup_GetDiscoGroup_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + Response response = await client.GetDiscoGroupAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_DiscoGroup_DeleteDiscoGroup_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + Response response = client.DeleteDiscoGroup(""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_DiscoGroup_DeleteDiscoGroup_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + Response response = await client.DeleteDiscoGroupAsync(""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_DiscoGroup_DeleteDiscoGroup_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + Response response = client.DeleteDiscoGroup(""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_DiscoGroup_DeleteDiscoGroup_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + Response response = await client.DeleteDiscoGroupAsync(""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_DiscoGroup_CreateOrReplaceDiscoGroup_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new object()); + Response response = client.CreateOrReplaceDiscoGroup("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_DiscoGroup_CreateOrReplaceDiscoGroup_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new object()); + Response response = await client.CreateOrReplaceDiscoGroupAsync("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_DiscoGroup_CreateOrReplaceDiscoGroup_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + DiscoveryGroupPayload body = new DiscoveryGroupPayload(); + Response response = client.CreateOrReplaceDiscoGroup("", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_DiscoGroup_CreateOrReplaceDiscoGroup_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + DiscoveryGroupPayload body = new DiscoveryGroupPayload(); + Response response = await client.CreateOrReplaceDiscoGroupAsync("", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_DiscoGroup_CreateOrReplaceDiscoGroup_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + name = "", + description = "", + tier = "", + frequencyMilliseconds = 1234L, + seeds = new object[] + { +new +{ +kind = "as", +name = "", +} + }, + names = new object[] + { +"" + }, + excludes = new object[] + { +null + }, + templateId = "", + }); + Response response = client.CreateOrReplaceDiscoGroup("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("tier").ToString()); + Console.WriteLine(result.GetProperty("frequencyMilliseconds").ToString()); + Console.WriteLine(result.GetProperty("seeds")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("seeds")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("names")[0].ToString()); + Console.WriteLine(result.GetProperty("excludes")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("excludes")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("submittedDate").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("startedDate").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("completedDate").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("tier").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("totalAssetsFoundCount").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("seeds")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("seeds")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("excludes")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("excludes")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("names")[0].ToString()); + Console.WriteLine(result.GetProperty("createdDate").ToString()); + Console.WriteLine(result.GetProperty("templateId").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_DiscoGroup_CreateOrReplaceDiscoGroup_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + name = "", + description = "", + tier = "", + frequencyMilliseconds = 1234L, + seeds = new object[] + { +new +{ +kind = "as", +name = "", +} + }, + names = new object[] + { +"" + }, + excludes = new object[] + { +null + }, + templateId = "", + }); + Response response = await client.CreateOrReplaceDiscoGroupAsync("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("tier").ToString()); + Console.WriteLine(result.GetProperty("frequencyMilliseconds").ToString()); + Console.WriteLine(result.GetProperty("seeds")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("seeds")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("names")[0].ToString()); + Console.WriteLine(result.GetProperty("excludes")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("excludes")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("submittedDate").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("startedDate").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("completedDate").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("tier").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("totalAssetsFoundCount").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("seeds")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("seeds")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("excludes")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("excludes")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("latestRun").GetProperty("names")[0].ToString()); + Console.WriteLine(result.GetProperty("createdDate").ToString()); + Console.WriteLine(result.GetProperty("templateId").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_DiscoGroup_CreateOrReplaceDiscoGroup_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + DiscoveryGroupPayload body = new DiscoveryGroupPayload + { + Name = "", + Description = "", + Tier = "", + FrequencyMilliseconds = 1234L, + Seeds = {new DiscoverySource +{ +Kind = DiscoverySourceKind.As, +Name = "", +}}, + Names = { "" }, + Excludes = { default }, + TemplateId = "", + }; + Response response = client.CreateOrReplaceDiscoGroup("", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_DiscoGroup_CreateOrReplaceDiscoGroup_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + DiscoveryGroupPayload body = new DiscoveryGroupPayload + { + Name = "", + Description = "", + Tier = "", + FrequencyMilliseconds = 1234L, + Seeds = {new DiscoverySource +{ +Kind = DiscoverySourceKind.As, +Name = "", +}}, + Names = { "" }, + Excludes = { default }, + TemplateId = "", + }; + Response response = await client.CreateOrReplaceDiscoGroupAsync("", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_EasmClient_RunDiscoGroup_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + Response response = client.RunDiscoGroup(""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_EasmClient_RunDiscoGroup_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + Response response = await client.RunDiscoGroupAsync(""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_EasmClient_RunDiscoGroup_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + Response response = client.RunDiscoGroup(""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_EasmClient_RunDiscoGroup_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + Response response = await client.RunDiscoGroupAsync(""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_EasmClient_GetAssetChainSummary_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + assetChainSource = "DISCO_GROUP", + sourceIds = new object[] + { +"" + }, + }); + Response response = client.GetAssetChainSummary(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("affectedAssetsSummary")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("affectedAssetsSummary")[0].GetProperty("affectedCount").ToString()); + Console.WriteLine(result.GetProperty("affectedGroupsSummary")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("affectedGroupsSummary")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("affectedGroupsSummary")[0].GetProperty("displayName").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_EasmClient_GetAssetChainSummary_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + assetChainSource = "DISCO_GROUP", + sourceIds = new object[] + { +"" + }, + }); + Response response = await client.GetAssetChainSummaryAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("affectedAssetsSummary")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("affectedAssetsSummary")[0].GetProperty("affectedCount").ToString()); + Console.WriteLine(result.GetProperty("affectedGroupsSummary")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("affectedGroupsSummary")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("affectedGroupsSummary")[0].GetProperty("displayName").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_EasmClient_GetAssetChainSummary_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + AssetChainRequest body = new AssetChainRequest(AssetChainSource.DISCOGROUP, new string[] { "" }); + Response response = client.GetAssetChainSummary(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_EasmClient_GetAssetChainSummary_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + AssetChainRequest body = new AssetChainRequest(AssetChainSource.DISCOGROUP, new string[] { "" }); + Response response = await client.GetAssetChainSummaryAsync(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_EasmClient_GetAssetChainSummary_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + assetChainSource = "DISCO_GROUP", + sourceIds = new object[] + { +"" + }, + }); + Response response = client.GetAssetChainSummary(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("affectedAssetsSummary")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("affectedAssetsSummary")[0].GetProperty("affectedCount").ToString()); + Console.WriteLine(result.GetProperty("affectedGroupsSummary")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("affectedGroupsSummary")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("affectedGroupsSummary")[0].GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("error").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("error").GetProperty("innererror").GetProperty("value").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_EasmClient_GetAssetChainSummary_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + assetChainSource = "DISCO_GROUP", + sourceIds = new object[] + { +"" + }, + }); + Response response = await client.GetAssetChainSummaryAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("affectedAssetsSummary")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("affectedAssetsSummary")[0].GetProperty("affectedCount").ToString()); + Console.WriteLine(result.GetProperty("affectedGroupsSummary")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("affectedGroupsSummary")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("affectedGroupsSummary")[0].GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("error").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("error").GetProperty("innererror").GetProperty("value").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_EasmClient_GetAssetChainSummary_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + AssetChainRequest body = new AssetChainRequest(AssetChainSource.DISCOGROUP, new string[] { "" }); + Response response = client.GetAssetChainSummary(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_EasmClient_GetAssetChainSummary_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + AssetChainRequest body = new AssetChainRequest(AssetChainSource.DISCOGROUP, new string[] { "" }); + Response response = await client.GetAssetChainSummaryAsync(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_EasmClient_DismissAssetChain_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + assetChainSource = "DISCO_GROUP", + sourceIds = new object[] + { +"" + }, + }); + Response response = client.DismissAssetChain(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_EasmClient_DismissAssetChain_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + assetChainSource = "DISCO_GROUP", + sourceIds = new object[] + { +"" + }, + }); + Response response = await client.DismissAssetChainAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_EasmClient_DismissAssetChain_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + AssetChainRequest body = new AssetChainRequest(AssetChainSource.DISCOGROUP, new string[] { "" }); + Response response = client.DismissAssetChain(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_EasmClient_DismissAssetChain_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + AssetChainRequest body = new AssetChainRequest(AssetChainSource.DISCOGROUP, new string[] { "" }); + Response response = await client.DismissAssetChainAsync(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_EasmClient_DismissAssetChain_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + assetChainSource = "DISCO_GROUP", + sourceIds = new object[] + { +"" + }, + }); + Response response = client.DismissAssetChain(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("startedAt").ToString()); + Console.WriteLine(result.GetProperty("completedAt").ToString()); + Console.WriteLine(result.GetProperty("lastPolledAt").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("phase").ToString()); + Console.WriteLine(result.GetProperty("reason").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_EasmClient_DismissAssetChain_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + assetChainSource = "DISCO_GROUP", + sourceIds = new object[] + { +"" + }, + }); + Response response = await client.DismissAssetChainAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("startedAt").ToString()); + Console.WriteLine(result.GetProperty("completedAt").ToString()); + Console.WriteLine(result.GetProperty("lastPolledAt").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("phase").ToString()); + Console.WriteLine(result.GetProperty("reason").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_EasmClient_DismissAssetChain_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + AssetChainRequest body = new AssetChainRequest(AssetChainSource.DISCOGROUP, new string[] { "" }); + Response response = client.DismissAssetChain(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_EasmClient_DismissAssetChain_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + AssetChainRequest body = new AssetChainRequest(AssetChainSource.DISCOGROUP, new string[] { "" }); + Response response = await client.DismissAssetChainAsync(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_DiscoTemplate_GetDiscoTemplate_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + Response response = client.GetDiscoTemplate("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_DiscoTemplate_GetDiscoTemplate_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + Response response = await client.GetDiscoTemplateAsync("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_DiscoTemplate_GetDiscoTemplate_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + Response response = client.GetDiscoTemplate(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_DiscoTemplate_GetDiscoTemplate_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + Response response = await client.GetDiscoTemplateAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_DiscoTemplate_GetDiscoTemplate_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + Response response = client.GetDiscoTemplate("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("industry").ToString()); + Console.WriteLine(result.GetProperty("region").ToString()); + Console.WriteLine(result.GetProperty("countryCode").ToString()); + Console.WriteLine(result.GetProperty("stateCode").ToString()); + Console.WriteLine(result.GetProperty("city").ToString()); + Console.WriteLine(result.GetProperty("seeds")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("seeds")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("names")[0].ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_DiscoTemplate_GetDiscoTemplate_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + Response response = await client.GetDiscoTemplateAsync("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("industry").ToString()); + Console.WriteLine(result.GetProperty("region").ToString()); + Console.WriteLine(result.GetProperty("countryCode").ToString()); + Console.WriteLine(result.GetProperty("stateCode").ToString()); + Console.WriteLine(result.GetProperty("city").ToString()); + Console.WriteLine(result.GetProperty("seeds")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("seeds")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("names")[0].ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_DiscoTemplate_GetDiscoTemplate_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + Response response = client.GetDiscoTemplate(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_DiscoTemplate_GetDiscoTemplate_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + Response response = await client.GetDiscoTemplateAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_EasmClient_GetBillable_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + Response response = client.GetBillable(null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_EasmClient_GetBillable_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + Response response = await client.GetBillableAsync(null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_EasmClient_GetBillable_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + Response response = client.GetBillable(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_EasmClient_GetBillable_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + Response response = await client.GetBillableAsync(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_EasmClient_GetBillable_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + Response response = client.GetBillable(null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("date").ToString()); + Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("total").ToString()); + Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("assetBreakdown")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("assetBreakdown")[0].GetProperty("count").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_EasmClient_GetBillable_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + Response response = await client.GetBillableAsync(null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("date").ToString()); + Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("total").ToString()); + Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("assetBreakdown")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("assetBreakdown")[0].GetProperty("count").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_EasmClient_GetBillable_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + Response response = client.GetBillable(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_EasmClient_GetBillable_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + Response response = await client.GetBillableAsync(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_EasmClient_GetSnapshot_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new object()); + Response response = client.GetSnapshot(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_EasmClient_GetSnapshot_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new object()); + Response response = await client.GetSnapshotAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_EasmClient_GetSnapshot_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + ReportAssetSnapshotPayload body = new ReportAssetSnapshotPayload(); + Response response = client.GetSnapshot(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_EasmClient_GetSnapshot_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + ReportAssetSnapshotPayload body = new ReportAssetSnapshotPayload(); + Response response = await client.GetSnapshotAsync(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_EasmClient_GetSnapshot_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + metric = "", + labelName = "", + size = 1234, + page = 1234, + }); + Response response = client.GetSnapshot(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("metric").ToString()); + Console.WriteLine(result.GetProperty("labelName").ToString()); + Console.WriteLine(result.GetProperty("updatedAt").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("assets").GetProperty("totalElements").ToString()); + Console.WriteLine(result.GetProperty("assets").GetProperty("mark").ToString()); + Console.WriteLine(result.GetProperty("assets").GetProperty("nextLink").ToString()); + Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("uuid").ToString()); + Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("createdDate").ToString()); + Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("updatedDate").ToString()); + Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("externalId").ToString()); + Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("wildcard").ToString()); + Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("discoGroupName").ToString()); + Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("auditTrail")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("auditTrail")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("auditTrail")[0].GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("auditTrail")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("auditTrail")[0].GetProperty("reason").ToString()); + Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("reason").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_EasmClient_GetSnapshot_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + metric = "", + labelName = "", + size = 1234, + page = 1234, + }); + Response response = await client.GetSnapshotAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("metric").ToString()); + Console.WriteLine(result.GetProperty("labelName").ToString()); + Console.WriteLine(result.GetProperty("updatedAt").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("assets").GetProperty("totalElements").ToString()); + Console.WriteLine(result.GetProperty("assets").GetProperty("mark").ToString()); + Console.WriteLine(result.GetProperty("assets").GetProperty("nextLink").ToString()); + Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("uuid").ToString()); + Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("createdDate").ToString()); + Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("updatedDate").ToString()); + Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("externalId").ToString()); + Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("labels")[0].ToString()); + Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("wildcard").ToString()); + Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("discoGroupName").ToString()); + Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("auditTrail")[0].GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("auditTrail")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("auditTrail")[0].GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("auditTrail")[0].GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("auditTrail")[0].GetProperty("reason").ToString()); + Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("reason").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_EasmClient_GetSnapshot_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + ReportAssetSnapshotPayload body = new ReportAssetSnapshotPayload + { + Metric = "", + LabelName = "", + Size = 1234, + Page = 1234, + }; + Response response = client.GetSnapshot(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_EasmClient_GetSnapshot_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + ReportAssetSnapshotPayload body = new ReportAssetSnapshotPayload + { + Metric = "", + LabelName = "", + Size = 1234, + Page = 1234, + }; + Response response = await client.GetSnapshotAsync(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_EasmClient_GetSummary_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new object()); + Response response = client.GetSummary(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_EasmClient_GetSummary_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new object()); + Response response = await client.GetSummaryAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_EasmClient_GetSummary_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + ReportAssetSummaryPayload body = new ReportAssetSummaryPayload(); + Response response = client.GetSummary(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_EasmClient_GetSummary_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + ReportAssetSummaryPayload body = new ReportAssetSummaryPayload(); + Response response = await client.GetSummaryAsync(body); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DiscoTemplate_GetDiscoveryTemplate_AllParameters_Convenience_Async() + public void Example_EasmClient_GetSummary_AllParameters() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = await client.GetDiscoveryTemplateAsync(""); + using RequestContent content = RequestContent.Create(new + { + metricCategories = new object[] + { +"" + }, + metrics = new object[] + { +"" + }, + filters = new object[] + { +"" + }, + groupBy = "", + segmentBy = "", + labelName = "", + }); + Response response = client.GetSummary(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("updatedAt").ToString()); + Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("metricCategory").ToString()); + Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("metric").ToString()); + Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("filter").ToString()); + Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("labelName").ToString()); + Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("count").ToString()); + Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("link").ToString()); + Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("updatedAt").ToString()); + Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("metricCategory").ToString()); + Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("metric").ToString()); + Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("filter").ToString()); + Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("labelName").ToString()); + Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("count").ToString()); + Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("link").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_EasmClient_GetBillable_ShortVersion() + public async Task Example_EasmClient_GetSummary_AllParameters_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = client.GetBillable(null); + using RequestContent content = RequestContent.Create(new + { + metricCategories = new object[] + { +"" + }, + metrics = new object[] + { +"" + }, + filters = new object[] + { +"" + }, + groupBy = "", + segmentBy = "", + labelName = "", + }); + Response response = await client.GetSummaryAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("updatedAt").ToString()); + Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("metricCategory").ToString()); + Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("metric").ToString()); + Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("filter").ToString()); + Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("labelName").ToString()); + Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("count").ToString()); + Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("link").ToString()); + Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("updatedAt").ToString()); + Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("metricCategory").ToString()); + Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("metric").ToString()); + Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("filter").ToString()); + Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("labelName").ToString()); + Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("count").ToString()); + Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("link").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_EasmClient_GetSummary_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + ReportAssetSummaryPayload body = new ReportAssetSummaryPayload + { + MetricCategories = { "" }, + Metrics = { "" }, + Filters = { "" }, + GroupBy = "", + SegmentBy = "", + LabelName = "", + }; + Response response = client.GetSummary(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_EasmClient_GetSummary_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + ReportAssetSummaryPayload body = new ReportAssetSummaryPayload + { + MetricCategories = { "" }, + Metrics = { "" }, + Filters = { "" }, + GroupBy = "", + SegmentBy = "", + LabelName = "", + }; + Response response = await client.GetSummaryAsync(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_EasmClient_GetSnapshotExport_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new object()); + Response response = client.GetSnapshotExport(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_EasmClient_GetSnapshotExport_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new object()); + Response response = await client.GetSnapshotExportAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_EasmClient_GetSnapshotExport_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + ReportAssetSnapshotExportPayload body = new ReportAssetSnapshotExportPayload(); + Response response = client.GetSnapshotExport(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_EasmClient_GetSnapshotExport_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + ReportAssetSnapshotExportPayload body = new ReportAssetSnapshotExportPayload(); + Response response = await client.GetSnapshotExportAsync(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_EasmClient_GetSnapshotExport_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + metric = "", + fileName = "", + columns = new object[] + { +"" + }, + }); + Response response = client.GetSnapshotExport(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("startedAt").ToString()); + Console.WriteLine(result.GetProperty("completedAt").ToString()); + Console.WriteLine(result.GetProperty("lastPolledAt").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("phase").ToString()); + Console.WriteLine(result.GetProperty("reason").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_EasmClient_GetSnapshotExport_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + metric = "", + fileName = "", + columns = new object[] + { +"" + }, + }); + Response response = await client.GetSnapshotExportAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("startedAt").ToString()); + Console.WriteLine(result.GetProperty("completedAt").ToString()); + Console.WriteLine(result.GetProperty("lastPolledAt").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("phase").ToString()); + Console.WriteLine(result.GetProperty("reason").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_EasmClient_GetSnapshotExport_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + ReportAssetSnapshotExportPayload body = new ReportAssetSnapshotExportPayload + { + Metric = "", + FileName = "", + Columns = { "" }, + }; + Response response = client.GetSnapshotExport(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_EasmClient_GetSnapshotExport_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + ReportAssetSnapshotExportPayload body = new ReportAssetSnapshotExportPayload + { + Metric = "", + FileName = "", + Columns = { "" }, + }; + Response response = await client.GetSnapshotExportAsync(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_SavedFilter_GetSavedFilter_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + Response response = client.GetSavedFilter("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EasmClient_GetBillable_ShortVersion_Async() + public async Task Example_SavedFilter_GetSavedFilter_ShortVersion_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = await client.GetBillableAsync(null); + Response response = await client.GetSavedFilterAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_EasmClient_GetBillable_ShortVersion_Convenience() + public void Example_SavedFilter_GetSavedFilter_ShortVersion_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = client.GetBillable(); + Response response = client.GetSavedFilter(""); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EasmClient_GetBillable_ShortVersion_Convenience_Async() + public async Task Example_SavedFilter_GetSavedFilter_ShortVersion_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = await client.GetBillableAsync(); + Response response = await client.GetSavedFilterAsync(""); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_EasmClient_GetBillable_AllParameters() + public void Example_SavedFilter_GetSavedFilter_AllParameters() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = client.GetBillable(null); + Response response = client.GetSavedFilter("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("date").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("total").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("assetBreakdown")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("assetBreakdown")[0].GetProperty("count").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("filter").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EasmClient_GetBillable_AllParameters_Async() + public async Task Example_SavedFilter_GetSavedFilter_AllParameters_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = await client.GetBillableAsync(null); + Response response = await client.GetSavedFilterAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("date").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("total").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("assetBreakdown")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("assetBreakdown")[0].GetProperty("count").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("filter").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_EasmClient_GetBillable_AllParameters_Convenience() + public void Example_SavedFilter_GetSavedFilter_AllParameters_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = client.GetBillable(); + Response response = client.GetSavedFilter(""); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EasmClient_GetBillable_AllParameters_Convenience_Async() + public async Task Example_SavedFilter_GetSavedFilter_AllParameters_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = await client.GetBillableAsync(); + Response response = await client.GetSavedFilterAsync(""); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_EasmClient_GetSnapshot_ShortVersion() + public void Example_SavedFilter_CreateOrReplaceSavedFilter_ShortVersion() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - using RequestContent content = RequestContent.Create(new object()); - Response response = client.GetSnapshot(content); + using RequestContent content = RequestContent.Create(new + { + filter = "", + description = "", + }); + Response response = client.CreateOrReplaceSavedFilter("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EasmClient_GetSnapshot_ShortVersion_Async() + public async Task Example_SavedFilter_CreateOrReplaceSavedFilter_ShortVersion_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - using RequestContent content = RequestContent.Create(new object()); - Response response = await client.GetSnapshotAsync(content); + using RequestContent content = RequestContent.Create(new + { + filter = "", + description = "", + }); + Response response = await client.CreateOrReplaceSavedFilterAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_EasmClient_GetSnapshot_ShortVersion_Convenience() + public void Example_SavedFilter_CreateOrReplaceSavedFilter_ShortVersion_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - ReportAssetSnapshotPayload body = new ReportAssetSnapshotPayload(); - Response response = client.GetSnapshot(body); + SavedFilterPayload body = new SavedFilterPayload("", ""); + Response response = client.CreateOrReplaceSavedFilter("", body); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EasmClient_GetSnapshot_ShortVersion_Convenience_Async() + public async Task Example_SavedFilter_CreateOrReplaceSavedFilter_ShortVersion_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - ReportAssetSnapshotPayload body = new ReportAssetSnapshotPayload(); - Response response = await client.GetSnapshotAsync(body); + SavedFilterPayload body = new SavedFilterPayload("", ""); + Response response = await client.CreateOrReplaceSavedFilterAsync("", body); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_EasmClient_GetSnapshot_AllParameters() + public void Example_SavedFilter_CreateOrReplaceSavedFilter_AllParameters() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -1744,45 +3197,22 @@ public void Example_EasmClient_GetSnapshot_AllParameters() using RequestContent content = RequestContent.Create(new { - metric = "", - labelName = "", - size = 1234, - page = 1234, + filter = "", + description = "", }); - Response response = client.GetSnapshot(content); + Response response = client.CreateOrReplaceSavedFilter("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("metric").ToString()); - Console.WriteLine(result.GetProperty("labelName").ToString()); - Console.WriteLine(result.GetProperty("updatedAt").ToString()); + Console.WriteLine(result.GetProperty("filter").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("totalElements").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("mark").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("nextLink").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("uuid").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("createdDate").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("updatedDate").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("externalId").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("wildcard").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("discoGroupName").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("auditTrail")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("auditTrail")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("auditTrail")[0].GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("auditTrail")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("auditTrail")[0].GetProperty("reason").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("reason").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EasmClient_GetSnapshot_AllParameters_Async() + public async Task Example_SavedFilter_CreateOrReplaceSavedFilter_AllParameters_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -1790,571 +3220,446 @@ public async Task Example_EasmClient_GetSnapshot_AllParameters_Async() using RequestContent content = RequestContent.Create(new { - metric = "", - labelName = "", - size = 1234, - page = 1234, + filter = "", + description = "", }); - Response response = await client.GetSnapshotAsync(content); + Response response = await client.CreateOrReplaceSavedFilterAsync("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("metric").ToString()); - Console.WriteLine(result.GetProperty("labelName").ToString()); - Console.WriteLine(result.GetProperty("updatedAt").ToString()); + Console.WriteLine(result.GetProperty("filter").ToString()); Console.WriteLine(result.GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("totalElements").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("mark").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("nextLink").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("uuid").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("createdDate").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("updatedDate").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("externalId").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("labels")[0].ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("wildcard").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("discoGroupName").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("auditTrail")[0].GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("auditTrail")[0].GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("auditTrail")[0].GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("auditTrail")[0].GetProperty("kind").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("auditTrail")[0].GetProperty("reason").ToString()); - Console.WriteLine(result.GetProperty("assets").GetProperty("value")[0].GetProperty("reason").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_EasmClient_GetSnapshot_AllParameters_Convenience() + public void Example_SavedFilter_CreateOrReplaceSavedFilter_AllParameters_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - ReportAssetSnapshotPayload body = new ReportAssetSnapshotPayload - { - Metric = "", - LabelName = "", - Size = 1234, - Page = 1234, - }; - Response response = client.GetSnapshot(body); + SavedFilterPayload body = new SavedFilterPayload("", ""); + Response response = client.CreateOrReplaceSavedFilter("", body); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EasmClient_GetSnapshot_AllParameters_Convenience_Async() + public async Task Example_SavedFilter_CreateOrReplaceSavedFilter_AllParameters_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - ReportAssetSnapshotPayload body = new ReportAssetSnapshotPayload - { - Metric = "", - LabelName = "", - Size = 1234, - Page = 1234, - }; - Response response = await client.GetSnapshotAsync(body); + SavedFilterPayload body = new SavedFilterPayload("", ""); + Response response = await client.CreateOrReplaceSavedFilterAsync("", body); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_EasmClient_GetSummary_ShortVersion() + public void Example_SavedFilter_DeleteSavedFilter_ShortVersion() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - using RequestContent content = RequestContent.Create(new object()); - Response response = client.GetSummary(content); + Response response = client.DeleteSavedFilter(""); - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EasmClient_GetSummary_ShortVersion_Async() + public async Task Example_SavedFilter_DeleteSavedFilter_ShortVersion_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - using RequestContent content = RequestContent.Create(new object()); - Response response = await client.GetSummaryAsync(content); + Response response = await client.DeleteSavedFilterAsync(""); - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_EasmClient_GetSummary_ShortVersion_Convenience() + public void Example_SavedFilter_DeleteSavedFilter_AllParameters() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - ReportAssetSummaryPayload body = new ReportAssetSummaryPayload(); - Response response = client.GetSummary(body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_EasmClient_GetSummary_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - EasmClient client = new EasmClient(endpoint, credential); + Response response = client.DeleteSavedFilter(""); - ReportAssetSummaryPayload body = new ReportAssetSummaryPayload(); - Response response = await client.GetSummaryAsync(body); + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_EasmClient_GetSummary_AllParameters() + public async Task Example_SavedFilter_DeleteSavedFilter_AllParameters_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - using RequestContent content = RequestContent.Create(new - { - metricCategories = new object[] - { -"" - }, - metrics = new object[] - { -"" - }, - filters = new object[] - { -"" - }, - groupBy = "", - segmentBy = "", - labelName = "", - }); - Response response = client.GetSummary(content); + Response response = await client.DeleteSavedFilterAsync(""); - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("updatedAt").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("metricCategory").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("metric").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("filter").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("labelName").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("count").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("link").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("updatedAt").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("metricCategory").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("metric").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("filter").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("labelName").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("count").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("link").ToString()); + Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EasmClient_GetSummary_AllParameters_Async() + public void Example_Task_GetTask_ShortVersion() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - using RequestContent content = RequestContent.Create(new - { - metricCategories = new object[] - { -"" - }, - metrics = new object[] - { -"" - }, - filters = new object[] - { -"" - }, - groupBy = "", - segmentBy = "", - labelName = "", - }); - Response response = await client.GetSummaryAsync(content); + Response response = client.GetTask("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("updatedAt").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("metricCategory").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("metric").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("filter").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("labelName").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("count").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("link").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("description").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("updatedAt").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("metricCategory").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("metric").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("filter").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("labelName").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("count").ToString()); - Console.WriteLine(result.GetProperty("assetSummaries")[0].GetProperty("children")[0].GetProperty("link").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_EasmClient_GetSummary_AllParameters_Convenience() + public async Task Example_Task_GetTask_ShortVersion_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - ReportAssetSummaryPayload body = new ReportAssetSummaryPayload - { - MetricCategories = { "" }, - Metrics = { "" }, - Filters = { "" }, - GroupBy = "", - SegmentBy = "", - LabelName = "", - }; - Response response = client.GetSummary(body); + Response response = await client.GetTaskAsync("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EasmClient_GetSummary_AllParameters_Convenience_Async() + public void Example_Task_GetTask_ShortVersion_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - ReportAssetSummaryPayload body = new ReportAssetSummaryPayload - { - MetricCategories = { "" }, - Metrics = { "" }, - Filters = { "" }, - GroupBy = "", - SegmentBy = "", - LabelName = "", - }; - Response response = await client.GetSummaryAsync(body); + Response response = client.GetTask(""); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_SavedFilter_GetSavedFilter_ShortVersion() + public async Task Example_Task_GetTask_ShortVersion_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = client.GetSavedFilter("", null); + Response response = await client.GetTaskAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Task_GetTask_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + Response response = client.GetTask("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("startedAt").ToString()); + Console.WriteLine(result.GetProperty("completedAt").ToString()); + Console.WriteLine(result.GetProperty("lastPolledAt").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("phase").ToString()); + Console.WriteLine(result.GetProperty("reason").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_SavedFilter_GetSavedFilter_ShortVersion_Async() + public async Task Example_Task_GetTask_AllParameters_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = await client.GetSavedFilterAsync("", null); + Response response = await client.GetTaskAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("startedAt").ToString()); + Console.WriteLine(result.GetProperty("completedAt").ToString()); + Console.WriteLine(result.GetProperty("lastPolledAt").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("phase").ToString()); + Console.WriteLine(result.GetProperty("reason").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_SavedFilter_GetSavedFilter_ShortVersion_Convenience() + public void Example_Task_GetTask_AllParameters_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = client.GetSavedFilter(""); + Response response = client.GetTask(""); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_SavedFilter_GetSavedFilter_ShortVersion_Convenience_Async() + public async Task Example_Task_GetTask_AllParameters_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = await client.GetSavedFilterAsync(""); + Response response = await client.GetTaskAsync(""); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_SavedFilter_GetSavedFilter_AllParameters() + public void Example_EasmClient_CancelTask_ShortVersion() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = client.GetSavedFilter("", null); + Response response = client.CancelTask("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("filter").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_SavedFilter_GetSavedFilter_AllParameters_Async() + public async Task Example_EasmClient_CancelTask_ShortVersion_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = await client.GetSavedFilterAsync("", null); + Response response = await client.CancelTaskAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("filter").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_SavedFilter_GetSavedFilter_AllParameters_Convenience() + public void Example_EasmClient_CancelTask_ShortVersion_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = client.GetSavedFilter(""); + Response response = client.CancelTask(""); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_SavedFilter_GetSavedFilter_AllParameters_Convenience_Async() + public async Task Example_EasmClient_CancelTask_ShortVersion_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = await client.GetSavedFilterAsync(""); + Response response = await client.CancelTaskAsync(""); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_SavedFilter_CreateOrReplaceSavedFilter_ShortVersion() + public void Example_EasmClient_CancelTask_AllParameters() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - using RequestContent content = RequestContent.Create(new - { - filter = "", - description = "", - }); - Response response = client.CreateOrReplaceSavedFilter("", content); + Response response = client.CancelTask("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("startedAt").ToString()); + Console.WriteLine(result.GetProperty("completedAt").ToString()); + Console.WriteLine(result.GetProperty("lastPolledAt").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("phase").ToString()); + Console.WriteLine(result.GetProperty("reason").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_SavedFilter_CreateOrReplaceSavedFilter_ShortVersion_Async() + public async Task Example_EasmClient_CancelTask_AllParameters_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - using RequestContent content = RequestContent.Create(new - { - filter = "", - description = "", - }); - Response response = await client.CreateOrReplaceSavedFilterAsync("", content); + Response response = await client.CancelTaskAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("startedAt").ToString()); + Console.WriteLine(result.GetProperty("completedAt").ToString()); + Console.WriteLine(result.GetProperty("lastPolledAt").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("phase").ToString()); + Console.WriteLine(result.GetProperty("reason").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_SavedFilter_CreateOrReplaceSavedFilter_ShortVersion_Convenience() + public void Example_EasmClient_CancelTask_AllParameters_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - SavedFilterPayload body = new SavedFilterPayload("", ""); - Response response = client.CreateOrReplaceSavedFilter("", body); + Response response = client.CancelTask(""); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_SavedFilter_CreateOrReplaceSavedFilter_ShortVersion_Convenience_Async() + public async Task Example_EasmClient_CancelTask_AllParameters_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - SavedFilterPayload body = new SavedFilterPayload("", ""); - Response response = await client.CreateOrReplaceSavedFilterAsync("", body); + Response response = await client.CancelTaskAsync(""); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_SavedFilter_CreateOrReplaceSavedFilter_AllParameters() + public void Example_EasmClient_RunTask_ShortVersion() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - using RequestContent content = RequestContent.Create(new - { - filter = "", - description = "", - }); - Response response = client.CreateOrReplaceSavedFilter("", content); + Response response = client.RunTask("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("filter").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_SavedFilter_CreateOrReplaceSavedFilter_AllParameters_Async() + public async Task Example_EasmClient_RunTask_ShortVersion_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - using RequestContent content = RequestContent.Create(new - { - filter = "", - description = "", - }); - Response response = await client.CreateOrReplaceSavedFilterAsync("", content); + Response response = await client.RunTaskAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("filter").ToString()); - Console.WriteLine(result.GetProperty("description").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_SavedFilter_CreateOrReplaceSavedFilter_AllParameters_Convenience() + public void Example_EasmClient_RunTask_ShortVersion_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - SavedFilterPayload body = new SavedFilterPayload("", ""); - Response response = client.CreateOrReplaceSavedFilter("", body); + Response response = client.RunTask(""); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_SavedFilter_CreateOrReplaceSavedFilter_AllParameters_Convenience_Async() + public async Task Example_EasmClient_RunTask_ShortVersion_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - SavedFilterPayload body = new SavedFilterPayload("", ""); - Response response = await client.CreateOrReplaceSavedFilterAsync("", body); + Response response = await client.RunTaskAsync(""); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_SavedFilter_DeleteSavedFilter_ShortVersion() + public void Example_EasmClient_RunTask_AllParameters() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = client.DeleteSavedFilter(""); + Response response = client.RunTask("", null); - Console.WriteLine(response.Status); + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("startedAt").ToString()); + Console.WriteLine(result.GetProperty("completedAt").ToString()); + Console.WriteLine(result.GetProperty("lastPolledAt").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("phase").ToString()); + Console.WriteLine(result.GetProperty("reason").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_SavedFilter_DeleteSavedFilter_ShortVersion_Async() + public async Task Example_EasmClient_RunTask_AllParameters_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = await client.DeleteSavedFilterAsync(""); + Response response = await client.RunTaskAsync("", null); - Console.WriteLine(response.Status); + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("startedAt").ToString()); + Console.WriteLine(result.GetProperty("completedAt").ToString()); + Console.WriteLine(result.GetProperty("lastPolledAt").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("phase").ToString()); + Console.WriteLine(result.GetProperty("reason").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_SavedFilter_DeleteSavedFilter_AllParameters() + public void Example_EasmClient_RunTask_AllParameters_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = client.DeleteSavedFilter(""); - - Console.WriteLine(response.Status); + Response response = client.RunTask(""); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_SavedFilter_DeleteSavedFilter_AllParameters_Async() + public async Task Example_EasmClient_RunTask_AllParameters_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = await client.DeleteSavedFilterAsync(""); - - Console.WriteLine(response.Status); + Response response = await client.RunTaskAsync(""); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Task_GetTask_ShortVersion() + public void Example_EasmClient_DownloadTask_ShortVersion() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = client.GetTask("", null); + Response response = client.DownloadTask("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -2362,13 +3667,13 @@ public void Example_Task_GetTask_ShortVersion() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Task_GetTask_ShortVersion_Async() + public async Task Example_EasmClient_DownloadTask_ShortVersion_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = await client.GetTaskAsync("", null); + Response response = await client.DownloadTaskAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -2376,35 +3681,35 @@ public async Task Example_Task_GetTask_ShortVersion_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Task_GetTask_ShortVersion_Convenience() + public void Example_EasmClient_DownloadTask_ShortVersion_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = client.GetTask(""); + Response response = client.DownloadTask(""); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Task_GetTask_ShortVersion_Convenience_Async() + public async Task Example_EasmClient_DownloadTask_ShortVersion_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = await client.GetTaskAsync(""); + Response response = await client.DownloadTaskAsync(""); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Task_GetTask_AllParameters() + public void Example_EasmClient_DownloadTask_AllParameters() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = client.GetTask("", null); + Response response = client.DownloadTask("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -2419,13 +3724,13 @@ public void Example_Task_GetTask_AllParameters() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Task_GetTask_AllParameters_Async() + public async Task Example_EasmClient_DownloadTask_AllParameters_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = await client.GetTaskAsync("", null); + Response response = await client.DownloadTaskAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -2440,138 +3745,164 @@ public async Task Example_Task_GetTask_AllParameters_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Task_GetTask_AllParameters_Convenience() + public void Example_EasmClient_DownloadTask_AllParameters_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = client.GetTask(""); + Response response = client.DownloadTask(""); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Task_GetTask_AllParameters_Convenience_Async() + public async Task Example_EasmClient_DownloadTask_AllParameters_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = await client.GetTaskAsync(""); + Response response = await client.DownloadTaskAsync(""); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_EasmClient_CancelTask_ShortVersion() + public void Example_CisaCveResult_GetCisaCve_ShortVersion() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = client.CancelTask("", null); + Response response = client.GetCisaCve("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("cveId").ToString()); + Console.WriteLine(result.GetProperty("vendorProject").ToString()); + Console.WriteLine(result.GetProperty("product").ToString()); + Console.WriteLine(result.GetProperty("vulnerabilityName").ToString()); + Console.WriteLine(result.GetProperty("shortDescription").ToString()); + Console.WriteLine(result.GetProperty("requiredAction").ToString()); + Console.WriteLine(result.GetProperty("notes").ToString()); + Console.WriteLine(result.GetProperty("dateAdded").ToString()); + Console.WriteLine(result.GetProperty("dueDate").ToString()); + Console.WriteLine(result.GetProperty("updatedAt").ToString()); + Console.WriteLine(result.GetProperty("count").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EasmClient_CancelTask_ShortVersion_Async() + public async Task Example_CisaCveResult_GetCisaCve_ShortVersion_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = await client.CancelTaskAsync("", null); + Response response = await client.GetCisaCveAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("cveId").ToString()); + Console.WriteLine(result.GetProperty("vendorProject").ToString()); + Console.WriteLine(result.GetProperty("product").ToString()); + Console.WriteLine(result.GetProperty("vulnerabilityName").ToString()); + Console.WriteLine(result.GetProperty("shortDescription").ToString()); + Console.WriteLine(result.GetProperty("requiredAction").ToString()); + Console.WriteLine(result.GetProperty("notes").ToString()); + Console.WriteLine(result.GetProperty("dateAdded").ToString()); + Console.WriteLine(result.GetProperty("dueDate").ToString()); + Console.WriteLine(result.GetProperty("updatedAt").ToString()); + Console.WriteLine(result.GetProperty("count").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_EasmClient_CancelTask_ShortVersion_Convenience() + public void Example_CisaCveResult_GetCisaCve_ShortVersion_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = client.CancelTask(""); + Response response = client.GetCisaCve(""); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EasmClient_CancelTask_ShortVersion_Convenience_Async() + public async Task Example_CisaCveResult_GetCisaCve_ShortVersion_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = await client.CancelTaskAsync(""); + Response response = await client.GetCisaCveAsync(""); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_EasmClient_CancelTask_AllParameters() + public void Example_CisaCveResult_GetCisaCve_AllParameters() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = client.CancelTask("", null); + Response response = client.GetCisaCve("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("startedAt").ToString()); - Console.WriteLine(result.GetProperty("completedAt").ToString()); - Console.WriteLine(result.GetProperty("lastPolledAt").ToString()); - Console.WriteLine(result.GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("phase").ToString()); - Console.WriteLine(result.GetProperty("reason").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("cveId").ToString()); + Console.WriteLine(result.GetProperty("vendorProject").ToString()); + Console.WriteLine(result.GetProperty("product").ToString()); + Console.WriteLine(result.GetProperty("vulnerabilityName").ToString()); + Console.WriteLine(result.GetProperty("shortDescription").ToString()); + Console.WriteLine(result.GetProperty("requiredAction").ToString()); + Console.WriteLine(result.GetProperty("notes").ToString()); + Console.WriteLine(result.GetProperty("dateAdded").ToString()); + Console.WriteLine(result.GetProperty("dueDate").ToString()); + Console.WriteLine(result.GetProperty("updatedAt").ToString()); + Console.WriteLine(result.GetProperty("count").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EasmClient_CancelTask_AllParameters_Async() + public async Task Example_CisaCveResult_GetCisaCve_AllParameters_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = await client.CancelTaskAsync("", null); + Response response = await client.GetCisaCveAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("id").ToString()); - Console.WriteLine(result.GetProperty("startedAt").ToString()); - Console.WriteLine(result.GetProperty("completedAt").ToString()); - Console.WriteLine(result.GetProperty("lastPolledAt").ToString()); - Console.WriteLine(result.GetProperty("state").ToString()); - Console.WriteLine(result.GetProperty("phase").ToString()); - Console.WriteLine(result.GetProperty("reason").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("cveId").ToString()); + Console.WriteLine(result.GetProperty("vendorProject").ToString()); + Console.WriteLine(result.GetProperty("product").ToString()); + Console.WriteLine(result.GetProperty("vulnerabilityName").ToString()); + Console.WriteLine(result.GetProperty("shortDescription").ToString()); + Console.WriteLine(result.GetProperty("requiredAction").ToString()); + Console.WriteLine(result.GetProperty("notes").ToString()); + Console.WriteLine(result.GetProperty("dateAdded").ToString()); + Console.WriteLine(result.GetProperty("dueDate").ToString()); + Console.WriteLine(result.GetProperty("updatedAt").ToString()); + Console.WriteLine(result.GetProperty("count").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_EasmClient_CancelTask_AllParameters_Convenience() + public void Example_CisaCveResult_GetCisaCve_AllParameters_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = client.CancelTask(""); + Response response = client.GetCisaCve(""); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EasmClient_CancelTask_AllParameters_Convenience_Async() + public async Task Example_CisaCveResult_GetCisaCve_AllParameters_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - Response response = await client.CancelTaskAsync(""); + Response response = await client.GetCisaCveAsync(""); } [Test] @@ -2582,7 +3913,7 @@ public void Example_AssetResource_GetAssetResources_ShortVersion() TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - foreach (BinaryData item in client.GetAssetResources(null, null, null, null, null, null)) + foreach (BinaryData item in client.GetAssetResources(null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); @@ -2598,7 +3929,7 @@ public async Task Example_AssetResource_GetAssetResources_ShortVersion_Async() TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - await foreach (BinaryData item in client.GetAssetResourcesAsync(null, null, null, null, null, null)) + await foreach (BinaryData item in client.GetAssetResourcesAsync(null, null, null, null, null, null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); @@ -2640,7 +3971,7 @@ public void Example_AssetResource_GetAssetResources_AllParameters() TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - foreach (BinaryData item in client.GetAssetResources("", "", 1234, 1234, "", null)) + foreach (BinaryData item in client.GetAssetResources("", "", 1234, 1234, "", "id", new string[] { "" }, true, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); @@ -2672,7 +4003,7 @@ public async Task Example_AssetResource_GetAssetResources_AllParameters_Async() TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - await foreach (BinaryData item in client.GetAssetResourcesAsync("", "", 1234, 1234, "", null)) + await foreach (BinaryData item in client.GetAssetResourcesAsync("", "", 1234, 1234, "", "id", new string[] { "" }, true, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); @@ -2704,7 +4035,7 @@ public void Example_AssetResource_GetAssetResources_AllParameters_Convenience() TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - foreach (AssetResource item in client.GetAssetResources(filter: "", orderby: "", skip: 1234, maxpagesize: 1234, mark: "")) + foreach (AssetResource item in client.GetAssetResources(filter: "", orderby: "", skip: 1234, maxpagesize: 1234, mark: "", responseType: AssetResponseType.Id, responseIncludes: new string[] { "" }, recentOnly: true)) { } } @@ -2717,7 +4048,171 @@ public async Task Example_AssetResource_GetAssetResources_AllParameters_Convenie TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - await foreach (AssetResource item in client.GetAssetResourcesAsync(filter: "", orderby: "", skip: 1234, maxpagesize: 1234, mark: "")) + await foreach (AssetResource item in client.GetAssetResourcesAsync(filter: "", orderby: "", skip: 1234, maxpagesize: 1234, mark: "", responseType: AssetResponseType.Id, responseIncludes: new string[] { "" }, recentOnly: true)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_EasmClient_GetDeltaDetails_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + deltaDetailType = "added", + kind = "page", + }); + foreach (BinaryData item in client.GetDeltaDetails(content)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("createdAt").ToString()); + Console.WriteLine(result.GetProperty("updatedAt").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_EasmClient_GetDeltaDetails_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + deltaDetailType = "added", + kind = "page", + }); + await foreach (BinaryData item in client.GetDeltaDetailsAsync(content)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("createdAt").ToString()); + Console.WriteLine(result.GetProperty("updatedAt").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_EasmClient_GetDeltaDetails_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + DeltaDetailsRequest body = new DeltaDetailsRequest(DeltaDetailType.Added, GlobalAssetType.Page); + foreach (DeltaResult item in client.GetDeltaDetails(body)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_EasmClient_GetDeltaDetails_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + DeltaDetailsRequest body = new DeltaDetailsRequest(DeltaDetailType.Added, GlobalAssetType.Page); + await foreach (DeltaResult item in client.GetDeltaDetailsAsync(body)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_EasmClient_GetDeltaDetails_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + deltaDetailType = "added", + priorDays = 1234, + kind = "page", + date = "", + }); + foreach (BinaryData item in client.GetDeltaDetails(content, skip: 1234, maxpagesize: 1234)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("createdAt").ToString()); + Console.WriteLine(result.GetProperty("updatedAt").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_EasmClient_GetDeltaDetails_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + deltaDetailType = "added", + priorDays = 1234, + kind = "page", + date = "", + }); + await foreach (BinaryData item in client.GetDeltaDetailsAsync(content, skip: 1234, maxpagesize: 1234)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("createdAt").ToString()); + Console.WriteLine(result.GetProperty("updatedAt").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_EasmClient_GetDeltaDetails_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + DeltaDetailsRequest body = new DeltaDetailsRequest(DeltaDetailType.Added, GlobalAssetType.Page) + { + PriorDays = 1234, + Date = "", + }; + foreach (DeltaResult item in client.GetDeltaDetails(body, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_EasmClient_GetDeltaDetails_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + DeltaDetailsRequest body = new DeltaDetailsRequest(DeltaDetailType.Added, GlobalAssetType.Page) + { + PriorDays = 1234, + Date = "", + }; + await foreach (DeltaResult item in client.GetDeltaDetailsAsync(body, skip: 1234, maxpagesize: 1234)) { } } @@ -2860,13 +4355,13 @@ public async Task Example_DataConnection_GetDataConnections_AllParameters_Conven [Test] [Ignore("Only validating compilation of examples")] - public void Example_DiscoGroup_GetDiscoveryGroups_ShortVersion() + public void Example_DiscoGroup_GetDiscoGroups_ShortVersion() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - foreach (BinaryData item in client.GetDiscoveryGroups(null, null, null, null)) + foreach (BinaryData item in client.GetDiscoGroups(null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -2875,13 +4370,13 @@ public void Example_DiscoGroup_GetDiscoveryGroups_ShortVersion() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DiscoGroup_GetDiscoveryGroups_ShortVersion_Async() + public async Task Example_DiscoGroup_GetDiscoGroups_ShortVersion_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - await foreach (BinaryData item in client.GetDiscoveryGroupsAsync(null, null, null, null)) + await foreach (BinaryData item in client.GetDiscoGroupsAsync(null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -2890,39 +4385,39 @@ public async Task Example_DiscoGroup_GetDiscoveryGroups_ShortVersion_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_DiscoGroup_GetDiscoveryGroups_ShortVersion_Convenience() + public void Example_DiscoGroup_GetDiscoGroups_ShortVersion_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - foreach (DiscoveryGroup item in client.GetDiscoveryGroups()) + foreach (DiscoveryGroup item in client.GetDiscoGroups()) { } } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DiscoGroup_GetDiscoveryGroups_ShortVersion_Convenience_Async() + public async Task Example_DiscoGroup_GetDiscoGroups_ShortVersion_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - await foreach (DiscoveryGroup item in client.GetDiscoveryGroupsAsync()) + await foreach (DiscoveryGroup item in client.GetDiscoGroupsAsync()) { } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DiscoGroup_GetDiscoveryGroups_AllParameters() + public void Example_DiscoGroup_GetDiscoGroups_AllParameters() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - foreach (BinaryData item in client.GetDiscoveryGroups("", 1234, 1234, null)) + foreach (BinaryData item in client.GetDiscoGroups("", 1234, 1234, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -2954,13 +4449,13 @@ public void Example_DiscoGroup_GetDiscoveryGroups_AllParameters() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DiscoGroup_GetDiscoveryGroups_AllParameters_Async() + public async Task Example_DiscoGroup_GetDiscoGroups_AllParameters_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - await foreach (BinaryData item in client.GetDiscoveryGroupsAsync("", 1234, 1234, null)) + await foreach (BinaryData item in client.GetDiscoGroupsAsync("", 1234, 1234, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -2992,39 +4487,39 @@ public async Task Example_DiscoGroup_GetDiscoveryGroups_AllParameters_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_DiscoGroup_GetDiscoveryGroups_AllParameters_Convenience() + public void Example_DiscoGroup_GetDiscoGroups_AllParameters_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - foreach (DiscoveryGroup item in client.GetDiscoveryGroups(filter: "", skip: 1234, maxpagesize: 1234)) + foreach (DiscoveryGroup item in client.GetDiscoGroups(filter: "", skip: 1234, maxpagesize: 1234)) { } } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DiscoGroup_GetDiscoveryGroups_AllParameters_Convenience_Async() + public async Task Example_DiscoGroup_GetDiscoGroups_AllParameters_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - await foreach (DiscoveryGroup item in client.GetDiscoveryGroupsAsync(filter: "", skip: 1234, maxpagesize: 1234)) + await foreach (DiscoveryGroup item in client.GetDiscoGroupsAsync(filter: "", skip: 1234, maxpagesize: 1234)) { } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_EasmClient_GetDiscoveryGroupRuns_ShortVersion() + public void Example_EasmClient_GetRuns_ShortVersion() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - foreach (BinaryData item in client.GetDiscoveryGroupRuns("", null, null, null, null)) + foreach (BinaryData item in client.GetRuns("", null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.ToString()); @@ -3033,13 +4528,13 @@ public void Example_EasmClient_GetDiscoveryGroupRuns_ShortVersion() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EasmClient_GetDiscoveryGroupRuns_ShortVersion_Async() + public async Task Example_EasmClient_GetRuns_ShortVersion_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - await foreach (BinaryData item in client.GetDiscoveryGroupRunsAsync("", null, null, null, null)) + await foreach (BinaryData item in client.GetRunsAsync("", null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.ToString()); @@ -3048,39 +4543,39 @@ public async Task Example_EasmClient_GetDiscoveryGroupRuns_ShortVersion_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_EasmClient_GetDiscoveryGroupRuns_ShortVersion_Convenience() + public void Example_EasmClient_GetRuns_ShortVersion_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - foreach (DiscoveryRunResult item in client.GetDiscoveryGroupRuns("")) + foreach (DiscoveryRunResult item in client.GetRuns("")) { } } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EasmClient_GetDiscoveryGroupRuns_ShortVersion_Convenience_Async() + public async Task Example_EasmClient_GetRuns_ShortVersion_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - await foreach (DiscoveryRunResult item in client.GetDiscoveryGroupRunsAsync("")) + await foreach (DiscoveryRunResult item in client.GetRunsAsync("")) { } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_EasmClient_GetDiscoveryGroupRuns_AllParameters() + public void Example_EasmClient_GetRuns_AllParameters() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - foreach (BinaryData item in client.GetDiscoveryGroupRuns("", "", 1234, 1234, null)) + foreach (BinaryData item in client.GetRuns("", "", 1234, 1234, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("submittedDate").ToString()); @@ -3099,13 +4594,13 @@ public void Example_EasmClient_GetDiscoveryGroupRuns_AllParameters() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EasmClient_GetDiscoveryGroupRuns_AllParameters_Async() + public async Task Example_EasmClient_GetRuns_AllParameters_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - await foreach (BinaryData item in client.GetDiscoveryGroupRunsAsync("", "", 1234, 1234, null)) + await foreach (BinaryData item in client.GetRunsAsync("", "", 1234, 1234, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("submittedDate").ToString()); @@ -3124,39 +4619,39 @@ public async Task Example_EasmClient_GetDiscoveryGroupRuns_AllParameters_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_EasmClient_GetDiscoveryGroupRuns_AllParameters_Convenience() + public void Example_EasmClient_GetRuns_AllParameters_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - foreach (DiscoveryRunResult item in client.GetDiscoveryGroupRuns("", filter: "", skip: 1234, maxpagesize: 1234)) + foreach (DiscoveryRunResult item in client.GetRuns("", filter: "", skip: 1234, maxpagesize: 1234)) { } } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EasmClient_GetDiscoveryGroupRuns_AllParameters_Convenience_Async() + public async Task Example_EasmClient_GetRuns_AllParameters_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - await foreach (DiscoveryRunResult item in client.GetDiscoveryGroupRunsAsync("", filter: "", skip: 1234, maxpagesize: 1234)) + await foreach (DiscoveryRunResult item in client.GetRunsAsync("", filter: "", skip: 1234, maxpagesize: 1234)) { } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DiscoTemplate_GetDiscoveryTemplates_ShortVersion() + public void Example_DiscoTemplate_GetDiscoTemplates_ShortVersion() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - foreach (BinaryData item in client.GetDiscoveryTemplates(null, null, null, null)) + foreach (BinaryData item in client.GetDiscoTemplates(null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -3165,13 +4660,13 @@ public void Example_DiscoTemplate_GetDiscoveryTemplates_ShortVersion() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DiscoTemplate_GetDiscoveryTemplates_ShortVersion_Async() + public async Task Example_DiscoTemplate_GetDiscoTemplates_ShortVersion_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - await foreach (BinaryData item in client.GetDiscoveryTemplatesAsync(null, null, null, null)) + await foreach (BinaryData item in client.GetDiscoTemplatesAsync(null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -3180,39 +4675,39 @@ public async Task Example_DiscoTemplate_GetDiscoveryTemplates_ShortVersion_Async [Test] [Ignore("Only validating compilation of examples")] - public void Example_DiscoTemplate_GetDiscoveryTemplates_ShortVersion_Convenience() + public void Example_DiscoTemplate_GetDiscoTemplates_ShortVersion_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - foreach (DiscoveryTemplate item in client.GetDiscoveryTemplates()) + foreach (DiscoveryTemplate item in client.GetDiscoTemplates()) { } } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DiscoTemplate_GetDiscoveryTemplates_ShortVersion_Convenience_Async() + public async Task Example_DiscoTemplate_GetDiscoTemplates_ShortVersion_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - await foreach (DiscoveryTemplate item in client.GetDiscoveryTemplatesAsync()) + await foreach (DiscoveryTemplate item in client.GetDiscoTemplatesAsync()) { } } [Test] [Ignore("Only validating compilation of examples")] - public void Example_DiscoTemplate_GetDiscoveryTemplates_AllParameters() + public void Example_DiscoTemplate_GetDiscoTemplates_AllParameters() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - foreach (BinaryData item in client.GetDiscoveryTemplates("", 1234, 1234, null)) + foreach (BinaryData item in client.GetDiscoTemplates("", 1234, 1234, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -3231,13 +4726,13 @@ public void Example_DiscoTemplate_GetDiscoveryTemplates_AllParameters() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DiscoTemplate_GetDiscoveryTemplates_AllParameters_Async() + public async Task Example_DiscoTemplate_GetDiscoTemplates_AllParameters_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - await foreach (BinaryData item in client.GetDiscoveryTemplatesAsync("", 1234, 1234, null)) + await foreach (BinaryData item in client.GetDiscoTemplatesAsync("", 1234, 1234, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); @@ -3256,26 +4751,26 @@ public async Task Example_DiscoTemplate_GetDiscoveryTemplates_AllParameters_Asyn [Test] [Ignore("Only validating compilation of examples")] - public void Example_DiscoTemplate_GetDiscoveryTemplates_AllParameters_Convenience() + public void Example_DiscoTemplate_GetDiscoTemplates_AllParameters_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - foreach (DiscoveryTemplate item in client.GetDiscoveryTemplates(filter: "", skip: 1234, maxpagesize: 1234)) + foreach (DiscoveryTemplate item in client.GetDiscoTemplates(filter: "", skip: 1234, maxpagesize: 1234)) { } } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_DiscoTemplate_GetDiscoveryTemplates_AllParameters_Convenience_Async() + public async Task Example_DiscoTemplate_GetDiscoTemplates_AllParameters_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - await foreach (DiscoveryTemplate item in client.GetDiscoveryTemplatesAsync(filter: "", skip: 1234, maxpagesize: 1234)) + await foreach (DiscoveryTemplate item in client.GetDiscoTemplatesAsync(filter: "", skip: 1234, maxpagesize: 1234)) { } } @@ -3525,5 +5020,157 @@ public async Task Example_Task_GetTasks_AllParameters_Convenience_Async() { } } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_CisaCveResult_GetCisaCves_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + foreach (BinaryData item in client.GetCisaCves(null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("cveId").ToString()); + Console.WriteLine(result.GetProperty("vendorProject").ToString()); + Console.WriteLine(result.GetProperty("product").ToString()); + Console.WriteLine(result.GetProperty("vulnerabilityName").ToString()); + Console.WriteLine(result.GetProperty("shortDescription").ToString()); + Console.WriteLine(result.GetProperty("requiredAction").ToString()); + Console.WriteLine(result.GetProperty("notes").ToString()); + Console.WriteLine(result.GetProperty("dateAdded").ToString()); + Console.WriteLine(result.GetProperty("dueDate").ToString()); + Console.WriteLine(result.GetProperty("updatedAt").ToString()); + Console.WriteLine(result.GetProperty("count").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_CisaCveResult_GetCisaCves_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + await foreach (BinaryData item in client.GetCisaCvesAsync(null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("cveId").ToString()); + Console.WriteLine(result.GetProperty("vendorProject").ToString()); + Console.WriteLine(result.GetProperty("product").ToString()); + Console.WriteLine(result.GetProperty("vulnerabilityName").ToString()); + Console.WriteLine(result.GetProperty("shortDescription").ToString()); + Console.WriteLine(result.GetProperty("requiredAction").ToString()); + Console.WriteLine(result.GetProperty("notes").ToString()); + Console.WriteLine(result.GetProperty("dateAdded").ToString()); + Console.WriteLine(result.GetProperty("dueDate").ToString()); + Console.WriteLine(result.GetProperty("updatedAt").ToString()); + Console.WriteLine(result.GetProperty("count").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_CisaCveResult_GetCisaCves_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + foreach (CisaCveResult item in client.GetCisaCves()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_CisaCveResult_GetCisaCves_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + await foreach (CisaCveResult item in client.GetCisaCvesAsync()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_CisaCveResult_GetCisaCves_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + foreach (BinaryData item in client.GetCisaCves(null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("cveId").ToString()); + Console.WriteLine(result.GetProperty("vendorProject").ToString()); + Console.WriteLine(result.GetProperty("product").ToString()); + Console.WriteLine(result.GetProperty("vulnerabilityName").ToString()); + Console.WriteLine(result.GetProperty("shortDescription").ToString()); + Console.WriteLine(result.GetProperty("requiredAction").ToString()); + Console.WriteLine(result.GetProperty("notes").ToString()); + Console.WriteLine(result.GetProperty("dateAdded").ToString()); + Console.WriteLine(result.GetProperty("dueDate").ToString()); + Console.WriteLine(result.GetProperty("updatedAt").ToString()); + Console.WriteLine(result.GetProperty("count").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_CisaCveResult_GetCisaCves_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + await foreach (BinaryData item in client.GetCisaCvesAsync(null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("cveId").ToString()); + Console.WriteLine(result.GetProperty("vendorProject").ToString()); + Console.WriteLine(result.GetProperty("product").ToString()); + Console.WriteLine(result.GetProperty("vulnerabilityName").ToString()); + Console.WriteLine(result.GetProperty("shortDescription").ToString()); + Console.WriteLine(result.GetProperty("requiredAction").ToString()); + Console.WriteLine(result.GetProperty("notes").ToString()); + Console.WriteLine(result.GetProperty("dateAdded").ToString()); + Console.WriteLine(result.GetProperty("dueDate").ToString()); + Console.WriteLine(result.GetProperty("updatedAt").ToString()); + Console.WriteLine(result.GetProperty("count").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_CisaCveResult_GetCisaCves_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + foreach (CisaCveResult item in client.GetCisaCves()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_CisaCveResult_GetCisaCves_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + EasmClient client = new EasmClient(endpoint, credential); + + await foreach (CisaCveResult item in client.GetCisaCvesAsync()) + { + } + } } } diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/tsp-location.yaml b/sdk/easm/Azure.Analytics.Defender.Easm/tsp-location.yaml index 506ec154280a..e57119be5e78 100644 --- a/sdk/easm/Azure.Analytics.Defender.Easm/tsp-location.yaml +++ b/sdk/easm/Azure.Analytics.Defender.Easm/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/riskiq/Easm -commit: 823fa0c70ae5dc9d4693f65dde6b5e943e8183b4 -repo: Azure/azure-rest-api-specs - +commit: 1060fcd8c4857cf9321bc9c66964cadef23e4805 +repo: test-repo-billy/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/api/Azure.ResourceManager.OracleDatabase.netstandard2.0.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/api/Azure.ResourceManager.OracleDatabase.netstandard2.0.cs index 9fe09cbe59a5..7aea4936bcdc 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/api/Azure.ResourceManager.OracleDatabase.netstandard2.0.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/api/Azure.ResourceManager.OracleDatabase.netstandard2.0.cs @@ -64,7 +64,7 @@ protected AutonomousDatabaseCharacterSetCollection() { } public partial class AutonomousDatabaseCharacterSetData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public AutonomousDatabaseCharacterSetData() { } - public string AutonomousDatabaseCharacterSet { get { throw null; } set { } } + public string AutonomousDatabaseCharacterSet { get { throw null; } } Azure.ResourceManager.OracleDatabase.AutonomousDatabaseCharacterSetData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.OracleDatabase.AutonomousDatabaseCharacterSetData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -131,7 +131,7 @@ protected AutonomousDatabaseNationalCharacterSetCollection() { } public partial class AutonomousDatabaseNationalCharacterSetData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public AutonomousDatabaseNationalCharacterSetData() { } - public string AutonomousDatabaseNationalCharacterSet { get { throw null; } set { } } + public string AutonomousDatabaseNationalCharacterSet { get { throw null; } } Azure.ResourceManager.OracleDatabase.AutonomousDatabaseNationalCharacterSetData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.OracleDatabase.AutonomousDatabaseNationalCharacterSetData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -678,7 +678,7 @@ protected OracleGIVersionCollection() { } public partial class OracleGIVersionData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public OracleGIVersionData() { } - public string OracleGIVersion { get { throw null; } set { } } + public string OracleGIVersion { get { throw null; } } Azure.ResourceManager.OracleDatabase.OracleGIVersionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.OracleDatabase.OracleGIVersionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -717,6 +717,8 @@ public partial class OracleSubscriptionResource : Azure.ResourceManager.ArmResou protected OracleSubscriptionResource() { } public virtual Azure.ResourceManager.OracleDatabase.OracleSubscriptionData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } + public virtual Azure.ResourceManager.ArmOperation AddAzureSubscriptions(Azure.WaitUntil waitUntil, Azure.ResourceManager.OracleDatabase.Models.AzureSubscriptions body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task AddAzureSubscriptionsAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.OracleDatabase.Models.AzureSubscriptions body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, Azure.ResourceManager.OracleDatabase.OracleSubscriptionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.OracleDatabase.OracleSubscriptionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId) { throw null; } @@ -756,7 +758,7 @@ protected OracleSystemVersionCollection() { } public partial class OracleSystemVersionData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public OracleSystemVersionData() { } - public string OracleSystemVersion { get { throw null; } set { } } + public string OracleSystemVersion { get { throw null; } } Azure.ResourceManager.OracleDatabase.OracleSystemVersionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.OracleDatabase.OracleSystemVersionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -852,6 +854,25 @@ protected MockableOracleDatabaseSubscriptionResource() { } } namespace Azure.ResourceManager.OracleDatabase.Models { + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AddSubscriptionOperationState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AddSubscriptionOperationState(string value) { throw null; } + public static Azure.ResourceManager.OracleDatabase.Models.AddSubscriptionOperationState Failed { get { throw null; } } + public static Azure.ResourceManager.OracleDatabase.Models.AddSubscriptionOperationState Succeeded { get { throw null; } } + public static Azure.ResourceManager.OracleDatabase.Models.AddSubscriptionOperationState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.OracleDatabase.Models.AddSubscriptionOperationState 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.OracleDatabase.Models.AddSubscriptionOperationState left, Azure.ResourceManager.OracleDatabase.Models.AddSubscriptionOperationState right) { throw null; } + public static implicit operator Azure.ResourceManager.OracleDatabase.Models.AddSubscriptionOperationState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.OracleDatabase.Models.AddSubscriptionOperationState left, Azure.ResourceManager.OracleDatabase.Models.AddSubscriptionOperationState right) { throw null; } + public override string ToString() { throw null; } + } public static partial class ArmOracleDatabaseModelFactory { public static Azure.ResourceManager.OracleDatabase.AutonomousDatabaseBackupData AutonomousDatabaseBackupData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.OracleDatabase.Models.AutonomousDatabaseBackupProperties properties = null) { throw null; } @@ -889,14 +910,16 @@ public static partial class ArmOracleDatabaseModelFactory public static Azure.ResourceManager.OracleDatabase.OracleDBServerData OracleDBServerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.OracleDatabase.Models.OracleDBServerProperties properties = null) { throw null; } public static Azure.ResourceManager.OracleDatabase.Models.OracleDBServerProperties OracleDBServerProperties(Azure.Core.ResourceIdentifier ocid = null, string displayName = null, Azure.Core.ResourceIdentifier compartmentId = null, Azure.Core.ResourceIdentifier exadataInfrastructureId = null, int? cpuCoreCount = default(int?), Azure.ResourceManager.OracleDatabase.Models.DBServerPatchingDetails dbServerPatchingDetails = null, int? maxMemoryInGbs = default(int?), int? dbNodeStorageSizeInGbs = default(int?), System.Collections.Generic.IEnumerable vmClusterIds = null, System.Collections.Generic.IEnumerable dbNodeIds = null, string lifecycleDetails = null, Azure.ResourceManager.OracleDatabase.Models.DBServerProvisioningState? lifecycleState = default(Azure.ResourceManager.OracleDatabase.Models.DBServerProvisioningState?), int? maxCpuCount = default(int?), System.Collections.Generic.IEnumerable autonomousVmClusterIds = null, System.Collections.Generic.IEnumerable autonomousVirtualMachineIds = null, int? maxDBNodeStorageInGbs = default(int?), int? memorySizeInGbs = default(int?), string shape = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), Azure.ResourceManager.OracleDatabase.Models.OracleDatabaseResourceProvisioningState? provisioningState = default(Azure.ResourceManager.OracleDatabase.Models.OracleDatabaseResourceProvisioningState?)) { throw null; } public static Azure.ResourceManager.OracleDatabase.OracleDBSystemShapeData OracleDBSystemShapeData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.OracleDatabase.Models.OracleDBSystemShapeProperties properties = null) { throw null; } - public static Azure.ResourceManager.OracleDatabase.Models.OracleDBSystemShapeProperties OracleDBSystemShapeProperties(string shapeFamily = null, int availableCoreCount = 0, int? minimumCoreCount = default(int?), int? runtimeMinimumCoreCount = default(int?), int? coreCountIncrement = default(int?), int? minStorageCount = default(int?), int? maxStorageCount = default(int?), double? availableDataStoragePerServerInTbs = default(double?), int? availableMemoryPerNodeInGbs = default(int?), int? availableDBNodePerNodeInGbs = default(int?), int? minCoreCountPerNode = default(int?), int? availableMemoryInGbs = default(int?), int? minMemoryPerNodeInGbs = default(int?), int? availableDBNodeStorageInGbs = default(int?), int? minDBNodeStoragePerNodeInGbs = default(int?), int? availableDataStorageInTbs = default(int?), int? minDataStorageInTbs = default(int?), int? minimumNodeCount = default(int?), int? maximumNodeCount = default(int?), int? availableCoreCountPerNode = default(int?)) { throw null; } + public static Azure.ResourceManager.OracleDatabase.Models.OracleDBSystemShapeProperties OracleDBSystemShapeProperties(string shapeFamily = null, int? availableCoreCount = default(int?), int? minimumCoreCount = default(int?), int? runtimeMinimumCoreCount = default(int?), int? coreCountIncrement = default(int?), int? minStorageCount = default(int?), int? maxStorageCount = default(int?), double? availableDataStoragePerServerInTbs = default(double?), int? availableMemoryPerNodeInGbs = default(int?), int? availableDBNodePerNodeInGbs = default(int?), int? minCoreCountPerNode = default(int?), int? availableMemoryInGbs = default(int?), int? minMemoryPerNodeInGbs = default(int?), int? availableDBNodeStorageInGbs = default(int?), int? minDBNodeStoragePerNodeInGbs = default(int?), int? availableDataStorageInTbs = default(int?), int? minDataStorageInTbs = default(int?), int? minimumNodeCount = default(int?), int? maximumNodeCount = default(int?), int? availableCoreCountPerNode = default(int?)) { throw null; } public static Azure.ResourceManager.OracleDatabase.OracleDnsPrivateViewData OracleDnsPrivateViewData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.OracleDatabase.Models.OracleDnsPrivateViewProperties properties = null) { throw null; } - public static Azure.ResourceManager.OracleDatabase.Models.OracleDnsPrivateViewProperties OracleDnsPrivateViewProperties(Azure.Core.ResourceIdentifier ocid = null, string displayName = null, bool isProtected = false, Azure.ResourceManager.OracleDatabase.Models.DnsPrivateViewsLifecycleState? lifecycleState = default(Azure.ResourceManager.OracleDatabase.Models.DnsPrivateViewsLifecycleState?), string self = null, System.DateTimeOffset createdOn = default(System.DateTimeOffset), System.DateTimeOffset updatedOn = default(System.DateTimeOffset), Azure.ResourceManager.OracleDatabase.Models.OracleDatabaseResourceProvisioningState? provisioningState = default(Azure.ResourceManager.OracleDatabase.Models.OracleDatabaseResourceProvisioningState?)) { throw null; } + public static Azure.ResourceManager.OracleDatabase.Models.OracleDnsPrivateViewProperties OracleDnsPrivateViewProperties(Azure.Core.ResourceIdentifier ocid = null, string displayName = null, bool? isProtected = default(bool?), Azure.ResourceManager.OracleDatabase.Models.DnsPrivateViewsLifecycleState? lifecycleState = default(Azure.ResourceManager.OracleDatabase.Models.DnsPrivateViewsLifecycleState?), string self = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? updatedOn = default(System.DateTimeOffset?), Azure.ResourceManager.OracleDatabase.Models.OracleDatabaseResourceProvisioningState? provisioningState = default(Azure.ResourceManager.OracleDatabase.Models.OracleDatabaseResourceProvisioningState?)) { throw null; } public static Azure.ResourceManager.OracleDatabase.OracleDnsPrivateZoneData OracleDnsPrivateZoneData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.OracleDatabase.Models.OracleDnsPrivateZoneProperties properties = null) { throw null; } - public static Azure.ResourceManager.OracleDatabase.Models.OracleDnsPrivateZoneProperties OracleDnsPrivateZoneProperties(Azure.Core.ResourceIdentifier ocid = null, bool isProtected = false, Azure.ResourceManager.OracleDatabase.Models.DnsPrivateZonesLifecycleState? lifecycleState = default(Azure.ResourceManager.OracleDatabase.Models.DnsPrivateZonesLifecycleState?), string self = null, int serial = 0, string version = null, Azure.Core.ResourceIdentifier viewId = null, Azure.ResourceManager.OracleDatabase.Models.OracleDnsPrivateZoneType zoneType = default(Azure.ResourceManager.OracleDatabase.Models.OracleDnsPrivateZoneType), System.DateTimeOffset createdOn = default(System.DateTimeOffset), Azure.ResourceManager.OracleDatabase.Models.OracleDatabaseResourceProvisioningState? provisioningState = default(Azure.ResourceManager.OracleDatabase.Models.OracleDatabaseResourceProvisioningState?)) { throw null; } + public static Azure.ResourceManager.OracleDatabase.Models.OracleDnsPrivateZoneProperties OracleDnsPrivateZoneProperties(Azure.Core.ResourceIdentifier ocid = null, bool? isProtected = default(bool?), Azure.ResourceManager.OracleDatabase.Models.DnsPrivateZonesLifecycleState? lifecycleState = default(Azure.ResourceManager.OracleDatabase.Models.DnsPrivateZonesLifecycleState?), string self = null, int? serial = default(int?), string version = null, Azure.Core.ResourceIdentifier viewId = null, Azure.ResourceManager.OracleDatabase.Models.OracleDnsPrivateZoneType? zoneType = default(Azure.ResourceManager.OracleDatabase.Models.OracleDnsPrivateZoneType?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), Azure.ResourceManager.OracleDatabase.Models.OracleDatabaseResourceProvisioningState? provisioningState = default(Azure.ResourceManager.OracleDatabase.Models.OracleDatabaseResourceProvisioningState?)) { throw null; } public static Azure.ResourceManager.OracleDatabase.OracleGIVersionData OracleGIVersionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string oracleGIVersion = null) { throw null; } public static Azure.ResourceManager.OracleDatabase.OracleSubscriptionData OracleSubscriptionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.OracleDatabase.Models.OracleSubscriptionProperties properties = null, Azure.ResourceManager.Models.ArmPlan plan = null) { throw null; } - public static Azure.ResourceManager.OracleDatabase.Models.OracleSubscriptionProperties OracleSubscriptionProperties(Azure.ResourceManager.OracleDatabase.Models.OracleSubscriptionProvisioningState? provisioningState = default(Azure.ResourceManager.OracleDatabase.Models.OracleSubscriptionProvisioningState?), string saasSubscriptionId = null, Azure.Core.ResourceIdentifier cloudAccountId = null, Azure.ResourceManager.OracleDatabase.Models.CloudAccountProvisioningState? cloudAccountState = default(Azure.ResourceManager.OracleDatabase.Models.CloudAccountProvisioningState?), string termUnit = null, string productCode = null, Azure.ResourceManager.OracleDatabase.Models.OracleSubscriptionUpdateIntent? intent = default(Azure.ResourceManager.OracleDatabase.Models.OracleSubscriptionUpdateIntent?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.OracleDatabase.Models.OracleSubscriptionProperties OracleSubscriptionProperties(Azure.ResourceManager.OracleDatabase.Models.OracleSubscriptionProvisioningState? provisioningState, string saasSubscriptionId, Azure.Core.ResourceIdentifier cloudAccountId, Azure.ResourceManager.OracleDatabase.Models.CloudAccountProvisioningState? cloudAccountState, string termUnit, string productCode, Azure.ResourceManager.OracleDatabase.Models.OracleSubscriptionUpdateIntent? intent) { throw null; } + public static Azure.ResourceManager.OracleDatabase.Models.OracleSubscriptionProperties OracleSubscriptionProperties(Azure.ResourceManager.OracleDatabase.Models.OracleSubscriptionProvisioningState? provisioningState = default(Azure.ResourceManager.OracleDatabase.Models.OracleSubscriptionProvisioningState?), string saasSubscriptionId = null, Azure.Core.ResourceIdentifier cloudAccountId = null, Azure.ResourceManager.OracleDatabase.Models.CloudAccountProvisioningState? cloudAccountState = default(Azure.ResourceManager.OracleDatabase.Models.CloudAccountProvisioningState?), string termUnit = null, string productCode = null, Azure.ResourceManager.OracleDatabase.Models.OracleSubscriptionUpdateIntent? intent = default(Azure.ResourceManager.OracleDatabase.Models.OracleSubscriptionUpdateIntent?), System.Collections.Generic.IEnumerable azureSubscriptionIds = null, Azure.ResourceManager.OracleDatabase.Models.AddSubscriptionOperationState? addSubscriptionOperationState = default(Azure.ResourceManager.OracleDatabase.Models.AddSubscriptionOperationState?), string lastOperationStatusDetail = null) { throw null; } public static Azure.ResourceManager.OracleDatabase.OracleSystemVersionData OracleSystemVersionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string oracleSystemVersion = null) { throw null; } public static Azure.ResourceManager.OracleDatabase.Models.PrivateIPAddressResult PrivateIPAddressResult(string displayName = null, string hostnameLabel = null, Azure.Core.ResourceIdentifier ocid = null, string ipAddress = null, Azure.Core.ResourceIdentifier subnetId = null) { throw null; } public static Azure.ResourceManager.OracleDatabase.Models.SaasSubscriptionDetails SaasSubscriptionDetails(string id = null, string subscriptionName = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), string offerId = null, string planId = null, string saasSubscriptionStatus = null, string publisherId = null, string purchaserEmailId = null, string purchaserTenantId = null, string termUnit = null, bool? isAutoRenew = default(bool?), bool? isFreeTrial = default(bool?)) { throw null; } @@ -1377,7 +1400,7 @@ internal AutonomousDatabaseWalletFile() { } } public partial class AutonomousDBVersionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public AutonomousDBVersionProperties(string version) { } + public AutonomousDBVersionProperties() { } public Azure.ResourceManager.OracleDatabase.Models.AutonomousDatabaseWorkloadType? DBWorkload { get { throw null; } } public bool? IsDefaultForFree { get { throw null; } } public bool? IsDefaultForPaid { get { throw null; } } @@ -1408,6 +1431,16 @@ public AutonomousDBVersionProperties(string version) { } public static bool operator !=(Azure.ResourceManager.OracleDatabase.Models.AutonomousMaintenanceScheduleType left, Azure.ResourceManager.OracleDatabase.Models.AutonomousMaintenanceScheduleType right) { throw null; } public override string ToString() { throw null; } } + public partial class AzureSubscriptions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AzureSubscriptions(System.Collections.Generic.IEnumerable azureSubscriptionIds) { } + public System.Collections.Generic.IList AzureSubscriptionIds { get { throw null; } } + Azure.ResourceManager.OracleDatabase.Models.AzureSubscriptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.OracleDatabase.Models.AzureSubscriptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class CloudAccountActivationLinks : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal CloudAccountActivationLinks() { } @@ -1550,7 +1583,7 @@ public CloudVmClusterDBNodeContent(System.Collections.Generic.IEnumerable, System.ClientModel.Primitives.IPersistableModel { - public CloudVmClusterDBNodeProperties(Azure.Core.ResourceIdentifier ocid, Azure.Core.ResourceIdentifier dbSystemId) { } + public CloudVmClusterDBNodeProperties() { } public string AdditionalDetails { get { throw null; } } public Azure.Core.ResourceIdentifier BackupIPId { get { throw null; } } public Azure.Core.ResourceIdentifier BackupVnic2Id { get { throw null; } } @@ -2443,8 +2476,8 @@ public OracleDBServerProperties() { } } public partial class OracleDBSystemShapeProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public OracleDBSystemShapeProperties(int availableCoreCount) { } - public int AvailableCoreCount { get { throw null; } } + public OracleDBSystemShapeProperties() { } + public int? AvailableCoreCount { get { throw null; } } public int? AvailableCoreCountPerNode { get { throw null; } } public int? AvailableDataStorageInTbs { get { throw null; } } public double? AvailableDataStoragePerServerInTbs { get { throw null; } } @@ -2472,15 +2505,15 @@ public OracleDBSystemShapeProperties(int availableCoreCount) { } } public partial class OracleDnsPrivateViewProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public OracleDnsPrivateViewProperties(Azure.Core.ResourceIdentifier ocid, bool isProtected, string self, System.DateTimeOffset createdOn, System.DateTimeOffset updatedOn) { } - public System.DateTimeOffset CreatedOn { get { throw null; } } + public OracleDnsPrivateViewProperties() { } + public System.DateTimeOffset? CreatedOn { get { throw null; } } public string DisplayName { get { throw null; } } - public bool IsProtected { get { throw null; } } + public bool? IsProtected { get { throw null; } } public Azure.ResourceManager.OracleDatabase.Models.DnsPrivateViewsLifecycleState? LifecycleState { get { throw null; } } public Azure.Core.ResourceIdentifier Ocid { get { throw null; } } public Azure.ResourceManager.OracleDatabase.Models.OracleDatabaseResourceProvisioningState? ProvisioningState { get { throw null; } } public string Self { get { throw null; } } - public System.DateTimeOffset UpdatedOn { get { throw null; } } + public System.DateTimeOffset? UpdatedOn { get { throw null; } } Azure.ResourceManager.OracleDatabase.Models.OracleDnsPrivateViewProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.OracleDatabase.Models.OracleDnsPrivateViewProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2489,17 +2522,17 @@ public OracleDnsPrivateViewProperties(Azure.Core.ResourceIdentifier ocid, bool i } public partial class OracleDnsPrivateZoneProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public OracleDnsPrivateZoneProperties(Azure.Core.ResourceIdentifier ocid, bool isProtected, string self, int serial, string version, Azure.ResourceManager.OracleDatabase.Models.OracleDnsPrivateZoneType zoneType, System.DateTimeOffset createdOn) { } - public System.DateTimeOffset CreatedOn { get { throw null; } } - public bool IsProtected { get { throw null; } } + public OracleDnsPrivateZoneProperties() { } + public System.DateTimeOffset? CreatedOn { get { throw null; } } + public bool? IsProtected { get { throw null; } } public Azure.ResourceManager.OracleDatabase.Models.DnsPrivateZonesLifecycleState? LifecycleState { get { throw null; } } public Azure.Core.ResourceIdentifier Ocid { get { throw null; } } public Azure.ResourceManager.OracleDatabase.Models.OracleDatabaseResourceProvisioningState? ProvisioningState { get { throw null; } } public string Self { get { throw null; } } - public int Serial { get { throw null; } } + public int? Serial { get { throw null; } } public string Version { get { throw null; } } public Azure.Core.ResourceIdentifier ViewId { get { throw null; } } - public Azure.ResourceManager.OracleDatabase.Models.OracleDnsPrivateZoneType ZoneType { get { throw null; } } + public Azure.ResourceManager.OracleDatabase.Models.OracleDnsPrivateZoneType? ZoneType { get { throw null; } } Azure.ResourceManager.OracleDatabase.Models.OracleDnsPrivateZoneProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.OracleDatabase.Models.OracleDnsPrivateZoneProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2556,9 +2589,12 @@ public OracleSubscriptionPatch() { } public partial class OracleSubscriptionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public OracleSubscriptionProperties() { } + public Azure.ResourceManager.OracleDatabase.Models.AddSubscriptionOperationState? AddSubscriptionOperationState { get { throw null; } } + public System.Collections.Generic.IReadOnlyList AzureSubscriptionIds { get { throw null; } } public Azure.Core.ResourceIdentifier CloudAccountId { get { throw null; } } public Azure.ResourceManager.OracleDatabase.Models.CloudAccountProvisioningState? CloudAccountState { get { throw null; } } public Azure.ResourceManager.OracleDatabase.Models.OracleSubscriptionUpdateIntent? Intent { get { throw null; } set { } } + public string LastOperationStatusDetail { get { throw null; } } public string ProductCode { get { throw null; } set { } } public Azure.ResourceManager.OracleDatabase.Models.OracleSubscriptionProvisioningState? ProvisioningState { get { throw null; } } public string SaasSubscriptionId { get { throw null; } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDBVersionCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDBVersionCollection.cs index c4b69be9a8f8..ea2959a25294 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDBVersionCollection.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDBVersionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_AutonomousDBVersionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAnAutonomousVersionsByLocation() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseVersion_listByLocation.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/autonomousDatabaseVersion_listByLocation.json // this example is just showing the usage of "AutonomousDatabaseVersions_ListByLocation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetAll_ListAnAutonomousVersionsByLocation() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAnAutonomousVersion() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseVersion_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/autonomousDatabaseVersion_get.json // this example is just showing the usage of "AutonomousDatabaseVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -90,7 +90,7 @@ public async Task Get_GetAnAutonomousVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAnAutonomousVersion() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseVersion_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/autonomousDatabaseVersion_get.json // this example is just showing the usage of "AutonomousDatabaseVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -120,7 +120,7 @@ public async Task Exists_GetAnAutonomousVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAnAutonomousVersion() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseVersion_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/autonomousDatabaseVersion_get.json // this example is just showing the usage of "AutonomousDatabaseVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDBVersionResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDBVersionResource.cs index f856d6fb7efc..cdbdd5ffcc0b 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDBVersionResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDBVersionResource.cs @@ -19,7 +19,7 @@ public partial class Sample_AutonomousDBVersionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAnAutonomousVersion() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseVersion_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/autonomousDatabaseVersion_get.json // this example is just showing the usage of "AutonomousDatabaseVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseBackupCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseBackupCollection.cs index 39754185cbdf..37e6b254a6ee 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseBackupCollection.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseBackupCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_AutonomousDatabaseBackupCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_AutonomousDatabaseBackupsListByAutonomousDatabase() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_listByParent.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/autonomousDatabaseBackup_listByParent.json // this example is just showing the usage of "AutonomousDatabaseBackups_ListByAutonomousDatabase" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_AutonomousDatabaseBackupsListByAutonomousDatabase() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAutonomousDatabaseBackupsByAutonomousDatabase() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_listByParent.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/autonomousDatabaseBackup_listByParent.json // this example is just showing the usage of "AutonomousDatabaseBackups_ListByAutonomousDatabase" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -94,7 +94,7 @@ public async Task GetAll_ListAutonomousDatabaseBackupsByAutonomousDatabase() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_AutonomousDatabaseBackupsGet() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/autonomousDatabaseBackup_get.json // this example is just showing the usage of "AutonomousDatabaseBackups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -129,7 +129,7 @@ public async Task Get_AutonomousDatabaseBackupsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_AutonomousDatabaseBackupsGet() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/autonomousDatabaseBackup_get.json // this example is just showing the usage of "AutonomousDatabaseBackups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -160,7 +160,7 @@ public async Task Exists_AutonomousDatabaseBackupsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_AutonomousDatabaseBackupsGet() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/autonomousDatabaseBackup_get.json // this example is just showing the usage of "AutonomousDatabaseBackups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -203,7 +203,7 @@ public async Task GetIfExists_AutonomousDatabaseBackupsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAutonomousDatabaseBackup() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/autonomousDatabaseBackup_get.json // this example is just showing the usage of "AutonomousDatabaseBackups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -238,7 +238,7 @@ public async Task Get_GetAutonomousDatabaseBackup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAutonomousDatabaseBackup() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/autonomousDatabaseBackup_get.json // this example is just showing the usage of "AutonomousDatabaseBackups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -269,7 +269,7 @@ public async Task Exists_GetAutonomousDatabaseBackup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAutonomousDatabaseBackup() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/autonomousDatabaseBackup_get.json // this example is just showing the usage of "AutonomousDatabaseBackups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -312,7 +312,7 @@ public async Task GetIfExists_GetAutonomousDatabaseBackup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_AutonomousDatabaseBackupsCreateOrUpdate() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_create.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/autonomousDatabaseBackup_create.json // this example is just showing the usage of "AutonomousDatabaseBackups_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -356,7 +356,7 @@ public async Task CreateOrUpdate_AutonomousDatabaseBackupsCreateOrUpdate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateAutonomousDatabaseBackup() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_create.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/autonomousDatabaseBackup_create.json // this example is just showing the usage of "AutonomousDatabaseBackups_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseBackupResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseBackupResource.cs index 414375b5b0c8..7613fb2c3a77 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseBackupResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseBackupResource.cs @@ -20,7 +20,7 @@ public partial class Sample_AutonomousDatabaseBackupResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_AutonomousDatabaseBackupsGet() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/autonomousDatabaseBackup_get.json // this example is just showing the usage of "AutonomousDatabaseBackups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_AutonomousDatabaseBackupsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAutonomousDatabaseBackup() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/autonomousDatabaseBackup_get.json // this example is just showing the usage of "AutonomousDatabaseBackups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -84,7 +84,7 @@ public async Task Get_GetAutonomousDatabaseBackup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_AutonomousDatabaseBackupsUpdate() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_patch.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/autonomousDatabaseBackup_patch.json // this example is just showing the usage of "AutonomousDatabaseBackups_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -118,7 +118,7 @@ public async Task Update_AutonomousDatabaseBackupsUpdate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_PatchAutonomousDatabaseBackup() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_patch.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/autonomousDatabaseBackup_patch.json // this example is just showing the usage of "AutonomousDatabaseBackups_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -152,7 +152,7 @@ public async Task Update_PatchAutonomousDatabaseBackup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_AutonomousDatabaseBackupsDelete() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_delete.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/autonomousDatabaseBackup_delete.json // this example is just showing the usage of "AutonomousDatabaseBackups_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -180,7 +180,7 @@ public async Task Delete_AutonomousDatabaseBackupsDelete() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteAutonomousDatabaseBackup() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_delete.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/autonomousDatabaseBackup_delete.json // this example is just showing the usage of "AutonomousDatabaseBackups_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseCharacterSetCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseCharacterSetCollection.cs index 00321b2f4263..c7aca0d1f89d 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseCharacterSetCollection.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseCharacterSetCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_AutonomousDatabaseCharacterSetCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAutonomousDbCharacterSetsByLocation() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseCharacterSet_listByLocation.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/autonomousDatabaseCharacterSet_listByLocation.json // this example is just showing the usage of "AutonomousDatabaseCharacterSets_ListByLocation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetAll_ListAutonomousDbCharacterSetsByLocation() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAutonomousDbCharacterSet() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseCharacterSet_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/autonomousDatabaseCharacterSet_get.json // this example is just showing the usage of "AutonomousDatabaseCharacterSets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -90,7 +90,7 @@ public async Task Get_GetAutonomousDbCharacterSet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAutonomousDbCharacterSet() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseCharacterSet_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/autonomousDatabaseCharacterSet_get.json // this example is just showing the usage of "AutonomousDatabaseCharacterSets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -120,7 +120,7 @@ public async Task Exists_GetAutonomousDbCharacterSet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAutonomousDbCharacterSet() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseCharacterSet_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/autonomousDatabaseCharacterSet_get.json // this example is just showing the usage of "AutonomousDatabaseCharacterSets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseCharacterSetResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseCharacterSetResource.cs index 44998c369774..5caa77f469c6 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseCharacterSetResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseCharacterSetResource.cs @@ -19,7 +19,7 @@ public partial class Sample_AutonomousDatabaseCharacterSetResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAutonomousDbCharacterSet() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseCharacterSet_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/autonomousDatabaseCharacterSet_get.json // this example is just showing the usage of "AutonomousDatabaseCharacterSets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseCollection.cs index 31d7d0b9a888..e0e8a501e308 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseCollection.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_AutonomousDatabaseCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAutonomousDatabaseByResourceGroup() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_listByResourceGroup.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/autonomousDatabase_listByResourceGroup.json // this example is just showing the usage of "AutonomousDatabases_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ListAutonomousDatabaseByResourceGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_AutonomousDatabasesGet() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/autonomousDatabase_get.json // this example is just showing the usage of "AutonomousDatabases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task Get_AutonomousDatabasesGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_AutonomousDatabasesGet() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/autonomousDatabase_get.json // this example is just showing the usage of "AutonomousDatabases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -121,7 +121,7 @@ public async Task Exists_AutonomousDatabasesGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_AutonomousDatabasesGet() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/autonomousDatabase_get.json // this example is just showing the usage of "AutonomousDatabases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -163,7 +163,7 @@ public async Task GetIfExists_AutonomousDatabasesGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAutonomousDatabase() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/autonomousDatabase_get.json // this example is just showing the usage of "AutonomousDatabases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -197,7 +197,7 @@ public async Task Get_GetAutonomousDatabase() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAutonomousDatabase() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/autonomousDatabase_get.json // this example is just showing the usage of "AutonomousDatabases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -227,7 +227,7 @@ public async Task Exists_GetAutonomousDatabase() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAutonomousDatabase() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/autonomousDatabase_get.json // this example is just showing the usage of "AutonomousDatabases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -269,7 +269,7 @@ public async Task GetIfExists_GetAutonomousDatabase() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_AutonomousDatabasesCreateOrUpdate() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_create.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/autonomousDatabase_create.json // this example is just showing the usage of "AutonomousDatabases_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -324,7 +324,7 @@ public async Task CreateOrUpdate_AutonomousDatabasesCreateOrUpdate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_AutonomousDatabasesCreateOrUpdateClone() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseClone_create.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/autonomousDatabaseClone_create.json // this example is just showing the usage of "AutonomousDatabases_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -378,7 +378,7 @@ public async Task CreateOrUpdate_AutonomousDatabasesCreateOrUpdateClone() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateAutonomousDatabase() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_create.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/autonomousDatabase_create.json // this example is just showing the usage of "AutonomousDatabases_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -433,7 +433,7 @@ public async Task CreateOrUpdate_CreateAutonomousDatabase() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateCloneAutonomousDatabase() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseClone_create.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/autonomousDatabaseClone_create.json // this example is just showing the usage of "AutonomousDatabases_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseNationalCharacterSetCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseNationalCharacterSetCollection.cs index 1e1284553ecb..39beddb8f666 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseNationalCharacterSetCollection.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseNationalCharacterSetCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_AutonomousDatabaseNationalCharacterSetCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAutonomousDbNationalCharacterSetsByLocation() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseNationalCharacterSet_listByLocation.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/autonomousDatabaseNationalCharacterSet_listByLocation.json // this example is just showing the usage of "AutonomousDatabaseNationalCharacterSets_ListByLocation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetAll_ListAutonomousDbNationalCharacterSetsByLocation() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAutonomousDbNationalCharacterSet() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseNationalCharacterSet_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/autonomousDatabaseNationalCharacterSet_get.json // this example is just showing the usage of "AutonomousDatabaseNationalCharacterSets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -90,7 +90,7 @@ public async Task Get_GetAutonomousDbNationalCharacterSet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAutonomousDbNationalCharacterSet() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseNationalCharacterSet_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/autonomousDatabaseNationalCharacterSet_get.json // this example is just showing the usage of "AutonomousDatabaseNationalCharacterSets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -120,7 +120,7 @@ public async Task Exists_GetAutonomousDbNationalCharacterSet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAutonomousDbNationalCharacterSet() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseNationalCharacterSet_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/autonomousDatabaseNationalCharacterSet_get.json // this example is just showing the usage of "AutonomousDatabaseNationalCharacterSets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseNationalCharacterSetResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseNationalCharacterSetResource.cs index d39d6da08364..d791a5f8b1f0 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseNationalCharacterSetResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseNationalCharacterSetResource.cs @@ -19,7 +19,7 @@ public partial class Sample_AutonomousDatabaseNationalCharacterSetResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAutonomousDbNationalCharacterSet() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseNationalCharacterSet_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/autonomousDatabaseNationalCharacterSet_get.json // this example is just showing the usage of "AutonomousDatabaseNationalCharacterSets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseResource.cs index 52e84e7d9693..104fb59c138b 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseResource.cs @@ -21,7 +21,7 @@ public partial class Sample_AutonomousDatabaseResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAutonomousDatabases_ListAutonomousDatabaseBySubscription() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_listBySubscription.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/autonomousDatabase_listBySubscription.json // this example is just showing the usage of "AutonomousDatabases_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task GetAutonomousDatabases_ListAutonomousDatabaseBySubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_AutonomousDatabasesGet() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/autonomousDatabase_get.json // this example is just showing the usage of "AutonomousDatabases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -84,7 +84,7 @@ public async Task Get_AutonomousDatabasesGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAutonomousDatabase() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/autonomousDatabase_get.json // this example is just showing the usage of "AutonomousDatabases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -115,7 +115,7 @@ public async Task Get_GetAutonomousDatabase() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_PatchAutonomousDatabase() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_patch.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/autonomousDatabase_patch.json // this example is just showing the usage of "AutonomousDatabases_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -148,7 +148,7 @@ public async Task Update_PatchAutonomousDatabase() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteAutonomousDatabase() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_delete.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/autonomousDatabase_delete.json // this example is just showing the usage of "AutonomousDatabases_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -175,7 +175,7 @@ public async Task Delete_DeleteAutonomousDatabase() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Failover_AutonomousDatabasesFailover() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_failover.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/autonomousDatabase_failover.json // this example is just showing the usage of "AutonomousDatabases_Failover" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -211,7 +211,7 @@ public async Task Failover_AutonomousDatabasesFailover() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Failover_PerformFailoverActionOnAutonomousDatabase() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_failover.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/autonomousDatabase_failover.json // this example is just showing the usage of "AutonomousDatabases_Failover" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -247,7 +247,7 @@ public async Task Failover_PerformFailoverActionOnAutonomousDatabase() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GenerateWallet_GenerateWalletActionOnAutonomousDatabase() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_generateWallet.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/autonomousDatabase_generateWallet.json // this example is just showing the usage of "AutonomousDatabases_GenerateWallet" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -279,7 +279,7 @@ public async Task GenerateWallet_GenerateWalletActionOnAutonomousDatabase() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Restore_AutonomousDatabasesRestore() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_restore.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/autonomousDatabase_restore.json // this example is just showing the usage of "AutonomousDatabases_Restore" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -312,7 +312,7 @@ public async Task Restore_AutonomousDatabasesRestore() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Restore_PerformRestoreActionOnAutonomousDatabase() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_restore.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/autonomousDatabase_restore.json // this example is just showing the usage of "AutonomousDatabases_Restore" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -345,7 +345,7 @@ public async Task Restore_PerformRestoreActionOnAutonomousDatabase() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Shrink_PerformShrinkActionOnAutonomousDatabase() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_shrink.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/autonomousDatabase_shrink.json // this example is just showing the usage of "AutonomousDatabases_Shrink" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -377,7 +377,7 @@ public async Task Shrink_PerformShrinkActionOnAutonomousDatabase() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Switchover_AutonomousDatabasesSwitchover() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_switchover.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/autonomousDatabase_switchover.json // this example is just showing the usage of "AutonomousDatabases_Switchover" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -413,7 +413,7 @@ public async Task Switchover_AutonomousDatabasesSwitchover() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Switchover_PerformSwitchoverActionOnAutonomousDatabase() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_switchover.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/autonomousDatabase_switchover.json // this example is just showing the usage of "AutonomousDatabases_Switchover" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudExadataInfrastructureCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudExadataInfrastructureCollection.cs index 07a3fa96e659..6eecdab1661b 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudExadataInfrastructureCollection.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudExadataInfrastructureCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_CloudExadataInfrastructureCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListExadataInfrastructureByResourceGroup() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/exaInfra_listByResourceGroup.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/exaInfra_listByResourceGroup.json // this example is just showing the usage of "CloudExadataInfrastructures_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ListExadataInfrastructureByResourceGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetExadataInfrastructure() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/exaInfra_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/exaInfra_get.json // this example is just showing the usage of "CloudExadataInfrastructures_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task Get_GetExadataInfrastructure() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetExadataInfrastructure() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/exaInfra_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/exaInfra_get.json // this example is just showing the usage of "CloudExadataInfrastructures_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -121,7 +121,7 @@ public async Task Exists_GetExadataInfrastructure() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetExadataInfrastructure() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/exaInfra_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/exaInfra_get.json // this example is just showing the usage of "CloudExadataInfrastructures_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -163,7 +163,7 @@ public async Task GetIfExists_GetExadataInfrastructure() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateExadataInfrastructure() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/exaInfra_create.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/exaInfra_create.json // this example is just showing the usage of "CloudExadataInfrastructures_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudExadataInfrastructureResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudExadataInfrastructureResource.cs index d469449d78de..69bae3774474 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudExadataInfrastructureResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudExadataInfrastructureResource.cs @@ -21,7 +21,7 @@ public partial class Sample_CloudExadataInfrastructureResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetCloudExadataInfrastructures_ListExadataInfrastructureBySubscription() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/exaInfra_listBySubscription.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/exaInfra_listBySubscription.json // this example is just showing the usage of "CloudExadataInfrastructures_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task GetCloudExadataInfrastructures_ListExadataInfrastructureBySubs [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetExadataInfrastructure() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/exaInfra_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/exaInfra_get.json // this example is just showing the usage of "CloudExadataInfrastructures_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -84,7 +84,7 @@ public async Task Get_GetExadataInfrastructure() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_PatchExadataInfrastructure() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/exaInfra_patch.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/exaInfra_patch.json // this example is just showing the usage of "CloudExadataInfrastructures_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -117,7 +117,7 @@ public async Task Update_PatchExadataInfrastructure() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteExadataInfrastructure() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/exaInfra_delete.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/exaInfra_delete.json // this example is just showing the usage of "CloudExadataInfrastructures_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -144,7 +144,7 @@ public async Task Delete_DeleteExadataInfrastructure() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task AddStorageCapacity_PerformAddStorageCapacityOnExadataInfra() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/exaInfra_addStorageCapacity.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/exaInfra_addStorageCapacity.json // this example is just showing the usage of "CloudExadataInfrastructures_AddStorageCapacity" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudVmClusterCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudVmClusterCollection.cs index 17d21dded846..7a81863e3421 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudVmClusterCollection.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudVmClusterCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_CloudVmClusterCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListVMClustersByResourceGroup() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/vmClusters_listByResourceGroup.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/vmClusters_listByResourceGroup.json // this example is just showing the usage of "CloudVmClusters_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ListVMClustersByResourceGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetVMCluster() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/vmClusters_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/vmClusters_get.json // this example is just showing the usage of "CloudVmClusters_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task Get_GetVMCluster() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetVMCluster() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/vmClusters_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/vmClusters_get.json // this example is just showing the usage of "CloudVmClusters_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -121,7 +121,7 @@ public async Task Exists_GetVMCluster() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetVMCluster() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/vmClusters_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/vmClusters_get.json // this example is just showing the usage of "CloudVmClusters_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -163,7 +163,7 @@ public async Task GetIfExists_GetVMCluster() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateVMCluster() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/vmClusters_create.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/vmClusters_create.json // this example is just showing the usage of "CloudVmClusters_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudVmClusterDBNodeCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudVmClusterDBNodeCollection.cs index ddec9db1807c..790fea6be169 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudVmClusterDBNodeCollection.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudVmClusterDBNodeCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_CloudVmClusterDBNodeCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListDbNodesByVMCluster() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbNodes_listByParent.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/dbNodes_listByParent.json // this example is just showing the usage of "DbNodes_ListByCloudVmCluster" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetAll_ListDbNodesByVMCluster() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetDbNode() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbNodes_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/dbNodes_get.json // this example is just showing the usage of "DbNodes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task Get_GetDbNode() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetDbNode() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbNodes_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/dbNodes_get.json // this example is just showing the usage of "DbNodes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -122,7 +122,7 @@ public async Task Exists_GetDbNode() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetDbNode() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbNodes_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/dbNodes_get.json // this example is just showing the usage of "DbNodes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudVmClusterDBNodeResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudVmClusterDBNodeResource.cs index f4a6704ed947..94512a15d5bb 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudVmClusterDBNodeResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudVmClusterDBNodeResource.cs @@ -20,7 +20,7 @@ public partial class Sample_CloudVmClusterDBNodeResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetDbNode() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbNodes_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/dbNodes_get.json // this example is just showing the usage of "DbNodes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_GetDbNode() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Action_DbNodesAction() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbNodes_action.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/dbNodes_action.json // this example is just showing the usage of "DbNodes_Action" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -86,7 +86,7 @@ public async Task Action_DbNodesAction() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Action_VMActionsOnDbNodesOfVMCluster() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbNodes_action.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/dbNodes_action.json // this example is just showing the usage of "DbNodes_Action" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudVmClusterResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudVmClusterResource.cs index 60c021d5dab1..68ccf1dd3d10 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudVmClusterResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudVmClusterResource.cs @@ -21,7 +21,7 @@ public partial class Sample_CloudVmClusterResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetCloudVmClusters_ListVMClustersBySubscription() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/vmClusters_listBySubscription.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/vmClusters_listBySubscription.json // this example is just showing the usage of "CloudVmClusters_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task GetCloudVmClusters_ListVMClustersBySubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetVMCluster() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/vmClusters_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/vmClusters_get.json // this example is just showing the usage of "CloudVmClusters_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -84,7 +84,7 @@ public async Task Get_GetVMCluster() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_PatchVMCluster() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/vmClusters_patch.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/vmClusters_patch.json // this example is just showing the usage of "CloudVmClusters_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -117,7 +117,7 @@ public async Task Update_PatchVMCluster() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteVMCluster() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/vmClusters_delete.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/vmClusters_delete.json // this example is just showing the usage of "CloudVmClusters_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -144,7 +144,7 @@ public async Task Delete_DeleteVMCluster() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task AddVms_AddVMsToVMCluster() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/vmClusters_addVms.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/vmClusters_addVms.json // this example is just showing the usage of "CloudVmClusters_AddVms" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -180,7 +180,7 @@ public async Task AddVms_AddVMsToVMCluster() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetPrivateIPAddresses_ListPrivateIPAddressesForVMCluster() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/vmClusters_listPrivateIpAddresses.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/vmClusters_listPrivateIpAddresses.json // this example is just showing the usage of "CloudVmClusters_ListPrivateIPAddresses" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -211,7 +211,7 @@ public async Task GetPrivateIPAddresses_ListPrivateIPAddressesForVMCluster() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task RemoveVms_RemoveVMsFromVMCluster() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/vmClusters_removeVms.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/vmClusters_removeVms.json // this example is just showing the usage of "CloudVmClusters_RemoveVms" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudVmClusterVirtualNetworkAddressCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudVmClusterVirtualNetworkAddressCollection.cs index 299524b50f06..08469c923494 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudVmClusterVirtualNetworkAddressCollection.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudVmClusterVirtualNetworkAddressCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_CloudVmClusterVirtualNetworkAddressCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListVirtualNetworkAddressesByVMCluster() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/virtualNetworkAddresses_listByParent.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/virtualNetworkAddresses_listByParent.json // this example is just showing the usage of "VirtualNetworkAddresses_ListByCloudVmCluster" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ListVirtualNetworkAddressesByVMCluster() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetVirtualNetworkAddress() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/virtualNetworkAddresses_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/virtualNetworkAddresses_get.json // this example is just showing the usage of "VirtualNetworkAddresses_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task Get_GetVirtualNetworkAddress() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetVirtualNetworkAddress() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/virtualNetworkAddresses_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/virtualNetworkAddresses_get.json // this example is just showing the usage of "VirtualNetworkAddresses_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,7 +123,7 @@ public async Task Exists_GetVirtualNetworkAddress() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetVirtualNetworkAddress() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/virtualNetworkAddresses_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/virtualNetworkAddresses_get.json // this example is just showing the usage of "VirtualNetworkAddresses_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -166,7 +166,7 @@ public async Task GetIfExists_GetVirtualNetworkAddress() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateVirtualNetworkAddress() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/virtualNetworkAddresses_create.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/virtualNetworkAddresses_create.json // this example is just showing the usage of "VirtualNetworkAddresses_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudVmClusterVirtualNetworkAddressResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudVmClusterVirtualNetworkAddressResource.cs index 93160442b451..0d888b9479d9 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudVmClusterVirtualNetworkAddressResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudVmClusterVirtualNetworkAddressResource.cs @@ -20,7 +20,7 @@ public partial class Sample_CloudVmClusterVirtualNetworkAddressResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetVirtualNetworkAddress() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/virtualNetworkAddresses_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/virtualNetworkAddresses_get.json // this example is just showing the usage of "VirtualNetworkAddresses_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_GetVirtualNetworkAddress() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateVirtualNetworkAddress() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/virtualNetworkAddresses_create.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/virtualNetworkAddresses_create.json // this example is just showing the usage of "VirtualNetworkAddresses_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -93,7 +93,7 @@ public async Task Update_CreateVirtualNetworkAddress() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteVirtualNetworkAddress() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/virtualNetworkAddresses_delete.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/virtualNetworkAddresses_delete.json // this example is just showing the usage of "VirtualNetworkAddresses_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDBServerCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDBServerCollection.cs index b09384e8d699..64ec509942ae 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDBServerCollection.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDBServerCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_OracleDBServerCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListDbServersByExadataInfrastructure() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbServers_listByParent.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/dbServers_listByParent.json // this example is just showing the usage of "DbServers_ListByCloudExadataInfrastructure" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetAll_ListDbServersByExadataInfrastructure() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetDbServerByParent() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbServers_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/dbServers_get.json // this example is just showing the usage of "DbServers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task Get_GetDbServerByParent() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetDbServerByParent() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbServers_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/dbServers_get.json // this example is just showing the usage of "DbServers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -122,7 +122,7 @@ public async Task Exists_GetDbServerByParent() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetDbServerByParent() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbServers_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/dbServers_get.json // this example is just showing the usage of "DbServers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDBServerResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDBServerResource.cs index 76d23a7cbbb2..76ba21eb590b 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDBServerResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDBServerResource.cs @@ -19,7 +19,7 @@ public partial class Sample_OracleDBServerResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetDbServerByParent() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbServers_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/dbServers_get.json // this example is just showing the usage of "DbServers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDBSystemShapeCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDBSystemShapeCollection.cs index 03a7b9936b06..13e034256af8 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDBSystemShapeCollection.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDBSystemShapeCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_OracleDBSystemShapeCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListDbSystemShapesByLocation() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbSystemShapes_listByLocation.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/dbSystemShapes_listByLocation.json // this example is just showing the usage of "DbSystemShapes_ListByLocation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetAll_ListDbSystemShapesByLocation() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetADbSystemShapeByName() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbSystemShapes_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/dbSystemShapes_get.json // this example is just showing the usage of "DbSystemShapes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -90,7 +90,7 @@ public async Task Get_GetADbSystemShapeByName() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetADbSystemShapeByName() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbSystemShapes_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/dbSystemShapes_get.json // this example is just showing the usage of "DbSystemShapes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -120,7 +120,7 @@ public async Task Exists_GetADbSystemShapeByName() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetADbSystemShapeByName() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbSystemShapes_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/dbSystemShapes_get.json // this example is just showing the usage of "DbSystemShapes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDBSystemShapeResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDBSystemShapeResource.cs index 46e6e18a1cc5..546be85b5f23 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDBSystemShapeResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDBSystemShapeResource.cs @@ -19,7 +19,7 @@ public partial class Sample_OracleDBSystemShapeResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetADbSystemShapeByName() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbSystemShapes_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/dbSystemShapes_get.json // this example is just showing the usage of "DbSystemShapes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDnsPrivateViewCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDnsPrivateViewCollection.cs index 539044f2d0a3..576b2f69cb6d 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDnsPrivateViewCollection.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDnsPrivateViewCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_OracleDnsPrivateViewCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListDnsPrivateViewsByLocation() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dnsPrivateViews_listByLocation.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/dnsPrivateViews_listByLocation.json // this example is just showing the usage of "DnsPrivateViews_ListByLocation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetAll_ListDnsPrivateViewsByLocation() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetADnsPrivateViewByName() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dnsPrivateViews_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/dnsPrivateViews_get.json // this example is just showing the usage of "DnsPrivateViews_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -90,7 +90,7 @@ public async Task Get_GetADnsPrivateViewByName() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetADnsPrivateViewByName() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dnsPrivateViews_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/dnsPrivateViews_get.json // this example is just showing the usage of "DnsPrivateViews_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -120,7 +120,7 @@ public async Task Exists_GetADnsPrivateViewByName() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetADnsPrivateViewByName() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dnsPrivateViews_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/dnsPrivateViews_get.json // this example is just showing the usage of "DnsPrivateViews_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDnsPrivateViewResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDnsPrivateViewResource.cs index ca387bb84c9e..19fbcb29edbd 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDnsPrivateViewResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDnsPrivateViewResource.cs @@ -19,7 +19,7 @@ public partial class Sample_OracleDnsPrivateViewResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetADnsPrivateViewByName() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dnsPrivateViews_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/dnsPrivateViews_get.json // this example is just showing the usage of "DnsPrivateViews_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDnsPrivateZoneCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDnsPrivateZoneCollection.cs index c6a1e5292411..88951a7c5cf6 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDnsPrivateZoneCollection.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDnsPrivateZoneCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_OracleDnsPrivateZoneCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListDnsPrivateZonesByLocation() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dnsPrivateZones_listByLocation.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/dnsPrivateZones_listByLocation.json // this example is just showing the usage of "DnsPrivateZones_ListByLocation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetAll_ListDnsPrivateZonesByLocation() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetADnsPrivateZoneByName() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dnsPrivateZones_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/dnsPrivateZones_get.json // this example is just showing the usage of "DnsPrivateZones_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -90,7 +90,7 @@ public async Task Get_GetADnsPrivateZoneByName() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetADnsPrivateZoneByName() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dnsPrivateZones_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/dnsPrivateZones_get.json // this example is just showing the usage of "DnsPrivateZones_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -120,7 +120,7 @@ public async Task Exists_GetADnsPrivateZoneByName() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetADnsPrivateZoneByName() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dnsPrivateZones_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/dnsPrivateZones_get.json // this example is just showing the usage of "DnsPrivateZones_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDnsPrivateZoneResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDnsPrivateZoneResource.cs index 2480a1be0f52..eeafd2a9a881 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDnsPrivateZoneResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDnsPrivateZoneResource.cs @@ -19,7 +19,7 @@ public partial class Sample_OracleDnsPrivateZoneResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetADnsPrivateZoneByName() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dnsPrivateZones_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/dnsPrivateZones_get.json // this example is just showing the usage of "DnsPrivateZones_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleGIVersionCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleGIVersionCollection.cs index 6e5ebe162072..1fdde3e81495 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleGIVersionCollection.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleGIVersionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_OracleGIVersionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListGiVersionsByLocation() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/giVersions_listByLocation.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/giVersions_listByLocation.json // this example is just showing the usage of "GiVersions_ListByLocation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetAll_ListGiVersionsByLocation() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAGiVersionByName() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/giVersions_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/giVersions_get.json // this example is just showing the usage of "GiVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -90,7 +90,7 @@ public async Task Get_GetAGiVersionByName() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAGiVersionByName() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/giVersions_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/giVersions_get.json // this example is just showing the usage of "GiVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -120,7 +120,7 @@ public async Task Exists_GetAGiVersionByName() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAGiVersionByName() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/giVersions_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/giVersions_get.json // this example is just showing the usage of "GiVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleGIVersionResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleGIVersionResource.cs index 17b7a4513844..28dae3dcea67 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleGIVersionResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleGIVersionResource.cs @@ -19,7 +19,7 @@ public partial class Sample_OracleGIVersionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAGiVersionByName() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/giVersions_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/giVersions_get.json // this example is just showing the usage of "GiVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleSubscriptionResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleSubscriptionResource.cs index 155088b463f1..db54bdc3a78d 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleSubscriptionResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleSubscriptionResource.cs @@ -21,7 +21,7 @@ public partial class Sample_OracleSubscriptionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetOracleSubscription() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/oracleSubscriptions_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/oracleSubscriptions_get.json // this example is just showing the usage of "OracleSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -50,7 +50,7 @@ public async Task Get_GetOracleSubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateOracleSubscription() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/oracleSubscriptions_create.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/oracleSubscriptions_create.json // this example is just showing the usage of "OracleSubscriptions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -89,7 +89,7 @@ public async Task CreateOrUpdate_CreateOrUpdateOracleSubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_PatchOracleSubscription() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/oracleSubscriptions_patch.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/oracleSubscriptions_patch.json // this example is just showing the usage of "OracleSubscriptions_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -120,7 +120,7 @@ public async Task Update_PatchOracleSubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteOracleSubscription() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/oracleSubscriptions_delete.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/oracleSubscriptions_delete.json // this example is just showing the usage of "OracleSubscriptions_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -140,12 +140,41 @@ public async Task Delete_DeleteOracleSubscription() Console.WriteLine($"Succeeded"); } + // Add Azure Subscriptions to the OracleSubscription + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task AddAzureSubscriptions_AddAzureSubscriptionsToTheOracleSubscription() + { + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/oracleSubscriptions_addAzureSubscriptions.json + // this example is just showing the usage of "OracleSubscriptions_AddAzureSubscriptions" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this OracleSubscriptionResource created on azure + // for more information of creating OracleSubscriptionResource, please refer to the document of OracleSubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier oracleSubscriptionResourceId = OracleSubscriptionResource.CreateResourceIdentifier(subscriptionId); + OracleSubscriptionResource oracleSubscription = client.GetOracleSubscriptionResource(oracleSubscriptionResourceId); + + // invoke the operation + AzureSubscriptions body = new AzureSubscriptions(new string[] + { +"00000000-0000-0000-0000-000000000001" + }); + await oracleSubscription.AddAzureSubscriptionsAsync(WaitUntil.Completed, body); + + Console.WriteLine($"Succeeded"); + } + // List Activation Links for the Oracle Subscription [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetActivationLinks_ListActivationLinksForTheOracleSubscription() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/oracleSubscriptions_listActivationLinks.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/oracleSubscriptions_listActivationLinks.json // this example is just showing the usage of "OracleSubscriptions_ListActivationLinks" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -171,7 +200,7 @@ public async Task GetActivationLinks_ListActivationLinksForTheOracleSubscription [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetCloudAccountDetails_ListCloudAccountDetailsForTheOracleSubscription() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/oracleSubscriptions_listCloudAccountDetails.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/oracleSubscriptions_listCloudAccountDetails.json // this example is just showing the usage of "OracleSubscriptions_ListCloudAccountDetails" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -197,7 +226,7 @@ public async Task GetCloudAccountDetails_ListCloudAccountDetailsForTheOracleSubs [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetSaasSubscriptionDetails_ListSaasSubscriptionDetailsForTheOracleSubscription() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/oracleSubscriptions_listSaasSubscriptionDetails.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/oracleSubscriptions_listSaasSubscriptionDetails.json // this example is just showing the usage of "OracleSubscriptions_ListSaasSubscriptionDetails" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleSystemVersionCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleSystemVersionCollection.cs index 27ba98e99de6..530da6ee90c5 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleSystemVersionCollection.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleSystemVersionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_OracleSystemVersionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListExadataSystemVersionsByTheProvidedFilter() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/systemVersions_listByLocation.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/systemVersions_listByLocation.json // this example is just showing the usage of "SystemVersions_ListByLocation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetAll_ListExadataSystemVersionsByTheProvidedFilter() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_SystemVersionsListByLocation() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/systemVersions_listByLocation.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/systemVersions_listByLocation.json // this example is just showing the usage of "SystemVersions_ListByLocation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task GetAll_SystemVersionsListByLocation() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetExadataSystemVersion() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/systemVersions_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/systemVersions_get.json // this example is just showing the usage of "SystemVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -126,7 +126,7 @@ public async Task Get_GetExadataSystemVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetExadataSystemVersion() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/systemVersions_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/systemVersions_get.json // this example is just showing the usage of "SystemVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -156,7 +156,7 @@ public async Task Exists_GetExadataSystemVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetExadataSystemVersion() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/systemVersions_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/systemVersions_get.json // this example is just showing the usage of "SystemVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -198,7 +198,7 @@ public async Task GetIfExists_GetExadataSystemVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_SystemVersionsListSystemVersions() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/systemVersions_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/systemVersions_get.json // this example is just showing the usage of "SystemVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -232,7 +232,7 @@ public async Task Get_SystemVersionsListSystemVersions() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_SystemVersionsListSystemVersions() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/systemVersions_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/systemVersions_get.json // this example is just showing the usage of "SystemVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -262,7 +262,7 @@ public async Task Exists_SystemVersionsListSystemVersions() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_SystemVersionsListSystemVersions() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/systemVersions_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/systemVersions_get.json // this example is just showing the usage of "SystemVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleSystemVersionResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleSystemVersionResource.cs index 7b7cb57e7ce8..0d42cad7587f 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleSystemVersionResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleSystemVersionResource.cs @@ -19,7 +19,7 @@ public partial class Sample_OracleSystemVersionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetExadataSystemVersion() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/systemVersions_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/systemVersions_get.json // this example is just showing the usage of "SystemVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -50,7 +50,7 @@ public async Task Get_GetExadataSystemVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_SystemVersionsListSystemVersions() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/systemVersions_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2024-06-01/examples/systemVersions_get.json // this example is just showing the usage of "SystemVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/ArmOracleDatabaseModelFactory.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/ArmOracleDatabaseModelFactory.cs index bfd7327b51ae..ab2734ce37a3 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/ArmOracleDatabaseModelFactory.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/ArmOracleDatabaseModelFactory.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using System.Linq; using Azure.Core; using Azure.ResourceManager.Models; @@ -698,7 +699,7 @@ public static OracleDBSystemShapeData OracleDBSystemShapeData(ResourceIdentifier /// The maximum number of database nodes available for this shape. /// The maximum number of CPU cores per database node that can be enabled for this shape. Only applicable to the flex Exadata shape and ExaCC Elastic shapes. /// A new instance for mocking. - public static OracleDBSystemShapeProperties OracleDBSystemShapeProperties(string shapeFamily = null, int availableCoreCount = default, int? minimumCoreCount = null, int? runtimeMinimumCoreCount = null, int? coreCountIncrement = null, int? minStorageCount = null, int? maxStorageCount = null, double? availableDataStoragePerServerInTbs = null, int? availableMemoryPerNodeInGbs = null, int? availableDBNodePerNodeInGbs = null, int? minCoreCountPerNode = null, int? availableMemoryInGbs = null, int? minMemoryPerNodeInGbs = null, int? availableDBNodeStorageInGbs = null, int? minDBNodeStoragePerNodeInGbs = null, int? availableDataStorageInTbs = null, int? minDataStorageInTbs = null, int? minimumNodeCount = null, int? maximumNodeCount = null, int? availableCoreCountPerNode = null) + public static OracleDBSystemShapeProperties OracleDBSystemShapeProperties(string shapeFamily = null, int? availableCoreCount = null, int? minimumCoreCount = null, int? runtimeMinimumCoreCount = null, int? coreCountIncrement = null, int? minStorageCount = null, int? maxStorageCount = null, double? availableDataStoragePerServerInTbs = null, int? availableMemoryPerNodeInGbs = null, int? availableDBNodePerNodeInGbs = null, int? minCoreCountPerNode = null, int? availableMemoryInGbs = null, int? minMemoryPerNodeInGbs = null, int? availableDBNodeStorageInGbs = null, int? minDBNodeStoragePerNodeInGbs = null, int? availableDataStorageInTbs = null, int? minDataStorageInTbs = null, int? minimumNodeCount = null, int? maximumNodeCount = null, int? availableCoreCountPerNode = null) { return new OracleDBSystemShapeProperties( shapeFamily, @@ -752,7 +753,7 @@ public static OracleDnsPrivateViewData OracleDnsPrivateViewData(ResourceIdentifi /// views timeCreated. /// Azure resource provisioning state. /// A new instance for mocking. - public static OracleDnsPrivateViewProperties OracleDnsPrivateViewProperties(ResourceIdentifier ocid = null, string displayName = null, bool isProtected = default, DnsPrivateViewsLifecycleState? lifecycleState = null, string self = null, DateTimeOffset createdOn = default, DateTimeOffset updatedOn = default, OracleDatabaseResourceProvisioningState? provisioningState = null) + public static OracleDnsPrivateViewProperties OracleDnsPrivateViewProperties(ResourceIdentifier ocid = null, string displayName = null, bool? isProtected = null, DnsPrivateViewsLifecycleState? lifecycleState = null, string self = null, DateTimeOffset? createdOn = null, DateTimeOffset? updatedOn = null, OracleDatabaseResourceProvisioningState? provisioningState = null) { return new OracleDnsPrivateViewProperties( ocid, @@ -796,7 +797,7 @@ public static OracleDnsPrivateZoneData OracleDnsPrivateZoneData(ResourceIdentifi /// Zones timeCreated. /// Azure resource provisioning state. /// A new instance for mocking. - public static OracleDnsPrivateZoneProperties OracleDnsPrivateZoneProperties(ResourceIdentifier ocid = null, bool isProtected = default, DnsPrivateZonesLifecycleState? lifecycleState = null, string self = null, int serial = default, string version = null, ResourceIdentifier viewId = null, OracleDnsPrivateZoneType zoneType = default, DateTimeOffset createdOn = default, OracleDatabaseResourceProvisioningState? provisioningState = null) + public static OracleDnsPrivateZoneProperties OracleDnsPrivateZoneProperties(ResourceIdentifier ocid = null, bool? isProtected = null, DnsPrivateZonesLifecycleState? lifecycleState = null, string self = null, int? serial = null, string version = null, ResourceIdentifier viewId = null, OracleDnsPrivateZoneType? zoneType = null, DateTimeOffset? createdOn = null, OracleDatabaseResourceProvisioningState? provisioningState = null) { return new OracleDnsPrivateZoneProperties( ocid, @@ -876,9 +877,14 @@ public static OracleSubscriptionData OracleSubscriptionData(ResourceIdentifier i /// Term Unit. P1Y, P3Y, etc, see Durations https://en.wikipedia.org/wiki/ISO_8601. /// Product code for the term unit. /// Intent for the update operation. + /// Azure subscriptions associated with this OracleSubscription. + /// State of the add Azure subscription operation on Oracle subscription. + /// Status details of the last operation on Oracle subscription. /// A new instance for mocking. - public static OracleSubscriptionProperties OracleSubscriptionProperties(OracleSubscriptionProvisioningState? provisioningState = null, string saasSubscriptionId = null, ResourceIdentifier cloudAccountId = null, CloudAccountProvisioningState? cloudAccountState = null, string termUnit = null, string productCode = null, OracleSubscriptionUpdateIntent? intent = null) + public static OracleSubscriptionProperties OracleSubscriptionProperties(OracleSubscriptionProvisioningState? provisioningState = null, string saasSubscriptionId = null, ResourceIdentifier cloudAccountId = null, CloudAccountProvisioningState? cloudAccountState = null, string termUnit = null, string productCode = null, OracleSubscriptionUpdateIntent? intent = null, IEnumerable azureSubscriptionIds = null, AddSubscriptionOperationState? addSubscriptionOperationState = null, string lastOperationStatusDetail = null) { + azureSubscriptionIds ??= new List(); + return new OracleSubscriptionProperties( provisioningState, saasSubscriptionId, @@ -887,6 +893,9 @@ public static OracleSubscriptionProperties OracleSubscriptionProperties(OracleSu termUnit, productCode, intent, + azureSubscriptionIds?.ToList(), + addSubscriptionOperationState, + lastOperationStatusDetail, serializedAdditionalRawData: null); } @@ -1573,5 +1582,20 @@ public static AutonomousDatabaseProperties AutonomousDatabaseProperties(string a whitelistedIPs?.ToList(), serializedAdditionalRawData: null); } + + /// Initializes a new instance of . + /// OracleSubscriptionProvisioningState provisioning state. + /// SAAS subscription ID generated by Marketplace. + /// Cloud Account Id. + /// Cloud Account provisioning state. + /// Term Unit. P1Y, P3Y, etc, see Durations https://en.wikipedia.org/wiki/ISO_8601. + /// Product code for the term unit. + /// Intent for the update operation. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static OracleSubscriptionProperties OracleSubscriptionProperties(OracleSubscriptionProvisioningState? provisioningState, string saasSubscriptionId, ResourceIdentifier cloudAccountId, CloudAccountProvisioningState? cloudAccountState, string termUnit, string productCode, OracleSubscriptionUpdateIntent? intent) + { + return OracleSubscriptionProperties(provisioningState: provisioningState, saasSubscriptionId: saasSubscriptionId, cloudAccountId: cloudAccountId, cloudAccountState: cloudAccountState, termUnit: termUnit, productCode: productCode, intent: intent, azureSubscriptionIds: default, addSubscriptionOperationState: default, lastOperationStatusDetail: default); + } } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDBVersionCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDBVersionCollection.cs index 3c3676a88ffe..8cc03a16262a 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDBVersionCollection.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDBVersionCollection.cs @@ -68,7 +68,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -158,7 +158,7 @@ public virtual Response Get(string autonomousdbvers /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -188,7 +188,7 @@ public virtual AsyncPageable GetAllAsync(Cancellati /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -218,7 +218,7 @@ public virtual Pageable GetAll(CancellationToken ca /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -261,7 +261,7 @@ public virtual async Task> ExistsAsync(string autonomousdbversion /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -304,7 +304,7 @@ public virtual Response Exists(string autonomousdbversionsname, Cancellati /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -349,7 +349,7 @@ public virtual async Task> GetIfEx /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDBVersionResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDBVersionResource.cs index 5e9b6ff9a91b..e4c24149c898 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDBVersionResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDBVersionResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancel /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseBackupCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseBackupCollection.cs index 7949d6bf217b..3986ab836dea 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseBackupCollection.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseBackupCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> Create /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(Wai /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(s /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string adbbackupid /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cance /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationTok /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string adbbackupid, Cancel /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string adbbackupid, CancellationToken cance /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseBackupResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseBackupResource.cs index e77c1e4b351d..e8f74f66fc67 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseBackupResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseBackupResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(C /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> Update /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseCharacterSetCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseCharacterSetCollection.cs index ed660289b8c4..354f91b37054 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseCharacterSetCollection.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseCharacterSetCollection.cs @@ -68,7 +68,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -158,7 +158,7 @@ public virtual Response Get(string adbsc /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -188,7 +188,7 @@ public virtual AsyncPageable GetAllAsync /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -218,7 +218,7 @@ public virtual Pageable GetAll(Cancellat /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -261,7 +261,7 @@ public virtual async Task> ExistsAsync(string adbscharsetname, Ca /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -304,7 +304,7 @@ public virtual Response Exists(string adbscharsetname, CancellationToken c /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -349,7 +349,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseCharacterSetData.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseCharacterSetData.cs index 3578bce044fb..d1d2110d47e7 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseCharacterSetData.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseCharacterSetData.cs @@ -75,7 +75,6 @@ internal AutonomousDatabaseCharacterSetData(ResourceIdentifier id, string name, public string AutonomousDatabaseCharacterSet { get => Properties is null ? default : Properties.CharacterSet; - set => Properties = new AutonomousDatabaseCharacterSetProperties(value); } } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseCharacterSetResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseCharacterSetResource.cs index add8b6954302..ada39ec93b30 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseCharacterSetResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseCharacterSetResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseCollection.cs index b0ad77230b4a..d65e7c509b91 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseCollection.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpda /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string autonomousdatabas /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(Cancellatio /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken can /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string autonomousdatabasen /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string autonomousdatabasename, Cancellation /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExi /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseNationalCharacterSetCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseNationalCharacterSetCollection.cs index 971fa09286e7..b5a984914a19 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseNationalCharacterSetCollection.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseNationalCharacterSetCollection.cs @@ -68,7 +68,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -158,7 +158,7 @@ public virtual Response Get(stri /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -188,7 +188,7 @@ public virtual AsyncPageable Get /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -218,7 +218,7 @@ public virtual Pageable GetAll(C /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -261,7 +261,7 @@ public virtual async Task> ExistsAsync(string adbsncharsetname, C /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -304,7 +304,7 @@ public virtual Response Exists(string adbsncharsetname, CancellationToken /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -349,7 +349,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseNationalCharacterSetData.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseNationalCharacterSetData.cs index 00e5341774ed..bb22afaa80db 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseNationalCharacterSetData.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseNationalCharacterSetData.cs @@ -75,7 +75,6 @@ internal AutonomousDatabaseNationalCharacterSetData(ResourceIdentifier id, strin public string AutonomousDatabaseNationalCharacterSet { get => Properties is null ? default : Properties.CharacterSet; - set => Properties = new AutonomousDatabaseNationalCharacterSetProperties(value); } } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseNationalCharacterSetResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseNationalCharacterSetResource.cs index b8edaac9c36f..9965fb04d223 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseNationalCharacterSetResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseNationalCharacterSetResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseResource.cs index d51866781728..0a14f0453bef 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseResource.cs @@ -110,7 +110,7 @@ public virtual AutonomousDatabaseBackupCollection GetAutonomousDatabaseBackups() /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAutonom /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -172,7 +172,7 @@ public virtual Response GetAutonomousDatabaseB /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync(Cancell /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(CancellationToken cancel /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -294,7 +294,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -336,7 +336,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -382,7 +382,7 @@ public virtual async Task> UpdateAsync( /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -428,7 +428,7 @@ public virtual ArmOperation Update(WaitUntil waitUnt /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -474,7 +474,7 @@ public virtual async Task> FailoverAsyn /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -520,7 +520,7 @@ public virtual ArmOperation Failover(WaitUntil waitU /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -562,7 +562,7 @@ public virtual async Task> GenerateWallet /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -604,7 +604,7 @@ public virtual Response GenerateWallet(GenerateAut /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -650,7 +650,7 @@ public virtual async Task> RestoreAsync /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -696,7 +696,7 @@ public virtual ArmOperation Restore(WaitUntil waitUn /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -738,7 +738,7 @@ public virtual async Task> ShrinkAsync( /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -780,7 +780,7 @@ public virtual ArmOperation Shrink(WaitUntil waitUnt /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -826,7 +826,7 @@ public virtual async Task> SwitchoverAs /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -872,7 +872,7 @@ public virtual ArmOperation Switchover(WaitUntil wai /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -934,7 +934,7 @@ public virtual async Task> AddTagAsync(stri /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -996,7 +996,7 @@ public virtual Response AddTag(string key, string va /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -1053,7 +1053,7 @@ public virtual async Task> SetTagsAsync(IDi /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -1110,7 +1110,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -1170,7 +1170,7 @@ public virtual async Task> RemoveTagAsync(s /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudExadataInfrastructureCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudExadataInfrastructureCollection.cs index 7d6c86d2c077..de8fe25bfa80 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudExadataInfrastructureCollection.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudExadataInfrastructureCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> Crea /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(W /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string cloudexad /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(Can /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationT /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string cloudexadatainfrast /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string cloudexadatainfrastructurename, Canc /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudExadataInfrastructureResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudExadataInfrastructureResource.cs index 0ce169064a1c..e9d6663e30eb 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudExadataInfrastructureResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudExadataInfrastructureResource.cs @@ -110,7 +110,7 @@ public virtual OracleDBServerCollection GetOracleDBServers() /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetOracleDBServerAsy /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -172,7 +172,7 @@ public virtual Response GetOracleDBServer(string dbserve /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(CancellationToke /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -294,7 +294,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -336,7 +336,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -382,7 +382,7 @@ public virtual async Task> Upda /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -428,7 +428,7 @@ public virtual ArmOperation Update(WaitUntil /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -470,7 +470,7 @@ public virtual async Task> AddS /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -512,7 +512,7 @@ public virtual ArmOperation AddStorageCapaci /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -574,7 +574,7 @@ public virtual async Task> AddTagAs /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -636,7 +636,7 @@ public virtual Response AddTag(string key, s /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -693,7 +693,7 @@ public virtual async Task> SetTagsA /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -750,7 +750,7 @@ public virtual Response SetTags(IDictionary< /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -810,7 +810,7 @@ public virtual async Task> RemoveTa /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterCollection.cs index 8a45baad9fe4..15fc3bf48112 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterCollection.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAs /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wai /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string clou /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string cloudvmclustername, C /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTok /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken cancell /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string cloudvmclustername, /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string cloudvmclustername, CancellationToke /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExistsA /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterDBNodeCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterDBNodeCollection.cs index 59721ec74eff..6a77ab5bbb85 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterDBNodeCollection.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterDBNodeCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(strin /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string dbnodeocid, Can /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(Cancellat /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken c /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string dbnodeocid, Cancell /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string dbnodeocid, CancellationToken cancel /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetIfE /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterDBNodeResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterDBNodeResource.cs index 8e002b047058..782c7449e8a6 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterDBNodeResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterDBNodeResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cance /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken canc /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task> ActionAsyn /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterResource.cs index 301353267a10..486a4300fc6a 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterResource.cs @@ -111,7 +111,7 @@ public virtual CloudVmClusterDBNodeCollection GetCloudVmClusterDBNodes() /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetCloudVmClus /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -180,7 +180,7 @@ public virtual CloudVmClusterVirtualNetworkAddressCollection GetCloudVmClusterVi /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -242,7 +242,7 @@ public virtual Response GetCloudVmC /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual async Task> GetAsync(Cancellatio /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -322,7 +322,7 @@ public virtual Response Get(CancellationToken cancellati /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -364,7 +364,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -406,7 +406,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -452,7 +452,7 @@ public virtual async Task> UpdateAsync(Wait /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -498,7 +498,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -544,7 +544,7 @@ public virtual async Task> AddVmsAsync(Wait /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -590,7 +590,7 @@ public virtual ArmOperation AddVms(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -623,7 +623,7 @@ public virtual AsyncPageable GetPrivateIPAddressesAsync( /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -656,7 +656,7 @@ public virtual Pageable GetPrivateIPAddresses(PrivateIPA /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -702,7 +702,7 @@ public virtual async Task> RemoveVmsAsync(W /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -748,7 +748,7 @@ public virtual ArmOperation RemoveVms(WaitUntil waitUnti /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -810,7 +810,7 @@ public virtual async Task> AddTagAsync(string k /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -872,7 +872,7 @@ public virtual Response AddTag(string key, string value, /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -929,7 +929,7 @@ public virtual async Task> SetTagsAsync(IDictio /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -986,7 +986,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -1046,7 +1046,7 @@ public virtual async Task> RemoveTagAsync(strin /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterVirtualNetworkAddressCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterVirtualNetworkAddressCollection.cs index 7e1323b0b949..81edc0e66675 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterVirtualNetworkAddressCollection.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterVirtualNetworkAddressCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateO /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAll /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(Canc /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string virtualnetworkaddre /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string virtualnetworkaddressname, Cancellat /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterVirtualNetworkAddressResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterVirtualNetworkAddressResource.cs index 467045fe9607..ece840fd935b 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterVirtualNetworkAddressResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterVirtualNetworkAddressResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(Cancell /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Extensions/MockableOracleDatabaseResourceGroupResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Extensions/MockableOracleDatabaseResourceGroupResource.cs index b04720fb1980..37c4be4b2926 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Extensions/MockableOracleDatabaseResourceGroupResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Extensions/MockableOracleDatabaseResourceGroupResource.cs @@ -53,7 +53,7 @@ public virtual AutonomousDatabaseCollection GetAutonomousDatabases() /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -84,7 +84,7 @@ public virtual async Task> GetAutonomousDat /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -122,7 +122,7 @@ public virtual CloudExadataInfrastructureCollection GetCloudExadataInfrastructur /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -153,7 +153,7 @@ public virtual async Task> GetCloud /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -191,7 +191,7 @@ public virtual CloudVmClusterCollection GetCloudVmClusters() /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -222,7 +222,7 @@ public virtual async Task> GetCloudVmClusterAsy /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Extensions/MockableOracleDatabaseSubscriptionResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Extensions/MockableOracleDatabaseSubscriptionResource.cs index 0b4249a63a43..0e21b9fce106 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Extensions/MockableOracleDatabaseSubscriptionResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Extensions/MockableOracleDatabaseSubscriptionResource.cs @@ -70,7 +70,7 @@ public virtual AutonomousDatabaseCharacterSetCollection GetAutonomousDatabaseCha /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -102,7 +102,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual AutonomousDatabaseNationalCharacterSetCollection GetAutonomousDat /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -174,7 +174,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual AutonomousDBVersionCollection GetAutonomousDBVersions(AzureLocati /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -246,7 +246,7 @@ public virtual async Task> GetAutonomousDB /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -286,7 +286,7 @@ public virtual OracleDBSystemShapeCollection GetOracleDBSystemShapes(AzureLocati /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -318,7 +318,7 @@ public virtual async Task> GetOracleDBSyst /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual OracleDnsPrivateViewCollection GetOracleDnsPrivateViews(AzureLoca /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -390,7 +390,7 @@ public virtual async Task> GetOracleDnsPr /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -430,7 +430,7 @@ public virtual OracleDnsPrivateZoneCollection GetOracleDnsPrivateZones(AzureLoca /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -462,7 +462,7 @@ public virtual async Task> GetOracleDnsPr /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -502,7 +502,7 @@ public virtual OracleGIVersionCollection GetOracleGIVersions(AzureLocation locat /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -534,7 +534,7 @@ public virtual async Task> GetOracleGIVersionA /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -574,7 +574,7 @@ public virtual OracleSystemVersionCollection GetOracleSystemVersions(AzureLocati /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -606,7 +606,7 @@ public virtual async Task> GetOracleSystem /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -645,7 +645,7 @@ public virtual OracleSubscriptionResource GetOracleSubscription() /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -675,7 +675,7 @@ public virtual AsyncPageable GetAutonomousDatabasesA /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -705,7 +705,7 @@ public virtual Pageable GetAutonomousDatabases(Cance /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -735,7 +735,7 @@ public virtual AsyncPageable GetCloudExadata /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -765,7 +765,7 @@ public virtual Pageable GetCloudExadataInfra /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -795,7 +795,7 @@ public virtual AsyncPageable GetCloudVmClustersAsync(Can /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Extensions/OracleDatabaseExtensions.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Extensions/OracleDatabaseExtensions.cs index cf143a951a26..dc32880a9cad 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Extensions/OracleDatabaseExtensions.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Extensions/OracleDatabaseExtensions.cs @@ -366,7 +366,7 @@ public static AutonomousDatabaseCollection GetAutonomousDatabases(this ResourceG /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -404,7 +404,7 @@ public static async Task> GetAutonomousData /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -459,7 +459,7 @@ public static CloudExadataInfrastructureCollection GetCloudExadataInfrastructure /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -497,7 +497,7 @@ public static async Task> GetCloudE /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -552,7 +552,7 @@ public static CloudVmClusterCollection GetCloudVmClusters(this ResourceGroupReso /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -590,7 +590,7 @@ public static async Task> GetCloudVmClusterAsyn /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -646,7 +646,7 @@ public static AutonomousDatabaseCharacterSetCollection GetAutonomousDatabaseChar /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -685,7 +685,7 @@ public static async Task> GetAu /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -742,7 +742,7 @@ public static AutonomousDatabaseNationalCharacterSetCollection GetAutonomousData /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -781,7 +781,7 @@ public static async Task /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -838,7 +838,7 @@ public static AutonomousDBVersionCollection GetAutonomousDBVersions(this Subscri /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -877,7 +877,7 @@ public static async Task> GetAutonomousDBV /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -934,7 +934,7 @@ public static OracleDBSystemShapeCollection GetOracleDBSystemShapes(this Subscri /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -973,7 +973,7 @@ public static async Task> GetOracleDBSyste /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -1030,7 +1030,7 @@ public static OracleDnsPrivateViewCollection GetOracleDnsPrivateViews(this Subsc /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -1069,7 +1069,7 @@ public static async Task> GetOracleDnsPri /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -1126,7 +1126,7 @@ public static OracleDnsPrivateZoneCollection GetOracleDnsPrivateZones(this Subsc /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -1165,7 +1165,7 @@ public static async Task> GetOracleDnsPri /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -1222,7 +1222,7 @@ public static OracleGIVersionCollection GetOracleGIVersions(this SubscriptionRes /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -1261,7 +1261,7 @@ public static async Task> GetOracleGIVersionAs /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -1318,7 +1318,7 @@ public static OracleSystemVersionCollection GetOracleSystemVersions(this Subscri /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -1357,7 +1357,7 @@ public static async Task> GetOracleSystemV /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -1413,7 +1413,7 @@ public static OracleSubscriptionResource GetOracleSubscription(this Subscription /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -1449,7 +1449,7 @@ public static AsyncPageable GetAutonomousDatabasesAs /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -1485,7 +1485,7 @@ public static Pageable GetAutonomousDatabases(this S /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -1521,7 +1521,7 @@ public static AsyncPageable GetCloudExadataI /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -1557,7 +1557,7 @@ public static Pageable GetCloudExadataInfras /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -1593,7 +1593,7 @@ public static AsyncPageable GetCloudVmClustersAsync(this /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AddSubscriptionOperationState.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AddSubscriptionOperationState.cs new file mode 100644 index 000000000000..14b86fdae9fe --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AddSubscriptionOperationState.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.OracleDatabase.Models +{ + /// Add Subscription Operation state enum. + public readonly partial struct AddSubscriptionOperationState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AddSubscriptionOperationState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SucceededValue = "Succeeded"; + private const string UpdatingValue = "Updating"; + private const string FailedValue = "Failed"; + + /// Succeeded - State when Add Subscription operation succeeded. + public static AddSubscriptionOperationState Succeeded { get; } = new AddSubscriptionOperationState(SucceededValue); + /// Updating - State when Add Subscription operation is being Updated. + public static AddSubscriptionOperationState Updating { get; } = new AddSubscriptionOperationState(UpdatingValue); + /// Failed - State when Add Subscription operation failed. + public static AddSubscriptionOperationState Failed { get; } = new AddSubscriptionOperationState(FailedValue); + /// Determines if two values are the same. + public static bool operator ==(AddSubscriptionOperationState left, AddSubscriptionOperationState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AddSubscriptionOperationState left, AddSubscriptionOperationState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator AddSubscriptionOperationState(string value) => new AddSubscriptionOperationState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AddSubscriptionOperationState other && Equals(other); + /// + public bool Equals(AddSubscriptionOperationState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDBVersionProperties.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDBVersionProperties.Serialization.cs index 1e1d2e183d73..354013b2b42f 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDBVersionProperties.Serialization.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDBVersionProperties.Serialization.cs @@ -26,7 +26,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode } writer.WriteStartObject(); - if (options.Format != "W") + if (options.Format != "W" && Optional.IsDefined(Version)) { writer.WritePropertyName("version"u8); writer.WriteStringValue(Version); diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDBVersionProperties.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDBVersionProperties.cs index f621e5994b38..299afa850d58 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDBVersionProperties.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDBVersionProperties.cs @@ -46,10 +46,8 @@ public partial class AutonomousDBVersionProperties private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Supported Autonomous Db versions. - public AutonomousDBVersionProperties(string version) + public AutonomousDBVersionProperties() { - Version = version; } /// Initializes a new instance of . @@ -71,11 +69,6 @@ internal AutonomousDBVersionProperties(string version, AutonomousDatabaseWorkloa _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal AutonomousDBVersionProperties() - { - } - /// Supported Autonomous Db versions. public string Version { get; } /// The Autonomous Database workload type. diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseBackupPatch.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseBackupPatch.cs index a6fdfd83a508..fc67dd4ea1d4 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseBackupPatch.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseBackupPatch.cs @@ -51,7 +51,7 @@ public AutonomousDatabaseBackupPatch() } /// Initializes a new instance of . - /// The updatable properties of the AutonomousDatabaseBackup. + /// The resource-specific properties for this resource. /// Keeps track of any properties unknown to the library. internal AutonomousDatabaseBackupPatch(AutonomousDatabaseBackupUpdateProperties properties, IDictionary serializedAdditionalRawData) { @@ -59,7 +59,7 @@ internal AutonomousDatabaseBackupPatch(AutonomousDatabaseBackupUpdateProperties _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The updatable properties of the AutonomousDatabaseBackup. + /// The resource-specific properties for this resource. internal AutonomousDatabaseBackupUpdateProperties Properties { get; set; } /// Retention period, in days, for long-term backups. public int? AutonomousDatabaseBackupUpdateRetentionPeriodInDays diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseCharacterSetProperties.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseCharacterSetProperties.Serialization.cs index b9926f8ffd0b..1d67e3869e12 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseCharacterSetProperties.Serialization.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseCharacterSetProperties.Serialization.cs @@ -26,7 +26,7 @@ void IJsonModel.Write(Utf8JsonWriter w } writer.WriteStartObject(); - if (options.Format != "W") + if (options.Format != "W" && Optional.IsDefined(CharacterSet)) { writer.WritePropertyName("characterSet"u8); writer.WriteStringValue(CharacterSet); diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseCharacterSetProperties.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseCharacterSetProperties.cs index a1a8e1075de3..3ece899a2322 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseCharacterSetProperties.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseCharacterSetProperties.cs @@ -46,10 +46,8 @@ internal partial class AutonomousDatabaseCharacterSetProperties private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The Oracle Autonomous Database supported character sets. - public AutonomousDatabaseCharacterSetProperties(string characterSet) + public AutonomousDatabaseCharacterSetProperties() { - CharacterSet = characterSet; } /// Initializes a new instance of . @@ -61,11 +59,6 @@ internal AutonomousDatabaseCharacterSetProperties(string characterSet, IDictiona _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal AutonomousDatabaseCharacterSetProperties() - { - } - /// The Oracle Autonomous Database supported character sets. public string CharacterSet { get; } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseNationalCharacterSetProperties.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseNationalCharacterSetProperties.Serialization.cs index 6e65aec1539b..8dbefa993409 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseNationalCharacterSetProperties.Serialization.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseNationalCharacterSetProperties.Serialization.cs @@ -26,7 +26,7 @@ void IJsonModel.Write(Utf8Json } writer.WriteStartObject(); - if (options.Format != "W") + if (options.Format != "W" && Optional.IsDefined(CharacterSet)) { writer.WritePropertyName("characterSet"u8); writer.WriteStringValue(CharacterSet); diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseNationalCharacterSetProperties.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseNationalCharacterSetProperties.cs index 6992133934c3..4755c9c577a1 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseNationalCharacterSetProperties.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseNationalCharacterSetProperties.cs @@ -46,10 +46,8 @@ internal partial class AutonomousDatabaseNationalCharacterSetProperties private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The Oracle Autonomous Database supported national character sets. - public AutonomousDatabaseNationalCharacterSetProperties(string characterSet) + public AutonomousDatabaseNationalCharacterSetProperties() { - CharacterSet = characterSet; } /// Initializes a new instance of . @@ -61,11 +59,6 @@ internal AutonomousDatabaseNationalCharacterSetProperties(string characterSet, I _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal AutonomousDatabaseNationalCharacterSetProperties() - { - } - /// The Oracle Autonomous Database supported national character sets. public string CharacterSet { get; } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabasePatch.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabasePatch.cs index 12e7d7e5f6d6..0a6d36756b5c 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabasePatch.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabasePatch.cs @@ -53,7 +53,7 @@ public AutonomousDatabasePatch() /// Initializes a new instance of . /// Resource tags. - /// The updatable properties of the AutonomousDatabase. + /// The resource-specific properties for this resource. /// Keeps track of any properties unknown to the library. internal AutonomousDatabasePatch(IDictionary tags, AutonomousDatabaseUpdateProperties properties, IDictionary serializedAdditionalRawData) { @@ -64,7 +64,7 @@ internal AutonomousDatabasePatch(IDictionary tags, AutonomousDat /// Resource tags. public IDictionary Tags { get; } - /// The updatable properties of the AutonomousDatabase. + /// The resource-specific properties for this resource. public AutonomousDatabaseUpdateProperties Properties { get; set; } } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AzureSubscriptions.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AzureSubscriptions.Serialization.cs new file mode 100644 index 000000000000..b2b651691f50 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AzureSubscriptions.Serialization.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class AzureSubscriptions : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureSubscriptions)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("azureSubscriptionIds"u8); + writer.WriteStartArray(); + foreach (var item in AzureSubscriptionIds) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AzureSubscriptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureSubscriptions)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAzureSubscriptions(document.RootElement, options); + } + + internal static AzureSubscriptions DeserializeAzureSubscriptions(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList azureSubscriptionIds = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("azureSubscriptionIds"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + azureSubscriptionIds = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AzureSubscriptions(azureSubscriptionIds, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AzureSubscriptions)} does not support writing '{options.Format}' format."); + } + } + + AzureSubscriptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAzureSubscriptions(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AzureSubscriptions)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AzureSubscriptions.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AzureSubscriptions.cs new file mode 100644 index 000000000000..4fc171c10996 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AzureSubscriptions.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Azure Subscriptions model. + public partial class AzureSubscriptions + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Azure Subscription Ids to be updated. + /// is null. + public AzureSubscriptions(IEnumerable azureSubscriptionIds) + { + Argument.AssertNotNull(azureSubscriptionIds, nameof(azureSubscriptionIds)); + + AzureSubscriptionIds = azureSubscriptionIds.ToList(); + } + + /// Initializes a new instance of . + /// Azure Subscription Ids to be updated. + /// Keeps track of any properties unknown to the library. + internal AzureSubscriptions(IList azureSubscriptionIds, IDictionary serializedAdditionalRawData) + { + AzureSubscriptionIds = azureSubscriptionIds; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AzureSubscriptions() + { + } + + /// Azure Subscription Ids to be updated. + public IList AzureSubscriptionIds { get; } + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudExadataInfrastructurePatch.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudExadataInfrastructurePatch.cs index 41954decd0b7..42364e92eec8 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudExadataInfrastructurePatch.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudExadataInfrastructurePatch.cs @@ -55,7 +55,7 @@ public CloudExadataInfrastructurePatch() /// Initializes a new instance of . /// CloudExadataInfrastructure zones. /// Resource tags. - /// The updatable properties of the CloudExadataInfrastructure. + /// The resource-specific properties for this resource. /// Keeps track of any properties unknown to the library. internal CloudExadataInfrastructurePatch(IList zones, IDictionary tags, CloudExadataInfrastructureUpdateProperties properties, IDictionary serializedAdditionalRawData) { @@ -69,7 +69,7 @@ internal CloudExadataInfrastructurePatch(IList zones, IDictionary Zones { get; } /// Resource tags. public IDictionary Tags { get; } - /// The updatable properties of the CloudExadataInfrastructure. + /// The resource-specific properties for this resource. public CloudExadataInfrastructureUpdateProperties Properties { get; set; } } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterDBNodeProperties.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterDBNodeProperties.Serialization.cs index 313762511f34..eee4f22be15c 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterDBNodeProperties.Serialization.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterDBNodeProperties.Serialization.cs @@ -26,7 +26,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod } writer.WriteStartObject(); - if (options.Format != "W") + if (options.Format != "W" && Optional.IsDefined(Ocid)) { writer.WritePropertyName("ocid"u8); writer.WriteStringValue(Ocid); @@ -66,7 +66,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WritePropertyName("dbServerId"u8); writer.WriteStringValue(DBServerId); } - if (options.Format != "W") + if (options.Format != "W" && Optional.IsDefined(DBSystemId)) { writer.WritePropertyName("dbSystemId"u8); writer.WriteStringValue(DBSystemId); @@ -208,6 +208,10 @@ internal static CloudVmClusterDBNodeProperties DeserializeCloudVmClusterDBNodePr { if (property.NameEquals("ocid"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } ocid = new ResourceIdentifier(property.Value.GetString()); continue; } @@ -272,6 +276,10 @@ internal static CloudVmClusterDBNodeProperties DeserializeCloudVmClusterDBNodePr } if (property.NameEquals("dbSystemId"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } dbSystemId = new ResourceIdentifier(property.Value.GetString()); continue; } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterDBNodeProperties.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterDBNodeProperties.cs index b4c580563281..107be770309a 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterDBNodeProperties.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterDBNodeProperties.cs @@ -47,12 +47,8 @@ public partial class CloudVmClusterDBNodeProperties private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// DbNode OCID. - /// The OCID of the DB system. - public CloudVmClusterDBNodeProperties(ResourceIdentifier ocid, ResourceIdentifier dbSystemId) + public CloudVmClusterDBNodeProperties() { - Ocid = ocid; - DBSystemId = dbSystemId; } /// Initializes a new instance of . @@ -108,11 +104,6 @@ internal CloudVmClusterDBNodeProperties(ResourceIdentifier ocid, string addition _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal CloudVmClusterDBNodeProperties() - { - } - /// DbNode OCID. public ResourceIdentifier Ocid { get; } /// Additional information about the planned maintenance. diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterPatch.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterPatch.cs index 32879c816a6a..67473a1a7c53 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterPatch.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterPatch.cs @@ -53,7 +53,7 @@ public CloudVmClusterPatch() /// Initializes a new instance of . /// Resource tags. - /// The updatable properties of the CloudVmCluster. + /// The resource-specific properties for this resource. /// Keeps track of any properties unknown to the library. internal CloudVmClusterPatch(IDictionary tags, CloudVmClusterUpdateProperties properties, IDictionary serializedAdditionalRawData) { @@ -64,7 +64,7 @@ internal CloudVmClusterPatch(IDictionary tags, CloudVmClusterUpd /// Resource tags. public IDictionary Tags { get; } - /// The updatable properties of the CloudVmCluster. + /// The resource-specific properties for this resource. public CloudVmClusterUpdateProperties Properties { get; set; } } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleDBSystemShapeProperties.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleDBSystemShapeProperties.Serialization.cs index 2190b104eb09..4b79f9738cb1 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleDBSystemShapeProperties.Serialization.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleDBSystemShapeProperties.Serialization.cs @@ -31,10 +31,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WritePropertyName("shapeFamily"u8); writer.WriteStringValue(ShapeFamily); } - if (options.Format != "W") + if (options.Format != "W" && Optional.IsDefined(AvailableCoreCount)) { writer.WritePropertyName("availableCoreCount"u8); - writer.WriteNumberValue(AvailableCoreCount); + writer.WriteNumberValue(AvailableCoreCount.Value); } if (options.Format != "W" && Optional.IsDefined(MinimumCoreCount)) { @@ -165,7 +165,7 @@ internal static OracleDBSystemShapeProperties DeserializeOracleDBSystemShapeProp return null; } string shapeFamily = default; - int availableCoreCount = default; + int? availableCoreCount = default; int? minimumCoreCount = default; int? runtimeMinimumCoreCount = default; int? coreCountIncrement = default; @@ -195,6 +195,10 @@ internal static OracleDBSystemShapeProperties DeserializeOracleDBSystemShapeProp } if (property.NameEquals("availableCoreCount"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } availableCoreCount = property.Value.GetInt32(); continue; } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleDBSystemShapeProperties.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleDBSystemShapeProperties.cs index 74ad3267ecf9..638f652ead50 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleDBSystemShapeProperties.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleDBSystemShapeProperties.cs @@ -46,10 +46,8 @@ public partial class OracleDBSystemShapeProperties private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The maximum number of CPU cores that can be enabled on the DB system for this shape. - public OracleDBSystemShapeProperties(int availableCoreCount) + public OracleDBSystemShapeProperties() { - AvailableCoreCount = availableCoreCount; } /// Initializes a new instance of . @@ -74,7 +72,7 @@ public OracleDBSystemShapeProperties(int availableCoreCount) /// The maximum number of database nodes available for this shape. /// The maximum number of CPU cores per database node that can be enabled for this shape. Only applicable to the flex Exadata shape and ExaCC Elastic shapes. /// Keeps track of any properties unknown to the library. - internal OracleDBSystemShapeProperties(string shapeFamily, int availableCoreCount, int? minimumCoreCount, int? runtimeMinimumCoreCount, int? coreCountIncrement, int? minStorageCount, int? maxStorageCount, double? availableDataStoragePerServerInTbs, int? availableMemoryPerNodeInGbs, int? availableDBNodePerNodeInGbs, int? minCoreCountPerNode, int? availableMemoryInGbs, int? minMemoryPerNodeInGbs, int? availableDBNodeStorageInGbs, int? minDBNodeStoragePerNodeInGbs, int? availableDataStorageInTbs, int? minDataStorageInTbs, int? minimumNodeCount, int? maximumNodeCount, int? availableCoreCountPerNode, IDictionary serializedAdditionalRawData) + internal OracleDBSystemShapeProperties(string shapeFamily, int? availableCoreCount, int? minimumCoreCount, int? runtimeMinimumCoreCount, int? coreCountIncrement, int? minStorageCount, int? maxStorageCount, double? availableDataStoragePerServerInTbs, int? availableMemoryPerNodeInGbs, int? availableDBNodePerNodeInGbs, int? minCoreCountPerNode, int? availableMemoryInGbs, int? minMemoryPerNodeInGbs, int? availableDBNodeStorageInGbs, int? minDBNodeStoragePerNodeInGbs, int? availableDataStorageInTbs, int? minDataStorageInTbs, int? minimumNodeCount, int? maximumNodeCount, int? availableCoreCountPerNode, IDictionary serializedAdditionalRawData) { ShapeFamily = shapeFamily; AvailableCoreCount = availableCoreCount; @@ -99,15 +97,10 @@ internal OracleDBSystemShapeProperties(string shapeFamily, int availableCoreCoun _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal OracleDBSystemShapeProperties() - { - } - /// The family of the shape used for the DB system. public string ShapeFamily { get; } /// The maximum number of CPU cores that can be enabled on the DB system for this shape. - public int AvailableCoreCount { get; } + public int? AvailableCoreCount { get; } /// The minimum number of CPU cores that can be enabled on the DB system for this shape. public int? MinimumCoreCount { get; } /// The runtime minimum number of CPU cores that can be enabled on the DB system for this shape. diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleDnsPrivateViewProperties.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleDnsPrivateViewProperties.Serialization.cs index 43fd842e01cd..720020d6d825 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleDnsPrivateViewProperties.Serialization.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleDnsPrivateViewProperties.Serialization.cs @@ -26,7 +26,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod } writer.WriteStartObject(); - if (options.Format != "W") + if (options.Format != "W" && Optional.IsDefined(Ocid)) { writer.WritePropertyName("ocid"u8); writer.WriteStringValue(Ocid); @@ -36,30 +36,30 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WritePropertyName("displayName"u8); writer.WriteStringValue(DisplayName); } - if (options.Format != "W") + if (options.Format != "W" && Optional.IsDefined(IsProtected)) { writer.WritePropertyName("isProtected"u8); - writer.WriteBooleanValue(IsProtected); + writer.WriteBooleanValue(IsProtected.Value); } if (options.Format != "W" && Optional.IsDefined(LifecycleState)) { writer.WritePropertyName("lifecycleState"u8); writer.WriteStringValue(LifecycleState.Value.ToString()); } - if (options.Format != "W") + if (options.Format != "W" && Optional.IsDefined(Self)) { writer.WritePropertyName("self"u8); writer.WriteStringValue(Self); } - if (options.Format != "W") + if (options.Format != "W" && Optional.IsDefined(CreatedOn)) { writer.WritePropertyName("timeCreated"u8); - writer.WriteStringValue(CreatedOn, "O"); + writer.WriteStringValue(CreatedOn.Value, "O"); } - if (options.Format != "W") + if (options.Format != "W" && Optional.IsDefined(UpdatedOn)) { writer.WritePropertyName("timeUpdated"u8); - writer.WriteStringValue(UpdatedOn, "O"); + writer.WriteStringValue(UpdatedOn.Value, "O"); } if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { @@ -106,11 +106,11 @@ internal static OracleDnsPrivateViewProperties DeserializeOracleDnsPrivateViewPr } ResourceIdentifier ocid = default; string displayName = default; - bool isProtected = default; + bool? isProtected = default; DnsPrivateViewsLifecycleState? lifecycleState = default; string self = default; - DateTimeOffset timeCreated = default; - DateTimeOffset timeUpdated = default; + DateTimeOffset? timeCreated = default; + DateTimeOffset? timeUpdated = default; OracleDatabaseResourceProvisioningState? provisioningState = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -118,6 +118,10 @@ internal static OracleDnsPrivateViewProperties DeserializeOracleDnsPrivateViewPr { if (property.NameEquals("ocid"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } ocid = new ResourceIdentifier(property.Value.GetString()); continue; } @@ -128,6 +132,10 @@ internal static OracleDnsPrivateViewProperties DeserializeOracleDnsPrivateViewPr } if (property.NameEquals("isProtected"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } isProtected = property.Value.GetBoolean(); continue; } @@ -147,11 +155,19 @@ internal static OracleDnsPrivateViewProperties DeserializeOracleDnsPrivateViewPr } if (property.NameEquals("timeCreated"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } timeCreated = property.Value.GetDateTimeOffset("O"); continue; } if (property.NameEquals("timeUpdated"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } timeUpdated = property.Value.GetDateTimeOffset("O"); continue; } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleDnsPrivateViewProperties.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleDnsPrivateViewProperties.cs index c8b26ebd44fd..17289889124a 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleDnsPrivateViewProperties.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleDnsPrivateViewProperties.cs @@ -47,18 +47,8 @@ public partial class OracleDnsPrivateViewProperties private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The OCID of the view. - /// A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed. - /// The canonical absolute URL of the resource. - /// views timeCreated. - /// views timeCreated. - public OracleDnsPrivateViewProperties(ResourceIdentifier ocid, bool isProtected, string self, DateTimeOffset createdOn, DateTimeOffset updatedOn) + public OracleDnsPrivateViewProperties() { - Ocid = ocid; - IsProtected = isProtected; - Self = self; - CreatedOn = createdOn; - UpdatedOn = updatedOn; } /// Initializes a new instance of . @@ -71,7 +61,7 @@ public OracleDnsPrivateViewProperties(ResourceIdentifier ocid, bool isProtected, /// views timeCreated. /// Azure resource provisioning state. /// Keeps track of any properties unknown to the library. - internal OracleDnsPrivateViewProperties(ResourceIdentifier ocid, string displayName, bool isProtected, DnsPrivateViewsLifecycleState? lifecycleState, string self, DateTimeOffset createdOn, DateTimeOffset updatedOn, OracleDatabaseResourceProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + internal OracleDnsPrivateViewProperties(ResourceIdentifier ocid, string displayName, bool? isProtected, DnsPrivateViewsLifecycleState? lifecycleState, string self, DateTimeOffset? createdOn, DateTimeOffset? updatedOn, OracleDatabaseResourceProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) { Ocid = ocid; DisplayName = displayName; @@ -84,25 +74,20 @@ internal OracleDnsPrivateViewProperties(ResourceIdentifier ocid, string displayN _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal OracleDnsPrivateViewProperties() - { - } - /// The OCID of the view. public ResourceIdentifier Ocid { get; } /// The display name of the view resource. public string DisplayName { get; } /// A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed. - public bool IsProtected { get; } + public bool? IsProtected { get; } /// Views lifecycleState. public DnsPrivateViewsLifecycleState? LifecycleState { get; } /// The canonical absolute URL of the resource. public string Self { get; } /// views timeCreated. - public DateTimeOffset CreatedOn { get; } + public DateTimeOffset? CreatedOn { get; } /// views timeCreated. - public DateTimeOffset UpdatedOn { get; } + public DateTimeOffset? UpdatedOn { get; } /// Azure resource provisioning state. public OracleDatabaseResourceProvisioningState? ProvisioningState { get; } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleDnsPrivateZoneProperties.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleDnsPrivateZoneProperties.Serialization.cs index 0610ce78a81f..0a2c601ba865 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleDnsPrivateZoneProperties.Serialization.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleDnsPrivateZoneProperties.Serialization.cs @@ -26,32 +26,32 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod } writer.WriteStartObject(); - if (options.Format != "W") + if (options.Format != "W" && Optional.IsDefined(Ocid)) { writer.WritePropertyName("ocid"u8); writer.WriteStringValue(Ocid); } - if (options.Format != "W") + if (options.Format != "W" && Optional.IsDefined(IsProtected)) { writer.WritePropertyName("isProtected"u8); - writer.WriteBooleanValue(IsProtected); + writer.WriteBooleanValue(IsProtected.Value); } if (options.Format != "W" && Optional.IsDefined(LifecycleState)) { writer.WritePropertyName("lifecycleState"u8); writer.WriteStringValue(LifecycleState.Value.ToString()); } - if (options.Format != "W") + if (options.Format != "W" && Optional.IsDefined(Self)) { writer.WritePropertyName("self"u8); writer.WriteStringValue(Self); } - if (options.Format != "W") + if (options.Format != "W" && Optional.IsDefined(Serial)) { writer.WritePropertyName("serial"u8); - writer.WriteNumberValue(Serial); + writer.WriteNumberValue(Serial.Value); } - if (options.Format != "W") + if (options.Format != "W" && Optional.IsDefined(Version)) { writer.WritePropertyName("version"u8); writer.WriteStringValue(Version); @@ -61,15 +61,15 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WritePropertyName("viewId"u8); writer.WriteStringValue(ViewId); } - if (options.Format != "W") + if (options.Format != "W" && Optional.IsDefined(ZoneType)) { writer.WritePropertyName("zoneType"u8); - writer.WriteStringValue(ZoneType.ToString()); + writer.WriteStringValue(ZoneType.Value.ToString()); } - if (options.Format != "W") + if (options.Format != "W" && Optional.IsDefined(CreatedOn)) { writer.WritePropertyName("timeCreated"u8); - writer.WriteStringValue(CreatedOn, "O"); + writer.WriteStringValue(CreatedOn.Value, "O"); } if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { @@ -115,14 +115,14 @@ internal static OracleDnsPrivateZoneProperties DeserializeOracleDnsPrivateZonePr return null; } ResourceIdentifier ocid = default; - bool isProtected = default; + bool? isProtected = default; DnsPrivateZonesLifecycleState? lifecycleState = default; string self = default; - int serial = default; + int? serial = default; string version = default; ResourceIdentifier viewId = default; - OracleDnsPrivateZoneType zoneType = default; - DateTimeOffset timeCreated = default; + OracleDnsPrivateZoneType? zoneType = default; + DateTimeOffset? timeCreated = default; OracleDatabaseResourceProvisioningState? provisioningState = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -130,11 +130,19 @@ internal static OracleDnsPrivateZoneProperties DeserializeOracleDnsPrivateZonePr { if (property.NameEquals("ocid"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } ocid = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("isProtected"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } isProtected = property.Value.GetBoolean(); continue; } @@ -154,6 +162,10 @@ internal static OracleDnsPrivateZoneProperties DeserializeOracleDnsPrivateZonePr } if (property.NameEquals("serial"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } serial = property.Value.GetInt32(); continue; } @@ -173,11 +185,19 @@ internal static OracleDnsPrivateZoneProperties DeserializeOracleDnsPrivateZonePr } if (property.NameEquals("zoneType"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } zoneType = new OracleDnsPrivateZoneType(property.Value.GetString()); continue; } if (property.NameEquals("timeCreated"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } timeCreated = property.Value.GetDateTimeOffset("O"); continue; } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleDnsPrivateZoneProperties.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleDnsPrivateZoneProperties.cs index 767e429526c0..4dec9de63eb5 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleDnsPrivateZoneProperties.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleDnsPrivateZoneProperties.cs @@ -47,22 +47,8 @@ public partial class OracleDnsPrivateZoneProperties private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The OCID of the Zone. - /// A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed. - /// The canonical absolute URL of the resource. - /// The current serial of the zone. As seen in the zone's SOA record. - /// Version is the never-repeating, totally-orderable, version of the zone, from which the serial field of the zone's SOA record is derived. - /// The type of the zone. Must be either PRIMARY or SECONDARY. SECONDARY is only supported for GLOBAL zones. - /// Zones timeCreated. - public OracleDnsPrivateZoneProperties(ResourceIdentifier ocid, bool isProtected, string self, int serial, string version, OracleDnsPrivateZoneType zoneType, DateTimeOffset createdOn) + public OracleDnsPrivateZoneProperties() { - Ocid = ocid; - IsProtected = isProtected; - Self = self; - Serial = serial; - Version = version; - ZoneType = zoneType; - CreatedOn = createdOn; } /// Initializes a new instance of . @@ -77,7 +63,7 @@ public OracleDnsPrivateZoneProperties(ResourceIdentifier ocid, bool isProtected, /// Zones timeCreated. /// Azure resource provisioning state. /// Keeps track of any properties unknown to the library. - internal OracleDnsPrivateZoneProperties(ResourceIdentifier ocid, bool isProtected, DnsPrivateZonesLifecycleState? lifecycleState, string self, int serial, string version, ResourceIdentifier viewId, OracleDnsPrivateZoneType zoneType, DateTimeOffset createdOn, OracleDatabaseResourceProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + internal OracleDnsPrivateZoneProperties(ResourceIdentifier ocid, bool? isProtected, DnsPrivateZonesLifecycleState? lifecycleState, string self, int? serial, string version, ResourceIdentifier viewId, OracleDnsPrivateZoneType? zoneType, DateTimeOffset? createdOn, OracleDatabaseResourceProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) { Ocid = ocid; IsProtected = isProtected; @@ -92,29 +78,24 @@ internal OracleDnsPrivateZoneProperties(ResourceIdentifier ocid, bool isProtecte _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal OracleDnsPrivateZoneProperties() - { - } - /// The OCID of the Zone. public ResourceIdentifier Ocid { get; } /// A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed. - public bool IsProtected { get; } + public bool? IsProtected { get; } /// Zones lifecycleState. public DnsPrivateZonesLifecycleState? LifecycleState { get; } /// The canonical absolute URL of the resource. public string Self { get; } /// The current serial of the zone. As seen in the zone's SOA record. - public int Serial { get; } + public int? Serial { get; } /// Version is the never-repeating, totally-orderable, version of the zone, from which the serial field of the zone's SOA record is derived. public string Version { get; } /// The OCID of the private view containing the zone. This value will be null for zones in the global DNS, which are publicly resolvable and not part of a private view. public ResourceIdentifier ViewId { get; } /// The type of the zone. Must be either PRIMARY or SECONDARY. SECONDARY is only supported for GLOBAL zones. - public OracleDnsPrivateZoneType ZoneType { get; } + public OracleDnsPrivateZoneType? ZoneType { get; } /// Zones timeCreated. - public DateTimeOffset CreatedOn { get; } + public DateTimeOffset? CreatedOn { get; } /// Azure resource provisioning state. public OracleDatabaseResourceProvisioningState? ProvisioningState { get; } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleGIVersionProperties.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleGIVersionProperties.Serialization.cs index 3d6cf4f4ee75..03c8d45d2f94 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleGIVersionProperties.Serialization.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleGIVersionProperties.Serialization.cs @@ -26,7 +26,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea } writer.WriteStartObject(); - if (options.Format != "W") + if (options.Format != "W" && Optional.IsDefined(Version)) { writer.WritePropertyName("version"u8); writer.WriteStringValue(Version); diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleGIVersionProperties.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleGIVersionProperties.cs index 1fb55ebcb869..9fd1107a5f08 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleGIVersionProperties.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleGIVersionProperties.cs @@ -46,10 +46,8 @@ internal partial class OracleGIVersionProperties private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// A valid Oracle Grid Infrastructure (GI) software version. - public OracleGIVersionProperties(string version) + public OracleGIVersionProperties() { - Version = version; } /// Initializes a new instance of . @@ -61,11 +59,6 @@ internal OracleGIVersionProperties(string version, IDictionary Initializes a new instance of for deserialization. - internal OracleGIVersionProperties() - { - } - /// A valid Oracle Grid Infrastructure (GI) software version. public string Version { get; } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSubscriptionPatch.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSubscriptionPatch.cs index 86d3ac06d0a0..0c3c8e379f39 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSubscriptionPatch.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSubscriptionPatch.cs @@ -53,7 +53,7 @@ public OracleSubscriptionPatch() /// Initializes a new instance of . /// Details of the resource plan. - /// The updatable properties of the OracleSubscription. + /// The resource-specific properties for this resource. /// Keeps track of any properties unknown to the library. internal OracleSubscriptionPatch(ArmPlan plan, OracleSubscriptionUpdateProperties properties, IDictionary serializedAdditionalRawData) { @@ -64,7 +64,7 @@ internal OracleSubscriptionPatch(ArmPlan plan, OracleSubscriptionUpdatePropertie /// Details of the resource plan. public ArmPlan Plan { get; set; } - /// The updatable properties of the OracleSubscription. + /// The resource-specific properties for this resource. public OracleSubscriptionUpdateProperties Properties { get; set; } } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSubscriptionProperties.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSubscriptionProperties.Serialization.cs index a2b7d41f5e36..ecd5901d34e5 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSubscriptionProperties.Serialization.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSubscriptionProperties.Serialization.cs @@ -61,6 +61,26 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WritePropertyName("intent"u8); writer.WriteStringValue(Intent.Value.ToString()); } + if (options.Format != "W" && Optional.IsCollectionDefined(AzureSubscriptionIds)) + { + writer.WritePropertyName("azureSubscriptionIds"u8); + writer.WriteStartArray(); + foreach (var item in AzureSubscriptionIds) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(AddSubscriptionOperationState)) + { + writer.WritePropertyName("addSubscriptionOperationState"u8); + writer.WriteStringValue(AddSubscriptionOperationState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(LastOperationStatusDetail)) + { + writer.WritePropertyName("lastOperationStatusDetail"u8); + writer.WriteStringValue(LastOperationStatusDetail); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -106,6 +126,9 @@ internal static OracleSubscriptionProperties DeserializeOracleSubscriptionProper string termUnit = default; string productCode = default; OracleSubscriptionUpdateIntent? intent = default; + IReadOnlyList azureSubscriptionIds = default; + AddSubscriptionOperationState? addSubscriptionOperationState = default; + string lastOperationStatusDetail = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -161,6 +184,34 @@ internal static OracleSubscriptionProperties DeserializeOracleSubscriptionProper intent = new OracleSubscriptionUpdateIntent(property.Value.GetString()); continue; } + if (property.NameEquals("azureSubscriptionIds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + azureSubscriptionIds = array; + continue; + } + if (property.NameEquals("addSubscriptionOperationState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + addSubscriptionOperationState = new AddSubscriptionOperationState(property.Value.GetString()); + continue; + } + if (property.NameEquals("lastOperationStatusDetail"u8)) + { + lastOperationStatusDetail = property.Value.GetString(); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -175,6 +226,9 @@ internal static OracleSubscriptionProperties DeserializeOracleSubscriptionProper termUnit, productCode, intent, + azureSubscriptionIds ?? new ChangeTrackingList(), + addSubscriptionOperationState, + lastOperationStatusDetail, serializedAdditionalRawData); } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSubscriptionProperties.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSubscriptionProperties.cs index 46663dd20aa9..8c47f4147088 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSubscriptionProperties.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSubscriptionProperties.cs @@ -49,6 +49,7 @@ public partial class OracleSubscriptionProperties /// Initializes a new instance of . public OracleSubscriptionProperties() { + AzureSubscriptionIds = new ChangeTrackingList(); } /// Initializes a new instance of . @@ -59,8 +60,11 @@ public OracleSubscriptionProperties() /// Term Unit. P1Y, P3Y, etc, see Durations https://en.wikipedia.org/wiki/ISO_8601. /// Product code for the term unit. /// Intent for the update operation. + /// Azure subscriptions associated with this OracleSubscription. + /// State of the add Azure subscription operation on Oracle subscription. + /// Status details of the last operation on Oracle subscription. /// Keeps track of any properties unknown to the library. - internal OracleSubscriptionProperties(OracleSubscriptionProvisioningState? provisioningState, string saasSubscriptionId, ResourceIdentifier cloudAccountId, CloudAccountProvisioningState? cloudAccountState, string termUnit, string productCode, OracleSubscriptionUpdateIntent? intent, IDictionary serializedAdditionalRawData) + internal OracleSubscriptionProperties(OracleSubscriptionProvisioningState? provisioningState, string saasSubscriptionId, ResourceIdentifier cloudAccountId, CloudAccountProvisioningState? cloudAccountState, string termUnit, string productCode, OracleSubscriptionUpdateIntent? intent, IReadOnlyList azureSubscriptionIds, AddSubscriptionOperationState? addSubscriptionOperationState, string lastOperationStatusDetail, IDictionary serializedAdditionalRawData) { ProvisioningState = provisioningState; SaasSubscriptionId = saasSubscriptionId; @@ -69,6 +73,9 @@ internal OracleSubscriptionProperties(OracleSubscriptionProvisioningState? provi TermUnit = termUnit; ProductCode = productCode; Intent = intent; + AzureSubscriptionIds = azureSubscriptionIds; + AddSubscriptionOperationState = addSubscriptionOperationState; + LastOperationStatusDetail = lastOperationStatusDetail; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -86,5 +93,11 @@ internal OracleSubscriptionProperties(OracleSubscriptionProvisioningState? provi public string ProductCode { get; set; } /// Intent for the update operation. public OracleSubscriptionUpdateIntent? Intent { get; set; } + /// Azure subscriptions associated with this OracleSubscription. + public IReadOnlyList AzureSubscriptionIds { get; } + /// State of the add Azure subscription operation on Oracle subscription. + public AddSubscriptionOperationState? AddSubscriptionOperationState { get; } + /// Status details of the last operation on Oracle subscription. + public string LastOperationStatusDetail { get; } } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSystemVersionProperties.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSystemVersionProperties.Serialization.cs index 534b59cd66c5..12d7983acd9a 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSystemVersionProperties.Serialization.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSystemVersionProperties.Serialization.cs @@ -26,7 +26,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode } writer.WriteStartObject(); - if (options.Format != "W") + if (options.Format != "W" && Optional.IsDefined(SystemVersion)) { writer.WritePropertyName("systemVersion"u8); writer.WriteStringValue(SystemVersion); diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSystemVersionProperties.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSystemVersionProperties.cs index 51122b328aed..1bd49d6d242f 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSystemVersionProperties.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSystemVersionProperties.cs @@ -46,10 +46,8 @@ internal partial class OracleSystemVersionProperties private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// A valid Oracle System Version. - public OracleSystemVersionProperties(string systemVersion) + public OracleSystemVersionProperties() { - SystemVersion = systemVersion; } /// Initializes a new instance of . @@ -61,11 +59,6 @@ internal OracleSystemVersionProperties(string systemVersion, IDictionary Initializes a new instance of for deserialization. - internal OracleSystemVersionProperties() - { - } - /// A valid Oracle System Version. public string SystemVersion { get; } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDBServerCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDBServerCollection.cs index 1974818dcd46..c86181264ceb 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDBServerCollection.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDBServerCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(string dbse /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string dbserverocid, Cancell /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTok /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken cancell /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string dbserverocid, Cance /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string dbserverocid, CancellationToken canc /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetIfExistsA /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDBServerResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDBServerResource.cs index d73223aa38b7..f2a96e8fa95a 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDBServerResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDBServerResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancellatio /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDBSystemShapeCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDBSystemShapeCollection.cs index cfd4a43143f5..c5b91de9356f 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDBSystemShapeCollection.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDBSystemShapeCollection.cs @@ -68,7 +68,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -158,7 +158,7 @@ public virtual Response Get(string dbsystemshapenam /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -188,7 +188,7 @@ public virtual AsyncPageable GetAllAsync(Cancellati /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -218,7 +218,7 @@ public virtual Pageable GetAll(CancellationToken ca /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -261,7 +261,7 @@ public virtual async Task> ExistsAsync(string dbsystemshapename, /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -304,7 +304,7 @@ public virtual Response Exists(string dbsystemshapename, CancellationToken /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -349,7 +349,7 @@ public virtual async Task> GetIfEx /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDBSystemShapeResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDBSystemShapeResource.cs index 5ad08f145310..1a97bdf8c796 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDBSystemShapeResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDBSystemShapeResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancel /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDnsPrivateViewCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDnsPrivateViewCollection.cs index bf4e4e1f9634..9bc372830c27 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDnsPrivateViewCollection.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDnsPrivateViewCollection.cs @@ -68,7 +68,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> GetAsync(strin /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -158,7 +158,7 @@ public virtual Response Get(string dnsprivateviewo /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -188,7 +188,7 @@ public virtual AsyncPageable GetAllAsync(Cancellat /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -218,7 +218,7 @@ public virtual Pageable GetAll(CancellationToken c /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -261,7 +261,7 @@ public virtual async Task> ExistsAsync(string dnsprivateviewocid, /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -304,7 +304,7 @@ public virtual Response Exists(string dnsprivateviewocid, CancellationToke /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -349,7 +349,7 @@ public virtual async Task> GetIfE /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDnsPrivateViewResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDnsPrivateViewResource.cs index 06d1a5566821..6bef56c14769 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDnsPrivateViewResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDnsPrivateViewResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cance /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDnsPrivateZoneCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDnsPrivateZoneCollection.cs index 640c59409848..f9169a9a7275 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDnsPrivateZoneCollection.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDnsPrivateZoneCollection.cs @@ -68,7 +68,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> GetAsync(strin /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -158,7 +158,7 @@ public virtual Response Get(string dnsprivatezonen /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -188,7 +188,7 @@ public virtual AsyncPageable GetAllAsync(Cancellat /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -218,7 +218,7 @@ public virtual Pageable GetAll(CancellationToken c /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -261,7 +261,7 @@ public virtual async Task> ExistsAsync(string dnsprivatezonename, /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -304,7 +304,7 @@ public virtual Response Exists(string dnsprivatezonename, CancellationToke /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -349,7 +349,7 @@ public virtual async Task> GetIfE /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDnsPrivateZoneResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDnsPrivateZoneResource.cs index 2d439010f542..f089654ea49b 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDnsPrivateZoneResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDnsPrivateZoneResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cance /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleGIVersionCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleGIVersionCollection.cs index fa4d6ea40d66..8301fbe0a45f 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleGIVersionCollection.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleGIVersionCollection.cs @@ -68,7 +68,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> GetAsync(string giv /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -158,7 +158,7 @@ public virtual Response Get(string giversionname, Cance /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -188,7 +188,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTo /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -218,7 +218,7 @@ public virtual Pageable GetAll(CancellationToken cancel /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -261,7 +261,7 @@ public virtual async Task> ExistsAsync(string giversionname, Canc /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -304,7 +304,7 @@ public virtual Response Exists(string giversionname, CancellationToken can /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -349,7 +349,7 @@ public virtual async Task> GetIfExists /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleGIVersionData.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleGIVersionData.cs index f7850d4bfa15..e78388860942 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleGIVersionData.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleGIVersionData.cs @@ -75,7 +75,6 @@ internal OracleGIVersionData(ResourceIdentifier id, string name, ResourceType re public string OracleGIVersion { get => Properties is null ? default : Properties.Version; - set => Properties = new OracleGIVersionProperties(value); } } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleGIVersionResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleGIVersionResource.cs index 9e98955a7b92..04b6933ee27f 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleGIVersionResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleGIVersionResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancellati /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleSubscriptionResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleSubscriptionResource.cs index e54faa78b31c..3ed286736701 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleSubscriptionResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleSubscriptionResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetAsync(Cancell /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -180,7 +180,7 @@ public virtual Response Get(CancellationToken cancel /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -222,7 +222,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -264,7 +264,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -310,7 +310,7 @@ public virtual async Task> UpdateAsync( /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual ArmOperation Update(WaitUntil waitUnt /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -402,7 +402,7 @@ public virtual async Task> CreateOrUpda /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -435,6 +435,98 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil } } + /// + /// Add Azure Subscriptions + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default/addAzureSubscriptions + /// + /// + /// Operation Id + /// OracleSubscriptions_AddAzureSubscriptions + /// + /// + /// Default Api Version + /// 2024-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual async Task AddAzureSubscriptionsAsync(WaitUntil waitUntil, AzureSubscriptions body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _oracleSubscriptionClientDiagnostics.CreateScope("OracleSubscriptionResource.AddAzureSubscriptions"); + scope.Start(); + try + { + var response = await _oracleSubscriptionRestClient.AddAzureSubscriptionsAsync(Id.SubscriptionId, body, cancellationToken).ConfigureAwait(false); + var operation = new OracleDatabaseArmOperation(_oracleSubscriptionClientDiagnostics, Pipeline, _oracleSubscriptionRestClient.CreateAddAzureSubscriptionsRequest(Id.SubscriptionId, body).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add Azure Subscriptions + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default/addAzureSubscriptions + /// + /// + /// Operation Id + /// OracleSubscriptions_AddAzureSubscriptions + /// + /// + /// Default Api Version + /// 2024-06-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation AddAzureSubscriptions(WaitUntil waitUntil, AzureSubscriptions body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _oracleSubscriptionClientDiagnostics.CreateScope("OracleSubscriptionResource.AddAzureSubscriptions"); + scope.Start(); + try + { + var response = _oracleSubscriptionRestClient.AddAzureSubscriptions(Id.SubscriptionId, body, cancellationToken); + var operation = new OracleDatabaseArmOperation(_oracleSubscriptionClientDiagnostics, Pipeline, _oracleSubscriptionRestClient.CreateAddAzureSubscriptionsRequest(Id.SubscriptionId, body).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// List Activation Links /// @@ -448,7 +540,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -490,7 +582,7 @@ public virtual async Task> GetActivati /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -532,7 +624,7 @@ public virtual ArmOperation GetActivationLinks(Wait /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -574,7 +666,7 @@ public virtual async Task> GetCloudAccountDeta /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -616,7 +708,7 @@ public virtual ArmOperation GetCloudAccountDetails(WaitUnti /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -658,7 +750,7 @@ public virtual async Task> GetSaasSubscrip /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleSystemVersionCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleSystemVersionCollection.cs index c9bee9e10153..c4f521cb1d96 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleSystemVersionCollection.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleSystemVersionCollection.cs @@ -68,7 +68,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -158,7 +158,7 @@ public virtual Response Get(string systemversionnam /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -188,7 +188,7 @@ public virtual AsyncPageable GetAllAsync(Cancellati /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -218,7 +218,7 @@ public virtual Pageable GetAll(CancellationToken ca /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -261,7 +261,7 @@ public virtual async Task> ExistsAsync(string systemversionname, /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -304,7 +304,7 @@ public virtual Response Exists(string systemversionname, CancellationToken /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -349,7 +349,7 @@ public virtual async Task> GetIfEx /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleSystemVersionData.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleSystemVersionData.cs index df3f767b04da..aa6e61253745 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleSystemVersionData.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleSystemVersionData.cs @@ -75,7 +75,6 @@ internal OracleSystemVersionData(ResourceIdentifier id, string name, ResourceTyp public string OracleSystemVersion { get => Properties is null ? default : Properties.SystemVersion; - set => Properties = new OracleSystemVersionProperties(value); } } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleSystemVersionResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleSystemVersionResource.cs index 3ccef66e54d9..2320826c63b6 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleSystemVersionResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleSystemVersionResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancel /// /// /// Default Api Version - /// 2023-09-01 + /// 2024-06-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/AutonomousDatabaseBackupsRestOperations.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/AutonomousDatabaseBackupsRestOperations.cs index 6012ec7c8c91..d42e98c80768 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/AutonomousDatabaseBackupsRestOperations.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/AutonomousDatabaseBackupsRestOperations.cs @@ -32,7 +32,7 @@ public AutonomousDatabaseBackupsRestOperations(HttpPipeline pipeline, string app { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-09-01"; + _apiVersion = apiVersion ?? "2024-06-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/AutonomousDatabaseCharacterSetsRestOperations.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/AutonomousDatabaseCharacterSetsRestOperations.cs index d95c3dfd3ef2..dd87730d8f14 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/AutonomousDatabaseCharacterSetsRestOperations.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/AutonomousDatabaseCharacterSetsRestOperations.cs @@ -32,7 +32,7 @@ public AutonomousDatabaseCharacterSetsRestOperations(HttpPipeline pipeline, stri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-09-01"; + _apiVersion = apiVersion ?? "2024-06-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/AutonomousDatabaseNationalCharacterSetsRestOperations.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/AutonomousDatabaseNationalCharacterSetsRestOperations.cs index 0521d0601314..cb89d906d0c9 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/AutonomousDatabaseNationalCharacterSetsRestOperations.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/AutonomousDatabaseNationalCharacterSetsRestOperations.cs @@ -32,7 +32,7 @@ public AutonomousDatabaseNationalCharacterSetsRestOperations(HttpPipeline pipeli { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-09-01"; + _apiVersion = apiVersion ?? "2024-06-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/AutonomousDatabaseVersionsRestOperations.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/AutonomousDatabaseVersionsRestOperations.cs index 63551352bec6..ed01e52433fc 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/AutonomousDatabaseVersionsRestOperations.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/AutonomousDatabaseVersionsRestOperations.cs @@ -32,7 +32,7 @@ public AutonomousDatabaseVersionsRestOperations(HttpPipeline pipeline, string ap { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-09-01"; + _apiVersion = apiVersion ?? "2024-06-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/AutonomousDatabasesRestOperations.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/AutonomousDatabasesRestOperations.cs index 64b79ad12a50..a2b179a540d3 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/AutonomousDatabasesRestOperations.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/AutonomousDatabasesRestOperations.cs @@ -32,7 +32,7 @@ public AutonomousDatabasesRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-09-01"; + _apiVersion = apiVersion ?? "2024-06-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/CloudExadataInfrastructuresRestOperations.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/CloudExadataInfrastructuresRestOperations.cs index 65bc8d6fc938..5e40931dd5f8 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/CloudExadataInfrastructuresRestOperations.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/CloudExadataInfrastructuresRestOperations.cs @@ -32,7 +32,7 @@ public CloudExadataInfrastructuresRestOperations(HttpPipeline pipeline, string a { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-09-01"; + _apiVersion = apiVersion ?? "2024-06-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/CloudVmClustersRestOperations.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/CloudVmClustersRestOperations.cs index b47efa75f790..ad316181966f 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/CloudVmClustersRestOperations.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/CloudVmClustersRestOperations.cs @@ -33,7 +33,7 @@ public CloudVmClustersRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-09-01"; + _apiVersion = apiVersion ?? "2024-06-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/DbNodesRestOperations.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/DbNodesRestOperations.cs index f082d6464af5..de9be8b9a4b4 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/DbNodesRestOperations.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/DbNodesRestOperations.cs @@ -32,7 +32,7 @@ public DbNodesRestOperations(HttpPipeline pipeline, string applicationId, Uri en { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-09-01"; + _apiVersion = apiVersion ?? "2024-06-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/DbServersRestOperations.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/DbServersRestOperations.cs index cb68b4bb480a..0fa62104760f 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/DbServersRestOperations.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/DbServersRestOperations.cs @@ -32,7 +32,7 @@ public DbServersRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-09-01"; + _apiVersion = apiVersion ?? "2024-06-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/DbSystemShapesRestOperations.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/DbSystemShapesRestOperations.cs index 4662323d4f9e..48ed2fbd0865 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/DbSystemShapesRestOperations.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/DbSystemShapesRestOperations.cs @@ -32,7 +32,7 @@ public DbSystemShapesRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-09-01"; + _apiVersion = apiVersion ?? "2024-06-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/DnsPrivateViewsRestOperations.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/DnsPrivateViewsRestOperations.cs index 4965ffde7211..fbb0911c55f6 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/DnsPrivateViewsRestOperations.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/DnsPrivateViewsRestOperations.cs @@ -32,7 +32,7 @@ public DnsPrivateViewsRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-09-01"; + _apiVersion = apiVersion ?? "2024-06-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/DnsPrivateZonesRestOperations.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/DnsPrivateZonesRestOperations.cs index 139c56b8cea9..11f584e968f9 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/DnsPrivateZonesRestOperations.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/DnsPrivateZonesRestOperations.cs @@ -32,7 +32,7 @@ public DnsPrivateZonesRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-09-01"; + _apiVersion = apiVersion ?? "2024-06-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/GiVersionsRestOperations.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/GiVersionsRestOperations.cs index b35bad7f6b9d..7c4e33442a9d 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/GiVersionsRestOperations.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/GiVersionsRestOperations.cs @@ -32,7 +32,7 @@ public GiVersionsRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-09-01"; + _apiVersion = apiVersion ?? "2024-06-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/OracleSubscriptionsRestOperations.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/OracleSubscriptionsRestOperations.cs index f3f259450439..4592bb45bbbc 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/OracleSubscriptionsRestOperations.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/OracleSubscriptionsRestOperations.cs @@ -32,7 +32,7 @@ public OracleSubscriptionsRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-09-01"; + _apiVersion = apiVersion ?? "2024-06-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -422,6 +422,82 @@ public Response Delete(string subscriptionId, CancellationToken cancellationToke } } + internal RequestUriBuilder CreateAddAzureSubscriptionsRequestUri(string subscriptionId, AzureSubscriptions body) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/oracleSubscriptions/default/addAzureSubscriptions", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateAddAzureSubscriptionsRequest(string subscriptionId, AzureSubscriptions body) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/oracleSubscriptions/default/addAzureSubscriptions", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(body, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Add Azure Subscriptions. + /// The ID of the target subscription. The value must be an UUID. + /// The content of the action request. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task AddAzureSubscriptionsAsync(string subscriptionId, AzureSubscriptions body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateAddAzureSubscriptionsRequest(subscriptionId, body); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Add Azure Subscriptions. + /// The ID of the target subscription. The value must be an UUID. + /// The content of the action request. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response AddAzureSubscriptions(string subscriptionId, AzureSubscriptions body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateAddAzureSubscriptionsRequest(subscriptionId, body); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListActivationLinksRequestUri(string subscriptionId) { var uri = new RawRequestUriBuilder(); diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/SystemVersionsRestOperations.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/SystemVersionsRestOperations.cs index 75fed813e12c..7d2548ec157e 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/SystemVersionsRestOperations.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/SystemVersionsRestOperations.cs @@ -32,7 +32,7 @@ public SystemVersionsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-09-01"; + _apiVersion = apiVersion ?? "2024-06-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/VirtualNetworkAddressesRestOperations.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/VirtualNetworkAddressesRestOperations.cs index f5075227a24b..9b5ababd2566 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/VirtualNetworkAddressesRestOperations.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/VirtualNetworkAddressesRestOperations.cs @@ -32,7 +32,7 @@ public VirtualNetworkAddressesRestOperations(HttpPipeline pipeline, string appli { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-09-01"; + _apiVersion = apiVersion ?? "2024-06-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/autorest.md b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/autorest.md index 3ebbc4726772..332430c2adf7 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/autorest.md +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/autorest.md @@ -7,7 +7,7 @@ azure-arm: true csharp: true library-name: OracleDatabase namespace: Azure.ResourceManager.OracleDatabase -require: https://github.com/Azure/azure-rest-api-specs/blob/ec7ee8842bf615c2f0354bf8b5b8725fdac9454a/specification/oracle/resource-manager/readme.md +require: /mnt/vss/_work/1/s/azure-rest-api-specs/specification/oracle/resource-manager/readme.md #tag: package-2023-09-01 output-folder: $(this-folder)/Generated clear-output-folder: true @@ -152,4 +152,4 @@ acronym-mapping: Etag: ETag|etag Db: DB|db -``` \ No newline at end of file +``` diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/Azure.Communication.ProgrammableConnectivity.sln b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/Azure.Communication.ProgrammableConnectivity.sln new file mode 100644 index 000000000000..fc1ee5156b11 --- /dev/null +++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/Azure.Communication.ProgrammableConnectivity.sln @@ -0,0 +1,56 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29709.97 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Core.TestFramework", "..\..\core\Azure.Core.TestFramework\src\Azure.Core.TestFramework.csproj", "{ECC730C1-4AEA-420C-916A-66B19B79E4DC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.Communication.ProgrammableConnectivity", "src\Azure.Communication.ProgrammableConnectivity.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.Communication.ProgrammableConnectivity.Tests", "tests\Azure.Communication.ProgrammableConnectivity.Tests.csproj", "{1F1CD1D4-9932-4B73-99D8-C252A67D4B46}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.Build.0 = Release|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.Build.0 = Release|Any CPU + {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Release|Any CPU.Build.0 = Release|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.Build.0 = Release|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.Build.0 = Release|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.Build.0 = Release|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.Build.0 = Debug|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.ActiveCfg = Release|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.Build.0 = Release|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {A97F4B90-2591-4689-B1F8-5F21FE6D6CAE} + EndGlobalSection +EndGlobal diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/CHANGELOG.md b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/CHANGELOG.md new file mode 100644 index 000000000000..13dd08af78ab --- /dev/null +++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/CHANGELOG.md @@ -0,0 +1,11 @@ +# Release History + +## 1.0.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/Directory.Build.props b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/Directory.Build.props new file mode 100644 index 000000000000..63bd836ad44b --- /dev/null +++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/Directory.Build.props @@ -0,0 +1,6 @@ + + + + diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/README.md b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/README.md new file mode 100644 index 000000000000..84978564a517 --- /dev/null +++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/README.md @@ -0,0 +1,107 @@ +# Azure.Communication.ProgrammableConnectivity client library for .NET + +Azure.Communication.ProgrammableConnectivity is a managed service that helps developers get secret simply and securely. + +Use the client library for to: + +* [Get secret](https://docs.microsoft.com/azure) + +[Source code][source_root] | [Package (NuGet)][package] | [API reference documentation][reference_docs] | [Product documentation][azconfig_docs] | [Samples][source_samples] + + [Source code](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src) | [Package (NuGet)](https://www.nuget.org/packages) | [API reference documentation](https://azure.github.io/azure-sdk-for-net) | [Product documentation](https://docs.microsoft.com/azure) + +## Getting started + +This section should include everything a developer needs to do to install and create their first client connection *very quickly*. + +### Install the package + +First, provide instruction for obtaining and installing the package or library. This section might include only a single line of code, like `dotnet add package package-name`, but should enable a developer to successfully install the package from NuGet, npm, or even cloning a GitHub repository. + +Install the client library for .NET with [NuGet](https://www.nuget.org/ ): + +```dotnetcli +dotnet add package Azure.Communication.ProgrammableConnectivity --prerelease +``` + +### Prerequisites + +Include a section after the install command that details any requirements that must be satisfied before a developer can [authenticate](#authenticate-the-client) and test all of the snippets in the [Examples](#examples) section. For example, for Cosmos DB: + +> You must have an [Azure subscription](https://azure.microsoft.com/free/dotnet/) and [Cosmos DB account](https://docs.microsoft.com/azure/cosmos-db/account-overview) (SQL API). In order to take advantage of the C# 8.0 syntax, it is recommended that you compile using the [.NET Core SDK](https://dotnet.microsoft.com/download) 3.0 or higher with a [language version](https://docs.microsoft.com/dotnet/csharp/language-reference/configure-language-version#override-a-default) of `latest`. It is also possible to compile with the .NET Core SDK 2.1.x using a language version of `preview`. + +### Authenticate the client + +If your library requires authentication for use, such as for Azure services, include instructions and example code needed for initializing and authenticating. + +For example, include details on obtaining an account key and endpoint URI, setting environment variables for each, and initializing the client object. + +### Service API versions + +The client library targets the latest service API version by default. A client instance accepts an optional service API version parameter from its options to specify which API version service to communicate. + +#### Select a service API version + +You have the flexibility to explicitly select a supported service API version when instantiating a client by configuring its associated options. This ensures that the client can communicate with services using the specified API version. + +For example, + +```C# Snippet:CreateClientForSpecificApiVersion +Uri endpoint = new Uri(""); +DefaultAzureCredential credential = new DefaultAzureCredential(); +ClientOptions options = new ClientOptions(ClientOptions.ServiceVersion.) +var client = new Client(endpoint, credential, options); +``` + +When selecting an API version, it's important to verify that there are no breaking changes compared to the latest API version. If there are significant differences, API calls may fail due to incompatibility. + +Always ensure that the chosen API version is fully supported and operational for your specific use case and that it aligns with the service's versioning policy. + +## Key concepts + +The *Key concepts* section should describe the functionality of the main classes. Point out the most important and useful classes in the package (with links to their reference pages) and explain how those classes work together. Feel free to use bulleted lists, tables, code blocks, or even diagrams for clarity. + +Include the *Thread safety* and *Additional concepts* sections below at the end of your *Key concepts* section. You may remove or add links depending on what your library makes use of: + +### Thread safety + +We guarantee that all client instance methods are thread-safe and independent of each other ([guideline](https://azure.github.io/azure-sdk/dotnet_introduction.html#dotnet-service-methods-thread-safety)). This ensures that the recommendation of reusing client instances is always safe, even across threads. + +### Additional concepts + +[Client options](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#configuring-service-clients-using-clientoptions) | +[Accessing the response](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#accessing-http-response-details-using-responset) | +[Long-running operations](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#consuming-long-running-operations-using-operationt) | +[Handling failures](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#reporting-errors-requestfailedexception) | +[Diagnostics](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/Diagnostics.md) | +[Mocking](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#mocking) | +[Client lifetime](https://devblogs.microsoft.com/azure-sdk/lifetime-management-and-thread-safety-guarantees-of-azure-sdk-net-clients/) + + +## Examples + +You can familiarize yourself with different APIs using [Samples](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/samples). + +## Troubleshooting + +Describe common errors and exceptions, how to "unpack" them if necessary, and include guidance for graceful handling and recovery. + +Provide information to help developers avoid throttling or other service-enforced errors they might encounter. For example, provide guidance and examples for using retry or connection policies in the API. + +If the package or a related package supports it, include tips for logging or enabling instrumentation to help them debug their code. + +## Next steps + +* Provide a link to additional code examples, ideally to those sitting alongside the README in the package's `/samples` directory. +* If appropriate, point users to other packages that might be useful. +* If you think there's a good chance that developers might stumble across your package in error (because they're searching for specific functionality and mistakenly think the package provides that functionality), point them to the packages they might be looking for. + +## Contributing + +This is a template, but your SDK readme should include details on how to contribute code to the repo/package. + + +[style-guide-msft]: https://docs.microsoft.com/style-guide/capitalization +[style-guide-cloud]: https://aka.ms/azsdk/cloud-style-guide + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-net/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/README.png) diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/api/Azure.Communication.ProgrammableConnectivity.netstandard2.0.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/api/Azure.Communication.ProgrammableConnectivity.netstandard2.0.cs new file mode 100644 index 000000000000..86b3cbb0da7b --- /dev/null +++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/api/Azure.Communication.ProgrammableConnectivity.netstandard2.0.cs @@ -0,0 +1,241 @@ +namespace Azure.Communication.ProgrammableConnectivity +{ + public static partial class CommunicationProgrammableConnectivityModelFactory + { + public static Azure.Communication.ProgrammableConnectivity.DeviceLocationVerificationResult DeviceLocationVerificationResult(bool verificationResult = false) { throw null; } + public static Azure.Communication.ProgrammableConnectivity.NetworkRetrievalResult NetworkRetrievalResult(string networkCode = null) { throw null; } + public static Azure.Communication.ProgrammableConnectivity.NumberVerificationResult NumberVerificationResult(bool verificationResult = false) { throw null; } + public static Azure.Communication.ProgrammableConnectivity.NumberVerificationWithoutCodeContent NumberVerificationWithoutCodeContent(Azure.Communication.ProgrammableConnectivity.NetworkIdentifier networkIdentifier = null, string phoneNumber = null, string hashedPhoneNumber = null, System.Uri redirectUri = null) { throw null; } + public static Azure.Communication.ProgrammableConnectivity.SimSwapRetrievalContent SimSwapRetrievalContent(string phoneNumber = null, Azure.Communication.ProgrammableConnectivity.NetworkIdentifier networkIdentifier = null) { throw null; } + public static Azure.Communication.ProgrammableConnectivity.SimSwapRetrievalResult SimSwapRetrievalResult(System.DateTimeOffset? date = default(System.DateTimeOffset?)) { throw null; } + public static Azure.Communication.ProgrammableConnectivity.SimSwapVerificationContent SimSwapVerificationContent(string phoneNumber = null, int? maxAgeHours = default(int?), Azure.Communication.ProgrammableConnectivity.NetworkIdentifier networkIdentifier = null) { throw null; } + public static Azure.Communication.ProgrammableConnectivity.SimSwapVerificationResult SimSwapVerificationResult(bool verificationResult = false) { throw null; } + } + public partial class DeviceLocation + { + protected DeviceLocation() { } + public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } + public virtual Azure.Response Verify(string apcGatewayId, Azure.Communication.ProgrammableConnectivity.DeviceLocationVerificationContent body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Verify(string apcGatewayId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> VerifyAsync(string apcGatewayId, Azure.Communication.ProgrammableConnectivity.DeviceLocationVerificationContent body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task VerifyAsync(string apcGatewayId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + } + public partial class DeviceLocationVerificationContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DeviceLocationVerificationContent(Azure.Communication.ProgrammableConnectivity.NetworkIdentifier networkIdentifier, double latitude, double longitude, int accuracy, Azure.Communication.ProgrammableConnectivity.LocationDevice device) { } + public int Accuracy { get { throw null; } } + public Azure.Communication.ProgrammableConnectivity.LocationDevice Device { get { throw null; } } + public double Latitude { get { throw null; } } + public double Longitude { get { throw null; } } + public Azure.Communication.ProgrammableConnectivity.NetworkIdentifier NetworkIdentifier { get { throw null; } } + Azure.Communication.ProgrammableConnectivity.DeviceLocationVerificationContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Communication.ProgrammableConnectivity.DeviceLocationVerificationContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DeviceLocationVerificationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DeviceLocationVerificationResult() { } + public bool VerificationResult { get { throw null; } } + Azure.Communication.ProgrammableConnectivity.DeviceLocationVerificationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Communication.ProgrammableConnectivity.DeviceLocationVerificationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DeviceNetwork + { + protected DeviceNetwork() { } + public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } + public virtual Azure.Response Retrieve(string apcGatewayId, Azure.Communication.ProgrammableConnectivity.NetworkIdentifier body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Retrieve(string apcGatewayId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> RetrieveAsync(string apcGatewayId, Azure.Communication.ProgrammableConnectivity.NetworkIdentifier body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task RetrieveAsync(string apcGatewayId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + } + public partial class Ipv4Address : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public Ipv4Address(string ipv4, int port) { } + public string Ipv4 { get { throw null; } } + public int Port { get { throw null; } } + Azure.Communication.ProgrammableConnectivity.Ipv4Address System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Communication.ProgrammableConnectivity.Ipv4Address System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class Ipv6Address : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public Ipv6Address(string ipv6, int port) { } + public string Ipv6 { get { throw null; } } + public int Port { get { throw null; } } + Azure.Communication.ProgrammableConnectivity.Ipv6Address System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Communication.ProgrammableConnectivity.Ipv6Address System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class LocationDevice : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public LocationDevice() { } + public Azure.Communication.ProgrammableConnectivity.Ipv4Address Ipv4Address { get { throw null; } set { } } + public Azure.Communication.ProgrammableConnectivity.Ipv6Address Ipv6Address { get { throw null; } set { } } + public string NetworkAccessIdentifier { get { throw null; } set { } } + public string PhoneNumber { get { throw null; } set { } } + Azure.Communication.ProgrammableConnectivity.LocationDevice System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Communication.ProgrammableConnectivity.LocationDevice System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class NetworkIdentifier : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NetworkIdentifier(string identifierType, string identifier) { } + public string Identifier { get { throw null; } } + public string IdentifierType { get { throw null; } } + Azure.Communication.ProgrammableConnectivity.NetworkIdentifier System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Communication.ProgrammableConnectivity.NetworkIdentifier System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class NetworkRetrievalResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal NetworkRetrievalResult() { } + public string NetworkCode { get { throw null; } } + Azure.Communication.ProgrammableConnectivity.NetworkRetrievalResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Communication.ProgrammableConnectivity.NetworkRetrievalResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class NumberVerification + { + protected NumberVerification() { } + public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } + public virtual Azure.Response VerifyWithCode(string apcGatewayId, Azure.Communication.ProgrammableConnectivity.NumberVerificationWithCodeContent body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response VerifyWithCode(string apcGatewayId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> VerifyWithCodeAsync(string apcGatewayId, Azure.Communication.ProgrammableConnectivity.NumberVerificationWithCodeContent body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task VerifyWithCodeAsync(string apcGatewayId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response VerifyWithoutCode(string apcGatewayId, Azure.Communication.ProgrammableConnectivity.NumberVerificationWithoutCodeContent body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response VerifyWithoutCode(string apcGatewayId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task VerifyWithoutCodeAsync(string apcGatewayId, Azure.Communication.ProgrammableConnectivity.NumberVerificationWithoutCodeContent body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task VerifyWithoutCodeAsync(string apcGatewayId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + } + public partial class NumberVerificationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal NumberVerificationResult() { } + public bool VerificationResult { get { throw null; } } + Azure.Communication.ProgrammableConnectivity.NumberVerificationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Communication.ProgrammableConnectivity.NumberVerificationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class NumberVerificationWithCodeContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NumberVerificationWithCodeContent(string apcCode) { } + public string ApcCode { get { throw null; } } + Azure.Communication.ProgrammableConnectivity.NumberVerificationWithCodeContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Communication.ProgrammableConnectivity.NumberVerificationWithCodeContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class NumberVerificationWithoutCodeContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NumberVerificationWithoutCodeContent(Azure.Communication.ProgrammableConnectivity.NetworkIdentifier networkIdentifier, System.Uri redirectUri) { } + public string HashedPhoneNumber { get { throw null; } set { } } + public Azure.Communication.ProgrammableConnectivity.NetworkIdentifier NetworkIdentifier { get { throw null; } } + public string PhoneNumber { get { throw null; } set { } } + public System.Uri RedirectUri { get { throw null; } } + Azure.Communication.ProgrammableConnectivity.NumberVerificationWithoutCodeContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Communication.ProgrammableConnectivity.NumberVerificationWithoutCodeContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProgrammableConnectivityClient + { + protected ProgrammableConnectivityClient() { } + public ProgrammableConnectivityClient(System.Uri endpoint, Azure.Core.TokenCredential credential) { } + public ProgrammableConnectivityClient(System.Uri endpoint, Azure.Core.TokenCredential credential, Azure.Communication.ProgrammableConnectivity.ProgrammableConnectivityClientOptions options) { } + public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } + public virtual Azure.Communication.ProgrammableConnectivity.DeviceLocation GetDeviceLocationClient(string apiVersion = "2024-02-09-preview") { throw null; } + public virtual Azure.Communication.ProgrammableConnectivity.DeviceNetwork GetDeviceNetworkClient(string apiVersion = "2024-02-09-preview") { throw null; } + public virtual Azure.Communication.ProgrammableConnectivity.NumberVerification GetNumberVerificationClient(string apiVersion = "2024-02-09-preview") { throw null; } + public virtual Azure.Communication.ProgrammableConnectivity.SimSwap GetSimSwapClient(string apiVersion = "2024-02-09-preview") { throw null; } + } + public partial class ProgrammableConnectivityClientOptions : Azure.Core.ClientOptions + { + public ProgrammableConnectivityClientOptions(Azure.Communication.ProgrammableConnectivity.ProgrammableConnectivityClientOptions.ServiceVersion version = Azure.Communication.ProgrammableConnectivity.ProgrammableConnectivityClientOptions.ServiceVersion.V2024_02_09_Preview) { } + public enum ServiceVersion + { + V2024_02_09_Preview = 1, + } + } + public partial class SimSwap + { + protected SimSwap() { } + public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } + public virtual Azure.Response Retrieve(string apcGatewayId, Azure.Communication.ProgrammableConnectivity.SimSwapRetrievalContent body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Retrieve(string apcGatewayId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> RetrieveAsync(string apcGatewayId, Azure.Communication.ProgrammableConnectivity.SimSwapRetrievalContent body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task RetrieveAsync(string apcGatewayId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response Verify(string apcGatewayId, Azure.Communication.ProgrammableConnectivity.SimSwapVerificationContent body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Verify(string apcGatewayId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> VerifyAsync(string apcGatewayId, Azure.Communication.ProgrammableConnectivity.SimSwapVerificationContent body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task VerifyAsync(string apcGatewayId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + } + public partial class SimSwapRetrievalContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SimSwapRetrievalContent(Azure.Communication.ProgrammableConnectivity.NetworkIdentifier networkIdentifier) { } + public Azure.Communication.ProgrammableConnectivity.NetworkIdentifier NetworkIdentifier { get { throw null; } } + public string PhoneNumber { get { throw null; } set { } } + Azure.Communication.ProgrammableConnectivity.SimSwapRetrievalContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Communication.ProgrammableConnectivity.SimSwapRetrievalContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SimSwapRetrievalResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SimSwapRetrievalResult() { } + public System.DateTimeOffset? Date { get { throw null; } } + Azure.Communication.ProgrammableConnectivity.SimSwapRetrievalResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Communication.ProgrammableConnectivity.SimSwapRetrievalResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SimSwapVerificationContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SimSwapVerificationContent(Azure.Communication.ProgrammableConnectivity.NetworkIdentifier networkIdentifier) { } + public int? MaxAgeHours { get { throw null; } set { } } + public Azure.Communication.ProgrammableConnectivity.NetworkIdentifier NetworkIdentifier { get { throw null; } } + public string PhoneNumber { get { throw null; } set { } } + Azure.Communication.ProgrammableConnectivity.SimSwapVerificationContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Communication.ProgrammableConnectivity.SimSwapVerificationContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SimSwapVerificationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SimSwapVerificationResult() { } + public bool VerificationResult { get { throw null; } } + Azure.Communication.ProgrammableConnectivity.SimSwapVerificationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Communication.ProgrammableConnectivity.SimSwapVerificationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } +} +namespace Microsoft.Extensions.Azure +{ + public static partial class CommunicationProgrammableConnectivityClientBuilderExtensions + { + public static Azure.Core.Extensions.IAzureClientBuilder AddProgrammableConnectivityClient(this TBuilder builder, System.Uri endpoint) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithCredential { throw null; } + public static Azure.Core.Extensions.IAzureClientBuilder AddProgrammableConnectivityClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { throw null; } + } +} diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Azure.Communication.ProgrammableConnectivity.csproj b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Azure.Communication.ProgrammableConnectivity.csproj new file mode 100644 index 000000000000..a3206b8c2f96 --- /dev/null +++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Azure.Communication.ProgrammableConnectivity.csproj @@ -0,0 +1,19 @@ + + + This is the Azure.Communication.ProgrammableConnectivity client library for developing .NET applications with rich experience. + Azure SDK Code Generation Azure.Communication.ProgrammableConnectivity for Azure Data Plane + 1.0.0-beta.1 + Azure.Communication.ProgrammableConnectivity + $(RequiredTargetFrameworks) + true + + + + + + + + + + + diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/CommunicationProgrammableConnectivityClientBuilderExtensions.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/CommunicationProgrammableConnectivityClientBuilderExtensions.cs new file mode 100644 index 000000000000..e5e56416b03c --- /dev/null +++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/CommunicationProgrammableConnectivityClientBuilderExtensions.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Communication.ProgrammableConnectivity; +using Azure.Core.Extensions; + +namespace Microsoft.Extensions.Azure +{ + /// Extension methods to add to client builder. + public static partial class CommunicationProgrammableConnectivityClientBuilderExtensions + { + /// Registers a instance. + /// The builder to register with. + /// An Azure Programmable Connectivity Endpoint providing access to Network APIs, for example https://{region}.apcgatewayapi.azure.com. + public static IAzureClientBuilder AddProgrammableConnectivityClient(this TBuilder builder, Uri endpoint) + where TBuilder : IAzureClientFactoryBuilderWithCredential + { + return builder.RegisterClientFactory((options, cred) => new ProgrammableConnectivityClient(endpoint, cred, options)); + } + + /// Registers a instance. + /// The builder to register with. + /// The configuration values. + public static IAzureClientBuilder AddProgrammableConnectivityClient(this TBuilder builder, TConfiguration configuration) + where TBuilder : IAzureClientFactoryBuilderWithConfiguration + { + return builder.RegisterClientFactory(configuration); + } + } +} diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/CommunicationProgrammableConnectivityModelFactory.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/CommunicationProgrammableConnectivityModelFactory.cs new file mode 100644 index 000000000000..10a3a049d2e7 --- /dev/null +++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/CommunicationProgrammableConnectivityModelFactory.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.Communication.ProgrammableConnectivity +{ + /// Model factory for models. + public static partial class CommunicationProgrammableConnectivityModelFactory + { + /// Initializes a new instance of . + /// Phone number in E.164 format (starting with country code), and optionally prefixed with '+'. + /// Network to query for this device. + /// A new instance for mocking. + public static SimSwapRetrievalContent SimSwapRetrievalContent(string phoneNumber = null, NetworkIdentifier networkIdentifier = null) + { + return new SimSwapRetrievalContent(phoneNumber, networkIdentifier, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Datetime of most recent swap for SIM. + /// A new instance for mocking. + public static SimSwapRetrievalResult SimSwapRetrievalResult(DateTimeOffset? date = null) + { + return new SimSwapRetrievalResult(date, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Phone number in E.164 format (starting with country code), and optionally prefixed with '+'. + /// Maximum lookback for SimSwap verification. + /// Identifier for the network to query for this device. + /// A new instance for mocking. + public static SimSwapVerificationContent SimSwapVerificationContent(string phoneNumber = null, int? maxAgeHours = null, NetworkIdentifier networkIdentifier = null) + { + return new SimSwapVerificationContent(phoneNumber, maxAgeHours, networkIdentifier, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// True if the SIM has swapped in the specified period, False otherwise. + /// A new instance for mocking. + public static SimSwapVerificationResult SimSwapVerificationResult(bool verificationResult = default) + { + return new SimSwapVerificationResult(verificationResult, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Identifier for the network to query for this device. + /// Phone number in E.164 format (starting with country code), and optionally prefixed with '+'. + /// Hashed phone number. SHA-256 (in hexadecimal representation) of the mobile phone number in **E.164 format (starting with country code)**. Optionally prefixed with '+'. + /// Redirect URI to backend application. + /// A new instance for mocking. + public static NumberVerificationWithoutCodeContent NumberVerificationWithoutCodeContent(NetworkIdentifier networkIdentifier = null, string phoneNumber = null, string hashedPhoneNumber = null, Uri redirectUri = null) + { + return new NumberVerificationWithoutCodeContent(networkIdentifier, phoneNumber, hashedPhoneNumber, redirectUri, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// True if number if the phone number matches the device, False otherwise. + /// A new instance for mocking. + public static NumberVerificationResult NumberVerificationResult(bool verificationResult = default) + { + return new NumberVerificationResult(verificationResult, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The identifier for the network. This can be used as the networkIdentifier for the service APIs. + /// A new instance for mocking. + public static NetworkRetrievalResult NetworkRetrievalResult(string networkCode = null) + { + return new NetworkRetrievalResult(networkCode, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// True if the location is in the specified area, False otherwise. + /// A new instance for mocking. + public static DeviceLocationVerificationResult DeviceLocationVerificationResult(bool verificationResult = default) + { + return new DeviceLocationVerificationResult(verificationResult, serializedAdditionalRawData: null); + } + } +} diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/DeviceLocation.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/DeviceLocation.cs new file mode 100644 index 000000000000..927683a9c7ad --- /dev/null +++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/DeviceLocation.cs @@ -0,0 +1,199 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Communication.ProgrammableConnectivity +{ + // Data plane generated sub-client. + /// The DeviceLocation sub-client. + public partial class DeviceLocation + { + private static readonly string[] AuthorizationScopes = new string[] { "https://management.azure.com//.default" }; + private readonly TokenCredential _tokenCredential; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// The ClientDiagnostics is used to provide tracing support for the client library. + internal ClientDiagnostics ClientDiagnostics { get; } + + /// The HTTP pipeline for sending and receiving REST requests and responses. + public virtual HttpPipeline Pipeline => _pipeline; + + /// Initializes a new instance of DeviceLocation for mocking. + protected DeviceLocation() + { + } + + /// Initializes a new instance of DeviceLocation. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The token credential to copy. + /// An Azure Programmable Connectivity Endpoint providing access to Network APIs, for example https://{region}.apcgatewayapi.azure.com. + /// The API version to use for this operation. + internal DeviceLocation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, TokenCredential tokenCredential, Uri endpoint, string apiVersion) + { + ClientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + _tokenCredential = tokenCredential; + _endpoint = endpoint; + _apiVersion = apiVersion; + } + + /// Verifies whether a device is within a specified location area, defined as an accuracy (radius) around a point, specified by longitude and latitude. + /// The identifier of the APC Gateway resource which should handle this request. + /// Body parameter. + /// The cancellation token to use. + /// or is null. + /// + public virtual async Task> VerifyAsync(string apcGatewayId, DeviceLocationVerificationContent body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(apcGatewayId, nameof(apcGatewayId)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await VerifyAsync(apcGatewayId, content, context).ConfigureAwait(false); + return Response.FromValue(DeviceLocationVerificationResult.FromResponse(response), response); + } + + /// Verifies whether a device is within a specified location area, defined as an accuracy (radius) around a point, specified by longitude and latitude. + /// The identifier of the APC Gateway resource which should handle this request. + /// Body parameter. + /// The cancellation token to use. + /// or is null. + /// + public virtual Response Verify(string apcGatewayId, DeviceLocationVerificationContent body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(apcGatewayId, nameof(apcGatewayId)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = Verify(apcGatewayId, content, context); + return Response.FromValue(DeviceLocationVerificationResult.FromResponse(response), response); + } + + /// + /// [Protocol Method] Verifies whether a device is within a specified location area, defined as an accuracy (radius) around a point, specified by longitude and latitude. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The identifier of the APC Gateway resource which should handle this request. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task VerifyAsync(string apcGatewayId, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(apcGatewayId, nameof(apcGatewayId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("DeviceLocation.Verify"); + scope.Start(); + try + { + using HttpMessage message = CreateVerifyRequest(apcGatewayId, content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Verifies whether a device is within a specified location area, defined as an accuracy (radius) around a point, specified by longitude and latitude. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The identifier of the APC Gateway resource which should handle this request. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response Verify(string apcGatewayId, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(apcGatewayId, nameof(apcGatewayId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("DeviceLocation.Verify"); + scope.Start(); + try + { + using HttpMessage message = CreateVerifyRequest(apcGatewayId, content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + internal HttpMessage CreateVerifyRequest(string apcGatewayId, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/device-location/location:verify", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("apc-gateway-id", apcGatewayId); + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + private static RequestContext DefaultRequestContext = new RequestContext(); + internal static RequestContext FromCancellationToken(CancellationToken cancellationToken = default) + { + if (!cancellationToken.CanBeCanceled) + { + return DefaultRequestContext; + } + + return new RequestContext() { CancellationToken = cancellationToken }; + } + + private static ResponseClassifier _responseClassifier200; + private static ResponseClassifier ResponseClassifier200 => _responseClassifier200 ??= new StatusCodeClassifier(stackalloc ushort[] { 200 }); + } +} diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/DeviceLocationVerificationContent.Serialization.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/DeviceLocationVerificationContent.Serialization.cs new file mode 100644 index 000000000000..4598da3a5436 --- /dev/null +++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/DeviceLocationVerificationContent.Serialization.cs @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Communication.ProgrammableConnectivity +{ + public partial class DeviceLocationVerificationContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeviceLocationVerificationContent)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("networkIdentifier"u8); + writer.WriteObjectValue(NetworkIdentifier, options); + writer.WritePropertyName("latitude"u8); + writer.WriteNumberValue(Latitude); + writer.WritePropertyName("longitude"u8); + writer.WriteNumberValue(Longitude); + writer.WritePropertyName("accuracy"u8); + writer.WriteNumberValue(Accuracy); + writer.WritePropertyName("device"u8); + writer.WriteObjectValue(Device, options); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + DeviceLocationVerificationContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeviceLocationVerificationContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDeviceLocationVerificationContent(document.RootElement, options); + } + + internal static DeviceLocationVerificationContent DeserializeDeviceLocationVerificationContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + NetworkIdentifier networkIdentifier = default; + double latitude = default; + double longitude = default; + int accuracy = default; + LocationDevice device = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("networkIdentifier"u8)) + { + networkIdentifier = NetworkIdentifier.DeserializeNetworkIdentifier(property.Value, options); + continue; + } + if (property.NameEquals("latitude"u8)) + { + latitude = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("longitude"u8)) + { + longitude = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("accuracy"u8)) + { + accuracy = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("device"u8)) + { + device = LocationDevice.DeserializeLocationDevice(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DeviceLocationVerificationContent( + networkIdentifier, + latitude, + longitude, + accuracy, + device, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DeviceLocationVerificationContent)} does not support writing '{options.Format}' format."); + } + } + + DeviceLocationVerificationContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDeviceLocationVerificationContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DeviceLocationVerificationContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DeviceLocationVerificationContent FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDeviceLocationVerificationContent(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/DeviceLocationVerificationContent.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/DeviceLocationVerificationContent.cs new file mode 100644 index 000000000000..64761dc7ca20 --- /dev/null +++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/DeviceLocationVerificationContent.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Communication.ProgrammableConnectivity +{ + /// Request to verify Location. + public partial class DeviceLocationVerificationContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Network to query for this device, or device information to enable network routing. + /// Latitude of location to be verified. + /// Longitude of location to be verified. + /// Accuracy expected for location verification in kilometers. + /// The device to find the location for. Exactly one of Network Access Code, Phone Number, IPv4 address, or IPv6 address. + /// or is null. + public DeviceLocationVerificationContent(NetworkIdentifier networkIdentifier, double latitude, double longitude, int accuracy, LocationDevice device) + { + Argument.AssertNotNull(networkIdentifier, nameof(networkIdentifier)); + Argument.AssertNotNull(device, nameof(device)); + + NetworkIdentifier = networkIdentifier; + Latitude = latitude; + Longitude = longitude; + Accuracy = accuracy; + Device = device; + } + + /// Initializes a new instance of . + /// Network to query for this device, or device information to enable network routing. + /// Latitude of location to be verified. + /// Longitude of location to be verified. + /// Accuracy expected for location verification in kilometers. + /// The device to find the location for. Exactly one of Network Access Code, Phone Number, IPv4 address, or IPv6 address. + /// Keeps track of any properties unknown to the library. + internal DeviceLocationVerificationContent(NetworkIdentifier networkIdentifier, double latitude, double longitude, int accuracy, LocationDevice device, IDictionary serializedAdditionalRawData) + { + NetworkIdentifier = networkIdentifier; + Latitude = latitude; + Longitude = longitude; + Accuracy = accuracy; + Device = device; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DeviceLocationVerificationContent() + { + } + + /// Network to query for this device, or device information to enable network routing. + public NetworkIdentifier NetworkIdentifier { get; } + /// Latitude of location to be verified. + public double Latitude { get; } + /// Longitude of location to be verified. + public double Longitude { get; } + /// Accuracy expected for location verification in kilometers. + public int Accuracy { get; } + /// The device to find the location for. Exactly one of Network Access Code, Phone Number, IPv4 address, or IPv6 address. + public LocationDevice Device { get; } + } +} diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/DeviceLocationVerificationResult.Serialization.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/DeviceLocationVerificationResult.Serialization.cs new file mode 100644 index 000000000000..2bb4a5c29585 --- /dev/null +++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/DeviceLocationVerificationResult.Serialization.cs @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Communication.ProgrammableConnectivity +{ + public partial class DeviceLocationVerificationResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeviceLocationVerificationResult)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("verificationResult"u8); + writer.WriteBooleanValue(VerificationResult); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + DeviceLocationVerificationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeviceLocationVerificationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDeviceLocationVerificationResult(document.RootElement, options); + } + + internal static DeviceLocationVerificationResult DeserializeDeviceLocationVerificationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool verificationResult = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("verificationResult"u8)) + { + verificationResult = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DeviceLocationVerificationResult(verificationResult, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DeviceLocationVerificationResult)} does not support writing '{options.Format}' format."); + } + } + + DeviceLocationVerificationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDeviceLocationVerificationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DeviceLocationVerificationResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DeviceLocationVerificationResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDeviceLocationVerificationResult(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/DeviceLocationVerificationResult.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/DeviceLocationVerificationResult.cs new file mode 100644 index 000000000000..dff7039b7fff --- /dev/null +++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/DeviceLocationVerificationResult.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Communication.ProgrammableConnectivity +{ + /// Response verifying location. + public partial class DeviceLocationVerificationResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// True if the location is in the specified area, False otherwise. + internal DeviceLocationVerificationResult(bool verificationResult) + { + VerificationResult = verificationResult; + } + + /// Initializes a new instance of . + /// True if the location is in the specified area, False otherwise. + /// Keeps track of any properties unknown to the library. + internal DeviceLocationVerificationResult(bool verificationResult, IDictionary serializedAdditionalRawData) + { + VerificationResult = verificationResult; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DeviceLocationVerificationResult() + { + } + + /// True if the location is in the specified area, False otherwise. + public bool VerificationResult { get; } + } +} diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/DeviceNetwork.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/DeviceNetwork.cs new file mode 100644 index 000000000000..d2c1e51dee07 --- /dev/null +++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/DeviceNetwork.cs @@ -0,0 +1,199 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Communication.ProgrammableConnectivity +{ + // Data plane generated sub-client. + /// The DeviceNetwork sub-client. + public partial class DeviceNetwork + { + private static readonly string[] AuthorizationScopes = new string[] { "https://management.azure.com//.default" }; + private readonly TokenCredential _tokenCredential; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// The ClientDiagnostics is used to provide tracing support for the client library. + internal ClientDiagnostics ClientDiagnostics { get; } + + /// The HTTP pipeline for sending and receiving REST requests and responses. + public virtual HttpPipeline Pipeline => _pipeline; + + /// Initializes a new instance of DeviceNetwork for mocking. + protected DeviceNetwork() + { + } + + /// Initializes a new instance of DeviceNetwork. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The token credential to copy. + /// An Azure Programmable Connectivity Endpoint providing access to Network APIs, for example https://{region}.apcgatewayapi.azure.com. + /// The API version to use for this operation. + internal DeviceNetwork(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, TokenCredential tokenCredential, Uri endpoint, string apiVersion) + { + ClientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + _tokenCredential = tokenCredential; + _endpoint = endpoint; + _apiVersion = apiVersion; + } + + /// Retrieves the network a given device is on. Returns network in a networkCode format that can be used for other APIs. + /// The identifier of the APC Gateway resource which should handle this request. + /// Body parameter. + /// The cancellation token to use. + /// or is null. + /// + public virtual async Task> RetrieveAsync(string apcGatewayId, NetworkIdentifier body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(apcGatewayId, nameof(apcGatewayId)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await RetrieveAsync(apcGatewayId, content, context).ConfigureAwait(false); + return Response.FromValue(NetworkRetrievalResult.FromResponse(response), response); + } + + /// Retrieves the network a given device is on. Returns network in a networkCode format that can be used for other APIs. + /// The identifier of the APC Gateway resource which should handle this request. + /// Body parameter. + /// The cancellation token to use. + /// or is null. + /// + public virtual Response Retrieve(string apcGatewayId, NetworkIdentifier body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(apcGatewayId, nameof(apcGatewayId)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = Retrieve(apcGatewayId, content, context); + return Response.FromValue(NetworkRetrievalResult.FromResponse(response), response); + } + + /// + /// [Protocol Method] Retrieves the network a given device is on. Returns network in a networkCode format that can be used for other APIs. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The identifier of the APC Gateway resource which should handle this request. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task RetrieveAsync(string apcGatewayId, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(apcGatewayId, nameof(apcGatewayId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("DeviceNetwork.Retrieve"); + scope.Start(); + try + { + using HttpMessage message = CreateRetrieveRequest(apcGatewayId, content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Retrieves the network a given device is on. Returns network in a networkCode format that can be used for other APIs. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The identifier of the APC Gateway resource which should handle this request. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response Retrieve(string apcGatewayId, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(apcGatewayId, nameof(apcGatewayId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("DeviceNetwork.Retrieve"); + scope.Start(); + try + { + using HttpMessage message = CreateRetrieveRequest(apcGatewayId, content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + internal HttpMessage CreateRetrieveRequest(string apcGatewayId, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/device-network/network:retrieve", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("apc-gateway-id", apcGatewayId); + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + private static RequestContext DefaultRequestContext = new RequestContext(); + internal static RequestContext FromCancellationToken(CancellationToken cancellationToken = default) + { + if (!cancellationToken.CanBeCanceled) + { + return DefaultRequestContext; + } + + return new RequestContext() { CancellationToken = cancellationToken }; + } + + private static ResponseClassifier _responseClassifier200; + private static ResponseClassifier ResponseClassifier200 => _responseClassifier200 ??= new StatusCodeClassifier(stackalloc ushort[] { 200 }); + } +} diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Docs/DeviceLocation.xml b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Docs/DeviceLocation.xml new file mode 100644 index 000000000000..78861d2d14d8 --- /dev/null +++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Docs/DeviceLocation.xml @@ -0,0 +1,185 @@ + + + + + +This sample shows how to call VerifyAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceLocation client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceLocationClient(apiVersion: "2024-02-09-preview"); + +DeviceLocationVerificationContent body = new DeviceLocationVerificationContent(new NetworkIdentifier("", ""), 123.45, 123.45, 1234, new LocationDevice()); +Response response = await client.VerifyAsync("", body); +]]> +This sample shows how to call VerifyAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceLocation client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceLocationClient(apiVersion: "2024-02-09-preview"); + +DeviceLocationVerificationContent body = new DeviceLocationVerificationContent(new NetworkIdentifier("", ""), 123.45, 123.45, 1234, new LocationDevice +{ + NetworkAccessIdentifier = "", + PhoneNumber = "", + Ipv4Address = new Ipv4Address("", 1234), + Ipv6Address = new Ipv6Address("", 1234), +}); +Response response = await client.VerifyAsync("", body); +]]> + + + +This sample shows how to call Verify. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceLocation client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceLocationClient(apiVersion: "2024-02-09-preview"); + +DeviceLocationVerificationContent body = new DeviceLocationVerificationContent(new NetworkIdentifier("", ""), 123.45, 123.45, 1234, new LocationDevice()); +Response response = client.Verify("", body); +]]> +This sample shows how to call Verify with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceLocation client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceLocationClient(apiVersion: "2024-02-09-preview"); + +DeviceLocationVerificationContent body = new DeviceLocationVerificationContent(new NetworkIdentifier("", ""), 123.45, 123.45, 1234, new LocationDevice +{ + NetworkAccessIdentifier = "", + PhoneNumber = "", + Ipv4Address = new Ipv4Address("", 1234), + Ipv6Address = new Ipv6Address("", 1234), +}); +Response response = client.Verify("", body); +]]> + + + +This sample shows how to call VerifyAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceLocation client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceLocationClient(apiVersion: "2024-02-09-preview"); + +using RequestContent content = RequestContent.Create(new +{ + networkIdentifier = new + { + identifierType = "", + identifier = "", + }, + latitude = 123.45, + longitude = 123.45, + accuracy = 1234, + device = new object(), +}); +Response response = await client.VerifyAsync("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("verificationResult").ToString()); +]]> +This sample shows how to call VerifyAsync with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceLocation client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceLocationClient(apiVersion: "2024-02-09-preview"); + +using RequestContent content = RequestContent.Create(new +{ + networkIdentifier = new + { + identifierType = "", + identifier = "", + }, + latitude = 123.45, + longitude = 123.45, + accuracy = 1234, + device = new + { + networkAccessIdentifier = "", + phoneNumber = "", + ipv4Address = new + { + ipv4 = "", + port = 1234, + }, + ipv6Address = new + { + ipv6 = "", + port = 1234, + }, + }, +}); +Response response = await client.VerifyAsync("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("verificationResult").ToString()); +]]> + + + +This sample shows how to call Verify and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceLocation client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceLocationClient(apiVersion: "2024-02-09-preview"); + +using RequestContent content = RequestContent.Create(new +{ + networkIdentifier = new + { + identifierType = "", + identifier = "", + }, + latitude = 123.45, + longitude = 123.45, + accuracy = 1234, + device = new object(), +}); +Response response = client.Verify("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("verificationResult").ToString()); +]]> +This sample shows how to call Verify with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceLocation client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceLocationClient(apiVersion: "2024-02-09-preview"); + +using RequestContent content = RequestContent.Create(new +{ + networkIdentifier = new + { + identifierType = "", + identifier = "", + }, + latitude = 123.45, + longitude = 123.45, + accuracy = 1234, + device = new + { + networkAccessIdentifier = "", + phoneNumber = "", + ipv4Address = new + { + ipv4 = "", + port = 1234, + }, + ipv6Address = new + { + ipv6 = "", + port = 1234, + }, + }, +}); +Response response = client.Verify("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("verificationResult").ToString()); +]]> + + + \ No newline at end of file diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Docs/DeviceNetwork.xml b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Docs/DeviceNetwork.xml new file mode 100644 index 000000000000..1f977fef38cb --- /dev/null +++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Docs/DeviceNetwork.xml @@ -0,0 +1,117 @@ + + + + + +This sample shows how to call RetrieveAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceNetwork client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceNetworkClient(apiVersion: "2024-02-09-preview"); + +NetworkIdentifier body = new NetworkIdentifier("", ""); +Response response = await client.RetrieveAsync("", body); +]]> +This sample shows how to call RetrieveAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceNetwork client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceNetworkClient(apiVersion: "2024-02-09-preview"); + +NetworkIdentifier body = new NetworkIdentifier("", ""); +Response response = await client.RetrieveAsync("", body); +]]> + + + +This sample shows how to call Retrieve. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceNetwork client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceNetworkClient(apiVersion: "2024-02-09-preview"); + +NetworkIdentifier body = new NetworkIdentifier("", ""); +Response response = client.Retrieve("", body); +]]> +This sample shows how to call Retrieve with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceNetwork client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceNetworkClient(apiVersion: "2024-02-09-preview"); + +NetworkIdentifier body = new NetworkIdentifier("", ""); +Response response = client.Retrieve("", body); +]]> + + + +This sample shows how to call RetrieveAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceNetwork client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceNetworkClient(apiVersion: "2024-02-09-preview"); + +using RequestContent content = RequestContent.Create(new +{ + identifierType = "", + identifier = "", +}); +Response response = await client.RetrieveAsync("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("networkCode").ToString()); +]]> +This sample shows how to call RetrieveAsync with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceNetwork client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceNetworkClient(apiVersion: "2024-02-09-preview"); + +using RequestContent content = RequestContent.Create(new +{ + identifierType = "", + identifier = "", +}); +Response response = await client.RetrieveAsync("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("networkCode").ToString()); +]]> + + + +This sample shows how to call Retrieve and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceNetwork client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceNetworkClient(apiVersion: "2024-02-09-preview"); + +using RequestContent content = RequestContent.Create(new +{ + identifierType = "", + identifier = "", +}); +Response response = client.Retrieve("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("networkCode").ToString()); +]]> +This sample shows how to call Retrieve with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +DeviceNetwork client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceNetworkClient(apiVersion: "2024-02-09-preview"); + +using RequestContent content = RequestContent.Create(new +{ + identifierType = "", + identifier = "", +}); +Response response = client.Retrieve("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("networkCode").ToString()); +]]> + + + \ No newline at end of file diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Docs/NumberVerification.xml b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Docs/NumberVerification.xml new file mode 100644 index 000000000000..d4e2d4703591 --- /dev/null +++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Docs/NumberVerification.xml @@ -0,0 +1,249 @@ + + + + + +This sample shows how to call VerifyWithoutCodeAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); + +NumberVerificationWithoutCodeContent body = new NumberVerificationWithoutCodeContent(new NetworkIdentifier("", ""), new Uri("http://localhost:3000")); +Response response = await client.VerifyWithoutCodeAsync("", body); +]]> +This sample shows how to call VerifyWithoutCodeAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); + +NumberVerificationWithoutCodeContent body = new NumberVerificationWithoutCodeContent(new NetworkIdentifier("", ""), new Uri("http://localhost:3000")) +{ + PhoneNumber = "", + HashedPhoneNumber = "", +}; +Response response = await client.VerifyWithoutCodeAsync("", body); +]]> + + + +This sample shows how to call VerifyWithoutCode. +"); +TokenCredential credential = new DefaultAzureCredential(); +NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); + +NumberVerificationWithoutCodeContent body = new NumberVerificationWithoutCodeContent(new NetworkIdentifier("", ""), new Uri("http://localhost:3000")); +Response response = client.VerifyWithoutCode("", body); +]]> +This sample shows how to call VerifyWithoutCode with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); + +NumberVerificationWithoutCodeContent body = new NumberVerificationWithoutCodeContent(new NetworkIdentifier("", ""), new Uri("http://localhost:3000")) +{ + PhoneNumber = "", + HashedPhoneNumber = "", +}; +Response response = client.VerifyWithoutCode("", body); +]]> + + + +This sample shows how to call VerifyWithoutCodeAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); + +using RequestContent content = RequestContent.Create(new +{ + networkIdentifier = new + { + identifierType = "", + identifier = "", + }, + redirectUri = "http://localhost:3000", +}); +Response response = await client.VerifyWithoutCodeAsync("", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call VerifyWithoutCodeAsync with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); + +using RequestContent content = RequestContent.Create(new +{ + networkIdentifier = new + { + identifierType = "", + identifier = "", + }, + phoneNumber = "", + hashedPhoneNumber = "", + redirectUri = "http://localhost:3000", +}); +Response response = await client.VerifyWithoutCodeAsync("", content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call VerifyWithoutCode. +"); +TokenCredential credential = new DefaultAzureCredential(); +NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); + +using RequestContent content = RequestContent.Create(new +{ + networkIdentifier = new + { + identifierType = "", + identifier = "", + }, + redirectUri = "http://localhost:3000", +}); +Response response = client.VerifyWithoutCode("", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call VerifyWithoutCode with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); + +using RequestContent content = RequestContent.Create(new +{ + networkIdentifier = new + { + identifierType = "", + identifier = "", + }, + phoneNumber = "", + hashedPhoneNumber = "", + redirectUri = "http://localhost:3000", +}); +Response response = client.VerifyWithoutCode("", content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call VerifyWithCodeAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); + +NumberVerificationWithCodeContent body = new NumberVerificationWithCodeContent(""); +Response response = await client.VerifyWithCodeAsync("", body); +]]> +This sample shows how to call VerifyWithCodeAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); + +NumberVerificationWithCodeContent body = new NumberVerificationWithCodeContent(""); +Response response = await client.VerifyWithCodeAsync("", body); +]]> + + + +This sample shows how to call VerifyWithCode. +"); +TokenCredential credential = new DefaultAzureCredential(); +NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); + +NumberVerificationWithCodeContent body = new NumberVerificationWithCodeContent(""); +Response response = client.VerifyWithCode("", body); +]]> +This sample shows how to call VerifyWithCode with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); + +NumberVerificationWithCodeContent body = new NumberVerificationWithCodeContent(""); +Response response = client.VerifyWithCode("", body); +]]> + + + +This sample shows how to call VerifyWithCodeAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); + +using RequestContent content = RequestContent.Create(new +{ + apcCode = "", +}); +Response response = await client.VerifyWithCodeAsync("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("verificationResult").ToString()); +]]> +This sample shows how to call VerifyWithCodeAsync with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); + +using RequestContent content = RequestContent.Create(new +{ + apcCode = "", +}); +Response response = await client.VerifyWithCodeAsync("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("verificationResult").ToString()); +]]> + + + +This sample shows how to call VerifyWithCode and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); + +using RequestContent content = RequestContent.Create(new +{ + apcCode = "", +}); +Response response = client.VerifyWithCode("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("verificationResult").ToString()); +]]> +This sample shows how to call VerifyWithCode with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); + +using RequestContent content = RequestContent.Create(new +{ + apcCode = "", +}); +Response response = client.VerifyWithCode("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("verificationResult").ToString()); +]]> + + + \ No newline at end of file diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Docs/SimSwap.xml b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Docs/SimSwap.xml new file mode 100644 index 000000000000..83bbc5ad2cc1 --- /dev/null +++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Docs/SimSwap.xml @@ -0,0 +1,273 @@ + + + + + +This sample shows how to call RetrieveAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); + +SimSwapRetrievalContent body = new SimSwapRetrievalContent(new NetworkIdentifier("", "")); +Response response = await client.RetrieveAsync("", body); +]]> +This sample shows how to call RetrieveAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); + +SimSwapRetrievalContent body = new SimSwapRetrievalContent(new NetworkIdentifier("", "")) +{ + PhoneNumber = "", +}; +Response response = await client.RetrieveAsync("", body); +]]> + + + +This sample shows how to call Retrieve. +"); +TokenCredential credential = new DefaultAzureCredential(); +SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); + +SimSwapRetrievalContent body = new SimSwapRetrievalContent(new NetworkIdentifier("", "")); +Response response = client.Retrieve("", body); +]]> +This sample shows how to call Retrieve with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); + +SimSwapRetrievalContent body = new SimSwapRetrievalContent(new NetworkIdentifier("", "")) +{ + PhoneNumber = "", +}; +Response response = client.Retrieve("", body); +]]> + + + +This sample shows how to call RetrieveAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); + +using RequestContent content = RequestContent.Create(new +{ + networkIdentifier = new + { + identifierType = "", + identifier = "", + }, +}); +Response response = await client.RetrieveAsync("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call RetrieveAsync with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); + +using RequestContent content = RequestContent.Create(new +{ + phoneNumber = "", + networkIdentifier = new + { + identifierType = "", + identifier = "", + }, +}); +Response response = await client.RetrieveAsync("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("date").ToString()); +]]> + + + +This sample shows how to call Retrieve and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); + +using RequestContent content = RequestContent.Create(new +{ + networkIdentifier = new + { + identifierType = "", + identifier = "", + }, +}); +Response response = client.Retrieve("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call Retrieve with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); + +using RequestContent content = RequestContent.Create(new +{ + phoneNumber = "", + networkIdentifier = new + { + identifierType = "", + identifier = "", + }, +}); +Response response = client.Retrieve("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("date").ToString()); +]]> + + + +This sample shows how to call VerifyAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); + +SimSwapVerificationContent body = new SimSwapVerificationContent(new NetworkIdentifier("", "")); +Response response = await client.VerifyAsync("", body); +]]> +This sample shows how to call VerifyAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); + +SimSwapVerificationContent body = new SimSwapVerificationContent(new NetworkIdentifier("", "")) +{ + PhoneNumber = "", + MaxAgeHours = 1234, +}; +Response response = await client.VerifyAsync("", body); +]]> + + + +This sample shows how to call Verify. +"); +TokenCredential credential = new DefaultAzureCredential(); +SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); + +SimSwapVerificationContent body = new SimSwapVerificationContent(new NetworkIdentifier("", "")); +Response response = client.Verify("", body); +]]> +This sample shows how to call Verify with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); + +SimSwapVerificationContent body = new SimSwapVerificationContent(new NetworkIdentifier("", "")) +{ + PhoneNumber = "", + MaxAgeHours = 1234, +}; +Response response = client.Verify("", body); +]]> + + + +This sample shows how to call VerifyAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); + +using RequestContent content = RequestContent.Create(new +{ + networkIdentifier = new + { + identifierType = "", + identifier = "", + }, +}); +Response response = await client.VerifyAsync("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("verificationResult").ToString()); +]]> +This sample shows how to call VerifyAsync with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); + +using RequestContent content = RequestContent.Create(new +{ + phoneNumber = "", + maxAgeHours = 1234, + networkIdentifier = new + { + identifierType = "", + identifier = "", + }, +}); +Response response = await client.VerifyAsync("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("verificationResult").ToString()); +]]> + + + +This sample shows how to call Verify and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); + +using RequestContent content = RequestContent.Create(new +{ + networkIdentifier = new + { + identifierType = "", + identifier = "", + }, +}); +Response response = client.Verify("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("verificationResult").ToString()); +]]> +This sample shows how to call Verify with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); + +using RequestContent content = RequestContent.Create(new +{ + phoneNumber = "", + maxAgeHours = 1234, + networkIdentifier = new + { + identifierType = "", + identifier = "", + }, +}); +Response response = client.Verify("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("verificationResult").ToString()); +]]> + + + \ No newline at end of file diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Internal/Argument.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Internal/Argument.cs new file mode 100644 index 000000000000..8a8fa316d538 --- /dev/null +++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Internal/Argument.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.Communication.ProgrammableConnectivity +{ + internal static class Argument + { + public static void AssertNotNull(T value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + } + + public static void AssertNotNull(T? value, string name) + where T : struct + { + if (!value.HasValue) + { + throw new ArgumentNullException(name); + } + } + + public static void AssertNotNullOrEmpty(IEnumerable value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (value is ICollection collectionOfT && collectionOfT.Count == 0) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + if (value is ICollection collection && collection.Count == 0) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + using IEnumerator e = value.GetEnumerator(); + if (!e.MoveNext()) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + } + + public static void AssertNotNullOrEmpty(string value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (value.Length == 0) + { + throw new ArgumentException("Value cannot be an empty string.", name); + } + } + + public static void AssertNotNullOrWhiteSpace(string value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (string.IsNullOrWhiteSpace(value)) + { + throw new ArgumentException("Value cannot be empty or contain only white-space characters.", name); + } + } + + public static void AssertNotDefault(ref T value, string name) + where T : struct, IEquatable + { + if (value.Equals(default)) + { + throw new ArgumentException("Value cannot be empty.", name); + } + } + + public static void AssertInRange(T value, T minimum, T maximum, string name) + where T : notnull, IComparable + { + if (minimum.CompareTo(value) > 0) + { + throw new ArgumentOutOfRangeException(name, "Value is less than the minimum allowed."); + } + if (maximum.CompareTo(value) < 0) + { + throw new ArgumentOutOfRangeException(name, "Value is greater than the maximum allowed."); + } + } + + public static void AssertEnumDefined(Type enumType, object value, string name) + { + if (!Enum.IsDefined(enumType, value)) + { + throw new ArgumentException($"Value not defined for {enumType.FullName}.", name); + } + } + + public static T CheckNotNull(T value, string name) + where T : class + { + AssertNotNull(value, name); + return value; + } + + public static string CheckNotNullOrEmpty(string value, string name) + { + AssertNotNullOrEmpty(value, name); + return value; + } + + public static void AssertNull(T value, string name, string message = null) + { + if (value != null) + { + throw new ArgumentException(message ?? "Value must be null.", name); + } + } + } +} diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Internal/ChangeTrackingDictionary.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Internal/ChangeTrackingDictionary.cs new file mode 100644 index 000000000000..4e2b60ef6c3c --- /dev/null +++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Internal/ChangeTrackingDictionary.cs @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.Communication.ProgrammableConnectivity +{ + internal class ChangeTrackingDictionary : IDictionary, IReadOnlyDictionary where TKey : notnull + { + private IDictionary _innerDictionary; + + public ChangeTrackingDictionary() + { + } + + public ChangeTrackingDictionary(IDictionary dictionary) + { + if (dictionary == null) + { + return; + } + _innerDictionary = new Dictionary(dictionary); + } + + public ChangeTrackingDictionary(IReadOnlyDictionary dictionary) + { + if (dictionary == null) + { + return; + } + _innerDictionary = new Dictionary(); + foreach (var pair in dictionary) + { + _innerDictionary.Add(pair); + } + } + + public bool IsUndefined => _innerDictionary == null; + + public int Count => IsUndefined ? 0 : EnsureDictionary().Count; + + public bool IsReadOnly => IsUndefined ? false : EnsureDictionary().IsReadOnly; + + public ICollection Keys => IsUndefined ? Array.Empty() : EnsureDictionary().Keys; + + public ICollection Values => IsUndefined ? Array.Empty() : EnsureDictionary().Values; + + public TValue this[TKey key] + { + get + { + if (IsUndefined) + { + throw new KeyNotFoundException(nameof(key)); + } + return EnsureDictionary()[key]; + } + set + { + EnsureDictionary()[key] = value; + } + } + + IEnumerable IReadOnlyDictionary.Keys => Keys; + + IEnumerable IReadOnlyDictionary.Values => Values; + + public IEnumerator> GetEnumerator() + { + if (IsUndefined) + { + IEnumerator> enumerateEmpty() + { + yield break; + } + return enumerateEmpty(); + } + return EnsureDictionary().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + public void Add(KeyValuePair item) + { + EnsureDictionary().Add(item); + } + + public void Clear() + { + EnsureDictionary().Clear(); + } + + public bool Contains(KeyValuePair item) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Contains(item); + } + + public void CopyTo(KeyValuePair[] array, int index) + { + if (IsUndefined) + { + return; + } + EnsureDictionary().CopyTo(array, index); + } + + public bool Remove(KeyValuePair item) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Remove(item); + } + + public void Add(TKey key, TValue value) + { + EnsureDictionary().Add(key, value); + } + + public bool ContainsKey(TKey key) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().ContainsKey(key); + } + + public bool Remove(TKey key) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Remove(key); + } + + public bool TryGetValue(TKey key, out TValue value) + { + if (IsUndefined) + { + value = default; + return false; + } + return EnsureDictionary().TryGetValue(key, out value); + } + + public IDictionary EnsureDictionary() + { + return _innerDictionary ??= new Dictionary(); + } + } +} diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Internal/ChangeTrackingList.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Internal/ChangeTrackingList.cs new file mode 100644 index 000000000000..3c705fe0d23e --- /dev/null +++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Internal/ChangeTrackingList.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.Communication.ProgrammableConnectivity +{ + internal class ChangeTrackingList : IList, IReadOnlyList + { + private IList _innerList; + + public ChangeTrackingList() + { + } + + public ChangeTrackingList(IList innerList) + { + if (innerList != null) + { + _innerList = innerList; + } + } + + public ChangeTrackingList(IReadOnlyList innerList) + { + if (innerList != null) + { + _innerList = innerList.ToList(); + } + } + + public bool IsUndefined => _innerList == null; + + public int Count => IsUndefined ? 0 : EnsureList().Count; + + public bool IsReadOnly => IsUndefined ? false : EnsureList().IsReadOnly; + + public T this[int index] + { + get + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + return EnsureList()[index]; + } + set + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + EnsureList()[index] = value; + } + } + + public void Reset() + { + _innerList = null; + } + + public IEnumerator GetEnumerator() + { + if (IsUndefined) + { + IEnumerator enumerateEmpty() + { + yield break; + } + return enumerateEmpty(); + } + return EnsureList().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + public void Add(T item) + { + EnsureList().Add(item); + } + + public void Clear() + { + EnsureList().Clear(); + } + + public bool Contains(T item) + { + if (IsUndefined) + { + return false; + } + return EnsureList().Contains(item); + } + + public void CopyTo(T[] array, int arrayIndex) + { + if (IsUndefined) + { + return; + } + EnsureList().CopyTo(array, arrayIndex); + } + + public bool Remove(T item) + { + if (IsUndefined) + { + return false; + } + return EnsureList().Remove(item); + } + + public int IndexOf(T item) + { + if (IsUndefined) + { + return -1; + } + return EnsureList().IndexOf(item); + } + + public void Insert(int index, T item) + { + EnsureList().Insert(index, item); + } + + public void RemoveAt(int index) + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + EnsureList().RemoveAt(index); + } + + public IList EnsureList() + { + return _innerList ??= new List(); + } + } +} diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Internal/ModelSerializationExtensions.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Internal/ModelSerializationExtensions.cs new file mode 100644 index 000000000000..52068c35e990 --- /dev/null +++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Internal/ModelSerializationExtensions.cs @@ -0,0 +1,398 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Diagnostics; +using System.Globalization; +using System.Text.Json; +using System.Xml; +using Azure.Core; + +namespace Azure.Communication.ProgrammableConnectivity +{ + internal static class ModelSerializationExtensions + { + internal static readonly ModelReaderWriterOptions WireOptions = new ModelReaderWriterOptions("W"); + + public static object GetObject(this JsonElement element) + { + switch (element.ValueKind) + { + case JsonValueKind.String: + return element.GetString(); + case JsonValueKind.Number: + if (element.TryGetInt32(out int intValue)) + { + return intValue; + } + if (element.TryGetInt64(out long longValue)) + { + return longValue; + } + return element.GetDouble(); + case JsonValueKind.True: + return true; + case JsonValueKind.False: + return false; + case JsonValueKind.Undefined: + case JsonValueKind.Null: + return null; + case JsonValueKind.Object: + var dictionary = new Dictionary(); + foreach (var jsonProperty in element.EnumerateObject()) + { + dictionary.Add(jsonProperty.Name, jsonProperty.Value.GetObject()); + } + return dictionary; + case JsonValueKind.Array: + var list = new List(); + foreach (var item in element.EnumerateArray()) + { + list.Add(item.GetObject()); + } + return list.ToArray(); + default: + throw new NotSupportedException($"Not supported value kind {element.ValueKind}"); + } + } + + public static byte[] GetBytesFromBase64(this JsonElement element, string format) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + + return format switch + { + "U" => TypeFormatters.FromBase64UrlString(element.GetRequiredString()), + "D" => element.GetBytesFromBase64(), + _ => throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)) + }; + } + + public static DateTimeOffset GetDateTimeOffset(this JsonElement element, string format) => format switch + { + "U" when element.ValueKind == JsonValueKind.Number => DateTimeOffset.FromUnixTimeSeconds(element.GetInt64()), + _ => TypeFormatters.ParseDateTimeOffset(element.GetString(), format) + }; + + public static TimeSpan GetTimeSpan(this JsonElement element, string format) => TypeFormatters.ParseTimeSpan(element.GetString(), format); + + public static char GetChar(this JsonElement element) + { + if (element.ValueKind == JsonValueKind.String) + { + var text = element.GetString(); + if (text == null || text.Length != 1) + { + throw new NotSupportedException($"Cannot convert \"{text}\" to a char"); + } + return text[0]; + } + else + { + throw new NotSupportedException($"Cannot convert {element.ValueKind} to a char"); + } + } + + [Conditional("DEBUG")] + public static void ThrowNonNullablePropertyIsNull(this JsonProperty property) + { + throw new JsonException($"A property '{property.Name}' defined as non-nullable but received as null from the service. This exception only happens in DEBUG builds of the library and would be ignored in the release build"); + } + + public static string GetRequiredString(this JsonElement element) + { + var value = element.GetString(); + if (value == null) + { + throw new InvalidOperationException($"The requested operation requires an element of type 'String', but the target element has type '{element.ValueKind}'."); + } + return value; + } + + public static void WriteStringValue(this Utf8JsonWriter writer, DateTimeOffset value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, DateTime value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, TimeSpan value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, char value) + { + writer.WriteStringValue(value.ToString(CultureInfo.InvariantCulture)); + } + + public static void WriteBase64StringValue(this Utf8JsonWriter writer, byte[] value, string format) + { + if (value == null) + { + writer.WriteNullValue(); + return; + } + switch (format) + { + case "U": + writer.WriteStringValue(TypeFormatters.ToBase64UrlString(value)); + break; + case "D": + writer.WriteBase64StringValue(value); + break; + default: + throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)); + } + } + + public static void WriteNumberValue(this Utf8JsonWriter writer, DateTimeOffset value, string format) + { + if (format != "U") + { + throw new ArgumentOutOfRangeException(nameof(format), "Only 'U' format is supported when writing a DateTimeOffset as a Number."); + } + writer.WriteNumberValue(value.ToUnixTimeSeconds()); + } + + public static void WriteObjectValue(this Utf8JsonWriter writer, T value, ModelReaderWriterOptions options = null) + { + switch (value) + { + case null: + writer.WriteNullValue(); + break; + case IJsonModel jsonModel: + jsonModel.Write(writer, options ?? WireOptions); + break; + case IUtf8JsonSerializable serializable: + serializable.Write(writer); + break; + case byte[] bytes: + writer.WriteBase64StringValue(bytes); + break; + case BinaryData bytes0: + writer.WriteBase64StringValue(bytes0); + break; + case JsonElement json: + json.WriteTo(writer); + break; + case int i: + writer.WriteNumberValue(i); + break; + case decimal d: + writer.WriteNumberValue(d); + break; + case double d0: + if (double.IsNaN(d0)) + { + writer.WriteStringValue("NaN"); + } + else + { + writer.WriteNumberValue(d0); + } + break; + case float f: + writer.WriteNumberValue(f); + break; + case long l: + writer.WriteNumberValue(l); + break; + case string s: + writer.WriteStringValue(s); + break; + case bool b: + writer.WriteBooleanValue(b); + break; + case Guid g: + writer.WriteStringValue(g); + break; + case DateTimeOffset dateTimeOffset: + writer.WriteStringValue(dateTimeOffset, "O"); + break; + case DateTime dateTime: + writer.WriteStringValue(dateTime, "O"); + break; + case IEnumerable> enumerable: + writer.WriteStartObject(); + foreach (var pair in enumerable) + { + writer.WritePropertyName(pair.Key); + writer.WriteObjectValue(pair.Value, options); + } + writer.WriteEndObject(); + break; + case IEnumerable objectEnumerable: + writer.WriteStartArray(); + foreach (var item in objectEnumerable) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + break; + case TimeSpan timeSpan: + writer.WriteStringValue(timeSpan, "P"); + break; + default: + throw new NotSupportedException($"Not supported type {value.GetType()}"); + } + } + + public static void WriteObjectValue(this Utf8JsonWriter writer, object value, ModelReaderWriterOptions options = null) + { + writer.WriteObjectValue(value, options); + } + + internal static class TypeFormatters + { + private const string RoundtripZFormat = "yyyy-MM-ddTHH:mm:ss.fffffffZ"; + public const string DefaultNumberFormat = "G"; + + public static string ToString(bool value) => value ? "true" : "false"; + + public static string ToString(DateTime value, string format) => value.Kind switch + { + DateTimeKind.Utc => ToString((DateTimeOffset)value, format), + _ => throw new NotSupportedException($"DateTime {value} has a Kind of {value.Kind}. Azure SDK requires it to be UTC. You can call DateTime.SpecifyKind to change Kind property value to DateTimeKind.Utc.") + }; + + public static string ToString(DateTimeOffset value, string format) => format switch + { + "D" => value.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture), + "U" => value.ToUnixTimeSeconds().ToString(CultureInfo.InvariantCulture), + "O" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), + "o" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), + "R" => value.ToString("r", CultureInfo.InvariantCulture), + _ => value.ToString(format, CultureInfo.InvariantCulture) + }; + + public static string ToString(TimeSpan value, string format) => format switch + { + "P" => XmlConvert.ToString(value), + _ => value.ToString(format, CultureInfo.InvariantCulture) + }; + + public static string ToString(byte[] value, string format) => format switch + { + "U" => ToBase64UrlString(value), + "D" => Convert.ToBase64String(value), + _ => throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)) + }; + + public static string ToBase64UrlString(byte[] value) + { + int numWholeOrPartialInputBlocks = checked(value.Length + 2) / 3; + int size = checked(numWholeOrPartialInputBlocks * 4); + char[] output = new char[size]; + + int numBase64Chars = Convert.ToBase64CharArray(value, 0, value.Length, output, 0); + + int i = 0; + for (; i < numBase64Chars; i++) + { + char ch = output[i]; + if (ch == '+') + { + output[i] = '-'; + } + else + { + if (ch == '/') + { + output[i] = '_'; + } + else + { + if (ch == '=') + { + break; + } + } + } + } + + return new string(output, 0, i); + } + + public static byte[] FromBase64UrlString(string value) + { + int paddingCharsToAdd = (value.Length % 4) switch + { + 0 => 0, + 2 => 2, + 3 => 1, + _ => throw new InvalidOperationException("Malformed input") + }; + char[] output = new char[(value.Length + paddingCharsToAdd)]; + int i = 0; + for (; i < value.Length; i++) + { + char ch = value[i]; + if (ch == '-') + { + output[i] = '+'; + } + else + { + if (ch == '_') + { + output[i] = '/'; + } + else + { + output[i] = ch; + } + } + } + + for (; i < output.Length; i++) + { + output[i] = '='; + } + + return Convert.FromBase64CharArray(output, 0, output.Length); + } + + public static DateTimeOffset ParseDateTimeOffset(string value, string format) => format switch + { + "U" => DateTimeOffset.FromUnixTimeSeconds(long.Parse(value, CultureInfo.InvariantCulture)), + _ => DateTimeOffset.Parse(value, CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal) + }; + + public static TimeSpan ParseTimeSpan(string value, string format) => format switch + { + "P" => XmlConvert.ToTimeSpan(value), + _ => TimeSpan.ParseExact(value, format, CultureInfo.InvariantCulture) + }; + + public static string ConvertToString(object value, string format = null) => value switch + { + null => "null", + string s => s, + bool b => ToString(b), + int or float or double or long or decimal => ((IFormattable)value).ToString(DefaultNumberFormat, CultureInfo.InvariantCulture), + byte[] b0 when format != null => ToString(b0, format), + IEnumerable s0 => string.Join(",", s0), + DateTimeOffset dateTime when format != null => ToString(dateTime, format), + TimeSpan timeSpan when format != null => ToString(timeSpan, format), + TimeSpan timeSpan0 => XmlConvert.ToString(timeSpan0), + Guid guid => guid.ToString(), + BinaryData binaryData => ConvertToString(binaryData.ToArray(), format), + _ => value.ToString() + }; + } + } +} diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Internal/Optional.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Internal/Optional.cs new file mode 100644 index 000000000000..86bcb20f00fa --- /dev/null +++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Internal/Optional.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.Communication.ProgrammableConnectivity +{ + internal static class Optional + { + public static bool IsCollectionDefined(IEnumerable collection) + { + return !(collection is ChangeTrackingList changeTrackingList && changeTrackingList.IsUndefined); + } + + public static bool IsCollectionDefined(IDictionary collection) + { + return !(collection is ChangeTrackingDictionary changeTrackingDictionary && changeTrackingDictionary.IsUndefined); + } + + public static bool IsCollectionDefined(IReadOnlyDictionary collection) + { + return !(collection is ChangeTrackingDictionary changeTrackingDictionary && changeTrackingDictionary.IsUndefined); + } + + public static bool IsDefined(T? value) + where T : struct + { + return value.HasValue; + } + + public static bool IsDefined(object value) + { + return value != null; + } + + public static bool IsDefined(JsonElement value) + { + return value.ValueKind != JsonValueKind.Undefined; + } + + public static bool IsDefined(string value) + { + return value != null; + } + } +} diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Internal/Utf8JsonRequestContent.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Internal/Utf8JsonRequestContent.cs new file mode 100644 index 000000000000..35b5d8cb1785 --- /dev/null +++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Internal/Utf8JsonRequestContent.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.IO; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.Communication.ProgrammableConnectivity +{ + internal class Utf8JsonRequestContent : RequestContent + { + private readonly MemoryStream _stream; + private readonly RequestContent _content; + + public Utf8JsonRequestContent() + { + _stream = new MemoryStream(); + _content = Create(_stream); + JsonWriter = new Utf8JsonWriter(_stream); + } + + public Utf8JsonWriter JsonWriter { get; } + + public override async Task WriteToAsync(Stream stream, CancellationToken cancellationToken = default) + { + await JsonWriter.FlushAsync().ConfigureAwait(false); + await _content.WriteToAsync(stream, cancellationToken).ConfigureAwait(false); + } + + public override void WriteTo(Stream stream, CancellationToken cancellationToken = default) + { + JsonWriter.Flush(); + _content.WriteTo(stream, cancellationToken); + } + + public override bool TryComputeLength(out long length) + { + length = JsonWriter.BytesCommitted + JsonWriter.BytesPending; + return true; + } + + public override void Dispose() + { + JsonWriter.Dispose(); + _content.Dispose(); + _stream.Dispose(); + } + } +} diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Ipv4Address.Serialization.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Ipv4Address.Serialization.cs new file mode 100644 index 000000000000..468473975439 --- /dev/null +++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Ipv4Address.Serialization.cs @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Communication.ProgrammableConnectivity +{ + public partial class Ipv4Address : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(Ipv4Address)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("ipv4"u8); + writer.WriteStringValue(Ipv4); + writer.WritePropertyName("port"u8); + writer.WriteNumberValue(Port); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + Ipv4Address IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(Ipv4Address)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeIpv4Address(document.RootElement, options); + } + + internal static Ipv4Address DeserializeIpv4Address(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string ipv4 = default; + int port = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("ipv4"u8)) + { + ipv4 = property.Value.GetString(); + continue; + } + if (property.NameEquals("port"u8)) + { + port = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new Ipv4Address(ipv4, port, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(Ipv4Address)} does not support writing '{options.Format}' format."); + } + } + + Ipv4Address IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeIpv4Address(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(Ipv4Address)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static Ipv4Address FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeIpv4Address(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Ipv4Address.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Ipv4Address.cs new file mode 100644 index 000000000000..8ec205ddbc0e --- /dev/null +++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Ipv4Address.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Communication.ProgrammableConnectivity +{ + /// IPv4 device indicator. + public partial class Ipv4Address + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// An IPv4 address. This may be specified as an exact address, or as a subnet in CIDR notation. + /// User equipment port. + /// is null. + public Ipv4Address(string ipv4, int port) + { + Argument.AssertNotNull(ipv4, nameof(ipv4)); + + Ipv4 = ipv4; + Port = port; + } + + /// Initializes a new instance of . + /// An IPv4 address. This may be specified as an exact address, or as a subnet in CIDR notation. + /// User equipment port. + /// Keeps track of any properties unknown to the library. + internal Ipv4Address(string ipv4, int port, IDictionary serializedAdditionalRawData) + { + Ipv4 = ipv4; + Port = port; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal Ipv4Address() + { + } + + /// An IPv4 address. This may be specified as an exact address, or as a subnet in CIDR notation. + public string Ipv4 { get; } + /// User equipment port. + public int Port { get; } + } +} diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Ipv6Address.Serialization.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Ipv6Address.Serialization.cs new file mode 100644 index 000000000000..79f98e0efb27 --- /dev/null +++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Ipv6Address.Serialization.cs @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Communication.ProgrammableConnectivity +{ + public partial class Ipv6Address : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(Ipv6Address)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("ipv6"u8); + writer.WriteStringValue(Ipv6); + writer.WritePropertyName("port"u8); + writer.WriteNumberValue(Port); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + Ipv6Address IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(Ipv6Address)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeIpv6Address(document.RootElement, options); + } + + internal static Ipv6Address DeserializeIpv6Address(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string ipv6 = default; + int port = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("ipv6"u8)) + { + ipv6 = property.Value.GetString(); + continue; + } + if (property.NameEquals("port"u8)) + { + port = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new Ipv6Address(ipv6, port, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(Ipv6Address)} does not support writing '{options.Format}' format."); + } + } + + Ipv6Address IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeIpv6Address(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(Ipv6Address)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static Ipv6Address FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeIpv6Address(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Ipv6Address.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Ipv6Address.cs new file mode 100644 index 000000000000..633f96886041 --- /dev/null +++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Ipv6Address.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Communication.ProgrammableConnectivity +{ + /// IPv6 device indicator. + public partial class Ipv6Address + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// An IPv6 address. This may be specified as an exact address, or as a subnet in CIDR notation. + /// User equipment port. + /// is null. + public Ipv6Address(string ipv6, int port) + { + Argument.AssertNotNull(ipv6, nameof(ipv6)); + + Ipv6 = ipv6; + Port = port; + } + + /// Initializes a new instance of . + /// An IPv6 address. This may be specified as an exact address, or as a subnet in CIDR notation. + /// User equipment port. + /// Keeps track of any properties unknown to the library. + internal Ipv6Address(string ipv6, int port, IDictionary serializedAdditionalRawData) + { + Ipv6 = ipv6; + Port = port; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal Ipv6Address() + { + } + + /// An IPv6 address. This may be specified as an exact address, or as a subnet in CIDR notation. + public string Ipv6 { get; } + /// User equipment port. + public int Port { get; } + } +} diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/LocationDevice.Serialization.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/LocationDevice.Serialization.cs new file mode 100644 index 000000000000..74b728af681f --- /dev/null +++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/LocationDevice.Serialization.cs @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Communication.ProgrammableConnectivity +{ + public partial class LocationDevice : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LocationDevice)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(NetworkAccessIdentifier)) + { + writer.WritePropertyName("networkAccessIdentifier"u8); + writer.WriteStringValue(NetworkAccessIdentifier); + } + if (Optional.IsDefined(PhoneNumber)) + { + writer.WritePropertyName("phoneNumber"u8); + writer.WriteStringValue(PhoneNumber); + } + if (Optional.IsDefined(Ipv4Address)) + { + writer.WritePropertyName("ipv4Address"u8); + writer.WriteObjectValue(Ipv4Address, options); + } + if (Optional.IsDefined(Ipv6Address)) + { + writer.WritePropertyName("ipv6Address"u8); + writer.WriteObjectValue(Ipv6Address, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + LocationDevice IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LocationDevice)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeLocationDevice(document.RootElement, options); + } + + internal static LocationDevice DeserializeLocationDevice(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string networkAccessIdentifier = default; + string phoneNumber = default; + Ipv4Address ipv4Address = default; + Ipv6Address ipv6Address = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("networkAccessIdentifier"u8)) + { + networkAccessIdentifier = property.Value.GetString(); + continue; + } + if (property.NameEquals("phoneNumber"u8)) + { + phoneNumber = property.Value.GetString(); + continue; + } + if (property.NameEquals("ipv4Address"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ipv4Address = Ipv4Address.DeserializeIpv4Address(property.Value, options); + continue; + } + if (property.NameEquals("ipv6Address"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ipv6Address = Ipv6Address.DeserializeIpv6Address(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new LocationDevice(networkAccessIdentifier, phoneNumber, ipv4Address, ipv6Address, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(LocationDevice)} does not support writing '{options.Format}' format."); + } + } + + LocationDevice IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeLocationDevice(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(LocationDevice)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static LocationDevice FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeLocationDevice(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/LocationDevice.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/LocationDevice.cs new file mode 100644 index 000000000000..6748649f211b --- /dev/null +++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/LocationDevice.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Communication.ProgrammableConnectivity +{ + /// Device information needed by operator to provide location information. Include exactly one of these properties to identify your device. + public partial class LocationDevice + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public LocationDevice() + { + } + + /// Initializes a new instance of . + /// External identifier or network access identifier of the device. + /// Phone number in E.164 format (starting with country code), and optionally prefixed with '+'. + /// The Ipv4 address. + /// The Ipv6 address. + /// Keeps track of any properties unknown to the library. + internal LocationDevice(string networkAccessIdentifier, string phoneNumber, Ipv4Address ipv4Address, Ipv6Address ipv6Address, IDictionary serializedAdditionalRawData) + { + NetworkAccessIdentifier = networkAccessIdentifier; + PhoneNumber = phoneNumber; + Ipv4Address = ipv4Address; + Ipv6Address = ipv6Address; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// External identifier or network access identifier of the device. + public string NetworkAccessIdentifier { get; set; } + /// Phone number in E.164 format (starting with country code), and optionally prefixed with '+'. + public string PhoneNumber { get; set; } + /// The Ipv4 address. + public Ipv4Address Ipv4Address { get; set; } + /// The Ipv6 address. + public Ipv6Address Ipv6Address { get; set; } + } +} diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/NetworkIdentifier.Serialization.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/NetworkIdentifier.Serialization.cs new file mode 100644 index 000000000000..6107cdb8441f --- /dev/null +++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/NetworkIdentifier.Serialization.cs @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Communication.ProgrammableConnectivity +{ + public partial class NetworkIdentifier : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetworkIdentifier)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("identifierType"u8); + writer.WriteStringValue(IdentifierType); + writer.WritePropertyName("identifier"u8); + writer.WriteStringValue(Identifier); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + NetworkIdentifier IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetworkIdentifier)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNetworkIdentifier(document.RootElement, options); + } + + internal static NetworkIdentifier DeserializeNetworkIdentifier(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string identifierType = default; + string identifier = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("identifierType"u8)) + { + identifierType = property.Value.GetString(); + continue; + } + if (property.NameEquals("identifier"u8)) + { + identifier = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NetworkIdentifier(identifierType, identifier, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(NetworkIdentifier)} does not support writing '{options.Format}' format."); + } + } + + NetworkIdentifier IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeNetworkIdentifier(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NetworkIdentifier)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static NetworkIdentifier FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeNetworkIdentifier(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/NetworkIdentifier.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/NetworkIdentifier.cs new file mode 100644 index 000000000000..daa37ff741a6 --- /dev/null +++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/NetworkIdentifier.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Communication.ProgrammableConnectivity +{ + /// Identifier for the network to be queried. + public partial class NetworkIdentifier + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The type of identifier for the network. one of: 'IPv4', 'IPv6', 'NetworkCode'. + /// + /// The network identifier, based on the identifierType: an IPv4 address, and IPv6 address, or a Network Code. + /// A Network Code may be obtained from APC documentation or from the APC /Network:retrieve endpoint. + /// + /// or is null. + public NetworkIdentifier(string identifierType, string identifier) + { + Argument.AssertNotNull(identifierType, nameof(identifierType)); + Argument.AssertNotNull(identifier, nameof(identifier)); + + IdentifierType = identifierType; + Identifier = identifier; + } + + /// Initializes a new instance of . + /// The type of identifier for the network. one of: 'IPv4', 'IPv6', 'NetworkCode'. + /// + /// The network identifier, based on the identifierType: an IPv4 address, and IPv6 address, or a Network Code. + /// A Network Code may be obtained from APC documentation or from the APC /Network:retrieve endpoint. + /// + /// Keeps track of any properties unknown to the library. + internal NetworkIdentifier(string identifierType, string identifier, IDictionary serializedAdditionalRawData) + { + IdentifierType = identifierType; + Identifier = identifier; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal NetworkIdentifier() + { + } + + /// The type of identifier for the network. one of: 'IPv4', 'IPv6', 'NetworkCode'. + public string IdentifierType { get; } + /// + /// The network identifier, based on the identifierType: an IPv4 address, and IPv6 address, or a Network Code. + /// A Network Code may be obtained from APC documentation or from the APC /Network:retrieve endpoint. + /// + public string Identifier { get; } + } +} diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/NetworkRetrievalResult.Serialization.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/NetworkRetrievalResult.Serialization.cs new file mode 100644 index 000000000000..864d764a58e6 --- /dev/null +++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/NetworkRetrievalResult.Serialization.cs @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Communication.ProgrammableConnectivity +{ + public partial class NetworkRetrievalResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetworkRetrievalResult)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("networkCode"u8); + writer.WriteStringValue(NetworkCode); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + NetworkRetrievalResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetworkRetrievalResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNetworkRetrievalResult(document.RootElement, options); + } + + internal static NetworkRetrievalResult DeserializeNetworkRetrievalResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string networkCode = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("networkCode"u8)) + { + networkCode = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NetworkRetrievalResult(networkCode, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(NetworkRetrievalResult)} does not support writing '{options.Format}' format."); + } + } + + NetworkRetrievalResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeNetworkRetrievalResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NetworkRetrievalResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static NetworkRetrievalResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeNetworkRetrievalResult(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/NetworkRetrievalResult.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/NetworkRetrievalResult.cs new file mode 100644 index 000000000000..5c6e83c30533 --- /dev/null +++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/NetworkRetrievalResult.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Communication.ProgrammableConnectivity +{ + /// The network that the device is on. + public partial class NetworkRetrievalResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The identifier for the network. This can be used as the networkIdentifier for the service APIs. + /// is null. + internal NetworkRetrievalResult(string networkCode) + { + Argument.AssertNotNull(networkCode, nameof(networkCode)); + + NetworkCode = networkCode; + } + + /// Initializes a new instance of . + /// The identifier for the network. This can be used as the networkIdentifier for the service APIs. + /// Keeps track of any properties unknown to the library. + internal NetworkRetrievalResult(string networkCode, IDictionary serializedAdditionalRawData) + { + NetworkCode = networkCode; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal NetworkRetrievalResult() + { + } + + /// The identifier for the network. This can be used as the networkIdentifier for the service APIs. + public string NetworkCode { get; } + } +} diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/NumberVerification.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/NumberVerification.cs new file mode 100644 index 000000000000..19e87e8c27f6 --- /dev/null +++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/NumberVerification.cs @@ -0,0 +1,347 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Communication.ProgrammableConnectivity +{ + // Data plane generated sub-client. + /// + /// Number operations include Frontend Authentication. + /// + /// Users first make a call to the endpoint /Number:verify, which returns a redirect to the device's + /// Network. This is followed by the device to authenticate directly with the Network. The Network + /// responds with a token and a redirect. This token can be exchanged with APC for a code. + /// + /// Users make a second call to the endpoint /Number:verify including the code. The code is used + /// to verify the device number. The second response is a 200 containing the result of the query. + /// + /// For more information on the steps required to use Number Verificaiton, see the APC documentation. + /// + public partial class NumberVerification + { + private static readonly string[] AuthorizationScopes = new string[] { "https://management.azure.com//.default" }; + private readonly TokenCredential _tokenCredential; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// The ClientDiagnostics is used to provide tracing support for the client library. + internal ClientDiagnostics ClientDiagnostics { get; } + + /// The HTTP pipeline for sending and receiving REST requests and responses. + public virtual HttpPipeline Pipeline => _pipeline; + + /// Initializes a new instance of NumberVerification for mocking. + protected NumberVerification() + { + } + + /// Initializes a new instance of NumberVerification. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The token credential to copy. + /// An Azure Programmable Connectivity Endpoint providing access to Network APIs, for example https://{region}.apcgatewayapi.azure.com. + /// The API version to use for this operation. + internal NumberVerification(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, TokenCredential tokenCredential, Uri endpoint, string apiVersion) + { + ClientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + _tokenCredential = tokenCredential; + _endpoint = endpoint; + _apiVersion = apiVersion; + } + + /// Verifies the phone number (MSISDN) associated with a device. As part of the frontend authorization flow, the device is redirected to the operator network to authenticate directly. + /// The identifier of the APC Gateway resource which should handle this request. + /// Body parameter. + /// The cancellation token to use. + /// or is null. + /// + public virtual async Task VerifyWithoutCodeAsync(string apcGatewayId, NumberVerificationWithoutCodeContent body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(apcGatewayId, nameof(apcGatewayId)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await VerifyWithoutCodeAsync(apcGatewayId, content, context).ConfigureAwait(false); + return response; + } + + /// Verifies the phone number (MSISDN) associated with a device. As part of the frontend authorization flow, the device is redirected to the operator network to authenticate directly. + /// The identifier of the APC Gateway resource which should handle this request. + /// Body parameter. + /// The cancellation token to use. + /// or is null. + /// + public virtual Response VerifyWithoutCode(string apcGatewayId, NumberVerificationWithoutCodeContent body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(apcGatewayId, nameof(apcGatewayId)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = VerifyWithoutCode(apcGatewayId, content, context); + return response; + } + + /// + /// [Protocol Method] Verifies the phone number (MSISDN) associated with a device. As part of the frontend authorization flow, the device is redirected to the operator network to authenticate directly. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The identifier of the APC Gateway resource which should handle this request. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task VerifyWithoutCodeAsync(string apcGatewayId, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(apcGatewayId, nameof(apcGatewayId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("NumberVerification.VerifyWithoutCode"); + scope.Start(); + try + { + using HttpMessage message = CreateVerifyWithoutCodeRequest(apcGatewayId, content, context); + RedirectPolicy.SetAllowAutoRedirect(message, true); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Verifies the phone number (MSISDN) associated with a device. As part of the frontend authorization flow, the device is redirected to the operator network to authenticate directly. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The identifier of the APC Gateway resource which should handle this request. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response VerifyWithoutCode(string apcGatewayId, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(apcGatewayId, nameof(apcGatewayId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("NumberVerification.VerifyWithoutCode"); + scope.Start(); + try + { + using HttpMessage message = CreateVerifyWithoutCodeRequest(apcGatewayId, content, context); + RedirectPolicy.SetAllowAutoRedirect(message, true); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Verifies the phone number (MSISDN) associated with a device. + /// The identifier of the APC Gateway resource which should handle this request. + /// Body parameter. + /// The cancellation token to use. + /// or is null. + /// + public virtual async Task> VerifyWithCodeAsync(string apcGatewayId, NumberVerificationWithCodeContent body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(apcGatewayId, nameof(apcGatewayId)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await VerifyWithCodeAsync(apcGatewayId, content, context).ConfigureAwait(false); + return Response.FromValue(NumberVerificationResult.FromResponse(response), response); + } + + /// Verifies the phone number (MSISDN) associated with a device. + /// The identifier of the APC Gateway resource which should handle this request. + /// Body parameter. + /// The cancellation token to use. + /// or is null. + /// + public virtual Response VerifyWithCode(string apcGatewayId, NumberVerificationWithCodeContent body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(apcGatewayId, nameof(apcGatewayId)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = VerifyWithCode(apcGatewayId, content, context); + return Response.FromValue(NumberVerificationResult.FromResponse(response), response); + } + + /// + /// [Protocol Method] Verifies the phone number (MSISDN) associated with a device. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The identifier of the APC Gateway resource which should handle this request. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task VerifyWithCodeAsync(string apcGatewayId, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(apcGatewayId, nameof(apcGatewayId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("NumberVerification.VerifyWithCode"); + scope.Start(); + try + { + using HttpMessage message = CreateVerifyWithCodeRequest(apcGatewayId, content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Verifies the phone number (MSISDN) associated with a device. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The identifier of the APC Gateway resource which should handle this request. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response VerifyWithCode(string apcGatewayId, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(apcGatewayId, nameof(apcGatewayId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("NumberVerification.VerifyWithCode"); + scope.Start(); + try + { + using HttpMessage message = CreateVerifyWithCodeRequest(apcGatewayId, content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + internal HttpMessage CreateVerifyWithoutCodeRequest(string apcGatewayId, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier302); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/number-verification/number:verify", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("apc-gateway-id", apcGatewayId); + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateVerifyWithCodeRequest(string apcGatewayId, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/number-verification/number:verify", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("apc-gateway-id", apcGatewayId); + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + private static RequestContext DefaultRequestContext = new RequestContext(); + internal static RequestContext FromCancellationToken(CancellationToken cancellationToken = default) + { + if (!cancellationToken.CanBeCanceled) + { + return DefaultRequestContext; + } + + return new RequestContext() { CancellationToken = cancellationToken }; + } + + private static ResponseClassifier _responseClassifier302; + private static ResponseClassifier ResponseClassifier302 => _responseClassifier302 ??= new StatusCodeClassifier(stackalloc ushort[] { 302 }); + private static ResponseClassifier _responseClassifier200; + private static ResponseClassifier ResponseClassifier200 => _responseClassifier200 ??= new StatusCodeClassifier(stackalloc ushort[] { 200 }); + } +} diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/NumberVerificationResult.Serialization.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/NumberVerificationResult.Serialization.cs new file mode 100644 index 000000000000..bc908ec65cc4 --- /dev/null +++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/NumberVerificationResult.Serialization.cs @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Communication.ProgrammableConnectivity +{ + public partial class NumberVerificationResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NumberVerificationResult)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("verificationResult"u8); + writer.WriteBooleanValue(VerificationResult); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + NumberVerificationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NumberVerificationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNumberVerificationResult(document.RootElement, options); + } + + internal static NumberVerificationResult DeserializeNumberVerificationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool verificationResult = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("verificationResult"u8)) + { + verificationResult = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NumberVerificationResult(verificationResult, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(NumberVerificationResult)} does not support writing '{options.Format}' format."); + } + } + + NumberVerificationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeNumberVerificationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NumberVerificationResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static NumberVerificationResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeNumberVerificationResult(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/NumberVerificationResult.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/NumberVerificationResult.cs new file mode 100644 index 000000000000..eb64683bbfcf --- /dev/null +++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/NumberVerificationResult.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Communication.ProgrammableConnectivity +{ + /// Response verifying number of device. + public partial class NumberVerificationResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// True if number if the phone number matches the device, False otherwise. + internal NumberVerificationResult(bool verificationResult) + { + VerificationResult = verificationResult; + } + + /// Initializes a new instance of . + /// True if number if the phone number matches the device, False otherwise. + /// Keeps track of any properties unknown to the library. + internal NumberVerificationResult(bool verificationResult, IDictionary serializedAdditionalRawData) + { + VerificationResult = verificationResult; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal NumberVerificationResult() + { + } + + /// True if number if the phone number matches the device, False otherwise. + public bool VerificationResult { get; } + } +} diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/NumberVerificationWithCodeContent.Serialization.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/NumberVerificationWithCodeContent.Serialization.cs new file mode 100644 index 000000000000..5a701c48ad5b --- /dev/null +++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/NumberVerificationWithCodeContent.Serialization.cs @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Communication.ProgrammableConnectivity +{ + public partial class NumberVerificationWithCodeContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NumberVerificationWithCodeContent)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("apcCode"u8); + writer.WriteStringValue(ApcCode); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + NumberVerificationWithCodeContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NumberVerificationWithCodeContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNumberVerificationWithCodeContent(document.RootElement, options); + } + + internal static NumberVerificationWithCodeContent DeserializeNumberVerificationWithCodeContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string apcCode = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("apcCode"u8)) + { + apcCode = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NumberVerificationWithCodeContent(apcCode, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(NumberVerificationWithCodeContent)} does not support writing '{options.Format}' format."); + } + } + + NumberVerificationWithCodeContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeNumberVerificationWithCodeContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NumberVerificationWithCodeContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static NumberVerificationWithCodeContent FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeNumberVerificationWithCodeContent(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/NumberVerificationWithCodeContent.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/NumberVerificationWithCodeContent.cs new file mode 100644 index 000000000000..14409d3fc5c0 --- /dev/null +++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/NumberVerificationWithCodeContent.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Communication.ProgrammableConnectivity +{ + /// Request to verify number of device - second call. + public partial class NumberVerificationWithCodeContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The code provided by APC in exchange for the operator code. + /// is null. + public NumberVerificationWithCodeContent(string apcCode) + { + Argument.AssertNotNull(apcCode, nameof(apcCode)); + + ApcCode = apcCode; + } + + /// Initializes a new instance of . + /// The code provided by APC in exchange for the operator code. + /// Keeps track of any properties unknown to the library. + internal NumberVerificationWithCodeContent(string apcCode, IDictionary serializedAdditionalRawData) + { + ApcCode = apcCode; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal NumberVerificationWithCodeContent() + { + } + + /// The code provided by APC in exchange for the operator code. + public string ApcCode { get; } + } +} diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/NumberVerificationWithoutCodeContent.Serialization.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/NumberVerificationWithoutCodeContent.Serialization.cs new file mode 100644 index 000000000000..e973d287b424 --- /dev/null +++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/NumberVerificationWithoutCodeContent.Serialization.cs @@ -0,0 +1,165 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Communication.ProgrammableConnectivity +{ + public partial class NumberVerificationWithoutCodeContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NumberVerificationWithoutCodeContent)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("networkIdentifier"u8); + writer.WriteObjectValue(NetworkIdentifier, options); + if (Optional.IsDefined(PhoneNumber)) + { + writer.WritePropertyName("phoneNumber"u8); + writer.WriteStringValue(PhoneNumber); + } + if (Optional.IsDefined(HashedPhoneNumber)) + { + writer.WritePropertyName("hashedPhoneNumber"u8); + writer.WriteStringValue(HashedPhoneNumber); + } + writer.WritePropertyName("redirectUri"u8); + writer.WriteStringValue(RedirectUri.AbsoluteUri); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + NumberVerificationWithoutCodeContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NumberVerificationWithoutCodeContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNumberVerificationWithoutCodeContent(document.RootElement, options); + } + + internal static NumberVerificationWithoutCodeContent DeserializeNumberVerificationWithoutCodeContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + NetworkIdentifier networkIdentifier = default; + string phoneNumber = default; + string hashedPhoneNumber = default; + Uri redirectUri = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("networkIdentifier"u8)) + { + networkIdentifier = NetworkIdentifier.DeserializeNetworkIdentifier(property.Value, options); + continue; + } + if (property.NameEquals("phoneNumber"u8)) + { + phoneNumber = property.Value.GetString(); + continue; + } + if (property.NameEquals("hashedPhoneNumber"u8)) + { + hashedPhoneNumber = property.Value.GetString(); + continue; + } + if (property.NameEquals("redirectUri"u8)) + { + redirectUri = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NumberVerificationWithoutCodeContent(networkIdentifier, phoneNumber, hashedPhoneNumber, redirectUri, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(NumberVerificationWithoutCodeContent)} does not support writing '{options.Format}' format."); + } + } + + NumberVerificationWithoutCodeContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeNumberVerificationWithoutCodeContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NumberVerificationWithoutCodeContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static NumberVerificationWithoutCodeContent FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeNumberVerificationWithoutCodeContent(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/NumberVerificationWithoutCodeContent.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/NumberVerificationWithoutCodeContent.cs new file mode 100644 index 000000000000..28dfa4af54fb --- /dev/null +++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/NumberVerificationWithoutCodeContent.cs @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Communication.ProgrammableConnectivity +{ + /// Request to verify number of device - first call. + public partial class NumberVerificationWithoutCodeContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Identifier for the network to query for this device. + /// Redirect URI to backend application. + /// or is null. + public NumberVerificationWithoutCodeContent(NetworkIdentifier networkIdentifier, Uri redirectUri) + { + Argument.AssertNotNull(networkIdentifier, nameof(networkIdentifier)); + Argument.AssertNotNull(redirectUri, nameof(redirectUri)); + + NetworkIdentifier = networkIdentifier; + RedirectUri = redirectUri; + } + + /// Initializes a new instance of . + /// Identifier for the network to query for this device. + /// Phone number in E.164 format (starting with country code), and optionally prefixed with '+'. + /// Hashed phone number. SHA-256 (in hexadecimal representation) of the mobile phone number in **E.164 format (starting with country code)**. Optionally prefixed with '+'. + /// Redirect URI to backend application. + /// Keeps track of any properties unknown to the library. + internal NumberVerificationWithoutCodeContent(NetworkIdentifier networkIdentifier, string phoneNumber, string hashedPhoneNumber, Uri redirectUri, IDictionary serializedAdditionalRawData) + { + NetworkIdentifier = networkIdentifier; + PhoneNumber = phoneNumber; + HashedPhoneNumber = hashedPhoneNumber; + RedirectUri = redirectUri; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal NumberVerificationWithoutCodeContent() + { + } + + /// Identifier for the network to query for this device. + public NetworkIdentifier NetworkIdentifier { get; } + /// Phone number in E.164 format (starting with country code), and optionally prefixed with '+'. + public string PhoneNumber { get; set; } + /// Hashed phone number. SHA-256 (in hexadecimal representation) of the mobile phone number in **E.164 format (starting with country code)**. Optionally prefixed with '+'. + public string HashedPhoneNumber { get; set; } + /// Redirect URI to backend application. + public Uri RedirectUri { get; } + } +} diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/ProgrammableConnectivityClient.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/ProgrammableConnectivityClient.cs new file mode 100644 index 000000000000..78178e8158db --- /dev/null +++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/ProgrammableConnectivityClient.cs @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Communication.ProgrammableConnectivity +{ + // Data plane generated client. + /// Azure Programmable Connectivity (APC) provides a unified interface to the Network APIs of multiple Telecom Operators. Note that Operators may deprecate a Network API with less advance notice than the Azure standard, in which case APC will also deprecate that Network API. + public partial class ProgrammableConnectivityClient + { + private static readonly string[] AuthorizationScopes = new string[] { "https://management.azure.com//.default" }; + private readonly TokenCredential _tokenCredential; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + + /// The ClientDiagnostics is used to provide tracing support for the client library. + internal ClientDiagnostics ClientDiagnostics { get; } + + /// The HTTP pipeline for sending and receiving REST requests and responses. + public virtual HttpPipeline Pipeline => _pipeline; + + /// Initializes a new instance of ProgrammableConnectivityClient for mocking. + protected ProgrammableConnectivityClient() + { + } + + /// Initializes a new instance of ProgrammableConnectivityClient. + /// An Azure Programmable Connectivity Endpoint providing access to Network APIs, for example https://{region}.apcgatewayapi.azure.com. + /// A credential used to authenticate to an Azure Service. + /// or is null. + public ProgrammableConnectivityClient(Uri endpoint, TokenCredential credential) : this(endpoint, credential, new ProgrammableConnectivityClientOptions()) + { + } + + /// Initializes a new instance of ProgrammableConnectivityClient. + /// An Azure Programmable Connectivity Endpoint providing access to Network APIs, for example https://{region}.apcgatewayapi.azure.com. + /// A credential used to authenticate to an Azure Service. + /// The options for configuring the client. + /// or is null. + public ProgrammableConnectivityClient(Uri endpoint, TokenCredential credential, ProgrammableConnectivityClientOptions options) + { + Argument.AssertNotNull(endpoint, nameof(endpoint)); + Argument.AssertNotNull(credential, nameof(credential)); + options ??= new ProgrammableConnectivityClientOptions(); + + ClientDiagnostics = new ClientDiagnostics(options, true); + _tokenCredential = credential; + _pipeline = HttpPipelineBuilder.Build(options, Array.Empty(), new HttpPipelinePolicy[] { new BearerTokenAuthenticationPolicy(_tokenCredential, AuthorizationScopes) }, new ResponseClassifier()); + _endpoint = endpoint; + } + + /// Initializes a new instance of DeviceLocation. + /// The API version to use for this operation. + /// is null. + public virtual DeviceLocation GetDeviceLocationClient(string apiVersion = "2024-02-09-preview") + { + Argument.AssertNotNull(apiVersion, nameof(apiVersion)); + + return new DeviceLocation(ClientDiagnostics, _pipeline, _tokenCredential, _endpoint, apiVersion); + } + + /// Initializes a new instance of DeviceNetwork. + /// The API version to use for this operation. + /// is null. + public virtual DeviceNetwork GetDeviceNetworkClient(string apiVersion = "2024-02-09-preview") + { + Argument.AssertNotNull(apiVersion, nameof(apiVersion)); + + return new DeviceNetwork(ClientDiagnostics, _pipeline, _tokenCredential, _endpoint, apiVersion); + } + + /// Initializes a new instance of NumberVerification. + /// The API version to use for this operation. + /// is null. + public virtual NumberVerification GetNumberVerificationClient(string apiVersion = "2024-02-09-preview") + { + Argument.AssertNotNull(apiVersion, nameof(apiVersion)); + + return new NumberVerification(ClientDiagnostics, _pipeline, _tokenCredential, _endpoint, apiVersion); + } + + /// Initializes a new instance of SimSwap. + /// The API version to use for this operation. + /// is null. + public virtual SimSwap GetSimSwapClient(string apiVersion = "2024-02-09-preview") + { + Argument.AssertNotNull(apiVersion, nameof(apiVersion)); + + return new SimSwap(ClientDiagnostics, _pipeline, _tokenCredential, _endpoint, apiVersion); + } + } +} diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/ProgrammableConnectivityClientOptions.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/ProgrammableConnectivityClientOptions.cs new file mode 100644 index 000000000000..f502d00b4e97 --- /dev/null +++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/ProgrammableConnectivityClientOptions.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.Communication.ProgrammableConnectivity +{ + /// Client options for ProgrammableConnectivityClient. + public partial class ProgrammableConnectivityClientOptions : ClientOptions + { + private const ServiceVersion LatestVersion = ServiceVersion.V2024_02_09_Preview; + + /// The version of the service to use. + public enum ServiceVersion + { + /// Service version "2024-02-09-preview". + V2024_02_09_Preview = 1, + } + + internal string Version { get; } + + /// Initializes new instance of ProgrammableConnectivityClientOptions. + public ProgrammableConnectivityClientOptions(ServiceVersion version = LatestVersion) + { + Version = version switch + { + ServiceVersion.V2024_02_09_Preview => "2024-02-09-preview", + _ => throw new NotSupportedException() + }; + } + } +} diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/SimSwap.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/SimSwap.cs new file mode 100644 index 000000000000..c8696bdccb13 --- /dev/null +++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/SimSwap.cs @@ -0,0 +1,332 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Communication.ProgrammableConnectivity +{ + // Data plane generated sub-client. + /// SIM Swap API provides the customer the ability to obtain information on any recent SIM pairing change related to the User's mobile account. + public partial class SimSwap + { + private static readonly string[] AuthorizationScopes = new string[] { "https://management.azure.com//.default" }; + private readonly TokenCredential _tokenCredential; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// The ClientDiagnostics is used to provide tracing support for the client library. + internal ClientDiagnostics ClientDiagnostics { get; } + + /// The HTTP pipeline for sending and receiving REST requests and responses. + public virtual HttpPipeline Pipeline => _pipeline; + + /// Initializes a new instance of SimSwap for mocking. + protected SimSwap() + { + } + + /// Initializes a new instance of SimSwap. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The token credential to copy. + /// An Azure Programmable Connectivity Endpoint providing access to Network APIs, for example https://{region}.apcgatewayapi.azure.com. + /// The API version to use for this operation. + internal SimSwap(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, TokenCredential tokenCredential, Uri endpoint, string apiVersion) + { + ClientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + _tokenCredential = tokenCredential; + _endpoint = endpoint; + _apiVersion = apiVersion; + } + + /// Provides timestamp of latest SIM swap. + /// The identifier of the APC Gateway resource which should handle this request. + /// Body parameter. + /// The cancellation token to use. + /// or is null. + /// + public virtual async Task> RetrieveAsync(string apcGatewayId, SimSwapRetrievalContent body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(apcGatewayId, nameof(apcGatewayId)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await RetrieveAsync(apcGatewayId, content, context).ConfigureAwait(false); + return Response.FromValue(SimSwapRetrievalResult.FromResponse(response), response); + } + + /// Provides timestamp of latest SIM swap. + /// The identifier of the APC Gateway resource which should handle this request. + /// Body parameter. + /// The cancellation token to use. + /// or is null. + /// + public virtual Response Retrieve(string apcGatewayId, SimSwapRetrievalContent body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(apcGatewayId, nameof(apcGatewayId)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = Retrieve(apcGatewayId, content, context); + return Response.FromValue(SimSwapRetrievalResult.FromResponse(response), response); + } + + /// + /// [Protocol Method] Provides timestamp of latest SIM swap + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The identifier of the APC Gateway resource which should handle this request. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task RetrieveAsync(string apcGatewayId, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(apcGatewayId, nameof(apcGatewayId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("SimSwap.Retrieve"); + scope.Start(); + try + { + using HttpMessage message = CreateRetrieveRequest(apcGatewayId, content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Provides timestamp of latest SIM swap + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The identifier of the APC Gateway resource which should handle this request. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response Retrieve(string apcGatewayId, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(apcGatewayId, nameof(apcGatewayId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("SimSwap.Retrieve"); + scope.Start(); + try + { + using HttpMessage message = CreateRetrieveRequest(apcGatewayId, content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Verifies if a SIM swap has been performed during a past period (defined in the request with 'maxAgeHours' attribute). Returns 'True' if a SIM swap has occured. + /// The identifier of the APC Gateway resource which should handle this request. + /// Body parameter. + /// The cancellation token to use. + /// or is null. + /// + public virtual async Task> VerifyAsync(string apcGatewayId, SimSwapVerificationContent body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(apcGatewayId, nameof(apcGatewayId)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await VerifyAsync(apcGatewayId, content, context).ConfigureAwait(false); + return Response.FromValue(SimSwapVerificationResult.FromResponse(response), response); + } + + /// Verifies if a SIM swap has been performed during a past period (defined in the request with 'maxAgeHours' attribute). Returns 'True' if a SIM swap has occured. + /// The identifier of the APC Gateway resource which should handle this request. + /// Body parameter. + /// The cancellation token to use. + /// or is null. + /// + public virtual Response Verify(string apcGatewayId, SimSwapVerificationContent body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(apcGatewayId, nameof(apcGatewayId)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = Verify(apcGatewayId, content, context); + return Response.FromValue(SimSwapVerificationResult.FromResponse(response), response); + } + + /// + /// [Protocol Method] Verifies if a SIM swap has been performed during a past period (defined in the request with 'maxAgeHours' attribute). Returns 'True' if a SIM swap has occured. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The identifier of the APC Gateway resource which should handle this request. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task VerifyAsync(string apcGatewayId, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(apcGatewayId, nameof(apcGatewayId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("SimSwap.Verify"); + scope.Start(); + try + { + using HttpMessage message = CreateVerifyRequest(apcGatewayId, content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Verifies if a SIM swap has been performed during a past period (defined in the request with 'maxAgeHours' attribute). Returns 'True' if a SIM swap has occured. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The identifier of the APC Gateway resource which should handle this request. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response Verify(string apcGatewayId, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(apcGatewayId, nameof(apcGatewayId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("SimSwap.Verify"); + scope.Start(); + try + { + using HttpMessage message = CreateVerifyRequest(apcGatewayId, content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + internal HttpMessage CreateRetrieveRequest(string apcGatewayId, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/sim-swap/sim-swap:retrieve", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("apc-gateway-id", apcGatewayId); + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateVerifyRequest(string apcGatewayId, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/sim-swap/sim-swap:verify", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("apc-gateway-id", apcGatewayId); + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + private static RequestContext DefaultRequestContext = new RequestContext(); + internal static RequestContext FromCancellationToken(CancellationToken cancellationToken = default) + { + if (!cancellationToken.CanBeCanceled) + { + return DefaultRequestContext; + } + + return new RequestContext() { CancellationToken = cancellationToken }; + } + + private static ResponseClassifier _responseClassifier200; + private static ResponseClassifier ResponseClassifier200 => _responseClassifier200 ??= new StatusCodeClassifier(stackalloc ushort[] { 200 }); + } +} diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/SimSwapRetrievalContent.Serialization.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/SimSwapRetrievalContent.Serialization.cs new file mode 100644 index 000000000000..ea698cbf4c3f --- /dev/null +++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/SimSwapRetrievalContent.Serialization.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Communication.ProgrammableConnectivity +{ + public partial class SimSwapRetrievalContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SimSwapRetrievalContent)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(PhoneNumber)) + { + writer.WritePropertyName("phoneNumber"u8); + writer.WriteStringValue(PhoneNumber); + } + writer.WritePropertyName("networkIdentifier"u8); + writer.WriteObjectValue(NetworkIdentifier, options); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + SimSwapRetrievalContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SimSwapRetrievalContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSimSwapRetrievalContent(document.RootElement, options); + } + + internal static SimSwapRetrievalContent DeserializeSimSwapRetrievalContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string phoneNumber = default; + NetworkIdentifier networkIdentifier = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("phoneNumber"u8)) + { + phoneNumber = property.Value.GetString(); + continue; + } + if (property.NameEquals("networkIdentifier"u8)) + { + networkIdentifier = NetworkIdentifier.DeserializeNetworkIdentifier(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SimSwapRetrievalContent(phoneNumber, networkIdentifier, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SimSwapRetrievalContent)} does not support writing '{options.Format}' format."); + } + } + + SimSwapRetrievalContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSimSwapRetrievalContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SimSwapRetrievalContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static SimSwapRetrievalContent FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeSimSwapRetrievalContent(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/SimSwapRetrievalContent.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/SimSwapRetrievalContent.cs new file mode 100644 index 000000000000..7a2b28d912fa --- /dev/null +++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/SimSwapRetrievalContent.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Communication.ProgrammableConnectivity +{ + /// Request to retrieve SimSwap date. + public partial class SimSwapRetrievalContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Network to query for this device. + /// is null. + public SimSwapRetrievalContent(NetworkIdentifier networkIdentifier) + { + Argument.AssertNotNull(networkIdentifier, nameof(networkIdentifier)); + + NetworkIdentifier = networkIdentifier; + } + + /// Initializes a new instance of . + /// Phone number in E.164 format (starting with country code), and optionally prefixed with '+'. + /// Network to query for this device. + /// Keeps track of any properties unknown to the library. + internal SimSwapRetrievalContent(string phoneNumber, NetworkIdentifier networkIdentifier, IDictionary serializedAdditionalRawData) + { + PhoneNumber = phoneNumber; + NetworkIdentifier = networkIdentifier; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SimSwapRetrievalContent() + { + } + + /// Phone number in E.164 format (starting with country code), and optionally prefixed with '+'. + public string PhoneNumber { get; set; } + /// Network to query for this device. + public NetworkIdentifier NetworkIdentifier { get; } + } +} diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/SimSwapRetrievalResult.Serialization.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/SimSwapRetrievalResult.Serialization.cs new file mode 100644 index 000000000000..c016e98edecb --- /dev/null +++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/SimSwapRetrievalResult.Serialization.cs @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Communication.ProgrammableConnectivity +{ + public partial class SimSwapRetrievalResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SimSwapRetrievalResult)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Date)) + { + writer.WritePropertyName("date"u8); + writer.WriteStringValue(Date.Value, "O"); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + SimSwapRetrievalResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SimSwapRetrievalResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSimSwapRetrievalResult(document.RootElement, options); + } + + internal static SimSwapRetrievalResult DeserializeSimSwapRetrievalResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset? date = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("date"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + date = property.Value.GetDateTimeOffset("O"); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SimSwapRetrievalResult(date, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SimSwapRetrievalResult)} does not support writing '{options.Format}' format."); + } + } + + SimSwapRetrievalResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSimSwapRetrievalResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SimSwapRetrievalResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static SimSwapRetrievalResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeSimSwapRetrievalResult(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/SimSwapRetrievalResult.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/SimSwapRetrievalResult.cs new file mode 100644 index 000000000000..696048ae6a51 --- /dev/null +++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/SimSwapRetrievalResult.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Communication.ProgrammableConnectivity +{ + /// Response with SimSwap date. + public partial class SimSwapRetrievalResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal SimSwapRetrievalResult() + { + } + + /// Initializes a new instance of . + /// Datetime of most recent swap for SIM. + /// Keeps track of any properties unknown to the library. + internal SimSwapRetrievalResult(DateTimeOffset? date, IDictionary serializedAdditionalRawData) + { + Date = date; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Datetime of most recent swap for SIM. + public DateTimeOffset? Date { get; } + } +} diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/SimSwapVerificationContent.Serialization.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/SimSwapVerificationContent.Serialization.cs new file mode 100644 index 000000000000..78a8b2f7a839 --- /dev/null +++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/SimSwapVerificationContent.Serialization.cs @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Communication.ProgrammableConnectivity +{ + public partial class SimSwapVerificationContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SimSwapVerificationContent)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(PhoneNumber)) + { + writer.WritePropertyName("phoneNumber"u8); + writer.WriteStringValue(PhoneNumber); + } + if (Optional.IsDefined(MaxAgeHours)) + { + writer.WritePropertyName("maxAgeHours"u8); + writer.WriteNumberValue(MaxAgeHours.Value); + } + writer.WritePropertyName("networkIdentifier"u8); + writer.WriteObjectValue(NetworkIdentifier, options); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + SimSwapVerificationContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SimSwapVerificationContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSimSwapVerificationContent(document.RootElement, options); + } + + internal static SimSwapVerificationContent DeserializeSimSwapVerificationContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string phoneNumber = default; + int? maxAgeHours = default; + NetworkIdentifier networkIdentifier = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("phoneNumber"u8)) + { + phoneNumber = property.Value.GetString(); + continue; + } + if (property.NameEquals("maxAgeHours"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maxAgeHours = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("networkIdentifier"u8)) + { + networkIdentifier = NetworkIdentifier.DeserializeNetworkIdentifier(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SimSwapVerificationContent(phoneNumber, maxAgeHours, networkIdentifier, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SimSwapVerificationContent)} does not support writing '{options.Format}' format."); + } + } + + SimSwapVerificationContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSimSwapVerificationContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SimSwapVerificationContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static SimSwapVerificationContent FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeSimSwapVerificationContent(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/SimSwapVerificationContent.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/SimSwapVerificationContent.cs new file mode 100644 index 000000000000..d3bb25dee1c4 --- /dev/null +++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/SimSwapVerificationContent.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Communication.ProgrammableConnectivity +{ + /// Request to verify SimSwap in period. + public partial class SimSwapVerificationContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Identifier for the network to query for this device. + /// is null. + public SimSwapVerificationContent(NetworkIdentifier networkIdentifier) + { + Argument.AssertNotNull(networkIdentifier, nameof(networkIdentifier)); + + NetworkIdentifier = networkIdentifier; + } + + /// Initializes a new instance of . + /// Phone number in E.164 format (starting with country code), and optionally prefixed with '+'. + /// Maximum lookback for SimSwap verification. + /// Identifier for the network to query for this device. + /// Keeps track of any properties unknown to the library. + internal SimSwapVerificationContent(string phoneNumber, int? maxAgeHours, NetworkIdentifier networkIdentifier, IDictionary serializedAdditionalRawData) + { + PhoneNumber = phoneNumber; + MaxAgeHours = maxAgeHours; + NetworkIdentifier = networkIdentifier; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SimSwapVerificationContent() + { + } + + /// Phone number in E.164 format (starting with country code), and optionally prefixed with '+'. + public string PhoneNumber { get; set; } + /// Maximum lookback for SimSwap verification. + public int? MaxAgeHours { get; set; } + /// Identifier for the network to query for this device. + public NetworkIdentifier NetworkIdentifier { get; } + } +} diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/SimSwapVerificationResult.Serialization.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/SimSwapVerificationResult.Serialization.cs new file mode 100644 index 000000000000..2d5d224bc4c5 --- /dev/null +++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/SimSwapVerificationResult.Serialization.cs @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Communication.ProgrammableConnectivity +{ + public partial class SimSwapVerificationResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SimSwapVerificationResult)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("verificationResult"u8); + writer.WriteBooleanValue(VerificationResult); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + SimSwapVerificationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SimSwapVerificationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSimSwapVerificationResult(document.RootElement, options); + } + + internal static SimSwapVerificationResult DeserializeSimSwapVerificationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool verificationResult = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("verificationResult"u8)) + { + verificationResult = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SimSwapVerificationResult(verificationResult, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SimSwapVerificationResult)} does not support writing '{options.Format}' format."); + } + } + + SimSwapVerificationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSimSwapVerificationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SimSwapVerificationResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static SimSwapVerificationResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeSimSwapVerificationResult(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/SimSwapVerificationResult.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/SimSwapVerificationResult.cs new file mode 100644 index 000000000000..b10fbb9d29f4 --- /dev/null +++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/SimSwapVerificationResult.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Communication.ProgrammableConnectivity +{ + /// Response verifying SimSwap in period. + public partial class SimSwapVerificationResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// True if the SIM has swapped in the specified period, False otherwise. + internal SimSwapVerificationResult(bool verificationResult) + { + VerificationResult = verificationResult; + } + + /// Initializes a new instance of . + /// True if the SIM has swapped in the specified period, False otherwise. + /// Keeps track of any properties unknown to the library. + internal SimSwapVerificationResult(bool verificationResult, IDictionary serializedAdditionalRawData) + { + VerificationResult = verificationResult; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SimSwapVerificationResult() + { + } + + /// True if the SIM has swapped in the specified period, False otherwise. + public bool VerificationResult { get; } + } +} diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Properties/AssemblyInfo.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..98d4b07ed794 --- /dev/null +++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Properties/AssemblyInfo.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("Azure.Communication.ProgrammableConnectivity.Tests, PublicKey = 0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] + +// Replace Microsoft.Test with the correct resource provider namepace for your service and uncomment. +// See https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/azure-services-resource-providers +// for the list of possible values. +[assembly: Azure.Core.AzureResourceProviderNamespace("Microsoft.Template")] diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/tests/Azure.Communication.ProgrammableConnectivity.Tests.csproj b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/tests/Azure.Communication.ProgrammableConnectivity.Tests.csproj new file mode 100644 index 000000000000..4f7e5f50fc34 --- /dev/null +++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/tests/Azure.Communication.ProgrammableConnectivity.Tests.csproj @@ -0,0 +1,20 @@ + + + $(RequiredTargetFrameworks) + + $(NoWarn);CS1591 + + + + + + + + + + + + + + + diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/tests/Generated/Samples/Samples_DeviceLocation.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/tests/Generated/Samples/Samples_DeviceLocation.cs new file mode 100644 index 000000000000..36d8d907213a --- /dev/null +++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/tests/Generated/Samples/Samples_DeviceLocation.cs @@ -0,0 +1,211 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.Communication.ProgrammableConnectivity.Samples +{ + public partial class Samples_DeviceLocation + { + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_DeviceLocation_Verify_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceLocation client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceLocationClient(apiVersion: "2024-02-09-preview"); + + using RequestContent content = RequestContent.Create(new + { + networkIdentifier = new + { + identifierType = "", + identifier = "", + }, + latitude = 123.45, + longitude = 123.45, + accuracy = 1234, + device = new object(), + }); + Response response = client.Verify("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("verificationResult").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_DeviceLocation_Verify_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceLocation client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceLocationClient(apiVersion: "2024-02-09-preview"); + + using RequestContent content = RequestContent.Create(new + { + networkIdentifier = new + { + identifierType = "", + identifier = "", + }, + latitude = 123.45, + longitude = 123.45, + accuracy = 1234, + device = new object(), + }); + Response response = await client.VerifyAsync("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("verificationResult").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_DeviceLocation_Verify_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceLocation client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceLocationClient(apiVersion: "2024-02-09-preview"); + + DeviceLocationVerificationContent body = new DeviceLocationVerificationContent(new NetworkIdentifier("", ""), 123.45, 123.45, 1234, new LocationDevice()); + Response response = client.Verify("", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_DeviceLocation_Verify_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceLocation client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceLocationClient(apiVersion: "2024-02-09-preview"); + + DeviceLocationVerificationContent body = new DeviceLocationVerificationContent(new NetworkIdentifier("", ""), 123.45, 123.45, 1234, new LocationDevice()); + Response response = await client.VerifyAsync("", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_DeviceLocation_Verify_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceLocation client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceLocationClient(apiVersion: "2024-02-09-preview"); + + using RequestContent content = RequestContent.Create(new + { + networkIdentifier = new + { + identifierType = "", + identifier = "", + }, + latitude = 123.45, + longitude = 123.45, + accuracy = 1234, + device = new + { + networkAccessIdentifier = "", + phoneNumber = "", + ipv4Address = new + { + ipv4 = "", + port = 1234, + }, + ipv6Address = new + { + ipv6 = "", + port = 1234, + }, + }, + }); + Response response = client.Verify("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("verificationResult").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_DeviceLocation_Verify_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceLocation client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceLocationClient(apiVersion: "2024-02-09-preview"); + + using RequestContent content = RequestContent.Create(new + { + networkIdentifier = new + { + identifierType = "", + identifier = "", + }, + latitude = 123.45, + longitude = 123.45, + accuracy = 1234, + device = new + { + networkAccessIdentifier = "", + phoneNumber = "", + ipv4Address = new + { + ipv4 = "", + port = 1234, + }, + ipv6Address = new + { + ipv6 = "", + port = 1234, + }, + }, + }); + Response response = await client.VerifyAsync("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("verificationResult").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_DeviceLocation_Verify_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceLocation client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceLocationClient(apiVersion: "2024-02-09-preview"); + + DeviceLocationVerificationContent body = new DeviceLocationVerificationContent(new NetworkIdentifier("", ""), 123.45, 123.45, 1234, new LocationDevice + { + NetworkAccessIdentifier = "", + PhoneNumber = "", + Ipv4Address = new Ipv4Address("", 1234), + Ipv6Address = new Ipv6Address("", 1234), + }); + Response response = client.Verify("", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_DeviceLocation_Verify_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceLocation client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceLocationClient(apiVersion: "2024-02-09-preview"); + + DeviceLocationVerificationContent body = new DeviceLocationVerificationContent(new NetworkIdentifier("", ""), 123.45, 123.45, 1234, new LocationDevice + { + NetworkAccessIdentifier = "", + PhoneNumber = "", + Ipv4Address = new Ipv4Address("", 1234), + Ipv6Address = new Ipv6Address("", 1234), + }); + Response response = await client.VerifyAsync("", body); + } + } +} diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/tests/Generated/Samples/Samples_DeviceNetwork.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/tests/Generated/Samples/Samples_DeviceNetwork.cs new file mode 100644 index 000000000000..e034a64c0be7 --- /dev/null +++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/tests/Generated/Samples/Samples_DeviceNetwork.cs @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.Communication.ProgrammableConnectivity.Samples +{ + public partial class Samples_DeviceNetwork + { + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_DeviceNetwork_Retrieve_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceNetwork client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceNetworkClient(apiVersion: "2024-02-09-preview"); + + using RequestContent content = RequestContent.Create(new + { + identifierType = "", + identifier = "", + }); + Response response = client.Retrieve("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("networkCode").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_DeviceNetwork_Retrieve_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceNetwork client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceNetworkClient(apiVersion: "2024-02-09-preview"); + + using RequestContent content = RequestContent.Create(new + { + identifierType = "", + identifier = "", + }); + Response response = await client.RetrieveAsync("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("networkCode").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_DeviceNetwork_Retrieve_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceNetwork client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceNetworkClient(apiVersion: "2024-02-09-preview"); + + NetworkIdentifier body = new NetworkIdentifier("", ""); + Response response = client.Retrieve("", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_DeviceNetwork_Retrieve_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceNetwork client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceNetworkClient(apiVersion: "2024-02-09-preview"); + + NetworkIdentifier body = new NetworkIdentifier("", ""); + Response response = await client.RetrieveAsync("", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_DeviceNetwork_Retrieve_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceNetwork client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceNetworkClient(apiVersion: "2024-02-09-preview"); + + using RequestContent content = RequestContent.Create(new + { + identifierType = "", + identifier = "", + }); + Response response = client.Retrieve("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("networkCode").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_DeviceNetwork_Retrieve_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceNetwork client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceNetworkClient(apiVersion: "2024-02-09-preview"); + + using RequestContent content = RequestContent.Create(new + { + identifierType = "", + identifier = "", + }); + Response response = await client.RetrieveAsync("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("networkCode").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_DeviceNetwork_Retrieve_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceNetwork client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceNetworkClient(apiVersion: "2024-02-09-preview"); + + NetworkIdentifier body = new NetworkIdentifier("", ""); + Response response = client.Retrieve("", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_DeviceNetwork_Retrieve_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + DeviceNetwork client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceNetworkClient(apiVersion: "2024-02-09-preview"); + + NetworkIdentifier body = new NetworkIdentifier("", ""); + Response response = await client.RetrieveAsync("", body); + } + } +} diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/tests/Generated/Samples/Samples_NumberVerification.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/tests/Generated/Samples/Samples_NumberVerification.cs new file mode 100644 index 000000000000..8f0abc9e94dc --- /dev/null +++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/tests/Generated/Samples/Samples_NumberVerification.cs @@ -0,0 +1,287 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.Communication.ProgrammableConnectivity.Samples +{ + public partial class Samples_NumberVerification + { + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_NumberVerification_VerifyWithoutCode_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); + + using RequestContent content = RequestContent.Create(new + { + networkIdentifier = new + { + identifierType = "", + identifier = "", + }, + redirectUri = "http://localhost:3000", + }); + Response response = client.VerifyWithoutCode("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_NumberVerification_VerifyWithoutCode_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); + + using RequestContent content = RequestContent.Create(new + { + networkIdentifier = new + { + identifierType = "", + identifier = "", + }, + redirectUri = "http://localhost:3000", + }); + Response response = await client.VerifyWithoutCodeAsync("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_NumberVerification_VerifyWithoutCode_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); + + NumberVerificationWithoutCodeContent body = new NumberVerificationWithoutCodeContent(new NetworkIdentifier("", ""), new Uri("http://localhost:3000")); + Response response = client.VerifyWithoutCode("", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_NumberVerification_VerifyWithoutCode_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); + + NumberVerificationWithoutCodeContent body = new NumberVerificationWithoutCodeContent(new NetworkIdentifier("", ""), new Uri("http://localhost:3000")); + Response response = await client.VerifyWithoutCodeAsync("", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_NumberVerification_VerifyWithoutCode_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); + + using RequestContent content = RequestContent.Create(new + { + networkIdentifier = new + { + identifierType = "", + identifier = "", + }, + phoneNumber = "", + hashedPhoneNumber = "", + redirectUri = "http://localhost:3000", + }); + Response response = client.VerifyWithoutCode("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_NumberVerification_VerifyWithoutCode_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); + + using RequestContent content = RequestContent.Create(new + { + networkIdentifier = new + { + identifierType = "", + identifier = "", + }, + phoneNumber = "", + hashedPhoneNumber = "", + redirectUri = "http://localhost:3000", + }); + Response response = await client.VerifyWithoutCodeAsync("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_NumberVerification_VerifyWithoutCode_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); + + NumberVerificationWithoutCodeContent body = new NumberVerificationWithoutCodeContent(new NetworkIdentifier("", ""), new Uri("http://localhost:3000")) + { + PhoneNumber = "", + HashedPhoneNumber = "", + }; + Response response = client.VerifyWithoutCode("", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_NumberVerification_VerifyWithoutCode_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); + + NumberVerificationWithoutCodeContent body = new NumberVerificationWithoutCodeContent(new NetworkIdentifier("", ""), new Uri("http://localhost:3000")) + { + PhoneNumber = "", + HashedPhoneNumber = "", + }; + Response response = await client.VerifyWithoutCodeAsync("", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_NumberVerification_VerifyWithCode_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); + + using RequestContent content = RequestContent.Create(new + { + apcCode = "", + }); + Response response = client.VerifyWithCode("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("verificationResult").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_NumberVerification_VerifyWithCode_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); + + using RequestContent content = RequestContent.Create(new + { + apcCode = "", + }); + Response response = await client.VerifyWithCodeAsync("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("verificationResult").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_NumberVerification_VerifyWithCode_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); + + NumberVerificationWithCodeContent body = new NumberVerificationWithCodeContent(""); + Response response = client.VerifyWithCode("", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_NumberVerification_VerifyWithCode_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); + + NumberVerificationWithCodeContent body = new NumberVerificationWithCodeContent(""); + Response response = await client.VerifyWithCodeAsync("", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_NumberVerification_VerifyWithCode_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); + + using RequestContent content = RequestContent.Create(new + { + apcCode = "", + }); + Response response = client.VerifyWithCode("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("verificationResult").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_NumberVerification_VerifyWithCode_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); + + using RequestContent content = RequestContent.Create(new + { + apcCode = "", + }); + Response response = await client.VerifyWithCodeAsync("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("verificationResult").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_NumberVerification_VerifyWithCode_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); + + NumberVerificationWithCodeContent body = new NumberVerificationWithCodeContent(""); + Response response = client.VerifyWithCode("", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_NumberVerification_VerifyWithCode_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); + + NumberVerificationWithCodeContent body = new NumberVerificationWithCodeContent(""); + Response response = await client.VerifyWithCodeAsync("", body); + } + } +} diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/tests/Generated/Samples/Samples_SimSwap.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/tests/Generated/Samples/Samples_SimSwap.cs new file mode 100644 index 000000000000..d43346eac1ac --- /dev/null +++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/tests/Generated/Samples/Samples_SimSwap.cs @@ -0,0 +1,311 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.Communication.ProgrammableConnectivity.Samples +{ + public partial class Samples_SimSwap + { + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_SimSwap_Retrieve_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); + + using RequestContent content = RequestContent.Create(new + { + networkIdentifier = new + { + identifierType = "", + identifier = "", + }, + }); + Response response = client.Retrieve("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_SimSwap_Retrieve_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); + + using RequestContent content = RequestContent.Create(new + { + networkIdentifier = new + { + identifierType = "", + identifier = "", + }, + }); + Response response = await client.RetrieveAsync("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_SimSwap_Retrieve_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); + + SimSwapRetrievalContent body = new SimSwapRetrievalContent(new NetworkIdentifier("", "")); + Response response = client.Retrieve("", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_SimSwap_Retrieve_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); + + SimSwapRetrievalContent body = new SimSwapRetrievalContent(new NetworkIdentifier("", "")); + Response response = await client.RetrieveAsync("", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_SimSwap_Retrieve_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); + + using RequestContent content = RequestContent.Create(new + { + phoneNumber = "", + networkIdentifier = new + { + identifierType = "", + identifier = "", + }, + }); + Response response = client.Retrieve("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("date").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_SimSwap_Retrieve_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); + + using RequestContent content = RequestContent.Create(new + { + phoneNumber = "", + networkIdentifier = new + { + identifierType = "", + identifier = "", + }, + }); + Response response = await client.RetrieveAsync("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("date").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_SimSwap_Retrieve_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); + + SimSwapRetrievalContent body = new SimSwapRetrievalContent(new NetworkIdentifier("", "")) + { + PhoneNumber = "", + }; + Response response = client.Retrieve("", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_SimSwap_Retrieve_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); + + SimSwapRetrievalContent body = new SimSwapRetrievalContent(new NetworkIdentifier("", "")) + { + PhoneNumber = "", + }; + Response response = await client.RetrieveAsync("", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_SimSwap_Verify_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); + + using RequestContent content = RequestContent.Create(new + { + networkIdentifier = new + { + identifierType = "", + identifier = "", + }, + }); + Response response = client.Verify("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("verificationResult").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_SimSwap_Verify_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); + + using RequestContent content = RequestContent.Create(new + { + networkIdentifier = new + { + identifierType = "", + identifier = "", + }, + }); + Response response = await client.VerifyAsync("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("verificationResult").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_SimSwap_Verify_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); + + SimSwapVerificationContent body = new SimSwapVerificationContent(new NetworkIdentifier("", "")); + Response response = client.Verify("", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_SimSwap_Verify_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); + + SimSwapVerificationContent body = new SimSwapVerificationContent(new NetworkIdentifier("", "")); + Response response = await client.VerifyAsync("", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_SimSwap_Verify_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); + + using RequestContent content = RequestContent.Create(new + { + phoneNumber = "", + maxAgeHours = 1234, + networkIdentifier = new + { + identifierType = "", + identifier = "", + }, + }); + Response response = client.Verify("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("verificationResult").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_SimSwap_Verify_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); + + using RequestContent content = RequestContent.Create(new + { + phoneNumber = "", + maxAgeHours = 1234, + networkIdentifier = new + { + identifierType = "", + identifier = "", + }, + }); + Response response = await client.VerifyAsync("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("verificationResult").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_SimSwap_Verify_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); + + SimSwapVerificationContent body = new SimSwapVerificationContent(new NetworkIdentifier("", "")) + { + PhoneNumber = "", + MaxAgeHours = 1234, + }; + Response response = client.Verify("", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_SimSwap_Verify_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); + + SimSwapVerificationContent body = new SimSwapVerificationContent(new NetworkIdentifier("", "")) + { + PhoneNumber = "", + MaxAgeHours = 1234, + }; + Response response = await client.VerifyAsync("", body); + } + } +} diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/tsp-location.yaml b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/tsp-location.yaml new file mode 100644 index 000000000000..a94645b67045 --- /dev/null +++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/programmableconnectivity/Azure.ProgrammableConnectivity +commit: 1060fcd8c4857cf9321bc9c66964cadef23e4805 +repo: test-repo-billy/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/programmableconnectivity/ci.yml b/sdk/programmableconnectivity/ci.yml new file mode 100644 index 000000000000..aeb7233b0c5f --- /dev/null +++ b/sdk/programmableconnectivity/ci.yml @@ -0,0 +1,35 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: + branches: + include: + - main + - hotfix/* + - release/* + paths: + include: + - sdk/programmableconnectivity + - sdk/programmableconnectivity/ci.yml + - sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/programmableconnectivity + - sdk/programmableconnectivity/ci.yml + - sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity + +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: programmableconnectivity + ArtifactName: packages + Artifacts: + - name: Azure.Communication.ProgrammableConnectivity + safeName: AzureCommunicationProgrammableConnectivity diff --git a/sdk/purview/Azure.Analytics.Purview.Account/src/autorest.md b/sdk/purview/Azure.Analytics.Purview.Account/src/autorest.md index 45ccf1bbc0bc..e96af4e879cc 100644 --- a/sdk/purview/Azure.Analytics.Purview.Account/src/autorest.md +++ b/sdk/purview/Azure.Analytics.Purview.Account/src/autorest.md @@ -4,7 +4,9 @@ Run `dotnet build /t:GenerateCode` to generate code. ```yaml title: PurviewAccount -input-file: https://github.com/Azure/azure-rest-api-specs/blob/b2bddfe2e59b5b14e559e0433b6e6d057bcff95d/specification/purview/data-plane/Azure.Analytics.Purview.Account/preview/2019-11-01-preview/account.json +require: +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/purview/data-plane/readme.md + namespace: Azure.Analytics.Purview.Account security: AADToken security-scopes: https://purview.azure.net/.default @@ -57,3 +59,4 @@ directive: $.operationId = (mappingTable[$.operationId] ?? $.operationId); ``` + diff --git a/sdk/purview/Azure.Analytics.Purview.Administration/src/autorest.md b/sdk/purview/Azure.Analytics.Purview.Administration/src/autorest.md index 44b3da58b988..36b601a6cfe2 100644 --- a/sdk/purview/Azure.Analytics.Purview.Administration/src/autorest.md +++ b/sdk/purview/Azure.Analytics.Purview.Administration/src/autorest.md @@ -4,9 +4,8 @@ Run `dotnet build /t:GenerateCode` to generate code. ```yaml title: PurviewAdministration -input-file: - - https://github.com/Azure/azure-rest-api-specs/blob/0ebd4949e8e1cd9537ca5a07384c7661162cc7a6/specification/purview/data-plane/Azure.Analytics.Purview.Account/preview/2019-11-01-preview/account.json - - https://github.com/Azure/azure-rest-api-specs/blob/0ebd4949e8e1cd9537ca5a07384c7661162cc7a6/specification/purview/data-plane/Azure.Analytics.Purview.MetadataPolicies/preview/2021-07-01-preview/purviewMetadataPolicy.json +require: +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/purview/data-plane/readme.md namespace: Azure.Analytics.Purview.Administration modelerfour: lenient-model-deduplication: true @@ -83,3 +82,4 @@ directive: $.operationId = "Purview" + $.operationId; } ``` + diff --git a/sdk/purview/Azure.Analytics.Purview.Catalog/src/autorest.md b/sdk/purview/Azure.Analytics.Purview.Catalog/src/autorest.md index 77f2f0c5b7da..75916e7bcf0a 100644 --- a/sdk/purview/Azure.Analytics.Purview.Catalog/src/autorest.md +++ b/sdk/purview/Azure.Analytics.Purview.Catalog/src/autorest.md @@ -4,9 +4,8 @@ Run `dotnet build /t:GenerateCode` to generate code. ```yaml title: PurviewCatalog -input-file: - -- https://github.com/Azure/azure-rest-api-specs/blob/ccbe894f6b012ca2000184307ed453fd68797b86/specification/purview/data-plane/Azure.Analytics.Purview.Catalog/preview/2022-03-01-preview/purviewcatalog.json +require: +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/purview/data-plane/readme.md namespace: Azure.Analytics.Purview.Catalog @@ -81,3 +80,4 @@ directive: transform: > $.operationId = $.operationId.replace("_List", "_Get"); ``` + diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Lineage.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Lineage.cs index ede25395c59f..a7a8e053873d 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Lineage.cs +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Lineage.cs @@ -523,7 +523,7 @@ internal HttpMessage CreateGetNextPageRequest(string guid, string direction, int uri.AppendRaw("/datamap/api", false); uri.AppendPath("/lineage/", false); uri.AppendPath(guid, true); - uri.AppendPath("/next/", false); + uri.AppendPath("/next", false); uri.AppendQuery("direction", direction, true); uri.AppendQuery("api-version", _apiVersion, true); if (offset != null) diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/tsp-location.yaml b/sdk/purview/Azure.Analytics.Purview.DataMap/tsp-location.yaml index 2a6bc2283aa8..9a6949a0ba74 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/tsp-location.yaml +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/tsp-location.yaml @@ -1,4 +1,4 @@ -repo: Azure/azure-rest-api-specs -commit: c8f326f5de83b0d6328f8d84c5dd2a14f8f4310b -additionalDirectories: [] directory: specification/purview/Azure.Analytics.Purview.DataMap +commit: 1060fcd8c4857cf9321bc9c66964cadef23e4805 +repo: test-repo-billy/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/purview/Azure.Analytics.Purview.Scanning/src/autorest.md b/sdk/purview/Azure.Analytics.Purview.Scanning/src/autorest.md index bed111da105c..e7c627cfaf15 100644 --- a/sdk/purview/Azure.Analytics.Purview.Scanning/src/autorest.md +++ b/sdk/purview/Azure.Analytics.Purview.Scanning/src/autorest.md @@ -4,7 +4,9 @@ Run `dotnet build /t:GenerateCode` to generate code. ```yaml title: PurviewScanningService -input-file: https://github.com/Azure/azure-rest-api-specs/blob/1c7df99f6a84335cfd7bf5be8c800d72c1dddbc2/specification/purview/data-plane/Azure.Analytics.Purview.Scanning/preview/2018-12-01-preview/scanningService.json +require: +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/purview/data-plane/readme.md + namespace: Azure.Analytics.Purview.Scanning security: AADToken security-scopes: https://purview.azure.net/.default @@ -115,3 +117,4 @@ directive: $.operationId = (mappingTable[$.operationId] ?? $.operationId); ``` + diff --git a/sdk/purview/Azure.Analytics.Purview.Sharing/src/autorest.md b/sdk/purview/Azure.Analytics.Purview.Sharing/src/autorest.md index c34814b2486c..3b72af89f344 100644 --- a/sdk/purview/Azure.Analytics.Purview.Sharing/src/autorest.md +++ b/sdk/purview/Azure.Analytics.Purview.Sharing/src/autorest.md @@ -6,8 +6,8 @@ Run `dotnet build /t:GenerateCode` to generate code. > see https://aka.ms/autorest ``` yaml -input-file: -- https://github.com/Azure/azure-rest-api-specs/blob/40a953243ea428918de6e63758e853b7a24aa59a/specification/purview/data-plane/Azure.Analytics.Purview.Share/preview/2023-05-30-preview/share.json +require: +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/purview/data-plane/readme.md namespace: Azure.Analytics.Purview.Sharing ``` @@ -60,3 +60,4 @@ directive: from: ShareResources_List to: ShareResources_GetAllShareResources ``` + diff --git a/sdk/purview/Azure.Analytics.Purview.Workflows/src/autorest.md b/sdk/purview/Azure.Analytics.Purview.Workflows/src/autorest.md index cde9e738e415..d8da73e6e629 100644 --- a/sdk/purview/Azure.Analytics.Purview.Workflows/src/autorest.md +++ b/sdk/purview/Azure.Analytics.Purview.Workflows/src/autorest.md @@ -6,8 +6,8 @@ Run `dotnet build /t:GenerateCode` to generate code. > see https://aka.ms/autorest ``` yaml -input-file: -- https://github.com/Azure/azure-rest-api-specs/blob/afa158ef56a05f6603924f4a493817cec332b113/specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2023-10-01-preview/purviewWorkflow.json +require: +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/purview/data-plane/readme.md security: AADToken security-scopes: https://purview.azure.net/.default @@ -20,3 +20,4 @@ security-scopes: https://purview.azure.net/.default + diff --git a/sdk/schemaregistry/Azure.Data.SchemaRegistry/tsp-location.yaml b/sdk/schemaregistry/Azure.Data.SchemaRegistry/tsp-location.yaml index 93dfddce7393..444bf441d7ea 100644 --- a/sdk/schemaregistry/Azure.Data.SchemaRegistry/tsp-location.yaml +++ b/sdk/schemaregistry/Azure.Data.SchemaRegistry/tsp-location.yaml @@ -1,4 +1,4 @@ -repo: Azure/azure-rest-api-specs directory: specification/schemaregistry/SchemaRegistry -additionalDirectories: [] -commit: ab064e0047ec560a700d6b501097d99471ad817b \ No newline at end of file +commit: 1060fcd8c4857cf9321bc9c66964cadef23e4805 +repo: test-repo-billy/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/Models/CatalogListResult.Serialization.cs b/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/Models/CatalogListResult.Serialization.cs index 97809b16843a..620757b88a47 100644 --- a/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/Models/CatalogListResult.Serialization.cs +++ b/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/Models/CatalogListResult.Serialization.cs @@ -33,7 +33,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite writer.WriteObjectValue(item, options); } writer.WriteEndArray(); - if (options.Format != "W" && Optional.IsDefined(NextLink)) + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); writer.WriteStringValue(NextLink.AbsoluteUri); diff --git a/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/Models/CertificateListResult.Serialization.cs b/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/Models/CertificateListResult.Serialization.cs index f4e7550a3bcf..2dc0a0ed0986 100644 --- a/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/Models/CertificateListResult.Serialization.cs +++ b/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/Models/CertificateListResult.Serialization.cs @@ -33,7 +33,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WriteObjectValue(item, options); } writer.WriteEndArray(); - if (options.Format != "W" && Optional.IsDefined(NextLink)) + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); writer.WriteStringValue(NextLink.AbsoluteUri); diff --git a/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/Models/DeploymentListResult.Serialization.cs b/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/Models/DeploymentListResult.Serialization.cs index 24b2cd4c55d6..e13175dfc876 100644 --- a/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/Models/DeploymentListResult.Serialization.cs +++ b/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/Models/DeploymentListResult.Serialization.cs @@ -33,7 +33,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteObjectValue(item, options); } writer.WriteEndArray(); - if (options.Format != "W" && Optional.IsDefined(NextLink)) + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); writer.WriteStringValue(NextLink.AbsoluteUri); diff --git a/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/Models/DeviceGroupListResult.Serialization.cs b/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/Models/DeviceGroupListResult.Serialization.cs index 0fc304ec09fb..04a578ce1b7e 100644 --- a/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/Models/DeviceGroupListResult.Serialization.cs +++ b/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/Models/DeviceGroupListResult.Serialization.cs @@ -33,7 +33,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WriteObjectValue(item, options); } writer.WriteEndArray(); - if (options.Format != "W" && Optional.IsDefined(NextLink)) + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); writer.WriteStringValue(NextLink.AbsoluteUri); diff --git a/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/Models/DeviceListResult.Serialization.cs b/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/Models/DeviceListResult.Serialization.cs index 4220e9f2ee6b..48f52bf37f2c 100644 --- a/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/Models/DeviceListResult.Serialization.cs +++ b/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/Models/DeviceListResult.Serialization.cs @@ -33,7 +33,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WriteObjectValue(item, options); } writer.WriteEndArray(); - if (options.Format != "W" && Optional.IsDefined(NextLink)) + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); writer.WriteStringValue(NextLink.AbsoluteUri); diff --git a/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/Models/ImageListResult.Serialization.cs b/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/Models/ImageListResult.Serialization.cs index 5dba20c3b30f..d9cb2388eb8d 100644 --- a/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/Models/ImageListResult.Serialization.cs +++ b/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/Models/ImageListResult.Serialization.cs @@ -33,7 +33,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO writer.WriteObjectValue(item, options); } writer.WriteEndArray(); - if (options.Format != "W" && Optional.IsDefined(NextLink)) + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); writer.WriteStringValue(NextLink.AbsoluteUri); diff --git a/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/Models/PagedDeviceInsight.Serialization.cs b/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/Models/PagedDeviceInsight.Serialization.cs index 9dbffc886a10..a52abe6fd4ce 100644 --- a/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/Models/PagedDeviceInsight.Serialization.cs +++ b/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/Models/PagedDeviceInsight.Serialization.cs @@ -33,7 +33,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteObjectValue(item, options); } writer.WriteEndArray(); - if (options.Format != "W" && Optional.IsDefined(NextLink)) + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); writer.WriteStringValue(NextLink.AbsoluteUri); diff --git a/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/Models/ProductListResult.Serialization.cs b/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/Models/ProductListResult.Serialization.cs index 9b8a4e8cb975..008be7262312 100644 --- a/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/Models/ProductListResult.Serialization.cs +++ b/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/Models/ProductListResult.Serialization.cs @@ -33,7 +33,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite writer.WriteObjectValue(item, options); } writer.WriteEndArray(); - if (options.Format != "W" && Optional.IsDefined(NextLink)) + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); writer.WriteStringValue(NextLink.AbsoluteUri); diff --git a/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/RestOperations/CertificatesRestOperations.cs b/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/RestOperations/CertificatesRestOperations.cs index 021497fe370b..a628cf330111 100644 --- a/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/RestOperations/CertificatesRestOperations.cs +++ b/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/RestOperations/CertificatesRestOperations.cs @@ -47,6 +47,7 @@ internal RequestUriBuilder CreateListByCatalogRequestUri(string subscriptionId, uri.AppendPath("/providers/Microsoft.AzureSphere/catalogs/", false); uri.AppendPath(catalogName, true); uri.AppendPath("/certificates", false); + uri.AppendQuery("api-version", _apiVersion, true); if (filter != null) { uri.AppendQuery("$filter", filter, true); @@ -63,7 +64,6 @@ internal RequestUriBuilder CreateListByCatalogRequestUri(string subscriptionId, { uri.AppendQuery("$maxpagesize", maxpagesize.Value, true); } - uri.AppendQuery("api-version", _apiVersion, true); return uri; } @@ -81,6 +81,7 @@ internal HttpMessage CreateListByCatalogRequest(string subscriptionId, string re uri.AppendPath("/providers/Microsoft.AzureSphere/catalogs/", false); uri.AppendPath(catalogName, true); uri.AppendPath("/certificates", false); + uri.AppendQuery("api-version", _apiVersion, true); if (filter != null) { uri.AppendQuery("$filter", filter, true); @@ -97,7 +98,6 @@ internal HttpMessage CreateListByCatalogRequest(string subscriptionId, string re { uri.AppendQuery("$maxpagesize", maxpagesize.Value, true); } - uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); _userAgent.Apply(message); diff --git a/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/RestOperations/DeploymentsRestOperations.cs b/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/RestOperations/DeploymentsRestOperations.cs index 4c5ef2a75d65..ed1506649c36 100644 --- a/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/RestOperations/DeploymentsRestOperations.cs +++ b/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/RestOperations/DeploymentsRestOperations.cs @@ -51,6 +51,7 @@ internal RequestUriBuilder CreateListByDeviceGroupRequestUri(string subscription uri.AppendPath("/deviceGroups/", false); uri.AppendPath(deviceGroupName, true); uri.AppendPath("/deployments", false); + uri.AppendQuery("api-version", _apiVersion, true); if (filter != null) { uri.AppendQuery("$filter", filter, true); @@ -67,7 +68,6 @@ internal RequestUriBuilder CreateListByDeviceGroupRequestUri(string subscription { uri.AppendQuery("$maxpagesize", maxpagesize.Value, true); } - uri.AppendQuery("api-version", _apiVersion, true); return uri; } @@ -89,6 +89,7 @@ internal HttpMessage CreateListByDeviceGroupRequest(string subscriptionId, strin uri.AppendPath("/deviceGroups/", false); uri.AppendPath(deviceGroupName, true); uri.AppendPath("/deployments", false); + uri.AppendQuery("api-version", _apiVersion, true); if (filter != null) { uri.AppendQuery("$filter", filter, true); @@ -105,7 +106,6 @@ internal HttpMessage CreateListByDeviceGroupRequest(string subscriptionId, strin { uri.AppendQuery("$maxpagesize", maxpagesize.Value, true); } - uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); _userAgent.Apply(message); diff --git a/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/RestOperations/DeviceGroupsRestOperations.cs b/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/RestOperations/DeviceGroupsRestOperations.cs index c839e147656f..2a35f2696825 100644 --- a/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/RestOperations/DeviceGroupsRestOperations.cs +++ b/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/RestOperations/DeviceGroupsRestOperations.cs @@ -49,6 +49,7 @@ internal RequestUriBuilder CreateListByProductRequestUri(string subscriptionId, uri.AppendPath("/products/", false); uri.AppendPath(productName, true); uri.AppendPath("/deviceGroups", false); + uri.AppendQuery("api-version", _apiVersion, true); if (filter != null) { uri.AppendQuery("$filter", filter, true); @@ -65,7 +66,6 @@ internal RequestUriBuilder CreateListByProductRequestUri(string subscriptionId, { uri.AppendQuery("$maxpagesize", maxpagesize.Value, true); } - uri.AppendQuery("api-version", _apiVersion, true); return uri; } @@ -85,6 +85,7 @@ internal HttpMessage CreateListByProductRequest(string subscriptionId, string re uri.AppendPath("/products/", false); uri.AppendPath(productName, true); uri.AppendPath("/deviceGroups", false); + uri.AppendQuery("api-version", _apiVersion, true); if (filter != null) { uri.AppendQuery("$filter", filter, true); @@ -101,7 +102,6 @@ internal HttpMessage CreateListByProductRequest(string subscriptionId, string re { uri.AppendQuery("$maxpagesize", maxpagesize.Value, true); } - uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); _userAgent.Apply(message); diff --git a/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/RestOperations/ImagesRestOperations.cs b/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/RestOperations/ImagesRestOperations.cs index 6466af434fe4..9b6a5fe4f388 100644 --- a/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/RestOperations/ImagesRestOperations.cs +++ b/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/RestOperations/ImagesRestOperations.cs @@ -47,6 +47,7 @@ internal RequestUriBuilder CreateListByCatalogRequestUri(string subscriptionId, uri.AppendPath("/providers/Microsoft.AzureSphere/catalogs/", false); uri.AppendPath(catalogName, true); uri.AppendPath("/images", false); + uri.AppendQuery("api-version", _apiVersion, true); if (filter != null) { uri.AppendQuery("$filter", filter, true); @@ -63,7 +64,6 @@ internal RequestUriBuilder CreateListByCatalogRequestUri(string subscriptionId, { uri.AppendQuery("$maxpagesize", maxpagesize.Value, true); } - uri.AppendQuery("api-version", _apiVersion, true); return uri; } @@ -81,6 +81,7 @@ internal HttpMessage CreateListByCatalogRequest(string subscriptionId, string re uri.AppendPath("/providers/Microsoft.AzureSphere/catalogs/", false); uri.AppendPath(catalogName, true); uri.AppendPath("/images", false); + uri.AppendQuery("api-version", _apiVersion, true); if (filter != null) { uri.AppendQuery("$filter", filter, true); @@ -97,7 +98,6 @@ internal HttpMessage CreateListByCatalogRequest(string subscriptionId, string re { uri.AppendQuery("$maxpagesize", maxpagesize.Value, true); } - uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); _userAgent.Apply(message); diff --git a/sdk/sphere/Azure.ResourceManager.Sphere/src/autorest.md b/sdk/sphere/Azure.ResourceManager.Sphere/src/autorest.md index 9b5644b3f80b..342758d78404 100644 --- a/sdk/sphere/Azure.ResourceManager.Sphere/src/autorest.md +++ b/sdk/sphere/Azure.ResourceManager.Sphere/src/autorest.md @@ -7,7 +7,7 @@ azure-arm: true csharp: true library-name: Sphere namespace: Azure.ResourceManager.Sphere -require: https://github.com/Azure/azure-rest-api-specs/blob/8d662e966f6de4cd85d3dd349b776336c687597d/specification/sphere/resource-manager/readme.md +require: /mnt/vss/_work/1/s/azure-rest-api-specs/specification/sphere/resource-manager/readme.md #tag: package-2024-04-01 output-folder: $(this-folder)/Generated clear-output-folder: true