示例#1
0
        /// <summary>
        /// Serializes this instance of <see cref="RestoreJobRecoveryPointDetails" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject"/> container to serialize this object into. If the caller
        /// passes in <c>null</c>, a new instance will be created and returned to the caller.</param>
        /// <param name="serializationMode">Allows the caller to choose the depth of the serialization. See <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="RestoreJobRecoveryPointDetails" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AddIf(null != (((object)this._recoveryPointId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._recoveryPointId.ToString()) : null, "recoveryPointID", container.Add);
            AddIf(null != this._recoveryPointTime ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._recoveryPointTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK", global::System.Globalization.CultureInfo.InvariantCulture)) : null, "recoveryPointTime", container.Add);
            AfterToJson(ref container);
            return(container);
        }
示例#2
0
        /// <summary>
        /// Serializes this instance of <see cref="ScheduleBasedBackupCriteria" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject"/> container to serialize this object into. If the caller
        /// passes in <c>null</c>, a new instance will be created and returned to the caller.</param>
        /// <param name="serializationMode">Allows the caller to choose the depth of the serialization. See <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="ScheduleBasedBackupCriteria" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            __backupCriteria?.ToJson(container, serializationMode);
            if (null != this._absoluteCriterion)
            {
                var __w = new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.XNodeArray();
                foreach (var __x in this._absoluteCriterion)
                {
                    AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(__x.ToString()) : null, __w.Add);
                }
                container.Add("absoluteCriteria", __w);
            }
            if (null != this._daysOfMonth)
            {
                var __r = new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.XNodeArray();
                foreach (var __s in this._daysOfMonth)
                {
                    AddIf(__s?.ToJson(null, serializationMode), __r.Add);
                }
                container.Add("daysOfMonth", __r);
            }
            if (null != this._daysOfTheWeek)
            {
                var __m = new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.XNodeArray();
                foreach (var __n in this._daysOfTheWeek)
                {
                    AddIf(null != (((object)__n)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(__n.ToString()) : null, __m.Add);
                }
                container.Add("daysOfTheWeek", __m);
            }
            if (null != this._monthsOfYear)
            {
                var __h = new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.XNodeArray();
                foreach (var __i in this._monthsOfYear)
                {
                    AddIf(null != (((object)__i)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(__i.ToString()) : null, __h.Add);
                }
                container.Add("monthsOfYear", __h);
            }
            if (null != this._scheduleTime)
            {
                var __c = new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.XNodeArray();
                foreach (var __d in this._scheduleTime)
                {
                    AddIf((Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(__d.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK", global::System.Globalization.CultureInfo.InvariantCulture)), __c.Add);
                }
                container.Add("scheduleTimes", __c);
            }
            if (null != this._weeksOfTheMonth)
            {
                var ___x = new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.XNodeArray();
                foreach (var ___y in this._weeksOfTheMonth)
                {
                    AddIf(null != (((object)___y)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(___y.ToString()) : null, ___x.Add);
                }
                container.Add("weeksOfTheMonth", ___x);
            }
            AfterToJson(ref container);
            return(container);
        }
        /// <summary>
        /// Serializes this instance of <see cref="AzureBackupRestoreWithRehydrationRequest" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode"
        /// />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject"/> container to serialize this object into. If the caller
        /// passes in <c>null</c>, a new instance will be created and returned to the caller.</param>
        /// <param name="serializationMode">Allows the caller to choose the depth of the serialization. See <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="AzureBackupRestoreWithRehydrationRequest" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode"
        /// />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            __azureBackupRecoveryPointBasedRestoreRequest?.ToJson(container, serializationMode);
            AddIf(null != (((object)this._rehydrationPriority)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._rehydrationPriority.ToString()) : null, "rehydrationPriority", container.Add);
            AddIf(null != (((object)this._rehydrationRetentionDuration)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._rehydrationRetentionDuration.ToString()) : null, "rehydrationRetentionDuration", container.Add);
            AfterToJson(ref container);
            return(container);
        }
示例#4
0
        /// <summary>
        /// Serializes this instance of <see cref="TriggerContext" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject"/> container to serialize this object into. If the caller
        /// passes in <c>null</c>, a new instance will be created and returned to the caller.</param>
        /// <param name="serializationMode">Allows the caller to choose the depth of the serialization. See <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="TriggerContext" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AddIf(null != (((object)this._objectType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._objectType.ToString()) : null, "objectType", container.Add);
            AfterToJson(ref container);
            return(container);
        }
        /// <summary>
        /// Serializes this instance of <see cref="AdhocBasedTaggingCriteria" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject"/> container to serialize this object into. If the caller
        /// passes in <c>null</c>, a new instance will be created and returned to the caller.</param>
        /// <param name="serializationMode">Allows the caller to choose the depth of the serialization. See <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="AdhocBasedTaggingCriteria" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AddIf(null != this._tagInfo ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) this._tagInfo.ToJson(null, serializationMode) : null, "tagInfo", container.Add);
            AfterToJson(ref container);
            return(container);
        }
示例#6
0
        /// <summary>
        /// Serializes this instance of <see cref="TaggingCriteria" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject"/> container to serialize this object into. If the caller
        /// passes in <c>null</c>, a new instance will be created and returned to the caller.</param>
        /// <param name="serializationMode">Allows the caller to choose the depth of the serialization. See <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="TaggingCriteria" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AddIf(null != this._tagInfo ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) this._tagInfo.ToJson(null, serializationMode) : null, "tagInfo", container.Add);
            if (null != this._criterion)
            {
                var __w = new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.XNodeArray();
                foreach (var __x in this._criterion)
                {
                    AddIf(__x?.ToJson(null, serializationMode), __w.Add);
                }
                container.Add("criteria", __w);
            }
            AddIf((Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonBoolean(this._isDefault), "isDefault", container.Add);
            AddIf((Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNumber(this._taggingPriority), "taggingPriority", container.Add);
            AfterToJson(ref container);
            return(container);
        }
        /// <summary>
        /// Serializes this instance of <see cref="RecoveryPointDataStoreDetails" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject"/> container to serialize this object into. If the caller
        /// passes in <c>null</c>, a new instance will be created and returned to the caller.</param>
        /// <param name="serializationMode">Allows the caller to choose the depth of the serialization. See <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="RecoveryPointDataStoreDetails" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AddIf(null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._type.ToString()) : null, "type", container.Add);
            AddIf(null != this._creationTime ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._creationTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK", global::System.Globalization.CultureInfo.InvariantCulture)) : null, "creationTime", container.Add);
            AddIf(null != this._expiryTime ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._expiryTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK", global::System.Globalization.CultureInfo.InvariantCulture)) : null, "expiryTime", container.Add);
            AddIf(null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._id.ToString()) : null, "id", container.Add);
            AddIf(null != (((object)this._metaData)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._metaData.ToString()) : null, "metaData", container.Add);
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != this._rehydrationExpiryTime ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._rehydrationExpiryTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK", global::System.Globalization.CultureInfo.InvariantCulture)) : null, "rehydrationExpiryTime", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._rehydrationStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._rehydrationStatus.ToString()) : null, "rehydrationStatus", container.Add);
            }
            AddIf(null != (((object)this._state)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._state.ToString()) : null, "state", container.Add);
            AddIf(null != this._visible ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonBoolean((bool)this._visible) : null, "visible", container.Add);
            AfterToJson(ref container);
            return(container);
        }
示例#8
0
        /// <summary>
        /// Serializes this instance of <see cref="BackupSchedule" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject"/> container to serialize this object into. If the caller
        /// passes in <c>null</c>, a new instance will be created and returned to the caller.</param>
        /// <param name="serializationMode">Allows the caller to choose the depth of the serialization. See <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="BackupSchedule" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            if (null != this._repeatingTimeInterval)
            {
                var __w = new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.XNodeArray();
                foreach (var __x in this._repeatingTimeInterval)
                {
                    AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(__x.ToString()) : null, __w.Add);
                }
                container.Add("repeatingTimeIntervals", __w);
            }
            AfterToJson(ref container);
            return(container);
        }
        /// <summary>
        /// Serializes this instance of <see cref="JobSubTaskAdditionalDetails" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject"/> container to serialize this object into. If the caller
        /// passes in <c>null</c>, a new instance will be created and returned to the caller.</param>
        /// <param name="serializationMode">Allows the caller to choose the depth of the serialization. See <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="JobSubTaskAdditionalDetails" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.JsonSerializable.ToJson(((Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.IAssociativeArray <string>) this).AdditionalProperties, container);
            AfterToJson(ref container);
            return(container);
        }
示例#10
0
        /// <summary>
        /// Serializes this instance of <see cref="AzureBackupRule" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject"/> container to serialize this object into. If the caller
        /// passes in <c>null</c>, a new instance will be created and returned to the caller.</param>
        /// <param name="serializationMode">Allows the caller to choose the depth of the serialization. See <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="AzureBackupRule" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            __basePolicyRule?.ToJson(container, serializationMode);
            AddIf(null != this._backupParameter ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) this._backupParameter.ToJson(null, serializationMode) : null, "backupParameters", container.Add);
            AddIf(null != this._dataStore ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) this._dataStore.ToJson(null, serializationMode) : null, "dataStore", container.Add);
            AddIf(null != this._trigger ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) this._trigger.ToJson(null, serializationMode) : null, "trigger", container.Add);
            AfterToJson(ref container);
            return(container);
        }
示例#11
0
        /// <summary>
        /// Serializes this instance of <see cref="InnerError" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject"/> container to serialize this object into. If the caller
        /// passes in <c>null</c>, a new instance will be created and returned to the caller.</param>
        /// <param name="serializationMode">Allows the caller to choose the depth of the serialization. See <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="InnerError" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AddIf(null != this._additionalInfo ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) this._additionalInfo.ToJson(null, serializationMode) : null, "additionalInfo", container.Add);
            AddIf(null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._code.ToString()) : null, "code", container.Add);
            AddIf(null != this._embeddedInnerError ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) this._embeddedInnerError.ToJson(null, serializationMode) : null, "embeddedInnerError", container.Add);
            AfterToJson(ref container);
            return(container);
        }
示例#12
0
        /// <summary>
        /// Serializes this instance of <see cref="AzureRetentionRule" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject"/> container to serialize this object into. If the caller
        /// passes in <c>null</c>, a new instance will be created and returned to the caller.</param>
        /// <param name="serializationMode">Allows the caller to choose the depth of the serialization. See <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="AzureRetentionRule" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            __basePolicyRule?.ToJson(container, serializationMode);
            AddIf(null != this._isDefault ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonBoolean((bool)this._isDefault) : null, "isDefault", container.Add);
            if (null != this._lifecycle)
            {
                var __w = new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.XNodeArray();
                foreach (var __x in this._lifecycle)
                {
                    AddIf(__x?.ToJson(null, serializationMode), __w.Add);
                }
                container.Add("lifecycles", __w);
            }
            AfterToJson(ref container);
            return(container);
        }
        /// <summary>
        /// Serializes this instance of <see cref="ResourceOperationGateKeeperResource" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode"
        /// />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject"/> container to serialize this object into. If the caller
        /// passes in <c>null</c>, a new instance will be created and returned to the caller.</param>
        /// <param name="serializationMode">Allows the caller to choose the depth of the serialization. See <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="ResourceOperationGateKeeperResource" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            __dppTrackedResource?.ToJson(container, serializationMode);
            AddIf(null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) this._property.ToJson(null, serializationMode) : null, "properties", container.Add);
            AfterToJson(ref container);
            return(container);
        }
示例#14
0
        /// <summary>
        /// Serializes this instance of <see cref="BackupInstance" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject"/> container to serialize this object into. If the caller
        /// passes in <c>null</c>, a new instance will be created and returned to the caller.</param>
        /// <param name="serializationMode">Allows the caller to choose the depth of the serialization. See <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="BackupInstance" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AddIf(null != this._dataSourceInfo ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) this._dataSourceInfo.ToJson(null, serializationMode) : null, "dataSourceInfo", container.Add);
            AddIf(null != this._dataSourceSetInfo ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) this._dataSourceSetInfo.ToJson(null, serializationMode) : null, "dataSourceSetInfo", container.Add);
            AddIf(null != (((object)this._objectType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._objectType.ToString()) : null, "objectType", container.Add);
            AddIf(null != this._policyInfo ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) this._policyInfo.ToJson(null, serializationMode) : null, "policyInfo", container.Add);
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != this._protectionStatus ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) this._protectionStatus.ToJson(null, serializationMode) : null, "protectionStatus", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState", container.Add);
            }
            AfterToJson(ref container);
            return(container);
        }
示例#15
0
        /// <summary>
        /// Serializes this instance of <see cref="BackupVault" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject"/> container to serialize this object into. If the caller
        /// passes in <c>null</c>, a new instance will be created and returned to the caller.</param>
        /// <param name="serializationMode">Allows the caller to choose the depth of the serialization. See <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="BackupVault" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState", container.Add);
            }
            if (null != this._storageSetting)
            {
                var __w = new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.XNodeArray();
                foreach (var __x in this._storageSetting)
                {
                    AddIf(__x?.ToJson(null, serializationMode), __w.Add);
                }
                container.Add("storageSettings", __w);
            }
            AfterToJson(ref container);
            return(container);
        }
示例#16
0
        /// <summary>
        /// Serializes this instance of <see cref="AzureBackupJob" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject"/> container to serialize this object into. If the caller
        /// passes in <c>null</c>, a new instance will be created and returned to the caller.</param>
        /// <param name="serializationMode">Allows the caller to choose the depth of the serialization. See <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="AzureBackupJob" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != this._extendedInfo ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) this._extendedInfo.ToJson(null, serializationMode) : null, "extendedInfo", container.Add);
            }
            AddIf(null != (((object)this._activityId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._activityId.ToString()) : null, "activityID", container.Add);
            AddIf(null != (((object)this._backupInstanceFriendlyName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._backupInstanceFriendlyName.ToString()) : null, "backupInstanceFriendlyName", container.Add);
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._backupInstanceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._backupInstanceId.ToString()) : null, "backupInstanceId", container.Add);
            }
            AddIf(null != (((object)this._dataSourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._dataSourceId.ToString()) : null, "dataSourceId", container.Add);
            AddIf(null != (((object)this._dataSourceLocation)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._dataSourceLocation.ToString()) : null, "dataSourceLocation", container.Add);
            AddIf(null != (((object)this._dataSourceName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._dataSourceName.ToString()) : null, "dataSourceName", container.Add);
            AddIf(null != (((object)this._dataSourceSetName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._dataSourceSetName.ToString()) : null, "dataSourceSetName", container.Add);
            AddIf(null != (((object)this._dataSourceType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._dataSourceType.ToString()) : null, "dataSourceType", container.Add);
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf((Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode)(null != this._duration ? new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(global::System.Xml.XmlConvert.ToString((global::System.TimeSpan) this._duration)): null), "duration", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != this._endTime ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._endTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK", global::System.Globalization.CultureInfo.InvariantCulture)) : null, "endTime", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode.IncludeReadOnly))
            {
                if (null != this._errorDetail)
                {
                    var __w = new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.XNodeArray();
                    foreach (var __x in this._errorDetail)
                    {
                        AddIf(__x?.ToJson(null, serializationMode), __w.Add);
                    }
                    container.Add("errorDetails", __w);
                }
            }
            AddIf((Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonBoolean(this._isUserTriggered), "isUserTriggered", container.Add);
            AddIf(null != (((object)this._operation)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._operation.ToString()) : null, "operation", container.Add);
            AddIf(null != (((object)this._operationCategory)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._operationCategory.ToString()) : null, "operationCategory", container.Add);
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._policyId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._policyId.ToString()) : null, "policyId", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._policyName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._policyName.ToString()) : null, "policyName", container.Add);
            }
            AddIf((Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonBoolean(this._progressEnabled), "progressEnabled", container.Add);
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._progressUrl)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._progressUrl.ToString()) : null, "progressUrl", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._restoreType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._restoreType.ToString()) : null, "restoreType", container.Add);
            }
            AddIf(null != (((object)this._sourceResourceGroup)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._sourceResourceGroup.ToString()) : null, "sourceResourceGroup", container.Add);
            AddIf(null != (((object)this._sourceSubscriptionId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._sourceSubscriptionId.ToString()) : null, "sourceSubscriptionID", container.Add);
            AddIf((Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._startTime.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK", global::System.Globalization.CultureInfo.InvariantCulture)), "startTime", container.Add);
            AddIf(null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._status.ToString()) : null, "status", container.Add);
            AddIf(null != (((object)this._subscriptionId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._subscriptionId.ToString()) : null, "subscriptionId", container.Add);
            if (null != this._supportedAction)
            {
                var __r = new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.XNodeArray();
                foreach (var __s in this._supportedAction)
                {
                    AddIf(null != (((object)__s)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(__s.ToString()) : null, __r.Add);
                }
                container.Add("supportedActions", __r);
            }
            AddIf(null != (((object)this._vaultName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._vaultName.ToString()) : null, "vaultName", container.Add);
            AfterToJson(ref container);
            return(container);
        }
示例#17
0
        /// <summary>
        /// Serializes this instance of <see cref="CheckNameAvailabilityResult" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject"/> container to serialize this object into. If the caller
        /// passes in <c>null</c>, a new instance will be created and returned to the caller.</param>
        /// <param name="serializationMode">Allows the caller to choose the depth of the serialization. See <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="CheckNameAvailabilityResult" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AddIf(null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._message.ToString()) : null, "message", container.Add);
            AddIf(null != this._nameAvailable ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonBoolean((bool)this._nameAvailable) : null, "nameAvailable", container.Add);
            AddIf(null != (((object)this._reason)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._reason.ToString()) : null, "reason", container.Add);
            AfterToJson(ref container);
            return(container);
        }
示例#18
0
        /// <summary>
        /// Serializes this instance of <see cref="Error" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject"/> container to serialize this object into. If the caller
        /// passes in <c>null</c>, a new instance will be created and returned to the caller.</param>
        /// <param name="serializationMode">Allows the caller to choose the depth of the serialization. See <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="Error" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode.IncludeReadOnly))
            {
                if (null != this._additionalInfo)
                {
                    var __w = new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.XNodeArray();
                    foreach (var __x in this._additionalInfo)
                    {
                        AddIf(__x?.ToJson(null, serializationMode), __w.Add);
                    }
                    container.Add("additionalInfo", __w);
                }
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._code.ToString()) : null, "code", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._message.ToString()) : null, "message", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._target)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._target.ToString()) : null, "target", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode.IncludeReadOnly))
            {
                if (null != this._detail)
                {
                    var __r = new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.XNodeArray();
                    foreach (var __s in this._detail)
                    {
                        AddIf(__s?.ToJson(null, serializationMode), __r.Add);
                    }
                    container.Add("details", __r);
                }
            }
            AfterToJson(ref container);
            return(container);
        }
示例#19
0
        /// <summary>
        /// Serializes this instance of <see cref="ExportJobsResult" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject"/> container to serialize this object into. If the caller
        /// passes in <c>null</c>, a new instance will be created and returned to the caller.</param>
        /// <param name="serializationMode">Allows the caller to choose the depth of the serialization. See <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="ExportJobsResult" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._blobSasKey)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._blobSasKey.ToString()) : null, "blobSasKey", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._blobUrl)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._blobUrl.ToString()) : null, "blobUrl", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._excelFileBlobSasKey)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._excelFileBlobSasKey.ToString()) : null, "excelFileBlobSasKey", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._excelFileBlobUrl)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._excelFileBlobUrl.ToString()) : null, "excelFileBlobUrl", container.Add);
            }
            AfterToJson(ref container);
            return(container);
        }
示例#20
0
        /// <summary>
        /// Serializes this instance of <see cref="ResourceOperationGateKeeper" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject"/> container to serialize this object into. If the caller
        /// passes in <c>null</c>, a new instance will be created and returned to the caller.</param>
        /// <param name="serializationMode">Allows the caller to choose the depth of the serialization. See <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="ResourceOperationGateKeeper" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != this._lastLockUpdateTime ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._lastLockUpdateTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK", global::System.Globalization.CultureInfo.InvariantCulture)) : null, "lastLockUpdateTime", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode.IncludeReadOnly))
            {
                if (null != this._operation)
                {
                    var __w = new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.XNodeArray();
                    foreach (var __x in this._operation)
                    {
                        AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(__x.ToString()) : null, __w.Add);
                    }
                    container.Add("operations", __w);
                }
            }
            AfterToJson(ref container);
            return(container);
        }
示例#21
0
        /// <summary>
        /// Serializes this instance of <see cref="RetentionTag" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject"/> container to serialize this object into. If the caller
        /// passes in <c>null</c>, a new instance will be created and returned to the caller.</param>
        /// <param name="serializationMode">Allows the caller to choose the depth of the serialization. See <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="RetentionTag" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._eTag)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._eTag.ToString()) : null, "eTag", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._id.ToString()) : null, "id", container.Add);
            }
            AddIf(null != (((object)this._tagName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._tagName.ToString()) : null, "tagName", container.Add);
            AfterToJson(ref container);
            return(container);
        }
示例#22
0
        /// <summary>
        /// Serializes this instance of <see cref="ScheduleBasedTriggerContext" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject"/> container to serialize this object into. If the caller
        /// passes in <c>null</c>, a new instance will be created and returned to the caller.</param>
        /// <param name="serializationMode">Allows the caller to choose the depth of the serialization. See <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="ScheduleBasedTriggerContext" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            __triggerContext?.ToJson(container, serializationMode);
            AddIf(null != this._schedule ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) this._schedule.ToJson(null, serializationMode) : null, "schedule", container.Add);
            if (null != this._taggingCriterion)
            {
                var __w = new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.XNodeArray();
                foreach (var __x in this._taggingCriterion)
                {
                    AddIf(__x?.ToJson(null, serializationMode), __w.Add);
                }
                container.Add("taggingCriteria", __w);
            }
            AfterToJson(ref container);
            return(container);
        }
        /// <summary>
        /// Serializes this instance of <see cref="ClientDiscoveryResponse" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject"/> container to serialize this object into. If the caller
        /// passes in <c>null</c>, a new instance will be created and returned to the caller.</param>
        /// <param name="serializationMode">Allows the caller to choose the depth of the serialization. See <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="ClientDiscoveryResponse" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AddIf(null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink", container.Add);
            if (null != this._value)
            {
                var __w = new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.XNodeArray();
                foreach (var __x in this._value)
                {
                    AddIf(__x?.ToJson(null, serializationMode), __w.Add);
                }
                container.Add("value", __w);
            }
            AfterToJson(ref container);
            return(container);
        }
示例#24
0
        /// <summary>
        /// Serializes this instance of <see cref="DataProtectionBackupIdentity" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject"/> container to serialize this object into. If the caller
        /// passes in <c>null</c>, a new instance will be created and returned to the caller.</param>
        /// <param name="serializationMode">Allows the caller to choose the depth of the serialization. See <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="DataProtectionBackupIdentity" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AddIf(null != (((object)this._operationId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._operationId.ToString()) : null, "operationId", container.Add);
            AddIf(null != (((object)this._backupInstanceName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._backupInstanceName.ToString()) : null, "backupInstanceName", container.Add);
            AddIf(null != (((object)this._backupPolicyName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._backupPolicyName.ToString()) : null, "backupPolicyName", container.Add);
            AddIf(null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._id.ToString()) : null, "id", container.Add);
            AddIf(null != (((object)this._jobId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._jobId.ToString()) : null, "jobId", container.Add);
            AddIf(null != (((object)this._location)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._location.ToString()) : null, "location", container.Add);
            AddIf(null != (((object)this._recoveryPointId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._recoveryPointId.ToString()) : null, "recoveryPointId", container.Add);
            AddIf(null != (((object)this._resourceGroupName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._resourceGroupName.ToString()) : null, "resourceGroupName", container.Add);
            AddIf(null != (((object)this._resourceOperationGateKeepersName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._resourceOperationGateKeepersName.ToString()) : null, "resourceOperationGateKeepersName", container.Add);
            AddIf(null != (((object)this._subscriptionId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._subscriptionId.ToString()) : null, "subscriptionId", container.Add);
            AddIf(null != (((object)this._vaultName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._vaultName.ToString()) : null, "vaultName", container.Add);
            AfterToJson(ref container);
            return(container);
        }
示例#25
0
        /// <summary>
        /// Serializes this instance of <see cref="SourceLifeCycle" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject"/> container to serialize this object into. If the caller
        /// passes in <c>null</c>, a new instance will be created and returned to the caller.</param>
        /// <param name="serializationMode">Allows the caller to choose the depth of the serialization. See <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="SourceLifeCycle" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AddIf(null != this._deleteAfter ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) this._deleteAfter.ToJson(null, serializationMode) : null, "deleteAfter", container.Add);
            AddIf(null != this._sourceDataStore ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) this._sourceDataStore.ToJson(null, serializationMode) : null, "sourceDataStore", container.Add);
            if (null != this._targetDataStoreCopySetting)
            {
                var __w = new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.XNodeArray();
                foreach (var __x in this._targetDataStoreCopySetting)
                {
                    AddIf(__x?.ToJson(null, serializationMode), __w.Add);
                }
                container.Add("targetDataStoreCopySettings", __w);
            }
            AfterToJson(ref container);
            return(container);
        }
        /// <summary>
        /// Serializes this instance of <see cref="AzureBackupRecoveryPointResourceList" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode"
        /// />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject"/> container to serialize this object into. If the caller
        /// passes in <c>null</c>, a new instance will be created and returned to the caller.</param>
        /// <param name="serializationMode">Allows the caller to choose the depth of the serialization. See <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="AzureBackupRecoveryPointResourceList" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            __dppResourceList?.ToJson(container, serializationMode);
            if (null != this._value)
            {
                var __w = new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.XNodeArray();
                foreach (var __x in this._value)
                {
                    AddIf(__x?.ToJson(null, serializationMode), __w.Add);
                }
                container.Add("value", __w);
            }
            AfterToJson(ref container);
            return(container);
        }
示例#27
0
        /// <summary>
        /// Serializes this instance of <see cref="CopyOnExpiryOption" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject"/> container to serialize this object into. If the caller
        /// passes in <c>null</c>, a new instance will be created and returned to the caller.</param>
        /// <param name="serializationMode">Allows the caller to choose the depth of the serialization. See <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="CopyOnExpiryOption" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            __copyOption?.ToJson(container, serializationMode);
            AfterToJson(ref container);
            return(container);
        }
示例#28
0
        /// <summary>
        /// Serializes this instance of <see cref="JobExtendedInfo" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject"/> container to serialize this object into. If the caller
        /// passes in <c>null</c>, a new instance will be created and returned to the caller.</param>
        /// <param name="serializationMode">Allows the caller to choose the depth of the serialization. See <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="JobExtendedInfo" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != this._sourceRecoverPoint ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) this._sourceRecoverPoint.ToJson(null, serializationMode) : null, "sourceRecoverPoint", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != this._targetRecoverPoint ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) this._targetRecoverPoint.ToJson(null, serializationMode) : null, "targetRecoverPoint", container.Add);
            }
            AddIf(null != this._additionalDetail ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) this._additionalDetail.ToJson(null, serializationMode) : null, "additionalDetails", container.Add);
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._backupInstanceState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._backupInstanceState.ToString()) : null, "backupInstanceState", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != this._dataTransferedInByte ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNumber((double)this._dataTransferedInByte) : null, "dataTransferedInBytes", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._recoveryDestination)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._recoveryDestination.ToString()) : null, "recoveryDestination", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode.IncludeReadOnly))
            {
                if (null != this._subTask)
                {
                    var __w = new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.XNodeArray();
                    foreach (var __x in this._subTask)
                    {
                        AddIf(__x?.ToJson(null, serializationMode), __w.Add);
                    }
                    container.Add("subTasks", __w);
                }
            }
            AfterToJson(ref container);
            return(container);
        }
        /// <summary>
        /// Serializes this instance of <see cref="AzureBackupDiscreteRecoveryPoint" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject"/> container to serialize this object into. If the caller
        /// passes in <c>null</c>, a new instance will be created and returned to the caller.</param>
        /// <param name="serializationMode">Allows the caller to choose the depth of the serialization. See <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="AzureBackupDiscreteRecoveryPoint" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            __azureBackupRecoveryPoint?.ToJson(container, serializationMode);
            AddIf(null != (((object)this._friendlyName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._friendlyName.ToString()) : null, "friendlyName", container.Add);
            if (null != this._recoveryPointDataStoresDetail)
            {
                var __w = new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.XNodeArray();
                foreach (var __x in this._recoveryPointDataStoresDetail)
                {
                    AddIf(__x?.ToJson(null, serializationMode), __w.Add);
                }
                container.Add("recoveryPointDataStoresDetails", __w);
            }
            AddIf((Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._recoveryPointTime.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK", global::System.Globalization.CultureInfo.InvariantCulture)), "recoveryPointTime", container.Add);
            AddIf(null != (((object)this._recoveryPointType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._recoveryPointType.ToString()) : null, "recoveryPointType", container.Add);
            AddIf(null != (((object)this._retentionTagName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._retentionTagName.ToString()) : null, "retentionTagName", container.Add);
            AddIf(null != (((object)this._retentionTagVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._retentionTagVersion.ToString()) : null, "retentionTagVersion", container.Add);
            AfterToJson(ref container);
            return(container);
        }
示例#30
0
        /// <summary>
        /// Serializes this instance of <see cref="ClientDiscoveryValueForSingleApi" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject"/> container to serialize this object into. If the caller
        /// passes in <c>null</c>, a new instance will be created and returned to the caller.</param>
        /// <param name="serializationMode">Allows the caller to choose the depth of the serialization. See <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="ClientDiscoveryValueForSingleApi" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AddIf(null != this._display ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) this._display.ToJson(null, serializationMode) : null, "display", container.Add);
            AddIf(null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) this._property.ToJson(null, serializationMode) : null, "properties", container.Add);
            AddIf(null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._name.ToString()) : null, "name", container.Add);
            AddIf(null != (((object)this._origin)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataProtectionBackup.Runtime.Json.JsonString(this._origin.ToString()) : null, "origin", container.Add);
            AfterToJson(ref container);
            return(container);
        }