Beispiel #1
0
        /// <summary>
        /// Serializes this instance of <see cref="Operation" /> 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="Operation" /> 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._display ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) this._display.ToJson(null, serializationMode) : null, "display", container.Add);
            AddIf(null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) this._property.ToJson(null, serializationMode) : null, "properties", container.Add);
            AddIf(null != this._isDataAction ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonBoolean((bool)this._isDataAction) : null, "isDataAction", 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._origin)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonString(this._origin.ToString()) : null, "origin", container.Add);
            AfterToJson(ref container);
            return(container);
        }
Beispiel #2
0
        /// <summary>
        /// Serializes this instance of <see cref="PrivateEndpointConnectionProperties" /> 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="PrivateEndpointConnectionProperties" /> 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._privateEndpoint ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) this._privateEndpoint.ToJson(null, serializationMode) : null, "privateEndpoint", container.Add);
            AddIf(null != this._privateLinkServiceConnectionState ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) this._privateLinkServiceConnectionState.ToJson(null, serializationMode) : null, "privateLinkServiceConnectionState", container.Add);
            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);
            }
            AfterToJson(ref container);
            return(container);
        }
Beispiel #3
0
        /// <summary>
        /// Serializes this instance of <see cref="DimensionProperties" /> 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="DimensionProperties" /> 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._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._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 != this._toBeExportedForCustomer ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonBoolean((bool)this._toBeExportedForCustomer) : null, "toBeExportedForCustomer", container.Add);
            AfterToJson(ref container);
            return(container);
        }
Beispiel #4
0
        /// <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="TrackedResourceTags" /> 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="TrackedResourceTags" /> 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);
            }
            Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.JsonSerializable.ToJson(((Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.IAssociativeArray <string>) this).AdditionalProperties, container);
            AfterToJson(ref container);
            return(container);
        }
        /// <summary>
        /// Serializes this instance of <see cref="CollectionAdminUpdate" /> 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="CollectionAdminUpdate" /> 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._objectId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonString(this._objectId.ToString()) : null, "objectId", container.Add);
            AfterToJson(ref container);
            return(container);
        }
        /// <summary>
        /// Serializes this instance of <see cref="SystemData" /> 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="SystemData" /> 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 != 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._createdByType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonString(this._createdByType.ToString()) : null, "createdByType", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != this._lastModifiedAt ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonString(this._lastModifiedAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK", global::System.Globalization.CultureInfo.InvariantCulture)) : null, "lastModifiedAt", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._lastModifiedBy)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonString(this._lastModifiedBy.ToString()) : null, "lastModifiedBy", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._lastModifiedByType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonString(this._lastModifiedByType.ToString()) : null, "lastModifiedByType", container.Add);
            }
            AfterToJson(ref container);
            return(container);
        }
        /// <summary>
        /// Serializes this instance of <see cref="AccountPropertiesManagedResources" /> 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="AccountPropertiesManagedResources" /> 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);
            }
            __managedResources?.ToJson(container, serializationMode);
            AfterToJson(ref container);
            return(container);
        }
        /// <summary>
        /// Serializes this instance of <see cref="TrackedResource" /> 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="TrackedResource" /> 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._identity ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) this._identity.ToJson(null, serializationMode) : null, "identity", container.Add);
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) this._systemData.ToJson(null, serializationMode) : null, "systemData", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonString(this._id.ToString()) : null, "id", container.Add);
            }
            AddIf(null != (((object)this._location)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonString(this._location.ToString()) : null, "location", container.Add);
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.SerializationMode.IncludeReadOnly))
            {
                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 != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) this._tag.ToJson(null, serializationMode) : null, "tags", container.Add);
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonString(this._type.ToString()) : null, "type", container.Add);
            }
            AfterToJson(ref container);
            return(container);
        }
Beispiel #10
0
        /// <summary>
        /// Serializes this instance of <see cref="Identity" /> 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="Identity" /> 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._principalId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonString(this._principalId.ToString()) : null, "principalId", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._tenantId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonString(this._tenantId.ToString()) : null, "tenantId", container.Add);
            }
            AddIf(null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonString(this._type.ToString()) : null, "type", container.Add);
            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);
        }
Beispiel #12
0
        /// <summary>
        /// Serializes this instance of <see cref="OperationProperties" /> 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="OperationProperties" /> 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._serviceSpecification ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) this._serviceSpecification.ToJson(null, serializationMode) : null, "serviceSpecification", container.Add);
            AfterToJson(ref container);
            return(container);
        }
Beispiel #13
0
        /// <summary>
        /// Serializes this instance of <see cref="DefaultAccountPayload" /> 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="DefaultAccountPayload" /> 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._accountName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonString(this._accountName.ToString()) : null, "accountName", container.Add);
            AddIf(null != (((object)this._resourceGroupName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonString(this._resourceGroupName.ToString()) : null, "resourceGroupName", container.Add);
            AddIf(null != (((object)this._scope)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonString(this._scope.ToString()) : null, "scope", container.Add);
            AddIf(null != (((object)this._scopeTenantId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonString(this._scopeTenantId.ToString()) : null, "scopeTenantId", container.Add);
            AddIf(null != (((object)this._scopeType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonString(this._scopeType.ToString()) : null, "scopeType", container.Add);
            AddIf(null != (((object)this._subscriptionId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonString(this._subscriptionId.ToString()) : null, "subscriptionId", container.Add);
            AfterToJson(ref container);
            return(container);
        }
        /// <summary>
        /// Serializes this instance of <see cref="PrivateEndpointConnection" /> 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="PrivateEndpointConnection" /> 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);
            }
            __proxyResource?.ToJson(container, serializationMode);
            AddIf(null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) this._property.ToJson(null, serializationMode) : null, "properties", 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);
        }
Beispiel #16
0
        /// <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);
        }
Beispiel #17
0
        /// <summary>
        /// Serializes this instance of <see cref="CheckNameAvailabilityResult" /> 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="CheckNameAvailabilityResult" /> 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._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);
            AddIf(null != this._nameAvailable ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonBoolean((bool)this._nameAvailable) : null, "nameAvailable", container.Add);
            AddIf(null != (((object)this._reason)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonString(this._reason.ToString()) : null, "reason", container.Add);
            AfterToJson(ref container);
            return(container);
        }
        /// <summary>
        /// Serializes this instance of <see cref="ManagedResources" /> 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="ManagedResources" /> 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._eventHubNamespace)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonString(this._eventHubNamespace.ToString()) : null, "eventHubNamespace", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._resourceGroup)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonString(this._resourceGroup.ToString()) : null, "resourceGroup", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._storageAccount)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonString(this._storageAccount.ToString()) : null, "storageAccount", container.Add);
            }
            AfterToJson(ref container);
            return(container);
        }
Beispiel #19
0
        /// <summary>
        /// Serializes this instance of <see cref="ErrorResponseModel" /> 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="ErrorResponseModel" /> 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 != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.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.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="OperationDisplay" /> 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._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonString(this._description.ToString()) : null, "description", container.Add);
            AddIf(null != (((object)this._operation)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonString(this._operation.ToString()) : null, "operation", container.Add);
            AddIf(null != (((object)this._provider)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonString(this._provider.ToString()) : null, "provider", container.Add);
            AddIf(null != (((object)this._resource)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonString(this._resource.ToString()) : null, "resource", container.Add);
            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);
        }
Beispiel #22
0
        /// <summary>
        /// Serializes this instance of <see cref="AccountEndpoints" /> 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="AccountEndpoints" /> 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._catalog)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonString(this._catalog.ToString()) : null, "catalog", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._guardian)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonString(this._guardian.ToString()) : null, "guardian", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._scan)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Purview.Runtime.Json.JsonString(this._scan.ToString()) : null, "scan", container.Add);
            }
            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);
        }