/// <summary> /// Serializes this instance of <see cref="OrganizationResourceUpdateTags" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Confluent.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.Confluent.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="OrganizationResourceUpdateTags" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.JsonSerializable.ToJson(((Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.IAssociativeArray <string>) this).AdditionalProperties, container); AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="ConfluentAgreementResource" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Confluent.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.Confluent.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="ConfluentAgreementResource" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } AddIf(null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode) this._property.ToJson(null, serializationMode) : null, "properties", container.Add); if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonString(this._id.ToString()) : null, "id", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonString(this._name.ToString()) : null, "name", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonString(this._type.ToString()) : null, "type", container.Add); } AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="OrganizationResourceListResult" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Confluent.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.Confluent.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="OrganizationResourceListResult" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Confluent.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.Confluent.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.Confluent.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink", container.Add); AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="OfferDetail" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Confluent.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.Confluent.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="OfferDetail" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } AddIf(null != (((object)this._publisherId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonString(this._publisherId.ToString()) : null, "publisherId", container.Add); AddIf(null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonString(this._id.ToString()) : null, "id", container.Add); AddIf(null != (((object)this._planId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonString(this._planId.ToString()) : null, "planId", container.Add); AddIf(null != (((object)this._planName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonString(this._planName.ToString()) : null, "planName", container.Add); AddIf(null != (((object)this._termUnit)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonString(this._termUnit.ToString()) : null, "termUnit", container.Add); AddIf(null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonString(this._status.ToString()) : null, "status", container.Add); AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="UserDetail" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Confluent.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.Confluent.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="UserDetail" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } AddIf(null != (((object)this._firstName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonString(this._firstName.ToString()) : null, "firstName", container.Add); AddIf(null != (((object)this._lastName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonString(this._lastName.ToString()) : null, "lastName", container.Add); AddIf(null != (((object)this._emailAddress)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonString(this._emailAddress.ToString()) : null, "emailAddress", container.Add); AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="OperationResult" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Confluent.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.Confluent.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="OperationResult" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } AddIf(null != this._display ? (Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode) this._display.ToJson(null, serializationMode) : null, "display", container.Add); AddIf(null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonString(this._name.ToString()) : null, "name", container.Add); AddIf(null != this._isDataAction ? (Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonBoolean((bool)this._isDataAction) : null, "isDataAction", container.Add); AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="OrganizationResourcePropertiesUserDetail" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode" /// />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Confluent.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.Confluent.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="OrganizationResourcePropertiesUserDetail" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode" /// />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } __userDetail?.ToJson(container, serializationMode); AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="OrganizationResourceUpdate" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Confluent.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.Confluent.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="OrganizationResourceUpdate" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } AddIf(null != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode) this._tag.ToJson(null, serializationMode) : null, "tags", container.Add); AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="OrganizationResourceProperties" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Confluent.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.Confluent.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="OrganizationResourceProperties" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } AddIf(null != this._offerDetail ? (Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode) this._offerDetail.ToJson(null, serializationMode) : null, "offerDetail", container.Add); AddIf(null != this._userDetail ? (Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode) this._userDetail.ToJson(null, serializationMode) : null, "userDetail", container.Add); if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != this._createdTime ? (Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonString(this._createdTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK", global::System.Globalization.CultureInfo.InvariantCulture)) : null, "createdTime", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._organizationId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonString(this._organizationId.ToString()) : null, "organizationId", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._ssoUrl)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonString(this._ssoUrl.ToString()) : null, "ssoUrl", container.Add); } AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="ErrorResponseBody" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Confluent.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.Confluent.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="ErrorResponseBody" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonString(this._code.ToString()) : null, "code", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonString(this._message.ToString()) : null, "message", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._target)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonString(this._target.ToString()) : null, "target", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.SerializationMode.IncludeReadOnly)) { if (null != this._detail) { var __w = new Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.XNodeArray(); foreach (var __x in this._detail) { AddIf(__x?.ToJson(null, serializationMode), __w.Add); } container.Add("details", __w); } } AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="ResourceProviderDefaultErrorResponse" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode" /// />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Confluent.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.Confluent.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="ResourceProviderDefaultErrorResponse" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode) this._error.ToJson(null, serializationMode) : null, "error", container.Add); } AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="OperationDisplay" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Confluent.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.Confluent.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="OperationDisplay" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Confluent.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.Confluent.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonString(this._provider.ToString()) : null, "provider", container.Add); AddIf(null != (((object)this._resource)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonString(this._resource.ToString()) : null, "resource", container.Add); AddIf(null != (((object)this._operation)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonString(this._operation.ToString()) : null, "operation", container.Add); AddIf(null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonString(this._description.ToString()) : null, "description", container.Add); AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="ConfluentAgreementProperties" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Confluent.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.Confluent.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="ConfluentAgreementProperties" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } AddIf(null != (((object)this._publisher)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonString(this._publisher.ToString()) : null, "publisher", container.Add); AddIf(null != (((object)this._product)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonString(this._product.ToString()) : null, "product", container.Add); AddIf(null != (((object)this._plan)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonString(this._plan.ToString()) : null, "plan", container.Add); AddIf(null != (((object)this._licenseTextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonString(this._licenseTextLink.ToString()) : null, "licenseTextLink", container.Add); AddIf(null != (((object)this._privacyPolicyLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonString(this._privacyPolicyLink.ToString()) : null, "privacyPolicyLink", container.Add); AddIf(null != this._retrieveDatetime ? (Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonString(this._retrieveDatetime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK", global::System.Globalization.CultureInfo.InvariantCulture)) : null, "retrieveDatetime", container.Add); AddIf(null != (((object)this._signature)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonString(this._signature.ToString()) : null, "signature", container.Add); AddIf(null != this._accepted ? (Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonBoolean((bool)this._accepted) : null, "accepted", container.Add); AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="ConfluentIdentity" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Confluent.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.Confluent.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="ConfluentIdentity" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } AddIf(null != (((object)this._subscriptionId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonString(this._subscriptionId.ToString()) : null, "subscriptionId", container.Add); AddIf(null != (((object)this._resourceGroupName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonString(this._resourceGroupName.ToString()) : null, "resourceGroupName", container.Add); AddIf(null != (((object)this._organizationName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonString(this._organizationName.ToString()) : null, "organizationName", container.Add); AddIf(null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Confluent.Runtime.Json.JsonString(this._id.ToString()) : null, "id", container.Add); AfterToJson(ref container); return(container); }