/* * Copyright Amazon.com, Inc. or its affiliates. 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. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file 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. */ /* * Do not modify this file. This file is generated from the elasticloadbalancingv2-2015-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.ElasticLoadBalancingV2.Model { /// /// Information about a condition for a rule. /// /// /// /// Each rule can optionally include up to one of each of the following conditions: http-request-method, /// host-header, path-pattern, and source-ip. Each /// rule can also optionally include one or more of each of the following conditions: /// http-header and query-string. Note that the value for a /// condition cannot be empty. /// /// public partial class RuleCondition { private string _field; private HostHeaderConditionConfig _hostHeaderConfig; private HttpHeaderConditionConfig _httpHeaderConfig; private HttpRequestMethodConditionConfig _httpRequestMethodConfig; private PathPatternConditionConfig _pathPatternConfig; private QueryStringConditionConfig _queryStringConfig; private SourceIpConditionConfig _sourceIpConfig; private List _values = new List(); /// /// Gets and sets the property Field. /// /// The field in the HTTP request. The following are the possible values: /// ///
  • /// /// http-header /// ///
  • /// /// http-request-method /// ///
  • /// /// host-header /// ///
  • /// /// path-pattern /// ///
  • /// /// query-string /// ///
  • /// /// source-ip /// ///
///
[AWSProperty(Max=64)] public string Field { get { return this._field; } set { this._field = value; } } // Check to see if Field property is set internal bool IsSetField() { return this._field != null; } /// /// Gets and sets the property HostHeaderConfig. /// /// Information for a host header condition. Specify only when Field is host-header. /// /// public HostHeaderConditionConfig HostHeaderConfig { get { return this._hostHeaderConfig; } set { this._hostHeaderConfig = value; } } // Check to see if HostHeaderConfig property is set internal bool IsSetHostHeaderConfig() { return this._hostHeaderConfig != null; } /// /// Gets and sets the property HttpHeaderConfig. /// /// Information for an HTTP header condition. Specify only when Field is /// http-header. /// /// public HttpHeaderConditionConfig HttpHeaderConfig { get { return this._httpHeaderConfig; } set { this._httpHeaderConfig = value; } } // Check to see if HttpHeaderConfig property is set internal bool IsSetHttpHeaderConfig() { return this._httpHeaderConfig != null; } /// /// Gets and sets the property HttpRequestMethodConfig. /// /// Information for an HTTP method condition. Specify only when Field is /// http-request-method. /// /// public HttpRequestMethodConditionConfig HttpRequestMethodConfig { get { return this._httpRequestMethodConfig; } set { this._httpRequestMethodConfig = value; } } // Check to see if HttpRequestMethodConfig property is set internal bool IsSetHttpRequestMethodConfig() { return this._httpRequestMethodConfig != null; } /// /// Gets and sets the property PathPatternConfig. /// /// Information for a path pattern condition. Specify only when Field is /// path-pattern. /// /// public PathPatternConditionConfig PathPatternConfig { get { return this._pathPatternConfig; } set { this._pathPatternConfig = value; } } // Check to see if PathPatternConfig property is set internal bool IsSetPathPatternConfig() { return this._pathPatternConfig != null; } /// /// Gets and sets the property QueryStringConfig. /// /// Information for a query string condition. Specify only when Field is /// query-string. /// /// public QueryStringConditionConfig QueryStringConfig { get { return this._queryStringConfig; } set { this._queryStringConfig = value; } } // Check to see if QueryStringConfig property is set internal bool IsSetQueryStringConfig() { return this._queryStringConfig != null; } /// /// Gets and sets the property SourceIpConfig. /// /// Information for a source IP condition. Specify only when Field is source-ip. /// /// public SourceIpConditionConfig SourceIpConfig { get { return this._sourceIpConfig; } set { this._sourceIpConfig = value; } } // Check to see if SourceIpConfig property is set internal bool IsSetSourceIpConfig() { return this._sourceIpConfig != null; } /// /// Gets and sets the property Values. /// /// The condition value. Specify only when Field is host-header /// or path-pattern. Alternatively, to specify multiple host names or multiple /// path patterns, use HostHeaderConfig or PathPatternConfig. /// /// /// /// If Field is host-header and you are not using HostHeaderConfig, /// you can specify a single host name (for example, my.example.com) in Values. /// A host name is case insensitive, can be up to 128 characters in length, and can contain /// any of the following characters. /// ///
  • /// /// A-Z, a-z, 0-9 /// ///
  • /// /// - . /// ///
  • /// /// * (matches 0 or more characters) /// ///
  • /// /// ? (matches exactly 1 character) /// ///
/// /// If Field is path-pattern and you are not using PathPatternConfig, /// you can specify a single path pattern (for example, /img/*) in Values. /// A path pattern is case-sensitive, can be up to 128 characters in length, and can contain /// any of the following characters. /// ///
  • /// /// A-Z, a-z, 0-9 /// ///
  • /// /// _ - . $ / ~ " ' @ : + /// ///
  • /// /// & (using &) /// ///
  • /// /// * (matches 0 or more characters) /// ///
  • /// /// ? (matches exactly 1 character) /// ///
///
public List Values { get { return this._values; } set { this._values = value; } } // Check to see if Values property is set internal bool IsSetValues() { return this._values != null && this._values.Count > 0; } } }