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

com.amazonaws.services.waf.model.GetSampledRequestsResult Maven / Gradle / Ivy

Go to download

The AWS SDK for Java with support for OSGi. The AWS SDK for Java provides Java APIs for building software on AWS' cost-effective, scalable, and reliable infrastructure products. The AWS Java SDK allows developers to code against APIs for all of Amazon's infrastructure web services (Amazon S3, Amazon EC2, Amazon SQS, Amazon Relational Database Service, Amazon AutoScaling, etc).

There is a newer version: 1.11.60
Show newest version
/*
 * Copyright 2011-2016 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;

/**
 * 
 */
public class GetSampledRequestsResult implements Serializable, Cloneable {

    /**
     * 

* A complex type that contains detailed information about each of the * requests in the sample. *

*/ private java.util.List sampledRequests; /** *

* The total number of requests from which GetSampledRequests * got a sample of MaxItems requests. If * PopulationSize is less than MaxItems, the * sample includes every request that your AWS resource received during the * specified time range. *

*/ private Long populationSize; /** *

* Usually, TimeWindow is the time range that you specified in * the GetSampledRequests request. However, if your AWS * resource received more than 5,000 requests during the time range that you * specified in the request, GetSampledRequests returns the * time range for the first 5,000 requests. *

*/ private TimeWindow timeWindow; /** *

* A complex type that contains detailed information about each of the * requests in the sample. *

* * @return A complex type that contains detailed information about each of * the requests in the sample. */ public java.util.List getSampledRequests() { return sampledRequests; } /** *

* A complex type that contains detailed information about each of the * requests in the sample. *

* * @param sampledRequests * A complex type that contains detailed information about each of * the requests in the sample. */ public void setSampledRequests( java.util.Collection sampledRequests) { if (sampledRequests == null) { this.sampledRequests = null; return; } this.sampledRequests = new java.util.ArrayList( sampledRequests); } /** *

* A complex type that contains detailed information about each of the * requests in the sample. *

*

* NOTE: This method appends the values to the existing list (if * any). Use {@link #setSampledRequests(java.util.Collection)} or * {@link #withSampledRequests(java.util.Collection)} if you want to * override the existing values. *

* * @param sampledRequests * A complex type that contains detailed information about each of * the requests in the sample. * @return Returns a reference to this object so that method calls can be * chained together. */ public GetSampledRequestsResult withSampledRequests( SampledHTTPRequest... sampledRequests) { if (this.sampledRequests == null) { setSampledRequests(new java.util.ArrayList( sampledRequests.length)); } for (SampledHTTPRequest ele : sampledRequests) { this.sampledRequests.add(ele); } return this; } /** *

* A complex type that contains detailed information about each of the * requests in the sample. *

* * @param sampledRequests * A complex type that contains detailed information about each of * the requests in the sample. * @return Returns a reference to this object so that method calls can be * chained together. */ public GetSampledRequestsResult withSampledRequests( java.util.Collection sampledRequests) { setSampledRequests(sampledRequests); return this; } /** *

* The total number of requests from which GetSampledRequests * got a sample of MaxItems requests. If * PopulationSize is less than MaxItems, the * sample includes every request that your AWS resource received during the * specified time range. *

* * @param populationSize * The total number of requests from which * GetSampledRequests got a sample of * MaxItems requests. If PopulationSize is * less than MaxItems, the sample includes every request * that your AWS resource received during the specified time range. */ public void setPopulationSize(Long populationSize) { this.populationSize = populationSize; } /** *

* The total number of requests from which GetSampledRequests * got a sample of MaxItems requests. If * PopulationSize is less than MaxItems, the * sample includes every request that your AWS resource received during the * specified time range. *

* * @return The total number of requests from which * GetSampledRequests got a sample of * MaxItems requests. If PopulationSize is * less than MaxItems, the sample includes every * request that your AWS resource received during the specified time * range. */ public Long getPopulationSize() { return this.populationSize; } /** *

* The total number of requests from which GetSampledRequests * got a sample of MaxItems requests. If * PopulationSize is less than MaxItems, the * sample includes every request that your AWS resource received during the * specified time range. *

* * @param populationSize * The total number of requests from which * GetSampledRequests got a sample of * MaxItems requests. If PopulationSize is * less than MaxItems, the sample includes every request * that your AWS resource received during the specified time range. * @return Returns a reference to this object so that method calls can be * chained together. */ public GetSampledRequestsResult withPopulationSize(Long populationSize) { setPopulationSize(populationSize); return this; } /** *

* Usually, TimeWindow is the time range that you specified in * the GetSampledRequests request. However, if your AWS * resource received more than 5,000 requests during the time range that you * specified in the request, GetSampledRequests returns the * time range for the first 5,000 requests. *

* * @param timeWindow * Usually, TimeWindow is the time range that you * specified in the GetSampledRequests request. However, * if your AWS resource received more than 5,000 requests during the * time range that you specified in the request, * GetSampledRequests returns the time range for the * first 5,000 requests. */ public void setTimeWindow(TimeWindow timeWindow) { this.timeWindow = timeWindow; } /** *

* Usually, TimeWindow is the time range that you specified in * the GetSampledRequests request. However, if your AWS * resource received more than 5,000 requests during the time range that you * specified in the request, GetSampledRequests returns the * time range for the first 5,000 requests. *

* * @return Usually, TimeWindow is the time range that you * specified in the GetSampledRequests request. * However, if your AWS resource received more than 5,000 requests * during the time range that you specified in the request, * GetSampledRequests returns the time range for the * first 5,000 requests. */ public TimeWindow getTimeWindow() { return this.timeWindow; } /** *

* Usually, TimeWindow is the time range that you specified in * the GetSampledRequests request. However, if your AWS * resource received more than 5,000 requests during the time range that you * specified in the request, GetSampledRequests returns the * time range for the first 5,000 requests. *

* * @param timeWindow * Usually, TimeWindow is the time range that you * specified in the GetSampledRequests request. However, * if your AWS resource received more than 5,000 requests during the * time range that you specified in the request, * GetSampledRequests returns the time range for the * first 5,000 requests. * @return Returns a reference to this object so that method calls can be * chained together. */ public GetSampledRequestsResult withTimeWindow(TimeWindow timeWindow) { setTimeWindow(timeWindow); return this; } /** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getSampledRequests() != null) sb.append("SampledRequests: " + getSampledRequests() + ","); if (getPopulationSize() != null) sb.append("PopulationSize: " + getPopulationSize() + ","); if (getTimeWindow() != null) sb.append("TimeWindow: " + getTimeWindow()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetSampledRequestsResult == false) return false; GetSampledRequestsResult other = (GetSampledRequestsResult) obj; if (other.getSampledRequests() == null ^ this.getSampledRequests() == null) return false; if (other.getSampledRequests() != null && other.getSampledRequests().equals(this.getSampledRequests()) == false) return false; if (other.getPopulationSize() == null ^ this.getPopulationSize() == null) return false; if (other.getPopulationSize() != null && other.getPopulationSize().equals(this.getPopulationSize()) == false) return false; if (other.getTimeWindow() == null ^ this.getTimeWindow() == null) return false; if (other.getTimeWindow() != null && other.getTimeWindow().equals(this.getTimeWindow()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getSampledRequests() == null) ? 0 : getSampledRequests() .hashCode()); hashCode = prime * hashCode + ((getPopulationSize() == null) ? 0 : getPopulationSize() .hashCode()); hashCode = prime * hashCode + ((getTimeWindow() == null) ? 0 : getTimeWindow().hashCode()); return hashCode; } @Override public GetSampledRequestsResult clone() { try { return (GetSampledRequestsResult) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException( "Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy