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

com.amazonaws.services.xray.model.ServiceStatistics Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS X-Ray module holds the client classes that are used for communicating with AWS X-Ray Service

There is a newer version: 1.12.780
Show newest version
/*
 * 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;

/**
 * 

* Response statistics for a service. *

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

* The number of requests that completed with a 2xx Success status code. *

*/ private Long okCount; /** *

* Information about requests that failed with a 4xx Client Error status code. *

*/ private ErrorStatistics errorStatistics; /** *

* Information about requests that failed with a 5xx Server Error status code. *

*/ private FaultStatistics faultStatistics; /** *

* The total number of completed requests. *

*/ private Long totalCount; /** *

* The aggregate response time of completed requests. *

*/ private Double totalResponseTime; /** *

* The number of requests that completed with a 2xx Success status code. *

* * @param okCount * The number of requests that completed with a 2xx Success status code. */ public void setOkCount(Long okCount) { this.okCount = okCount; } /** *

* The number of requests that completed with a 2xx Success status code. *

* * @return The number of requests that completed with a 2xx Success status code. */ public Long getOkCount() { return this.okCount; } /** *

* The number of requests that completed with a 2xx Success status code. *

* * @param okCount * The number of requests that completed with a 2xx Success status code. * @return Returns a reference to this object so that method calls can be chained together. */ public ServiceStatistics withOkCount(Long okCount) { setOkCount(okCount); return this; } /** *

* Information about requests that failed with a 4xx Client Error status code. *

* * @param errorStatistics * Information about requests that failed with a 4xx Client Error status code. */ public void setErrorStatistics(ErrorStatistics errorStatistics) { this.errorStatistics = errorStatistics; } /** *

* Information about requests that failed with a 4xx Client Error status code. *

* * @return Information about requests that failed with a 4xx Client Error status code. */ public ErrorStatistics getErrorStatistics() { return this.errorStatistics; } /** *

* Information about requests that failed with a 4xx Client Error status code. *

* * @param errorStatistics * Information about requests that failed with a 4xx Client Error status code. * @return Returns a reference to this object so that method calls can be chained together. */ public ServiceStatistics withErrorStatistics(ErrorStatistics errorStatistics) { setErrorStatistics(errorStatistics); return this; } /** *

* Information about requests that failed with a 5xx Server Error status code. *

* * @param faultStatistics * Information about requests that failed with a 5xx Server Error status code. */ public void setFaultStatistics(FaultStatistics faultStatistics) { this.faultStatistics = faultStatistics; } /** *

* Information about requests that failed with a 5xx Server Error status code. *

* * @return Information about requests that failed with a 5xx Server Error status code. */ public FaultStatistics getFaultStatistics() { return this.faultStatistics; } /** *

* Information about requests that failed with a 5xx Server Error status code. *

* * @param faultStatistics * Information about requests that failed with a 5xx Server Error status code. * @return Returns a reference to this object so that method calls can be chained together. */ public ServiceStatistics withFaultStatistics(FaultStatistics faultStatistics) { setFaultStatistics(faultStatistics); return this; } /** *

* The total number of completed requests. *

* * @param totalCount * The total number of completed requests. */ public void setTotalCount(Long totalCount) { this.totalCount = totalCount; } /** *

* The total number of completed requests. *

* * @return The total number of completed requests. */ public Long getTotalCount() { return this.totalCount; } /** *

* The total number of completed requests. *

* * @param totalCount * The total number of completed requests. * @return Returns a reference to this object so that method calls can be chained together. */ public ServiceStatistics withTotalCount(Long totalCount) { setTotalCount(totalCount); return this; } /** *

* The aggregate response time of completed requests. *

* * @param totalResponseTime * The aggregate response time of completed requests. */ public void setTotalResponseTime(Double totalResponseTime) { this.totalResponseTime = totalResponseTime; } /** *

* The aggregate response time of completed requests. *

* * @return The aggregate response time of completed requests. */ public Double getTotalResponseTime() { return this.totalResponseTime; } /** *

* The aggregate response time of completed requests. *

* * @param totalResponseTime * The aggregate response time of completed requests. * @return Returns a reference to this object so that method calls can be chained together. */ public ServiceStatistics withTotalResponseTime(Double totalResponseTime) { setTotalResponseTime(totalResponseTime); 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 (getOkCount() != null) sb.append("OkCount: ").append(getOkCount()).append(","); if (getErrorStatistics() != null) sb.append("ErrorStatistics: ").append(getErrorStatistics()).append(","); if (getFaultStatistics() != null) sb.append("FaultStatistics: ").append(getFaultStatistics()).append(","); if (getTotalCount() != null) sb.append("TotalCount: ").append(getTotalCount()).append(","); if (getTotalResponseTime() != null) sb.append("TotalResponseTime: ").append(getTotalResponseTime()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ServiceStatistics == false) return false; ServiceStatistics other = (ServiceStatistics) obj; if (other.getOkCount() == null ^ this.getOkCount() == null) return false; if (other.getOkCount() != null && other.getOkCount().equals(this.getOkCount()) == false) return false; if (other.getErrorStatistics() == null ^ this.getErrorStatistics() == null) return false; if (other.getErrorStatistics() != null && other.getErrorStatistics().equals(this.getErrorStatistics()) == false) return false; if (other.getFaultStatistics() == null ^ this.getFaultStatistics() == null) return false; if (other.getFaultStatistics() != null && other.getFaultStatistics().equals(this.getFaultStatistics()) == false) return false; if (other.getTotalCount() == null ^ this.getTotalCount() == null) return false; if (other.getTotalCount() != null && other.getTotalCount().equals(this.getTotalCount()) == false) return false; if (other.getTotalResponseTime() == null ^ this.getTotalResponseTime() == null) return false; if (other.getTotalResponseTime() != null && other.getTotalResponseTime().equals(this.getTotalResponseTime()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getOkCount() == null) ? 0 : getOkCount().hashCode()); hashCode = prime * hashCode + ((getErrorStatistics() == null) ? 0 : getErrorStatistics().hashCode()); hashCode = prime * hashCode + ((getFaultStatistics() == null) ? 0 : getFaultStatistics().hashCode()); hashCode = prime * hashCode + ((getTotalCount() == null) ? 0 : getTotalCount().hashCode()); hashCode = prime * hashCode + ((getTotalResponseTime() == null) ? 0 : getTotalResponseTime().hashCode()); return hashCode; } @Override public ServiceStatistics clone() { try { return (ServiceStatistics) 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.xray.model.transform.ServiceStatisticsMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy