com.amazonaws.services.ec2.model.DestinationOptionsRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-ec2 Show documentation
/*
* 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.ec2.model;
import java.io.Serializable;
import javax.annotation.Generated;
/**
*
* Describes the destination options for a flow log.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class DestinationOptionsRequest implements Serializable, Cloneable {
/**
*
* The format for the flow log. The default is plain-text
.
*
*/
private String fileFormat;
/**
*
* Indicates whether to use Hive-compatible prefixes for flow logs stored in Amazon S3. The default is
* false
.
*
*/
private Boolean hiveCompatiblePartitions;
/**
*
* Indicates whether to partition the flow log per hour. This reduces the cost and response time for queries. The
* default is false
.
*
*/
private Boolean perHourPartition;
/**
*
* The format for the flow log. The default is plain-text
.
*
*
* @param fileFormat
* The format for the flow log. The default is plain-text
.
* @see DestinationFileFormat
*/
public void setFileFormat(String fileFormat) {
this.fileFormat = fileFormat;
}
/**
*
* The format for the flow log. The default is plain-text
.
*
*
* @return The format for the flow log. The default is plain-text
.
* @see DestinationFileFormat
*/
public String getFileFormat() {
return this.fileFormat;
}
/**
*
* The format for the flow log. The default is plain-text
.
*
*
* @param fileFormat
* The format for the flow log. The default is plain-text
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see DestinationFileFormat
*/
public DestinationOptionsRequest withFileFormat(String fileFormat) {
setFileFormat(fileFormat);
return this;
}
/**
*
* The format for the flow log. The default is plain-text
.
*
*
* @param fileFormat
* The format for the flow log. The default is plain-text
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see DestinationFileFormat
*/
public DestinationOptionsRequest withFileFormat(DestinationFileFormat fileFormat) {
this.fileFormat = fileFormat.toString();
return this;
}
/**
*
* Indicates whether to use Hive-compatible prefixes for flow logs stored in Amazon S3. The default is
* false
.
*
*
* @param hiveCompatiblePartitions
* Indicates whether to use Hive-compatible prefixes for flow logs stored in Amazon S3. The default is
* false
.
*/
public void setHiveCompatiblePartitions(Boolean hiveCompatiblePartitions) {
this.hiveCompatiblePartitions = hiveCompatiblePartitions;
}
/**
*
* Indicates whether to use Hive-compatible prefixes for flow logs stored in Amazon S3. The default is
* false
.
*
*
* @return Indicates whether to use Hive-compatible prefixes for flow logs stored in Amazon S3. The default is
* false
.
*/
public Boolean getHiveCompatiblePartitions() {
return this.hiveCompatiblePartitions;
}
/**
*
* Indicates whether to use Hive-compatible prefixes for flow logs stored in Amazon S3. The default is
* false
.
*
*
* @param hiveCompatiblePartitions
* Indicates whether to use Hive-compatible prefixes for flow logs stored in Amazon S3. The default is
* false
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DestinationOptionsRequest withHiveCompatiblePartitions(Boolean hiveCompatiblePartitions) {
setHiveCompatiblePartitions(hiveCompatiblePartitions);
return this;
}
/**
*
* Indicates whether to use Hive-compatible prefixes for flow logs stored in Amazon S3. The default is
* false
.
*
*
* @return Indicates whether to use Hive-compatible prefixes for flow logs stored in Amazon S3. The default is
* false
.
*/
public Boolean isHiveCompatiblePartitions() {
return this.hiveCompatiblePartitions;
}
/**
*
* Indicates whether to partition the flow log per hour. This reduces the cost and response time for queries. The
* default is false
.
*
*
* @param perHourPartition
* Indicates whether to partition the flow log per hour. This reduces the cost and response time for queries.
* The default is false
.
*/
public void setPerHourPartition(Boolean perHourPartition) {
this.perHourPartition = perHourPartition;
}
/**
*
* Indicates whether to partition the flow log per hour. This reduces the cost and response time for queries. The
* default is false
.
*
*
* @return Indicates whether to partition the flow log per hour. This reduces the cost and response time for
* queries. The default is false
.
*/
public Boolean getPerHourPartition() {
return this.perHourPartition;
}
/**
*
* Indicates whether to partition the flow log per hour. This reduces the cost and response time for queries. The
* default is false
.
*
*
* @param perHourPartition
* Indicates whether to partition the flow log per hour. This reduces the cost and response time for queries.
* The default is false
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DestinationOptionsRequest withPerHourPartition(Boolean perHourPartition) {
setPerHourPartition(perHourPartition);
return this;
}
/**
*
* Indicates whether to partition the flow log per hour. This reduces the cost and response time for queries. The
* default is false
.
*
*
* @return Indicates whether to partition the flow log per hour. This reduces the cost and response time for
* queries. The default is false
.
*/
public Boolean isPerHourPartition() {
return this.perHourPartition;
}
/**
* 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 (getFileFormat() != null)
sb.append("FileFormat: ").append(getFileFormat()).append(",");
if (getHiveCompatiblePartitions() != null)
sb.append("HiveCompatiblePartitions: ").append(getHiveCompatiblePartitions()).append(",");
if (getPerHourPartition() != null)
sb.append("PerHourPartition: ").append(getPerHourPartition());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof DestinationOptionsRequest == false)
return false;
DestinationOptionsRequest other = (DestinationOptionsRequest) obj;
if (other.getFileFormat() == null ^ this.getFileFormat() == null)
return false;
if (other.getFileFormat() != null && other.getFileFormat().equals(this.getFileFormat()) == false)
return false;
if (other.getHiveCompatiblePartitions() == null ^ this.getHiveCompatiblePartitions() == null)
return false;
if (other.getHiveCompatiblePartitions() != null && other.getHiveCompatiblePartitions().equals(this.getHiveCompatiblePartitions()) == false)
return false;
if (other.getPerHourPartition() == null ^ this.getPerHourPartition() == null)
return false;
if (other.getPerHourPartition() != null && other.getPerHourPartition().equals(this.getPerHourPartition()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getFileFormat() == null) ? 0 : getFileFormat().hashCode());
hashCode = prime * hashCode + ((getHiveCompatiblePartitions() == null) ? 0 : getHiveCompatiblePartitions().hashCode());
hashCode = prime * hashCode + ((getPerHourPartition() == null) ? 0 : getPerHourPartition().hashCode());
return hashCode;
}
@Override
public DestinationOptionsRequest clone() {
try {
return (DestinationOptionsRequest) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}