/// <summary> /// Serializes this instance of <see cref="OperationDisplay" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.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.ServiceLinker.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="OperationDisplay" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._provider)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonString(this._provider.ToString()) : null, "provider", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._resource)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonString(this._resource.ToString()) : null, "resource", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._operation)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonString(this._operation.ToString()) : null, "operation", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonString(this._description.ToString()) : null, "description", container.Add); } AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="SourceConfiguration" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.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.ServiceLinker.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="SourceConfiguration" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } AddIf(null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonString(this._name.ToString()) : null, "name", container.Add); AddIf(null != (((object)this._value)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonString(this._value.ToString()) : null, "value", container.Add); AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="ServicePrincipalCertificateAuthInfo" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode" /// />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.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.ServiceLinker.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="ServicePrincipalCertificateAuthInfo" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } __authInfoBase?.ToJson(container, serializationMode); AddIf(null != (((object)this._clientId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonString(this._clientId.ToString()) : null, "clientId", container.Add); AddIf(null != (((object)this._principalId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonString(this._principalId.ToString()) : null, "principalId", container.Add); AddIf(null != (((object)this._certificate)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonString(this._certificate.ToString()) : null, "certificate", container.Add); AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="LinkerPatch" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.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.ServiceLinker.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="LinkerPatch" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } AddIf(null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode) this._property.ToJson(null, serializationMode) : null, "properties", container.Add); AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="OperationListResult" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.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.ServiceLinker.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="OperationListResult" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.SerializationMode.IncludeReadOnly)) { if (null != this._value) { var __w = new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.XNodeArray(); foreach (var __x in this._value) { AddIf(__x?.ToJson(null, serializationMode), __w.Add); } container.Add("value", __w); } } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink", container.Add); } AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="Any" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.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.ServiceLinker.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="Any" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.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="AzureKeyVaultProperties" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.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.ServiceLinker.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="AzureKeyVaultProperties" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } __azureResourcePropertiesBase?.ToJson(container, serializationMode); AddIf(null != this._connectAsKubernetesCsiDriver ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonBoolean((bool)this._connectAsKubernetesCsiDriver) : null, "connectAsKubernetesCsiDriver", container.Add); AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="ErrorDetail" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.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.ServiceLinker.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="ErrorDetail" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonString(this._code.ToString()) : null, "code", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonString(this._message.ToString()) : null, "message", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._target)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonString(this._target.ToString()) : null, "target", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.SerializationMode.IncludeReadOnly)) { if (null != this._detail) { var __w = new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.XNodeArray(); foreach (var __x in this._detail) { AddIf(__x?.ToJson(null, serializationMode), __w.Add); } container.Add("details", __w); } } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.SerializationMode.IncludeReadOnly)) { if (null != this._additionalInfo) { var __r = new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.XNodeArray(); foreach (var __s in this._additionalInfo) { AddIf(__s?.ToJson(null, serializationMode), __r.Add); } container.Add("additionalInfo", __r); } } AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="SourceConfigurationResult" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.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.ServiceLinker.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="SourceConfigurationResult" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } if (null != this._configuration) { var __w = new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.XNodeArray(); foreach (var __x in this._configuration) { AddIf(__x?.ToJson(null, serializationMode), __w.Add); } container.Add("configurations", __w); } AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="ValidateResult" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.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.ServiceLinker.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="ValidateResult" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } AddIf(null != (((object)this._linkerName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonString(this._linkerName.ToString()) : null, "linkerName", container.Add); AddIf(null != this._isConnectionAvailable ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonBoolean((bool)this._isConnectionAvailable) : null, "isConnectionAvailable", container.Add); AddIf(null != this._reportStartTimeUtc ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonString(this._reportStartTimeUtc?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK", global::System.Globalization.CultureInfo.InvariantCulture)) : null, "reportStartTimeUtc", container.Add); AddIf(null != this._reportEndTimeUtc ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonString(this._reportEndTimeUtc?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK", global::System.Globalization.CultureInfo.InvariantCulture)) : null, "reportEndTimeUtc", container.Add); AddIf(null != (((object)this._sourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonString(this._sourceId.ToString()) : null, "sourceId", container.Add); AddIf(null != (((object)this._targetId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonString(this._targetId.ToString()) : null, "targetId", container.Add); AddIf(null != (((object)this._authType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonString(this._authType.ToString()) : null, "authType", container.Add); if (null != this._validationDetail) { var __w = new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.XNodeArray(); foreach (var __x in this._validationDetail) { AddIf(__x?.ToJson(null, serializationMode), __w.Add); } container.Add("validationDetail", __w); } AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="Resource" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.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.ServiceLinker.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="Resource" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonString(this._id.ToString()) : null, "id", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonString(this._name.ToString()) : null, "name", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonString(this._type.ToString()) : null, "type", container.Add); } AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="LinkerResource" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.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.ServiceLinker.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="LinkerResource" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } __resource?.ToJson(container, serializationMode); AddIf(null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode) this._property.ToJson(null, serializationMode) : null, "properties", container.Add); if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode) this._systemData.ToJson(null, serializationMode) : null, "systemData", container.Add); } AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="LinkerProperties" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.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.ServiceLinker.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="LinkerProperties" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } AddIf(null != this._vNetSolution ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode) this._vNetSolution.ToJson(null, serializationMode) : null, "vNetSolution", container.Add); AddIf(null != this._secretStore ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode) this._secretStore.ToJson(null, serializationMode) : null, "secretStore", container.Add); AddIf(null != this._targetService ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode) this._targetService.ToJson(null, serializationMode) : null, "targetService", container.Add); AddIf(null != this._authInfo ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode) this._authInfo.ToJson(null, serializationMode) : null, "authInfo", container.Add); AddIf(null != (((object)this._clientType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonString(this._clientType.ToString()) : null, "clientType", container.Add); if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState", container.Add); } AddIf(null != (((object)this._scope)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonString(this._scope.ToString()) : null, "scope", container.Add); AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="AzureResource" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.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.ServiceLinker.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="AzureResource" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } __targetServiceBase?.ToJson(container, serializationMode); AddIf(null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonString(this._id.ToString()) : null, "id", container.Add); AddIf(null != this._resourceProperty ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode) this._resourceProperty.ToJson(null, serializationMode) : null, "resourceProperties", container.Add); AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="SystemData" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.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.ServiceLinker.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="SystemData" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } AddIf(null != (((object)this._createdBy)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonString(this._createdBy.ToString()) : null, "createdBy", container.Add); AddIf(null != (((object)this._createdByType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonString(this._createdByType.ToString()) : null, "createdByType", container.Add); AddIf(null != this._createdAt ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonString(this._createdAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK", global::System.Globalization.CultureInfo.InvariantCulture)) : null, "createdAt", container.Add); AddIf(null != (((object)this._lastModifiedBy)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonString(this._lastModifiedBy.ToString()) : null, "lastModifiedBy", container.Add); AddIf(null != (((object)this._lastModifiedByType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonString(this._lastModifiedByType.ToString()) : null, "lastModifiedByType", container.Add); AddIf(null != this._lastModifiedAt ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonString(this._lastModifiedAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK", global::System.Globalization.CultureInfo.InvariantCulture)) : null, "lastModifiedAt", container.Add); AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="Operation" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.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.ServiceLinker.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="Operation" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } AddIf(null != this._display ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode) this._display.ToJson(null, serializationMode) : null, "display", container.Add); if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonString(this._name.ToString()) : null, "name", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != this._isDataAction ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonBoolean((bool)this._isDataAction) : null, "isDataAction", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._origin)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonString(this._origin.ToString()) : null, "origin", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._actionType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonString(this._actionType.ToString()) : null, "actionType", container.Add); } AfterToJson(ref container); return(container); }