/// <summary> /// Serializes this instance of <see cref="OperationList" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Purview.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.Purview.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="OperationList" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } AddIf(null != this._count ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNumber((long)this._count) : null, "count", container.Add); AddIf(null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink", container.Add); if (null != this._value) { var __w = new Microsoft.Azure.PowerShell.Cmdlets.Purview.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="OperationMetaServiceSpecification" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Purview.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.Purview.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="OperationMetaServiceSpecification" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } if (null != this._logSpecification) { var __w = new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.XNodeArray(); foreach (var __x in this._logSpecification) { AddIf(__x?.ToJson(null, serializationMode), __w.Add); } container.Add("logSpecifications", __w); } if (null != this._metricSpecification) { var __r = new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.XNodeArray(); foreach (var __s in this._metricSpecification) { AddIf(__s?.ToJson(null, serializationMode), __r.Add); } container.Add("metricSpecifications", __r); } AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="AccountProperties" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Purview.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.Purview.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="AccountProperties" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } AddIf(null != this._cloudConnector ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) this._cloudConnector.ToJson(null, serializationMode) : null, "cloudConnectors", container.Add); if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != this._endpoint ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) this._endpoint.ToJson(null, serializationMode) : null, "endpoints", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != this._managedResource ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) this._managedResource.ToJson(null, serializationMode) : null, "managedResources", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != this._createdAt ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonString(this._createdAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK", global::System.Globalization.CultureInfo.InvariantCulture)) : null, "createdAt", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._createdBy)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonString(this._createdBy.ToString()) : null, "createdBy", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._createdByObjectId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonString(this._createdByObjectId.ToString()) : null, "createdByObjectId", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._friendlyName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonString(this._friendlyName.ToString()) : null, "friendlyName", container.Add); } AddIf(null != (((object)this._managedResourceGroupName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonString(this._managedResourceGroupName.ToString()) : null, "managedResourceGroupName", container.Add); if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.SerializationMode.IncludeReadOnly)) { if (null != this._privateEndpointConnection) { var __w = new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.XNodeArray(); foreach (var __x in this._privateEndpointConnection) { AddIf(__x?.ToJson(null, serializationMode), __w.Add); } container.Add("privateEndpointConnections", __w); } } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState", container.Add); } AddIf(null != (((object)this._publicNetworkAccess)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonString(this._publicNetworkAccess.ToString()) : null, "publicNetworkAccess", container.Add); AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="OperationMetaMetricSpecification" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Purview.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.Purview.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="OperationMetaMetricSpecification" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } AddIf(null != (((object)this._aggregationType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonString(this._aggregationType.ToString()) : null, "aggregationType", container.Add); if (null != this._dimension) { var __w = new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.XNodeArray(); foreach (var __x in this._dimension) { AddIf(__x?.ToJson(null, serializationMode), __w.Add); } container.Add("dimensions", __w); } AddIf(null != (((object)this._displayDescription)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonString(this._displayDescription.ToString()) : null, "displayDescription", container.Add); AddIf(null != (((object)this._displayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonString(this._displayName.ToString()) : null, "displayName", container.Add); AddIf(null != (((object)this._enableRegionalMdmAccount)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonString(this._enableRegionalMdmAccount.ToString()) : null, "enableRegionalMdmAccount", container.Add); AddIf(null != (((object)this._internalMetricName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonString(this._internalMetricName.ToString()) : null, "internalMetricName", container.Add); AddIf(null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonString(this._name.ToString()) : null, "name", container.Add); AddIf(null != (((object)this._resourceIdDimensionNameOverride)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonString(this._resourceIdDimensionNameOverride.ToString()) : null, "resourceIdDimensionNameOverride", container.Add); AddIf(null != (((object)this._sourceMdmNamespace)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonString(this._sourceMdmNamespace.ToString()) : null, "sourceMdmNamespace", container.Add); if (null != this._supportedAggregationType) { var __r = new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.XNodeArray(); foreach (var __s in this._supportedAggregationType) { AddIf(null != (((object)__s)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonString(__s.ToString()) : null, __r.Add); } container.Add("supportedAggregationTypes", __r); } if (null != this._supportedTimeGrainType) { var __m = new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.XNodeArray(); foreach (var __n in this._supportedTimeGrainType) { AddIf(null != (((object)__n)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonString(__n.ToString()) : null, __m.Add); } container.Add("supportedTimeGrainTypes", __m); } AddIf(null != (((object)this._unit)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonString(this._unit.ToString()) : null, "unit", container.Add); AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="PrivateLinkResourceProperties" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Purview.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.Purview.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="PrivateLinkResourceProperties" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._groupId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonString(this._groupId.ToString()) : null, "groupId", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.SerializationMode.IncludeReadOnly)) { if (null != this._requiredMember) { var __w = new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.XNodeArray(); foreach (var __x in this._requiredMember) { AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonString(__x.ToString()) : null, __w.Add); } container.Add("requiredMembers", __w); } } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.SerializationMode.IncludeReadOnly)) { if (null != this._requiredZoneName) { var __r = new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.XNodeArray(); foreach (var __s in this._requiredZoneName) { AddIf(null != (((object)__s)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonString(__s.ToString()) : null, __r.Add); } container.Add("requiredZoneNames", __r); } } AfterToJson(ref container); return(container); }
/// <summary> /// Serializes this instance of <see cref="ErrorModel" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Purview.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.Purview.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="ErrorModel" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return(container); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonString(this._code.ToString()) : null, "code", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.SerializationMode.IncludeReadOnly)) { if (null != this._detail) { var __w = new Microsoft.Azure.PowerShell.Cmdlets.Purview.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.Purview.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonString(this._message.ToString()) : null, "message", container.Add); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.SerializationMode.IncludeReadOnly)) { AddIf(null != (((object)this._target)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonString(this._target.ToString()) : null, "target", container.Add); } AfterToJson(ref container); return(container); }