diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/Azure.Analytics.Defender.Easm.sln b/sdk/easm/Azure.Analytics.Defender.Easm/Azure.Analytics.Defender.Easm.sln
new file mode 100644
index 000000000000..e25acf848d57
--- /dev/null
+++ b/sdk/easm/Azure.Analytics.Defender.Easm/Azure.Analytics.Defender.Easm.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.Analytics.Defender.Easm", "src\Azure.Analytics.Defender.Easm.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.Analytics.Defender.Easm.Tests", "tests\Azure.Analytics.Defender.Easm.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/easm/Azure.Analytics.Defender.Easm/CHANGELOG.md b/sdk/easm/Azure.Analytics.Defender.Easm/CHANGELOG.md
new file mode 100644
index 000000000000..13dd08af78ab
--- /dev/null
+++ b/sdk/easm/Azure.Analytics.Defender.Easm/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/easm/Azure.Analytics.Defender.Easm/Directory.Build.props b/sdk/easm/Azure.Analytics.Defender.Easm/Directory.Build.props
new file mode 100644
index 000000000000..63bd836ad44b
--- /dev/null
+++ b/sdk/easm/Azure.Analytics.Defender.Easm/Directory.Build.props
@@ -0,0 +1,6 @@
+
+
+
+
diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/README.md b/sdk/easm/Azure.Analytics.Defender.Easm/README.md
new file mode 100644
index 000000000000..e02611eaab8e
--- /dev/null
+++ b/sdk/easm/Azure.Analytics.Defender.Easm/README.md
@@ -0,0 +1,86 @@
+# Azure.Analytics.Defender.Easm client library for .NET
+
+Azure.Analytics.Defender.Easm 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/easm/Azure.Analytics.Defender.Easm/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.Analytics.Defender.Easm --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.
+
+## 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/easm/Azure.Analytics.Defender.Easm/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
+
+
diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Azure.Analytics.Defender.Easm.csproj b/sdk/easm/Azure.Analytics.Defender.Easm/src/Azure.Analytics.Defender.Easm.csproj
new file mode 100644
index 000000000000..f68bcce66d81
--- /dev/null
+++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Azure.Analytics.Defender.Easm.csproj
@@ -0,0 +1,20 @@
+
+
+ This is the Azure.Analytics.Defender.Easm client library for developing .NET applications with rich experience.
+ Azure SDK Code Generation Azure.Analytics.Defender.Easm for Azure Data Plane
+ 1.0.0-beta.1
+ Azure.Analytics.Defender.Easm
+ $(RequiredTargetFrameworks)
+ true
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AlexaInfo.Serialization.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AlexaInfo.Serialization.cs
new file mode 100644
index 000000000000..5d88120b6b21
--- /dev/null
+++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AlexaInfo.Serialization.cs
@@ -0,0 +1,137 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Text.Json;
+using Azure;
+using Azure.Core;
+
+namespace Azure.Analytics.Defender.Easm
+{
+ public partial class AlexaInfo : IUtf8JsonSerializable
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
+ {
+ writer.WriteStartObject();
+ if (Optional.IsDefined(AlexaRank))
+ {
+ writer.WritePropertyName("alexaRank"u8);
+ writer.WriteNumberValue(AlexaRank.Value);
+ }
+ if (Optional.IsDefined(Category))
+ {
+ writer.WritePropertyName("category"u8);
+ writer.WriteStringValue(Category);
+ }
+ if (Optional.IsDefined(FirstSeen))
+ {
+ writer.WritePropertyName("firstSeen"u8);
+ writer.WriteStringValue(FirstSeen.Value, "O");
+ }
+ if (Optional.IsDefined(LastSeen))
+ {
+ writer.WritePropertyName("lastSeen"u8);
+ writer.WriteStringValue(LastSeen.Value, "O");
+ }
+ if (Optional.IsDefined(Count))
+ {
+ writer.WritePropertyName("count"u8);
+ writer.WriteNumberValue(Count.Value);
+ }
+ if (Optional.IsDefined(Recent))
+ {
+ writer.WritePropertyName("recent"u8);
+ writer.WriteBooleanValue(Recent.Value);
+ }
+ writer.WriteEndObject();
+ }
+
+ internal static AlexaInfo DeserializeAlexaInfo(JsonElement element)
+ {
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ Optional alexaRank = default;
+ Optional category = default;
+ Optional firstSeen = default;
+ Optional lastSeen = default;
+ Optional count = default;
+ Optional recent = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("alexaRank"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ alexaRank = property.Value.GetInt64();
+ continue;
+ }
+ if (property.NameEquals("category"u8))
+ {
+ category = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("firstSeen"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ firstSeen = property.Value.GetDateTimeOffset("O");
+ continue;
+ }
+ if (property.NameEquals("lastSeen"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ lastSeen = property.Value.GetDateTimeOffset("O");
+ continue;
+ }
+ if (property.NameEquals("count"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ count = property.Value.GetInt64();
+ continue;
+ }
+ if (property.NameEquals("recent"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ recent = property.Value.GetBoolean();
+ continue;
+ }
+ }
+ return new AlexaInfo(Optional.ToNullable(alexaRank), category.Value, Optional.ToNullable(firstSeen), Optional.ToNullable(lastSeen), Optional.ToNullable(count), Optional.ToNullable(recent));
+ }
+
+ /// Deserializes the model from a raw response.
+ /// The response to deserialize the model from.
+ internal static AlexaInfo FromResponse(Response response)
+ {
+ using var document = JsonDocument.Parse(response.Content);
+ return DeserializeAlexaInfo(document.RootElement);
+ }
+
+ /// Convert into a Utf8JsonRequestContent.
+ internal virtual RequestContent ToRequestContent()
+ {
+ var content = new Utf8JsonRequestContent();
+ content.JsonWriter.WriteObjectValue(this);
+ return content;
+ }
+ }
+}
diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AlexaInfo.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AlexaInfo.cs
new file mode 100644
index 000000000000..27a44fb8ee2d
--- /dev/null
+++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AlexaInfo.cs
@@ -0,0 +1,50 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+
+namespace Azure.Analytics.Defender.Easm
+{
+ /// The AlexaInfo.
+ public partial class AlexaInfo
+ {
+ /// Initializes a new instance of AlexaInfo.
+ public AlexaInfo()
+ {
+ }
+
+ /// Initializes a new instance of AlexaInfo.
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ internal AlexaInfo(long? alexaRank, string category, DateTimeOffset? firstSeen, DateTimeOffset? lastSeen, long? count, bool? recent)
+ {
+ AlexaRank = alexaRank;
+ Category = category;
+ FirstSeen = firstSeen;
+ LastSeen = lastSeen;
+ Count = count;
+ Recent = recent;
+ }
+
+ /// Gets or sets the alexa rank.
+ public long? AlexaRank { get; set; }
+ /// Gets or sets the category.
+ public string Category { get; set; }
+ /// Gets or sets the first seen.
+ public DateTimeOffset? FirstSeen { get; set; }
+ /// Gets or sets the last seen.
+ public DateTimeOffset? LastSeen { get; set; }
+ /// Gets or sets the count.
+ public long? Count { get; set; }
+ /// Gets or sets the recent.
+ public bool? Recent { get; set; }
+ }
+}
diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AnalyticsDefenderEasmClientBuilderExtensions.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AnalyticsDefenderEasmClientBuilderExtensions.cs
new file mode 100644
index 000000000000..5450a7b6979b
--- /dev/null
+++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AnalyticsDefenderEasmClientBuilderExtensions.cs
@@ -0,0 +1,38 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using Azure.Analytics.Defender.Easm;
+using Azure.Core.Extensions;
+
+namespace Microsoft.Extensions.Azure
+{
+ /// Extension methods to add to client builder.
+ public static partial class AnalyticsDefenderEasmClientBuilderExtensions
+ {
+ /// Registers a instance.
+ /// The builder to register with.
+ /// The endpoint hosting the requested resource. For example, https://{region}.easm.defender.microsoft.com.
+ /// The ID of the target subscription.
+ /// The name of the Resource Group.
+ /// The name of the Workspace.
+ public static IAzureClientBuilder AddEasmClient(this TBuilder builder, Uri endpoint, string subscriptionId, string resourceGroupName, string workspaceName)
+ where TBuilder : IAzureClientFactoryBuilderWithCredential
+ {
+ return builder.RegisterClientFactory((options, cred) => new EasmClient(endpoint, subscriptionId, resourceGroupName, workspaceName, cred, options));
+ }
+
+ /// Registers a instance.
+ /// The builder to register with.
+ /// The configuration values.
+ public static IAzureClientBuilder AddEasmClient(this TBuilder builder, TConfiguration configuration)
+ where TBuilder : IAzureClientFactoryBuilderWithConfiguration
+ {
+ return builder.RegisterClientFactory(configuration);
+ }
+ }
+}
diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AnalyticsDefenderEasmModelFactory.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AnalyticsDefenderEasmModelFactory.cs
new file mode 100644
index 000000000000..fbecb3d77200
--- /dev/null
+++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AnalyticsDefenderEasmModelFactory.cs
@@ -0,0 +1,596 @@
+// 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
+{
+ /// Model factory for models.
+ public static partial class AnalyticsDefenderEasmModelFactory
+ {
+ /// Initializes a new instance of AssetResource.
+ /// Discriminator.
+ /// 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.
+ /// Global UUID for the asset.
+ /// The date this asset was first added to this workspace.
+ /// The date this asset was last updated for this workspace.
+ ///
+ /// An optional customer provided identifier for this asset.
+ /// Customer labels assigned to this asset.
+ /// An indicator of whether this asset represents a wildcard rollup of assets on this domain.
+ /// The name of the DiscoGroup that brought added this asset to the workspace.
+ /// The history of how this asset was pulled into the workspace through the discovery process.
+ ///
+ /// A new instance for mocking.
+ public static AssetResource AssetResource(string kind = null, string id = null, string name = null, string displayName = null, Guid? uuid = null, DateTimeOffset? createdDate = null, DateTimeOffset? updatedDate = null, AssetState? state = null, string externalId = null, IEnumerable labels = null, bool? wildcard = null, string discoGroupName = null, IEnumerable auditTrail = null, string reason = null)
+ {
+ labels ??= new List();
+ auditTrail ??= new List();
+
+ return new UnknownAssetResource(kind, id, name, displayName, uuid, createdDate, updatedDate, state, externalId, labels?.ToList(), wildcard, discoGroupName, auditTrail?.ToList(), reason);
+ }
+
+ /// Initializes a new instance of AsAssetResource.
+ /// 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.
+ /// Global UUID for the asset.
+ /// The date this asset was first added to this workspace.
+ /// The date this asset was last updated for this workspace.
+ ///
+ /// An optional customer provided identifier for this asset.
+ /// Customer labels assigned to this asset.
+ /// An indicator of whether this asset represents a wildcard rollup of assets on this domain.
+ /// The name of the DiscoGroup that brought added this asset to the workspace.
+ /// The history of how this asset was pulled into the workspace through the discovery process.
+ ///
+ /// asset.
+ /// A new instance for mocking.
+ public static AsAssetResource AsAssetResource(string id = null, string name = null, string displayName = null, Guid? uuid = null, DateTimeOffset? createdDate = null, DateTimeOffset? updatedDate = null, AssetState? state = null, string externalId = null, IEnumerable labels = null, bool? wildcard = null, string discoGroupName = null, IEnumerable auditTrail = null, string reason = null, AsAsset asset = null)
+ {
+ labels ??= new List();
+ auditTrail ??= new List();
+
+ return new AsAssetResource("as", id, name, displayName, uuid, createdDate, updatedDate, state, externalId, labels?.ToList(), wildcard, discoGroupName, auditTrail?.ToList(), reason, asset);
+ }
+
+ /// Initializes a new instance of ObservedString.
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// A new instance for mocking.
+ public static ObservedString ObservedString(DateTimeOffset? firstSeen = null, DateTimeOffset? lastSeen = null, long? count = null, bool? recent = null, string value = null, IEnumerable sources = null)
+ {
+ sources ??= new List();
+
+ return new ObservedString(firstSeen, lastSeen, count, recent, value, sources?.ToList());
+ }
+
+ /// Initializes a new instance of ObservedLong.
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// A new instance for mocking.
+ public static ObservedLong ObservedLong(DateTimeOffset? firstSeen = null, DateTimeOffset? lastSeen = null, long? count = null, bool? recent = null, long? value = null, IEnumerable sources = null)
+ {
+ sources ??= new List();
+
+ return new ObservedLong(firstSeen, lastSeen, count, recent, value, sources?.ToList());
+ }
+
+ /// Initializes a new instance of ObservedInteger.
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// A new instance for mocking.
+ public static ObservedInteger ObservedInteger(DateTimeOffset? firstSeen = null, DateTimeOffset? lastSeen = null, long? count = null, bool? recent = null, int? value = null, IEnumerable sources = null)
+ {
+ sources ??= new List();
+
+ return new ObservedInteger(firstSeen, lastSeen, count, recent, value, sources?.ToList());
+ }
+
+ /// Initializes a new instance of ObservedBoolean.
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// A new instance for mocking.
+ public static ObservedBoolean ObservedBoolean(DateTimeOffset? firstSeen = null, DateTimeOffset? lastSeen = null, long? count = null, bool? recent = null, bool? value = null, IEnumerable sources = null)
+ {
+ sources ??= new List();
+
+ return new ObservedBoolean(firstSeen, lastSeen, count, recent, value, sources?.ToList());
+ }
+
+ /// Initializes a new instance of ObservedHeader.
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// A new instance for mocking.
+ public static ObservedHeader ObservedHeader(DateTimeOffset? firstSeen = null, DateTimeOffset? lastSeen = null, long? count = null, bool? recent = null, string headerName = null, string headerValue = null)
+ {
+ return new ObservedHeader(firstSeen, lastSeen, count, recent, headerName, headerValue);
+ }
+
+ /// Initializes a new instance of ObservedPortState.
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// A new instance for mocking.
+ public static ObservedPortState ObservedPortState(DateTimeOffset? firstSeen = null, DateTimeOffset? lastSeen = null, long? count = null, bool? recent = null, ObservedPortStateValue? value = null, int? port = null)
+ {
+ return new ObservedPortState(firstSeen, lastSeen, count, recent, value, port);
+ }
+
+ /// Initializes a new instance of ObservedLocation.
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// A new instance for mocking.
+ public static ObservedLocation ObservedLocation(DateTimeOffset? firstSeen = null, DateTimeOffset? lastSeen = null, long? count = null, bool? recent = null, Location value = null, IEnumerable sources = null)
+ {
+ sources ??= new List();
+
+ return new ObservedLocation(firstSeen, lastSeen, count, recent, value, sources?.ToList());
+ }
+
+ /// Initializes a new instance of ObservedIntegers.
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// A new instance for mocking.
+ public static ObservedIntegers ObservedIntegers(DateTimeOffset? firstSeen = null, DateTimeOffset? lastSeen = null, long? count = null, bool? recent = null, IEnumerable values = null, IEnumerable sources = null)
+ {
+ values ??= new List();
+ sources ??= new List();
+
+ return new ObservedIntegers(firstSeen, lastSeen, count, recent, values?.ToList(), sources?.ToList());
+ }
+
+ /// Initializes a new instance of ContactAssetResource.
+ /// 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.
+ /// Global UUID for the asset.
+ /// The date this asset was first added to this workspace.
+ /// The date this asset was last updated for this workspace.
+ ///
+ /// An optional customer provided identifier for this asset.
+ /// Customer labels assigned to this asset.
+ /// An indicator of whether this asset represents a wildcard rollup of assets on this domain.
+ /// The name of the DiscoGroup that brought added this asset to the workspace.
+ /// The history of how this asset was pulled into the workspace through the discovery process.
+ ///
+ /// asset.
+ /// A new instance for mocking.
+ public static ContactAssetResource ContactAssetResource(string id = null, string name = null, string displayName = null, Guid? uuid = null, DateTimeOffset? createdDate = null, DateTimeOffset? updatedDate = null, AssetState? state = null, string externalId = null, IEnumerable labels = null, bool? wildcard = null, string discoGroupName = null, IEnumerable auditTrail = null, string reason = null, ContactAsset asset = null)
+ {
+ labels ??= new List();
+ auditTrail ??= new List();
+
+ return new ContactAssetResource("contact", id, name, displayName, uuid, createdDate, updatedDate, state, externalId, labels?.ToList(), wildcard, discoGroupName, auditTrail?.ToList(), reason, asset);
+ }
+
+ /// Initializes a new instance of DomainAssetResource.
+ /// 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.
+ /// Global UUID for the asset.
+ /// The date this asset was first added to this workspace.
+ /// The date this asset was last updated for this workspace.
+ ///
+ /// An optional customer provided identifier for this asset.
+ /// Customer labels assigned to this asset.
+ /// An indicator of whether this asset represents a wildcard rollup of assets on this domain.
+ /// The name of the DiscoGroup that brought added this asset to the workspace.
+ /// The history of how this asset was pulled into the workspace through the discovery process.
+ ///
+ /// asset.
+ /// A new instance for mocking.
+ public static DomainAssetResource DomainAssetResource(string id = null, string name = null, string displayName = null, Guid? uuid = null, DateTimeOffset? createdDate = null, DateTimeOffset? updatedDate = null, AssetState? state = null, string externalId = null, IEnumerable labels = null, bool? wildcard = null, string discoGroupName = null, IEnumerable auditTrail = null, string reason = null, DomainAsset asset = null)
+ {
+ labels ??= new List();
+ auditTrail ??= new List();
+
+ return new DomainAssetResource("domain", id, name, displayName, uuid, createdDate, updatedDate, state, externalId, labels?.ToList(), wildcard, discoGroupName, auditTrail?.ToList(), reason, asset);
+ }
+
+ /// Initializes a new instance of HostAssetResource.
+ /// 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.
+ /// Global UUID for the asset.
+ /// The date this asset was first added to this workspace.
+ /// The date this asset was last updated for this workspace.
+ ///
+ /// An optional customer provided identifier for this asset.
+ /// Customer labels assigned to this asset.
+ /// An indicator of whether this asset represents a wildcard rollup of assets on this domain.
+ /// The name of the DiscoGroup that brought added this asset to the workspace.
+ /// The history of how this asset was pulled into the workspace through the discovery process.
+ ///
+ /// asset.
+ /// A new instance for mocking.
+ public static HostAssetResource HostAssetResource(string id = null, string name = null, string displayName = null, Guid? uuid = null, DateTimeOffset? createdDate = null, DateTimeOffset? updatedDate = null, AssetState? state = null, string externalId = null, IEnumerable labels = null, bool? wildcard = null, string discoGroupName = null, IEnumerable auditTrail = null, string reason = null, HostAsset asset = null)
+ {
+ labels ??= new List();
+ auditTrail ??= new List();
+
+ return new HostAssetResource("host", id, name, displayName, uuid, createdDate, updatedDate, state, externalId, labels?.ToList(), wildcard, discoGroupName, auditTrail?.ToList(), reason, asset);
+ }
+
+ /// Initializes a new instance of IpAddressAssetResource.
+ /// 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.
+ /// Global UUID for the asset.
+ /// The date this asset was first added to this workspace.
+ /// The date this asset was last updated for this workspace.
+ ///
+ /// An optional customer provided identifier for this asset.
+ /// Customer labels assigned to this asset.
+ /// An indicator of whether this asset represents a wildcard rollup of assets on this domain.
+ /// The name of the DiscoGroup that brought added this asset to the workspace.
+ /// The history of how this asset was pulled into the workspace through the discovery process.
+ ///
+ /// asset.
+ /// A new instance for mocking.
+ public static IpAddressAssetResource IpAddressAssetResource(string id = null, string name = null, string displayName = null, Guid? uuid = null, DateTimeOffset? createdDate = null, DateTimeOffset? updatedDate = null, AssetState? state = null, string externalId = null, IEnumerable labels = null, bool? wildcard = null, string discoGroupName = null, IEnumerable auditTrail = null, string reason = null, IpAddressAsset asset = null)
+ {
+ labels ??= new List();
+ auditTrail ??= new List();
+
+ return new IpAddressAssetResource("ipAddress", id, name, displayName, uuid, createdDate, updatedDate, state, externalId, labels?.ToList(), wildcard, discoGroupName, auditTrail?.ToList(), reason, asset);
+ }
+
+ /// Initializes a new instance of IpBlockAssetResource.
+ /// 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.
+ /// Global UUID for the asset.
+ /// The date this asset was first added to this workspace.
+ /// The date this asset was last updated for this workspace.
+ ///
+ /// An optional customer provided identifier for this asset.
+ /// Customer labels assigned to this asset.
+ /// An indicator of whether this asset represents a wildcard rollup of assets on this domain.
+ /// The name of the DiscoGroup that brought added this asset to the workspace.
+ /// The history of how this asset was pulled into the workspace through the discovery process.
+ ///
+ /// asset.
+ /// A new instance for mocking.
+ public static IpBlockAssetResource IpBlockAssetResource(string id = null, string name = null, string displayName = null, Guid? uuid = null, DateTimeOffset? createdDate = null, DateTimeOffset? updatedDate = null, AssetState? state = null, string externalId = null, IEnumerable labels = null, bool? wildcard = null, string discoGroupName = null, IEnumerable auditTrail = null, string reason = null, IpBlockAsset asset = null)
+ {
+ labels ??= new List();
+ auditTrail ??= new List();
+
+ return new IpBlockAssetResource("ipBlock", id, name, displayName, uuid, createdDate, updatedDate, state, externalId, labels?.ToList(), wildcard, discoGroupName, auditTrail?.ToList(), reason, asset);
+ }
+
+ /// Initializes a new instance of PageAssetResource.
+ /// 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.
+ /// Global UUID for the asset.
+ /// The date this asset was first added to this workspace.
+ /// The date this asset was last updated for this workspace.
+ ///
+ /// An optional customer provided identifier for this asset.
+ /// Customer labels assigned to this asset.
+ /// An indicator of whether this asset represents a wildcard rollup of assets on this domain.
+ /// The name of the DiscoGroup that brought added this asset to the workspace.
+ /// The history of how this asset was pulled into the workspace through the discovery process.
+ ///
+ /// asset.
+ /// A new instance for mocking.
+ public static PageAssetResource PageAssetResource(string id = null, string name = null, string displayName = null, Guid? uuid = null, DateTimeOffset? createdDate = null, DateTimeOffset? updatedDate = null, AssetState? state = null, string externalId = null, IEnumerable labels = null, bool? wildcard = null, string discoGroupName = null, IEnumerable auditTrail = null, string reason = null, PageAsset asset = null)
+ {
+ labels ??= new List();
+ auditTrail ??= new List();
+
+ return new PageAssetResource("page", id, name, displayName, uuid, createdDate, updatedDate, state, externalId, labels?.ToList(), wildcard, discoGroupName, auditTrail?.ToList(), reason, asset);
+ }
+
+ /// Initializes a new instance of SslCertAssetResource.
+ /// 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.
+ /// Global UUID for the asset.
+ /// The date this asset was first added to this workspace.
+ /// The date this asset was last updated for this workspace.
+ ///
+ /// An optional customer provided identifier for this asset.
+ /// Customer labels assigned to this asset.
+ /// An indicator of whether this asset represents a wildcard rollup of assets on this domain.
+ /// The name of the DiscoGroup that brought added this asset to the workspace.
+ /// The history of how this asset was pulled into the workspace through the discovery process.
+ ///
+ /// asset.
+ /// A new instance for mocking.
+ public static SslCertAssetResource SslCertAssetResource(string id = null, string name = null, string displayName = null, Guid? uuid = null, DateTimeOffset? createdDate = null, DateTimeOffset? updatedDate = null, AssetState? state = null, string externalId = null, IEnumerable labels = null, bool? wildcard = null, string discoGroupName = null, IEnumerable auditTrail = null, string reason = null, SslCertAsset asset = null)
+ {
+ labels ??= new List();
+ auditTrail ??= new List();
+
+ return new SslCertAssetResource("sslCert", id, name, displayName, uuid, createdDate, updatedDate, state, externalId, labels?.ToList(), wildcard, discoGroupName, auditTrail?.ToList(), reason, asset);
+ }
+
+ /// Initializes a new instance of DataConnection.
+ /// Discriminator.
+ /// 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.
+ /// The type of data the data connection will transfer.
+ /// The date the data connection was created.
+ /// The rate at which the data connection will receive updates.
+ /// The day to update the data connection on.
+ /// The date the data connection was last updated.
+ /// The date the data connection was last updated by user.
+ /// An indicator of whether the data connection is active.
+ /// A message that specifies details about data connection if inactive.
+ /// A new instance for mocking.
+ public static DataConnection DataConnection(string kind = null, string id = null, string name = null, string displayName = null, DataConnectionContent? content = null, DateTimeOffset? createdDate = null, DataConnectionFrequency? frequency = null, int? frequencyOffset = null, DateTimeOffset? updatedDate = null, DateTimeOffset? userUpdatedAt = null, bool? active = null, string inactiveMessage = null)
+ {
+ return new UnknownDataConnection(kind, id, name, displayName, content, createdDate, frequency, frequencyOffset, updatedDate, userUpdatedAt, active, inactiveMessage);
+ }
+
+ /// Initializes a new instance of LogAnalyticsDataConnection.
+ /// 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.
+ /// The type of data the data connection will transfer.
+ /// The date the data connection was created.
+ /// The rate at which the data connection will receive updates.
+ /// The day to update the data connection on.
+ /// The date the data connection was last updated.
+ /// The date the data connection was last updated by user.
+ /// An indicator of whether the data connection is active.
+ /// A message that specifies details about data connection if inactive.
+ /// properties.
+ /// A new instance for mocking.
+ public static LogAnalyticsDataConnection LogAnalyticsDataConnection(string id = null, string name = null, string displayName = null, DataConnectionContent? content = null, DateTimeOffset? createdDate = null, DataConnectionFrequency? frequency = null, int? frequencyOffset = null, DateTimeOffset? updatedDate = null, DateTimeOffset? userUpdatedAt = null, bool? active = null, string inactiveMessage = null, LogAnalyticsDataConnectionProperties properties = null)
+ {
+ return new LogAnalyticsDataConnection("logAnalytics", id, name, displayName, content, createdDate, frequency, frequencyOffset, updatedDate, userUpdatedAt, active, inactiveMessage, properties);
+ }
+
+ /// Initializes a new instance of AzureDataExplorerDataConnection.
+ /// 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.
+ /// The type of data the data connection will transfer.
+ /// The date the data connection was created.
+ /// The rate at which the data connection will receive updates.
+ /// The day to update the data connection on.
+ /// The date the data connection was last updated.
+ /// The date the data connection was last updated by user.
+ /// An indicator of whether the data connection is active.
+ /// A message that specifies details about data connection if inactive.
+ /// properties.
+ /// A new instance for mocking.
+ public static AzureDataExplorerDataConnection AzureDataExplorerDataConnection(string id = null, string name = null, string displayName = null, DataConnectionContent? content = null, DateTimeOffset? createdDate = null, DataConnectionFrequency? frequency = null, int? frequencyOffset = null, DateTimeOffset? updatedDate = null, DateTimeOffset? userUpdatedAt = null, bool? active = null, string inactiveMessage = null, AzureDataExplorerDataConnectionProperties properties = null)
+ {
+ return new AzureDataExplorerDataConnection("azureDataExplorer", id, name, displayName, content, createdDate, frequency, frequencyOffset, updatedDate, userUpdatedAt, active, inactiveMessage, properties);
+ }
+
+ /// Initializes a new instance of ValidateResult.
+ /// This is the top-level error object whose code matches the x-ms-error-code response header.
+ /// A new instance for mocking.
+ public static ValidateResult ValidateResult(ErrorDetail error = null)
+ {
+ return new ValidateResult(error);
+ }
+
+ /// Initializes a new instance of ErrorDetail.
+ /// This is one of a server-defined set of error codes.
+ /// This is a human-readable representation of the error.
+ /// This is the error target.
+ /// This is an array of details about specific errors that led to this reported error.
+ /// This is an object containing more specific information than the current object about the error.
+ /// A new instance for mocking.
+ public static ErrorDetail ErrorDetail(string code = null, string message = null, string target = null, IEnumerable details = null, InnerError innererror = null)
+ {
+ details ??= new List();
+
+ return new ErrorDetail(code, message, target, details?.ToList(), innererror);
+ }
+
+ /// Initializes a new instance of InnerError.
+ /// This is a more specific error code than was provided by the containing error.
+ /// This is an additional field representing the value that caused the error to help with debugging.
+ /// A new instance for mocking.
+ public static InnerError InnerError(string code = null, BinaryData value = null)
+ {
+ return new InnerError(code, value);
+ }
+
+ /// Initializes a new instance of DiscoGroup.
+ /// 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.
+ /// The description for a disco group.
+ /// The tier for the disco group which will affect the algorithm used for the disco runs in this group.
+ /// The frequency at which the disco group is supposed to be rerun in milliseconds.
+ /// The list of seeds used for the disco group runs.
+ /// The list of names used for the disco group runs.
+ /// The list of excludes used for the disco group runs, aka assets to exclude from the discovery algorithm.
+ /// The latest run of this disco group with some limited information, null if the group has never been run.
+ /// The date for the disco group was created.
+ /// The unique identifier for the disco template used for the disco group creation.
+ /// A new instance for mocking.
+ public static DiscoGroup DiscoGroup(string id = null, string name = null, string displayName = null, string description = null, string tier = null, long? frequencyMilliseconds = null, IEnumerable seeds = null, IEnumerable names = null, IEnumerable excludes = null, DiscoRunResult latestRun = null, DateTimeOffset? createdDate = null, string templateId = null)
+ {
+ seeds ??= new List();
+ names ??= new List();
+ excludes ??= new List();
+
+ return new DiscoGroup(id, name, displayName, description, tier, frequencyMilliseconds, seeds?.ToList(), names?.ToList(), excludes?.ToList(), latestRun, createdDate, templateId);
+ }
+
+ /// Initializes a new instance of DiscoTemplate.
+ /// 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.
+ /// The name of the industry.
+ /// The name of the region.
+ /// The country code.
+ /// The state code.
+ /// The name of the city.
+ /// The list of disco template seeds.
+ /// The list of disco template names.
+ /// A new instance for mocking.
+ public static DiscoTemplate DiscoTemplate(string id = null, string name = null, string displayName = null, string industry = null, string region = null, string countryCode = null, string stateCode = null, string city = null, IEnumerable seeds = null, IEnumerable names = null)
+ {
+ seeds ??= new List();
+ names ??= new List();
+
+ return new DiscoTemplate(id, name, displayName, industry, region, countryCode, stateCode, city, seeds?.ToList(), names?.ToList());
+ }
+
+ /// Initializes a new instance of ReportBillableAssetSummaryResult.
+ ///
+ /// A new instance for mocking.
+ public static ReportBillableAssetSummaryResult ReportBillableAssetSummaryResult(IEnumerable assetSummaries = null)
+ {
+ assetSummaries ??= new List();
+
+ return new ReportBillableAssetSummaryResult(assetSummaries?.ToList());
+ }
+
+ /// Initializes a new instance of ReportBillableAssetSnapshotResult.
+ /// The date these assets were billed on.
+ /// The total number of billable assets for this date.
+ /// The breakdown of billable asset counts for each asset type.
+ /// A new instance for mocking.
+ public static ReportBillableAssetSnapshotResult ReportBillableAssetSnapshotResult(DateTimeOffset? date = null, long? total = null, IEnumerable assetBreakdown = null)
+ {
+ assetBreakdown ??= new List();
+
+ return new ReportBillableAssetSnapshotResult(date, total, assetBreakdown?.ToList());
+ }
+
+ /// Initializes a new instance of ReportBillableAssetBreakdown.
+ /// The kind of billable asset.
+ /// The number of assets of this type.
+ /// A new instance for mocking.
+ public static ReportBillableAssetBreakdown ReportBillableAssetBreakdown(ReportBillableAssetBreakdownKind? kind = null, long? count = null)
+ {
+ return new ReportBillableAssetBreakdown(kind, count);
+ }
+
+ /// Initializes a new instance of ReportAssetSnapshotResult.
+ /// The name of the metric.
+ /// The unique metric name.
+ /// The customer label that was filtered on, if one was provided.
+ /// The last time this asset data was updated on this metric.
+ /// A description of what the metric represents.
+ /// The page of assets that match the provided metric.
+ /// A new instance for mocking.
+ public static ReportAssetSnapshotResult ReportAssetSnapshotResult(string displayName = null, string metric = null, string labelName = null, DateTimeOffset? updatedAt = null, string description = null, AssetPageResult assets = null)
+ {
+ return new ReportAssetSnapshotResult(displayName, metric, labelName, updatedAt, description, assets);
+ }
+
+ /// Initializes a new instance of AssetPageResult.
+ /// The total number of items available in the full result set.
+ /// The cursor mark to be used on the next request. Not set if using paging.
+ /// The link to access the next page of results. Not set if at the end of the result set.
+ /// The items in the current page of results.
+ /// A new instance for mocking.
+ public static AssetPageResult AssetPageResult(long? totalElements = null, string mark = null, string nextLink = null, IEnumerable value = null)
+ {
+ value ??= new List();
+
+ return new AssetPageResult(totalElements, mark, nextLink, value?.ToList());
+ }
+
+ /// Initializes a new instance of ReportAssetSummaryResult.
+ /// The collection of asset summaries.
+ /// A new instance for mocking.
+ public static ReportAssetSummaryResult ReportAssetSummaryResult(IEnumerable assetSummaries = null)
+ {
+ assetSummaries ??= new List();
+
+ return new ReportAssetSummaryResult(assetSummaries?.ToList());
+ }
+
+ /// Initializes a new instance of AssetSummaryResult.
+ /// The name of the summary response. Depending on the request time this will either be the asset filter, risk category, or risk metric.
+ /// The description of the summary response. Filters don't have a description.
+ /// The last time risk categories or risk metrics were captured. Set to the current time for asset filter requests, which always pull the live asset data.
+ /// If the request is for a metric category, this will contain the requested unique category name.
+ /// If the request is for a metric, this will contain the requested unique metric name.
+ /// If the request is for an asset filter, this will contain the corresponding filter.
+ /// An optional label used to filter requests results.
+ /// The count of assets matching the request parameters.
+ /// The link to the corresponding asset details.
+ /// The corresponding child entities. For metric categories this will contain metrics. For filters with groupBy and segmentBy this will contain facets.
+ /// A new instance for mocking.
+ public static AssetSummaryResult AssetSummaryResult(string displayName = null, string description = null, DateTimeOffset? updatedAt = null, string metricCategory = null, string metric = null, string filter = null, string labelName = null, long? count = null, string link = null, IEnumerable children = null)
+ {
+ children ??= new List();
+
+ return new AssetSummaryResult(displayName, description, updatedAt, metricCategory, metric, filter, labelName, count, link, children?.ToList());
+ }
+
+ /// Initializes a new instance of SavedFilter.
+ /// 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 SavedFilter SavedFilter(string id = null, string name = null, string displayName = null, string filter = null, string description = null)
+ {
+ return new SavedFilter(id, name, displayName, filter, description);
+ }
+
+ /// Initializes a new instance of Task.
+ /// The unique identifier of the task.
+ /// The time the task started.
+ /// The time the task completed.
+ /// The last time the status of the task was updated.
+ /// The state the task is in.
+ /// The phase the task is in.
+ /// The reason the task was moved into its current state, if the task wasn't completed.
+ /// Attributes unique to the task. This differs by task type.
+ /// A new instance for mocking.
+ public static Task Task(string id = null, DateTimeOffset? startedAt = null, DateTimeOffset? completedAt = null, DateTimeOffset? lastPolledAt = null, TaskState? state = null, TaskPhase? phase = null, string reason = null, IReadOnlyDictionary metadata = null)
+ {
+ metadata ??= new Dictionary();
+
+ return new Task(id, startedAt, completedAt, lastPolledAt, state, phase, reason, metadata);
+ }
+ }
+}
diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AsAsset.Serialization.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AsAsset.Serialization.cs
new file mode 100644
index 000000000000..17bccdcf0593
--- /dev/null
+++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AsAsset.Serialization.cs
@@ -0,0 +1,627 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure;
+using Azure.Core;
+
+namespace Azure.Analytics.Defender.Easm
+{
+ public partial class AsAsset : IUtf8JsonSerializable
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
+ {
+ writer.WriteStartObject();
+ if (Optional.IsDefined(Asn))
+ {
+ writer.WritePropertyName("asn"u8);
+ writer.WriteNumberValue(Asn.Value);
+ }
+ if (Optional.IsCollectionDefined(AsNames))
+ {
+ writer.WritePropertyName("asNames"u8);
+ writer.WriteStartArray();
+ foreach (var item in AsNames)
+ {
+ writer.WriteObjectValue(item);
+ }
+ writer.WriteEndArray();
+ }
+ if (Optional.IsCollectionDefined(OrgNames))
+ {
+ writer.WritePropertyName("orgNames"u8);
+ writer.WriteStartArray();
+ foreach (var item in OrgNames)
+ {
+ writer.WriteObjectValue(item);
+ }
+ writer.WriteEndArray();
+ }
+ if (Optional.IsCollectionDefined(OrgIds))
+ {
+ writer.WritePropertyName("orgIds"u8);
+ writer.WriteStartArray();
+ foreach (var item in OrgIds)
+ {
+ writer.WriteObjectValue(item);
+ }
+ writer.WriteEndArray();
+ }
+ if (Optional.IsCollectionDefined(Countries))
+ {
+ writer.WritePropertyName("countries"u8);
+ writer.WriteStartArray();
+ foreach (var item in Countries)
+ {
+ writer.WriteObjectValue(item);
+ }
+ writer.WriteEndArray();
+ }
+ if (Optional.IsCollectionDefined(Registries))
+ {
+ writer.WritePropertyName("registries"u8);
+ writer.WriteStartArray();
+ foreach (var item in Registries)
+ {
+ writer.WriteObjectValue(item);
+ }
+ writer.WriteEndArray();
+ }
+ if (Optional.IsCollectionDefined(Sources))
+ {
+ writer.WritePropertyName("sources"u8);
+ writer.WriteStartArray();
+ foreach (var item in Sources)
+ {
+ writer.WriteObjectValue(item);
+ }
+ writer.WriteEndArray();
+ }
+ if (Optional.IsDefined(FirstSeen))
+ {
+ writer.WritePropertyName("firstSeen"u8);
+ writer.WriteStringValue(FirstSeen.Value, "O");
+ }
+ if (Optional.IsDefined(LastSeen))
+ {
+ writer.WritePropertyName("lastSeen"u8);
+ writer.WriteStringValue(LastSeen.Value, "O");
+ }
+ if (Optional.IsDefined(Count))
+ {
+ writer.WritePropertyName("count"u8);
+ writer.WriteNumberValue(Count.Value);
+ }
+ if (Optional.IsCollectionDefined(RegistrarCreatedAt))
+ {
+ writer.WritePropertyName("registrarCreatedAt"u8);
+ writer.WriteStartArray();
+ foreach (var item in RegistrarCreatedAt)
+ {
+ writer.WriteObjectValue(item);
+ }
+ writer.WriteEndArray();
+ }
+ if (Optional.IsCollectionDefined(RegistrarUpdatedAt))
+ {
+ writer.WritePropertyName("registrarUpdatedAt"u8);
+ writer.WriteStartArray();
+ foreach (var item in RegistrarUpdatedAt)
+ {
+ writer.WriteObjectValue(item);
+ }
+ writer.WriteEndArray();
+ }
+ if (Optional.IsCollectionDefined(RegistrantContacts))
+ {
+ writer.WritePropertyName("registrantContacts"u8);
+ writer.WriteStartArray();
+ foreach (var item in RegistrantContacts)
+ {
+ writer.WriteObjectValue(item);
+ }
+ writer.WriteEndArray();
+ }
+ if (Optional.IsCollectionDefined(AdminContacts))
+ {
+ writer.WritePropertyName("adminContacts"u8);
+ writer.WriteStartArray();
+ foreach (var item in AdminContacts)
+ {
+ writer.WriteObjectValue(item);
+ }
+ writer.WriteEndArray();
+ }
+ if (Optional.IsCollectionDefined(TechnicalContacts))
+ {
+ writer.WritePropertyName("technicalContacts"u8);
+ writer.WriteStartArray();
+ foreach (var item in TechnicalContacts)
+ {
+ writer.WriteObjectValue(item);
+ }
+ writer.WriteEndArray();
+ }
+ if (Optional.IsCollectionDefined(RegistrarNames))
+ {
+ writer.WritePropertyName("registrarNames"u8);
+ writer.WriteStartArray();
+ foreach (var item in RegistrarNames)
+ {
+ writer.WriteObjectValue(item);
+ }
+ writer.WriteEndArray();
+ }
+ if (Optional.IsCollectionDefined(RegistrantNames))
+ {
+ writer.WritePropertyName("registrantNames"u8);
+ writer.WriteStartArray();
+ foreach (var item in RegistrantNames)
+ {
+ writer.WriteObjectValue(item);
+ }
+ writer.WriteEndArray();
+ }
+ if (Optional.IsCollectionDefined(AdminNames))
+ {
+ writer.WritePropertyName("adminNames"u8);
+ writer.WriteStartArray();
+ foreach (var item in AdminNames)
+ {
+ writer.WriteObjectValue(item);
+ }
+ writer.WriteEndArray();
+ }
+ if (Optional.IsCollectionDefined(TechnicalNames))
+ {
+ writer.WritePropertyName("technicalNames"u8);
+ writer.WriteStartArray();
+ foreach (var item in TechnicalNames)
+ {
+ writer.WriteObjectValue(item);
+ }
+ writer.WriteEndArray();
+ }
+ if (Optional.IsCollectionDefined(AdminOrgs))
+ {
+ writer.WritePropertyName("adminOrgs"u8);
+ writer.WriteStartArray();
+ foreach (var item in AdminOrgs)
+ {
+ writer.WriteObjectValue(item);
+ }
+ writer.WriteEndArray();
+ }
+ if (Optional.IsCollectionDefined(TechnicalOrgs))
+ {
+ writer.WritePropertyName("technicalOrgs"u8);
+ writer.WriteStartArray();
+ foreach (var item in TechnicalOrgs)
+ {
+ writer.WriteObjectValue(item);
+ }
+ writer.WriteEndArray();
+ }
+ if (Optional.IsCollectionDefined(RegistrantPhones))
+ {
+ writer.WritePropertyName("registrantPhones"u8);
+ writer.WriteStartArray();
+ foreach (var item in RegistrantPhones)
+ {
+ writer.WriteObjectValue(item);
+ }
+ writer.WriteEndArray();
+ }
+ if (Optional.IsCollectionDefined(AdminPhones))
+ {
+ writer.WritePropertyName("adminPhones"u8);
+ writer.WriteStartArray();
+ foreach (var item in AdminPhones)
+ {
+ writer.WriteObjectValue(item);
+ }
+ writer.WriteEndArray();
+ }
+ if (Optional.IsCollectionDefined(TechnicalPhones))
+ {
+ writer.WritePropertyName("technicalPhones"u8);
+ writer.WriteStartArray();
+ foreach (var item in TechnicalPhones)
+ {
+ writer.WriteObjectValue(item);
+ }
+ writer.WriteEndArray();
+ }
+ if (Optional.IsDefined(DetailedFromWhoisAt))
+ {
+ writer.WritePropertyName("detailedFromWhoisAt"u8);
+ writer.WriteStringValue(DetailedFromWhoisAt.Value, "O");
+ }
+ writer.WriteEndObject();
+ }
+
+ internal static AsAsset DeserializeAsAsset(JsonElement element)
+ {
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ Optional asn = default;
+ Optional> asNames = default;
+ Optional> orgNames = default;
+ Optional> orgIds = default;
+ Optional> countries = default;
+ Optional> registries = default;
+ Optional> sources = default;
+ Optional firstSeen = default;
+ Optional lastSeen = default;
+ Optional count = default;
+ Optional> registrarCreatedAt = default;
+ Optional> registrarUpdatedAt = default;
+ Optional> registrantContacts = default;
+ Optional> adminContacts = default;
+ Optional> technicalContacts = default;
+ Optional> registrarNames = default;
+ Optional> registrantNames = default;
+ Optional> adminNames = default;
+ Optional> technicalNames = default;
+ Optional> adminOrgs = default;
+ Optional> technicalOrgs = default;
+ Optional> registrantPhones = default;
+ Optional> adminPhones = default;
+ Optional> technicalPhones = default;
+ Optional detailedFromWhoisAt = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("asn"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ asn = property.Value.GetInt64();
+ continue;
+ }
+ if (property.NameEquals("asNames"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ array.Add(ObservedString.DeserializeObservedString(item));
+ }
+ asNames = array;
+ continue;
+ }
+ if (property.NameEquals("orgNames"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ array.Add(ObservedString.DeserializeObservedString(item));
+ }
+ orgNames = array;
+ continue;
+ }
+ if (property.NameEquals("orgIds"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ array.Add(ObservedString.DeserializeObservedString(item));
+ }
+ orgIds = array;
+ continue;
+ }
+ if (property.NameEquals("countries"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ array.Add(ObservedString.DeserializeObservedString(item));
+ }
+ countries = array;
+ continue;
+ }
+ if (property.NameEquals("registries"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ array.Add(ObservedString.DeserializeObservedString(item));
+ }
+ registries = array;
+ continue;
+ }
+ if (property.NameEquals("sources"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ array.Add(Source.DeserializeSource(item));
+ }
+ sources = array;
+ continue;
+ }
+ if (property.NameEquals("firstSeen"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ firstSeen = property.Value.GetDateTimeOffset("O");
+ continue;
+ }
+ if (property.NameEquals("lastSeen"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ lastSeen = property.Value.GetDateTimeOffset("O");
+ continue;
+ }
+ if (property.NameEquals("count"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ count = property.Value.GetInt64();
+ continue;
+ }
+ if (property.NameEquals("registrarCreatedAt"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ array.Add(ObservedLong.DeserializeObservedLong(item));
+ }
+ registrarCreatedAt = array;
+ continue;
+ }
+ if (property.NameEquals("registrarUpdatedAt"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ array.Add(ObservedLong.DeserializeObservedLong(item));
+ }
+ registrarUpdatedAt = array;
+ continue;
+ }
+ if (property.NameEquals("registrantContacts"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ array.Add(ObservedString.DeserializeObservedString(item));
+ }
+ registrantContacts = array;
+ continue;
+ }
+ if (property.NameEquals("adminContacts"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ array.Add(ObservedString.DeserializeObservedString(item));
+ }
+ adminContacts = array;
+ continue;
+ }
+ if (property.NameEquals("technicalContacts"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ array.Add(ObservedString.DeserializeObservedString(item));
+ }
+ technicalContacts = array;
+ continue;
+ }
+ if (property.NameEquals("registrarNames"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ array.Add(ObservedString.DeserializeObservedString(item));
+ }
+ registrarNames = array;
+ continue;
+ }
+ if (property.NameEquals("registrantNames"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ array.Add(ObservedString.DeserializeObservedString(item));
+ }
+ registrantNames = array;
+ continue;
+ }
+ if (property.NameEquals("adminNames"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ array.Add(ObservedString.DeserializeObservedString(item));
+ }
+ adminNames = array;
+ continue;
+ }
+ if (property.NameEquals("technicalNames"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ array.Add(ObservedString.DeserializeObservedString(item));
+ }
+ technicalNames = array;
+ continue;
+ }
+ if (property.NameEquals("adminOrgs"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ array.Add(ObservedString.DeserializeObservedString(item));
+ }
+ adminOrgs = array;
+ continue;
+ }
+ if (property.NameEquals("technicalOrgs"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ array.Add(ObservedString.DeserializeObservedString(item));
+ }
+ technicalOrgs = array;
+ continue;
+ }
+ if (property.NameEquals("registrantPhones"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ array.Add(ObservedString.DeserializeObservedString(item));
+ }
+ registrantPhones = array;
+ continue;
+ }
+ if (property.NameEquals("adminPhones"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ array.Add(ObservedString.DeserializeObservedString(item));
+ }
+ adminPhones = array;
+ continue;
+ }
+ if (property.NameEquals("technicalPhones"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ array.Add(ObservedString.DeserializeObservedString(item));
+ }
+ technicalPhones = array;
+ continue;
+ }
+ if (property.NameEquals("detailedFromWhoisAt"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ detailedFromWhoisAt = property.Value.GetDateTimeOffset("O");
+ continue;
+ }
+ }
+ return new AsAsset(Optional.ToNullable(asn), Optional.ToList(asNames), Optional.ToList(orgNames), Optional.ToList(orgIds), Optional.ToList(countries), Optional.ToList(registries), Optional.ToList(sources), Optional.ToNullable(firstSeen), Optional.ToNullable(lastSeen), Optional.ToNullable(count), Optional.ToList(registrarCreatedAt), Optional.ToList(registrarUpdatedAt), Optional.ToList(registrantContacts), Optional.ToList(adminContacts), Optional.ToList(technicalContacts), Optional.ToList(registrarNames), Optional.ToList(registrantNames), Optional.ToList(adminNames), Optional.ToList(technicalNames), Optional.ToList(adminOrgs), Optional.ToList(technicalOrgs), Optional.ToList(registrantPhones), Optional.ToList(adminPhones), Optional.ToList(technicalPhones), Optional.ToNullable(detailedFromWhoisAt));
+ }
+
+ /// Deserializes the model from a raw response.
+ /// The response to deserialize the model from.
+ internal static AsAsset FromResponse(Response response)
+ {
+ using var document = JsonDocument.Parse(response.Content);
+ return DeserializeAsAsset(document.RootElement);
+ }
+
+ /// Convert into a Utf8JsonRequestContent.
+ internal virtual RequestContent ToRequestContent()
+ {
+ var content = new Utf8JsonRequestContent();
+ content.JsonWriter.WriteObjectValue(this);
+ return content;
+ }
+ }
+}
diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AsAsset.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AsAsset.cs
new file mode 100644
index 000000000000..0c9d9492de53
--- /dev/null
+++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AsAsset.cs
@@ -0,0 +1,148 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using Azure.Core;
+
+namespace Azure.Analytics.Defender.Easm
+{
+ /// The AsAsset.
+ public partial class AsAsset : InventoryAsset
+ {
+ /// Initializes a new instance of AsAsset.
+ public AsAsset()
+ {
+ AsNames = new ChangeTrackingList();
+ OrgNames = new ChangeTrackingList();
+ OrgIds = new ChangeTrackingList();
+ Countries = new ChangeTrackingList();
+ Registries = new ChangeTrackingList();
+ Sources = new ChangeTrackingList();
+ RegistrarCreatedAt = new ChangeTrackingList();
+ RegistrarUpdatedAt = new ChangeTrackingList();
+ RegistrantContacts = new ChangeTrackingList();
+ AdminContacts = new ChangeTrackingList();
+ TechnicalContacts = new ChangeTrackingList();
+ RegistrarNames = new ChangeTrackingList();
+ RegistrantNames = new ChangeTrackingList();
+ AdminNames = new ChangeTrackingList();
+ TechnicalNames = new ChangeTrackingList();
+ AdminOrgs = new ChangeTrackingList();
+ TechnicalOrgs = new ChangeTrackingList();
+ RegistrantPhones = new ChangeTrackingList();
+ AdminPhones = new ChangeTrackingList();
+ TechnicalPhones = new ChangeTrackingList();
+ }
+
+ /// Initializes a new instance of AsAsset.
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ internal AsAsset(long? asn, IList asNames, IList orgNames, IList orgIds, IList countries, IList registries, IList sources, DateTimeOffset? firstSeen, DateTimeOffset? lastSeen, long? count, IList registrarCreatedAt, IList registrarUpdatedAt, IList registrantContacts, IList adminContacts, IList technicalContacts, IList registrarNames, IList registrantNames, IList adminNames, IList technicalNames, IList adminOrgs, IList technicalOrgs, IList registrantPhones, IList adminPhones, IList technicalPhones, DateTimeOffset? detailedFromWhoisAt)
+ {
+ Asn = asn;
+ AsNames = asNames;
+ OrgNames = orgNames;
+ OrgIds = orgIds;
+ Countries = countries;
+ Registries = registries;
+ Sources = sources;
+ FirstSeen = firstSeen;
+ LastSeen = lastSeen;
+ Count = count;
+ RegistrarCreatedAt = registrarCreatedAt;
+ RegistrarUpdatedAt = registrarUpdatedAt;
+ RegistrantContacts = registrantContacts;
+ AdminContacts = adminContacts;
+ TechnicalContacts = technicalContacts;
+ RegistrarNames = registrarNames;
+ RegistrantNames = registrantNames;
+ AdminNames = adminNames;
+ TechnicalNames = technicalNames;
+ AdminOrgs = adminOrgs;
+ TechnicalOrgs = technicalOrgs;
+ RegistrantPhones = registrantPhones;
+ AdminPhones = adminPhones;
+ TechnicalPhones = technicalPhones;
+ DetailedFromWhoisAt = detailedFromWhoisAt;
+ }
+
+ /// Gets or sets the asn.
+ public long? Asn { get; set; }
+ /// Gets the as names.
+ public IList AsNames { get; }
+ /// Gets the org names.
+ public IList OrgNames { get; }
+ /// Gets the org ids.
+ public IList OrgIds { get; }
+ /// Gets the countries.
+ public IList Countries { get; }
+ /// Gets the registries.
+ public IList Registries { get; }
+ /// Gets the sources.
+ public IList Sources { get; }
+ /// Gets or sets the first seen.
+ public DateTimeOffset? FirstSeen { get; set; }
+ /// Gets or sets the last seen.
+ public DateTimeOffset? LastSeen { get; set; }
+ /// Gets or sets the count.
+ public long? Count { get; set; }
+ /// Gets the registrar created at.
+ public IList RegistrarCreatedAt { get; }
+ /// Gets the registrar updated at.
+ public IList RegistrarUpdatedAt { get; }
+ /// Gets the registrant contacts.
+ public IList RegistrantContacts { get; }
+ /// Gets the admin contacts.
+ public IList AdminContacts { get; }
+ /// Gets the technical contacts.
+ public IList TechnicalContacts { get; }
+ /// Gets the registrar names.
+ public IList RegistrarNames { get; }
+ /// Gets the registrant names.
+ public IList RegistrantNames { get; }
+ /// Gets the admin names.
+ public IList AdminNames { get; }
+ /// Gets the technical names.
+ public IList TechnicalNames { get; }
+ /// Gets the admin orgs.
+ public IList AdminOrgs { get; }
+ /// Gets the technical orgs.
+ public IList TechnicalOrgs { get; }
+ /// Gets the registrant phones.
+ public IList RegistrantPhones { get; }
+ /// Gets the admin phones.
+ public IList AdminPhones { get; }
+ /// Gets the technical phones.
+ public IList TechnicalPhones { get; }
+ /// Gets or sets the detailed from whois at.
+ public DateTimeOffset? DetailedFromWhoisAt { get; set; }
+ }
+}
diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AsAssetResource.Serialization.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AsAssetResource.Serialization.cs
new file mode 100644
index 000000000000..82a77e128e74
--- /dev/null
+++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AsAssetResource.Serialization.cs
@@ -0,0 +1,254 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure;
+using Azure.Core;
+
+namespace Azure.Analytics.Defender.Easm
+{
+ public partial class AsAssetResource : IUtf8JsonSerializable
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
+ {
+ writer.WriteStartObject();
+ writer.WritePropertyName("asset"u8);
+ writer.WriteObjectValue(Asset);
+ writer.WritePropertyName("kind"u8);
+ writer.WriteStringValue(Kind);
+ if (Optional.IsDefined(Name))
+ {
+ writer.WritePropertyName("name"u8);
+ writer.WriteStringValue(Name);
+ }
+ if (Optional.IsDefined(DisplayName))
+ {
+ writer.WritePropertyName("displayName"u8);
+ writer.WriteStringValue(DisplayName);
+ }
+ if (Optional.IsDefined(Uuid))
+ {
+ writer.WritePropertyName("uuid"u8);
+ writer.WriteStringValue(Uuid.Value);
+ }
+ if (Optional.IsDefined(CreatedDate))
+ {
+ writer.WritePropertyName("createdDate"u8);
+ writer.WriteStringValue(CreatedDate.Value, "O");
+ }
+ if (Optional.IsDefined(UpdatedDate))
+ {
+ writer.WritePropertyName("updatedDate"u8);
+ writer.WriteStringValue(UpdatedDate.Value, "O");
+ }
+ if (Optional.IsDefined(State))
+ {
+ writer.WritePropertyName("state"u8);
+ writer.WriteStringValue(State.Value.ToString());
+ }
+ if (Optional.IsDefined(ExternalId))
+ {
+ writer.WritePropertyName("externalId"u8);
+ writer.WriteStringValue(ExternalId);
+ }
+ if (Optional.IsCollectionDefined(Labels))
+ {
+ writer.WritePropertyName("labels"u8);
+ writer.WriteStartArray();
+ foreach (var item in Labels)
+ {
+ writer.WriteStringValue(item);
+ }
+ writer.WriteEndArray();
+ }
+ if (Optional.IsDefined(Wildcard))
+ {
+ writer.WritePropertyName("wildcard"u8);
+ writer.WriteBooleanValue(Wildcard.Value);
+ }
+ if (Optional.IsDefined(DiscoGroupName))
+ {
+ writer.WritePropertyName("discoGroupName"u8);
+ writer.WriteStringValue(DiscoGroupName);
+ }
+ if (Optional.IsCollectionDefined(AuditTrail))
+ {
+ writer.WritePropertyName("auditTrail"u8);
+ writer.WriteStartArray();
+ foreach (var item in AuditTrail)
+ {
+ writer.WriteObjectValue(item);
+ }
+ writer.WriteEndArray();
+ }
+ if (Optional.IsDefined(Reason))
+ {
+ writer.WritePropertyName("reason"u8);
+ writer.WriteStringValue(Reason);
+ }
+ writer.WriteEndObject();
+ }
+
+ internal static AsAssetResource DeserializeAsAssetResource(JsonElement element)
+ {
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ AsAsset asset = default;
+ string kind = default;
+ string id = default;
+ Optional name = default;
+ Optional displayName = default;
+ Optional uuid = default;
+ Optional createdDate = default;
+ Optional updatedDate = default;
+ Optional state = default;
+ Optional externalId = default;
+ Optional> labels = default;
+ Optional wildcard = default;
+ Optional discoGroupName = default;
+ Optional> auditTrail = default;
+ Optional reason = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("asset"u8))
+ {
+ asset = AsAsset.DeserializeAsAsset(property.Value);
+ continue;
+ }
+ if (property.NameEquals("kind"u8))
+ {
+ kind = property.Value.GetString();
+ continue;
+ }
+ 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 (property.NameEquals("uuid"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ uuid = property.Value.GetGuid();
+ continue;
+ }
+ if (property.NameEquals("createdDate"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ createdDate = property.Value.GetDateTimeOffset("O");
+ continue;
+ }
+ if (property.NameEquals("updatedDate"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ updatedDate = property.Value.GetDateTimeOffset("O");
+ continue;
+ }
+ if (property.NameEquals("state"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ state = new AssetState(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("externalId"u8))
+ {
+ externalId = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("labels"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ array.Add(item.GetString());
+ }
+ labels = array;
+ continue;
+ }
+ if (property.NameEquals("wildcard"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ wildcard = property.Value.GetBoolean();
+ continue;
+ }
+ if (property.NameEquals("discoGroupName"u8))
+ {
+ discoGroupName = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("auditTrail"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ array.Add(AuditTrailItem.DeserializeAuditTrailItem(item));
+ }
+ auditTrail = array;
+ continue;
+ }
+ if (property.NameEquals("reason"u8))
+ {
+ reason = property.Value.GetString();
+ continue;
+ }
+ }
+ return new AsAssetResource(kind, id, name.Value, displayName.Value, Optional.ToNullable(uuid), Optional.ToNullable(createdDate), Optional.ToNullable(updatedDate), Optional.ToNullable(state), externalId.Value, Optional.ToList(labels), Optional.ToNullable(wildcard), discoGroupName.Value, Optional.ToList(auditTrail), reason.Value, asset);
+ }
+
+ /// Deserializes the model from a raw response.
+ /// The response to deserialize the model from.
+ internal static new AsAssetResource FromResponse(Response response)
+ {
+ using var document = JsonDocument.Parse(response.Content);
+ return DeserializeAsAssetResource(document.RootElement);
+ }
+
+ /// Convert into a Utf8JsonRequestContent.
+ internal override RequestContent ToRequestContent()
+ {
+ var content = new Utf8JsonRequestContent();
+ content.JsonWriter.WriteObjectValue(this);
+ return content;
+ }
+ }
+}
diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AsAssetResource.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AsAssetResource.cs
new file mode 100644
index 000000000000..2e8a78418e41
--- /dev/null
+++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AsAssetResource.cs
@@ -0,0 +1,52 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using Azure.Core;
+
+namespace Azure.Analytics.Defender.Easm
+{
+ /// The AsAssetResource.
+ public partial class AsAssetResource : AssetResource
+ {
+ /// Initializes a new instance of AsAssetResource.
+ /// asset.
+ /// is null.
+ public AsAssetResource(AsAsset asset)
+ {
+ Argument.AssertNotNull(asset, nameof(asset));
+
+ Kind = "as";
+ Asset = asset;
+ }
+
+ /// Initializes a new instance of AsAssetResource.
+ /// Discriminator.
+ /// 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.
+ /// Global UUID for the asset.
+ /// The date this asset was first added to this workspace.
+ /// The date this asset was last updated for this workspace.
+ ///
+ /// An optional customer provided identifier for this asset.
+ /// Customer labels assigned to this asset.
+ /// An indicator of whether this asset represents a wildcard rollup of assets on this domain.
+ /// The name of the DiscoGroup that brought added this asset to the workspace.
+ /// The history of how this asset was pulled into the workspace through the discovery process.
+ ///
+ /// asset.
+ internal AsAssetResource(string kind, string id, string name, string displayName, Guid? uuid, DateTimeOffset? createdDate, DateTimeOffset? updatedDate, AssetState? state, string externalId, IList labels, bool? wildcard, string discoGroupName, IList auditTrail, string reason, AsAsset asset) : base(kind, id, name, displayName, uuid, createdDate, updatedDate, state, externalId, labels, wildcard, discoGroupName, auditTrail, reason)
+ {
+ Asset = asset;
+ }
+
+ /// asset.
+ public AsAsset Asset { get; set; }
+ }
+}
diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AssetPageResult.Serialization.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AssetPageResult.Serialization.cs
new file mode 100644
index 000000000000..b35ea3926455
--- /dev/null
+++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AssetPageResult.Serialization.cs
@@ -0,0 +1,74 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure;
+using Azure.Core;
+
+namespace Azure.Analytics.Defender.Easm
+{
+ public partial class AssetPageResult
+ {
+ internal static AssetPageResult DeserializeAssetPageResult(JsonElement element)
+ {
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ Optional totalElements = default;
+ Optional mark = default;
+ Optional nextLink = default;
+ Optional> value = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("totalElements"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ totalElements = property.Value.GetInt64();
+ continue;
+ }
+ if (property.NameEquals("mark"u8))
+ {
+ mark = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("nextLink"u8))
+ {
+ nextLink = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("value"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ array.Add(AssetResource.DeserializeAssetResource(item));
+ }
+ value = array;
+ continue;
+ }
+ }
+ return new AssetPageResult(Optional.ToNullable(totalElements), mark.Value, nextLink.Value, Optional.ToList(value));
+ }
+
+ /// Deserializes the model from a raw response.
+ /// The response to deserialize the model from.
+ internal static AssetPageResult FromResponse(Response response)
+ {
+ using var document = JsonDocument.Parse(response.Content);
+ return DeserializeAssetPageResult(document.RootElement);
+ }
+ }
+}
diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AssetPageResult.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AssetPageResult.cs
new file mode 100644
index 000000000000..758867148943
--- /dev/null
+++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AssetPageResult.cs
@@ -0,0 +1,48 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Collections.Generic;
+using Azure.Core;
+
+namespace Azure.Analytics.Defender.Easm
+{
+ /// The page of assets that match the provided metric.
+ public partial class AssetPageResult
+ {
+ /// Initializes a new instance of AssetPageResult.
+ internal AssetPageResult()
+ {
+ Value = new ChangeTrackingList();
+ }
+
+ /// Initializes a new instance of AssetPageResult.
+ /// The total number of items available in the full result set.
+ /// The cursor mark to be used on the next request. Not set if using paging.
+ /// The link to access the next page of results. Not set if at the end of the result set.
+ /// The items in the current page of results.
+ internal AssetPageResult(long? totalElements, string mark, string nextLink, IReadOnlyList value)
+ {
+ TotalElements = totalElements;
+ Mark = mark;
+ NextLink = nextLink;
+ Value = value;
+ }
+
+ /// The total number of items available in the full result set.
+ public long? TotalElements { get; }
+ /// The cursor mark to be used on the next request. Not set if using paging.
+ public string Mark { get; }
+ /// The link to access the next page of results. Not set if at the end of the result set.
+ public string NextLink { get; }
+ ///
+ /// The items in the current page of results.
+ /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
+ /// The available derived classes include , , , , , , and .
+ ///
+ public IReadOnlyList Value { get; }
+ }
+}
diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AssetResource.Serialization.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AssetResource.Serialization.cs
new file mode 100644
index 000000000000..b87a5bdc3f7e
--- /dev/null
+++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AssetResource.Serialization.cs
@@ -0,0 +1,133 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Text.Json;
+using Azure;
+using Azure.Core;
+
+namespace Azure.Analytics.Defender.Easm
+{
+ public partial class AssetResource : IUtf8JsonSerializable
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
+ {
+ writer.WriteStartObject();
+ writer.WritePropertyName("kind"u8);
+ writer.WriteStringValue(Kind);
+ if (Optional.IsDefined(Name))
+ {
+ writer.WritePropertyName("name"u8);
+ writer.WriteStringValue(Name);
+ }
+ if (Optional.IsDefined(DisplayName))
+ {
+ writer.WritePropertyName("displayName"u8);
+ writer.WriteStringValue(DisplayName);
+ }
+ if (Optional.IsDefined(Uuid))
+ {
+ writer.WritePropertyName("uuid"u8);
+ writer.WriteStringValue(Uuid.Value);
+ }
+ if (Optional.IsDefined(CreatedDate))
+ {
+ writer.WritePropertyName("createdDate"u8);
+ writer.WriteStringValue(CreatedDate.Value, "O");
+ }
+ if (Optional.IsDefined(UpdatedDate))
+ {
+ writer.WritePropertyName("updatedDate"u8);
+ writer.WriteStringValue(UpdatedDate.Value, "O");
+ }
+ if (Optional.IsDefined(State))
+ {
+ writer.WritePropertyName("state"u8);
+ writer.WriteStringValue(State.Value.ToString());
+ }
+ if (Optional.IsDefined(ExternalId))
+ {
+ writer.WritePropertyName("externalId"u8);
+ writer.WriteStringValue(ExternalId);
+ }
+ if (Optional.IsCollectionDefined(Labels))
+ {
+ writer.WritePropertyName("labels"u8);
+ writer.WriteStartArray();
+ foreach (var item in Labels)
+ {
+ writer.WriteStringValue(item);
+ }
+ writer.WriteEndArray();
+ }
+ if (Optional.IsDefined(Wildcard))
+ {
+ writer.WritePropertyName("wildcard"u8);
+ writer.WriteBooleanValue(Wildcard.Value);
+ }
+ if (Optional.IsDefined(DiscoGroupName))
+ {
+ writer.WritePropertyName("discoGroupName"u8);
+ writer.WriteStringValue(DiscoGroupName);
+ }
+ if (Optional.IsCollectionDefined(AuditTrail))
+ {
+ writer.WritePropertyName("auditTrail"u8);
+ writer.WriteStartArray();
+ foreach (var item in AuditTrail)
+ {
+ writer.WriteObjectValue(item);
+ }
+ writer.WriteEndArray();
+ }
+ if (Optional.IsDefined(Reason))
+ {
+ writer.WritePropertyName("reason"u8);
+ writer.WriteStringValue(Reason);
+ }
+ writer.WriteEndObject();
+ }
+
+ internal static AssetResource DeserializeAssetResource(JsonElement element)
+ {
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ if (element.TryGetProperty("kind", out JsonElement discriminator))
+ {
+ switch (discriminator.GetString())
+ {
+ case "as": return AsAssetResource.DeserializeAsAssetResource(element);
+ case "contact": return ContactAssetResource.DeserializeContactAssetResource(element);
+ case "domain": return DomainAssetResource.DeserializeDomainAssetResource(element);
+ case "host": return HostAssetResource.DeserializeHostAssetResource(element);
+ case "ipAddress": return IpAddressAssetResource.DeserializeIpAddressAssetResource(element);
+ case "ipBlock": return IpBlockAssetResource.DeserializeIpBlockAssetResource(element);
+ case "page": return PageAssetResource.DeserializePageAssetResource(element);
+ case "sslCert": return SslCertAssetResource.DeserializeSslCertAssetResource(element);
+ }
+ }
+ return UnknownAssetResource.DeserializeUnknownAssetResource(element);
+ }
+
+ /// Deserializes the model from a raw response.
+ /// The response to deserialize the model from.
+ internal static AssetResource FromResponse(Response response)
+ {
+ using var document = JsonDocument.Parse(response.Content);
+ return DeserializeAssetResource(document.RootElement);
+ }
+
+ /// Convert into a Utf8JsonRequestContent.
+ internal virtual RequestContent ToRequestContent()
+ {
+ var content = new Utf8JsonRequestContent();
+ content.JsonWriter.WriteObjectValue(this);
+ return content;
+ }
+ }
+}
diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AssetResource.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AssetResource.cs
new file mode 100644
index 000000000000..e0ffceeeceea
--- /dev/null
+++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AssetResource.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;
+using Azure.Core;
+
+namespace Azure.Analytics.Defender.Easm
+{
+ ///
+ /// The items in the current page of results.
+ /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
+ /// The available derived classes include , , , , , , and .
+ ///
+ public abstract partial class AssetResource
+ {
+ /// Initializes a new instance of AssetResource.
+ protected AssetResource()
+ {
+ Labels = new ChangeTrackingList();
+ AuditTrail = new ChangeTrackingList();
+ }
+
+ /// Initializes a new instance of AssetResource.
+ /// Discriminator.
+ /// 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.
+ /// Global UUID for the asset.
+ /// The date this asset was first added to this workspace.
+ /// The date this asset was last updated for this workspace.
+ ///
+ /// An optional customer provided identifier for this asset.
+ /// Customer labels assigned to this asset.
+ /// An indicator of whether this asset represents a wildcard rollup of assets on this domain.
+ /// The name of the DiscoGroup that brought added this asset to the workspace.
+ /// The history of how this asset was pulled into the workspace through the discovery process.
+ ///
+ internal AssetResource(string kind, string id, string name, string displayName, Guid? uuid, DateTimeOffset? createdDate, DateTimeOffset? updatedDate, AssetState? state, string externalId, IList labels, bool? wildcard, string discoGroupName, IList auditTrail, string reason)
+ {
+ Kind = kind;
+ Id = id;
+ Name = name;
+ DisplayName = displayName;
+ Uuid = uuid;
+ CreatedDate = createdDate;
+ UpdatedDate = updatedDate;
+ State = state;
+ ExternalId = externalId;
+ Labels = labels;
+ Wildcard = wildcard;
+ DiscoGroupName = discoGroupName;
+ AuditTrail = auditTrail;
+ Reason = reason;
+ }
+
+ /// Discriminator.
+ internal string Kind { get; set; }
+ /// The system generated unique id for the resource.
+ public string Id { get; }
+ /// The caller provided unique name for the resource.
+ public string Name { get; set; }
+ /// The name that can be used for display purposes.
+ public string DisplayName { get; set; }
+ /// Global UUID for the asset.
+ public Guid? Uuid { get; set; }
+ /// The date this asset was first added to this workspace.
+ public DateTimeOffset? CreatedDate { get; set; }
+ /// The date this asset was last updated for this workspace.
+ public DateTimeOffset? UpdatedDate { get; set; }
+ /// Gets or sets the state.
+ public AssetState? State { get; set; }
+ /// An optional customer provided identifier for this asset.
+ public string ExternalId { get; set; }
+ /// Customer labels assigned to this asset.
+ public IList Labels { get; }
+ /// An indicator of whether this asset represents a wildcard rollup of assets on this domain.
+ public bool? Wildcard { get; set; }
+ /// The name of the DiscoGroup that brought added this asset to the workspace.
+ public string DiscoGroupName { get; set; }
+ /// The history of how this asset was pulled into the workspace through the discovery process.
+ public IList AuditTrail { get; }
+ /// Gets or sets the reason.
+ public string Reason { get; set; }
+ }
+}
diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AssetSecurityPolicy.Serialization.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AssetSecurityPolicy.Serialization.cs
new file mode 100644
index 000000000000..b6f6d47918ed
--- /dev/null
+++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/AssetSecurityPolicy.Serialization.cs
@@ -0,0 +1,174 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure;
+using Azure.Core;
+
+namespace Azure.Analytics.Defender.Easm
+{
+ public partial class AssetSecurityPolicy : IUtf8JsonSerializable
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
+ {
+ writer.WriteStartObject();
+ if (Optional.IsDefined(PolicyName))
+ {
+ writer.WritePropertyName("policyName"u8);
+ writer.WriteStringValue(PolicyName);
+ }
+ if (Optional.IsDefined(IsAffected))
+ {
+ writer.WritePropertyName("isAffected"u8);
+ writer.WriteBooleanValue(IsAffected.Value);
+ }
+ if (Optional.IsDefined(Description))
+ {
+ writer.WritePropertyName("description"u8);
+ writer.WriteStringValue(Description);
+ }
+ if (Optional.IsDefined(FirstSeen))
+ {
+ writer.WritePropertyName("firstSeen"u8);
+ writer.WriteStringValue(FirstSeen.Value, "O");
+ }
+ if (Optional.IsDefined(LastSeen))
+ {
+ writer.WritePropertyName("lastSeen"u8);
+ writer.WriteStringValue(LastSeen.Value, "O");
+ }
+ if (Optional.IsDefined(Count))
+ {
+ writer.WritePropertyName("count"u8);
+ writer.WriteNumberValue(Count.Value);
+ }
+ if (Optional.IsDefined(Recent))
+ {
+ writer.WritePropertyName("recent"u8);
+ writer.WriteBooleanValue(Recent.Value);
+ }
+ if (Optional.IsCollectionDefined(Sources))
+ {
+ writer.WritePropertyName("sources"u8);
+ writer.WriteStartArray();
+ foreach (var item in Sources)
+ {
+ writer.WriteObjectValue(item);
+ }
+ writer.WriteEndArray();
+ }
+ writer.WriteEndObject();
+ }
+
+ internal static AssetSecurityPolicy DeserializeAssetSecurityPolicy(JsonElement element)
+ {
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ Optional policyName = default;
+ Optional isAffected = default;
+ Optional description = default;
+ Optional firstSeen = default;
+ Optional lastSeen = default;
+ Optional count = default;
+ Optional recent = default;
+ Optional> sources = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("policyName"u8))
+ {
+ policyName = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("isAffected"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ isAffected = property.Value.GetBoolean();
+ continue;
+ }
+ if (property.NameEquals("description"u8))
+ {
+ description = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("firstSeen"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ firstSeen = property.Value.GetDateTimeOffset("O");
+ continue;
+ }
+ if (property.NameEquals("lastSeen"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ lastSeen = property.Value.GetDateTimeOffset("O");
+ continue;
+ }
+ if (property.NameEquals("count"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ count = property.Value.GetInt64();
+ continue;
+ }
+ if (property.NameEquals("recent"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ recent = property.Value.GetBoolean();
+ continue;
+ }
+ if (property.NameEquals("sources"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List