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

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

Go to download

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

There is a newer version: 1.12.772
Show newest version
/*
 * Copyright 2014-2019 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;

import com.amazonaws.AmazonWebServiceRequest;
import com.amazonaws.Request;
import com.amazonaws.services.ec2.model.transform.CreateFlowLogsRequestMarshaller;

/**
 * 
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CreateFlowLogsRequest extends AmazonWebServiceRequest implements Serializable, Cloneable, DryRunSupportedRequest {

    /**
     * 

* Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more * information, see How * to Ensure Idempotency. *

*/ private String clientToken; /** *

* The ARN for the IAM role that permits Amazon EC2 to publish flow logs to a CloudWatch Logs log group in your * account. *

*

* If you specify LogDestinationType as s3, do not specify * DeliverLogsPermissionArn or LogGroupName. *

*/ private String deliverLogsPermissionArn; /** *

* The name of a new or existing CloudWatch Logs log group where Amazon EC2 publishes your flow logs. *

*

* If you specify LogDestinationType as s3, do not specify * DeliverLogsPermissionArn or LogGroupName. *

*/ private String logGroupName; /** *

* The ID of the subnet, network interface, or VPC for which you want to create a flow log. *

*

* Constraints: Maximum of 1000 resources *

*/ private com.amazonaws.internal.SdkInternalList resourceIds; /** *

* The type of resource for which to create the flow log. For example, if you specified a VPC ID for the * ResourceId property, specify VPC for this property. *

*/ private String resourceType; /** *

* The type of traffic to log. You can log traffic that the resource accepts or rejects, or all traffic. *

*/ private String trafficType; /** *

* Specifies the type of destination to which the flow log data is to be published. Flow log data can be published * to CloudWatch Logs or Amazon S3. To publish flow log data to CloudWatch Logs, specify * cloud-watch-logs. To publish flow log data to Amazon S3, specify s3. *

*

* If you specify LogDestinationType as s3, do not specify * DeliverLogsPermissionArn or LogGroupName. *

*

* Default: cloud-watch-logs *

*/ private String logDestinationType; /** *

* Specifies the destination to which the flow log data is to be published. Flow log data can be published to a * CloudWatch Logs log group or an Amazon S3 bucket. The value specified for this parameter depends on the value * specified for LogDestinationType. *

*

* If LogDestinationType is not specified or cloud-watch-logs, specify the Amazon Resource Name (ARN) * of the CloudWatch Logs log group. *

*

* If LogDestinationType is s3, specify the ARN of the Amazon S3 bucket. You can also specify a * subfolder in the bucket. To specify a subfolder in the bucket, use the following ARN format: * bucket_ARN/subfolder_name/. For example, to specify a subfolder named my-logs in a * bucket named my-bucket, use the following ARN: arn:aws:s3:::my-bucket/my-logs/. You * cannot use AWSLogs as a subfolder name. This is a reserved term. *

*/ private String logDestination; /** *

* Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more * information, see How * to Ensure Idempotency. *

* * @param clientToken * Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more * information, see How to Ensure * Idempotency. */ public void setClientToken(String clientToken) { this.clientToken = clientToken; } /** *

* Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more * information, see How * to Ensure Idempotency. *

* * @return Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more * information, see How to Ensure * Idempotency. */ public String getClientToken() { return this.clientToken; } /** *

* Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more * information, see How * to Ensure Idempotency. *

* * @param clientToken * Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more * information, see How to Ensure * Idempotency. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateFlowLogsRequest withClientToken(String clientToken) { setClientToken(clientToken); return this; } /** *

* The ARN for the IAM role that permits Amazon EC2 to publish flow logs to a CloudWatch Logs log group in your * account. *

*

* If you specify LogDestinationType as s3, do not specify * DeliverLogsPermissionArn or LogGroupName. *

* * @param deliverLogsPermissionArn * The ARN for the IAM role that permits Amazon EC2 to publish flow logs to a CloudWatch Logs log group in * your account.

*

* If you specify LogDestinationType as s3, do not specify * DeliverLogsPermissionArn or LogGroupName. */ public void setDeliverLogsPermissionArn(String deliverLogsPermissionArn) { this.deliverLogsPermissionArn = deliverLogsPermissionArn; } /** *

* The ARN for the IAM role that permits Amazon EC2 to publish flow logs to a CloudWatch Logs log group in your * account. *

*

* If you specify LogDestinationType as s3, do not specify * DeliverLogsPermissionArn or LogGroupName. *

* * @return The ARN for the IAM role that permits Amazon EC2 to publish flow logs to a CloudWatch Logs log group in * your account.

*

* If you specify LogDestinationType as s3, do not specify * DeliverLogsPermissionArn or LogGroupName. */ public String getDeliverLogsPermissionArn() { return this.deliverLogsPermissionArn; } /** *

* The ARN for the IAM role that permits Amazon EC2 to publish flow logs to a CloudWatch Logs log group in your * account. *

*

* If you specify LogDestinationType as s3, do not specify * DeliverLogsPermissionArn or LogGroupName. *

* * @param deliverLogsPermissionArn * The ARN for the IAM role that permits Amazon EC2 to publish flow logs to a CloudWatch Logs log group in * your account.

*

* If you specify LogDestinationType as s3, do not specify * DeliverLogsPermissionArn or LogGroupName. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateFlowLogsRequest withDeliverLogsPermissionArn(String deliverLogsPermissionArn) { setDeliverLogsPermissionArn(deliverLogsPermissionArn); return this; } /** *

* The name of a new or existing CloudWatch Logs log group where Amazon EC2 publishes your flow logs. *

*

* If you specify LogDestinationType as s3, do not specify * DeliverLogsPermissionArn or LogGroupName. *

* * @param logGroupName * The name of a new or existing CloudWatch Logs log group where Amazon EC2 publishes your flow logs.

*

* If you specify LogDestinationType as s3, do not specify * DeliverLogsPermissionArn or LogGroupName. */ public void setLogGroupName(String logGroupName) { this.logGroupName = logGroupName; } /** *

* The name of a new or existing CloudWatch Logs log group where Amazon EC2 publishes your flow logs. *

*

* If you specify LogDestinationType as s3, do not specify * DeliverLogsPermissionArn or LogGroupName. *

* * @return The name of a new or existing CloudWatch Logs log group where Amazon EC2 publishes your flow logs.

*

* If you specify LogDestinationType as s3, do not specify * DeliverLogsPermissionArn or LogGroupName. */ public String getLogGroupName() { return this.logGroupName; } /** *

* The name of a new or existing CloudWatch Logs log group where Amazon EC2 publishes your flow logs. *

*

* If you specify LogDestinationType as s3, do not specify * DeliverLogsPermissionArn or LogGroupName. *

* * @param logGroupName * The name of a new or existing CloudWatch Logs log group where Amazon EC2 publishes your flow logs.

*

* If you specify LogDestinationType as s3, do not specify * DeliverLogsPermissionArn or LogGroupName. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateFlowLogsRequest withLogGroupName(String logGroupName) { setLogGroupName(logGroupName); return this; } /** *

* The ID of the subnet, network interface, or VPC for which you want to create a flow log. *

*

* Constraints: Maximum of 1000 resources *

* * @return The ID of the subnet, network interface, or VPC for which you want to create a flow log.

*

* Constraints: Maximum of 1000 resources */ public java.util.List getResourceIds() { if (resourceIds == null) { resourceIds = new com.amazonaws.internal.SdkInternalList(); } return resourceIds; } /** *

* The ID of the subnet, network interface, or VPC for which you want to create a flow log. *

*

* Constraints: Maximum of 1000 resources *

* * @param resourceIds * The ID of the subnet, network interface, or VPC for which you want to create a flow log.

*

* Constraints: Maximum of 1000 resources */ public void setResourceIds(java.util.Collection resourceIds) { if (resourceIds == null) { this.resourceIds = null; return; } this.resourceIds = new com.amazonaws.internal.SdkInternalList(resourceIds); } /** *

* The ID of the subnet, network interface, or VPC for which you want to create a flow log. *

*

* Constraints: Maximum of 1000 resources *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setResourceIds(java.util.Collection)} or {@link #withResourceIds(java.util.Collection)} if you want to * override the existing values. *

* * @param resourceIds * The ID of the subnet, network interface, or VPC for which you want to create a flow log.

*

* Constraints: Maximum of 1000 resources * @return Returns a reference to this object so that method calls can be chained together. */ public CreateFlowLogsRequest withResourceIds(String... resourceIds) { if (this.resourceIds == null) { setResourceIds(new com.amazonaws.internal.SdkInternalList(resourceIds.length)); } for (String ele : resourceIds) { this.resourceIds.add(ele); } return this; } /** *

* The ID of the subnet, network interface, or VPC for which you want to create a flow log. *

*

* Constraints: Maximum of 1000 resources *

* * @param resourceIds * The ID of the subnet, network interface, or VPC for which you want to create a flow log.

*

* Constraints: Maximum of 1000 resources * @return Returns a reference to this object so that method calls can be chained together. */ public CreateFlowLogsRequest withResourceIds(java.util.Collection resourceIds) { setResourceIds(resourceIds); return this; } /** *

* The type of resource for which to create the flow log. For example, if you specified a VPC ID for the * ResourceId property, specify VPC for this property. *

* * @param resourceType * The type of resource for which to create the flow log. For example, if you specified a VPC ID for the * ResourceId property, specify VPC for this property. * @see FlowLogsResourceType */ public void setResourceType(String resourceType) { this.resourceType = resourceType; } /** *

* The type of resource for which to create the flow log. For example, if you specified a VPC ID for the * ResourceId property, specify VPC for this property. *

* * @return The type of resource for which to create the flow log. For example, if you specified a VPC ID for the * ResourceId property, specify VPC for this property. * @see FlowLogsResourceType */ public String getResourceType() { return this.resourceType; } /** *

* The type of resource for which to create the flow log. For example, if you specified a VPC ID for the * ResourceId property, specify VPC for this property. *

* * @param resourceType * The type of resource for which to create the flow log. For example, if you specified a VPC ID for the * ResourceId property, specify VPC for this property. * @return Returns a reference to this object so that method calls can be chained together. * @see FlowLogsResourceType */ public CreateFlowLogsRequest withResourceType(String resourceType) { setResourceType(resourceType); return this; } /** *

* The type of resource for which to create the flow log. For example, if you specified a VPC ID for the * ResourceId property, specify VPC for this property. *

* * @param resourceType * The type of resource for which to create the flow log. For example, if you specified a VPC ID for the * ResourceId property, specify VPC for this property. * @see FlowLogsResourceType */ public void setResourceType(FlowLogsResourceType resourceType) { withResourceType(resourceType); } /** *

* The type of resource for which to create the flow log. For example, if you specified a VPC ID for the * ResourceId property, specify VPC for this property. *

* * @param resourceType * The type of resource for which to create the flow log. For example, if you specified a VPC ID for the * ResourceId property, specify VPC for this property. * @return Returns a reference to this object so that method calls can be chained together. * @see FlowLogsResourceType */ public CreateFlowLogsRequest withResourceType(FlowLogsResourceType resourceType) { this.resourceType = resourceType.toString(); return this; } /** *

* The type of traffic to log. You can log traffic that the resource accepts or rejects, or all traffic. *

* * @param trafficType * The type of traffic to log. You can log traffic that the resource accepts or rejects, or all traffic. * @see TrafficType */ public void setTrafficType(String trafficType) { this.trafficType = trafficType; } /** *

* The type of traffic to log. You can log traffic that the resource accepts or rejects, or all traffic. *

* * @return The type of traffic to log. You can log traffic that the resource accepts or rejects, or all traffic. * @see TrafficType */ public String getTrafficType() { return this.trafficType; } /** *

* The type of traffic to log. You can log traffic that the resource accepts or rejects, or all traffic. *

* * @param trafficType * The type of traffic to log. You can log traffic that the resource accepts or rejects, or all traffic. * @return Returns a reference to this object so that method calls can be chained together. * @see TrafficType */ public CreateFlowLogsRequest withTrafficType(String trafficType) { setTrafficType(trafficType); return this; } /** *

* The type of traffic to log. You can log traffic that the resource accepts or rejects, or all traffic. *

* * @param trafficType * The type of traffic to log. You can log traffic that the resource accepts or rejects, or all traffic. * @see TrafficType */ public void setTrafficType(TrafficType trafficType) { withTrafficType(trafficType); } /** *

* The type of traffic to log. You can log traffic that the resource accepts or rejects, or all traffic. *

* * @param trafficType * The type of traffic to log. You can log traffic that the resource accepts or rejects, or all traffic. * @return Returns a reference to this object so that method calls can be chained together. * @see TrafficType */ public CreateFlowLogsRequest withTrafficType(TrafficType trafficType) { this.trafficType = trafficType.toString(); return this; } /** *

* Specifies the type of destination to which the flow log data is to be published. Flow log data can be published * to CloudWatch Logs or Amazon S3. To publish flow log data to CloudWatch Logs, specify * cloud-watch-logs. To publish flow log data to Amazon S3, specify s3. *

*

* If you specify LogDestinationType as s3, do not specify * DeliverLogsPermissionArn or LogGroupName. *

*

* Default: cloud-watch-logs *

* * @param logDestinationType * Specifies the type of destination to which the flow log data is to be published. Flow log data can be * published to CloudWatch Logs or Amazon S3. To publish flow log data to CloudWatch Logs, specify * cloud-watch-logs. To publish flow log data to Amazon S3, specify s3.

*

* If you specify LogDestinationType as s3, do not specify * DeliverLogsPermissionArn or LogGroupName. *

*

* Default: cloud-watch-logs * @see LogDestinationType */ public void setLogDestinationType(String logDestinationType) { this.logDestinationType = logDestinationType; } /** *

* Specifies the type of destination to which the flow log data is to be published. Flow log data can be published * to CloudWatch Logs or Amazon S3. To publish flow log data to CloudWatch Logs, specify * cloud-watch-logs. To publish flow log data to Amazon S3, specify s3. *

*

* If you specify LogDestinationType as s3, do not specify * DeliverLogsPermissionArn or LogGroupName. *

*

* Default: cloud-watch-logs *

* * @return Specifies the type of destination to which the flow log data is to be published. Flow log data can be * published to CloudWatch Logs or Amazon S3. To publish flow log data to CloudWatch Logs, specify * cloud-watch-logs. To publish flow log data to Amazon S3, specify s3.

*

* If you specify LogDestinationType as s3, do not specify * DeliverLogsPermissionArn or LogGroupName. *

*

* Default: cloud-watch-logs * @see LogDestinationType */ public String getLogDestinationType() { return this.logDestinationType; } /** *

* Specifies the type of destination to which the flow log data is to be published. Flow log data can be published * to CloudWatch Logs or Amazon S3. To publish flow log data to CloudWatch Logs, specify * cloud-watch-logs. To publish flow log data to Amazon S3, specify s3. *

*

* If you specify LogDestinationType as s3, do not specify * DeliverLogsPermissionArn or LogGroupName. *

*

* Default: cloud-watch-logs *

* * @param logDestinationType * Specifies the type of destination to which the flow log data is to be published. Flow log data can be * published to CloudWatch Logs or Amazon S3. To publish flow log data to CloudWatch Logs, specify * cloud-watch-logs. To publish flow log data to Amazon S3, specify s3.

*

* If you specify LogDestinationType as s3, do not specify * DeliverLogsPermissionArn or LogGroupName. *

*

* Default: cloud-watch-logs * @return Returns a reference to this object so that method calls can be chained together. * @see LogDestinationType */ public CreateFlowLogsRequest withLogDestinationType(String logDestinationType) { setLogDestinationType(logDestinationType); return this; } /** *

* Specifies the type of destination to which the flow log data is to be published. Flow log data can be published * to CloudWatch Logs or Amazon S3. To publish flow log data to CloudWatch Logs, specify * cloud-watch-logs. To publish flow log data to Amazon S3, specify s3. *

*

* If you specify LogDestinationType as s3, do not specify * DeliverLogsPermissionArn or LogGroupName. *

*

* Default: cloud-watch-logs *

* * @param logDestinationType * Specifies the type of destination to which the flow log data is to be published. Flow log data can be * published to CloudWatch Logs or Amazon S3. To publish flow log data to CloudWatch Logs, specify * cloud-watch-logs. To publish flow log data to Amazon S3, specify s3.

*

* If you specify LogDestinationType as s3, do not specify * DeliverLogsPermissionArn or LogGroupName. *

*

* Default: cloud-watch-logs * @see LogDestinationType */ public void setLogDestinationType(LogDestinationType logDestinationType) { withLogDestinationType(logDestinationType); } /** *

* Specifies the type of destination to which the flow log data is to be published. Flow log data can be published * to CloudWatch Logs or Amazon S3. To publish flow log data to CloudWatch Logs, specify * cloud-watch-logs. To publish flow log data to Amazon S3, specify s3. *

*

* If you specify LogDestinationType as s3, do not specify * DeliverLogsPermissionArn or LogGroupName. *

*

* Default: cloud-watch-logs *

* * @param logDestinationType * Specifies the type of destination to which the flow log data is to be published. Flow log data can be * published to CloudWatch Logs or Amazon S3. To publish flow log data to CloudWatch Logs, specify * cloud-watch-logs. To publish flow log data to Amazon S3, specify s3.

*

* If you specify LogDestinationType as s3, do not specify * DeliverLogsPermissionArn or LogGroupName. *

*

* Default: cloud-watch-logs * @return Returns a reference to this object so that method calls can be chained together. * @see LogDestinationType */ public CreateFlowLogsRequest withLogDestinationType(LogDestinationType logDestinationType) { this.logDestinationType = logDestinationType.toString(); return this; } /** *

* Specifies the destination to which the flow log data is to be published. Flow log data can be published to a * CloudWatch Logs log group or an Amazon S3 bucket. The value specified for this parameter depends on the value * specified for LogDestinationType. *

*

* If LogDestinationType is not specified or cloud-watch-logs, specify the Amazon Resource Name (ARN) * of the CloudWatch Logs log group. *

*

* If LogDestinationType is s3, specify the ARN of the Amazon S3 bucket. You can also specify a * subfolder in the bucket. To specify a subfolder in the bucket, use the following ARN format: * bucket_ARN/subfolder_name/. For example, to specify a subfolder named my-logs in a * bucket named my-bucket, use the following ARN: arn:aws:s3:::my-bucket/my-logs/. You * cannot use AWSLogs as a subfolder name. This is a reserved term. *

* * @param logDestination * Specifies the destination to which the flow log data is to be published. Flow log data can be published to * a CloudWatch Logs log group or an Amazon S3 bucket. The value specified for this parameter depends on the * value specified for LogDestinationType.

*

* If LogDestinationType is not specified or cloud-watch-logs, specify the Amazon Resource Name * (ARN) of the CloudWatch Logs log group. *

*

* If LogDestinationType is s3, specify the ARN of the Amazon S3 bucket. You can also specify a * subfolder in the bucket. To specify a subfolder in the bucket, use the following ARN format: * bucket_ARN/subfolder_name/. For example, to specify a subfolder named my-logs in * a bucket named my-bucket, use the following ARN: arn:aws:s3:::my-bucket/my-logs/ * . You cannot use AWSLogs as a subfolder name. This is a reserved term. */ public void setLogDestination(String logDestination) { this.logDestination = logDestination; } /** *

* Specifies the destination to which the flow log data is to be published. Flow log data can be published to a * CloudWatch Logs log group or an Amazon S3 bucket. The value specified for this parameter depends on the value * specified for LogDestinationType. *

*

* If LogDestinationType is not specified or cloud-watch-logs, specify the Amazon Resource Name (ARN) * of the CloudWatch Logs log group. *

*

* If LogDestinationType is s3, specify the ARN of the Amazon S3 bucket. You can also specify a * subfolder in the bucket. To specify a subfolder in the bucket, use the following ARN format: * bucket_ARN/subfolder_name/. For example, to specify a subfolder named my-logs in a * bucket named my-bucket, use the following ARN: arn:aws:s3:::my-bucket/my-logs/. You * cannot use AWSLogs as a subfolder name. This is a reserved term. *

* * @return Specifies the destination to which the flow log data is to be published. Flow log data can be published * to a CloudWatch Logs log group or an Amazon S3 bucket. The value specified for this parameter depends on * the value specified for LogDestinationType.

*

* If LogDestinationType is not specified or cloud-watch-logs, specify the Amazon Resource Name * (ARN) of the CloudWatch Logs log group. *

*

* If LogDestinationType is s3, specify the ARN of the Amazon S3 bucket. You can also specify a * subfolder in the bucket. To specify a subfolder in the bucket, use the following ARN format: * bucket_ARN/subfolder_name/. For example, to specify a subfolder named my-logs * in a bucket named my-bucket, use the following ARN: * arn:aws:s3:::my-bucket/my-logs/. You cannot use AWSLogs as a subfolder name. * This is a reserved term. */ public String getLogDestination() { return this.logDestination; } /** *

* Specifies the destination to which the flow log data is to be published. Flow log data can be published to a * CloudWatch Logs log group or an Amazon S3 bucket. The value specified for this parameter depends on the value * specified for LogDestinationType. *

*

* If LogDestinationType is not specified or cloud-watch-logs, specify the Amazon Resource Name (ARN) * of the CloudWatch Logs log group. *

*

* If LogDestinationType is s3, specify the ARN of the Amazon S3 bucket. You can also specify a * subfolder in the bucket. To specify a subfolder in the bucket, use the following ARN format: * bucket_ARN/subfolder_name/. For example, to specify a subfolder named my-logs in a * bucket named my-bucket, use the following ARN: arn:aws:s3:::my-bucket/my-logs/. You * cannot use AWSLogs as a subfolder name. This is a reserved term. *

* * @param logDestination * Specifies the destination to which the flow log data is to be published. Flow log data can be published to * a CloudWatch Logs log group or an Amazon S3 bucket. The value specified for this parameter depends on the * value specified for LogDestinationType.

*

* If LogDestinationType is not specified or cloud-watch-logs, specify the Amazon Resource Name * (ARN) of the CloudWatch Logs log group. *

*

* If LogDestinationType is s3, specify the ARN of the Amazon S3 bucket. You can also specify a * subfolder in the bucket. To specify a subfolder in the bucket, use the following ARN format: * bucket_ARN/subfolder_name/. For example, to specify a subfolder named my-logs in * a bucket named my-bucket, use the following ARN: arn:aws:s3:::my-bucket/my-logs/ * . You cannot use AWSLogs as a subfolder name. This is a reserved term. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateFlowLogsRequest withLogDestination(String logDestination) { setLogDestination(logDestination); return this; } /** * This method is intended for internal use only. Returns the marshaled request configured with additional * parameters to enable operation dry-run. */ @Override public Request getDryRunRequest() { Request request = new CreateFlowLogsRequestMarshaller().marshall(this); request.addParameter("DryRun", Boolean.toString(true)); return request; } /** * 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 (getClientToken() != null) sb.append("ClientToken: ").append(getClientToken()).append(","); if (getDeliverLogsPermissionArn() != null) sb.append("DeliverLogsPermissionArn: ").append(getDeliverLogsPermissionArn()).append(","); if (getLogGroupName() != null) sb.append("LogGroupName: ").append(getLogGroupName()).append(","); if (getResourceIds() != null) sb.append("ResourceIds: ").append(getResourceIds()).append(","); if (getResourceType() != null) sb.append("ResourceType: ").append(getResourceType()).append(","); if (getTrafficType() != null) sb.append("TrafficType: ").append(getTrafficType()).append(","); if (getLogDestinationType() != null) sb.append("LogDestinationType: ").append(getLogDestinationType()).append(","); if (getLogDestination() != null) sb.append("LogDestination: ").append(getLogDestination()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateFlowLogsRequest == false) return false; CreateFlowLogsRequest other = (CreateFlowLogsRequest) obj; if (other.getClientToken() == null ^ this.getClientToken() == null) return false; if (other.getClientToken() != null && other.getClientToken().equals(this.getClientToken()) == false) return false; if (other.getDeliverLogsPermissionArn() == null ^ this.getDeliverLogsPermissionArn() == null) return false; if (other.getDeliverLogsPermissionArn() != null && other.getDeliverLogsPermissionArn().equals(this.getDeliverLogsPermissionArn()) == 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.getResourceIds() == null ^ this.getResourceIds() == null) return false; if (other.getResourceIds() != null && other.getResourceIds().equals(this.getResourceIds()) == false) return false; if (other.getResourceType() == null ^ this.getResourceType() == null) return false; if (other.getResourceType() != null && other.getResourceType().equals(this.getResourceType()) == 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.getLogDestinationType() == null ^ this.getLogDestinationType() == null) return false; if (other.getLogDestinationType() != null && other.getLogDestinationType().equals(this.getLogDestinationType()) == false) return false; if (other.getLogDestination() == null ^ this.getLogDestination() == null) return false; if (other.getLogDestination() != null && other.getLogDestination().equals(this.getLogDestination()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getClientToken() == null) ? 0 : getClientToken().hashCode()); hashCode = prime * hashCode + ((getDeliverLogsPermissionArn() == null) ? 0 : getDeliverLogsPermissionArn().hashCode()); hashCode = prime * hashCode + ((getLogGroupName() == null) ? 0 : getLogGroupName().hashCode()); hashCode = prime * hashCode + ((getResourceIds() == null) ? 0 : getResourceIds().hashCode()); hashCode = prime * hashCode + ((getResourceType() == null) ? 0 : getResourceType().hashCode()); hashCode = prime * hashCode + ((getTrafficType() == null) ? 0 : getTrafficType().hashCode()); hashCode = prime * hashCode + ((getLogDestinationType() == null) ? 0 : getLogDestinationType().hashCode()); hashCode = prime * hashCode + ((getLogDestination() == null) ? 0 : getLogDestination().hashCode()); return hashCode; } @Override public CreateFlowLogsRequest clone() { return (CreateFlowLogsRequest) super.clone(); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy