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

com.amazonaws.services.elasticache.model.LogDeliveryConfiguration 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;

/**
 * 

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

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

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

*/ private String logType; /** *

* Returns the destination type, either cloudwatch-logs or kinesis-firehose. *

*/ private String destinationType; /** *

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

*/ private DestinationDetails destinationDetails; /** *

* Returns the log format, either JSON or TEXT. *

*/ private String logFormat; /** *

* Returns the log delivery configuration status. Values are one of enabling | disabling | * modifying | active | error *

*/ private String status; /** *

* Returns an error message for the log delivery configuration. *

*/ private String message; /** *

* 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 LogDeliveryConfiguration 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 LogDeliveryConfiguration withLogType(LogType logType) { this.logType = logType.toString(); return this; } /** *

* Returns the destination type, either cloudwatch-logs or kinesis-firehose. *

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

* Returns the destination type, either cloudwatch-logs or kinesis-firehose. *

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

* Returns the destination type, either cloudwatch-logs or kinesis-firehose. *

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

* Returns the destination type, either cloudwatch-logs or kinesis-firehose. *

* * @param destinationType * Returns the destination type, either cloudwatch-logs or kinesis-firehose. * @return Returns a reference to this object so that method calls can be chained together. * @see DestinationType */ public LogDeliveryConfiguration 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 LogDeliveryConfiguration withDestinationDetails(DestinationDetails destinationDetails) { setDestinationDetails(destinationDetails); return this; } /** *

* Returns the log format, either JSON or TEXT. *

* * @param logFormat * Returns the log format, either JSON or TEXT. * @see LogFormat */ public void setLogFormat(String logFormat) { this.logFormat = logFormat; } /** *

* Returns the log format, either JSON or TEXT. *

* * @return Returns the log format, either JSON or TEXT. * @see LogFormat */ public String getLogFormat() { return this.logFormat; } /** *

* Returns the log format, either JSON or TEXT. *

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

* Returns the log format, either JSON or TEXT. *

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

* Returns the log delivery configuration status. Values are one of enabling | disabling | * modifying | active | error *

* * @param status * Returns the log delivery configuration status. Values are one of enabling | * disabling | modifying | active | error * @see LogDeliveryConfigurationStatus */ public void setStatus(String status) { this.status = status; } /** *

* Returns the log delivery configuration status. Values are one of enabling | disabling | * modifying | active | error *

* * @return Returns the log delivery configuration status. Values are one of enabling | * disabling | modifying | active | error * @see LogDeliveryConfigurationStatus */ public String getStatus() { return this.status; } /** *

* Returns the log delivery configuration status. Values are one of enabling | disabling | * modifying | active | error *

* * @param status * Returns the log delivery configuration status. Values are one of enabling | * disabling | modifying | active | error * @return Returns a reference to this object so that method calls can be chained together. * @see LogDeliveryConfigurationStatus */ public LogDeliveryConfiguration withStatus(String status) { setStatus(status); return this; } /** *

* Returns the log delivery configuration status. Values are one of enabling | disabling | * modifying | active | error *

* * @param status * Returns the log delivery configuration status. Values are one of enabling | * disabling | modifying | active | error * @return Returns a reference to this object so that method calls can be chained together. * @see LogDeliveryConfigurationStatus */ public LogDeliveryConfiguration withStatus(LogDeliveryConfigurationStatus status) { this.status = status.toString(); return this; } /** *

* Returns an error message for the log delivery configuration. *

* * @param message * Returns an error message for the log delivery configuration. */ public void setMessage(String message) { this.message = message; } /** *

* Returns an error message for the log delivery configuration. *

* * @return Returns an error message for the log delivery configuration. */ public String getMessage() { return this.message; } /** *

* Returns an error message for the log delivery configuration. *

* * @param message * Returns an error message for the log delivery configuration. * @return Returns a reference to this object so that method calls can be chained together. */ public LogDeliveryConfiguration withMessage(String message) { setMessage(message); 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 (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 (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getMessage() != null) sb.append("Message: ").append(getMessage()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof LogDeliveryConfiguration == false) return false; LogDeliveryConfiguration other = (LogDeliveryConfiguration) 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.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; if (other.getMessage() == null ^ this.getMessage() == null) return false; if (other.getMessage() != null && other.getMessage().equals(this.getMessage()) == 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 + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getMessage() == null) ? 0 : getMessage().hashCode()); return hashCode; } @Override public LogDeliveryConfiguration clone() { try { return (LogDeliveryConfiguration) 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