internal static LoadBalancerConfiguration DeserializeLoadBalancerConfiguration(JsonElement element)
        {
            string name = default;
            LoadBalancerConfigurationProperties properties = default;
            ResourceIdentifier id = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("name"))
                {
                    name = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("properties"))
                {
                    properties = LoadBalancerConfigurationProperties.DeserializeLoadBalancerConfigurationProperties(property.Value);
                    continue;
                }
                if (property.NameEquals("id"))
                {
                    id = property.Value.GetString();
                    continue;
                }
            }
            return(new LoadBalancerConfiguration(id, name, properties));
        }
        public LoadBalancerConfiguration(string name, LoadBalancerConfigurationProperties properties)
        {
            if (name == null)
            {
                throw new ArgumentNullException(nameof(name));
            }
            if (properties == null)
            {
                throw new ArgumentNullException(nameof(properties));
            }

            Name       = name;
            Properties = properties;
        }
 internal LoadBalancerConfiguration(string id, string name, LoadBalancerConfigurationProperties properties)
 {
     Id         = id;
     Name       = name;
     Properties = properties;
 }
Beispiel #4
0
 internal LoadBalancerConfiguration(string id, string name, LoadBalancerConfigurationProperties properties) : base(id)
 {
     Name       = name;
     Properties = properties;
 }