All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.wafv2.model.RequestInspection Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS WAFV2 module holds the client classes that are used for communicating with AWS WAFV2 Service

There is a newer version: 1.12.772
Show newest version
/*
 * Copyright 2019-2024 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.
 */
package com.amazonaws.services.wafv2.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* The criteria for inspecting login requests, used by the ATP rule group to validate credentials usage. *

*

* This is part of the AWSManagedRulesATPRuleSet configuration in ManagedRuleGroupConfig. *

*

* In these settings, you specify how your application accepts login attempts by providing the request payload type and * the names of the fields within the request body where the username and password are provided. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class RequestInspection implements Serializable, Cloneable, StructuredPojo { /** *

* The payload type for your login endpoint, either JSON or form encoded. *

*/ private String payloadType; /** *

* The name of the field in the request payload that contains your customer's username. *

*

* How you specify this depends on the request inspection payload type. *

*
    *
  • *

    * For JSON payloads, specify the field name in JSON pointer syntax. For information about the JSON Pointer syntax, * see the Internet Engineering Task Force (IETF) documentation JavaScript Object Notation (JSON) Pointer. *

    *

    * For example, for the JSON payload { "form": { "username": "THE_USERNAME" } }, the username field * specification is /form/username. *

    *
  • *
  • *

    * For form encoded payload types, use the HTML form names. *

    *

    * For example, for an HTML form with the input element named username1, the username field * specification is username1 *

    *
  • *
*/ private UsernameField usernameField; /** *

* The name of the field in the request payload that contains your customer's password. *

*

* How you specify this depends on the request inspection payload type. *

*
    *
  • *

    * For JSON payloads, specify the field name in JSON pointer syntax. For information about the JSON Pointer syntax, * see the Internet Engineering Task Force (IETF) documentation JavaScript Object Notation (JSON) Pointer. *

    *

    * For example, for the JSON payload { "form": { "password": "THE_PASSWORD" } }, the password field * specification is /form/password. *

    *
  • *
  • *

    * For form encoded payload types, use the HTML form names. *

    *

    * For example, for an HTML form with the input element named password1, the password field * specification is password1. *

    *
  • *
*/ private PasswordField passwordField; /** *

* The payload type for your login endpoint, either JSON or form encoded. *

* * @param payloadType * The payload type for your login endpoint, either JSON or form encoded. * @see PayloadType */ public void setPayloadType(String payloadType) { this.payloadType = payloadType; } /** *

* The payload type for your login endpoint, either JSON or form encoded. *

* * @return The payload type for your login endpoint, either JSON or form encoded. * @see PayloadType */ public String getPayloadType() { return this.payloadType; } /** *

* The payload type for your login endpoint, either JSON or form encoded. *

* * @param payloadType * The payload type for your login endpoint, either JSON or form encoded. * @return Returns a reference to this object so that method calls can be chained together. * @see PayloadType */ public RequestInspection withPayloadType(String payloadType) { setPayloadType(payloadType); return this; } /** *

* The payload type for your login endpoint, either JSON or form encoded. *

* * @param payloadType * The payload type for your login endpoint, either JSON or form encoded. * @return Returns a reference to this object so that method calls can be chained together. * @see PayloadType */ public RequestInspection withPayloadType(PayloadType payloadType) { this.payloadType = payloadType.toString(); return this; } /** *

* The name of the field in the request payload that contains your customer's username. *

*

* How you specify this depends on the request inspection payload type. *

*
    *
  • *

    * For JSON payloads, specify the field name in JSON pointer syntax. For information about the JSON Pointer syntax, * see the Internet Engineering Task Force (IETF) documentation JavaScript Object Notation (JSON) Pointer. *

    *

    * For example, for the JSON payload { "form": { "username": "THE_USERNAME" } }, the username field * specification is /form/username. *

    *
  • *
  • *

    * For form encoded payload types, use the HTML form names. *

    *

    * For example, for an HTML form with the input element named username1, the username field * specification is username1 *

    *
  • *
* * @param usernameField * The name of the field in the request payload that contains your customer's username.

*

* How you specify this depends on the request inspection payload type. *

*
    *
  • *

    * For JSON payloads, specify the field name in JSON pointer syntax. For information about the JSON Pointer * syntax, see the Internet Engineering Task Force (IETF) documentation JavaScript Object Notation (JSON) Pointer. *

    *

    * For example, for the JSON payload { "form": { "username": "THE_USERNAME" } }, the username * field specification is /form/username. *

    *
  • *
  • *

    * For form encoded payload types, use the HTML form names. *

    *

    * For example, for an HTML form with the input element named username1, the username field * specification is username1 *

    *
  • */ public void setUsernameField(UsernameField usernameField) { this.usernameField = usernameField; } /** *

    * The name of the field in the request payload that contains your customer's username. *

    *

    * How you specify this depends on the request inspection payload type. *

    *
      *
    • *

      * For JSON payloads, specify the field name in JSON pointer syntax. For information about the JSON Pointer syntax, * see the Internet Engineering Task Force (IETF) documentation JavaScript Object Notation (JSON) Pointer. *

      *

      * For example, for the JSON payload { "form": { "username": "THE_USERNAME" } }, the username field * specification is /form/username. *

      *
    • *
    • *

      * For form encoded payload types, use the HTML form names. *

      *

      * For example, for an HTML form with the input element named username1, the username field * specification is username1 *

      *
    • *
    * * @return The name of the field in the request payload that contains your customer's username.

    *

    * How you specify this depends on the request inspection payload type. *

    *
      *
    • *

      * For JSON payloads, specify the field name in JSON pointer syntax. For information about the JSON Pointer * syntax, see the Internet Engineering Task Force (IETF) documentation JavaScript Object Notation (JSON) Pointer. *

      *

      * For example, for the JSON payload { "form": { "username": "THE_USERNAME" } }, the username * field specification is /form/username. *

      *
    • *
    • *

      * For form encoded payload types, use the HTML form names. *

      *

      * For example, for an HTML form with the input element named username1, the username field * specification is username1 *

      *
    • */ public UsernameField getUsernameField() { return this.usernameField; } /** *

      * The name of the field in the request payload that contains your customer's username. *

      *

      * How you specify this depends on the request inspection payload type. *

      *
        *
      • *

        * For JSON payloads, specify the field name in JSON pointer syntax. For information about the JSON Pointer syntax, * see the Internet Engineering Task Force (IETF) documentation JavaScript Object Notation (JSON) Pointer. *

        *

        * For example, for the JSON payload { "form": { "username": "THE_USERNAME" } }, the username field * specification is /form/username. *

        *
      • *
      • *

        * For form encoded payload types, use the HTML form names. *

        *

        * For example, for an HTML form with the input element named username1, the username field * specification is username1 *

        *
      • *
      * * @param usernameField * The name of the field in the request payload that contains your customer's username.

      *

      * How you specify this depends on the request inspection payload type. *

      *
        *
      • *

        * For JSON payloads, specify the field name in JSON pointer syntax. For information about the JSON Pointer * syntax, see the Internet Engineering Task Force (IETF) documentation JavaScript Object Notation (JSON) Pointer. *

        *

        * For example, for the JSON payload { "form": { "username": "THE_USERNAME" } }, the username * field specification is /form/username. *

        *
      • *
      • *

        * For form encoded payload types, use the HTML form names. *

        *

        * For example, for an HTML form with the input element named username1, the username field * specification is username1 *

        *
      • * @return Returns a reference to this object so that method calls can be chained together. */ public RequestInspection withUsernameField(UsernameField usernameField) { setUsernameField(usernameField); return this; } /** *

        * The name of the field in the request payload that contains your customer's password. *

        *

        * How you specify this depends on the request inspection payload type. *

        *
          *
        • *

          * For JSON payloads, specify the field name in JSON pointer syntax. For information about the JSON Pointer syntax, * see the Internet Engineering Task Force (IETF) documentation JavaScript Object Notation (JSON) Pointer. *

          *

          * For example, for the JSON payload { "form": { "password": "THE_PASSWORD" } }, the password field * specification is /form/password. *

          *
        • *
        • *

          * For form encoded payload types, use the HTML form names. *

          *

          * For example, for an HTML form with the input element named password1, the password field * specification is password1. *

          *
        • *
        * * @param passwordField * The name of the field in the request payload that contains your customer's password.

        *

        * How you specify this depends on the request inspection payload type. *

        *
          *
        • *

          * For JSON payloads, specify the field name in JSON pointer syntax. For information about the JSON Pointer * syntax, see the Internet Engineering Task Force (IETF) documentation JavaScript Object Notation (JSON) Pointer. *

          *

          * For example, for the JSON payload { "form": { "password": "THE_PASSWORD" } }, the password * field specification is /form/password. *

          *
        • *
        • *

          * For form encoded payload types, use the HTML form names. *

          *

          * For example, for an HTML form with the input element named password1, the password field * specification is password1. *

          *
        • */ public void setPasswordField(PasswordField passwordField) { this.passwordField = passwordField; } /** *

          * The name of the field in the request payload that contains your customer's password. *

          *

          * How you specify this depends on the request inspection payload type. *

          *
            *
          • *

            * For JSON payloads, specify the field name in JSON pointer syntax. For information about the JSON Pointer syntax, * see the Internet Engineering Task Force (IETF) documentation JavaScript Object Notation (JSON) Pointer. *

            *

            * For example, for the JSON payload { "form": { "password": "THE_PASSWORD" } }, the password field * specification is /form/password. *

            *
          • *
          • *

            * For form encoded payload types, use the HTML form names. *

            *

            * For example, for an HTML form with the input element named password1, the password field * specification is password1. *

            *
          • *
          * * @return The name of the field in the request payload that contains your customer's password.

          *

          * How you specify this depends on the request inspection payload type. *

          *
            *
          • *

            * For JSON payloads, specify the field name in JSON pointer syntax. For information about the JSON Pointer * syntax, see the Internet Engineering Task Force (IETF) documentation JavaScript Object Notation (JSON) Pointer. *

            *

            * For example, for the JSON payload { "form": { "password": "THE_PASSWORD" } }, the password * field specification is /form/password. *

            *
          • *
          • *

            * For form encoded payload types, use the HTML form names. *

            *

            * For example, for an HTML form with the input element named password1, the password field * specification is password1. *

            *
          • */ public PasswordField getPasswordField() { return this.passwordField; } /** *

            * The name of the field in the request payload that contains your customer's password. *

            *

            * How you specify this depends on the request inspection payload type. *

            *
              *
            • *

              * For JSON payloads, specify the field name in JSON pointer syntax. For information about the JSON Pointer syntax, * see the Internet Engineering Task Force (IETF) documentation JavaScript Object Notation (JSON) Pointer. *

              *

              * For example, for the JSON payload { "form": { "password": "THE_PASSWORD" } }, the password field * specification is /form/password. *

              *
            • *
            • *

              * For form encoded payload types, use the HTML form names. *

              *

              * For example, for an HTML form with the input element named password1, the password field * specification is password1. *

              *
            • *
            * * @param passwordField * The name of the field in the request payload that contains your customer's password.

            *

            * How you specify this depends on the request inspection payload type. *

            *
              *
            • *

              * For JSON payloads, specify the field name in JSON pointer syntax. For information about the JSON Pointer * syntax, see the Internet Engineering Task Force (IETF) documentation JavaScript Object Notation (JSON) Pointer. *

              *

              * For example, for the JSON payload { "form": { "password": "THE_PASSWORD" } }, the password * field specification is /form/password. *

              *
            • *
            • *

              * For form encoded payload types, use the HTML form names. *

              *

              * For example, for an HTML form with the input element named password1, the password field * specification is password1. *

              *
            • * @return Returns a reference to this object so that method calls can be chained together. */ public RequestInspection withPasswordField(PasswordField passwordField) { setPasswordField(passwordField); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getPayloadType() != null) sb.append("PayloadType: ").append(getPayloadType()).append(","); if (getUsernameField() != null) sb.append("UsernameField: ").append(getUsernameField()).append(","); if (getPasswordField() != null) sb.append("PasswordField: ").append(getPasswordField()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof RequestInspection == false) return false; RequestInspection other = (RequestInspection) obj; if (other.getPayloadType() == null ^ this.getPayloadType() == null) return false; if (other.getPayloadType() != null && other.getPayloadType().equals(this.getPayloadType()) == false) return false; if (other.getUsernameField() == null ^ this.getUsernameField() == null) return false; if (other.getUsernameField() != null && other.getUsernameField().equals(this.getUsernameField()) == false) return false; if (other.getPasswordField() == null ^ this.getPasswordField() == null) return false; if (other.getPasswordField() != null && other.getPasswordField().equals(this.getPasswordField()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getPayloadType() == null) ? 0 : getPayloadType().hashCode()); hashCode = prime * hashCode + ((getUsernameField() == null) ? 0 : getUsernameField().hashCode()); hashCode = prime * hashCode + ((getPasswordField() == null) ? 0 : getPasswordField().hashCode()); return hashCode; } @Override public RequestInspection clone() { try { return (RequestInspection) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.wafv2.model.transform.RequestInspectionMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy