com.amazonaws.auth.policy

## クラス Condition

- java.lang.Object
- - com.amazonaws.auth.policy.Condition

- 直系の既知のサブクラス:
    ArnCondition, BooleanCondition, DateCondition, IpAddressCondition, NumericCondition, StringCondition

      public class Condition
      extends java.lang.Object

  AWS access control policy conditions are contained in `Statement` objects, and affect when a statement is applied. For example, a statement that allows access to an Amazon SQS queue could use a condition to only apply the effect of that statement for requests that are made before a certain date, or that originate from a range of IP addresses.

  Multiple conditions can be included in a single statement, and all conditions must evaluate to true in order for the statement to take effect.

  The set of conditions is D in the statement "A has permission to do B to C where D applies."

  A condition is composed of three parts:

  - Condition Key - The condition key declares which value of a request to pull in and compare against when a policy is evaluated by AWS. For example, using `ConditionFactory.SOURCE_IP_CONDITION_KEY` will cause AWS to pull in the current request's source IP as the first value to compare against every time your policy is evaluated.
  - Comparison Type - Most condition types allow several ways to compare the value obtained from the condition key and the comparison value. For example, the `NumericCondition.NumericComparisonType` enumerates the ways a `NumericCondition` can be evaluated (less than, greater than, equals, etc).
  - Comparison Value - This is a static value used as the second value in the comparison when your policy is evaluated. Depending on the comparison type, this value can optionally use wildcards. See the documentation for individual comparison types for more information.

  There are many expressive conditions available in the `com.amazonaws.auth.policy.conditions` package to use in access control policy statements.

  This class is not intended to be directly subclassed by users, instead users should use the many available conditions and condition factories in the com.amazonaws.auth.policy.conditions package.

- - ### フィールドの概要

    フィールド
    修飾子とタイプ | フィールドと説明
    --- | ---
    `protected java.lang.String` | `conditionKey`
    `protected java.lang.String` | `type`
    `protected java.util.List<java.lang.String>` | `values`

  - ### コンストラクタの概要

    コンストラクタ
    コンストラクタと説明
    `Condition()`

  - ### メソッドの概要

    メソッド
    修飾子とタイプ | メソッドと説明
    --- | ---
    `java.lang.String` | `getConditionKey()` Returns the name of the condition key involved in this condition.
    `java.lang.String` | `getType()` Returns the type of this condition.
    `java.util.List<java.lang.String>` | `getValues()` Returns the values specified for this access control policy condition.
    `void` | `setConditionKey(java.lang.String conditionKey)` Sets the name of the condition key involved in this condition.
    `void` | `setType(java.lang.String type)` Sets the type of this condition.
    `void` | `setValues(java.util.List<java.lang.String> values)` Sets the values specified for this access control policy condition.
    `Condition` | `withConditionKey(java.lang.String key)` Fluent version of `setConditionKey(String)`
    `Condition` | `withType(java.lang.String type)` Fluent version of `setType(String)`
    `Condition` | `withValues(java.util.List<java.lang.String> values)` Fluent version of `setValues(List)`
    `Condition` | `withValues(java.lang.String... values)` Fluent version of `setValues(List)`

    - ### クラスから継承されたメソッド java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### フィールドの詳細

    - #### type

          protected java.lang.String type

    - #### conditionKey

          protected java.lang.String conditionKey

    - #### values

          protected java.util.List<java.lang.String> values

  - ### コンストラクタの詳細

    - #### Condition

          public Condition()

  - ### メソッドの詳細

    - #### getType

          public java.lang.String getType()

      Returns the type of this condition.
      戻り値:
        The type of this condition.

    - #### setType

          public void setType(java.lang.String type)

      Sets the type of this condition.
      パラメータ:
        `type` - The type of this condition.

    - #### getConditionKey

          public java.lang.String getConditionKey()

      Returns the name of the condition key involved in this condition. Condition keys are predefined values supported by AWS that provide input to a condition's evaluation, such as the current time, or the IP address of the incoming request.

      Your policy is evaluated for each incoming request, and condition keys specify what information to pull out of those incoming requests and plug into the conditions in your policy.

      戻り値:
        The name of the condition key involved in this condition.

    - #### setConditionKey

          public void setConditionKey(java.lang.String conditionKey)

      Sets the name of the condition key involved in this condition. Condition keys are predefined values supported by AWS that provide input to a condition's evaluation, such as the current time, or the IP address of the incoming request.

      Your policy is evaluated for each incoming request, and condition keys specify what information to pull out of those incoming requests and plug into the conditions in your policy.

      パラメータ:
        `conditionKey` - The name of the condition key involved in this condition.

    - #### getValues

          public java.util.List<java.lang.String> getValues()

      Returns the values specified for this access control policy condition. For example, in a condition that compares the incoming IP address of a request to a specified range of IP addresses, the range of IP addresses is the single value in the condition.

      Most conditions accept only one value, but multiple values are possible.

      戻り値:
        The values specified for this access control policy condition.

    - #### setValues

          public void setValues(java.util.List<java.lang.String> values)

      Sets the values specified for this access control policy condition. For example, in a condition that compares the incoming IP address of a request to a specified range of IP addresses, the range of IP addresses is the single value in the condition.

      Most conditions accept only one value, but multiple values are possible.

      パラメータ:
        `values` - The values specified for this access control policy condition.

    - #### withType

          public Condition withType(java.lang.String type)

      Fluent version of `setType(String)`
      戻り値:
        this

    - #### withConditionKey

          public Condition withConditionKey(java.lang.String key)

      Fluent version of `setConditionKey(String)`
      戻り値:
        this

    - #### withValues

          public Condition withValues(java.lang.String... values)

      Fluent version of `setValues(List)`
      戻り値:
        this

    - #### withValues

          public Condition withValues(java.util.List<java.lang.String> values)

      Fluent version of `setValues(List)`
      戻り値:
        this