generated/api/Models/ActiveDirectoryType1.cs

// Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.9.4, generator: @autorest/powershell@3.0.415)
// Changes may cause incorrect behavior and will be lost if the code is regenerated.

namespace Commvault.Powershell.Models
{
    using static Commvault.Powershell.Runtime.Extensions;

    /// <summary>Model to create new LDAP identity servers for active directory type</summary>
    public partial class ActiveDirectoryType1 :
        Commvault.Powershell.Models.IActiveDirectoryType1,
        Commvault.Powershell.Models.IActiveDirectoryType1Internal,
        Commvault.Powershell.Runtime.IValidates
    {
        /// <summary>
        /// Backing field for Inherited model <see cref= "Commvault.Powershell.Models.ILdapRequest" />
        /// </summary>
        private Commvault.Powershell.Models.ILdapRequest __ldapRequest = new Commvault.Powershell.Models.LdapRequest();

        /// <summary>Denotes if the domain is accessed via a proxy</summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Inherited)]
        public bool? AccessViaClient { get => ((Commvault.Powershell.Models.ILdapRequestInternal)__ldapRequest).AccessViaClient; set => ((Commvault.Powershell.Models.ILdapRequestInternal)__ldapRequest).AccessViaClient = value; }

        /// <summary>Internal Acessors for DirectoryType</summary>
        string Commvault.Powershell.Models.IActiveDirectoryType1Internal.DirectoryType { get => this._directoryType; set { {_directoryType = value;} } }

        /// <summary>Internal Acessors for GlobalConfigInfo</summary>
        Commvault.Powershell.Models.ICreateGlobalConfigInfo Commvault.Powershell.Models.IActiveDirectoryType1Internal.GlobalConfigInfo { get => (this._globalConfigInfo = this._globalConfigInfo ?? new Commvault.Powershell.Models.CreateGlobalConfigInfo()); set { {_globalConfigInfo = value;} } }

        /// <summary>Backing field for <see cref="DirectoryType" /> property.</summary>
        private string _directoryType= @"ACTIVE_DIRECTORY";

        /// <summary>Active directory type</summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Owned)]
        public string DirectoryType { get => this._directoryType; }

        /// <summary>
        /// If true, the NetBIOS name will not be validated. Providing a custom name without validation may cause problems during
        /// Single Sign-On.
        /// </summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Inherited)]
        public bool? DoNotValidateNetBiosName { get => ((Commvault.Powershell.Models.ILdapRequestInternal)__ldapRequest).DoNotValidateNetBiosName; set => ((Commvault.Powershell.Models.ILdapRequestInternal)__ldapRequest).DoNotValidateNetBiosName = value; }

        /// <summary>Backing field for <see cref="EnableSso" /> property.</summary>
        private bool? _enableSso;

        /// <summary>Boolean to indicate if the app use enable SSO</summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Owned)]
        public bool? EnableSso { get => this._enableSso; set => this._enableSso = value; }

        /// <summary>Backing field for <see cref="GlobalConfigInfo" /> property.</summary>
        private Commvault.Powershell.Models.ICreateGlobalConfigInfo _globalConfigInfo;

        /// <summary>Only applicable to Global CommCells</summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Owned)]
        internal Commvault.Powershell.Models.ICreateGlobalConfigInfo GlobalConfigInfo { get => (this._globalConfigInfo = this._globalConfigInfo ?? new Commvault.Powershell.Models.CreateGlobalConfigInfo()); set => this._globalConfigInfo = value; }

        /// <summary>
        /// Action that will be taken on the local entity that has the same name as the global entity that needs to be created
        /// </summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Inlined)]
        public string GlobalConfigInfoActionOnLocalEntity { get => ((Commvault.Powershell.Models.ICreateGlobalConfigInfoInternal)GlobalConfigInfo).ActionOnLocalEntity; set => ((Commvault.Powershell.Models.ICreateGlobalConfigInfoInternal)GlobalConfigInfo).ActionOnLocalEntity = value ?? null; }

        /// <summary>
        /// Decides whether the global configuration should be applied to all the Service commcells, including the newly created ones
        /// </summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Inlined)]
        public bool? GlobalConfigInfoApplyOnAllCommCells { get => ((Commvault.Powershell.Models.ICreateGlobalConfigInfoInternal)GlobalConfigInfo).ApplyOnAllCommCells; set => ((Commvault.Powershell.Models.ICreateGlobalConfigInfoInternal)GlobalConfigInfo).ApplyOnAllCommCells = value ?? default(bool); }

        /// <summary>List of Service CommCells where the global configuration should be applied</summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Inlined)]
        public Commvault.Powershell.Models.IGlobalConfigCommcellInfo[] GlobalConfigInfoCommcells { get => ((Commvault.Powershell.Models.ICreateGlobalConfigInfoInternal)GlobalConfigInfo).Commcells; set => ((Commvault.Powershell.Models.ICreateGlobalConfigInfoInternal)GlobalConfigInfo).Commcells = value ?? null /* arrayOf */; }

        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Inlined)]
        public string GlobalConfigInfoName { get => ((Commvault.Powershell.Models.ICreateGlobalConfigInfoInternal)GlobalConfigInfo).Name; set => ((Commvault.Powershell.Models.ICreateGlobalConfigInfoInternal)GlobalConfigInfo).Name = value ?? null; }

        /// <summary>The entity level at which the config has to be applied.</summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Inlined)]
        public string GlobalConfigInfoScope { get => ((Commvault.Powershell.Models.ICreateGlobalConfigInfoInternal)GlobalConfigInfo).Scope; set => ((Commvault.Powershell.Models.ICreateGlobalConfigInfoInternal)GlobalConfigInfo).Scope = value ?? null; }

        /// <summary>CommCellEntityCache filter query string using for filtering the scope</summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Inlined)]
        public string GlobalConfigInfoScopeFilterQuery { get => ((Commvault.Powershell.Models.ICreateGlobalConfigInfoInternal)GlobalConfigInfo).ScopeFilterQuery; set => ((Commvault.Powershell.Models.ICreateGlobalConfigInfoInternal)GlobalConfigInfo).ScopeFilterQuery = value ?? null; }

        /// <summary>Required when configuring an existing dummy domain as LDAP/AD</summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Inherited)]
        public long? Id { get => ((Commvault.Powershell.Models.ILdapRequestInternal)__ldapRequest).Id; set => ((Commvault.Powershell.Models.ILdapRequestInternal)__ldapRequest).Id = value; }

        /// <summary>Backing field for <see cref="Name" /> property.</summary>
        private string _name;

        /// <summary>Domain connect name</summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Owned)]
        public string Name { get => this._name; set => this._name = value; }

        /// <summary>Backing field for <see cref="NetbiosName" /> property.</summary>
        private string _netbiosName;

        /// <summary>Domain name (short name) to create LDAP app</summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Owned)]
        public string NetbiosName { get => this._netbiosName; set => this._netbiosName = value; }

        /// <summary>Password to create LDAP app, it should be base64 encoded</summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Inherited)]
        public string Password { get => ((Commvault.Powershell.Models.ILdapRequestInternal)__ldapRequest).Password; set => ((Commvault.Powershell.Models.ILdapRequestInternal)__ldapRequest).Password = value; }

        /// <summary>
        /// List of proxies used to connect to the domain. Required if accessViaClient is true.
        /// </summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Inherited)]
        public Commvault.Powershell.Models.IIdName[] Proxies { get => ((Commvault.Powershell.Models.ILdapRequestInternal)__ldapRequest).Proxies; set => ((Commvault.Powershell.Models.ILdapRequestInternal)__ldapRequest).Proxies = value; }

        /// <summary>Backing field for <see cref="UseSecureLdap" /> property.</summary>
        private bool? _useSecureLdap;

        /// <summary>Boolean to indicate if the app use secure LDAP</summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Owned)]
        public bool? UseSecureLdap { get => this._useSecureLdap; set => this._useSecureLdap = value; }

        /// <summary>Username to create LDAP/AD app</summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Inherited)]
        public string Username { get => ((Commvault.Powershell.Models.ILdapRequestInternal)__ldapRequest).Username; set => ((Commvault.Powershell.Models.ILdapRequestInternal)__ldapRequest).Username = value; }

        /// <summary>Creates an new <see cref="ActiveDirectoryType1" /> instance.</summary>
        public ActiveDirectoryType1()
        {

        }

        /// <summary>Validates that this object meets the validation criteria.</summary>
        /// <param name="eventListener">an <see cref="Commvault.Powershell.Runtime.IEventListener" /> instance that will receive validation
        /// events.</param>
        /// <returns>
        /// A < see cref = "global::System.Threading.Tasks.Task" /> that will be complete when validation is completed.
        /// </returns>
        public async global::System.Threading.Tasks.Task Validate(Commvault.Powershell.Runtime.IEventListener eventListener)
        {
            await eventListener.AssertNotNull(nameof(__ldapRequest), __ldapRequest);
            await eventListener.AssertObjectIsValid(nameof(__ldapRequest), __ldapRequest);
        }
    }
    /// Model to create new LDAP identity servers for active directory type
    public partial interface IActiveDirectoryType1 :
        Commvault.Powershell.Runtime.IJsonSerializable,
        Commvault.Powershell.Models.ILdapRequest
    {
        /// <summary>Active directory type</summary>
        [Commvault.Powershell.Runtime.Info(
        Required = true,
        ReadOnly = true,
        Description = @"Active directory type",
        SerializedName = @"directoryType",
        PossibleTypes = new [] { typeof(string) })]
        string DirectoryType { get; }
        /// <summary>Boolean to indicate if the app use enable SSO</summary>
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"Boolean to indicate if the app use enable SSO",
        SerializedName = @"enableSSO",
        PossibleTypes = new [] { typeof(bool) })]
        bool? EnableSso { get; set; }
        /// <summary>
        /// Action that will be taken on the local entity that has the same name as the global entity that needs to be created
        /// </summary>
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"Action that will be taken on the local entity that has the same name as the global entity that needs to be created",
        SerializedName = @"actionOnLocalEntity",
        PossibleTypes = new [] { typeof(string) })]
        string GlobalConfigInfoActionOnLocalEntity { get; set; }
        /// <summary>
        /// Decides whether the global configuration should be applied to all the Service commcells, including the newly created ones
        /// </summary>
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"Decides whether the global configuration should be applied to all the Service commcells, including the newly created ones",
        SerializedName = @"applyOnAllCommCells",
        PossibleTypes = new [] { typeof(bool) })]
        bool? GlobalConfigInfoApplyOnAllCommCells { get; set; }
        /// <summary>List of Service CommCells where the global configuration should be applied</summary>
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"List of Service CommCells where the global configuration should be applied",
        SerializedName = @"commcells",
        PossibleTypes = new [] { typeof(Commvault.Powershell.Models.IGlobalConfigCommcellInfo) })]
        Commvault.Powershell.Models.IGlobalConfigCommcellInfo[] GlobalConfigInfoCommcells { get; set; }

        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"",
        SerializedName = @"name",
        PossibleTypes = new [] { typeof(string) })]
        string GlobalConfigInfoName { get; set; }
        /// <summary>The entity level at which the config has to be applied.</summary>
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"The entity level at which the config has to be applied.",
        SerializedName = @"scope",
        PossibleTypes = new [] { typeof(string) })]
        string GlobalConfigInfoScope { get; set; }
        /// <summary>CommCellEntityCache filter query string using for filtering the scope</summary>
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"CommCellEntityCache filter query string using for filtering the scope",
        SerializedName = @"scopeFilterQuery",
        PossibleTypes = new [] { typeof(string) })]
        string GlobalConfigInfoScopeFilterQuery { get; set; }
        /// <summary>Domain connect name</summary>
        [Commvault.Powershell.Runtime.Info(
        Required = true,
        ReadOnly = false,
        Description = @"Domain connect name",
        SerializedName = @"name",
        PossibleTypes = new [] { typeof(string) })]
        string Name { get; set; }
        /// <summary>Domain name (short name) to create LDAP app</summary>
        [Commvault.Powershell.Runtime.Info(
        Required = true,
        ReadOnly = false,
        Description = @"Domain name (short name) to create LDAP app",
        SerializedName = @"NETBIOSName",
        PossibleTypes = new [] { typeof(string) })]
        string NetbiosName { get; set; }
        /// <summary>Boolean to indicate if the app use secure LDAP</summary>
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"Boolean to indicate if the app use secure LDAP",
        SerializedName = @"useSecureLDAP",
        PossibleTypes = new [] { typeof(bool) })]
        bool? UseSecureLdap { get; set; }

    }
    /// Model to create new LDAP identity servers for active directory type
    internal partial interface IActiveDirectoryType1Internal :
        Commvault.Powershell.Models.ILdapRequestInternal
    {
        /// <summary>Active directory type</summary>
        string DirectoryType { get; set; }
        /// <summary>Boolean to indicate if the app use enable SSO</summary>
        bool? EnableSso { get; set; }
        /// <summary>Only applicable to Global CommCells</summary>
        Commvault.Powershell.Models.ICreateGlobalConfigInfo GlobalConfigInfo { get; set; }
        /// <summary>
        /// Action that will be taken on the local entity that has the same name as the global entity that needs to be created
        /// </summary>
        string GlobalConfigInfoActionOnLocalEntity { get; set; }
        /// <summary>
        /// Decides whether the global configuration should be applied to all the Service commcells, including the newly created ones
        /// </summary>
        bool? GlobalConfigInfoApplyOnAllCommCells { get; set; }
        /// <summary>List of Service CommCells where the global configuration should be applied</summary>
        Commvault.Powershell.Models.IGlobalConfigCommcellInfo[] GlobalConfigInfoCommcells { get; set; }

        string GlobalConfigInfoName { get; set; }
        /// <summary>The entity level at which the config has to be applied.</summary>
        string GlobalConfigInfoScope { get; set; }
        /// <summary>CommCellEntityCache filter query string using for filtering the scope</summary>
        string GlobalConfigInfoScopeFilterQuery { get; set; }
        /// <summary>Domain connect name</summary>
        string Name { get; set; }
        /// <summary>Domain name (short name) to create LDAP app</summary>
        string NetbiosName { get; set; }
        /// <summary>Boolean to indicate if the app use secure LDAP</summary>
        bool? UseSecureLdap { get; set; }

    }
}