/* * 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.pinpoint.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *

* Provides the results of a query that retrieved the data for a standard metric that applies to an application, and * provides information about that query. *

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

* The unique identifier for the application that the metric applies to. *

*/ private String applicationId; /** *

* The last date and time of the date range that was used to filter the query results, in extended ISO 8601 format. * The date range is inclusive. *

*/ private java.util.Date endTime; /** *

* The name of the metric, also referred to as a key performance indicator (KPI), that the data was retrieved * for. This value describes the associated metric and consists of two or more terms, which are comprised of * lowercase alphanumeric characters, separated by a hyphen. For a list of possible values, see the Amazon Pinpoint * Developer Guide. *

*/ private String kpiName; /** *

* An array of objects that contains the results of the query. Each object contains the value for the metric and * metadata about that value. *

*/ private BaseKpiResult kpiResult; /** *

* The string to use in a subsequent request to get the next page of results in a paginated response. This value is * null for the Application Metrics resource because the resource returns all results in a single page. *

*/ private String nextToken; /** *

* The first date and time of the date range that was used to filter the query results, in extended ISO 8601 format. * The date range is inclusive. *

*/ private java.util.Date startTime; /** *

* The unique identifier for the application that the metric applies to. *

* * @param applicationId * The unique identifier for the application that the metric applies to. */ public void setApplicationId(String applicationId) { this.applicationId = applicationId; } /** *

* The unique identifier for the application that the metric applies to. *

* * @return The unique identifier for the application that the metric applies to. */ public String getApplicationId() { return this.applicationId; } /** *

* The unique identifier for the application that the metric applies to. *

* * @param applicationId * The unique identifier for the application that the metric applies to. * @return Returns a reference to this object so that method calls can be chained together. */ public ApplicationDateRangeKpiResponse withApplicationId(String applicationId) { setApplicationId(applicationId); return this; } /** *

* The last date and time of the date range that was used to filter the query results, in extended ISO 8601 format. * The date range is inclusive. *

* * @param endTime * The last date and time of the date range that was used to filter the query results, in extended ISO 8601 * format. The date range is inclusive. */ public void setEndTime(java.util.Date endTime) { this.endTime = endTime; } /** *

* The last date and time of the date range that was used to filter the query results, in extended ISO 8601 format. * The date range is inclusive. *

* * @return The last date and time of the date range that was used to filter the query results, in extended ISO 8601 * format. The date range is inclusive. */ public java.util.Date getEndTime() { return this.endTime; } /** *

* The last date and time of the date range that was used to filter the query results, in extended ISO 8601 format. * The date range is inclusive. *

* * @param endTime * The last date and time of the date range that was used to filter the query results, in extended ISO 8601 * format. The date range is inclusive. * @return Returns a reference to this object so that method calls can be chained together. */ public ApplicationDateRangeKpiResponse withEndTime(java.util.Date endTime) { setEndTime(endTime); return this; } /** *

* The name of the metric, also referred to as a key performance indicator (KPI), that the data was retrieved * for. This value describes the associated metric and consists of two or more terms, which are comprised of * lowercase alphanumeric characters, separated by a hyphen. For a list of possible values, see the Amazon Pinpoint * Developer Guide. *

* * @param kpiName * The name of the metric, also referred to as a key performance indicator (KPI), that the data was * retrieved for. This value describes the associated metric and consists of two or more terms, which are * comprised of lowercase alphanumeric characters, separated by a hyphen. For a list of possible values, see * the Amazon * Pinpoint Developer Guide. */ public void setKpiName(String kpiName) { this.kpiName = kpiName; } /** *

* The name of the metric, also referred to as a key performance indicator (KPI), that the data was retrieved * for. This value describes the associated metric and consists of two or more terms, which are comprised of * lowercase alphanumeric characters, separated by a hyphen. For a list of possible values, see the Amazon Pinpoint * Developer Guide. *

* * @return The name of the metric, also referred to as a key performance indicator (KPI), that the data was * retrieved for. This value describes the associated metric and consists of two or more terms, which are * comprised of lowercase alphanumeric characters, separated by a hyphen. For a list of possible values, see * the * Amazon Pinpoint Developer Guide. */ public String getKpiName() { return this.kpiName; } /** *

* The name of the metric, also referred to as a key performance indicator (KPI), that the data was retrieved * for. This value describes the associated metric and consists of two or more terms, which are comprised of * lowercase alphanumeric characters, separated by a hyphen. For a list of possible values, see the Amazon Pinpoint * Developer Guide. *

* * @param kpiName * The name of the metric, also referred to as a key performance indicator (KPI), that the data was * retrieved for. This value describes the associated metric and consists of two or more terms, which are * comprised of lowercase alphanumeric characters, separated by a hyphen. For a list of possible values, see * the Amazon * Pinpoint Developer Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public ApplicationDateRangeKpiResponse withKpiName(String kpiName) { setKpiName(kpiName); return this; } /** *

* An array of objects that contains the results of the query. Each object contains the value for the metric and * metadata about that value. *

* * @param kpiResult * An array of objects that contains the results of the query. Each object contains the value for the metric * and metadata about that value. */ public void setKpiResult(BaseKpiResult kpiResult) { this.kpiResult = kpiResult; } /** *

* An array of objects that contains the results of the query. Each object contains the value for the metric and * metadata about that value. *

* * @return An array of objects that contains the results of the query. Each object contains the value for the metric * and metadata about that value. */ public BaseKpiResult getKpiResult() { return this.kpiResult; } /** *

* An array of objects that contains the results of the query. Each object contains the value for the metric and * metadata about that value. *

* * @param kpiResult * An array of objects that contains the results of the query. Each object contains the value for the metric * and metadata about that value. * @return Returns a reference to this object so that method calls can be chained together. */ public ApplicationDateRangeKpiResponse withKpiResult(BaseKpiResult kpiResult) { setKpiResult(kpiResult); return this; } /** *

* The string to use in a subsequent request to get the next page of results in a paginated response. This value is * null for the Application Metrics resource because the resource returns all results in a single page. *

* * @param nextToken * The string to use in a subsequent request to get the next page of results in a paginated response. This * value is null for the Application Metrics resource because the resource returns all results in a single * page. */ public void setNextToken(String nextToken) { this.nextToken = nextToken; } /** *

* The string to use in a subsequent request to get the next page of results in a paginated response. This value is * null for the Application Metrics resource because the resource returns all results in a single page. *

* * @return The string to use in a subsequent request to get the next page of results in a paginated response. This * value is null for the Application Metrics resource because the resource returns all results in a single * page. */ public String getNextToken() { return this.nextToken; } /** *

* The string to use in a subsequent request to get the next page of results in a paginated response. This value is * null for the Application Metrics resource because the resource returns all results in a single page. *

* * @param nextToken * The string to use in a subsequent request to get the next page of results in a paginated response. This * value is null for the Application Metrics resource because the resource returns all results in a single * page. * @return Returns a reference to this object so that method calls can be chained together. */ public ApplicationDateRangeKpiResponse withNextToken(String nextToken) { setNextToken(nextToken); return this; } /** *

* The first date and time of the date range that was used to filter the query results, in extended ISO 8601 format. * The date range is inclusive. *

* * @param startTime * The first date and time of the date range that was used to filter the query results, in extended ISO 8601 * format. The date range is inclusive. */ public void setStartTime(java.util.Date startTime) { this.startTime = startTime; } /** *

* The first date and time of the date range that was used to filter the query results, in extended ISO 8601 format. * The date range is inclusive. *

* * @return The first date and time of the date range that was used to filter the query results, in extended ISO 8601 * format. The date range is inclusive. */ public java.util.Date getStartTime() { return this.startTime; } /** *

* The first date and time of the date range that was used to filter the query results, in extended ISO 8601 format. * The date range is inclusive. *

* * @param startTime * The first date and time of the date range that was used to filter the query results, in extended ISO 8601 * format. The date range is inclusive. * @return Returns a reference to this object so that method calls can be chained together. */ public ApplicationDateRangeKpiResponse withStartTime(java.util.Date startTime) { setStartTime(startTime); 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 (getApplicationId() != null) sb.append("ApplicationId: ").append(getApplicationId()).append(","); if (getEndTime() != null) sb.append("EndTime: ").append(getEndTime()).append(","); if (getKpiName() != null) sb.append("KpiName: ").append(getKpiName()).append(","); if (getKpiResult() != null) sb.append("KpiResult: ").append(getKpiResult()).append(","); if (getNextToken() != null) sb.append("NextToken: ").append(getNextToken()).append(","); if (getStartTime() != null) sb.append("StartTime: ").append(getStartTime()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ApplicationDateRangeKpiResponse == false) return false; ApplicationDateRangeKpiResponse other = (ApplicationDateRangeKpiResponse) obj; if (other.getApplicationId() == null ^ this.getApplicationId() == null) return false; if (other.getApplicationId() != null && other.getApplicationId().equals(this.getApplicationId()) == false) return false; if (other.getEndTime() == null ^ this.getEndTime() == null) return false; if (other.getEndTime() != null && other.getEndTime().equals(this.getEndTime()) == false) return false; if (other.getKpiName() == null ^ this.getKpiName() == null) return false; if (other.getKpiName() != null && other.getKpiName().equals(this.getKpiName()) == false) return false; if (other.getKpiResult() == null ^ this.getKpiResult() == null) return false; if (other.getKpiResult() != null && other.getKpiResult().equals(this.getKpiResult()) == false) return false; if (other.getNextToken() == null ^ this.getNextToken() == null) return false; if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == false) return false; if (other.getStartTime() == null ^ this.getStartTime() == null) return false; if (other.getStartTime() != null && other.getStartTime().equals(this.getStartTime()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getApplicationId() == null) ? 0 : getApplicationId().hashCode()); hashCode = prime * hashCode + ((getEndTime() == null) ? 0 : getEndTime().hashCode()); hashCode = prime * hashCode + ((getKpiName() == null) ? 0 : getKpiName().hashCode()); hashCode = prime * hashCode + ((getKpiResult() == null) ? 0 : getKpiResult().hashCode()); hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode()); hashCode = prime * hashCode + ((getStartTime() == null) ? 0 : getStartTime().hashCode()); return hashCode; } @Override public ApplicationDateRangeKpiResponse clone() { try { return (ApplicationDateRangeKpiResponse) 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.pinpoint.model.transform.ApplicationDateRangeKpiResponseMarshaller.getInstance().marshall(this, protocolMarshaller); } }