generated/api/Models/MigrationConfiguration.PowerShell.cs
// Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.2, generator: @autorest/powershell@4.0.708) // 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 <paramref name="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 <paramref name="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> /// <c>OverrideToString</c> will be called if it is implemented. Implement this method in a partial class to enable this behavior /// </summary> /// <param name="stringResult">/// instance serialized to a string, normally it is a Json</param> /// <param name="returnNow">/// set returnNow to true if you provide a customized OverrideToString function</param> partial void OverrideToString(ref string stringResult, 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="MigrationConfiguration" /> 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 if (content.Contains("Source")) { ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).Source = (Commvault.Powershell.Models.IMigrationSource) content.GetValueForProperty("Source",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).Source, Commvault.Powershell.Models.MigrationSourceTypeConverter.ConvertFrom); } if (content.Contains("Destination")) { ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).Destination = (Commvault.Powershell.Models.IMigrationDestination) content.GetValueForProperty("Destination",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).Destination, Commvault.Powershell.Models.MigrationDestinationTypeConverter.ConvertFrom); } if (content.Contains("MigrationPairs")) { ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationPairs = (Commvault.Powershell.Models.IManagePaths) content.GetValueForProperty("MigrationPairs",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationPairs, Commvault.Powershell.Models.ManagePathsTypeConverter.ConvertFrom); } if (content.Contains("MigrationSettings")) { ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationSettings = (Commvault.Powershell.Models.IMigrationSettings) content.GetValueForProperty("MigrationSettings",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationSettings, Commvault.Powershell.Models.MigrationSettingsTypeConverter.ConvertFrom); } if (content.Contains("Plan")) { ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).Plan = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("Plan",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).Plan, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom); } if (content.Contains("KickOffMigrationImmediately")) { ((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))); } if (content.Contains("StartAnalysisNow")) { ((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))); } if (content.Contains("MigrationSettingMigrationWindow")) { ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationSettingMigrationWindow = (System.Collections.Generic.List<Commvault.Powershell.Models.ICreateBlackoutWindow>) content.GetValueForProperty("MigrationSettingMigrationWindow",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationSettingMigrationWindow, __y => TypeConverterExtensions.SelectToList<Commvault.Powershell.Models.ICreateBlackoutWindow>(__y, Commvault.Powershell.Models.CreateBlackoutWindowTypeConverter.ConvertFrom)); } if (content.Contains("MigrationSettingName")) { ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationSettingName = (string) content.GetValueForProperty("MigrationSettingName",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationSettingName, global::System.Convert.ToString); } if (content.Contains("SourceCredentials")) { ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).SourceCredentials = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("SourceCredentials",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).SourceCredentials, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom); } if (content.Contains("SourceName")) { ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).SourceName = (string) content.GetValueForProperty("SourceName",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).SourceName, global::System.Convert.ToString); } if (content.Contains("SourceNasType")) { ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).SourceNasType = (string) content.GetValueForProperty("SourceNasType",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).SourceNasType, global::System.Convert.ToString); } if (content.Contains("SourceAccessNode")) { ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).SourceAccessNode = (System.Collections.Generic.List<Commvault.Powershell.Models.IAccessNodes>) content.GetValueForProperty("SourceAccessNode",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).SourceAccessNode, __y => TypeConverterExtensions.SelectToList<Commvault.Powershell.Models.IAccessNodes>(__y, Commvault.Powershell.Models.AccessNodesTypeConverter.ConvertFrom)); } if (content.Contains("DestinationRegion")) { ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).DestinationRegion = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("DestinationRegion",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).DestinationRegion, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom); } if (content.Contains("DestinationCredentials")) { ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).DestinationCredentials = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("DestinationCredentials",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).DestinationCredentials, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom); } if (content.Contains("DestinationAccessNode")) { ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).DestinationAccessNode = (System.Collections.Generic.List<Commvault.Powershell.Models.IAccessNodes>) content.GetValueForProperty("DestinationAccessNode",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).DestinationAccessNode, __y => TypeConverterExtensions.SelectToList<Commvault.Powershell.Models.IAccessNodes>(__y, Commvault.Powershell.Models.AccessNodesTypeConverter.ConvertFrom)); } if (content.Contains("DestinationName")) { ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).DestinationName = (string) content.GetValueForProperty("DestinationName",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).DestinationName, global::System.Convert.ToString); } if (content.Contains("MigrationPair")) { ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationPair = (System.Collections.Generic.List<Commvault.Powershell.Models.IMigrationPair>) content.GetValueForProperty("MigrationPair",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationPair, __y => TypeConverterExtensions.SelectToList<Commvault.Powershell.Models.IMigrationPair>(__y, Commvault.Powershell.Models.MigrationPairTypeConverter.ConvertFrom)); } if (content.Contains("MigrationSettingMigrationFrequency")) { ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationSettingMigrationFrequency = (Commvault.Powershell.Models.IPlanPattern) content.GetValueForProperty("MigrationSettingMigrationFrequency",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationSettingMigrationFrequency, Commvault.Powershell.Models.PlanPatternTypeConverter.ConvertFrom); } if (content.Contains("PlanId")) { ((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))); } if (content.Contains("PlanName")) { ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).PlanName = (string) content.GetValueForProperty("PlanName",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).PlanName, global::System.Convert.ToString); } if (content.Contains("SourceCredentialsId")) { ((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))); } if (content.Contains("SourceCredentialsName")) { ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).SourceCredentialsName = (string) content.GetValueForProperty("SourceCredentialsName",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).SourceCredentialsName, global::System.Convert.ToString); } if (content.Contains("RegionId")) { ((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))); } if (content.Contains("RegionName")) { ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).RegionName = (string) content.GetValueForProperty("RegionName",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).RegionName, global::System.Convert.ToString); } if (content.Contains("DestinationCredentialsId")) { ((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))); } if (content.Contains("DestinationCredentialsName")) { ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).DestinationCredentialsName = (string) content.GetValueForProperty("DestinationCredentialsName",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).DestinationCredentialsName, global::System.Convert.ToString); } if (content.Contains("MigrationFrequencyMinuteFrequency")) { ((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))); } if (content.Contains("MigrationFrequencyHourlyFrequency")) { ((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))); } if (content.Contains("MigrationFrequencyDailyFrequency")) { ((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))); } if (content.Contains("MigrationFrequencyWeeklyFrequency")) { ((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))); } if (content.Contains("MigrationFrequencyWeeklyFrequencyDays")) { ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyWeeklyFrequencyDays = (System.Collections.Generic.List<string>) content.GetValueForProperty("MigrationFrequencyWeeklyFrequencyDays",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyWeeklyFrequencyDays, __y => TypeConverterExtensions.SelectToList<string>(__y, global::System.Convert.ToString)); } if (content.Contains("MigrationFrequencyMonthlyFrequency")) { ((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))); } if (content.Contains("MigrationFrequencyMonthlyFrequencyWeekOfMonth")) { ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyMonthlyFrequencyWeekOfMonth = (string) content.GetValueForProperty("MigrationFrequencyMonthlyFrequencyWeekOfMonth",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyMonthlyFrequencyWeekOfMonth, global::System.Convert.ToString); } if (content.Contains("MigrationFrequencyMonthlyFrequencyDayOfWeek")) { ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyMonthlyFrequencyDayOfWeek = (string) content.GetValueForProperty("MigrationFrequencyMonthlyFrequencyDayOfWeek",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyMonthlyFrequencyDayOfWeek, global::System.Convert.ToString); } if (content.Contains("MigrationFrequencyMonthlyFrequencyDayOfMonth")) { ((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))); } if (content.Contains("MigrationFrequencyYearlyFrequencyWeekOfMonth")) { ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyYearlyFrequencyWeekOfMonth = (string) content.GetValueForProperty("MigrationFrequencyYearlyFrequencyWeekOfMonth",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyYearlyFrequencyWeekOfMonth, global::System.Convert.ToString); } if (content.Contains("MigrationFrequencyYearlyFrequencyDayOfWeek")) { ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyYearlyFrequencyDayOfWeek = (string) content.GetValueForProperty("MigrationFrequencyYearlyFrequencyDayOfWeek",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyYearlyFrequencyDayOfWeek, global::System.Convert.ToString); } if (content.Contains("MigrationFrequencyYearlyFrequencyDayOfMonth")) { ((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))); } if (content.Contains("MigrationFrequencyYearlyFrequencyMonthOfYear")) { ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyYearlyFrequencyMonthOfYear = (string) content.GetValueForProperty("MigrationFrequencyYearlyFrequencyMonthOfYear",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyYearlyFrequencyMonthOfYear, global::System.Convert.ToString); } if (content.Contains("MigrationFrequencyStartTime")) { ((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 if (content.Contains("Source")) { ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).Source = (Commvault.Powershell.Models.IMigrationSource) content.GetValueForProperty("Source",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).Source, Commvault.Powershell.Models.MigrationSourceTypeConverter.ConvertFrom); } if (content.Contains("Destination")) { ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).Destination = (Commvault.Powershell.Models.IMigrationDestination) content.GetValueForProperty("Destination",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).Destination, Commvault.Powershell.Models.MigrationDestinationTypeConverter.ConvertFrom); } if (content.Contains("MigrationPairs")) { ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationPairs = (Commvault.Powershell.Models.IManagePaths) content.GetValueForProperty("MigrationPairs",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationPairs, Commvault.Powershell.Models.ManagePathsTypeConverter.ConvertFrom); } if (content.Contains("MigrationSettings")) { ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationSettings = (Commvault.Powershell.Models.IMigrationSettings) content.GetValueForProperty("MigrationSettings",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationSettings, Commvault.Powershell.Models.MigrationSettingsTypeConverter.ConvertFrom); } if (content.Contains("Plan")) { ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).Plan = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("Plan",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).Plan, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom); } if (content.Contains("KickOffMigrationImmediately")) { ((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))); } if (content.Contains("StartAnalysisNow")) { ((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))); } if (content.Contains("MigrationSettingMigrationWindow")) { ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationSettingMigrationWindow = (System.Collections.Generic.List<Commvault.Powershell.Models.ICreateBlackoutWindow>) content.GetValueForProperty("MigrationSettingMigrationWindow",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationSettingMigrationWindow, __y => TypeConverterExtensions.SelectToList<Commvault.Powershell.Models.ICreateBlackoutWindow>(__y, Commvault.Powershell.Models.CreateBlackoutWindowTypeConverter.ConvertFrom)); } if (content.Contains("MigrationSettingName")) { ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationSettingName = (string) content.GetValueForProperty("MigrationSettingName",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationSettingName, global::System.Convert.ToString); } if (content.Contains("SourceCredentials")) { ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).SourceCredentials = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("SourceCredentials",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).SourceCredentials, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom); } if (content.Contains("SourceName")) { ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).SourceName = (string) content.GetValueForProperty("SourceName",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).SourceName, global::System.Convert.ToString); } if (content.Contains("SourceNasType")) { ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).SourceNasType = (string) content.GetValueForProperty("SourceNasType",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).SourceNasType, global::System.Convert.ToString); } if (content.Contains("SourceAccessNode")) { ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).SourceAccessNode = (System.Collections.Generic.List<Commvault.Powershell.Models.IAccessNodes>) content.GetValueForProperty("SourceAccessNode",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).SourceAccessNode, __y => TypeConverterExtensions.SelectToList<Commvault.Powershell.Models.IAccessNodes>(__y, Commvault.Powershell.Models.AccessNodesTypeConverter.ConvertFrom)); } if (content.Contains("DestinationRegion")) { ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).DestinationRegion = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("DestinationRegion",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).DestinationRegion, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom); } if (content.Contains("DestinationCredentials")) { ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).DestinationCredentials = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("DestinationCredentials",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).DestinationCredentials, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom); } if (content.Contains("DestinationAccessNode")) { ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).DestinationAccessNode = (System.Collections.Generic.List<Commvault.Powershell.Models.IAccessNodes>) content.GetValueForProperty("DestinationAccessNode",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).DestinationAccessNode, __y => TypeConverterExtensions.SelectToList<Commvault.Powershell.Models.IAccessNodes>(__y, Commvault.Powershell.Models.AccessNodesTypeConverter.ConvertFrom)); } if (content.Contains("DestinationName")) { ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).DestinationName = (string) content.GetValueForProperty("DestinationName",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).DestinationName, global::System.Convert.ToString); } if (content.Contains("MigrationPair")) { ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationPair = (System.Collections.Generic.List<Commvault.Powershell.Models.IMigrationPair>) content.GetValueForProperty("MigrationPair",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationPair, __y => TypeConverterExtensions.SelectToList<Commvault.Powershell.Models.IMigrationPair>(__y, Commvault.Powershell.Models.MigrationPairTypeConverter.ConvertFrom)); } if (content.Contains("MigrationSettingMigrationFrequency")) { ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationSettingMigrationFrequency = (Commvault.Powershell.Models.IPlanPattern) content.GetValueForProperty("MigrationSettingMigrationFrequency",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationSettingMigrationFrequency, Commvault.Powershell.Models.PlanPatternTypeConverter.ConvertFrom); } if (content.Contains("PlanId")) { ((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))); } if (content.Contains("PlanName")) { ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).PlanName = (string) content.GetValueForProperty("PlanName",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).PlanName, global::System.Convert.ToString); } if (content.Contains("SourceCredentialsId")) { ((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))); } if (content.Contains("SourceCredentialsName")) { ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).SourceCredentialsName = (string) content.GetValueForProperty("SourceCredentialsName",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).SourceCredentialsName, global::System.Convert.ToString); } if (content.Contains("RegionId")) { ((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))); } if (content.Contains("RegionName")) { ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).RegionName = (string) content.GetValueForProperty("RegionName",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).RegionName, global::System.Convert.ToString); } if (content.Contains("DestinationCredentialsId")) { ((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))); } if (content.Contains("DestinationCredentialsName")) { ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).DestinationCredentialsName = (string) content.GetValueForProperty("DestinationCredentialsName",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).DestinationCredentialsName, global::System.Convert.ToString); } if (content.Contains("MigrationFrequencyMinuteFrequency")) { ((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))); } if (content.Contains("MigrationFrequencyHourlyFrequency")) { ((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))); } if (content.Contains("MigrationFrequencyDailyFrequency")) { ((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))); } if (content.Contains("MigrationFrequencyWeeklyFrequency")) { ((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))); } if (content.Contains("MigrationFrequencyWeeklyFrequencyDays")) { ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyWeeklyFrequencyDays = (System.Collections.Generic.List<string>) content.GetValueForProperty("MigrationFrequencyWeeklyFrequencyDays",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyWeeklyFrequencyDays, __y => TypeConverterExtensions.SelectToList<string>(__y, global::System.Convert.ToString)); } if (content.Contains("MigrationFrequencyMonthlyFrequency")) { ((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))); } if (content.Contains("MigrationFrequencyMonthlyFrequencyWeekOfMonth")) { ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyMonthlyFrequencyWeekOfMonth = (string) content.GetValueForProperty("MigrationFrequencyMonthlyFrequencyWeekOfMonth",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyMonthlyFrequencyWeekOfMonth, global::System.Convert.ToString); } if (content.Contains("MigrationFrequencyMonthlyFrequencyDayOfWeek")) { ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyMonthlyFrequencyDayOfWeek = (string) content.GetValueForProperty("MigrationFrequencyMonthlyFrequencyDayOfWeek",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyMonthlyFrequencyDayOfWeek, global::System.Convert.ToString); } if (content.Contains("MigrationFrequencyMonthlyFrequencyDayOfMonth")) { ((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))); } if (content.Contains("MigrationFrequencyYearlyFrequencyWeekOfMonth")) { ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyYearlyFrequencyWeekOfMonth = (string) content.GetValueForProperty("MigrationFrequencyYearlyFrequencyWeekOfMonth",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyYearlyFrequencyWeekOfMonth, global::System.Convert.ToString); } if (content.Contains("MigrationFrequencyYearlyFrequencyDayOfWeek")) { ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyYearlyFrequencyDayOfWeek = (string) content.GetValueForProperty("MigrationFrequencyYearlyFrequencyDayOfWeek",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyYearlyFrequencyDayOfWeek, global::System.Convert.ToString); } if (content.Contains("MigrationFrequencyYearlyFrequencyDayOfMonth")) { ((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))); } if (content.Contains("MigrationFrequencyYearlyFrequencyMonthOfYear")) { ((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyYearlyFrequencyMonthOfYear = (string) content.GetValueForProperty("MigrationFrequencyYearlyFrequencyMonthOfYear",((Commvault.Powershell.Models.IMigrationConfigurationInternal)this).MigrationFrequencyYearlyFrequencyMonthOfYear, global::System.Convert.ToString); } if (content.Contains("MigrationFrequencyStartTime")) { ((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(); public override string ToString() { var returnNow = false; var result = global::System.String.Empty; OverrideToString(ref result, ref returnNow); if (returnNow) { return result; } return ToJsonString(); } } /// Configuration for Migration to Azure [System.ComponentModel.TypeConverter(typeof(MigrationConfigurationTypeConverter))] public partial interface IMigrationConfiguration { } } |