/* * 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.redshift.model; import java.io.Serializable; import javax.annotation.Generated; /** *
* Describes the status of logging for a cluster. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class EnableLoggingResult extends com.amazonaws.AmazonWebServiceResult
* true
if logging is on, false
if logging is off.
*
* The name of the S3 bucket where the log files are stored. *
*/ private String bucketName; /** ** The prefix applied to the log file names. *
*/ private String s3KeyPrefix; /** ** The last time that logs were delivered. *
*/ private java.util.Date lastSuccessfulDeliveryTime; /** ** The last time when logs failed to be delivered. *
*/ private java.util.Date lastFailureTime; /** ** The message indicating that logs failed to be delivered. *
*/ private String lastFailureMessage; /** *
* The log destination type. An enum with possible values of s3
and cloudwatch
.
*
* The collection of exported log types. Possible values are connectionlog
,
* useractivitylog
, and userlog
.
*
* true
if logging is on, false
if logging is off.
*
true
if logging is on, false
if logging is off.
*/
public void setLoggingEnabled(Boolean loggingEnabled) {
this.loggingEnabled = loggingEnabled;
}
/**
*
* true
if logging is on, false
if logging is off.
*
true
if logging is on, false
if logging is off.
*/
public Boolean getLoggingEnabled() {
return this.loggingEnabled;
}
/**
*
* true
if logging is on, false
if logging is off.
*
true
if logging is on, false
if logging is off.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EnableLoggingResult withLoggingEnabled(Boolean loggingEnabled) {
setLoggingEnabled(loggingEnabled);
return this;
}
/**
*
* true
if logging is on, false
if logging is off.
*
true
if logging is on, false
if logging is off.
*/
public Boolean isLoggingEnabled() {
return this.loggingEnabled;
}
/**
* * The name of the S3 bucket where the log files are stored. *
* * @param bucketName * The name of the S3 bucket where the log files are stored. */ public void setBucketName(String bucketName) { this.bucketName = bucketName; } /** ** The name of the S3 bucket where the log files are stored. *
* * @return The name of the S3 bucket where the log files are stored. */ public String getBucketName() { return this.bucketName; } /** ** The name of the S3 bucket where the log files are stored. *
* * @param bucketName * The name of the S3 bucket where the log files are stored. * @return Returns a reference to this object so that method calls can be chained together. */ public EnableLoggingResult withBucketName(String bucketName) { setBucketName(bucketName); return this; } /** ** The prefix applied to the log file names. *
* * @param s3KeyPrefix * The prefix applied to the log file names. */ public void setS3KeyPrefix(String s3KeyPrefix) { this.s3KeyPrefix = s3KeyPrefix; } /** ** The prefix applied to the log file names. *
* * @return The prefix applied to the log file names. */ public String getS3KeyPrefix() { return this.s3KeyPrefix; } /** ** The prefix applied to the log file names. *
* * @param s3KeyPrefix * The prefix applied to the log file names. * @return Returns a reference to this object so that method calls can be chained together. */ public EnableLoggingResult withS3KeyPrefix(String s3KeyPrefix) { setS3KeyPrefix(s3KeyPrefix); return this; } /** ** The last time that logs were delivered. *
* * @param lastSuccessfulDeliveryTime * The last time that logs were delivered. */ public void setLastSuccessfulDeliveryTime(java.util.Date lastSuccessfulDeliveryTime) { this.lastSuccessfulDeliveryTime = lastSuccessfulDeliveryTime; } /** ** The last time that logs were delivered. *
* * @return The last time that logs were delivered. */ public java.util.Date getLastSuccessfulDeliveryTime() { return this.lastSuccessfulDeliveryTime; } /** ** The last time that logs were delivered. *
* * @param lastSuccessfulDeliveryTime * The last time that logs were delivered. * @return Returns a reference to this object so that method calls can be chained together. */ public EnableLoggingResult withLastSuccessfulDeliveryTime(java.util.Date lastSuccessfulDeliveryTime) { setLastSuccessfulDeliveryTime(lastSuccessfulDeliveryTime); return this; } /** ** The last time when logs failed to be delivered. *
* * @param lastFailureTime * The last time when logs failed to be delivered. */ public void setLastFailureTime(java.util.Date lastFailureTime) { this.lastFailureTime = lastFailureTime; } /** ** The last time when logs failed to be delivered. *
* * @return The last time when logs failed to be delivered. */ public java.util.Date getLastFailureTime() { return this.lastFailureTime; } /** ** The last time when logs failed to be delivered. *
* * @param lastFailureTime * The last time when logs failed to be delivered. * @return Returns a reference to this object so that method calls can be chained together. */ public EnableLoggingResult withLastFailureTime(java.util.Date lastFailureTime) { setLastFailureTime(lastFailureTime); return this; } /** ** The message indicating that logs failed to be delivered. *
* * @param lastFailureMessage * The message indicating that logs failed to be delivered. */ public void setLastFailureMessage(String lastFailureMessage) { this.lastFailureMessage = lastFailureMessage; } /** ** The message indicating that logs failed to be delivered. *
* * @return The message indicating that logs failed to be delivered. */ public String getLastFailureMessage() { return this.lastFailureMessage; } /** ** The message indicating that logs failed to be delivered. *
* * @param lastFailureMessage * The message indicating that logs failed to be delivered. * @return Returns a reference to this object so that method calls can be chained together. */ public EnableLoggingResult withLastFailureMessage(String lastFailureMessage) { setLastFailureMessage(lastFailureMessage); return this; } /** *
* The log destination type. An enum with possible values of s3
and cloudwatch
.
*
s3
and cloudwatch
.
* @see LogDestinationType
*/
public void setLogDestinationType(String logDestinationType) {
this.logDestinationType = logDestinationType;
}
/**
*
* The log destination type. An enum with possible values of s3
and cloudwatch
.
*
s3
and cloudwatch
.
* @see LogDestinationType
*/
public String getLogDestinationType() {
return this.logDestinationType;
}
/**
*
* The log destination type. An enum with possible values of s3
and cloudwatch
.
*
s3
and cloudwatch
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see LogDestinationType
*/
public EnableLoggingResult withLogDestinationType(String logDestinationType) {
setLogDestinationType(logDestinationType);
return this;
}
/**
*
* The log destination type. An enum with possible values of s3
and cloudwatch
.
*
s3
and cloudwatch
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see LogDestinationType
*/
public EnableLoggingResult withLogDestinationType(LogDestinationType logDestinationType) {
this.logDestinationType = logDestinationType.toString();
return this;
}
/**
*
* The collection of exported log types. Possible values are connectionlog
,
* useractivitylog
, and userlog
.
*
connectionlog
,
* useractivitylog
, and userlog
.
*/
public java.util.List
* The collection of exported log types. Possible values are connectionlog
,
* useractivitylog
, and userlog
.
*
connectionlog
,
* useractivitylog
, and userlog
.
*/
public void setLogExports(java.util.Collection
* The collection of exported log types. Possible values are connectionlog
,
* useractivitylog
, and userlog
.
*
* NOTE: This method appends the values to the existing list (if any). Use * {@link #setLogExports(java.util.Collection)} or {@link #withLogExports(java.util.Collection)} if you want to * override the existing values. *
* * @param logExports * The collection of exported log types. Possible values areconnectionlog
,
* useractivitylog
, and userlog
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EnableLoggingResult withLogExports(String... logExports) {
if (this.logExports == null) {
setLogExports(new com.amazonaws.internal.SdkInternalList
* The collection of exported log types. Possible values are connectionlog
,
* useractivitylog
, and userlog
.
*
connectionlog
,
* useractivitylog
, and userlog
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EnableLoggingResult withLogExports(java.util.Collection