SiteLimits

We found 10 examples in language CSharp for this search. You will see 30 fragments of code.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Threading.Tasks;
using Microsoft.Web.Administration;

namespace WebsiteService.MonitorTerminal.Datas.IIS
{

    public class SiteInfo
    {
        public SiteInfo() { }
        public SiteInfo(Site site)
        {
            Id = site.Id;
            Name = site.Name;
            ServerAutoStart = site.ServerAutoStart;
            State = site.State;
            Limits = new SiteLimits2(site.Limits);
            Bindings = new List<Binding2>();
            foreach (var item in site.Bindings)
            {
                Bindings.Add(new Binding2(item));
            }
            Applications = new List<Application2>();
            foreach (var item in site.Applications)
            {
                Applications.Add(new Application2(item));
            }
        }

        public long Id { get; set; }

        public string Name { get; set; }

        public bool ServerAutoStart { get; set; }

        public ObjectState State { get; }

        public SiteLimits2 Limits { get; }

        public List<Binding2> Bindings { get; }

        public List<Application2> Applications { get; }

    }
    public class SiteLimits2
    {
        public SiteLimits2() { }
        public SiteLimits2(SiteLimits siteLimits)
        {
            ConnectionTimeout = siteLimits.ConnectionTimeout;
            MaxBandwidth = siteLimits.MaxBandwidth;
            MaxConnections = siteLimits.MaxConnections;
            MaxUrlSegments = siteLimits.MaxUrlSegments;
        }

        public TimeSpan ConnectionTimeout { get; set; }
        public long MaxBandwidth { get; set; }
        public long MaxConnections { get; set; }
        public long MaxUrlSegments { get; set; }
    }

    public class Binding2
    {
        public Binding2() { }
        public Binding2(Binding binding)
        {
            BindingInformation = binding.BindingInformation;
            CertificateHash = binding.CertificateHash;
            CertificateStoreName = binding.CertificateStoreName;
            EndPoint = binding.EndPoint;
            Host = binding.Host;
            IsIPPortHostBinding = binding.IsIPPortHostBinding;
            SslFlags = binding.SslFlags;
            UseDsMapper = binding.UseDsMapper;
            Protocol = binding.Protocol;
        }
        public string BindingInformation { get; set; }
        public byte[] CertificateHash { get; set; }
        public string CertificateStoreName { get; set; }
        public IPEndPoint EndPoint { get; }
        public string Host { get; }
        public bool IsIPPortHostBinding { get; }
        public SslFlags SslFlags { get; set; }
        public bool UseDsMapper { get; set; }
        public string Protocol { get; set; }

    }
    public class Application2
    {
        public Application2() { }
        public Application2(Application application)
        {
            ApplicationPoolName = application.ApplicationPoolName;
            EnabledProtocols = application.EnabledProtocols;
            Path = application.Path;
            VirtualDirectories = new List<VirtualDirectory2>();
            foreach (var item in application.VirtualDirectories)
            {
                VirtualDirectories.Add(new VirtualDirectory2(item));
            }
        }

        public string ApplicationPoolName { get; set; }
        public string EnabledProtocols { get; set; }
        public string Path { get; set; }
        public List<VirtualDirectory2> VirtualDirectories { get; set; }
    }
    public class VirtualDirectory2
    {
        public VirtualDirectory2() { }
        public VirtualDirectory2(VirtualDirectory virtualDirectory)
        {
            LogonMethod = virtualDirectory.LogonMethod;
            Password = virtualDirectory.Password;
            Path = virtualDirectory.Path;
            PhysicalPath = virtualDirectory.PhysicalPath;
            UserName = virtualDirectory.UserName;
        }

        public AuthenticationLogonMethod LogonMethod { get; set; }
        public string Password { get; set; }
        public string Path { get; set; }
        public string PhysicalPath { get; set; }
        public string UserName { get; set; }
    }
 

}

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
// 
// Code generated by Microsoft (R) AutoRest Code Generator 0.14.0.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.

namespace Microsoft.Azure.Management.WebSites.Models
{
    using System;
    using System.Linq;
    using System.Collections.Generic;
    using Newtonsoft.Json;
    using Microsoft.Rest;
    using Microsoft.Rest.Serialization;
    using Microsoft.Rest.Azure;

    /// <summary>
    /// Represents metric limits set on a web app.
    /// </summary>
    public partial class SiteLimits
    {
        /// <summary>
        /// Initializes a new instance of the SiteLimits class.
        /// </summary>
        public SiteLimits() { }

        /// <summary>
        /// Initializes a new instance of the SiteLimits class.
        /// </summary>
        public SiteLimits(double? maxPercentageCpu = default(double?), long? maxMemoryInMb = default(long?), long? maxDiskSizeInMb = default(long?))
        {
            MaxPercentageCpu = maxPercentageCpu;
            MaxMemoryInMb = maxMemoryInMb;
            MaxDiskSizeInMb = maxDiskSizeInMb;
        }

        /// <summary>
        /// Maximum allowed CPU usage percentage
        /// </summary>
        [JsonProperty(PropertyName = "maxPercentageCpu")]
        public double? MaxPercentageCpu { get; set; }

        /// <summary>
        /// Maximum allowed memory usage in MB
        /// </summary>
        [JsonProperty(PropertyName = "maxMemoryInMb")]
        public long? MaxMemoryInMb { get; set; }

        /// <summary>
        /// Maximum allowed disk size usage in MB
        /// </summary>
        [JsonProperty(PropertyName = "maxDiskSizeInMb")]
        public long? MaxDiskSizeInMb { get; set; }

    }
}

// Copyright (c) Lex Li. All rights reserved.
// 
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace Microsoft.Web.Administration
{
    public sealed class SiteDefaults : ConfigurationElement
    {
        private SiteLimits _limits;
        private SiteLogFile _logFile;
        private SiteTraceFailedRequestsLogging _trace;

        internal SiteDefaults(ConfigurationElement element, ConfigurationElement parent)
            : base(element, "siteDefaults", null, parent, null, null)
        {
        }

        public SiteLimits Limits
        {
            get { return _limits ?? (_limits = new SiteLimits(ChildElements["limits"], this)); }
        }

        public SiteLogFile LogFile
        {
            get { return _logFile ?? (_logFile = new SiteLogFile(ChildElements["logFile"], this)); }
        }

        public bool ServerAutoStart
        {
            get { return (bool)this["serverAutoStart"]; }
            set { this["serverAutoStart"] = value; }
        }

        public SiteTraceFailedRequestsLogging TraceFailedRequestsLogging
        {
            get { return _trace ?? (_trace = new SiteTraceFailedRequestsLogging(ChildElements["traceFailedRequestsLogging"], this)); }
        }
    }
}


        /// <summary>
        /// <c>AfterDeserializeDictionary</c> will be called after the deserialization has finished, allowing customization of the
        /// object before it is returned. Implement this method in a partial class to enable this behavior
        /// </summary>
        /// <param name="content">The global::System.Collections.IDictionary content that should be used.</param>

        partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content);

        /// <summary>
        /// <c>AfterDeserializePSObject</c> will be called after the deserialization has finished, allowing customization of the object
        /// before it is returned. Implement this method in a partial class to enable this behavior
        /// </summary>
        /// <param name="content">The global::System.Management.Automation.PSObject content that should be used.</param>

        partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content);

        /// <summary>
        /// <c>BeforeDeserializeDictionary</c> will be called before the deserialization has commenced, allowing complete customization
        /// of the object before it is deserialized.
        /// If you wish to disable the default deserialization entirely, return <c>true</c> in the <see "returnNow" /> output parameter.
        /// Implement this method in a partial class to enable this behavior.
        /// </summary>
        /// <param name="content">The global::System.Collections.IDictionary content that should be used.</param>
        /// <param name="returnNow">Determines if the rest of the serialization should be processed, or if the method should return
        /// instantly.</param>

        partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow);

        /// <summary>
        /// <c>BeforeDeserializePSObject</c> will be called before the deserialization has commenced, allowing complete customization
        /// of the object before it is deserialized.
        /// If you wish to disable the default deserialization entirely, return <c>true</c> in the <see "returnNow" /> output parameter.
        /// Implement this method in a partial class to enable this behavior.
        /// </summary>
        /// <param name="content">The global::System.Management.Automation.PSObject content that should be used.</param>
        /// <param name="returnNow">Determines if the rest of the serialization should be processed, or if the method should return
        /// instantly.</param>

        partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);

        /// <summary>
        /// Deserializes a <see cref="global::System.Collections.IDictionary" /> into an instance of <see cref="Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.SiteLimits"
        /// />.
        /// </summary>
        /// <param name="content">The global::System.Collections.IDictionary content that should be used.</param>
        /// <returns>
        /// an instance of <see cref="Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.ISiteLimits" />.
        /// </returns>
        public static Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.ISiteLimits DeserializeFromDictionary(global::System.Collections.IDictionary content)
        {
            return new SiteLimits(content);
        }

        /// <summary>
        /// Deserializes a <see cref="global::System.Management.Automation.PSObject" /> into an instance of <see cref="Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.SiteLimits"
        /// />.
        /// </summary>
        /// <param name="content">The global::System.Management.Automation.PSObject content that should be used.</param>
        /// <returns>
        /// an instance of <see cref="Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.ISiteLimits" />.
        /// </returns>
        public static Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.ISiteLimits DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
        {
            return new SiteLimits(content);
        }


        /// <summary>
        /// Determines if the converter can convert the <see cref="sourceValue"/> parameter to the <see cref="destinationType" />
        /// parameter.
        /// </summary>
        /// <param name="sourceValue">the <see cref="System.Object"/> to convert from</param>
        /// <param name="destinationType">the <see cref="System.Type" /> to convert to</param>
        /// <returns>
        /// <c>true</c> if the converter can convert the <see cref="sourceValue"/> parameter to the <see cref="destinationType" />
        /// parameter, otherwise <c>false</c>.
        /// </returns>
        public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue);

        /// <summary>
        /// Determines if the converter can convert the <see cref="sourceValue"/> parameter to the <see cref="destinationType" />
        /// parameter.
        /// </summary>
        /// <param name="sourceValue">the <see cref="System.Object" /> instance to check if it can be converted to the <see cref="SiteLimits"
        /// /> type.</param>
        /// <returns>
        /// <c>true</c> if the instance could be converted to a <see cref="SiteLimits" /> type, otherwise <c>false</c>
        /// </returns>
        public static bool CanConvertFrom(dynamic sourceValue)
        {
            if (null == sourceValue)
            {
                return true;
            }
            global::System.Type type = sourceValue.GetType();
            if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
            {
                // we say yest to PSObjects
                return true;
            }
            if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
            {
                // we say yest to Hashtables/dictionaries
                return true;
            }
            try
            {
                if (null != sourceValue.ToJsonString())
                {
                    return true;
                }
            }
            catch
            {
                // Not one of our objects
            }
            try
            {
                string text = sourceValue.ToString()?.Trim();
                return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Functions.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Functions.Runtime.Json.JsonType.Object;
            }
            catch
            {
                // Doesn't look like it can be treated as JSON
            }
            return false;
        }

        /// <summary>
        /// Determines if the <see cref="sourceValue" /> parameter can be converted to the <see cref="destinationType" /> parameter
        /// </summary>
        /// <param name="sourceValue">the <see cref="System.Object"/> to convert from</param>
        /// <param name="destinationType">the <see cref="System.Type" /> to convert to</param>
        /// <returns>
        /// <c>true</c> if the converter can convert the <see cref="sourceValue" /> parameter to the <see cref="destinationType" />
        /// parameter, otherwise <c>false</c>
        /// </returns>
        public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false;

        /// <summary>
        /// Converts the <see cref="sourceValue" /> parameter to the <see cref="destinationType" /> parameter using <see cref="formatProvider"
        /// /> and <see cref="ignoreCase" />
        /// </summary>
        /// <param name="sourceValue">the <see cref="System.Object"/> to convert from</param>
        /// <param name="destinationType">the <see cref="System.Type" /> to convert to</param>
        /// <param name="formatProvider">not used by this TypeConverter.</param>
        /// <param name="ignoreCase">when set to <c>true</c>, will ignore the case when converting.</param>
        /// <returns>
        /// an instance of <see cref="SiteLimits" />, or <c>null</c> if there is no suitable conversion.
        /// </returns>
        public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue);

        /// <summary>
        /// Converts the <see cref="sourceValue" /> parameter to the <see cref="destinationType" /> parameter using <see cref="formatProvider"
        /// /> and <see cref="ignoreCase" />
        /// </summary>
        /// <param name="sourceValue">the value to convert into an instance of <see cref="SiteLimits" />.</param>
        /// <returns>
        /// an instance of <see cref="SiteLimits" />, or <c>null</c> if there is no suitable conversion.
        /// </returns>
        public static Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.ISiteLimits ConvertFrom(dynamic sourceValue)
        {
            if (null == sourceValue)
            {
                return null;
            }
            global::System.Type type = sourceValue.GetType();
            if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.ISiteLimits).IsAssignableFrom(type))
            {
                return sourceValue;
            }
            try
            {
                return SiteLimits.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
            }
            catch
            {
                // Unable to use JSON pattern
            }
            if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
            {
                return SiteLimits.DeserializeFromPSObject(sourceValue);
            }
            if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
            {
                return SiteLimits.DeserializeFromDictionary(sourceValue);
            }
            return null;
        }

        /// <summary>NotImplemented -- this will return <c>null</c></summary>
        /// <param name="sourceValue">the <see cref="System.Object"/> to convert from</param>
        /// <param name="destinationType">the <see cref="System.Type" /> to convert to</param>
        /// <param name="formatProvider">not used by this TypeConverter.</param>
        /// <param name="ignoreCase">when set to <c>true</c>, will ignore the case when converting.</param>
        /// <returns>will always return <c>null</c>.</returns>
        public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;


        /// <summary>
        /// <c>AfterDeserializeDictionary</c> will be called after the deserialization has finished, allowing customization of the
        /// object before it is returned. Implement this method in a partial class to enable this behavior
        /// </summary>
        /// <param name="content">The global::System.Collections.IDictionary content that should be used.</param>

        partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content);

        /// <summary>
        /// <c>AfterDeserializePSObject</c> will be called after the deserialization has finished, allowing customization of the object
        /// before it is returned. Implement this method in a partial class to enable this behavior
        /// </summary>
        /// <param name="content">The global::System.Management.Automation.PSObject content that should be used.</param>

        partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content);

        /// <summary>
        /// <c>BeforeDeserializeDictionary</c> will be called before the deserialization has commenced, allowing complete customization
        /// of the object before it is deserialized.
        /// If you wish to disable the default deserialization entirely, return <c>true</c> in the <see "returnNow" /> output parameter.
        /// Implement this method in a partial class to enable this behavior.
        /// </summary>
        /// <param name="content">The global::System.Collections.IDictionary content that should be used.</param>
        /// <param name="returnNow">Determines if the rest of the serialization should be processed, or if the method should return
        /// instantly.</param>

        partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow);

        /// <summary>
        /// <c>BeforeDeserializePSObject</c> will be called before the deserialization has commenced, allowing complete customization
        /// of the object before it is deserialized.
        /// If you wish to disable the default deserialization entirely, return <c>true</c> in the <see "returnNow" /> output parameter.
        /// Implement this method in a partial class to enable this behavior.
        /// </summary>
        /// <param name="content">The global::System.Management.Automation.PSObject content that should be used.</param>
        /// <param name="returnNow">Determines if the rest of the serialization should be processed, or if the method should return
        /// instantly.</param>

        partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);

        /// <summary>
        /// Deserializes a <see cref="global::System.Collections.IDictionary" /> into an instance of <see cref="Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.SiteLimits"
        /// />.
        /// </summary>
        /// <param name="content">The global::System.Collections.IDictionary content that should be used.</param>
        /// <returns>
        /// an instance of <see cref="Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.ISiteLimits" />.
        /// </returns>
        public static Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.ISiteLimits DeserializeFromDictionary(global::System.Collections.IDictionary content)
        {
            return new SiteLimits(content);
        }

        /// <summary>
        /// Deserializes a <see cref="global::System.Management.Automation.PSObject" /> into an instance of <see cref="Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.SiteLimits"
        /// />.
        /// </summary>
        /// <param name="content">The global::System.Management.Automation.PSObject content that should be used.</param>
        /// <returns>
        /// an instance of <see cref="Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.ISiteLimits" />.
        /// </returns>
        public static Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.ISiteLimits DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
        {
            return new SiteLimits(content);
        }

// Copyright (c) Lex Li. All rights reserved.
// 
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System;

namespace Microsoft.Web.Administration
{
    public sealed class SiteLimits : ConfigurationElement
    {
        internal SiteLimits(ConfigurationElement element, ConfigurationElement parent)
            : base(element, "limits", null, parent, null, null)
        {
        }

        public TimeSpan ConnectionTimeout
        {
            get { return (TimeSpan)this["connectionTimeout"]; }
            set { this["connectionTimeout"] = value; }
        }

        public long MaxBandwidth
        {
            get { return Convert.ToInt64(this["maxBandwidth"]); }
            set { this["maxBandwidth"] = Convert.ToUInt32(value); }
        }

        public long MaxConnections
        {
            get { return Convert.ToInt64(this["maxConnections"]); }
            set { this["maxConnections"] = Convert.ToUInt32(value); }
        }

        public long MaxUrlSegments
        {
            get { return Convert.ToInt64(this["maxUrlSegments"]); }
            set { this["maxUrlSegments"] = Convert.ToUInt32(value); }
        }
    }
}


        /// <summary>
        /// <c>AfterFromJson</c> will be called after the json deserialization has finished, allowing customization of the object
        /// before it is returned. Implement this method in a partial class to enable this behavior
        /// </summary>
        /// <param name="json">The JsonNode that should be deserialized into this object.</param>

        partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Functions.Runtime.Json.JsonObject json);

        /// <summary>
        /// <c>AfterToJson</c> will be called after the json erialization has finished, allowing customization of the <see cref="Microsoft.Azure.PowerShell.Cmdlets.Functions.Runtime.Json.JsonObject"
        /// /> before it is returned. Implement this method in a partial class to enable this behavior
        /// </summary>
        /// <param name="container">The JSON container that the serialization result will be placed in.</param>

        partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Functions.Runtime.Json.JsonObject container);

        /// <summary>
        /// <c>BeforeFromJson</c> will be called before the json deserialization has commenced, allowing complete customization of
        /// the object before it is deserialized.
        /// If you wish to disable the default deserialization entirely, return <c>true</c> in the <see "returnNow" /> output parameter.
        /// Implement this method in a partial class to enable this behavior.
        /// </summary>
        /// <param name="json">The JsonNode that should be deserialized into this object.</param>
        /// <param name="returnNow">Determines if the rest of the deserialization should be processed, or if the method should return
        /// instantly.</param>

        partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Functions.Runtime.Json.JsonObject json, ref bool returnNow);

        /// <summary>
        /// <c>BeforeToJson</c> will be called before the json serialization has commenced, allowing complete customization of the
        /// object before it is serialized.
        /// If you wish to disable the default serialization entirely, return <c>true</c> in the <see "returnNow" /> output parameter.
        /// Implement this method in a partial class to enable this behavior.
        /// </summary>
        /// <param name="container">The JSON container that the serialization result will be placed in.</param>
        /// <param name="returnNow">Determines if the rest of the serialization should be processed, or if the method should return
        /// instantly.</param>

        partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Functions.Runtime.Json.JsonObject container, ref bool returnNow);

        /// <summary>
        /// Deserializes a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Functions.Runtime.Json.JsonNode"/> into an instance of Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.ISiteLimits.
        /// </summary>
        /// <param name="node">a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Functions.Runtime.Json.JsonNode" /> to deserialize from.</param>
        /// <returns>
        /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.ISiteLimits.
        /// </returns>
        public static Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.ISiteLimits FromJson(Microsoft.Azure.PowerShell.Cmdlets.Functions.Runtime.Json.JsonNode node)
        {
            return node is Microsoft.Azure.PowerShell.Cmdlets.Functions.Runtime.Json.JsonObject json ? new SiteLimits(json) : null;
        }

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

            bool returnNow = false;
            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return container;
            }
            AddIf( null != this._maxPercentageCpu ? (Microsoft.Azure.PowerShell.Cmdlets.Functions.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Functions.Runtime.Json.JsonNumber((double)this._maxPercentageCpu) : null, "maxPercentageCpu" ,container.Add );
            AddIf( null != this._maxMemoryInMb ? (Microsoft.Azure.PowerShell.Cmdlets.Functions.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Functions.Runtime.Json.JsonNumber((long)this._maxMemoryInMb) : null, "maxMemoryInMb" ,container.Add );
            AddIf( null != this._maxDiskSizeInMb ? (Microsoft.Azure.PowerShell.Cmdlets.Functions.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Functions.Runtime.Json.JsonNumber((long)this._maxDiskSizeInMb) : null, "maxDiskSizeInMb" ,container.Add );
            AfterToJson(ref container);
            return container;
        }

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

// <auto-generated/>

#nullable disable

namespace Azure.ResourceManager.AppService.Models
{
    /// <summary> Metric limits set on an app. </summary>
    public partial class SiteLimits
    {
        /// <summary> Initializes a new instance of SiteLimits. </summary>
        public SiteLimits()
        {
        }

        /// <summary> Initializes a new instance of SiteLimits. </summary>
        /// <param name="maxPercentageCpu"> Maximum allowed CPU usage percentage. </param>
        /// <param name="maxMemoryInMb"> Maximum allowed memory usage in MB. </param>
        /// <param name="maxDiskSizeInMb"> Maximum allowed disk size usage in MB. </param>
        internal SiteLimits(double? maxPercentageCpu, long? maxMemoryInMb, long? maxDiskSizeInMb)
        {
            MaxPercentageCpu = maxPercentageCpu;
            MaxMemoryInMb = maxMemoryInMb;
            MaxDiskSizeInMb = maxDiskSizeInMb;
        }

        /// <summary> Maximum allowed CPU usage percentage. </summary>
        public double? MaxPercentageCpu { get; set; }
        /// <summary> Maximum allowed memory usage in MB. </summary>
        public long? MaxMemoryInMb { get; set; }
        /// <summary> Maximum allowed disk size usage in MB. </summary>
        public long? MaxDiskSizeInMb { get; set; }
    }
}

// 
// Copyright (c) Microsoft and contributors.  All rights reserved.
// 
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//   http://www.apache.org/licenses/LICENSE-2.0
// 
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// 
// See the License for the specific language governing permissions and
// limitations under the License.
// 

// Warning: This code was generated by a tool.
// 
// Changes to this file may cause incorrect behavior and will be lost if the
// code is regenerated.

using System;
using System.Linq;

namespace Microsoft.Azure.Management.WebSites.Models
{
    /// <summary>
    /// Per site limits
    /// </summary>
    public partial class SiteLimits
    {
        private long? _maxDiskSizeInMb;
        
        /// <summary>
        /// Optional. Maximum disk size allowed in MB
        /// </summary>
        public long? MaxDiskSizeInMb
        {
            get { return this._maxDiskSizeInMb; }
            set { this._maxDiskSizeInMb = value; }
        }
        
        private long? _maxMemoryInMb;
        
        /// <summary>
        /// Optional. Maximum memory allowed in MB
        /// </summary>
        public long? MaxMemoryInMb
        {
            get { return this._maxMemoryInMb; }
            set { this._maxMemoryInMb = value; }
        }
        
        private double? _maxPercentageCpu;
        
        /// <summary>
        /// Optional. The name of the pair.
        /// </summary>
        public double? MaxPercentageCpu
        {
            get { return this._maxPercentageCpu; }
            set { this._maxPercentageCpu = value; }
        }
        
        /// <summary>
        /// Initializes a new instance of the SiteLimits class.
        /// </summary>
        public SiteLimits()
        {
        }
    }
}

Microsoft.Web.Administration.SiteLimits : ConfigurationElement

Methods :

public TimeSpan get_ConnectionTimeout()
public Void set_ConnectionTimeout(TimeSpan value = )
public Int64 get_MaxBandwidth()
public Void set_MaxBandwidth(Int64 value = )
public Int64 get_MaxConnections()
public Void set_MaxConnections(Int64 value = )
public Int64 get_MaxUrlSegments()
public Void set_MaxUrlSegments(Int64 value = )
public ConfigurationAttributeCollection get_Attributes()
public ConfigurationChildElementCollection get_ChildElements()
public String get_ElementTagName()
public Boolean get_IsLocallyStored()
public Object get_Item(String attributeName = )
public Void set_Item(String attributeName = , Object value = )
public ConfigurationMethodCollection get_Methods()
public IDictionary<StringString> get_RawAttributes()
public ConfigurationElementSchema get_Schema()
public Void Delete()
public ConfigurationAttribute GetAttribute(String attributeName = )
public Object GetAttributeValue(String attributeName = )
public ConfigurationElement GetChildElement(String elementName = )
public ConfigurationElement GetChildElement(String elementName = , Type elementType = )
public ConfigurationElementCollection GetCollection(String collectionName = )
public ConfigurationElement GetCollection(String collectionName = , Type collectionType = )
public ConfigurationElementCollection GetCollection()
public ConfigurationElement GetCollection(Type collectionType = )
public Object GetMetadata(String metadataType = )
public Void SetAttributeValue(String attributeName = , Object value = )
public Void SetMetadata(String metadataType = , Object value = )
public Type GetType()
public String ToString()
public Boolean Equals(Object obj = )
public Int32 GetHashCode()