/* Code generated by Azure.Iot.Operations.ProtocolCompilerLib v1.0.0.0; DO NOT EDIT. */

#nullable enable

using System;
using System.Collections.Generic;
using System.Text.Json.Serialization;
using Azure.Iot.Operations.Services.EdgeRegistry.Generated.Common;

namespace Azure.Iot.Operations.Services.EdgeRegistry.Generated
{
    /// <summary>
    /// Request payload for listing xRegistry Resources, optionally filtered by Group type, Group, Resource type, and/or label.
    /// </summary>
    [System.CodeDom.Compiler.GeneratedCode("Azure.Iot.Operations.ProtocolCompilerLib", "1.0.0.0")]
    public partial class ListResourcesRequestPayload
    {
        /// <summary>
        /// Group type. If not specified, Resources are listed across all Group types; in that case groupId must be specified explicitly or allGroups must be true, because the default Group only exists within a specific Group type.
        /// </summary>
        [JsonPropertyName("groupType")]
        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
        public string? GroupType { get; set; } = default;

        /// <summary>
        /// Group identifier. Ignored if allGroups is true. If not specified, the default Group of the specified groupType is used; this default is only valid when groupType is specified, so groupId must be provided when groupType is not.
        /// </summary>
        [JsonPropertyName("groupId")]
        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
        public string? GroupId { get; set; } = default;

        /// <summary>
        /// If true, lists Resources across all Groups (groupId is ignored). If false, lists within the Group specified by groupId, or — only when groupType is specified — the default Group of that type if groupId is unspecified.
        /// </summary>
        [JsonPropertyName("allGroups")]
        [JsonIgnore(Condition = JsonIgnoreCondition.Never)]
        [JsonRequired]
        public bool AllGroups { get; set; } = default!;

        /// <summary>
        /// Resource type. If specified, only Resources of this type are listed; when listing across all Groups, Resources of this type are matched across all Groups. Lists Resources across all Resource types if not specified.
        /// </summary>
        [JsonPropertyName("resourceType")]
        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
        public string? ResourceType { get; set; } = default;

        /// <summary>
        /// If specified, only Resources with this label are listed.
        /// </summary>
        [JsonPropertyName("label")]
        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
        public Label? Label { get; set; } = default;

    }
}
