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

com.amazonaws.services.ec2.model.FlowLog Maven / Gradle / Ivy

Go to download

The AWS SDK for Java with support for OSGi. The AWS SDK for Java provides Java APIs for building software on AWS' cost-effective, scalable, and reliable infrastructure products. The AWS Java SDK allows developers to code against APIs for all of Amazon's infrastructure web services (Amazon S3, Amazon EC2, Amazon SQS, Amazon Relational Database Service, Amazon AutoScaling, etc).

There is a newer version: 1.11.60
Show newest version
/*
 * Copyright 2011-2016 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;

/**
 * 

* Describes a flow log. *

*/ public class FlowLog implements Serializable, Cloneable { /** *

* The date and time the flow log was created. *

*/ private java.util.Date creationTime; /** *

* The flow log ID. *

*/ private String flowLogId; /** *

* The status of the flow log (ACTIVE). *

*/ private String flowLogStatus; /** *

* The ID of the resource on which the flow log was created. *

*/ private String resourceId; /** *

* The type of traffic captured for the flow log. *

*/ private String trafficType; /** *

* The name of the flow log group. *

*/ private String logGroupName; /** *

* The status of the logs delivery (SUCCESS | * FAILED). *

*/ private String deliverLogsStatus; /** *

* Information about the error that occurred. Rate limited * indicates that CloudWatch logs throttling has been applied for one or * more network interfaces, or that you've reached the limit on the number * of CloudWatch Logs log groups that you can create. * Access error indicates that the IAM role associated with the * flow log does not have sufficient permissions to publish to CloudWatch * Logs. Unknown error indicates an internal error. *

*/ private String deliverLogsErrorMessage; /** *

* The ARN of the IAM role that posts logs to CloudWatch Logs. *

*/ private String deliverLogsPermissionArn; /** *

* The date and time the flow log was created. *

* * @param creationTime * The date and time the flow log was created. */ public void setCreationTime(java.util.Date creationTime) { this.creationTime = creationTime; } /** *

* The date and time the flow log was created. *

* * @return The date and time the flow log was created. */ public java.util.Date getCreationTime() { return this.creationTime; } /** *

* The date and time the flow log was created. *

* * @param creationTime * The date and time the flow log was created. * @return Returns a reference to this object so that method calls can be * chained together. */ public FlowLog withCreationTime(java.util.Date creationTime) { setCreationTime(creationTime); return this; } /** *

* The flow log ID. *

* * @param flowLogId * The flow log ID. */ public void setFlowLogId(String flowLogId) { this.flowLogId = flowLogId; } /** *

* The flow log ID. *

* * @return The flow log ID. */ public String getFlowLogId() { return this.flowLogId; } /** *

* The flow log ID. *

* * @param flowLogId * The flow log ID. * @return Returns a reference to this object so that method calls can be * chained together. */ public FlowLog withFlowLogId(String flowLogId) { setFlowLogId(flowLogId); return this; } /** *

* The status of the flow log (ACTIVE). *

* * @param flowLogStatus * The status of the flow log (ACTIVE). */ public void setFlowLogStatus(String flowLogStatus) { this.flowLogStatus = flowLogStatus; } /** *

* The status of the flow log (ACTIVE). *

* * @return The status of the flow log (ACTIVE). */ public String getFlowLogStatus() { return this.flowLogStatus; } /** *

* The status of the flow log (ACTIVE). *

* * @param flowLogStatus * The status of the flow log (ACTIVE). * @return Returns a reference to this object so that method calls can be * chained together. */ public FlowLog withFlowLogStatus(String flowLogStatus) { setFlowLogStatus(flowLogStatus); return this; } /** *

* The ID of the resource on which the flow log was created. *

* * @param resourceId * The ID of the resource on which the flow log was created. */ public void setResourceId(String resourceId) { this.resourceId = resourceId; } /** *

* The ID of the resource on which the flow log was created. *

* * @return The ID of the resource on which the flow log was created. */ public String getResourceId() { return this.resourceId; } /** *

* The ID of the resource on which the flow log was created. *

* * @param resourceId * The ID of the resource on which the flow log was created. * @return Returns a reference to this object so that method calls can be * chained together. */ public FlowLog withResourceId(String resourceId) { setResourceId(resourceId); return this; } /** *

* The type of traffic captured for the flow log. *

* * @param trafficType * The type of traffic captured for the flow log. * @see TrafficType */ public void setTrafficType(String trafficType) { this.trafficType = trafficType; } /** *

* The type of traffic captured for the flow log. *

* * @return The type of traffic captured for the flow log. * @see TrafficType */ public String getTrafficType() { return this.trafficType; } /** *

* The type of traffic captured for the flow log. *

* * @param trafficType * The type of traffic captured for the flow log. * @return Returns a reference to this object so that method calls can be * chained together. * @see TrafficType */ public FlowLog withTrafficType(String trafficType) { setTrafficType(trafficType); return this; } /** *

* The type of traffic captured for the flow log. *

* * @param trafficType * The type of traffic captured for the flow log. * @see TrafficType */ public void setTrafficType(TrafficType trafficType) { this.trafficType = trafficType.toString(); } /** *

* The type of traffic captured for the flow log. *

* * @param trafficType * The type of traffic captured for the flow log. * @return Returns a reference to this object so that method calls can be * chained together. * @see TrafficType */ public FlowLog withTrafficType(TrafficType trafficType) { setTrafficType(trafficType); return this; } /** *

* The name of the flow log group. *

* * @param logGroupName * The name of the flow log group. */ public void setLogGroupName(String logGroupName) { this.logGroupName = logGroupName; } /** *

* The name of the flow log group. *

* * @return The name of the flow log group. */ public String getLogGroupName() { return this.logGroupName; } /** *

* The name of the flow log group. *

* * @param logGroupName * The name of the flow log group. * @return Returns a reference to this object so that method calls can be * chained together. */ public FlowLog withLogGroupName(String logGroupName) { setLogGroupName(logGroupName); return this; } /** *

* The status of the logs delivery (SUCCESS | * FAILED). *

* * @param deliverLogsStatus * The status of the logs delivery (SUCCESS | * FAILED). */ public void setDeliverLogsStatus(String deliverLogsStatus) { this.deliverLogsStatus = deliverLogsStatus; } /** *

* The status of the logs delivery (SUCCESS | * FAILED). *

* * @return The status of the logs delivery (SUCCESS | * FAILED). */ public String getDeliverLogsStatus() { return this.deliverLogsStatus; } /** *

* The status of the logs delivery (SUCCESS | * FAILED). *

* * @param deliverLogsStatus * The status of the logs delivery (SUCCESS | * FAILED). * @return Returns a reference to this object so that method calls can be * chained together. */ public FlowLog withDeliverLogsStatus(String deliverLogsStatus) { setDeliverLogsStatus(deliverLogsStatus); return this; } /** *

* Information about the error that occurred. Rate limited * indicates that CloudWatch logs throttling has been applied for one or * more network interfaces, or that you've reached the limit on the number * of CloudWatch Logs log groups that you can create. * Access error indicates that the IAM role associated with the * flow log does not have sufficient permissions to publish to CloudWatch * Logs. Unknown error indicates an internal error. *

* * @param deliverLogsErrorMessage * Information about the error that occurred. * Rate limited indicates that CloudWatch logs * throttling has been applied for one or more network interfaces, or * that you've reached the limit on the number of CloudWatch Logs log * groups that you can create. Access error indicates * that the IAM role associated with the flow log does not have * sufficient permissions to publish to CloudWatch Logs. * Unknown error indicates an internal error. */ public void setDeliverLogsErrorMessage(String deliverLogsErrorMessage) { this.deliverLogsErrorMessage = deliverLogsErrorMessage; } /** *

* Information about the error that occurred. Rate limited * indicates that CloudWatch logs throttling has been applied for one or * more network interfaces, or that you've reached the limit on the number * of CloudWatch Logs log groups that you can create. * Access error indicates that the IAM role associated with the * flow log does not have sufficient permissions to publish to CloudWatch * Logs. Unknown error indicates an internal error. *

* * @return Information about the error that occurred. * Rate limited indicates that CloudWatch logs * throttling has been applied for one or more network interfaces, * or that you've reached the limit on the number of CloudWatch Logs * log groups that you can create. Access error * indicates that the IAM role associated with the flow log does not * have sufficient permissions to publish to CloudWatch Logs. * Unknown error indicates an internal error. */ public String getDeliverLogsErrorMessage() { return this.deliverLogsErrorMessage; } /** *

* Information about the error that occurred. Rate limited * indicates that CloudWatch logs throttling has been applied for one or * more network interfaces, or that you've reached the limit on the number * of CloudWatch Logs log groups that you can create. * Access error indicates that the IAM role associated with the * flow log does not have sufficient permissions to publish to CloudWatch * Logs. Unknown error indicates an internal error. *

* * @param deliverLogsErrorMessage * Information about the error that occurred. * Rate limited indicates that CloudWatch logs * throttling has been applied for one or more network interfaces, or * that you've reached the limit on the number of CloudWatch Logs log * groups that you can create. Access error indicates * that the IAM role associated with the flow log does not have * sufficient permissions to publish to CloudWatch Logs. * Unknown error indicates an internal error. * @return Returns a reference to this object so that method calls can be * chained together. */ public FlowLog withDeliverLogsErrorMessage(String deliverLogsErrorMessage) { setDeliverLogsErrorMessage(deliverLogsErrorMessage); return this; } /** *

* The ARN of the IAM role that posts logs to CloudWatch Logs. *

* * @param deliverLogsPermissionArn * The ARN of the IAM role that posts logs to CloudWatch Logs. */ public void setDeliverLogsPermissionArn(String deliverLogsPermissionArn) { this.deliverLogsPermissionArn = deliverLogsPermissionArn; } /** *

* The ARN of the IAM role that posts logs to CloudWatch Logs. *

* * @return The ARN of the IAM role that posts logs to CloudWatch Logs. */ public String getDeliverLogsPermissionArn() { return this.deliverLogsPermissionArn; } /** *

* The ARN of the IAM role that posts logs to CloudWatch Logs. *

* * @param deliverLogsPermissionArn * The ARN of the IAM role that posts logs to CloudWatch Logs. * @return Returns a reference to this object so that method calls can be * chained together. */ public FlowLog withDeliverLogsPermissionArn(String deliverLogsPermissionArn) { setDeliverLogsPermissionArn(deliverLogsPermissionArn); return this; } /** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getCreationTime() != null) sb.append("CreationTime: " + getCreationTime() + ","); if (getFlowLogId() != null) sb.append("FlowLogId: " + getFlowLogId() + ","); if (getFlowLogStatus() != null) sb.append("FlowLogStatus: " + getFlowLogStatus() + ","); if (getResourceId() != null) sb.append("ResourceId: " + getResourceId() + ","); if (getTrafficType() != null) sb.append("TrafficType: " + getTrafficType() + ","); if (getLogGroupName() != null) sb.append("LogGroupName: " + getLogGroupName() + ","); if (getDeliverLogsStatus() != null) sb.append("DeliverLogsStatus: " + getDeliverLogsStatus() + ","); if (getDeliverLogsErrorMessage() != null) sb.append("DeliverLogsErrorMessage: " + getDeliverLogsErrorMessage() + ","); if (getDeliverLogsPermissionArn() != null) sb.append("DeliverLogsPermissionArn: " + getDeliverLogsPermissionArn()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof FlowLog == false) return false; FlowLog other = (FlowLog) obj; if (other.getCreationTime() == null ^ this.getCreationTime() == null) return false; if (other.getCreationTime() != null && other.getCreationTime().equals(this.getCreationTime()) == false) return false; if (other.getFlowLogId() == null ^ this.getFlowLogId() == null) return false; if (other.getFlowLogId() != null && other.getFlowLogId().equals(this.getFlowLogId()) == false) return false; if (other.getFlowLogStatus() == null ^ this.getFlowLogStatus() == null) return false; if (other.getFlowLogStatus() != null && other.getFlowLogStatus().equals(this.getFlowLogStatus()) == false) return false; if (other.getResourceId() == null ^ this.getResourceId() == null) return false; if (other.getResourceId() != null && other.getResourceId().equals(this.getResourceId()) == false) return false; if (other.getTrafficType() == null ^ this.getTrafficType() == null) return false; if (other.getTrafficType() != null && other.getTrafficType().equals(this.getTrafficType()) == false) return false; if (other.getLogGroupName() == null ^ this.getLogGroupName() == null) return false; if (other.getLogGroupName() != null && other.getLogGroupName().equals(this.getLogGroupName()) == false) return false; if (other.getDeliverLogsStatus() == null ^ this.getDeliverLogsStatus() == null) return false; if (other.getDeliverLogsStatus() != null && other.getDeliverLogsStatus().equals( this.getDeliverLogsStatus()) == false) return false; if (other.getDeliverLogsErrorMessage() == null ^ this.getDeliverLogsErrorMessage() == null) return false; if (other.getDeliverLogsErrorMessage() != null && other.getDeliverLogsErrorMessage().equals( this.getDeliverLogsErrorMessage()) == false) return false; if (other.getDeliverLogsPermissionArn() == null ^ this.getDeliverLogsPermissionArn() == null) return false; if (other.getDeliverLogsPermissionArn() != null && other.getDeliverLogsPermissionArn().equals( this.getDeliverLogsPermissionArn()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getCreationTime() == null) ? 0 : getCreationTime() .hashCode()); hashCode = prime * hashCode + ((getFlowLogId() == null) ? 0 : getFlowLogId().hashCode()); hashCode = prime * hashCode + ((getFlowLogStatus() == null) ? 0 : getFlowLogStatus() .hashCode()); hashCode = prime * hashCode + ((getResourceId() == null) ? 0 : getResourceId().hashCode()); hashCode = prime * hashCode + ((getTrafficType() == null) ? 0 : getTrafficType().hashCode()); hashCode = prime * hashCode + ((getLogGroupName() == null) ? 0 : getLogGroupName() .hashCode()); hashCode = prime * hashCode + ((getDeliverLogsStatus() == null) ? 0 : getDeliverLogsStatus().hashCode()); hashCode = prime * hashCode + ((getDeliverLogsErrorMessage() == null) ? 0 : getDeliverLogsErrorMessage().hashCode()); hashCode = prime * hashCode + ((getDeliverLogsPermissionArn() == null) ? 0 : getDeliverLogsPermissionArn().hashCode()); return hashCode; } @Override public FlowLog clone() { try { return (FlowLog) 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