/* * 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.wafv2.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Part of the response from GetSampledRequests. This is a complex type that appears as Request
in
* the response syntax. HTTPRequest
contains information about one of the web requests.
*
* The IP address that the request originated from. If the web ACL 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 URI path of the request, which identifies the resource, for example, /images/daily-ad.jpg
.
*
* The HTTP method specified in the sampled web request. *
*/ private String method; /** *
* The HTTP version specified in the sampled web request, for example, HTTP/1.1
.
*
* A complex type that contains the name and value for each header in the sampled web request. *
*/ private java.util.List* The IP address that the request originated from. If the web ACL 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
*
* 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 web ACL 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
*
* 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 web ACL 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
*
* 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 URI path of the request, which identifies the resource, for example, /images/daily-ad.jpg
.
*
/images/daily-ad.jpg
* .
*/
public void setURI(String uRI) {
this.uRI = uRI;
}
/**
*
* The URI path of the request, which identifies the resource, for example, /images/daily-ad.jpg
.
*
/images/daily-ad.jpg
.
*/
public String getURI() {
return this.uRI;
}
/**
*
* The URI path of the request, which 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. *
* * @param method * The HTTP method specified in the sampled web request. */ public void setMethod(String method) { this.method = method; } /** ** The HTTP method specified in the sampled web request. *
* * @return The HTTP method specified in the sampled web request. */ public String getMethod() { return this.method; } /** ** The HTTP method specified in the sampled web request. *
* * @param method * The HTTP method specified in the sampled web request. * @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 the name and value for each header in the sampled web request. *
* * @return A complex type that contains the name and value for each header in the sampled web request. */ public java.util.List* A complex type that contains the name and value for each header in the sampled web request. *
* * @param headers * A complex type that contains the name and value for each header in the sampled web request. */ public void setHeaders(java.util.Collection* A complex type that contains the name and value for each header in the sampled web request. *
** 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 the name and value for each header in the sampled web request. * @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 the name and value for each header in the sampled web request. *
* * @param headers * A complex type that contains the name and value for each header in the sampled web request. * @return Returns a reference to this object so that method calls can be chained together. */ public HTTPRequest withHeaders(java.util.Collection