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

com.amazonaws.services.logs.model.GetQueryResultsResult Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon CloudWatch Logs module holds the client classes that are used for communicating with Amazon CloudWatch Logs 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.logs.model;

import java.io.Serializable;
import javax.annotation.Generated;

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

    /**
     * 

* The log events that matched the query criteria during the most recent time it ran. *

*

* The results value is an array of arrays. Each log event is one object in the top-level array. Each * of these log event objects is an array of field/value pairs. *

*/ private com.amazonaws.internal.SdkInternalList> results; /** *

* Includes the number of log events scanned by the query, the number of log events that matched the query criteria, * and the total number of bytes in the scanned log events. These values reflect the full raw results of the query. *

*/ private QueryStatistics statistics; /** *

* The status of the most recent running of the query. Possible values are Cancelled, * Complete, Failed, Running, Scheduled, Timeout, * and Unknown. *

*

* Queries time out after 60 minutes of runtime. To avoid having your queries time out, reduce the time range being * searched or partition your query into a number of queries. *

*/ private String status; /** *

* If you associated an KMS key with the CloudWatch Logs Insights query results in this account, this field displays * the ARN of the key that's used to encrypt the query results when StartQuery * stores them. *

*/ private String encryptionKey; /** *

* The log events that matched the query criteria during the most recent time it ran. *

*

* The results value is an array of arrays. Each log event is one object in the top-level array. Each * of these log event objects is an array of field/value pairs. *

* * @return The log events that matched the query criteria during the most recent time it ran.

*

* The results value is an array of arrays. Each log event is one object in the top-level * array. Each of these log event objects is an array of field/value pairs. */ public java.util.List> getResults() { if (results == null) { results = new com.amazonaws.internal.SdkInternalList>(); } return results; } /** *

* The log events that matched the query criteria during the most recent time it ran. *

*

* The results value is an array of arrays. Each log event is one object in the top-level array. Each * of these log event objects is an array of field/value pairs. *

* * @param results * The log events that matched the query criteria during the most recent time it ran.

*

* The results value is an array of arrays. Each log event is one object in the top-level array. * Each of these log event objects is an array of field/value pairs. */ public void setResults(java.util.Collection> results) { if (results == null) { this.results = null; return; } this.results = new com.amazonaws.internal.SdkInternalList>(results); } /** *

* The log events that matched the query criteria during the most recent time it ran. *

*

* The results value is an array of arrays. Each log event is one object in the top-level array. Each * of these log event objects is an array of field/value pairs. *

*

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

* * @param results * The log events that matched the query criteria during the most recent time it ran.

*

* The results value is an array of arrays. Each log event is one object in the top-level array. * Each of these log event objects is an array of field/value pairs. * @return Returns a reference to this object so that method calls can be chained together. */ public GetQueryResultsResult withResults(java.util.List... results) { if (this.results == null) { setResults(new com.amazonaws.internal.SdkInternalList>(results.length)); } for (java.util.List ele : results) { this.results.add(ele); } return this; } /** *

* The log events that matched the query criteria during the most recent time it ran. *

*

* The results value is an array of arrays. Each log event is one object in the top-level array. Each * of these log event objects is an array of field/value pairs. *

* * @param results * The log events that matched the query criteria during the most recent time it ran.

*

* The results value is an array of arrays. Each log event is one object in the top-level array. * Each of these log event objects is an array of field/value pairs. * @return Returns a reference to this object so that method calls can be chained together. */ public GetQueryResultsResult withResults(java.util.Collection> results) { setResults(results); return this; } /** *

* Includes the number of log events scanned by the query, the number of log events that matched the query criteria, * and the total number of bytes in the scanned log events. These values reflect the full raw results of the query. *

* * @param statistics * Includes the number of log events scanned by the query, the number of log events that matched the query * criteria, and the total number of bytes in the scanned log events. These values reflect the full raw * results of the query. */ public void setStatistics(QueryStatistics statistics) { this.statistics = statistics; } /** *

* Includes the number of log events scanned by the query, the number of log events that matched the query criteria, * and the total number of bytes in the scanned log events. These values reflect the full raw results of the query. *

* * @return Includes the number of log events scanned by the query, the number of log events that matched the query * criteria, and the total number of bytes in the scanned log events. These values reflect the full raw * results of the query. */ public QueryStatistics getStatistics() { return this.statistics; } /** *

* Includes the number of log events scanned by the query, the number of log events that matched the query criteria, * and the total number of bytes in the scanned log events. These values reflect the full raw results of the query. *

* * @param statistics * Includes the number of log events scanned by the query, the number of log events that matched the query * criteria, and the total number of bytes in the scanned log events. These values reflect the full raw * results of the query. * @return Returns a reference to this object so that method calls can be chained together. */ public GetQueryResultsResult withStatistics(QueryStatistics statistics) { setStatistics(statistics); return this; } /** *

* The status of the most recent running of the query. Possible values are Cancelled, * Complete, Failed, Running, Scheduled, Timeout, * and Unknown. *

*

* Queries time out after 60 minutes of runtime. To avoid having your queries time out, reduce the time range being * searched or partition your query into a number of queries. *

* * @param status * The status of the most recent running of the query. Possible values are Cancelled, * Complete, Failed, Running, Scheduled, * Timeout, and Unknown.

*

* Queries time out after 60 minutes of runtime. To avoid having your queries time out, reduce the time range * being searched or partition your query into a number of queries. * @see QueryStatus */ public void setStatus(String status) { this.status = status; } /** *

* The status of the most recent running of the query. Possible values are Cancelled, * Complete, Failed, Running, Scheduled, Timeout, * and Unknown. *

*

* Queries time out after 60 minutes of runtime. To avoid having your queries time out, reduce the time range being * searched or partition your query into a number of queries. *

* * @return The status of the most recent running of the query. Possible values are Cancelled, * Complete, Failed, Running, Scheduled, * Timeout, and Unknown.

*

* Queries time out after 60 minutes of runtime. To avoid having your queries time out, reduce the time * range being searched or partition your query into a number of queries. * @see QueryStatus */ public String getStatus() { return this.status; } /** *

* The status of the most recent running of the query. Possible values are Cancelled, * Complete, Failed, Running, Scheduled, Timeout, * and Unknown. *

*

* Queries time out after 60 minutes of runtime. To avoid having your queries time out, reduce the time range being * searched or partition your query into a number of queries. *

* * @param status * The status of the most recent running of the query. Possible values are Cancelled, * Complete, Failed, Running, Scheduled, * Timeout, and Unknown.

*

* Queries time out after 60 minutes of runtime. To avoid having your queries time out, reduce the time range * being searched or partition your query into a number of queries. * @return Returns a reference to this object so that method calls can be chained together. * @see QueryStatus */ public GetQueryResultsResult withStatus(String status) { setStatus(status); return this; } /** *

* The status of the most recent running of the query. Possible values are Cancelled, * Complete, Failed, Running, Scheduled, Timeout, * and Unknown. *

*

* Queries time out after 60 minutes of runtime. To avoid having your queries time out, reduce the time range being * searched or partition your query into a number of queries. *

* * @param status * The status of the most recent running of the query. Possible values are Cancelled, * Complete, Failed, Running, Scheduled, * Timeout, and Unknown.

*

* Queries time out after 60 minutes of runtime. To avoid having your queries time out, reduce the time range * being searched or partition your query into a number of queries. * @return Returns a reference to this object so that method calls can be chained together. * @see QueryStatus */ public GetQueryResultsResult withStatus(QueryStatus status) { this.status = status.toString(); return this; } /** *

* If you associated an KMS key with the CloudWatch Logs Insights query results in this account, this field displays * the ARN of the key that's used to encrypt the query results when StartQuery * stores them. *

* * @param encryptionKey * If you associated an KMS key with the CloudWatch Logs Insights query results in this account, this field * displays the ARN of the key that's used to encrypt the query results when StartQuery stores them. */ public void setEncryptionKey(String encryptionKey) { this.encryptionKey = encryptionKey; } /** *

* If you associated an KMS key with the CloudWatch Logs Insights query results in this account, this field displays * the ARN of the key that's used to encrypt the query results when StartQuery * stores them. *

* * @return If you associated an KMS key with the CloudWatch Logs Insights query results in this account, this field * displays the ARN of the key that's used to encrypt the query results when StartQuery stores them. */ public String getEncryptionKey() { return this.encryptionKey; } /** *

* If you associated an KMS key with the CloudWatch Logs Insights query results in this account, this field displays * the ARN of the key that's used to encrypt the query results when StartQuery * stores them. *

* * @param encryptionKey * If you associated an KMS key with the CloudWatch Logs Insights query results in this account, this field * displays the ARN of the key that's used to encrypt the query results when StartQuery stores them. * @return Returns a reference to this object so that method calls can be chained together. */ public GetQueryResultsResult withEncryptionKey(String encryptionKey) { setEncryptionKey(encryptionKey); 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 (getResults() != null) sb.append("Results: ").append(getResults()).append(","); if (getStatistics() != null) sb.append("Statistics: ").append(getStatistics()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getEncryptionKey() != null) sb.append("EncryptionKey: ").append(getEncryptionKey()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetQueryResultsResult == false) return false; GetQueryResultsResult other = (GetQueryResultsResult) obj; if (other.getResults() == null ^ this.getResults() == null) return false; if (other.getResults() != null && other.getResults().equals(this.getResults()) == false) return false; if (other.getStatistics() == null ^ this.getStatistics() == null) return false; if (other.getStatistics() != null && other.getStatistics().equals(this.getStatistics()) == false) return false; if (other.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; if (other.getEncryptionKey() == null ^ this.getEncryptionKey() == null) return false; if (other.getEncryptionKey() != null && other.getEncryptionKey().equals(this.getEncryptionKey()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getResults() == null) ? 0 : getResults().hashCode()); hashCode = prime * hashCode + ((getStatistics() == null) ? 0 : getStatistics().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getEncryptionKey() == null) ? 0 : getEncryptionKey().hashCode()); return hashCode; } @Override public GetQueryResultsResult clone() { try { return (GetQueryResultsResult) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy