// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using System.Text.Json.Serialization;
namespace Microsoft.Teams.Apps.Schema.Entities;
///
/// Represents an entity that describes the usage of sensitive content, including its name, description, and associated
/// pattern.
///
public class SensitiveUsageEntity : OMessageEntity
{
///
/// Creates a new instance of .
///
public SensitiveUsageEntity() : base() => OType = "CreativeWork";
///
/// Gets or sets the name of the sensitive usage.
///
[JsonPropertyName("name")]
public required string Name
{
get => base.Properties.TryGetValue("name", out object? value) ? value?.ToString() ?? string.Empty : string.Empty;
set => base.Properties["name"] = value;
}
///
/// Gets or sets the description of the sensitive usage.
///
[JsonPropertyName("description")]
public string? Description
{
get => base.Properties.TryGetValue("description", out object? value) ? value?.ToString() : null;
set => base.Properties["description"] = value;
}
///
/// Gets or sets the pattern associated with the sensitive usage.
///
[JsonPropertyName("pattern")]
public DefinedTerm? Pattern
{
get => base.Properties.Get("pattern");
set => base.Properties["pattern"] = value;
}
}
///
/// Defined term.
///
public class DefinedTerm
{
///
/// Type of the defined term.
///
[JsonPropertyName("@type")] public string Type { get; set; } = "DefinedTerm";
///
/// OData type of the defined term.
///
[JsonPropertyName("inDefinedTermSet")] public required string InDefinedTermSet { get; set; }
///
/// Gets or sets the name associated with the object.
///
[JsonPropertyName("name")] public required string Name { get; set; }
///
/// Gets or sets the code that identifies the academic term.
///
[JsonPropertyName("termCode")] public required string TermCode { get; set; }
}