generated/api/Models/MigrationConfiguration.PowerShell.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 Commvault.Powershell.Runtime.PowerShell;

    /// <summary>Configuration for Migration to Azure</summary>
    [System.ComponentModel.TypeConverter(typeof(MigrationConfigurationTypeConverter))]
    public partial class MigrationConfiguration
    {

        /// <summary>
        /// <c>AfterDeserializeDictionary</c> will be called after the deserialization has finished, allowing customization of the
        /// object before it is returned. Implement this method in a partial class to enable this behavior
        /// </summary>
        /// <param name="content">The global::System.Collections.IDictionary content that should be used.</param>

        partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content);

        /// <summary>
        /// <c>AfterDeserializePSObject</c> will be called after the deserialization has finished, allowing customization of the object
        /// before it is returned. Implement this method in a partial class to enable this behavior
        /// </summary>
        /// <param name="content">The global::System.Management.Automation.PSObject content that should be used.</param>

        partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content);

        /// <summary>
        /// <c>BeforeDeserializeDictionary</c> will be called before the deserialization has commenced, allowing complete customization
        /// of the object before it is deserialized.
        /// If you wish to disable the default deserialization entirely, return <c>true</c> in the <see "returnNow" /> output parameter.
        /// Implement this method in a partial class to enable this behavior.
        /// </summary>
        /// <param name="content">The global::System.Collections.IDictionary content that should be used.</param>
        /// <param name="returnNow">Determines if the rest of the serialization should be processed, or if the method should return
        /// instantly.</param>

        partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow);

        /// <summary>
        /// <c>BeforeDeserializePSObject</c> will be called before the deserialization has commenced, allowing complete customization
        /// of the object before it is deserialized.
        /// If you wish to disable the default deserialization entirely, return <c>true</c> in the <see "returnNow" /> output parameter.
        /// Implement this method in a partial class to enable this behavior.
        /// </summary>
        /// <param name="content">The global::System.Management.Automation.PSObject content that should be used.</param>
        /// <param name="returnNow">Determines if the rest of the serialization should be processed, or if the method should return
        /// instantly.</param>

        partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);

        /// <summary>
        /// Deserializes a <see cref="global::System.Collections.IDictionary" /> into an instance of <see cref="Commvault.Powershell.Models.MigrationConfiguration"
        /// />.
        /// </summary>
        /// <param name="content">The global::System.Collections.IDictionary content that should be used.</param>
        /// <returns>
        /// an instance of <see cref="Commvault.Powershell.Models.IMigrationConfiguration" />.
        /// </returns>
        public static Commvault.Powershell.Models.IMigrationConfiguration DeserializeFromDictionary(global::System.Collections.IDictionary content)
        {
            return new MigrationConfiguration(content);
        }

        /// <summary>
        /// Deserializes a <see cref="global::System.Management.Automation.PSObject" /> into an instance of <see cref="Commvault.Powershell.Models.MigrationConfiguration"
        /// />.
        /// </summary>
        /// <param name="content">The global::System.Management.Automation.PSObject content that should be used.</param>
        /// <returns>
        /// an instance of <see cref="Commvault.Powershell.Models.IMigrationConfiguration" />.
        /// </returns>
        public static Commvault.Powershell.Models.IMigrationConfiguration DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
        {
            return new MigrationConfiguration(content);
        }

        /// <summary>
        /// Creates a new instance of <see cref="MigrationConfiguration" />, deserializing the content from a json string.
        /// </summary>
        /// <param name="jsonText">a string containing a JSON serialized instance of this model.</param>
        /// <returns>an instance of the <see cref="className" /> model class.</returns>
        public static Commvault.Powershell.Models.IMigrationConfiguration FromJsonString(string jsonText) => FromJson(Commvault.Powershell.Runtime.Json.JsonNode.Parse(jsonText));

        /// <summary>
        /// Deserializes a <see cref="global::System.Collections.IDictionary" /> into a new instance of <see cref="Commvault.Powershell.Models.MigrationConfiguration"
        /// />.
        /// </summary>
        /// <param name="content">The global::System.Collections.IDictionary content that should be used.</param>
        internal MigrationConfiguration(global::System.Collections.IDictionary content)
        {
            bool returnNow = false;
            BeforeDeserializeDictionary(content, ref returnNow);
            if (returnNow)
            {
                return;
            }
            // actually deserialize
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).Source = (Commvault.Powershell.Models.IMigrationSource) content.GetValueForProperty("Source",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).Source, Commvault.Powershell.Models.MigrationSourceTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).Destination = (Commvault.Powershell.Models.IMigrationDestination) content.GetValueForProperty("Destination",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).Destination, Commvault.Powershell.Models.MigrationDestinationTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationPairs = (Commvault.Powershell.Models.IManagePaths) content.GetValueForProperty("MigrationPairs",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationPairs, Commvault.Powershell.Models.ManagePathsTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationSettings = (Commvault.Powershell.Models.IMigrationSettings) content.GetValueForProperty("MigrationSettings",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationSettings, Commvault.Powershell.Models.MigrationSettingsTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).Plan = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("Plan",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).Plan, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).KickOffMigrationImmediately = (bool?) content.GetValueForProperty("KickOffMigrationImmediately",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).KickOffMigrationImmediately, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).StartAnalysisNow = (bool?) content.GetValueForProperty("StartAnalysisNow",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).StartAnalysisNow, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationSettingMigrationWindow = (Commvault.Powershell.Models.ICreateBlackoutWindow[]) content.GetValueForProperty("MigrationSettingMigrationWindow",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationSettingMigrationWindow, __y => TypeConverterExtensions.SelectToArray<Commvault.Powershell.Models.ICreateBlackoutWindow>(__y, Commvault.Powershell.Models.CreateBlackoutWindowTypeConverter.ConvertFrom));
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationSettingName = (string) content.GetValueForProperty("MigrationSettingName",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationSettingName, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).SourceCredentials = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("SourceCredentials",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).SourceCredentials, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).SourceName = (string) content.GetValueForProperty("SourceName",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).SourceName, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).SourceNasType = (string) content.GetValueForProperty("SourceNasType",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).SourceNasType, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).SourceAccessNode = (Commvault.Powershell.Models.IAccessNodes[]) content.GetValueForProperty("SourceAccessNode",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).SourceAccessNode, __y => TypeConverterExtensions.SelectToArray<Commvault.Powershell.Models.IAccessNodes>(__y, Commvault.Powershell.Models.AccessNodesTypeConverter.ConvertFrom));
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).DestinationRegion = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("DestinationRegion",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).DestinationRegion, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).DestinationCredentials = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("DestinationCredentials",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).DestinationCredentials, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).DestinationAccessNode = (Commvault.Powershell.Models.IAccessNodes[]) content.GetValueForProperty("DestinationAccessNode",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).DestinationAccessNode, __y => TypeConverterExtensions.SelectToArray<Commvault.Powershell.Models.IAccessNodes>(__y, Commvault.Powershell.Models.AccessNodesTypeConverter.ConvertFrom));
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).DestinationName = (string) content.GetValueForProperty("DestinationName",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).DestinationName, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationPair = (Commvault.Powershell.Models.IMigrationPair[]) content.GetValueForProperty("MigrationPair",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationPair, __y => TypeConverterExtensions.SelectToArray<Commvault.Powershell.Models.IMigrationPair>(__y, Commvault.Powershell.Models.MigrationPairTypeConverter.ConvertFrom));
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationSettingMigrationFrequency = (Commvault.Powershell.Models.IPlanPattern) content.GetValueForProperty("MigrationSettingMigrationFrequency",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationSettingMigrationFrequency, Commvault.Powershell.Models.PlanPatternTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).PlanId = (long?) content.GetValueForProperty("PlanId",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).PlanId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).PlanName = (string) content.GetValueForProperty("PlanName",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).PlanName, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).SourceCredentialsId = (long?) content.GetValueForProperty("SourceCredentialsId",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).SourceCredentialsId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).SourceCredentialsName = (string) content.GetValueForProperty("SourceCredentialsName",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).SourceCredentialsName, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).RegionId = (long?) content.GetValueForProperty("RegionId",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).RegionId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).RegionName = (string) content.GetValueForProperty("RegionName",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).RegionName, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).DestinationCredentialsId = (long?) content.GetValueForProperty("DestinationCredentialsId",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).DestinationCredentialsId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).DestinationCredentialsName = (string) content.GetValueForProperty("DestinationCredentialsName",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).DestinationCredentialsName, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyMinuteFrequency = (long?) content.GetValueForProperty("MigrationFrequencyMinuteFrequency",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyMinuteFrequency, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyHourlyFrequency = (long?) content.GetValueForProperty("MigrationFrequencyHourlyFrequency",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyHourlyFrequency, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyDailyFrequency = (long?) content.GetValueForProperty("MigrationFrequencyDailyFrequency",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyDailyFrequency, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyWeeklyFrequency = (long?) content.GetValueForProperty("MigrationFrequencyWeeklyFrequency",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyWeeklyFrequency, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyWeeklyFrequencyDays = (string[]) content.GetValueForProperty("MigrationFrequencyWeeklyFrequencyDays",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyWeeklyFrequencyDays, __y => TypeConverterExtensions.SelectToArray<string>(__y, global::System.Convert.ToString));
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyMonthlyFrequency = (long?) content.GetValueForProperty("MigrationFrequencyMonthlyFrequency",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyMonthlyFrequency, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyMonthlyFrequencyWeekOfMonth = (string) content.GetValueForProperty("MigrationFrequencyMonthlyFrequencyWeekOfMonth",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyMonthlyFrequencyWeekOfMonth, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyMonthlyFrequencyDayOfWeek = (string) content.GetValueForProperty("MigrationFrequencyMonthlyFrequencyDayOfWeek",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyMonthlyFrequencyDayOfWeek, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyMonthlyFrequencyDayOfMonth = (long?) content.GetValueForProperty("MigrationFrequencyMonthlyFrequencyDayOfMonth",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyMonthlyFrequencyDayOfMonth, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyYearlyFrequencyWeekOfMonth = (string) content.GetValueForProperty("MigrationFrequencyYearlyFrequencyWeekOfMonth",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyYearlyFrequencyWeekOfMonth, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyYearlyFrequencyDayOfWeek = (string) content.GetValueForProperty("MigrationFrequencyYearlyFrequencyDayOfWeek",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyYearlyFrequencyDayOfWeek, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyYearlyFrequencyDayOfMonth = (long?) content.GetValueForProperty("MigrationFrequencyYearlyFrequencyDayOfMonth",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyYearlyFrequencyDayOfMonth, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyYearlyFrequencyMonthOfYear = (string) content.GetValueForProperty("MigrationFrequencyYearlyFrequencyMonthOfYear",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyYearlyFrequencyMonthOfYear, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyStartTime = (long?) content.GetValueForProperty("MigrationFrequencyStartTime",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyStartTime, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            AfterDeserializeDictionary(content);
        }

        /// <summary>
        /// Deserializes a <see cref="global::System.Management.Automation.PSObject" /> into a new instance of <see cref="Commvault.Powershell.Models.MigrationConfiguration"
        /// />.
        /// </summary>
        /// <param name="content">The global::System.Management.Automation.PSObject content that should be used.</param>
        internal MigrationConfiguration(global::System.Management.Automation.PSObject content)
        {
            bool returnNow = false;
            BeforeDeserializePSObject(content, ref returnNow);
            if (returnNow)
            {
                return;
            }
            // actually deserialize
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).Source = (Commvault.Powershell.Models.IMigrationSource) content.GetValueForProperty("Source",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).Source, Commvault.Powershell.Models.MigrationSourceTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).Destination = (Commvault.Powershell.Models.IMigrationDestination) content.GetValueForProperty("Destination",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).Destination, Commvault.Powershell.Models.MigrationDestinationTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationPairs = (Commvault.Powershell.Models.IManagePaths) content.GetValueForProperty("MigrationPairs",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationPairs, Commvault.Powershell.Models.ManagePathsTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationSettings = (Commvault.Powershell.Models.IMigrationSettings) content.GetValueForProperty("MigrationSettings",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationSettings, Commvault.Powershell.Models.MigrationSettingsTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).Plan = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("Plan",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).Plan, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).KickOffMigrationImmediately = (bool?) content.GetValueForProperty("KickOffMigrationImmediately",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).KickOffMigrationImmediately, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).StartAnalysisNow = (bool?) content.GetValueForProperty("StartAnalysisNow",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).StartAnalysisNow, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationSettingMigrationWindow = (Commvault.Powershell.Models.ICreateBlackoutWindow[]) content.GetValueForProperty("MigrationSettingMigrationWindow",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationSettingMigrationWindow, __y => TypeConverterExtensions.SelectToArray<Commvault.Powershell.Models.ICreateBlackoutWindow>(__y, Commvault.Powershell.Models.CreateBlackoutWindowTypeConverter.ConvertFrom));
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationSettingName = (string) content.GetValueForProperty("MigrationSettingName",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationSettingName, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).SourceCredentials = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("SourceCredentials",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).SourceCredentials, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).SourceName = (string) content.GetValueForProperty("SourceName",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).SourceName, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).SourceNasType = (string) content.GetValueForProperty("SourceNasType",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).SourceNasType, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).SourceAccessNode = (Commvault.Powershell.Models.IAccessNodes[]) content.GetValueForProperty("SourceAccessNode",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).SourceAccessNode, __y => TypeConverterExtensions.SelectToArray<Commvault.Powershell.Models.IAccessNodes>(__y, Commvault.Powershell.Models.AccessNodesTypeConverter.ConvertFrom));
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).DestinationRegion = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("DestinationRegion",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).DestinationRegion, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).DestinationCredentials = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("DestinationCredentials",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).DestinationCredentials, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).DestinationAccessNode = (Commvault.Powershell.Models.IAccessNodes[]) content.GetValueForProperty("DestinationAccessNode",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).DestinationAccessNode, __y => TypeConverterExtensions.SelectToArray<Commvault.Powershell.Models.IAccessNodes>(__y, Commvault.Powershell.Models.AccessNodesTypeConverter.ConvertFrom));
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).DestinationName = (string) content.GetValueForProperty("DestinationName",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).DestinationName, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationPair = (Commvault.Powershell.Models.IMigrationPair[]) content.GetValueForProperty("MigrationPair",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationPair, __y => TypeConverterExtensions.SelectToArray<Commvault.Powershell.Models.IMigrationPair>(__y, Commvault.Powershell.Models.MigrationPairTypeConverter.ConvertFrom));
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationSettingMigrationFrequency = (Commvault.Powershell.Models.IPlanPattern) content.GetValueForProperty("MigrationSettingMigrationFrequency",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationSettingMigrationFrequency, Commvault.Powershell.Models.PlanPatternTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).PlanId = (long?) content.GetValueForProperty("PlanId",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).PlanId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).PlanName = (string) content.GetValueForProperty("PlanName",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).PlanName, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).SourceCredentialsId = (long?) content.GetValueForProperty("SourceCredentialsId",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).SourceCredentialsId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).SourceCredentialsName = (string) content.GetValueForProperty("SourceCredentialsName",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).SourceCredentialsName, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).RegionId = (long?) content.GetValueForProperty("RegionId",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).RegionId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).RegionName = (string) content.GetValueForProperty("RegionName",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).RegionName, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).DestinationCredentialsId = (long?) content.GetValueForProperty("DestinationCredentialsId",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).DestinationCredentialsId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).DestinationCredentialsName = (string) content.GetValueForProperty("DestinationCredentialsName",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).DestinationCredentialsName, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyMinuteFrequency = (long?) content.GetValueForProperty("MigrationFrequencyMinuteFrequency",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyMinuteFrequency, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyHourlyFrequency = (long?) content.GetValueForProperty("MigrationFrequencyHourlyFrequency",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyHourlyFrequency, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyDailyFrequency = (long?) content.GetValueForProperty("MigrationFrequencyDailyFrequency",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyDailyFrequency, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyWeeklyFrequency = (long?) content.GetValueForProperty("MigrationFrequencyWeeklyFrequency",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyWeeklyFrequency, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyWeeklyFrequencyDays = (string[]) content.GetValueForProperty("MigrationFrequencyWeeklyFrequencyDays",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyWeeklyFrequencyDays, __y => TypeConverterExtensions.SelectToArray<string>(__y, global::System.Convert.ToString));
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyMonthlyFrequency = (long?) content.GetValueForProperty("MigrationFrequencyMonthlyFrequency",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyMonthlyFrequency, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyMonthlyFrequencyWeekOfMonth = (string) content.GetValueForProperty("MigrationFrequencyMonthlyFrequencyWeekOfMonth",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyMonthlyFrequencyWeekOfMonth, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyMonthlyFrequencyDayOfWeek = (string) content.GetValueForProperty("MigrationFrequencyMonthlyFrequencyDayOfWeek",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyMonthlyFrequencyDayOfWeek, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyMonthlyFrequencyDayOfMonth = (long?) content.GetValueForProperty("MigrationFrequencyMonthlyFrequencyDayOfMonth",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyMonthlyFrequencyDayOfMonth, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyYearlyFrequencyWeekOfMonth = (string) content.GetValueForProperty("MigrationFrequencyYearlyFrequencyWeekOfMonth",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyYearlyFrequencyWeekOfMonth, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyYearlyFrequencyDayOfWeek = (string) content.GetValueForProperty("MigrationFrequencyYearlyFrequencyDayOfWeek",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyYearlyFrequencyDayOfWeek, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyYearlyFrequencyDayOfMonth = (long?) content.GetValueForProperty("MigrationFrequencyYearlyFrequencyDayOfMonth",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyYearlyFrequencyDayOfMonth, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyYearlyFrequencyMonthOfYear = (string) content.GetValueForProperty("MigrationFrequencyYearlyFrequencyMonthOfYear",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyYearlyFrequencyMonthOfYear, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyStartTime = (long?) content.GetValueForProperty("MigrationFrequencyStartTime",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyStartTime, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            AfterDeserializePSObject(content);
        }

        /// <summary>Serializes this instance to a json string.</summary>

        /// <returns>a <see cref="System.String" /> containing this model serialized to JSON text.</returns>
        public string ToJsonString() => ToJson(null, Commvault.Powershell.Runtime.SerializationMode.IncludeAll)?.ToString();
    }
    /// Configuration for Migration to Azure
    [System.ComponentModel.TypeConverter(typeof(MigrationConfigurationTypeConverter))]
    public partial interface IMigrationConfiguration

    {

    }
}