Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2015 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;
 

Returns the objects or data listed below if successful. Otherwise, returns an error.

 
 public class GetTrailStatusResult implements SerializableCloneable {

    
Whether the CloudTrail is currently logging AWS API calls.
 
     private Boolean isLogging;

    
Displays any Amazon S3 error that CloudTrail encountered when attempting to deliver log files to the designated bucket. For more information see the topic Error Responses in the Amazon S3 API Reference.
 
     private String latestDeliveryError;

    
Displays any Amazon SNS error that CloudTrail encountered when attempting to send a notification. For more information about Amazon SNS errors, see the Amazon SNS Developer Guide.
 
     private String latestNotificationError;

    
Specifies the date and time that CloudTrail last delivered log files to an account's Amazon S3 bucket.
 
     private java.util.Date latestDeliveryTime;

    
Specifies the date and time of the most recent Amazon SNS notification that CloudTrail has written a new log file to an account's Amazon S3 bucket.
 
     private java.util.Date latestNotificationTime;

    
Specifies the most recent date and time when CloudTrail started recording API calls for an AWS account.
 
     private java.util.Date startLoggingTime;

    
Specifies the most recent date and time when CloudTrail stopped recording API calls for an AWS account.
 
     private java.util.Date stopLoggingTime;

    
Displays any CloudWatch Logs error that CloudTrail encountered when attempting to deliver logs to CloudWatch Logs.
 
     private String latestCloudWatchLogsDeliveryError;

    
Displays the most recent date and time when CloudTrail delivered logs to CloudWatch Logs.
 
     private java.util.Date latestCloudWatchLogsDeliveryTime;

    
Whether the CloudTrail is currently logging AWS API calls.

Returns:
Whether the CloudTrail is currently logging AWS API calls.
 
     public Boolean isLogging() {
         return ;
     }
    
    
Whether the CloudTrail is currently logging AWS API calls.

Parameters:
isLogging Whether the CloudTrail is currently logging AWS API calls.
    public void setIsLogging(Boolean isLogging) {
        this. = isLogging;
    }
    
    
Whether the CloudTrail is currently logging AWS API calls.

Returns a reference to this object so that method calls can be chained together.

Parameters:
isLogging Whether the CloudTrail is currently logging AWS API calls.
Returns:
A reference to this updated object so that method calls can be chained together.
    public GetTrailStatusResult withIsLogging(Boolean isLogging) {
        this. = isLogging;
        return this;
    }

    
Whether the CloudTrail is currently logging AWS API calls.

Returns:
Whether the CloudTrail is currently logging AWS API calls.
    public Boolean getIsLogging() {
        return ;
    }

    
Displays any Amazon S3 error that CloudTrail encountered when attempting to deliver log files to the designated bucket. For more information see the topic Error Responses in the Amazon S3 API Reference.

Returns:
Displays any Amazon S3 error that CloudTrail encountered when attempting to deliver log files to the designated bucket. For more information see the topic Error Responses in the Amazon S3 API Reference.
    public String getLatestDeliveryError() {
        return ;
    }
    
    
Displays any Amazon S3 error that CloudTrail encountered when attempting to deliver log files to the designated bucket. For more information see the topic Error Responses in the Amazon S3 API Reference.

Parameters:
latestDeliveryError Displays any Amazon S3 error that CloudTrail encountered when attempting to deliver log files to the designated bucket. For more information see the topic Error Responses in the Amazon S3 API Reference.
    public void setLatestDeliveryError(String latestDeliveryError) {
        this. = latestDeliveryError;
    }
    
    
Displays any Amazon S3 error that CloudTrail encountered when attempting to deliver log files to the designated bucket. For more information see the topic Error Responses in the Amazon S3 API Reference.

Returns a reference to this object so that method calls can be chained together.

Parameters:
latestDeliveryError Displays any Amazon S3 error that CloudTrail encountered when attempting to deliver log files to the designated bucket. For more information see the topic Error Responses in the Amazon S3 API Reference.
Returns:
A reference to this updated object so that method calls can be chained together.
    public GetTrailStatusResult withLatestDeliveryError(String latestDeliveryError) {
        this. = latestDeliveryError;
        return this;
    }

    
Displays any Amazon SNS error that CloudTrail encountered when attempting to send a notification. For more information about Amazon SNS errors, see the Amazon SNS Developer Guide.

Returns:
Displays any Amazon SNS error that CloudTrail encountered when attempting to send a notification. For more information about Amazon SNS errors, see the Amazon SNS Developer Guide.
        return ;
    }
    
    
Displays any Amazon SNS error that CloudTrail encountered when attempting to send a notification. For more information about Amazon SNS errors, see the Amazon SNS Developer Guide.

Parameters:
latestNotificationError Displays any Amazon SNS error that CloudTrail encountered when attempting to send a notification. For more information about Amazon SNS errors, see the Amazon SNS Developer Guide.
    public void setLatestNotificationError(String latestNotificationError) {
        this. = latestNotificationError;
    }
    
    
Displays any Amazon SNS error that CloudTrail encountered when attempting to send a notification. For more information about Amazon SNS errors, see the Amazon SNS Developer Guide.

Returns a reference to this object so that method calls can be chained together.

Parameters:
latestNotificationError Displays any Amazon SNS error that CloudTrail encountered when attempting to send a notification. For more information about Amazon SNS errors, see the Amazon SNS Developer Guide.
Returns:
A reference to this updated object so that method calls can be chained together.
    public GetTrailStatusResult withLatestNotificationError(String latestNotificationError) {
        this. = latestNotificationError;
        return this;
    }

    
Specifies the date and time that CloudTrail last delivered log files to an account's Amazon S3 bucket.

Returns:
Specifies the date and time that CloudTrail last delivered log files to an account's Amazon S3 bucket.
    public java.util.Date getLatestDeliveryTime() {
        return ;
    }
    
    
Specifies the date and time that CloudTrail last delivered log files to an account's Amazon S3 bucket.

Parameters:
latestDeliveryTime Specifies the date and time that CloudTrail last delivered log files to an account's Amazon S3 bucket.
    public void setLatestDeliveryTime(java.util.Date latestDeliveryTime) {
        this. = latestDeliveryTime;
    }
    
    
Specifies the date and time that CloudTrail last delivered log files to an account's Amazon S3 bucket.

Returns a reference to this object so that method calls can be chained together.

Parameters:
latestDeliveryTime Specifies the date and time that CloudTrail last delivered log files to an account's Amazon S3 bucket.
Returns:
A reference to this updated object so that method calls can be chained together.
    public GetTrailStatusResult withLatestDeliveryTime(java.util.Date latestDeliveryTime) {
        this. = latestDeliveryTime;
        return this;
    }

    
Specifies the date and time of the most recent Amazon SNS notification that CloudTrail has written a new log file to an account's Amazon S3 bucket.

Returns:
Specifies the date and time of the most recent Amazon SNS notification that CloudTrail has written a new log file to an account's Amazon S3 bucket.
        return ;
    }
    
    
Specifies the date and time of the most recent Amazon SNS notification that CloudTrail has written a new log file to an account's Amazon S3 bucket.

Parameters:
latestNotificationTime Specifies the date and time of the most recent Amazon SNS notification that CloudTrail has written a new log file to an account's Amazon S3 bucket.
    public void setLatestNotificationTime(java.util.Date latestNotificationTime) {
        this. = latestNotificationTime;
    }
    
    
Specifies the date and time of the most recent Amazon SNS notification that CloudTrail has written a new log file to an account's Amazon S3 bucket.

Returns a reference to this object so that method calls can be chained together.

Parameters:
latestNotificationTime Specifies the date and time of the most recent Amazon SNS notification that CloudTrail has written a new log file to an account's Amazon S3 bucket.
Returns:
A reference to this updated object so that method calls can be chained together.
    public GetTrailStatusResult withLatestNotificationTime(java.util.Date latestNotificationTime) {
        this. = latestNotificationTime;
        return this;
    }

    
Specifies the most recent date and time when CloudTrail started recording API calls for an AWS account.

Returns:
Specifies the most recent date and time when CloudTrail started recording API calls for an AWS account.
    public java.util.Date getStartLoggingTime() {
        return ;
    }
    
    
Specifies the most recent date and time when CloudTrail started recording API calls for an AWS account.

Parameters:
startLoggingTime Specifies the most recent date and time when CloudTrail started recording API calls for an AWS account.
    public void setStartLoggingTime(java.util.Date startLoggingTime) {
        this. = startLoggingTime;
    }
    
    
Specifies the most recent date and time when CloudTrail started recording API calls for an AWS account.

Returns a reference to this object so that method calls can be chained together.

Parameters:
startLoggingTime Specifies the most recent date and time when CloudTrail started recording API calls for an AWS account.
Returns:
A reference to this updated object so that method calls can be chained together.
    public GetTrailStatusResult withStartLoggingTime(java.util.Date startLoggingTime) {
        this. = startLoggingTime;
        return this;
    }

    
Specifies the most recent date and time when CloudTrail stopped recording API calls for an AWS account.

Returns:
Specifies the most recent date and time when CloudTrail stopped recording API calls for an AWS account.
    public java.util.Date getStopLoggingTime() {
        return ;
    }
    
    
Specifies the most recent date and time when CloudTrail stopped recording API calls for an AWS account.

Parameters:
stopLoggingTime Specifies the most recent date and time when CloudTrail stopped recording API calls for an AWS account.
    public void setStopLoggingTime(java.util.Date stopLoggingTime) {
        this. = stopLoggingTime;
    }
    
    
Specifies the most recent date and time when CloudTrail stopped recording API calls for an AWS account.

Returns a reference to this object so that method calls can be chained together.

Parameters:
stopLoggingTime Specifies the most recent date and time when CloudTrail stopped recording API calls for an AWS account.
Returns:
A reference to this updated object so that method calls can be chained together.
    public GetTrailStatusResult withStopLoggingTime(java.util.Date stopLoggingTime) {
        this. = stopLoggingTime;
        return this;
    }

    
Displays any CloudWatch Logs error that CloudTrail encountered when attempting to deliver logs to CloudWatch Logs.

Returns:
Displays any CloudWatch Logs error that CloudTrail encountered when attempting to deliver logs to CloudWatch Logs.
        return ;
    }
    
    
Displays any CloudWatch Logs error that CloudTrail encountered when attempting to deliver logs to CloudWatch Logs.

Parameters:
latestCloudWatchLogsDeliveryError Displays any CloudWatch Logs error that CloudTrail encountered when attempting to deliver logs to CloudWatch Logs.
    public void setLatestCloudWatchLogsDeliveryError(String latestCloudWatchLogsDeliveryError) {
        this. = latestCloudWatchLogsDeliveryError;
    }
    
    
Displays any CloudWatch Logs error that CloudTrail encountered when attempting to deliver logs to CloudWatch Logs.

Returns a reference to this object so that method calls can be chained together.

Parameters:
latestCloudWatchLogsDeliveryError Displays any CloudWatch Logs error that CloudTrail encountered when attempting to deliver logs to CloudWatch Logs.
Returns:
A reference to this updated object so that method calls can be chained together.
    public GetTrailStatusResult withLatestCloudWatchLogsDeliveryError(String latestCloudWatchLogsDeliveryError) {
        this. = latestCloudWatchLogsDeliveryError;
        return this;
    }

    
Displays the most recent date and time when CloudTrail delivered logs to CloudWatch Logs.

Returns:
Displays the most recent date and time when CloudTrail delivered logs to CloudWatch Logs.
        return ;
    }
    
    
Displays the most recent date and time when CloudTrail delivered logs to CloudWatch Logs.

Parameters:
latestCloudWatchLogsDeliveryTime Displays the most recent date and time when CloudTrail delivered logs to CloudWatch Logs.
    public void setLatestCloudWatchLogsDeliveryTime(java.util.Date latestCloudWatchLogsDeliveryTime) {
        this. = latestCloudWatchLogsDeliveryTime;
    }
    
    
Displays the most recent date and time when CloudTrail delivered logs to CloudWatch Logs.

Returns a reference to this object so that method calls can be chained together.

Parameters:
latestCloudWatchLogsDeliveryTime Displays the most recent date and time when CloudTrail delivered logs to CloudWatch Logs.
Returns:
A reference to this updated object so that method calls can be chained together.
    public GetTrailStatusResult withLatestCloudWatchLogsDeliveryTime(java.util.Date latestCloudWatchLogsDeliveryTime) {
        this. = latestCloudWatchLogsDeliveryTime;
        return this;
    }

    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (isLogging() != nullsb.append("IsLogging: " + isLogging() + ",");
        if (getLatestDeliveryError() != nullsb.append("LatestDeliveryError: " + getLatestDeliveryError() + ",");
        if (getLatestNotificationError() != nullsb.append("LatestNotificationError: " + getLatestNotificationError() + ",");
        if (getLatestDeliveryTime() != nullsb.append("LatestDeliveryTime: " + getLatestDeliveryTime() + ",");
        if (getLatestNotificationTime() != nullsb.append("LatestNotificationTime: " + getLatestNotificationTime() + ",");
        if (getStartLoggingTime() != nullsb.append("StartLoggingTime: " + getStartLoggingTime() + ",");
        if (getStopLoggingTime() != nullsb.append("StopLoggingTime: " + getStopLoggingTime() + ",");
        if (getLatestCloudWatchLogsDeliveryError() != nullsb.append("LatestCloudWatchLogsDeliveryError: " + getLatestCloudWatchLogsDeliveryError() + ",");
        if (getLatestCloudWatchLogsDeliveryTime() != nullsb.append("LatestCloudWatchLogsDeliveryTime: " + getLatestCloudWatchLogsDeliveryTime() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((isLogging() == null) ? 0 : isLogging().hashCode()); 
        hashCode = prime * hashCode + ((getLatestDeliveryError() == null) ? 0 : getLatestDeliveryError().hashCode()); 
        hashCode = prime * hashCode + ((getLatestNotificationError() == null) ? 0 : getLatestNotificationError().hashCode()); 
        hashCode = prime * hashCode + ((getLatestDeliveryTime() == null) ? 0 : getLatestDeliveryTime().hashCode()); 
        hashCode = prime * hashCode + ((getLatestNotificationTime() == null) ? 0 : getLatestNotificationTime().hashCode()); 
        hashCode = prime * hashCode + ((getStartLoggingTime() == null) ? 0 : getStartLoggingTime().hashCode()); 
        hashCode = prime * hashCode + ((getStopLoggingTime() == null) ? 0 : getStopLoggingTime().hashCode()); 
        hashCode = prime * hashCode + ((getLatestCloudWatchLogsDeliveryError() == null) ? 0 : getLatestCloudWatchLogsDeliveryError().hashCode()); 
        hashCode = prime * hashCode + ((getLatestCloudWatchLogsDeliveryTime() == null) ? 0 : getLatestCloudWatchLogsDeliveryTime().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof GetTrailStatusResult == falsereturn false;
        GetTrailStatusResult other = (GetTrailStatusResult)obj;
        
        if (other.isLogging() == null ^ this.isLogging() == nullreturn false;
        if (other.isLogging() != null && other.isLogging().equals(this.isLogging()) == falsereturn false
        if (other.getLatestDeliveryError() == null ^ this.getLatestDeliveryError() == nullreturn false;
        if (other.getLatestDeliveryError() != null && other.getLatestDeliveryError().equals(this.getLatestDeliveryError()) == falsereturn false
        if (other.getLatestNotificationError() == null ^ this.getLatestNotificationError() == nullreturn false;
        if (other.getLatestNotificationError() != null && other.getLatestNotificationError().equals(this.getLatestNotificationError()) == falsereturn false
        if (other.getLatestDeliveryTime() == null ^ this.getLatestDeliveryTime() == nullreturn false;
        if (other.getLatestDeliveryTime() != null && other.getLatestDeliveryTime().equals(this.getLatestDeliveryTime()) == falsereturn false
        if (other.getLatestNotificationTime() == null ^ this.getLatestNotificationTime() == nullreturn false;
        if (other.getLatestNotificationTime() != null && other.getLatestNotificationTime().equals(this.getLatestNotificationTime()) == falsereturn false
        if (other.getStartLoggingTime() == null ^ this.getStartLoggingTime() == nullreturn false;
        if (other.getStartLoggingTime() != null && other.getStartLoggingTime().equals(this.getStartLoggingTime()) == falsereturn false
        if (other.getStopLoggingTime() == null ^ this.getStopLoggingTime() == nullreturn false;
        if (other.getStopLoggingTime() != null && other.getStopLoggingTime().equals(this.getStopLoggingTime()) == falsereturn false
        if (other.getLatestCloudWatchLogsDeliveryError() == null ^ this.getLatestCloudWatchLogsDeliveryError() == nullreturn false;
        if (other.getLatestCloudWatchLogsDeliveryError() != null && other.getLatestCloudWatchLogsDeliveryError().equals(this.getLatestCloudWatchLogsDeliveryError()) == falsereturn false
        if (other.getLatestCloudWatchLogsDeliveryTime() == null ^ this.getLatestCloudWatchLogsDeliveryTime() == nullreturn false;
        if (other.getLatestCloudWatchLogsDeliveryTime() != null && other.getLatestCloudWatchLogsDeliveryTime().equals(this.getLatestCloudWatchLogsDeliveryTime()) == falsereturn false
        return true;
    }
    
    @Override
    public GetTrailStatusResult clone() {
        try {
            return (GetTrailStatusResultsuper.clone();
        
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException(
                    "Got a CloneNotSupportedException from Object.clone() "
                    + "even though we're Cloneable!",
                    e);
        }
        
    }
}
    
New to GrepCode? Check out our FAQ X