generated/api/Models/CreateTeamsClient.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>Request Message for teams app creation</summary>
    public partial class CreateTeamsClient :
        Commvault.Powershell.Models.ICreateTeamsClient,
        Commvault.Powershell.Models.ICreateTeamsClientInternal
    {

        /// <summary>Backing field for <see cref="AzureApp" /> property.</summary>
        private Commvault.Powershell.Models.ITeamsConnectionsSettings _azureApp;

        /// <summary>TeamsConnectionsSettings</summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Owned)]
        internal Commvault.Powershell.Models.ITeamsConnectionsSettings AzureApp { get => (this._azureApp = this._azureApp ?? new Commvault.Powershell.Models.TeamsConnectionsSettings()); set => this._azureApp = value; }

        /// <summary>Azure Application ID</summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Inlined)]
        public string AzureAppApplicationId { get => ((Commvault.Powershell.Models.IAzureAdAppInternal)AzureApp).ApplicationId; set => ((Commvault.Powershell.Models.IAzureAdAppInternal)AzureApp).ApplicationId = value ; }

        /// <summary>Azure app secret key, needs to be base64 encoded</summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Inlined)]
        public string AzureAppApplicationSecret { get => ((Commvault.Powershell.Models.IAzureAdAppInternal)AzureApp).ApplicationSecret; set => ((Commvault.Powershell.Models.IAzureAdAppInternal)AzureApp).ApplicationSecret = value ; }

        /// <summary>Azure directory (tenant) ID</summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Inlined)]
        public string AzureAppAzureDirectoryId { get => ((Commvault.Powershell.Models.ITeamsConnectionsSettingsInternal)AzureApp).AzureDirectoryId; set => ((Commvault.Powershell.Models.ITeamsConnectionsSettingsInternal)AzureApp).AzureDirectoryId = value ; }

        /// <summary>
        /// User based refresh token generated with corresponding app credentials. Can be left blank if the azure app is protected
        /// API approved.
        /// </summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Inlined)]
        public string AzureAppRefreshToken { get => ((Commvault.Powershell.Models.IAzureAdAppTokenInternal)AzureApp).RefreshToken; set => ((Commvault.Powershell.Models.IAzureAdAppTokenInternal)AzureApp).RefreshToken = value ?? null; }

        /// <summary>Internal Acessors for AzureApp</summary>
        Commvault.Powershell.Models.ITeamsConnectionsSettings Commvault.Powershell.Models.ICreateTeamsClientInternal.AzureApp { get => (this._azureApp = this._azureApp ?? new Commvault.Powershell.Models.TeamsConnectionsSettings()); set { {_azureApp = value;} } }

        /// <summary>Internal Acessors for ServerPlan</summary>
        Commvault.Powershell.Models.IIdName Commvault.Powershell.Models.ICreateTeamsClientInternal.ServerPlan { get => (this._serverPlan = this._serverPlan ?? new Commvault.Powershell.Models.IdName()); set { {_serverPlan = value;} } }

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

        /// <summary>Unique Teams app 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="ServerPlan" /> property.</summary>
        private Commvault.Powershell.Models.IIdName _serverPlan;

        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Owned)]
        internal Commvault.Powershell.Models.IIdName ServerPlan { get => (this._serverPlan = this._serverPlan ?? new Commvault.Powershell.Models.IdName()); set => this._serverPlan = value; }

        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Inlined)]
        public long? ServerPlanId { get => ((Commvault.Powershell.Models.IIdNameInternal)ServerPlan).Id; set => ((Commvault.Powershell.Models.IIdNameInternal)ServerPlan).Id = value ?? default(long); }

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

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

        }
    }
    /// Request Message for teams app creation
    public partial interface ICreateTeamsClient :
        Commvault.Powershell.Runtime.IJsonSerializable
    {
        /// <summary>Azure Application ID</summary>
        [Commvault.Powershell.Runtime.Info(
        Required = true,
        ReadOnly = false,
        Description = @"Azure Application ID",
        SerializedName = @"applicationId",
        PossibleTypes = new [] { typeof(string) })]
        string AzureAppApplicationId { get; set; }
        /// <summary>Azure app secret key, needs to be base64 encoded</summary>
        [Commvault.Powershell.Runtime.Info(
        Required = true,
        ReadOnly = false,
        Description = @"Azure app secret key, needs to be base64 encoded",
        SerializedName = @"applicationSecret",
        PossibleTypes = new [] { typeof(string) })]
        string AzureAppApplicationSecret { get; set; }
        /// <summary>Azure directory (tenant) ID</summary>
        [Commvault.Powershell.Runtime.Info(
        Required = true,
        ReadOnly = false,
        Description = @"Azure directory (tenant) ID",
        SerializedName = @"azureDirectoryId",
        PossibleTypes = new [] { typeof(string) })]
        string AzureAppAzureDirectoryId { get; set; }
        /// <summary>
        /// User based refresh token generated with corresponding app credentials. Can be left blank if the azure app is protected
        /// API approved.
        /// </summary>
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"User based refresh token generated with corresponding app credentials. Can be left blank if the azure app is protected API approved.",
        SerializedName = @"refreshToken",
        PossibleTypes = new [] { typeof(string) })]
        string AzureAppRefreshToken { get; set; }
        /// <summary>Unique Teams app name</summary>
        [Commvault.Powershell.Runtime.Info(
        Required = true,
        ReadOnly = false,
        Description = @"Unique Teams app name",
        SerializedName = @"name",
        PossibleTypes = new [] { typeof(string) })]
        string Name { get; set; }

        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"",
        SerializedName = @"id",
        PossibleTypes = new [] { typeof(long) })]
        long? ServerPlanId { get; set; }

        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"",
        SerializedName = @"name",
        PossibleTypes = new [] { typeof(string) })]
        string ServerPlanName { get; set; }

    }
    /// Request Message for teams app creation
    internal partial interface ICreateTeamsClientInternal

    {
        /// <summary>TeamsConnectionsSettings</summary>
        Commvault.Powershell.Models.ITeamsConnectionsSettings AzureApp { get; set; }
        /// <summary>Azure Application ID</summary>
        string AzureAppApplicationId { get; set; }
        /// <summary>Azure app secret key, needs to be base64 encoded</summary>
        string AzureAppApplicationSecret { get; set; }
        /// <summary>Azure directory (tenant) ID</summary>
        string AzureAppAzureDirectoryId { get; set; }
        /// <summary>
        /// User based refresh token generated with corresponding app credentials. Can be left blank if the azure app is protected
        /// API approved.
        /// </summary>
        string AzureAppRefreshToken { get; set; }
        /// <summary>Unique Teams app name</summary>
        string Name { get; set; }

        Commvault.Powershell.Models.IIdName ServerPlan { get; set; }

        long? ServerPlanId { get; set; }

        string ServerPlanName { get; set; }

    }
}