Ejemplo n.º 1
0
        /// <summary>
        /// Serializes this instance of <see cref="OperationDetail" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.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.HealthcareApis.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="OperationDetail" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AddIf(null != this._display ? (Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonNode) this._display.ToJson(null, serializationMode) : null, "display", container.Add);
            AddIf(null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonNode) this._property.ToJson(null, serializationMode) : null, "properties", container.Add);
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonString(this._name.ToString()) : null, "name", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != this._isDataAction ? (Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonBoolean((bool)this._isDataAction) : null, "isDataAction", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._origin)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonString(this._origin.ToString()) : null, "origin", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._actionType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonString(this._actionType.ToString()) : null, "actionType", container.Add);
            }
            AfterToJson(ref container);
            return(container);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Serializes this instance of <see cref="InternalErrorDetails" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.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.HealthcareApis.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="InternalErrorDetails" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonString(this._code.ToString()) : null, "code", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonString(this._message.ToString()) : null, "message", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._target)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonString(this._target.ToString()) : null, "target", container.Add);
            }
            AfterToJson(ref container);
            return(container);
        }
        /// <summary>
        /// Serializes this instance of <see cref="FhirServiceProperties" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.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.HealthcareApis.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="FhirServiceProperties" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AddIf(null != this._acrConfiguration ? (Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonNode) this._acrConfiguration.ToJson(null, serializationMode) : null, "acrConfiguration", container.Add);
            AddIf(null != this._authenticationConfiguration ? (Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonNode) this._authenticationConfiguration.ToJson(null, serializationMode) : null, "authenticationConfiguration", container.Add);
            AddIf(null != this._corsConfiguration ? (Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonNode) this._corsConfiguration.ToJson(null, serializationMode) : null, "corsConfiguration", container.Add);
            AddIf(null != this._exportConfiguration ? (Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonNode) this._exportConfiguration.ToJson(null, serializationMode) : null, "exportConfiguration", container.Add);
            AddIf(null != this._resourceVersionPolicyConfiguration ? (Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonNode) this._resourceVersionPolicyConfiguration.ToJson(null, serializationMode) : null, "resourceVersionPolicyConfiguration", container.Add);
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState", container.Add);
            }
            if (null != this._accessPolicy)
            {
                var __w = new Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.XNodeArray();
                foreach (var __x in this._accessPolicy)
                {
                    AddIf(__x?.ToJson(null, serializationMode), __w.Add);
                }
                container.Add("accessPolicies", __w);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.SerializationMode.IncludeReadOnly))
            {
                if (null != this._privateEndpointConnection)
                {
                    var __r = new Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.XNodeArray();
                    foreach (var __s in this._privateEndpointConnection)
                    {
                        AddIf(__s?.ToJson(null, serializationMode), __r.Add);
                    }
                    container.Add("privateEndpointConnections", __r);
                }
            }
            AddIf(null != (((object)this._publicNetworkAccess)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonString(this._publicNetworkAccess.ToString()) : null, "publicNetworkAccess", container.Add);
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._eventState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonString(this._eventState.ToString()) : null, "eventState", container.Add);
            }
            AfterToJson(ref container);
            return(container);
        }
        /// <summary>
        /// Serializes this instance of <see cref="ListOperations" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.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.HealthcareApis.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="ListOperations" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.SerializationMode.IncludeReadOnly))
            {
                if (null != this._value)
                {
                    var __w = new Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.XNodeArray();
                    foreach (var __x in this._value)
                    {
                        AddIf(__x?.ToJson(null, serializationMode), __w.Add);
                    }
                    container.Add("value", __w);
                }
            }
            AddIf(null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink", container.Add);
            AfterToJson(ref container);
            return(container);
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Serializes this instance of <see cref="PrivateLinkResourceProperties" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.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.HealthcareApis.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="PrivateLinkResourceProperties" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._groupId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonString(this._groupId.ToString()) : null, "groupId", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.SerializationMode.IncludeReadOnly))
            {
                if (null != this._requiredMember)
                {
                    var __w = new Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.XNodeArray();
                    foreach (var __x in this._requiredMember)
                    {
                        AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonString(__x.ToString()) : null, __w.Add);
                    }
                    container.Add("requiredMembers", __w);
                }
            }
            if (null != this._requiredZoneName)
            {
                var __r = new Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.XNodeArray();
                foreach (var __s in this._requiredZoneName)
                {
                    AddIf(null != (((object)__s)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonString(__s.ToString()) : null, __r.Add);
                }
                container.Add("requiredZoneNames", __r);
            }
            AfterToJson(ref container);
            return(container);
        }
        /// <summary>
        /// Serializes this instance of <see cref="ServiceManagedIdentityAutoGenerated" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonNode"
        /// />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.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.HealthcareApis.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="ServiceManagedIdentityAutoGenerated" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AddIf(null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonString(this._type.ToString()) : null, "type", container.Add);
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._principalId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonString(this._principalId.ToString()) : null, "principalId", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._tenantId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonString(this._tenantId.ToString()) : null, "tenantId", container.Add);
            }
            AddIf(null != this._userAssignedIdentity ? (Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonNode) this._userAssignedIdentity.ToJson(null, serializationMode) : null, "userAssignedIdentities", container.Add);
            AfterToJson(ref container);
            return(container);
        }
        /// <summary>
        /// Serializes this instance of <see cref="PrivateLinkResourceDescription" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.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.HealthcareApis.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="PrivateLinkResourceDescription" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            __privateLinkResource?.ToJson(container, serializationMode);
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonNode) this._systemData.ToJson(null, serializationMode) : null, "systemData", container.Add);
            }
            AfterToJson(ref container);
            return(container);
        }
Ejemplo n.º 8
0
        /// <summary>
        /// Serializes this instance of <see cref="PrivateEndpointConnectionProperties" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonNode"
        /// />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.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.HealthcareApis.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="PrivateEndpointConnectionProperties" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AddIf(null != this._privateEndpoint ? (Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonNode) this._privateEndpoint.ToJson(null, serializationMode) : null, "privateEndpoint", container.Add);
            AddIf(null != this._privateLinkServiceConnectionState ? (Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonNode) this._privateLinkServiceConnectionState.ToJson(null, serializationMode) : null, "privateLinkServiceConnectionState", container.Add);
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState", container.Add);
            }
            AfterToJson(ref container);
            return(container);
        }
Ejemplo n.º 9
0
        /// <summary>
        /// Serializes this instance of <see cref="FhirService" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.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.HealthcareApis.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="FhirService" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            __taggedResource?.ToJson(container, serializationMode);
            __serviceManagedIdentity?.ToJson(container, serializationMode);
            AddIf(null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonNode) this._property.ToJson(null, serializationMode) : null, "properties", container.Add);
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonNode) this._systemData.ToJson(null, serializationMode) : null, "systemData", container.Add);
            }
            AddIf(null != (((object)this._kind)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.HealthcareApis.Runtime.Json.JsonString(this._kind.ToString()) : null, "kind", container.Add);
            AfterToJson(ref container);
            return(container);
        }