/* * 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; /** *
* The part of the web request that you want WAF to inspect. Include the single FieldToMatch
type that you
* want to inspect, with additional specifications as needed, according to the type. You specify a single request
* component in FieldToMatch
for each rule statement that requires it. To inspect more than one component
* of the web request, create a separate rule statement for each component.
*
* Example JSON for a QueryString
field to match:
*
* "FieldToMatch": { "QueryString": {} }
*
* Example JSON for a Method
field to match specification:
*
* "FieldToMatch": { "Method": { "Name": "DELETE" } }
*
* Inspect a single header. Provide the name of the header to inspect, for example, User-Agent
or
* Referer
. This setting isn't case sensitive.
*
* Example JSON: "SingleHeader": { "Name": "haystack" }
*
* Alternately, you can filter and inspect all headers with the Headers
FieldToMatch
* setting.
*
* Inspect a single query argument. Provide the name of the query argument to inspect, such as UserName or * SalesRegion. The name can be up to 30 characters long and isn't case sensitive. *
*
* Example JSON: "SingleQueryArgument": { "Name": "myArgument" }
*
* Inspect all query arguments. *
*/ private AllQueryArguments allQueryArguments; /** *
* Inspect the request URI path. This is the part of the web request that identifies a resource, for example,
* /images/daily-ad.jpg
.
*
* Inspect the query string. This is the part of a URL that appears after a ?
character, if any.
*
* Inspect the request body as plain text. The request body immediately follows the request headers. This is the * part of a request that contains any additional data that you want to send to your web server as the HTTP request * body, such as data from a form. *
*
* A limited amount of the request body is forwarded to WAF for inspection by the underlying host service. For
* regional resources, the limit is 8 KB (8,192 kilobytes) and for CloudFront distributions, the limit is 16 KB
* (16,384 kilobytes). For CloudFront distributions, you can increase the limit in the web ACL's
* AssociationConfig
, for additional processing fees.
*
* For information about how to handle oversized request bodies, see the Body
object configuration.
*
* Inspect the HTTP method. The method indicates the type of operation that the request is asking the origin to * perform. *
*/ private Method method; /** ** Inspect the request body as JSON. The request body immediately follows the request headers. This is the part of a * request that contains any additional data that you want to send to your web server as the HTTP request body, such * as data from a form. *
*
* A limited amount of the request body is forwarded to WAF for inspection by the underlying host service. For
* regional resources, the limit is 8 KB (8,192 kilobytes) and for CloudFront distributions, the limit is 16 KB
* (16,384 kilobytes). For CloudFront distributions, you can increase the limit in the web ACL's
* AssociationConfig
, for additional processing fees.
*
* For information about how to handle oversized request bodies, see the JsonBody
object configuration.
*
* Inspect the request headers. You must configure scope and pattern matching filters in the Headers
* object, to define the set of headers to and the parts of the headers that WAF inspects.
*
* Only the first 8 KB (8192 bytes) of a request's headers and only the first 200 headers are forwarded to WAF for
* inspection by the underlying host service. You must configure how to handle any oversize header content in the
* Headers
object. WAF applies the pattern matching filters to the headers that it receives from the
* underlying host service.
*
* Inspect the request cookies. You must configure scope and pattern matching filters in the Cookies
* object, to define the set of cookies and the parts of the cookies that WAF inspects.
*
* Only the first 8 KB (8192 bytes) of a request's cookies and only the first 200 cookies are forwarded to WAF for
* inspection by the underlying host service. You must configure how to handle any oversize cookie content in the
* Cookies
object. WAF applies the pattern matching filters to the cookies that it receives from the
* underlying host service.
*
* Inspect a string containing the list of the request's header names, ordered as they appear in the web request
* that WAF receives for inspection. WAF generates the string and then uses that as the field to match component in
* its inspection. WAF separates the header names in the string using colons and no added spaces, for example
* host:user-agent:accept:authorization:referer
.
*
* Inspect a single header. Provide the name of the header to inspect, for example, User-Agent
or
* Referer
. This setting isn't case sensitive.
*
* Example JSON: "SingleHeader": { "Name": "haystack" }
*
* Alternately, you can filter and inspect all headers with the Headers
FieldToMatch
* setting.
*
User-Agent
* or Referer
. This setting isn't case sensitive.
*
* Example JSON: "SingleHeader": { "Name": "haystack" }
*
* Alternately, you can filter and inspect all headers with the Headers
* FieldToMatch
setting.
*/
public void setSingleHeader(SingleHeader singleHeader) {
this.singleHeader = singleHeader;
}
/**
*
* Inspect a single header. Provide the name of the header to inspect, for example, User-Agent
or
* Referer
. This setting isn't case sensitive.
*
* Example JSON: "SingleHeader": { "Name": "haystack" }
*
* Alternately, you can filter and inspect all headers with the Headers
FieldToMatch
* setting.
*
User-Agent
* or Referer
. This setting isn't case sensitive.
*
* Example JSON: "SingleHeader": { "Name": "haystack" }
*
* Alternately, you can filter and inspect all headers with the Headers
* FieldToMatch
setting.
*/
public SingleHeader getSingleHeader() {
return this.singleHeader;
}
/**
*
* Inspect a single header. Provide the name of the header to inspect, for example, User-Agent
or
* Referer
. This setting isn't case sensitive.
*
* Example JSON: "SingleHeader": { "Name": "haystack" }
*
* Alternately, you can filter and inspect all headers with the Headers
FieldToMatch
* setting.
*
User-Agent
* or Referer
. This setting isn't case sensitive.
*
* Example JSON: "SingleHeader": { "Name": "haystack" }
*
* Alternately, you can filter and inspect all headers with the Headers
* FieldToMatch
setting.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public FieldToMatch withSingleHeader(SingleHeader singleHeader) {
setSingleHeader(singleHeader);
return this;
}
/**
*
* Inspect a single query argument. Provide the name of the query argument to inspect, such as UserName or * SalesRegion. The name can be up to 30 characters long and isn't case sensitive. *
*
* Example JSON: "SingleQueryArgument": { "Name": "myArgument" }
*
* Example JSON: "SingleQueryArgument": { "Name": "myArgument" }
*/
public void setSingleQueryArgument(SingleQueryArgument singleQueryArgument) {
this.singleQueryArgument = singleQueryArgument;
}
/**
*
* Inspect a single query argument. Provide the name of the query argument to inspect, such as UserName or * SalesRegion. The name can be up to 30 characters long and isn't case sensitive. *
*
* Example JSON: "SingleQueryArgument": { "Name": "myArgument" }
*
* Example JSON: "SingleQueryArgument": { "Name": "myArgument" }
*/
public SingleQueryArgument getSingleQueryArgument() {
return this.singleQueryArgument;
}
/**
*
* Inspect a single query argument. Provide the name of the query argument to inspect, such as UserName or * SalesRegion. The name can be up to 30 characters long and isn't case sensitive. *
*
* Example JSON: "SingleQueryArgument": { "Name": "myArgument" }
*
* Example JSON: "SingleQueryArgument": { "Name": "myArgument" }
* @return Returns a reference to this object so that method calls can be chained together.
*/
public FieldToMatch withSingleQueryArgument(SingleQueryArgument singleQueryArgument) {
setSingleQueryArgument(singleQueryArgument);
return this;
}
/**
*
* Inspect all query arguments. *
* * @param allQueryArguments * Inspect all query arguments. */ public void setAllQueryArguments(AllQueryArguments allQueryArguments) { this.allQueryArguments = allQueryArguments; } /** ** Inspect all query arguments. *
* * @return Inspect all query arguments. */ public AllQueryArguments getAllQueryArguments() { return this.allQueryArguments; } /** ** Inspect all query arguments. *
* * @param allQueryArguments * Inspect all query arguments. * @return Returns a reference to this object so that method calls can be chained together. */ public FieldToMatch withAllQueryArguments(AllQueryArguments allQueryArguments) { setAllQueryArguments(allQueryArguments); return this; } /** *
* Inspect the request URI path. This is the part of the web request that identifies a resource, for example,
* /images/daily-ad.jpg
.
*
/images/daily-ad.jpg
.
*/
public void setUriPath(UriPath uriPath) {
this.uriPath = uriPath;
}
/**
*
* Inspect the request URI path. This is the part of the web request that identifies a resource, for example,
* /images/daily-ad.jpg
.
*
/images/daily-ad.jpg
.
*/
public UriPath getUriPath() {
return this.uriPath;
}
/**
*
* Inspect the request URI path. This is the part of the web request that identifies a 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 FieldToMatch withUriPath(UriPath uriPath) {
setUriPath(uriPath);
return this;
}
/**
*
* Inspect the query string. This is the part of a URL that appears after a ?
character, if any.
*
?
character, if any.
*/
public void setQueryString(QueryString queryString) {
this.queryString = queryString;
}
/**
*
* Inspect the query string. This is the part of a URL that appears after a ?
character, if any.
*
?
character, if
* any.
*/
public QueryString getQueryString() {
return this.queryString;
}
/**
*
* Inspect the query string. This is the part of a URL that appears after a ?
character, if any.
*
?
character, if any.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public FieldToMatch withQueryString(QueryString queryString) {
setQueryString(queryString);
return this;
}
/**
* * Inspect the request body as plain text. The request body immediately follows the request headers. This is the * part of a request that contains any additional data that you want to send to your web server as the HTTP request * body, such as data from a form. *
*
* A limited amount of the request body is forwarded to WAF for inspection by the underlying host service. For
* regional resources, the limit is 8 KB (8,192 kilobytes) and for CloudFront distributions, the limit is 16 KB
* (16,384 kilobytes). For CloudFront distributions, you can increase the limit in the web ACL's
* AssociationConfig
, for additional processing fees.
*
* For information about how to handle oversized request bodies, see the Body
object configuration.
*
* A limited amount of the request body is forwarded to WAF for inspection by the underlying host service.
* For regional resources, the limit is 8 KB (8,192 kilobytes) and for CloudFront distributions, the limit is
* 16 KB (16,384 kilobytes). For CloudFront distributions, you can increase the limit in the web ACL's
* AssociationConfig
, for additional processing fees.
*
* For information about how to handle oversized request bodies, see the Body
object
* configuration.
*/
public void setBody(Body body) {
this.body = body;
}
/**
*
* Inspect the request body as plain text. The request body immediately follows the request headers. This is the * part of a request that contains any additional data that you want to send to your web server as the HTTP request * body, such as data from a form. *
*
* A limited amount of the request body is forwarded to WAF for inspection by the underlying host service. For
* regional resources, the limit is 8 KB (8,192 kilobytes) and for CloudFront distributions, the limit is 16 KB
* (16,384 kilobytes). For CloudFront distributions, you can increase the limit in the web ACL's
* AssociationConfig
, for additional processing fees.
*
* For information about how to handle oversized request bodies, see the Body
object configuration.
*
* A limited amount of the request body is forwarded to WAF for inspection by the underlying host service.
* For regional resources, the limit is 8 KB (8,192 kilobytes) and for CloudFront distributions, the limit
* is 16 KB (16,384 kilobytes). For CloudFront distributions, you can increase the limit in the web ACL's
* AssociationConfig
, for additional processing fees.
*
* For information about how to handle oversized request bodies, see the Body
object
* configuration.
*/
public Body getBody() {
return this.body;
}
/**
*
* Inspect the request body as plain text. The request body immediately follows the request headers. This is the * part of a request that contains any additional data that you want to send to your web server as the HTTP request * body, such as data from a form. *
*
* A limited amount of the request body is forwarded to WAF for inspection by the underlying host service. For
* regional resources, the limit is 8 KB (8,192 kilobytes) and for CloudFront distributions, the limit is 16 KB
* (16,384 kilobytes). For CloudFront distributions, you can increase the limit in the web ACL's
* AssociationConfig
, for additional processing fees.
*
* For information about how to handle oversized request bodies, see the Body
object configuration.
*
* A limited amount of the request body is forwarded to WAF for inspection by the underlying host service.
* For regional resources, the limit is 8 KB (8,192 kilobytes) and for CloudFront distributions, the limit is
* 16 KB (16,384 kilobytes). For CloudFront distributions, you can increase the limit in the web ACL's
* AssociationConfig
, for additional processing fees.
*
* For information about how to handle oversized request bodies, see the Body
object
* configuration.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public FieldToMatch withBody(Body body) {
setBody(body);
return this;
}
/**
*
* Inspect the HTTP method. The method indicates the type of operation that the request is asking the origin to * perform. *
* * @param method * Inspect the HTTP method. The method indicates the type of operation that the request is asking the origin * to perform. */ public void setMethod(Method method) { this.method = method; } /** ** Inspect the HTTP method. The method indicates the type of operation that the request is asking the origin to * perform. *
* * @return Inspect the HTTP method. The method indicates the type of operation that the request is asking the origin * to perform. */ public Method getMethod() { return this.method; } /** ** Inspect the HTTP method. The method indicates the type of operation that the request is asking the origin to * perform. *
* * @param method * Inspect the HTTP method. The method indicates the type of operation that the request is asking the origin * to perform. * @return Returns a reference to this object so that method calls can be chained together. */ public FieldToMatch withMethod(Method method) { setMethod(method); return this; } /** ** Inspect the request body as JSON. The request body immediately follows the request headers. This is the part of a * request that contains any additional data that you want to send to your web server as the HTTP request body, such * as data from a form. *
*
* A limited amount of the request body is forwarded to WAF for inspection by the underlying host service. For
* regional resources, the limit is 8 KB (8,192 kilobytes) and for CloudFront distributions, the limit is 16 KB
* (16,384 kilobytes). For CloudFront distributions, you can increase the limit in the web ACL's
* AssociationConfig
, for additional processing fees.
*
* For information about how to handle oversized request bodies, see the JsonBody
object configuration.
*
* A limited amount of the request body is forwarded to WAF for inspection by the underlying host service.
* For regional resources, the limit is 8 KB (8,192 kilobytes) and for CloudFront distributions, the limit is
* 16 KB (16,384 kilobytes). For CloudFront distributions, you can increase the limit in the web ACL's
* AssociationConfig
, for additional processing fees.
*
* For information about how to handle oversized request bodies, see the JsonBody
object
* configuration.
*/
public void setJsonBody(JsonBody jsonBody) {
this.jsonBody = jsonBody;
}
/**
*
* Inspect the request body as JSON. The request body immediately follows the request headers. This is the part of a * request that contains any additional data that you want to send to your web server as the HTTP request body, such * as data from a form. *
*
* A limited amount of the request body is forwarded to WAF for inspection by the underlying host service. For
* regional resources, the limit is 8 KB (8,192 kilobytes) and for CloudFront distributions, the limit is 16 KB
* (16,384 kilobytes). For CloudFront distributions, you can increase the limit in the web ACL's
* AssociationConfig
, for additional processing fees.
*
* For information about how to handle oversized request bodies, see the JsonBody
object configuration.
*
* A limited amount of the request body is forwarded to WAF for inspection by the underlying host service.
* For regional resources, the limit is 8 KB (8,192 kilobytes) and for CloudFront distributions, the limit
* is 16 KB (16,384 kilobytes). For CloudFront distributions, you can increase the limit in the web ACL's
* AssociationConfig
, for additional processing fees.
*
* For information about how to handle oversized request bodies, see the JsonBody
object
* configuration.
*/
public JsonBody getJsonBody() {
return this.jsonBody;
}
/**
*
* Inspect the request body as JSON. The request body immediately follows the request headers. This is the part of a * request that contains any additional data that you want to send to your web server as the HTTP request body, such * as data from a form. *
*
* A limited amount of the request body is forwarded to WAF for inspection by the underlying host service. For
* regional resources, the limit is 8 KB (8,192 kilobytes) and for CloudFront distributions, the limit is 16 KB
* (16,384 kilobytes). For CloudFront distributions, you can increase the limit in the web ACL's
* AssociationConfig
, for additional processing fees.
*
* For information about how to handle oversized request bodies, see the JsonBody
object configuration.
*
* A limited amount of the request body is forwarded to WAF for inspection by the underlying host service.
* For regional resources, the limit is 8 KB (8,192 kilobytes) and for CloudFront distributions, the limit is
* 16 KB (16,384 kilobytes). For CloudFront distributions, you can increase the limit in the web ACL's
* AssociationConfig
, for additional processing fees.
*
* For information about how to handle oversized request bodies, see the JsonBody
object
* configuration.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public FieldToMatch withJsonBody(JsonBody jsonBody) {
setJsonBody(jsonBody);
return this;
}
/**
*
* Inspect the request headers. You must configure scope and pattern matching filters in the Headers
* object, to define the set of headers to and the parts of the headers that WAF inspects.
*
* Only the first 8 KB (8192 bytes) of a request's headers and only the first 200 headers are forwarded to WAF for
* inspection by the underlying host service. You must configure how to handle any oversize header content in the
* Headers
object. WAF applies the pattern matching filters to the headers that it receives from the
* underlying host service.
*
Headers
object, to define the set of headers to and the parts of the headers that WAF
* inspects.
*
* Only the first 8 KB (8192 bytes) of a request's headers and only the first 200 headers are forwarded to
* WAF for inspection by the underlying host service. You must configure how to handle any oversize header
* content in the Headers
object. WAF applies the pattern matching filters to the headers that
* it receives from the underlying host service.
*/
public void setHeaders(Headers headers) {
this.headers = headers;
}
/**
*
* Inspect the request headers. You must configure scope and pattern matching filters in the Headers
* object, to define the set of headers to and the parts of the headers that WAF inspects.
*
* Only the first 8 KB (8192 bytes) of a request's headers and only the first 200 headers are forwarded to WAF for
* inspection by the underlying host service. You must configure how to handle any oversize header content in the
* Headers
object. WAF applies the pattern matching filters to the headers that it receives from the
* underlying host service.
*
Headers
object, to define the set of headers to and the parts of the headers that WAF
* inspects.
*
* Only the first 8 KB (8192 bytes) of a request's headers and only the first 200 headers are forwarded to
* WAF for inspection by the underlying host service. You must configure how to handle any oversize header
* content in the Headers
object. WAF applies the pattern matching filters to the headers that
* it receives from the underlying host service.
*/
public Headers getHeaders() {
return this.headers;
}
/**
*
* Inspect the request headers. You must configure scope and pattern matching filters in the Headers
* object, to define the set of headers to and the parts of the headers that WAF inspects.
*
* Only the first 8 KB (8192 bytes) of a request's headers and only the first 200 headers are forwarded to WAF for
* inspection by the underlying host service. You must configure how to handle any oversize header content in the
* Headers
object. WAF applies the pattern matching filters to the headers that it receives from the
* underlying host service.
*
Headers
object, to define the set of headers to and the parts of the headers that WAF
* inspects.
*
* Only the first 8 KB (8192 bytes) of a request's headers and only the first 200 headers are forwarded to
* WAF for inspection by the underlying host service. You must configure how to handle any oversize header
* content in the Headers
object. WAF applies the pattern matching filters to the headers that
* it receives from the underlying host service.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public FieldToMatch withHeaders(Headers headers) {
setHeaders(headers);
return this;
}
/**
*
* Inspect the request cookies. You must configure scope and pattern matching filters in the Cookies
* object, to define the set of cookies and the parts of the cookies that WAF inspects.
*
* Only the first 8 KB (8192 bytes) of a request's cookies and only the first 200 cookies are forwarded to WAF for
* inspection by the underlying host service. You must configure how to handle any oversize cookie content in the
* Cookies
object. WAF applies the pattern matching filters to the cookies that it receives from the
* underlying host service.
*
Cookies
object, to define the set of cookies and the parts of the cookies that WAF inspects.
*
*
* Only the first 8 KB (8192 bytes) of a request's cookies and only the first 200 cookies are forwarded to
* WAF for inspection by the underlying host service. You must configure how to handle any oversize cookie
* content in the Cookies
object. WAF applies the pattern matching filters to the cookies that
* it receives from the underlying host service.
*/
public void setCookies(Cookies cookies) {
this.cookies = cookies;
}
/**
*
* Inspect the request cookies. You must configure scope and pattern matching filters in the Cookies
* object, to define the set of cookies and the parts of the cookies that WAF inspects.
*
* Only the first 8 KB (8192 bytes) of a request's cookies and only the first 200 cookies are forwarded to WAF for
* inspection by the underlying host service. You must configure how to handle any oversize cookie content in the
* Cookies
object. WAF applies the pattern matching filters to the cookies that it receives from the
* underlying host service.
*
Cookies
object, to define the set of cookies and the parts of the cookies that WAF inspects.
*
*
* Only the first 8 KB (8192 bytes) of a request's cookies and only the first 200 cookies are forwarded to
* WAF for inspection by the underlying host service. You must configure how to handle any oversize cookie
* content in the Cookies
object. WAF applies the pattern matching filters to the cookies that
* it receives from the underlying host service.
*/
public Cookies getCookies() {
return this.cookies;
}
/**
*
* Inspect the request cookies. You must configure scope and pattern matching filters in the Cookies
* object, to define the set of cookies and the parts of the cookies that WAF inspects.
*
* Only the first 8 KB (8192 bytes) of a request's cookies and only the first 200 cookies are forwarded to WAF for
* inspection by the underlying host service. You must configure how to handle any oversize cookie content in the
* Cookies
object. WAF applies the pattern matching filters to the cookies that it receives from the
* underlying host service.
*
Cookies
object, to define the set of cookies and the parts of the cookies that WAF inspects.
*
*
* Only the first 8 KB (8192 bytes) of a request's cookies and only the first 200 cookies are forwarded to
* WAF for inspection by the underlying host service. You must configure how to handle any oversize cookie
* content in the Cookies
object. WAF applies the pattern matching filters to the cookies that
* it receives from the underlying host service.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public FieldToMatch withCookies(Cookies cookies) {
setCookies(cookies);
return this;
}
/**
*
* Inspect a string containing the list of the request's header names, ordered as they appear in the web request
* that WAF receives for inspection. WAF generates the string and then uses that as the field to match component in
* its inspection. WAF separates the header names in the string using colons and no added spaces, for example
* host:user-agent:accept:authorization:referer
.
*
host:user-agent:accept:authorization:referer
.
*/
public void setHeaderOrder(HeaderOrder headerOrder) {
this.headerOrder = headerOrder;
}
/**
*
* Inspect a string containing the list of the request's header names, ordered as they appear in the web request
* that WAF receives for inspection. WAF generates the string and then uses that as the field to match component in
* its inspection. WAF separates the header names in the string using colons and no added spaces, for example
* host:user-agent:accept:authorization:referer
.
*
host:user-agent:accept:authorization:referer
.
*/
public HeaderOrder getHeaderOrder() {
return this.headerOrder;
}
/**
*
* Inspect a string containing the list of the request's header names, ordered as they appear in the web request
* that WAF receives for inspection. WAF generates the string and then uses that as the field to match component in
* its inspection. WAF separates the header names in the string using colons and no added spaces, for example
* host:user-agent:accept:authorization:referer
.
*
host:user-agent:accept:authorization:referer
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public FieldToMatch withHeaderOrder(HeaderOrder headerOrder) {
setHeaderOrder(headerOrder);
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 (getSingleHeader() != null)
sb.append("SingleHeader: ").append(getSingleHeader()).append(",");
if (getSingleQueryArgument() != null)
sb.append("SingleQueryArgument: ").append(getSingleQueryArgument()).append(",");
if (getAllQueryArguments() != null)
sb.append("AllQueryArguments: ").append(getAllQueryArguments()).append(",");
if (getUriPath() != null)
sb.append("UriPath: ").append(getUriPath()).append(",");
if (getQueryString() != null)
sb.append("QueryString: ").append(getQueryString()).append(",");
if (getBody() != null)
sb.append("Body: ").append(getBody()).append(",");
if (getMethod() != null)
sb.append("Method: ").append(getMethod()).append(",");
if (getJsonBody() != null)
sb.append("JsonBody: ").append(getJsonBody()).append(",");
if (getHeaders() != null)
sb.append("Headers: ").append(getHeaders()).append(",");
if (getCookies() != null)
sb.append("Cookies: ").append(getCookies()).append(",");
if (getHeaderOrder() != null)
sb.append("HeaderOrder: ").append(getHeaderOrder());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof FieldToMatch == false)
return false;
FieldToMatch other = (FieldToMatch) obj;
if (other.getSingleHeader() == null ^ this.getSingleHeader() == null)
return false;
if (other.getSingleHeader() != null && other.getSingleHeader().equals(this.getSingleHeader()) == false)
return false;
if (other.getSingleQueryArgument() == null ^ this.getSingleQueryArgument() == null)
return false;
if (other.getSingleQueryArgument() != null && other.getSingleQueryArgument().equals(this.getSingleQueryArgument()) == false)
return false;
if (other.getAllQueryArguments() == null ^ this.getAllQueryArguments() == null)
return false;
if (other.getAllQueryArguments() != null && other.getAllQueryArguments().equals(this.getAllQueryArguments()) == false)
return false;
if (other.getUriPath() == null ^ this.getUriPath() == null)
return false;
if (other.getUriPath() != null && other.getUriPath().equals(this.getUriPath()) == false)
return false;
if (other.getQueryString() == null ^ this.getQueryString() == null)
return false;
if (other.getQueryString() != null && other.getQueryString().equals(this.getQueryString()) == false)
return false;
if (other.getBody() == null ^ this.getBody() == null)
return false;
if (other.getBody() != null && other.getBody().equals(this.getBody()) == false)
return false;
if (other.getMethod() == null ^ this.getMethod() == null)
return false;
if (other.getMethod() != null && other.getMethod().equals(this.getMethod()) == false)
return false;
if (other.getJsonBody() == null ^ this.getJsonBody() == null)
return false;
if (other.getJsonBody() != null && other.getJsonBody().equals(this.getJsonBody()) == false)
return false;
if (other.getHeaders() == null ^ this.getHeaders() == null)
return false;
if (other.getHeaders() != null && other.getHeaders().equals(this.getHeaders()) == false)
return false;
if (other.getCookies() == null ^ this.getCookies() == null)
return false;
if (other.getCookies() != null && other.getCookies().equals(this.getCookies()) == false)
return false;
if (other.getHeaderOrder() == null ^ this.getHeaderOrder() == null)
return false;
if (other.getHeaderOrder() != null && other.getHeaderOrder().equals(this.getHeaderOrder()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getSingleHeader() == null) ? 0 : getSingleHeader().hashCode());
hashCode = prime * hashCode + ((getSingleQueryArgument() == null) ? 0 : getSingleQueryArgument().hashCode());
hashCode = prime * hashCode + ((getAllQueryArguments() == null) ? 0 : getAllQueryArguments().hashCode());
hashCode = prime * hashCode + ((getUriPath() == null) ? 0 : getUriPath().hashCode());
hashCode = prime * hashCode + ((getQueryString() == null) ? 0 : getQueryString().hashCode());
hashCode = prime * hashCode + ((getBody() == null) ? 0 : getBody().hashCode());
hashCode = prime * hashCode + ((getMethod() == null) ? 0 : getMethod().hashCode());
hashCode = prime * hashCode + ((getJsonBody() == null) ? 0 : getJsonBody().hashCode());
hashCode = prime * hashCode + ((getHeaders() == null) ? 0 : getHeaders().hashCode());
hashCode = prime * hashCode + ((getCookies() == null) ? 0 : getCookies().hashCode());
hashCode = prime * hashCode + ((getHeaderOrder() == null) ? 0 : getHeaderOrder().hashCode());
return hashCode;
}
@Override
public FieldToMatch clone() {
try {
return (FieldToMatch) 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.FieldToMatchMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}