/*
* 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.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
* The log events that matched the query criteria during the most recent time it ran.
*
* The
* 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.
*
* The status of the most recent running of the query. Possible values are
* 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.
*
* 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.
*
* 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.
* Cancelled
,
* Complete
, Failed
, Running
, Scheduled
, Timeout
,
* and Unknown
.
* 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.
*
* The
* 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.Listresults
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.
*
* The
* The log events that matched the query criteria during the most recent time it ran.
*
* The
* 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.
* 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.Collectionresults
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.
*
* The
* 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.Listresults
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.
*
* The
* 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.
*
* 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.
*
* 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.
*
* The status of the most recent running of the query. Possible values are
* 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.
* 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.CollectionCancelled
,
* Complete
, Failed
, Running
, Scheduled
, Timeout
,
* and Unknown
.
* 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 areCancelled
,
* 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 areCancelled
,
* 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 areCancelled
,
* 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); } } }