/* * 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; /** *
* Information about an application that processed requests, users that made requests, or downstream services, * resources, and applications that an application used. *
* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class Service implements Serializable, Cloneable, StructuredPojo { /** ** Identifier for the service. Unique within the service map. *
*/ private Integer referenceId; /** ** The canonical name of the service. *
*/ private String name; /** ** A list of names for the service, including the canonical name. *
*/ private java.util.List* Indicates that the service was the first service to process a request. *
*/ private Boolean root; /** ** Identifier of the Amazon Web Services account in which the service runs. *
*/ private String accountId; /** ** The type of service. *
*
* Amazon Web Services Resource - The type of an Amazon Web Services resource. For example,
* AWS::EC2::Instance
for an application running on Amazon EC2 or AWS::DynamoDB::Table
for
* an Amazon DynamoDB table that the application used.
*
* Amazon Web Services Service - The type of an Amazon Web Services service. For example, AWS::DynamoDB
* for downstream calls to Amazon DynamoDB that didn't target a specific table.
*
* client
- Represents the clients that sent requests to a root service.
*
* remote
- A downstream service of indeterminate type.
*
* The service's state. *
*/ private String state; /** ** The start time of the first segment that the service generated. *
*/ private java.util.Date startTime; /** ** The end time of the last segment that the service generated. *
*/ private java.util.Date endTime; /** ** Connections to downstream services. *
*/ private java.util.List* Aggregated statistics for the service. *
*/ private ServiceStatistics summaryStatistics; /** ** A histogram that maps the spread of service durations. *
*/ private java.util.List* A histogram that maps the spread of service response times. *
*/ private java.util.List* Identifier for the service. Unique within the service map. *
* * @param referenceId * Identifier for the service. Unique within the service map. */ public void setReferenceId(Integer referenceId) { this.referenceId = referenceId; } /** ** Identifier for the service. Unique within the service map. *
* * @return Identifier for the service. Unique within the service map. */ public Integer getReferenceId() { return this.referenceId; } /** ** Identifier for the service. Unique within the service map. *
* * @param referenceId * Identifier for the service. Unique within the service map. * @return Returns a reference to this object so that method calls can be chained together. */ public Service withReferenceId(Integer referenceId) { setReferenceId(referenceId); return this; } /** ** The canonical name of the service. *
* * @param name * The canonical name of the service. */ public void setName(String name) { this.name = name; } /** ** The canonical name of the service. *
* * @return The canonical name of the service. */ public String getName() { return this.name; } /** ** The canonical name of the service. *
* * @param name * The canonical name of the service. * @return Returns a reference to this object so that method calls can be chained together. */ public Service withName(String name) { setName(name); return this; } /** ** A list of names for the service, including the canonical name. *
* * @return A list of names for the service, including the canonical name. */ public java.util.List* A list of names for the service, including the canonical name. *
* * @param names * A list of names for the service, including the canonical name. */ public void setNames(java.util.Collection* A list of names for the service, including the canonical name. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setNames(java.util.Collection)} or {@link #withNames(java.util.Collection)} if you want to override the * existing values. *
* * @param names * A list of names for the service, including the canonical name. * @return Returns a reference to this object so that method calls can be chained together. */ public Service withNames(String... names) { if (this.names == null) { setNames(new java.util.ArrayList* A list of names for the service, including the canonical name. *
* * @param names * A list of names for the service, including the canonical name. * @return Returns a reference to this object so that method calls can be chained together. */ public Service withNames(java.util.Collection* Indicates that the service was the first service to process a request. *
* * @param root * Indicates that the service was the first service to process a request. */ public void setRoot(Boolean root) { this.root = root; } /** ** Indicates that the service was the first service to process a request. *
* * @return Indicates that the service was the first service to process a request. */ public Boolean getRoot() { return this.root; } /** ** Indicates that the service was the first service to process a request. *
* * @param root * Indicates that the service was the first service to process a request. * @return Returns a reference to this object so that method calls can be chained together. */ public Service withRoot(Boolean root) { setRoot(root); return this; } /** ** Indicates that the service was the first service to process a request. *
* * @return Indicates that the service was the first service to process a request. */ public Boolean isRoot() { return this.root; } /** ** Identifier of the Amazon Web Services account in which the service runs. *
* * @param accountId * Identifier of the Amazon Web Services account in which the service runs. */ public void setAccountId(String accountId) { this.accountId = accountId; } /** ** Identifier of the Amazon Web Services account in which the service runs. *
* * @return Identifier of the Amazon Web Services account in which the service runs. */ public String getAccountId() { return this.accountId; } /** ** Identifier of the Amazon Web Services account in which the service runs. *
* * @param accountId * Identifier of the Amazon Web Services account in which the service runs. * @return Returns a reference to this object so that method calls can be chained together. */ public Service withAccountId(String accountId) { setAccountId(accountId); return this; } /** ** The type of service. *
*
* Amazon Web Services Resource - The type of an Amazon Web Services resource. For example,
* AWS::EC2::Instance
for an application running on Amazon EC2 or AWS::DynamoDB::Table
for
* an Amazon DynamoDB table that the application used.
*
* Amazon Web Services Service - The type of an Amazon Web Services service. For example, AWS::DynamoDB
* for downstream calls to Amazon DynamoDB that didn't target a specific table.
*
* client
- Represents the clients that sent requests to a root service.
*
* remote
- A downstream service of indeterminate type.
*
* Amazon Web Services Resource - The type of an Amazon Web Services resource. For example,
* AWS::EC2::Instance
for an application running on Amazon EC2 or
* AWS::DynamoDB::Table
for an Amazon DynamoDB table that the application used.
*
* Amazon Web Services Service - The type of an Amazon Web Services service. For example,
* AWS::DynamoDB
for downstream calls to Amazon DynamoDB that didn't target a specific table.
*
* client
- Represents the clients that sent requests to a root service.
*
* remote
- A downstream service of indeterminate type.
*
* The type of service. *
*
* Amazon Web Services Resource - The type of an Amazon Web Services resource. For example,
* AWS::EC2::Instance
for an application running on Amazon EC2 or AWS::DynamoDB::Table
for
* an Amazon DynamoDB table that the application used.
*
* Amazon Web Services Service - The type of an Amazon Web Services service. For example, AWS::DynamoDB
* for downstream calls to Amazon DynamoDB that didn't target a specific table.
*
* client
- Represents the clients that sent requests to a root service.
*
* remote
- A downstream service of indeterminate type.
*
* Amazon Web Services Resource - The type of an Amazon Web Services resource. For example,
* AWS::EC2::Instance
for an application running on Amazon EC2 or
* AWS::DynamoDB::Table
for an Amazon DynamoDB table that the application used.
*
* Amazon Web Services Service - The type of an Amazon Web Services service. For example,
* AWS::DynamoDB
for downstream calls to Amazon DynamoDB that didn't target a specific table.
*
* client
- Represents the clients that sent requests to a root service.
*
* remote
- A downstream service of indeterminate type.
*
* The type of service. *
*
* Amazon Web Services Resource - The type of an Amazon Web Services resource. For example,
* AWS::EC2::Instance
for an application running on Amazon EC2 or AWS::DynamoDB::Table
for
* an Amazon DynamoDB table that the application used.
*
* Amazon Web Services Service - The type of an Amazon Web Services service. For example, AWS::DynamoDB
* for downstream calls to Amazon DynamoDB that didn't target a specific table.
*
* client
- Represents the clients that sent requests to a root service.
*
* remote
- A downstream service of indeterminate type.
*
* Amazon Web Services Resource - The type of an Amazon Web Services resource. For example,
* AWS::EC2::Instance
for an application running on Amazon EC2 or
* AWS::DynamoDB::Table
for an Amazon DynamoDB table that the application used.
*
* Amazon Web Services Service - The type of an Amazon Web Services service. For example,
* AWS::DynamoDB
for downstream calls to Amazon DynamoDB that didn't target a specific table.
*
* client
- Represents the clients that sent requests to a root service.
*
* remote
- A downstream service of indeterminate type.
*
* The service's state. *
* * @param state * The service's state. */ public void setState(String state) { this.state = state; } /** ** The service's state. *
* * @return The service's state. */ public String getState() { return this.state; } /** ** The service's state. *
* * @param state * The service's state. * @return Returns a reference to this object so that method calls can be chained together. */ public Service withState(String state) { setState(state); return this; } /** ** The start time of the first segment that the service generated. *
* * @param startTime * The start time of the first segment that the service generated. */ public void setStartTime(java.util.Date startTime) { this.startTime = startTime; } /** ** The start time of the first segment that the service generated. *
* * @return The start time of the first segment that the service generated. */ public java.util.Date getStartTime() { return this.startTime; } /** ** The start time of the first segment that the service generated. *
* * @param startTime * The start time of the first segment that the service generated. * @return Returns a reference to this object so that method calls can be chained together. */ public Service withStartTime(java.util.Date startTime) { setStartTime(startTime); return this; } /** ** The end time of the last segment that the service generated. *
* * @param endTime * The end time of the last segment that the service generated. */ public void setEndTime(java.util.Date endTime) { this.endTime = endTime; } /** ** The end time of the last segment that the service generated. *
* * @return The end time of the last segment that the service generated. */ public java.util.Date getEndTime() { return this.endTime; } /** ** The end time of the last segment that the service generated. *
* * @param endTime * The end time of the last segment that the service generated. * @return Returns a reference to this object so that method calls can be chained together. */ public Service withEndTime(java.util.Date endTime) { setEndTime(endTime); return this; } /** ** Connections to downstream services. *
* * @return Connections to downstream services. */ public java.util.List* Connections to downstream services. *
* * @param edges * Connections to downstream services. */ public void setEdges(java.util.Collection* Connections to downstream services. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setEdges(java.util.Collection)} or {@link #withEdges(java.util.Collection)} if you want to override the * existing values. *
* * @param edges * Connections to downstream services. * @return Returns a reference to this object so that method calls can be chained together. */ public Service withEdges(Edge... edges) { if (this.edges == null) { setEdges(new java.util.ArrayList* Connections to downstream services. *
* * @param edges * Connections to downstream services. * @return Returns a reference to this object so that method calls can be chained together. */ public Service withEdges(java.util.Collection* Aggregated statistics for the service. *
* * @param summaryStatistics * Aggregated statistics for the service. */ public void setSummaryStatistics(ServiceStatistics summaryStatistics) { this.summaryStatistics = summaryStatistics; } /** ** Aggregated statistics for the service. *
* * @return Aggregated statistics for the service. */ public ServiceStatistics getSummaryStatistics() { return this.summaryStatistics; } /** ** Aggregated statistics for the service. *
* * @param summaryStatistics * Aggregated statistics for the service. * @return Returns a reference to this object so that method calls can be chained together. */ public Service withSummaryStatistics(ServiceStatistics summaryStatistics) { setSummaryStatistics(summaryStatistics); return this; } /** ** A histogram that maps the spread of service durations. *
* * @return A histogram that maps the spread of service durations. */ public java.util.List* A histogram that maps the spread of service durations. *
* * @param durationHistogram * A histogram that maps the spread of service durations. */ public void setDurationHistogram(java.util.Collection* A histogram that maps the spread of service durations. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setDurationHistogram(java.util.Collection)} or {@link #withDurationHistogram(java.util.Collection)} if * you want to override the existing values. *
* * @param durationHistogram * A histogram that maps the spread of service durations. * @return Returns a reference to this object so that method calls can be chained together. */ public Service withDurationHistogram(HistogramEntry... durationHistogram) { if (this.durationHistogram == null) { setDurationHistogram(new java.util.ArrayList* A histogram that maps the spread of service durations. *
* * @param durationHistogram * A histogram that maps the spread of service durations. * @return Returns a reference to this object so that method calls can be chained together. */ public Service withDurationHistogram(java.util.Collection* A histogram that maps the spread of service response times. *
* * @return A histogram that maps the spread of service response times. */ public java.util.List* A histogram that maps the spread of service response times. *
* * @param responseTimeHistogram * A histogram that maps the spread of service response times. */ public void setResponseTimeHistogram(java.util.Collection* A histogram that maps the spread of service response times. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setResponseTimeHistogram(java.util.Collection)} or * {@link #withResponseTimeHistogram(java.util.Collection)} if you want to override the existing values. *
* * @param responseTimeHistogram * A histogram that maps the spread of service response times. * @return Returns a reference to this object so that method calls can be chained together. */ public Service withResponseTimeHistogram(HistogramEntry... responseTimeHistogram) { if (this.responseTimeHistogram == null) { setResponseTimeHistogram(new java.util.ArrayList* A histogram that maps the spread of service response times. *
* * @param responseTimeHistogram * A histogram that maps the spread of service response times. * @return Returns a reference to this object so that method calls can be chained together. */ public Service withResponseTimeHistogram(java.util.Collection