/*
* Copyright 2018-2023 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.waf.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the
* developer guide.
*
* For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the
* latest version, AWS WAF has a single set of endpoints for regional and global use.
*
* The response from a GetSampledRequests request includes an HTTPRequest
complex type that appears
* as Request
in the response syntax. HTTPRequest
contains information about one of the web
* requests that were returned by GetSampledRequests
.
*
* The IP address that the request originated from. If the WebACL
is associated with a CloudFront
* distribution, this is the value of one of the following fields in CloudFront access logs:
*
* c-ip
, if the viewer did not use an HTTP proxy or a load balancer to send the request
*
* x-forwarded-for
, if the viewer did use an HTTP proxy or a load balancer to send the request
*
* The two-letter country code for the country that the request originated from. For a current list of country * codes, see the Wikipedia entry ISO 3166-1 alpha-2. *
*/ private String country; /** *
* The part of a web request that identifies the resource, for example, /images/daily-ad.jpg
.
*
* The HTTP method specified in the sampled web request. CloudFront supports the following methods:
* DELETE
, GET
, HEAD
, OPTIONS
, PATCH
,
* POST
, and PUT
.
*
* The HTTP version specified in the sampled web request, for example, HTTP/1.1
.
*
* A complex type that contains two values for each header in the sampled web request: the name of the header and * the value of the header. *
*/ private java.util.List
* The IP address that the request originated from. If the WebACL
is associated with a CloudFront
* distribution, this is the value of one of the following fields in CloudFront access logs:
*
* c-ip
, if the viewer did not use an HTTP proxy or a load balancer to send the request
*
* x-forwarded-for
, if the viewer did use an HTTP proxy or a load balancer to send the request
*
WebACL
is associated with a
* CloudFront distribution, this is the value of one of the following fields in CloudFront access logs:
*
* c-ip
, if the viewer did not use an HTTP proxy or a load balancer to send the request
*
* x-forwarded-for
, if the viewer did use an HTTP proxy or a load balancer to send the request
*
* The IP address that the request originated from. If the WebACL
is associated with a CloudFront
* distribution, this is the value of one of the following fields in CloudFront access logs:
*
* c-ip
, if the viewer did not use an HTTP proxy or a load balancer to send the request
*
* x-forwarded-for
, if the viewer did use an HTTP proxy or a load balancer to send the request
*
WebACL
is associated with a
* CloudFront distribution, this is the value of one of the following fields in CloudFront access logs:
*
* c-ip
, if the viewer did not use an HTTP proxy or a load balancer to send the request
*
* x-forwarded-for
, if the viewer did use an HTTP proxy or a load balancer to send the request
*
* The IP address that the request originated from. If the WebACL
is associated with a CloudFront
* distribution, this is the value of one of the following fields in CloudFront access logs:
*
* c-ip
, if the viewer did not use an HTTP proxy or a load balancer to send the request
*
* x-forwarded-for
, if the viewer did use an HTTP proxy or a load balancer to send the request
*
WebACL
is associated with a
* CloudFront distribution, this is the value of one of the following fields in CloudFront access logs:
*
* c-ip
, if the viewer did not use an HTTP proxy or a load balancer to send the request
*
* x-forwarded-for
, if the viewer did use an HTTP proxy or a load balancer to send the request
*
* The two-letter country code for the country that the request originated from. For a current list of country * codes, see the Wikipedia entry ISO 3166-1 alpha-2. *
* * @param country * The two-letter country code for the country that the request originated from. For a current list of * country codes, see the Wikipedia entry ISO * 3166-1 alpha-2. */ public void setCountry(String country) { this.country = country; } /** ** The two-letter country code for the country that the request originated from. For a current list of country * codes, see the Wikipedia entry ISO 3166-1 alpha-2. *
* * @return The two-letter country code for the country that the request originated from. For a current list of * country codes, see the Wikipedia entry ISO * 3166-1 alpha-2. */ public String getCountry() { return this.country; } /** ** The two-letter country code for the country that the request originated from. For a current list of country * codes, see the Wikipedia entry ISO 3166-1 alpha-2. *
* * @param country * The two-letter country code for the country that the request originated from. For a current list of * country codes, see the Wikipedia entry ISO * 3166-1 alpha-2. * @return Returns a reference to this object so that method calls can be chained together. */ public HTTPRequest withCountry(String country) { setCountry(country); return this; } /** *
* The part of a web request that identifies the resource, for example, /images/daily-ad.jpg
.
*
/images/daily-ad.jpg
.
*/
public void setURI(String uRI) {
this.uRI = uRI;
}
/**
*
* The part of a web request that identifies the resource, for example, /images/daily-ad.jpg
.
*
/images/daily-ad.jpg
.
*/
public String getURI() {
return this.uRI;
}
/**
*
* The part of a web request that identifies the resource, for example, /images/daily-ad.jpg
.
*
/images/daily-ad.jpg
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public HTTPRequest withURI(String uRI) {
setURI(uRI);
return this;
}
/**
*
* The HTTP method specified in the sampled web request. CloudFront supports the following methods:
* DELETE
, GET
, HEAD
, OPTIONS
, PATCH
,
* POST
, and PUT
.
*
DELETE
, GET
, HEAD
, OPTIONS
, PATCH
,
* POST
, and PUT
.
*/
public void setMethod(String method) {
this.method = method;
}
/**
*
* The HTTP method specified in the sampled web request. CloudFront supports the following methods:
* DELETE
, GET
, HEAD
, OPTIONS
, PATCH
,
* POST
, and PUT
.
*
DELETE
, GET
, HEAD
, OPTIONS
, PATCH
,
* POST
, and PUT
.
*/
public String getMethod() {
return this.method;
}
/**
*
* The HTTP method specified in the sampled web request. CloudFront supports the following methods:
* DELETE
, GET
, HEAD
, OPTIONS
, PATCH
,
* POST
, and PUT
.
*
DELETE
, GET
, HEAD
, OPTIONS
, PATCH
,
* POST
, and PUT
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public HTTPRequest withMethod(String method) {
setMethod(method);
return this;
}
/**
*
* The HTTP version specified in the sampled web request, for example, HTTP/1.1
.
*
HTTP/1.1
.
*/
public void setHTTPVersion(String hTTPVersion) {
this.hTTPVersion = hTTPVersion;
}
/**
*
* The HTTP version specified in the sampled web request, for example, HTTP/1.1
.
*
HTTP/1.1
.
*/
public String getHTTPVersion() {
return this.hTTPVersion;
}
/**
*
* The HTTP version specified in the sampled web request, for example, HTTP/1.1
.
*
HTTP/1.1
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public HTTPRequest withHTTPVersion(String hTTPVersion) {
setHTTPVersion(hTTPVersion);
return this;
}
/**
* * A complex type that contains two values for each header in the sampled web request: the name of the header and * the value of the header. *
* * @return A complex type that contains two values for each header in the sampled web request: the name of the * header and the value of the header. */ public java.util.List* A complex type that contains two values for each header in the sampled web request: the name of the header and * the value of the header. *
* * @param headers * A complex type that contains two values for each header in the sampled web request: the name of the header * and the value of the header. */ public void setHeaders(java.util.Collection* A complex type that contains two values for each header in the sampled web request: the name of the header and * the value of the header. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setHeaders(java.util.Collection)} or {@link #withHeaders(java.util.Collection)} if you want to override * the existing values. *
* * @param headers * A complex type that contains two values for each header in the sampled web request: the name of the header * and the value of the header. * @return Returns a reference to this object so that method calls can be chained together. */ public HTTPRequest withHeaders(HTTPHeader... headers) { if (this.headers == null) { setHeaders(new java.util.ArrayList* A complex type that contains two values for each header in the sampled web request: the name of the header and * the value of the header. *
* * @param headers * A complex type that contains two values for each header in the sampled web request: the name of the header * and the value of the header. * @return Returns a reference to this object so that method calls can be chained together. */ public HTTPRequest withHeaders(java.util.Collection