generated/api/Models/CreateReplicationGroupHyperV.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 HyperV 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 CreateReplicationGroupHyperV :
        Commvault.Powershell.Models.ICreateReplicationGroupHyperV,
        Commvault.Powershell.Models.ICreateReplicationGroupHyperVInternal,
        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>
        /// 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.IReplicationGroupAdvOptionsHyperVInternal)AdvancedOptions).UnconditionalOverwrite; set => ((Commvault.Powershell.Models.IReplicationGroupAdvOptionsHyperVInternal)AdvancedOptions).UnconditionalOverwrite = value ?? default(bool); }

        /// <summary>
        /// Validates that the destination VM is bootable by powering it on and then powering off
        /// </summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Inlined)]
        public bool? AdvancedOptionValidateDestinationVM { get => ((Commvault.Powershell.Models.IReplicationGroupAdvOptionsHyperVInternal)AdvancedOptions).ValidateDestinationVM; set => ((Commvault.Powershell.Models.IReplicationGroupAdvOptionsHyperVInternal)AdvancedOptions).ValidateDestinationVM = value ?? default(bool); }

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

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

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

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

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

        [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.IOverrideReplicationOptionsHyperVCreate[] _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.IOverrideReplicationOptionsHyperVCreate[] 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="CreateReplicationGroupHyperV" /> instance.</summary>
        public CreateReplicationGroupHyperV()
        {

        }

        /// <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 HyperV 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 ICreateReplicationGroupHyperV :
        Commvault.Powershell.Runtime.IJsonSerializable,
        Commvault.Powershell.Models.ICreateReplicationGroup
    {
        /// <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; }
        /// <summary>
        /// Validates that the destination VM is bootable by powering it on and then powering off
        /// </summary>
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"Validates that the destination VM is bootable by powering it on and then powering off",
        SerializedName = @"validateDestinationVM",
        PossibleTypes = new [] { typeof(bool) })]
        bool? AdvancedOptionValidateDestinationVM { 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.IOverrideReplicationOptionsHyperVCreate) })]
        Commvault.Powershell.Models.IOverrideReplicationOptionsHyperVCreate[] OverrideReplicationOptions { get; set; }

    }
    /// Create a replication group with HyperV 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 ICreateReplicationGroupHyperVInternal :
        Commvault.Powershell.Models.ICreateReplicationGroupInternal
    {
        /// <summary>
        /// This will replace the instance at the destination if the instance with the same name already exists.
        /// </summary>
        bool? AdvancedOptionUnconditionalOverwrite { get; set; }
        /// <summary>
        /// Validates that the destination VM is bootable by powering it on and then powering off
        /// </summary>
        bool? AdvancedOptionValidateDestinationVM { get; set; }
        /// <summary>Advanced options for HyperV replication group</summary>
        Commvault.Powershell.Models.IReplicationGroupAdvOptionsHyperV 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.IOverrideReplicationOptionsHyperVCreate[] OverrideReplicationOptions { get; set; }

    }
}