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

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.SerializationMode.IncludeReadOnly))
            {
                if (null != this._value)
                {
                    var __w = new Microsoft.Azure.PowerShell.Cmdlets.VMWare.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);
        }
コード例 #2
0
        /// <summary>
        /// Serializes this instance of <see cref="AdminCredentials" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.VMWare.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.VMWare.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="AdminCredentials" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._nsxtPassword)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonString(this._nsxtPassword.ToString()) : null, "nsxtPassword", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._nsxtUsername)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonString(this._nsxtUsername.ToString()) : null, "nsxtUsername", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._vcenterPassword)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonString(this._vcenterPassword.ToString()) : null, "vcenterPassword", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._vcenterUsername)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonString(this._vcenterUsername.ToString()) : null, "vcenterUsername", container.Add);
            }
            AfterToJson(ref container);
            return(container);
        }
コード例 #3
0
        /// <summary>
        /// Serializes this instance of <see cref="PrivateCloud" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.VMWare.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.VMWare.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="PrivateCloud" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            __trackedResource?.ToJson(container, serializationMode);
            AddIf(null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode) this._property.ToJson(null, serializationMode) : null, "properties", container.Add);
            AddIf(null != this._sku ? (Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode) this._sku.ToJson(null, serializationMode) : null, "sku", container.Add);
            AfterToJson(ref container);
            return(container);
        }
コード例 #4
0
        /// <summary>
        /// Serializes this instance of <see cref="ManagementCluster" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.VMWare.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.VMWare.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="ManagementCluster" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            __clusterUpdateProperties?.ToJson(container, serializationMode);
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != this._clusterId ? (Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNumber((int)this._clusterId) : null, "clusterId", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.SerializationMode.IncludeReadOnly))
            {
                if (null != this._host)
                {
                    var __w = new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.XNodeArray();
                    foreach (var __x in this._host)
                    {
                        AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonString(__x.ToString()) : null, __w.Add);
                    }
                    container.Add("hosts", __w);
                }
            }
            AfterToJson(ref container);
            return(container);
        }
コード例 #5
0
        /// <summary>
        /// Serializes this instance of <see cref="Paths15976RbSubscriptionsSubscriptionidResourcegroupsResourcegroupnameProvidersMicrosoftAvsPrivatecloudsPrivatecloudnameAuthorizationsAuthorizationnamePutRequestbodyContentApplicationJsonSchema"
        /// /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.VMWare.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.VMWare.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="Paths15976RbSubscriptionsSubscriptionidResourcegroupsResourcegroupnameProvidersMicrosoftAvsPrivatecloudsPrivatecloudnameAuthorizationsAuthorizationnamePutRequestbodyContentApplicationJsonSchema"
        /// /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AfterToJson(ref container);
            return(container);
        }
コード例 #6
0
        /// <summary>
        /// Serializes this instance of <see cref="PrivateCloudProperties" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.VMWare.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.VMWare.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="PrivateCloudProperties" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            __privateCloudUpdateProperties?.ToJson(container, serializationMode);
            AddIf(null != this._circuit ? (Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode) this._circuit.ToJson(null, serializationMode) : null, "circuit", container.Add);
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != this._endpoint ? (Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode) this._endpoint.ToJson(null, serializationMode) : null, "endpoints", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._managementNetwork)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonString(this._managementNetwork.ToString()) : null, "managementNetwork", container.Add);
            }
            AddIf(null != (((object)this._networkBlock)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonString(this._networkBlock.ToString()) : null, "networkBlock", container.Add);
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._nsxtCertificateThumbprint)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonString(this._nsxtCertificateThumbprint.ToString()) : null, "nsxtCertificateThumbprint", container.Add);
            }
            AddIf(null != (((object)this._nsxtPassword)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonString(this._nsxtPassword.ToString()) : null, "nsxtPassword", container.Add);
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._provisioningNetwork)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonString(this._provisioningNetwork.ToString()) : null, "provisioningNetwork", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._vcenterCertificateThumbprint)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonString(this._vcenterCertificateThumbprint.ToString()) : null, "vcenterCertificateThumbprint", container.Add);
            }
            AddIf(null != (((object)this._vcenterPassword)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonString(this._vcenterPassword.ToString()) : null, "vcenterPassword", container.Add);
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._vmotionNetwork)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonString(this._vmotionNetwork.ToString()) : null, "vmotionNetwork", container.Add);
            }
            AfterToJson(ref container);
            return(container);
        }
コード例 #7
0
        /// <summary>
        /// Serializes this instance of <see cref="ErrorResponse" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.VMWare.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.VMWare.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="ErrorResponse" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.SerializationMode.IncludeReadOnly))
            {
                if (null != this._additionalInfo)
                {
                    var __w = new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.XNodeArray();
                    foreach (var __x in this._additionalInfo)
                    {
                        AddIf(__x?.ToJson(null, serializationMode), __w.Add);
                    }
                    container.Add("additionalInfo", __w);
                }
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonString(this._code.ToString()) : null, "code", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonString(this._message.ToString()) : null, "message", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._target)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonString(this._target.ToString()) : null, "target", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.SerializationMode.IncludeReadOnly))
            {
                if (null != this._detail)
                {
                    var __r = new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.XNodeArray();
                    foreach (var __s in this._detail)
                    {
                        AddIf(__s?.ToJson(null, serializationMode), __r.Add);
                    }
                    container.Add("details", __r);
                }
            }
            AfterToJson(ref container);
            return(container);
        }
コード例 #8
0
        /// <summary>
        /// Serializes this instance of <see cref="PrivateCloudUpdateProperties" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.VMWare.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.VMWare.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="PrivateCloudUpdateProperties" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AddIf(null != this._managementCluster ? (Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode) this._managementCluster.ToJson(null, serializationMode) : null, "managementCluster", container.Add);
            if (null != this._identitySource)
            {
                var __w = new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.XNodeArray();
                foreach (var __x in this._identitySource)
                {
                    AddIf(__x?.ToJson(null, serializationMode), __w.Add);
                }
                container.Add("identitySources", __w);
            }
            AddIf(null != (((object)this._internet)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonString(this._internet.ToString()) : null, "internet", container.Add);
            AfterToJson(ref container);
            return(container);
        }
