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

com.amazonaws.services.elasticache.model.LogDeliveryConfigurationRequest Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon ElastiCache module holds the client classes that are used for communicating with Amazon ElastiCache Service

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

import java.io.Serializable;
import javax.annotation.Generated;

/**
 * 

* Specifies the destination, format and type of the logs. *

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

* Refers to slow-log or engine-log.. *

*/ private String logType; /** *

* Specify either cloudwatch-logs or kinesis-firehose as the destination type. *

*/ private String destinationType; /** *

* Configuration details of either a CloudWatch Logs destination or Kinesis Data Firehose destination. *

*/ private DestinationDetails destinationDetails; /** *

* Specifies either JSON or TEXT *

*/ private String logFormat; /** *

* Specify if log delivery is enabled. Default true. *

*/ private Boolean enabled; /** *

* Refers to slow-log or engine-log.. *

* * @param logType * Refers to slow-log or engine-log.. * @see LogType */ public void setLogType(String logType) { this.logType = logType; } /** *

* Refers to slow-log or engine-log.. *

* * @return Refers to slow-log or engine-log.. * @see LogType */ public String getLogType() { return this.logType; } /** *

* Refers to slow-log or engine-log.. *

* * @param logType * Refers to slow-log or engine-log.. * @return Returns a reference to this object so that method calls can be chained together. * @see LogType */ public LogDeliveryConfigurationRequest withLogType(String logType) { setLogType(logType); return this; } /** *

* Refers to slow-log or engine-log.. *

* * @param logType * Refers to slow-log or engine-log.. * @return Returns a reference to this object so that method calls can be chained together. * @see LogType */ public LogDeliveryConfigurationRequest withLogType(LogType logType) { this.logType = logType.toString(); return this; } /** *

* Specify either cloudwatch-logs or kinesis-firehose as the destination type. *

* * @param destinationType * Specify either cloudwatch-logs or kinesis-firehose as the destination type. * @see DestinationType */ public void setDestinationType(String destinationType) { this.destinationType = destinationType; } /** *

* Specify either cloudwatch-logs or kinesis-firehose as the destination type. *

* * @return Specify either cloudwatch-logs or kinesis-firehose as the destination type. * @see DestinationType */ public String getDestinationType() { return this.destinationType; } /** *

* Specify either cloudwatch-logs or kinesis-firehose as the destination type. *

* * @param destinationType * Specify either cloudwatch-logs or kinesis-firehose as the destination type. * @return Returns a reference to this object so that method calls can be chained together. * @see DestinationType */ public LogDeliveryConfigurationRequest withDestinationType(String destinationType) { setDestinationType(destinationType); return this; } /** *

* Specify either cloudwatch-logs or kinesis-firehose as the destination type. *

* * @param destinationType * Specify either cloudwatch-logs or kinesis-firehose as the destination type. * @return Returns a reference to this object so that method calls can be chained together. * @see DestinationType */ public LogDeliveryConfigurationRequest withDestinationType(DestinationType destinationType) { this.destinationType = destinationType.toString(); return this; } /** *

* Configuration details of either a CloudWatch Logs destination or Kinesis Data Firehose destination. *

* * @param destinationDetails * Configuration details of either a CloudWatch Logs destination or Kinesis Data Firehose destination. */ public void setDestinationDetails(DestinationDetails destinationDetails) { this.destinationDetails = destinationDetails; } /** *

* Configuration details of either a CloudWatch Logs destination or Kinesis Data Firehose destination. *

* * @return Configuration details of either a CloudWatch Logs destination or Kinesis Data Firehose destination. */ public DestinationDetails getDestinationDetails() { return this.destinationDetails; } /** *

* Configuration details of either a CloudWatch Logs destination or Kinesis Data Firehose destination. *

* * @param destinationDetails * Configuration details of either a CloudWatch Logs destination or Kinesis Data Firehose destination. * @return Returns a reference to this object so that method calls can be chained together. */ public LogDeliveryConfigurationRequest withDestinationDetails(DestinationDetails destinationDetails) { setDestinationDetails(destinationDetails); return this; } /** *

* Specifies either JSON or TEXT *

* * @param logFormat * Specifies either JSON or TEXT * @see LogFormat */ public void setLogFormat(String logFormat) { this.logFormat = logFormat; } /** *

* Specifies either JSON or TEXT *

* * @return Specifies either JSON or TEXT * @see LogFormat */ public String getLogFormat() { return this.logFormat; } /** *

* Specifies either JSON or TEXT *

* * @param logFormat * Specifies either JSON or TEXT * @return Returns a reference to this object so that method calls can be chained together. * @see LogFormat */ public LogDeliveryConfigurationRequest withLogFormat(String logFormat) { setLogFormat(logFormat); return this; } /** *

* Specifies either JSON or TEXT *

* * @param logFormat * Specifies either JSON or TEXT * @return Returns a reference to this object so that method calls can be chained together. * @see LogFormat */ public LogDeliveryConfigurationRequest withLogFormat(LogFormat logFormat) { this.logFormat = logFormat.toString(); return this; } /** *

* Specify if log delivery is enabled. Default true. *

* * @param enabled * Specify if log delivery is enabled. Default true. */ public void setEnabled(Boolean enabled) { this.enabled = enabled; } /** *

* Specify if log delivery is enabled. Default true. *

* * @return Specify if log delivery is enabled. Default true. */ public Boolean getEnabled() { return this.enabled; } /** *

* Specify if log delivery is enabled. Default true. *

* * @param enabled * Specify if log delivery is enabled. Default true. * @return Returns a reference to this object so that method calls can be chained together. */ public LogDeliveryConfigurationRequest withEnabled(Boolean enabled) { setEnabled(enabled); return this; } /** *

* Specify if log delivery is enabled. Default true. *

* * @return Specify if log delivery is enabled. Default true. */ public Boolean isEnabled() { return this.enabled; } /** * 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 (getLogType() != null) sb.append("LogType: ").append(getLogType()).append(","); if (getDestinationType() != null) sb.append("DestinationType: ").append(getDestinationType()).append(","); if (getDestinationDetails() != null) sb.append("DestinationDetails: ").append(getDestinationDetails()).append(","); if (getLogFormat() != null) sb.append("LogFormat: ").append(getLogFormat()).append(","); if (getEnabled() != null) sb.append("Enabled: ").append(getEnabled()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof LogDeliveryConfigurationRequest == false) return false; LogDeliveryConfigurationRequest other = (LogDeliveryConfigurationRequest) obj; if (other.getLogType() == null ^ this.getLogType() == null) return false; if (other.getLogType() != null && other.getLogType().equals(this.getLogType()) == false) return false; if (other.getDestinationType() == null ^ this.getDestinationType() == null) return false; if (other.getDestinationType() != null && other.getDestinationType().equals(this.getDestinationType()) == false) return false; if (other.getDestinationDetails() == null ^ this.getDestinationDetails() == null) return false; if (other.getDestinationDetails() != null && other.getDestinationDetails().equals(this.getDestinationDetails()) == false) return false; if (other.getLogFormat() == null ^ this.getLogFormat() == null) return false; if (other.getLogFormat() != null && other.getLogFormat().equals(this.getLogFormat()) == false) return false; if (other.getEnabled() == null ^ this.getEnabled() == null) return false; if (other.getEnabled() != null && other.getEnabled().equals(this.getEnabled()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getLogType() == null) ? 0 : getLogType().hashCode()); hashCode = prime * hashCode + ((getDestinationType() == null) ? 0 : getDestinationType().hashCode()); hashCode = prime * hashCode + ((getDestinationDetails() == null) ? 0 : getDestinationDetails().hashCode()); hashCode = prime * hashCode + ((getLogFormat() == null) ? 0 : getLogFormat().hashCode()); hashCode = prime * hashCode + ((getEnabled() == null) ? 0 : getEnabled().hashCode()); return hashCode; } @Override public LogDeliveryConfigurationRequest clone() { try { return (LogDeliveryConfigurationRequest) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy