/// <summary> /// Serializes this instance of <see cref="QuotaRequestStatusDetails" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="QuotaRequestStatusDetails" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } AddIf(null != this._limit ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) this._limit.ToJson(null, serializationMode) : null, "limit", container.Add); AddIf(null != this._name ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) this._name.ToJson(null, serializationMode) : null, "name", container.Add); if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._message.ToString()) : null, "message", container.Add); } AddIf(null != (((object)this._unit)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._unit.ToString()) : null, "unit", container.Add); AddIf(null != (((object)this._resourceType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._resourceType.ToString()) : null, "resourceType", container.Add); if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._quotaPeriod)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._quotaPeriod.ToString()) : null, "quotaPeriod", container.Add); } AddIf(null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) this._property.ToJson(null, serializationMode) : null, "properties", container.Add); AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="ServiceErrorDetail" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="ServiceErrorDetail" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._code.ToString()) : null, "code", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._message.ToString()) : null, "message", container.Add); } AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="LimitJsonObject" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="LimitJsonObject" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._type.ToString()) : null, "limitObjectType", container.Add); AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="ExceptionResponse" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="ExceptionResponse" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } AddIf(null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) this._error.ToJson(null, serializationMode) : null, "error", container.Add); AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="Any" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="Any" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="CurrentUsagesBase" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="CurrentUsagesBase" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } AddIf(null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) this._property.ToJson(null, serializationMode) : null, "properties", container.Add); if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._id.ToString()) : null, "id", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._type.ToString()) : null, "type", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._name.ToString()) : null, "name", container.Add); } AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="QuotaRequestProperties" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="QuotaRequestProperties" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } AddIf(null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) this._error.ToJson(null, serializationMode) : null, "error", container.Add); if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._message.ToString()) : null, "message", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != this._requestSubmitTime ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._requestSubmitTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK", global::System.Globalization.CultureInfo.InvariantCulture)) : null, "requestSubmitTime", container.Add); } if (null != this._value) { var __w = new Microsoft.Azure.PowerShell.Cmdlets.Quota.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); }
/// <summary> /// Serializes this instance of <see cref="QuotaLimits" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="QuotaLimits" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } if (null != this._value) { var __w = new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.XNodeArray(); foreach (var __x in this._value) { AddIf(__x?.ToJson(null, serializationMode), __w.Add); } container.Add("value", __w); } AddIf(null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink", container.Add); AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="OperationDisplay" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="OperationDisplay" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } AddIf(null != (((object)this._provider)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._provider.ToString()) : null, "provider", container.Add); AddIf(null != (((object)this._resource)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._resource.ToString()) : null, "resource", container.Add); AddIf(null != (((object)this._operation)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._operation.ToString()) : null, "operation", container.Add); AddIf(null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._description.ToString()) : null, "description", container.Add); AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="OperationResponse" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="OperationResponse" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } AddIf(null != this._display ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) this._display.ToJson(null, serializationMode) : null, "display", container.Add); AddIf(null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._name.ToString()) : null, "name", container.Add); AddIf(null != (((object)this._origin)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._origin.ToString()) : null, "origin", container.Add); AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="QuotaRequestOneResourceProperties" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Quota.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.Quota.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="QuotaRequestOneResourceProperties" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } AddIf(null != this._limit ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) this._limit.ToJson(null, serializationMode) : null, "limit", container.Add); AddIf(null != this._name ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) this._name.ToJson(null, serializationMode) : null, "name", container.Add); AddIf(null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) this._error.ToJson(null, serializationMode) : null, "error", container.Add); if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._message.ToString()) : null, "message", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != this._requestSubmitTime ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._requestSubmitTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK", global::System.Globalization.CultureInfo.InvariantCulture)) : null, "requestSubmitTime", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != this._currentValue ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNumber((int)this._currentValue) : null, "currentValue", container.Add); } AddIf(null != (((object)this._unit)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._unit.ToString()) : null, "unit", container.Add); AddIf(null != (((object)this._resourceType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._resourceType.ToString()) : null, "resourceType", container.Add); if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._quotaPeriod)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonString(this._quotaPeriod.ToString()) : null, "quotaPeriod", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != this._isQuotaApplicable ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonBoolean((bool)this._isQuotaApplicable) : null, "isQuotaApplicable", container.Add); } AddIf(null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.Json.JsonNode) this._property.ToJson(null, serializationMode) : null, "properties", container.Add); AfterToJson(ref container); return(container); }