generated/api/Models/GoogleServiceAccountCredentialInfo.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>
    /// Applicable only for credentials with Cloud Account, Vendor Type as Google and Auth Type as Service Account
    /// </summary>
    public partial class GoogleServiceAccountCredentialInfo :
        Commvault.Powershell.Models.IGoogleServiceAccountCredentialInfo,
        Commvault.Powershell.Models.IGoogleServiceAccountCredentialInfoInternal,
        Commvault.Powershell.Runtime.IValidates
    {
        /// <summary>
        /// Backing field for Inherited model <see cref= "Commvault.Powershell.Models.ICommonCredentialInfo" />
        /// </summary>
        private Commvault.Powershell.Models.ICommonCredentialInfo __commonCredentialInfo = new Commvault.Powershell.Models.CommonCredentialInfo();

        /// <summary>
        /// Backing field for Inherited model <see cref= "Commvault.Powershell.Models.ICreateCredential" />
        /// </summary>
        private Commvault.Powershell.Models.ICreateCredential __createCredential = new Commvault.Powershell.Models.CreateCredential();

        /// <summary>CredentialAccountType</summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Inherited)]
        public string AccountType { get => ((Commvault.Powershell.Models.ICreateCredentialInternal)__createCredential).AccountType; set => ((Commvault.Powershell.Models.ICreateCredentialInternal)__createCredential).AccountType = value; }

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

        /// <summary>Aunthentication type applicable only for Cloud Accounts with Google as vendor.</summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Owned)]
        public string AuthType { get => this._authType; set => this._authType = value; }

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

        /// <summary>Certificate of Credential</summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Owned)]
        public string Certificate { get => this._certificate; set => this._certificate = value; }

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

        /// <summary>Connect String for Credential</summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Owned)]
        public string ConnectString { get => this._connectString; set => this._connectString = value; }

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

        /// <summary>DB Name for Credential</summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Owned)]
        public string DbName { get => this._dbName; set => this._dbName = value; }

        /// <summary>Description of Credential</summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Inherited)]
        public string Description { get => ((Commvault.Powershell.Models.ICommonCredentialInfoInternal)__commonCredentialInfo).Description; set => ((Commvault.Powershell.Models.ICommonCredentialInfoInternal)__commonCredentialInfo).Description = value; }

        /// <summary>Name of Credential</summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Inherited)]
        public string Name { get => ((Commvault.Powershell.Models.ICreateCredentialInternal)__createCredential).Name; set => ((Commvault.Powershell.Models.ICreateCredentialInternal)__createCredential).Name = value; }

        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Inherited)]
        public Commvault.Powershell.Models.IIdName OwnerUser { get => ((Commvault.Powershell.Models.ICommonCredentialInfoInternal)__commonCredentialInfo).OwnerUser; set => ((Commvault.Powershell.Models.ICommonCredentialInfoInternal)__commonCredentialInfo).OwnerUser = value; }

        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Inherited)]
        public Commvault.Powershell.Models.IIdName OwnerUserGroup { get => ((Commvault.Powershell.Models.ICommonCredentialInfoInternal)__commonCredentialInfo).OwnerUserGroup; set => ((Commvault.Powershell.Models.ICommonCredentialInfoInternal)__commonCredentialInfo).OwnerUserGroup = value; }

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

        /// <summary>Project ID of credential</summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Owned)]
        public string ProjectId { get => this._projectId; set => this._projectId = value; }

        /// <summary>Security association of a list of users and user groups</summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Inherited)]
        public Commvault.Powershell.Models.ICredentialSecurity Security { get => ((Commvault.Powershell.Models.ICommonCredentialInfoInternal)__commonCredentialInfo).Security; set => ((Commvault.Powershell.Models.ICommonCredentialInfoInternal)__commonCredentialInfo).Security = value; }

        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Inherited)]
        public Commvault.Powershell.Models.ICredentialSecurityAssociations[] SecurityAssociations { get => ((Commvault.Powershell.Models.ICommonCredentialInfoInternal)__commonCredentialInfo).SecurityAssociations; set => ((Commvault.Powershell.Models.ICommonCredentialInfoInternal)__commonCredentialInfo).SecurityAssociations = value; }

        /// <summary>Owner of a credential can be a user or user group</summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Inherited)]
        public Commvault.Powershell.Models.ICredentialOwner SecurityOwner { get => ((Commvault.Powershell.Models.ICommonCredentialInfoInternal)__commonCredentialInfo).SecurityOwner; set => ((Commvault.Powershell.Models.ICommonCredentialInfoInternal)__commonCredentialInfo).SecurityOwner = value; }

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

        /// <summary>User Account of Credential</summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Owned)]
        public string UserAccount { get => this._userAccount; set => this._userAccount = value; }

        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Inherited)]
        public long? UserGroupId { get => ((Commvault.Powershell.Models.ICommonCredentialInfoInternal)__commonCredentialInfo).UserGroupId; set => ((Commvault.Powershell.Models.ICommonCredentialInfoInternal)__commonCredentialInfo).UserGroupId = value; }

        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Inherited)]
        public string UserGroupName { get => ((Commvault.Powershell.Models.ICommonCredentialInfoInternal)__commonCredentialInfo).UserGroupName; set => ((Commvault.Powershell.Models.ICommonCredentialInfoInternal)__commonCredentialInfo).UserGroupName = value; }

        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Inherited)]
        public long? UserId { get => ((Commvault.Powershell.Models.ICommonCredentialInfoInternal)__commonCredentialInfo).UserId; set => ((Commvault.Powershell.Models.ICommonCredentialInfoInternal)__commonCredentialInfo).UserId = value; }

        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Inherited)]
        public string UserName { get => ((Commvault.Powershell.Models.ICommonCredentialInfoInternal)__commonCredentialInfo).UserName; set => ((Commvault.Powershell.Models.ICommonCredentialInfoInternal)__commonCredentialInfo).UserName = value; }

        /// <summary>Cloud vendor types appilcable only for Cloud Account type</summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Inherited)]
        public string VendorType { get => ((Commvault.Powershell.Models.ICreateCredentialInternal)__createCredential).VendorType; set => ((Commvault.Powershell.Models.ICreateCredentialInternal)__createCredential).VendorType = value; }

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

        }

        /// <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(__createCredential), __createCredential);
            await eventListener.AssertObjectIsValid(nameof(__createCredential), __createCredential);
            await eventListener.AssertNotNull(nameof(__commonCredentialInfo), __commonCredentialInfo);
            await eventListener.AssertObjectIsValid(nameof(__commonCredentialInfo), __commonCredentialInfo);
        }
    }
    /// Applicable only for credentials with Cloud Account, Vendor Type as Google and Auth Type as Service Account
    public partial interface IGoogleServiceAccountCredentialInfo :
        Commvault.Powershell.Runtime.IJsonSerializable,
        Commvault.Powershell.Models.ICreateCredential,
        Commvault.Powershell.Models.ICommonCredentialInfo
    {
        /// <summary>Aunthentication type applicable only for Cloud Accounts with Google as vendor.</summary>
        [Commvault.Powershell.Runtime.Info(
        Required = true,
        ReadOnly = false,
        Description = @"Aunthentication type applicable only for Cloud Accounts with Google as vendor.",
        SerializedName = @"authType",
        PossibleTypes = new [] { typeof(string) })]
        string AuthType { get; set; }
        /// <summary>Certificate of Credential</summary>
        [Commvault.Powershell.Runtime.Info(
        Required = true,
        ReadOnly = false,
        Description = @"Certificate of Credential",
        SerializedName = @"certificate",
        PossibleTypes = new [] { typeof(string) })]
        string Certificate { get; set; }
        /// <summary>Connect String for Credential</summary>
        [Commvault.Powershell.Runtime.Info(
        Required = true,
        ReadOnly = false,
        Description = @"Connect String for Credential",
        SerializedName = @"connectString",
        PossibleTypes = new [] { typeof(string) })]
        string ConnectString { get; set; }
        /// <summary>DB Name for Credential</summary>
        [Commvault.Powershell.Runtime.Info(
        Required = true,
        ReadOnly = false,
        Description = @"DB Name for Credential",
        SerializedName = @"dbName",
        PossibleTypes = new [] { typeof(string) })]
        string DbName { get; set; }
        /// <summary>Project ID of credential</summary>
        [Commvault.Powershell.Runtime.Info(
        Required = true,
        ReadOnly = false,
        Description = @"Project ID of credential",
        SerializedName = @"projectId",
        PossibleTypes = new [] { typeof(string) })]
        string ProjectId { get; set; }
        /// <summary>User Account of Credential</summary>
        [Commvault.Powershell.Runtime.Info(
        Required = true,
        ReadOnly = false,
        Description = @"User Account of Credential",
        SerializedName = @"userAccount",
        PossibleTypes = new [] { typeof(string) })]
        string UserAccount { get; set; }

    }
    /// Applicable only for credentials with Cloud Account, Vendor Type as Google and Auth Type as Service Account
    internal partial interface IGoogleServiceAccountCredentialInfoInternal :
        Commvault.Powershell.Models.ICreateCredentialInternal,
        Commvault.Powershell.Models.ICommonCredentialInfoInternal
    {
        /// <summary>Aunthentication type applicable only for Cloud Accounts with Google as vendor.</summary>
        string AuthType { get; set; }
        /// <summary>Certificate of Credential</summary>
        string Certificate { get; set; }
        /// <summary>Connect String for Credential</summary>
        string ConnectString { get; set; }
        /// <summary>DB Name for Credential</summary>
        string DbName { get; set; }
        /// <summary>Project ID of credential</summary>
        string ProjectId { get; set; }
        /// <summary>User Account of Credential</summary>
        string UserAccount { get; set; }

    }
}