コード例 #9
0
        /// <summary>
        /// Serializes this instance of <see cref="VMWareIdentity" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.VMWare.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.VMWare.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="VMWareIdentity" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AddIf(null != (((object)this._authorizationName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonString(this._authorizationName.ToString()) : null, "authorizationName", container.Add);
            AddIf(null != (((object)this._clusterName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonString(this._clusterName.ToString()) : null, "clusterName", container.Add);
            AddIf(null != (((object)this._hcxEnterpriseSiteName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonString(this._hcxEnterpriseSiteName.ToString()) : null, "hcxEnterpriseSiteName", container.Add);
            AddIf(null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonString(this._id.ToString()) : null, "id", container.Add);
            AddIf(null != (((object)this._location)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonString(this._location.ToString()) : null, "location", container.Add);
            AddIf(null != (((object)this._privateCloudName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonString(this._privateCloudName.ToString()) : null, "privateCloudName", container.Add);
            AddIf(null != (((object)this._resourceGroupName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonString(this._resourceGroupName.ToString()) : null, "resourceGroupName", container.Add);
            AddIf(null != (((object)this._subscriptionId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonString(this._subscriptionId.ToString()) : null, "subscriptionId", container.Add);
            AfterToJson(ref container);
            return(container);
        }
コード例 #10
0
        /// <summary>
        /// Serializes this instance of <see cref="OperationDisplay" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.VMWare.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.VMWare.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="OperationDisplay" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonString(this._description.ToString()) : null, "description", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._operation)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonString(this._operation.ToString()) : null, "operation", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._provider)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonString(this._provider.ToString()) : null, "provider", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._resource)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonString(this._resource.ToString()) : null, "resource", container.Add);
            }
            AfterToJson(ref container);
            return(container);
        }
コード例 #11
0
        /// <summary>
        /// Serializes this instance of <see cref="ClusterProperties" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.VMWare.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.VMWare.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="ClusterProperties" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            __managementCluster?.ToJson(container, serializationMode);
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState", container.Add);
            }
            AfterToJson(ref container);
            return(container);
        }
コード例 #12
0
        /// <summary>
        /// Serializes this instance of <see cref="TrackedResourceTags" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.VMWare.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.VMWare.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="TrackedResourceTags" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.JsonSerializable.ToJson(((Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.IAssociativeArray <string>) this).AdditionalProperties, container);
            AfterToJson(ref container);
            return(container);
        }
コード例 #13
0
        /// <summary>
        /// Serializes this instance of <see cref="Circuit" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.VMWare.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.VMWare.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="Circuit" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._expressRouteId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonString(this._expressRouteId.ToString()) : null, "expressRouteID", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._expressRoutePrivatePeeringId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonString(this._expressRoutePrivatePeeringId.ToString()) : null, "expressRoutePrivatePeeringID", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._primarySubnet)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonString(this._primarySubnet.ToString()) : null, "primarySubnet", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._secondarySubnet)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonString(this._secondarySubnet.ToString()) : null, "secondarySubnet", container.Add);
            }
            AfterToJson(ref container);
            return(container);
        }
コード例 #14
0
        /// <summary>
        /// Serializes this instance of <see cref="IdentitySource" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.VMWare.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.VMWare.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="IdentitySource" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AddIf(null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonString(this._name.ToString()) : null, "name", container.Add);
            AddIf(null != (((object)this._alias)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonString(this._alias.ToString()) : null, "alias", container.Add);
            AddIf(null != (((object)this._baseGroupDn)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonString(this._baseGroupDn.ToString()) : null, "baseGroupDN", container.Add);
            AddIf(null != (((object)this._baseUserDn)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonString(this._baseUserDn.ToString()) : null, "baseUserDN", container.Add);
            AddIf(null != (((object)this._domain)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonString(this._domain.ToString()) : null, "domain", container.Add);
            AddIf(null != (((object)this._password)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonString(this._password.ToString()) : null, "password", container.Add);
            AddIf(null != (((object)this._primaryServer)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonString(this._primaryServer.ToString()) : null, "primaryServer", container.Add);
            AddIf(null != (((object)this._secondaryServer)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonString(this._secondaryServer.ToString()) : null, "secondaryServer", container.Add);
            AddIf(null != (((object)this._ssl)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonString(this._ssl.ToString()) : null, "ssl", container.Add);
            AddIf(null != (((object)this._username)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonString(this._username.ToString()) : null, "username", container.Add);
            AfterToJson(ref container);
            return(container);
        }
コード例 #15
0
ファイル: Sku.json.cs プロジェクト: wtnlee/azure-powershell
        /// <summary>
        /// Serializes this instance of <see cref="Sku" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.VMWare.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.VMWare.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="Sku" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AddIf(null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonString(this._name.ToString()) : null, "name", container.Add);
            AfterToJson(ref container);
            return(container);
        }
コード例 #16
0
ファイル: Quota.json.cs プロジェクト: wtnlee/azure-powershell
        /// <summary>
        /// Serializes this instance of <see cref="Quota" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.VMWare.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.VMWare.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="Quota" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != this._hostsRemaining ? (Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode) this._hostsRemaining.ToJson(null, serializationMode) : null, "hostsRemaining", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._enabled)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonString(this._enabled.ToString()) : null, "quotaEnabled", container.Add);
            }
            AfterToJson(ref container);
            return(container);
        }
コード例 #17
0
        /// <summary>
        /// Serializes this instance of <see cref="CloudError" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.VMWare.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.VMWare.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="CloudError" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AddIf(null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode) this._error.ToJson(null, serializationMode) : null, "error", container.Add);
            AfterToJson(ref container);
            return(container);
        }
コード例 #18
0
        /// <summary>
        /// Serializes this instance of <see cref="Trial" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.VMWare.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.VMWare.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="Trial" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != this._availableHost ? (Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNumber((int)this._availableHost) : null, "availableHosts", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.VMWare.Runtime.Json.JsonString(this._status.ToString()) : null, "status", container.Add);
            }
            AfterToJson(ref container);
            return(container);
        }