
software.amazon.awssdk.services.inspector.model.TelemetryMetadata Maven / Gradle / Ivy
/*
* Copyright 2012-2017 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 software.amazon.awssdk.services.inspector.model;
import javax.annotation.Generated;
import software.amazon.awssdk.annotation.SdkInternalApi;
import software.amazon.awssdk.protocol.ProtocolMarshaller;
import software.amazon.awssdk.protocol.StructuredPojo;
import software.amazon.awssdk.services.inspector.transform.TelemetryMetadataMarshaller;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;
/**
*
* The metadata about the Amazon Inspector application data metrics collected by the agent. This data type is used as
* the response element in the GetTelemetryMetadata action.
*
*/
@Generated("software.amazon.awssdk:codegen")
public class TelemetryMetadata implements StructuredPojo, ToCopyableBuilder {
private final String messageType;
private final Long count;
private final Long dataSize;
private TelemetryMetadata(BuilderImpl builder) {
this.messageType = builder.messageType;
this.count = builder.count;
this.dataSize = builder.dataSize;
}
/**
*
* A specific type of behavioral data that is collected by the agent.
*
*
* @return A specific type of behavioral data that is collected by the agent.
*/
public String messageType() {
return messageType;
}
/**
*
* The count of messages that the agent sends to the Amazon Inspector service.
*
*
* @return The count of messages that the agent sends to the Amazon Inspector service.
*/
public Long count() {
return count;
}
/**
*
* The data size of messages that the agent sends to the Amazon Inspector service.
*
*
* @return The data size of messages that the agent sends to the Amazon Inspector service.
*/
public Long dataSize() {
return dataSize;
}
@Override
public Builder toBuilder() {
return new BuilderImpl(this);
}
public static Builder builder() {
return new BuilderImpl();
}
public static Class extends Builder> serializableBuilderClass() {
return BuilderImpl.class;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = 31 * hashCode + ((messageType() == null) ? 0 : messageType().hashCode());
hashCode = 31 * hashCode + ((count() == null) ? 0 : count().hashCode());
hashCode = 31 * hashCode + ((dataSize() == null) ? 0 : dataSize().hashCode());
return hashCode;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (!(obj instanceof TelemetryMetadata)) {
return false;
}
TelemetryMetadata other = (TelemetryMetadata) obj;
if (other.messageType() == null ^ this.messageType() == null) {
return false;
}
if (other.messageType() != null && !other.messageType().equals(this.messageType())) {
return false;
}
if (other.count() == null ^ this.count() == null) {
return false;
}
if (other.count() != null && !other.count().equals(this.count())) {
return false;
}
if (other.dataSize() == null ^ this.dataSize() == null) {
return false;
}
if (other.dataSize() != null && !other.dataSize().equals(this.dataSize())) {
return false;
}
return true;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (messageType() != null) {
sb.append("MessageType: ").append(messageType()).append(",");
}
if (count() != null) {
sb.append("Count: ").append(count()).append(",");
}
if (dataSize() != null) {
sb.append("DataSize: ").append(dataSize()).append(",");
}
sb.append("}");
return sb.toString();
}
@SdkInternalApi
@Override
public void marshall(ProtocolMarshaller protocolMarshaller) {
TelemetryMetadataMarshaller.getInstance().marshall(this, protocolMarshaller);
}
public interface Builder extends CopyableBuilder {
/**
*
* A specific type of behavioral data that is collected by the agent.
*
*
* @param messageType
* A specific type of behavioral data that is collected by the agent.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder messageType(String messageType);
/**
*
* The count of messages that the agent sends to the Amazon Inspector service.
*
*
* @param count
* The count of messages that the agent sends to the Amazon Inspector service.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder count(Long count);
/**
*
* The data size of messages that the agent sends to the Amazon Inspector service.
*
*
* @param dataSize
* The data size of messages that the agent sends to the Amazon Inspector service.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder dataSize(Long dataSize);
}
private static final class BuilderImpl implements Builder {
private String messageType;
private Long count;
private Long dataSize;
private BuilderImpl() {
}
private BuilderImpl(TelemetryMetadata model) {
setMessageType(model.messageType);
setCount(model.count);
setDataSize(model.dataSize);
}
public final String getMessageType() {
return messageType;
}
@Override
public final Builder messageType(String messageType) {
this.messageType = messageType;
return this;
}
public final void setMessageType(String messageType) {
this.messageType = messageType;
}
public final Long getCount() {
return count;
}
@Override
public final Builder count(Long count) {
this.count = count;
return this;
}
public final void setCount(Long count) {
this.count = count;
}
public final Long getDataSize() {
return dataSize;
}
@Override
public final Builder dataSize(Long dataSize) {
this.dataSize = dataSize;
return this;
}
public final void setDataSize(Long dataSize) {
this.dataSize = dataSize;
}
@Override
public TelemetryMetadata build() {
return new TelemetryMetadata(this);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy