com.amazonaws.services.cloudtrail.model.ImportStatistics Maven / Gradle / Ivy
Show all versions of aws-java-sdk-cloudtrail Show documentation
/*
* Copyright 2019-2024 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.cloudtrail.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Provides statistics for the specified ImportID
. CloudTrail does not update import statistics in
* real-time. Returned values for parameters such as EventsCompleted
may be lower than the actual value,
* because CloudTrail updates statistics incrementally over the course of the import.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ImportStatistics implements Serializable, Cloneable, StructuredPojo {
/**
*
* The number of S3 prefixes found for the import.
*
*/
private Long prefixesFound;
/**
*
* The number of S3 prefixes that completed import.
*
*/
private Long prefixesCompleted;
/**
*
* The number of log files that completed import.
*
*/
private Long filesCompleted;
/**
*
* The number of trail events imported into the event data store.
*
*/
private Long eventsCompleted;
/**
*
* The number of failed entries.
*
*/
private Long failedEntries;
/**
*
* The number of S3 prefixes found for the import.
*
*
* @param prefixesFound
* The number of S3 prefixes found for the import.
*/
public void setPrefixesFound(Long prefixesFound) {
this.prefixesFound = prefixesFound;
}
/**
*
* The number of S3 prefixes found for the import.
*
*
* @return The number of S3 prefixes found for the import.
*/
public Long getPrefixesFound() {
return this.prefixesFound;
}
/**
*
* The number of S3 prefixes found for the import.
*
*
* @param prefixesFound
* The number of S3 prefixes found for the import.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ImportStatistics withPrefixesFound(Long prefixesFound) {
setPrefixesFound(prefixesFound);
return this;
}
/**
*
* The number of S3 prefixes that completed import.
*
*
* @param prefixesCompleted
* The number of S3 prefixes that completed import.
*/
public void setPrefixesCompleted(Long prefixesCompleted) {
this.prefixesCompleted = prefixesCompleted;
}
/**
*
* The number of S3 prefixes that completed import.
*
*
* @return The number of S3 prefixes that completed import.
*/
public Long getPrefixesCompleted() {
return this.prefixesCompleted;
}
/**
*
* The number of S3 prefixes that completed import.
*
*
* @param prefixesCompleted
* The number of S3 prefixes that completed import.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ImportStatistics withPrefixesCompleted(Long prefixesCompleted) {
setPrefixesCompleted(prefixesCompleted);
return this;
}
/**
*
* The number of log files that completed import.
*
*
* @param filesCompleted
* The number of log files that completed import.
*/
public void setFilesCompleted(Long filesCompleted) {
this.filesCompleted = filesCompleted;
}
/**
*
* The number of log files that completed import.
*
*
* @return The number of log files that completed import.
*/
public Long getFilesCompleted() {
return this.filesCompleted;
}
/**
*
* The number of log files that completed import.
*
*
* @param filesCompleted
* The number of log files that completed import.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ImportStatistics withFilesCompleted(Long filesCompleted) {
setFilesCompleted(filesCompleted);
return this;
}
/**
*
* The number of trail events imported into the event data store.
*
*
* @param eventsCompleted
* The number of trail events imported into the event data store.
*/
public void setEventsCompleted(Long eventsCompleted) {
this.eventsCompleted = eventsCompleted;
}
/**
*
* The number of trail events imported into the event data store.
*
*
* @return The number of trail events imported into the event data store.
*/
public Long getEventsCompleted() {
return this.eventsCompleted;
}
/**
*
* The number of trail events imported into the event data store.
*
*
* @param eventsCompleted
* The number of trail events imported into the event data store.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ImportStatistics withEventsCompleted(Long eventsCompleted) {
setEventsCompleted(eventsCompleted);
return this;
}
/**
*
* The number of failed entries.
*
*
* @param failedEntries
* The number of failed entries.
*/
public void setFailedEntries(Long failedEntries) {
this.failedEntries = failedEntries;
}
/**
*
* The number of failed entries.
*
*
* @return The number of failed entries.
*/
public Long getFailedEntries() {
return this.failedEntries;
}
/**
*
* The number of failed entries.
*
*
* @param failedEntries
* The number of failed entries.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ImportStatistics withFailedEntries(Long failedEntries) {
setFailedEntries(failedEntries);
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 (getPrefixesFound() != null)
sb.append("PrefixesFound: ").append(getPrefixesFound()).append(",");
if (getPrefixesCompleted() != null)
sb.append("PrefixesCompleted: ").append(getPrefixesCompleted()).append(",");
if (getFilesCompleted() != null)
sb.append("FilesCompleted: ").append(getFilesCompleted()).append(",");
if (getEventsCompleted() != null)
sb.append("EventsCompleted: ").append(getEventsCompleted()).append(",");
if (getFailedEntries() != null)
sb.append("FailedEntries: ").append(getFailedEntries());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ImportStatistics == false)
return false;
ImportStatistics other = (ImportStatistics) obj;
if (other.getPrefixesFound() == null ^ this.getPrefixesFound() == null)
return false;
if (other.getPrefixesFound() != null && other.getPrefixesFound().equals(this.getPrefixesFound()) == false)
return false;
if (other.getPrefixesCompleted() == null ^ this.getPrefixesCompleted() == null)
return false;
if (other.getPrefixesCompleted() != null && other.getPrefixesCompleted().equals(this.getPrefixesCompleted()) == false)
return false;
if (other.getFilesCompleted() == null ^ this.getFilesCompleted() == null)
return false;
if (other.getFilesCompleted() != null && other.getFilesCompleted().equals(this.getFilesCompleted()) == false)
return false;
if (other.getEventsCompleted() == null ^ this.getEventsCompleted() == null)
return false;
if (other.getEventsCompleted() != null && other.getEventsCompleted().equals(this.getEventsCompleted()) == false)
return false;
if (other.getFailedEntries() == null ^ this.getFailedEntries() == null)
return false;
if (other.getFailedEntries() != null && other.getFailedEntries().equals(this.getFailedEntries()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getPrefixesFound() == null) ? 0 : getPrefixesFound().hashCode());
hashCode = prime * hashCode + ((getPrefixesCompleted() == null) ? 0 : getPrefixesCompleted().hashCode());
hashCode = prime * hashCode + ((getFilesCompleted() == null) ? 0 : getFilesCompleted().hashCode());
hashCode = prime * hashCode + ((getEventsCompleted() == null) ? 0 : getEventsCompleted().hashCode());
hashCode = prime * hashCode + ((getFailedEntries() == null) ? 0 : getFailedEntries().hashCode());
return hashCode;
}
@Override
public ImportStatistics clone() {
try {
return (ImportStatistics) 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.cloudtrail.model.transform.ImportStatisticsMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}