generated/api/Models/CreateReplicationGroupAzure.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>
    /// Create a replication group with Azure as the destination vendor. SourceHypervisor is the hypervisor that has the VM's
    /// to be backed up. Recovery target contains the replication options that will be applied to the selected VM's. ID is mandatory
    /// for sourceHypervisor and recovery target. Provide both the id and the name for the storage and the vms.
    /// </summary>
    public partial class CreateReplicationGroupAzure :
        Commvault.Powershell.Models.ICreateReplicationGroupAzure,
        Commvault.Powershell.Models.ICreateReplicationGroupAzureInternal,
        Commvault.Powershell.Runtime.IValidates
    {
        /// <summary>
        /// Backing field for Inherited model <see cref= "Commvault.Powershell.Models.ICreateReplicationGroup" />
        /// </summary>
        private Commvault.Powershell.Models.ICreateReplicationGroup __createReplicationGroup = new Commvault.Powershell.Models.CreateReplicationGroup();

        /// <summary>Select this option to deploy a VM only when a failover operation is requested</summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Inlined)]
        public bool? AdvancedOptionDeployVMOnlyDuringfailover { get => ((Commvault.Powershell.Models.IReplicationGroupAdvOptionsAzureInternal)AdvancedOptions).DeployVMOnlyDuringfailover; set => ((Commvault.Powershell.Models.IReplicationGroupAdvOptionsAzureInternal)AdvancedOptions).DeployVMOnlyDuringfailover = value ?? default(bool); }

        /// <summary>
        /// This will replace the instance at the destination if the instance with the same name already exists.
        /// </summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Inlined)]
        public bool? AdvancedOptionUnconditionalOverwrite { get => ((Commvault.Powershell.Models.IReplicationGroupAdvOptionsAzureInternal)AdvancedOptions).UnconditionalOverwrite; set => ((Commvault.Powershell.Models.IReplicationGroupAdvOptionsAzureInternal)AdvancedOptions).UnconditionalOverwrite = value ?? default(bool); }

        /// <summary>Backing field for <see cref="AdvancedOptions" /> property.</summary>
        private Commvault.Powershell.Models.IReplicationGroupAdvOptionsAzure _advancedOptions;

        /// <summary>Advanced options for Azure replication group</summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Owned)]
        internal Commvault.Powershell.Models.IReplicationGroupAdvOptionsAzure AdvancedOptions { get => (this._advancedOptions = this._advancedOptions ?? new Commvault.Powershell.Models.ReplicationGroupAdvOptionsAzure()); set => this._advancedOptions = value; }

        /// <summary>Internal Acessors for AdvancedOptions</summary>
        Commvault.Powershell.Models.IReplicationGroupAdvOptionsAzure Commvault.Powershell.Models.ICreateReplicationGroupAzureInternal.AdvancedOptions { get => (this._advancedOptions = this._advancedOptions ?? new Commvault.Powershell.Models.ReplicationGroupAdvOptionsAzure()); set { {_advancedOptions = value;} } }

        /// <summary>Internal Acessors for DestVendor</summary>
        string Commvault.Powershell.Models.ICreateReplicationGroupAzureInternal.DestVendor { get => this._destVendor; set { {_destVendor = value;} } }

        /// <summary>Backing field for <see cref="DestVendor" /> property.</summary>
        private string _destVendor= @"Azure";

        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Owned)]
        public string DestVendor { get => this._destVendor; }

        /// <summary>The field denotes the frequency of replication.</summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Inherited)]
        public long? FrequencyInMinutes { get => ((Commvault.Powershell.Models.ICreateReplicationGroupInternal)__createReplicationGroup).FrequencyInMinutes; set => ((Commvault.Powershell.Models.ICreateReplicationGroupInternal)__createReplicationGroup).FrequencyInMinutes = value; }

        /// <summary>The name of the replication group being created</summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Inherited)]
        public string Name { get => ((Commvault.Powershell.Models.ICreateReplicationGroupInternal)__createReplicationGroup).Name; set => ((Commvault.Powershell.Models.ICreateReplicationGroupInternal)__createReplicationGroup).Name = value; }

        /// <summary>Backing field for <see cref="OverrideReplicationOptions" /> property.</summary>
        private Commvault.Powershell.Models.IOverrideReplicationOptionsAzureCreate[] _overrideReplicationOptions;

        /// <summary>
        /// The replication options per instance, if provided, will override the replication options from the target. For the instances
        /// not in this list, the options are applied from the target.
        /// </summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Owned)]
        public Commvault.Powershell.Models.IOverrideReplicationOptionsAzureCreate[] OverrideReplicationOptions { get => this._overrideReplicationOptions; set => this._overrideReplicationOptions = value; }

        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Inherited)]
        public Commvault.Powershell.Models.IIdName RecoveryTarget { get => ((Commvault.Powershell.Models.ICreateReplicationGroupInternal)__createReplicationGroup).RecoveryTarget; set => ((Commvault.Powershell.Models.ICreateReplicationGroupInternal)__createReplicationGroup).RecoveryTarget = value; }

        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Inherited)]
        public long? RecoveryTargetId { get => ((Commvault.Powershell.Models.ICreateReplicationGroupInternal)__createReplicationGroup).RecoveryTargetId; set => ((Commvault.Powershell.Models.ICreateReplicationGroupInternal)__createReplicationGroup).RecoveryTargetId = value; }

        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Inherited)]
        public string RecoveryTargetName { get => ((Commvault.Powershell.Models.ICreateReplicationGroupInternal)__createReplicationGroup).RecoveryTargetName; set => ((Commvault.Powershell.Models.ICreateReplicationGroupInternal)__createReplicationGroup).RecoveryTargetName = value; }

        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Inherited)]
        public Commvault.Powershell.Models.IIdName SourceHypervisor { get => ((Commvault.Powershell.Models.ICreateReplicationGroupInternal)__createReplicationGroup).SourceHypervisor; set => ((Commvault.Powershell.Models.ICreateReplicationGroupInternal)__createReplicationGroup).SourceHypervisor = value; }

        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Inherited)]
        public long? SourceHypervisorId { get => ((Commvault.Powershell.Models.ICreateReplicationGroupInternal)__createReplicationGroup).SourceHypervisorId; set => ((Commvault.Powershell.Models.ICreateReplicationGroupInternal)__createReplicationGroup).SourceHypervisorId = value; }

        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Inherited)]
        public string SourceHypervisorName { get => ((Commvault.Powershell.Models.ICreateReplicationGroupInternal)__createReplicationGroup).SourceHypervisorName; set => ((Commvault.Powershell.Models.ICreateReplicationGroupInternal)__createReplicationGroup).SourceHypervisorName = value; }

        /// <summary>
        /// The primary and an optional secondary storage that will be used for storing the source VM data for replication. The secondary
        /// storage if provided, will be the default source for replication.
        /// </summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Inherited)]
        public Commvault.Powershell.Models.IStorageCopyCreate[] Storage { get => ((Commvault.Powershell.Models.ICreateReplicationGroupInternal)__createReplicationGroup).Storage; set => ((Commvault.Powershell.Models.ICreateReplicationGroupInternal)__createReplicationGroup).Storage = value; }

        /// <summary>A list of name and GUID of all the virtual machines that have to be replicated</summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Inherited)]
        public Commvault.Powershell.Models.INameGuid[] Vms { get => ((Commvault.Powershell.Models.ICreateReplicationGroupInternal)__createReplicationGroup).Vms; set => ((Commvault.Powershell.Models.ICreateReplicationGroupInternal)__createReplicationGroup).Vms = value; }

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

        }

        /// <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(__createReplicationGroup), __createReplicationGroup);
            await eventListener.AssertObjectIsValid(nameof(__createReplicationGroup), __createReplicationGroup);
        }
    }
    /// Create a replication group with Azure as the destination vendor. SourceHypervisor is the hypervisor that has the VM's
    /// to be backed up. Recovery target contains the replication options that will be applied to the selected VM's. ID is mandatory
    /// for sourceHypervisor and recovery target. Provide both the id and the name for the storage and the vms.
    public partial interface ICreateReplicationGroupAzure :
        Commvault.Powershell.Runtime.IJsonSerializable,
        Commvault.Powershell.Models.ICreateReplicationGroup
    {
        /// <summary>Select this option to deploy a VM only when a failover operation is requested</summary>
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"Select this option to deploy a VM only when a failover operation is requested",
        SerializedName = @"deployVmOnlyDuringfailover",
        PossibleTypes = new [] { typeof(bool) })]
        bool? AdvancedOptionDeployVMOnlyDuringfailover { get; set; }
        /// <summary>
        /// This will replace the instance at the destination if the instance with the same name already exists.
        /// </summary>
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"This will replace the instance at the destination if the instance with the same name already exists.",
        SerializedName = @"unconditionalOverwrite",
        PossibleTypes = new [] { typeof(bool) })]
        bool? AdvancedOptionUnconditionalOverwrite { get; set; }

        [Commvault.Powershell.Runtime.Info(
        Required = true,
        ReadOnly = true,
        Description = @"",
        SerializedName = @"destVendor",
        PossibleTypes = new [] { typeof(string) })]
        string DestVendor { get; }
        /// <summary>
        /// The replication options per instance, if provided, will override the replication options from the target. For the instances
        /// not in this list, the options are applied from the target.
        /// </summary>
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"The replication options per instance, if provided, will override the replication options from the target. For the instances not in this list, the options are applied from the target.",
        SerializedName = @"overrideReplicationOptions",
        PossibleTypes = new [] { typeof(Commvault.Powershell.Models.IOverrideReplicationOptionsAzureCreate) })]
        Commvault.Powershell.Models.IOverrideReplicationOptionsAzureCreate[] OverrideReplicationOptions { get; set; }

    }
    /// Create a replication group with Azure as the destination vendor. SourceHypervisor is the hypervisor that has the VM's
    /// to be backed up. Recovery target contains the replication options that will be applied to the selected VM's. ID is mandatory
    /// for sourceHypervisor and recovery target. Provide both the id and the name for the storage and the vms.
    internal partial interface ICreateReplicationGroupAzureInternal :
        Commvault.Powershell.Models.ICreateReplicationGroupInternal
    {
        /// <summary>Select this option to deploy a VM only when a failover operation is requested</summary>
        bool? AdvancedOptionDeployVMOnlyDuringfailover { get; set; }
        /// <summary>
        /// This will replace the instance at the destination if the instance with the same name already exists.
        /// </summary>
        bool? AdvancedOptionUnconditionalOverwrite { get; set; }
        /// <summary>Advanced options for Azure replication group</summary>
        Commvault.Powershell.Models.IReplicationGroupAdvOptionsAzure AdvancedOptions { get; set; }

        string DestVendor { get; set; }
        /// <summary>
        /// The replication options per instance, if provided, will override the replication options from the target. For the instances
        /// not in this list, the options are applied from the target.
        /// </summary>
        Commvault.Powershell.Models.IOverrideReplicationOptionsAzureCreate[] OverrideReplicationOptions { get; set; }

    }
}