/* * 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.xray.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* When fault rates go outside of the expected range, X-Ray creates an insight. Insights tracks emergent issues within * your applications. *
* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class Insight implements Serializable, Cloneable, StructuredPojo { /** ** The insights unique identifier. *
*/ private String insightId; /** ** The Amazon Resource Name (ARN) of the group that the insight belongs to. *
*/ private String groupARN; /** ** The name of the group that the insight belongs to. *
*/ private String groupName; private ServiceId rootCauseServiceId; /** ** The categories that label and describe the type of insight. *
*/ private java.util.List* The current state of the insight. *
*/ private String state; /** ** The time, in Unix seconds, at which the insight began. *
*/ private java.util.Date startTime; /** ** The time, in Unix seconds, at which the insight ended. *
*/ private java.util.Date endTime; /** ** A brief description of the insight. *
*/ private String summary; /** ** The impact statistics of the client side service. This includes the number of requests to the client service and * whether the requests were faults or okay. *
*/ private RequestImpactStatistics clientRequestImpactStatistics; /** ** The impact statistics of the root cause service. This includes the number of requests to the client service and * whether the requests were faults or okay. *
*/ private RequestImpactStatistics rootCauseServiceRequestImpactStatistics; /** ** The service within the insight that is most impacted by the incident. *
*/ private java.util.List* The insights unique identifier. *
* * @param insightId * The insights unique identifier. */ public void setInsightId(String insightId) { this.insightId = insightId; } /** ** The insights unique identifier. *
* * @return The insights unique identifier. */ public String getInsightId() { return this.insightId; } /** ** The insights unique identifier. *
* * @param insightId * The insights unique identifier. * @return Returns a reference to this object so that method calls can be chained together. */ public Insight withInsightId(String insightId) { setInsightId(insightId); return this; } /** ** The Amazon Resource Name (ARN) of the group that the insight belongs to. *
* * @param groupARN * The Amazon Resource Name (ARN) of the group that the insight belongs to. */ public void setGroupARN(String groupARN) { this.groupARN = groupARN; } /** ** The Amazon Resource Name (ARN) of the group that the insight belongs to. *
* * @return The Amazon Resource Name (ARN) of the group that the insight belongs to. */ public String getGroupARN() { return this.groupARN; } /** ** The Amazon Resource Name (ARN) of the group that the insight belongs to. *
* * @param groupARN * The Amazon Resource Name (ARN) of the group that the insight belongs to. * @return Returns a reference to this object so that method calls can be chained together. */ public Insight withGroupARN(String groupARN) { setGroupARN(groupARN); return this; } /** ** The name of the group that the insight belongs to. *
* * @param groupName * The name of the group that the insight belongs to. */ public void setGroupName(String groupName) { this.groupName = groupName; } /** ** The name of the group that the insight belongs to. *
* * @return The name of the group that the insight belongs to. */ public String getGroupName() { return this.groupName; } /** ** The name of the group that the insight belongs to. *
* * @param groupName * The name of the group that the insight belongs to. * @return Returns a reference to this object so that method calls can be chained together. */ public Insight withGroupName(String groupName) { setGroupName(groupName); return this; } /** * @param rootCauseServiceId */ public void setRootCauseServiceId(ServiceId rootCauseServiceId) { this.rootCauseServiceId = rootCauseServiceId; } /** * @return */ public ServiceId getRootCauseServiceId() { return this.rootCauseServiceId; } /** * @param rootCauseServiceId * @return Returns a reference to this object so that method calls can be chained together. */ public Insight withRootCauseServiceId(ServiceId rootCauseServiceId) { setRootCauseServiceId(rootCauseServiceId); return this; } /** ** The categories that label and describe the type of insight. *
* * @return The categories that label and describe the type of insight. * @see InsightCategory */ public java.util.List* The categories that label and describe the type of insight. *
* * @param categories * The categories that label and describe the type of insight. * @see InsightCategory */ public void setCategories(java.util.Collection* The categories that label and describe the type of insight. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setCategories(java.util.Collection)} or {@link #withCategories(java.util.Collection)} if you want to * override the existing values. *
* * @param categories * The categories that label and describe the type of insight. * @return Returns a reference to this object so that method calls can be chained together. * @see InsightCategory */ public Insight withCategories(String... categories) { if (this.categories == null) { setCategories(new java.util.ArrayList* The categories that label and describe the type of insight. *
* * @param categories * The categories that label and describe the type of insight. * @return Returns a reference to this object so that method calls can be chained together. * @see InsightCategory */ public Insight withCategories(java.util.Collection* The categories that label and describe the type of insight. *
* * @param categories * The categories that label and describe the type of insight. * @return Returns a reference to this object so that method calls can be chained together. * @see InsightCategory */ public Insight withCategories(InsightCategory... categories) { java.util.ArrayList* The current state of the insight. *
* * @param state * The current state of the insight. * @see InsightState */ public void setState(String state) { this.state = state; } /** ** The current state of the insight. *
* * @return The current state of the insight. * @see InsightState */ public String getState() { return this.state; } /** ** The current state of the insight. *
* * @param state * The current state of the insight. * @return Returns a reference to this object so that method calls can be chained together. * @see InsightState */ public Insight withState(String state) { setState(state); return this; } /** ** The current state of the insight. *
* * @param state * The current state of the insight. * @return Returns a reference to this object so that method calls can be chained together. * @see InsightState */ public Insight withState(InsightState state) { this.state = state.toString(); return this; } /** ** The time, in Unix seconds, at which the insight began. *
* * @param startTime * The time, in Unix seconds, at which the insight began. */ public void setStartTime(java.util.Date startTime) { this.startTime = startTime; } /** ** The time, in Unix seconds, at which the insight began. *
* * @return The time, in Unix seconds, at which the insight began. */ public java.util.Date getStartTime() { return this.startTime; } /** ** The time, in Unix seconds, at which the insight began. *
* * @param startTime * The time, in Unix seconds, at which the insight began. * @return Returns a reference to this object so that method calls can be chained together. */ public Insight withStartTime(java.util.Date startTime) { setStartTime(startTime); return this; } /** ** The time, in Unix seconds, at which the insight ended. *
* * @param endTime * The time, in Unix seconds, at which the insight ended. */ public void setEndTime(java.util.Date endTime) { this.endTime = endTime; } /** ** The time, in Unix seconds, at which the insight ended. *
* * @return The time, in Unix seconds, at which the insight ended. */ public java.util.Date getEndTime() { return this.endTime; } /** ** The time, in Unix seconds, at which the insight ended. *
* * @param endTime * The time, in Unix seconds, at which the insight ended. * @return Returns a reference to this object so that method calls can be chained together. */ public Insight withEndTime(java.util.Date endTime) { setEndTime(endTime); return this; } /** ** A brief description of the insight. *
* * @param summary * A brief description of the insight. */ public void setSummary(String summary) { this.summary = summary; } /** ** A brief description of the insight. *
* * @return A brief description of the insight. */ public String getSummary() { return this.summary; } /** ** A brief description of the insight. *
* * @param summary * A brief description of the insight. * @return Returns a reference to this object so that method calls can be chained together. */ public Insight withSummary(String summary) { setSummary(summary); return this; } /** ** The impact statistics of the client side service. This includes the number of requests to the client service and * whether the requests were faults or okay. *
* * @param clientRequestImpactStatistics * The impact statistics of the client side service. This includes the number of requests to the client * service and whether the requests were faults or okay. */ public void setClientRequestImpactStatistics(RequestImpactStatistics clientRequestImpactStatistics) { this.clientRequestImpactStatistics = clientRequestImpactStatistics; } /** ** The impact statistics of the client side service. This includes the number of requests to the client service and * whether the requests were faults or okay. *
* * @return The impact statistics of the client side service. This includes the number of requests to the client * service and whether the requests were faults or okay. */ public RequestImpactStatistics getClientRequestImpactStatistics() { return this.clientRequestImpactStatistics; } /** ** The impact statistics of the client side service. This includes the number of requests to the client service and * whether the requests were faults or okay. *
* * @param clientRequestImpactStatistics * The impact statistics of the client side service. This includes the number of requests to the client * service and whether the requests were faults or okay. * @return Returns a reference to this object so that method calls can be chained together. */ public Insight withClientRequestImpactStatistics(RequestImpactStatistics clientRequestImpactStatistics) { setClientRequestImpactStatistics(clientRequestImpactStatistics); return this; } /** ** The impact statistics of the root cause service. This includes the number of requests to the client service and * whether the requests were faults or okay. *
* * @param rootCauseServiceRequestImpactStatistics * The impact statistics of the root cause service. This includes the number of requests to the client * service and whether the requests were faults or okay. */ public void setRootCauseServiceRequestImpactStatistics(RequestImpactStatistics rootCauseServiceRequestImpactStatistics) { this.rootCauseServiceRequestImpactStatistics = rootCauseServiceRequestImpactStatistics; } /** ** The impact statistics of the root cause service. This includes the number of requests to the client service and * whether the requests were faults or okay. *
* * @return The impact statistics of the root cause service. This includes the number of requests to the client * service and whether the requests were faults or okay. */ public RequestImpactStatistics getRootCauseServiceRequestImpactStatistics() { return this.rootCauseServiceRequestImpactStatistics; } /** ** The impact statistics of the root cause service. This includes the number of requests to the client service and * whether the requests were faults or okay. *
* * @param rootCauseServiceRequestImpactStatistics * The impact statistics of the root cause service. This includes the number of requests to the client * service and whether the requests were faults or okay. * @return Returns a reference to this object so that method calls can be chained together. */ public Insight withRootCauseServiceRequestImpactStatistics(RequestImpactStatistics rootCauseServiceRequestImpactStatistics) { setRootCauseServiceRequestImpactStatistics(rootCauseServiceRequestImpactStatistics); return this; } /** ** The service within the insight that is most impacted by the incident. *
* * @return The service within the insight that is most impacted by the incident. */ public java.util.List* The service within the insight that is most impacted by the incident. *
* * @param topAnomalousServices * The service within the insight that is most impacted by the incident. */ public void setTopAnomalousServices(java.util.Collection* The service within the insight that is most impacted by the incident. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setTopAnomalousServices(java.util.Collection)} or {@link #withTopAnomalousServices(java.util.Collection)} * if you want to override the existing values. *
* * @param topAnomalousServices * The service within the insight that is most impacted by the incident. * @return Returns a reference to this object so that method calls can be chained together. */ public Insight withTopAnomalousServices(AnomalousService... topAnomalousServices) { if (this.topAnomalousServices == null) { setTopAnomalousServices(new java.util.ArrayList* The service within the insight that is most impacted by the incident. *
* * @param topAnomalousServices * The service within the insight that is most impacted by the incident. * @return Returns a reference to this object so that method calls can be chained together. */ public Insight withTopAnomalousServices(java.util.Collection