/* * 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.route53resolver.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* In the response to a CreateResolverQueryLogConfig, DeleteResolverQueryLogConfig, GetResolverQueryLogConfig, or ListResolverQueryLogConfigs request, a complex type that contains settings for one query logging configuration. *
* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ResolverQueryLogConfig implements Serializable, Cloneable, StructuredPojo { /** ** The ID for the query logging configuration. *
*/ private String id; /** ** The Amazon Web Services account ID for the account that created the query logging configuration. *
*/ private String ownerId; /** ** The status of the specified query logging configuration. Valid values include the following: *
*
* CREATING
: Resolver is creating the query logging configuration.
*
* CREATED
: The query logging configuration was successfully created. Resolver is logging queries that
* originate in the specified VPC.
*
* DELETING
: Resolver is deleting this query logging configuration.
*
* FAILED
: Resolver can't deliver logs to the location that is specified in the query logging
* configuration. Here are two common causes:
*
* The specified destination (for example, an Amazon S3 bucket) was deleted. *
** Permissions don't allow sending logs to the destination. *
** An indication of whether the query logging configuration is shared with other Amazon Web Services accounts, or * was shared with the current account by another Amazon Web Services account. Sharing is configured through * Resource Access Manager (RAM). *
*/ private String shareStatus; /** ** The number of VPCs that are associated with the query logging configuration. *
*/ private Integer associationCount; /** ** The ARN for the query logging configuration. *
*/ private String arn; /** ** The name of the query logging configuration. *
*/ private String name; /** ** The ARN of the resource that you want Resolver to send query logs: an Amazon S3 bucket, a CloudWatch Logs log * group, or a Kinesis Data Firehose delivery stream. *
*/ private String destinationArn; /** *
* A unique string that identifies the request that created the query logging configuration. The
* CreatorRequestId
allows failed requests to be retried without the risk of running the operation
* twice.
*
* The date and time that the query logging configuration was created, in Unix time format and Coordinated Universal * Time (UTC). *
*/ private String creationTime; /** ** The ID for the query logging configuration. *
* * @param id * The ID for the query logging configuration. */ public void setId(String id) { this.id = id; } /** ** The ID for the query logging configuration. *
* * @return The ID for the query logging configuration. */ public String getId() { return this.id; } /** ** The ID for the query logging configuration. *
* * @param id * The ID for the query logging configuration. * @return Returns a reference to this object so that method calls can be chained together. */ public ResolverQueryLogConfig withId(String id) { setId(id); return this; } /** ** The Amazon Web Services account ID for the account that created the query logging configuration. *
* * @param ownerId * The Amazon Web Services account ID for the account that created the query logging configuration. */ public void setOwnerId(String ownerId) { this.ownerId = ownerId; } /** ** The Amazon Web Services account ID for the account that created the query logging configuration. *
* * @return The Amazon Web Services account ID for the account that created the query logging configuration. */ public String getOwnerId() { return this.ownerId; } /** ** The Amazon Web Services account ID for the account that created the query logging configuration. *
* * @param ownerId * The Amazon Web Services account ID for the account that created the query logging configuration. * @return Returns a reference to this object so that method calls can be chained together. */ public ResolverQueryLogConfig withOwnerId(String ownerId) { setOwnerId(ownerId); return this; } /** ** The status of the specified query logging configuration. Valid values include the following: *
*
* CREATING
: Resolver is creating the query logging configuration.
*
* CREATED
: The query logging configuration was successfully created. Resolver is logging queries that
* originate in the specified VPC.
*
* DELETING
: Resolver is deleting this query logging configuration.
*
* FAILED
: Resolver can't deliver logs to the location that is specified in the query logging
* configuration. Here are two common causes:
*
* The specified destination (for example, an Amazon S3 bucket) was deleted. *
** Permissions don't allow sending logs to the destination. *
*
* CREATING
: Resolver is creating the query logging configuration.
*
* CREATED
: The query logging configuration was successfully created. Resolver is logging
* queries that originate in the specified VPC.
*
* DELETING
: Resolver is deleting this query logging configuration.
*
* FAILED
: Resolver can't deliver logs to the location that is specified in the query logging
* configuration. Here are two common causes:
*
* The specified destination (for example, an Amazon S3 bucket) was deleted. *
** Permissions don't allow sending logs to the destination. *
** The status of the specified query logging configuration. Valid values include the following: *
*
* CREATING
: Resolver is creating the query logging configuration.
*
* CREATED
: The query logging configuration was successfully created. Resolver is logging queries that
* originate in the specified VPC.
*
* DELETING
: Resolver is deleting this query logging configuration.
*
* FAILED
: Resolver can't deliver logs to the location that is specified in the query logging
* configuration. Here are two common causes:
*
* The specified destination (for example, an Amazon S3 bucket) was deleted. *
** Permissions don't allow sending logs to the destination. *
*
* CREATING
: Resolver is creating the query logging configuration.
*
* CREATED
: The query logging configuration was successfully created. Resolver is logging
* queries that originate in the specified VPC.
*
* DELETING
: Resolver is deleting this query logging configuration.
*
* FAILED
: Resolver can't deliver logs to the location that is specified in the query logging
* configuration. Here are two common causes:
*
* The specified destination (for example, an Amazon S3 bucket) was deleted. *
** Permissions don't allow sending logs to the destination. *
** The status of the specified query logging configuration. Valid values include the following: *
*
* CREATING
: Resolver is creating the query logging configuration.
*
* CREATED
: The query logging configuration was successfully created. Resolver is logging queries that
* originate in the specified VPC.
*
* DELETING
: Resolver is deleting this query logging configuration.
*
* FAILED
: Resolver can't deliver logs to the location that is specified in the query logging
* configuration. Here are two common causes:
*
* The specified destination (for example, an Amazon S3 bucket) was deleted. *
** Permissions don't allow sending logs to the destination. *
*
* CREATING
: Resolver is creating the query logging configuration.
*
* CREATED
: The query logging configuration was successfully created. Resolver is logging
* queries that originate in the specified VPC.
*
* DELETING
: Resolver is deleting this query logging configuration.
*
* FAILED
: Resolver can't deliver logs to the location that is specified in the query logging
* configuration. Here are two common causes:
*
* The specified destination (for example, an Amazon S3 bucket) was deleted. *
** Permissions don't allow sending logs to the destination. *
** The status of the specified query logging configuration. Valid values include the following: *
*
* CREATING
: Resolver is creating the query logging configuration.
*
* CREATED
: The query logging configuration was successfully created. Resolver is logging queries that
* originate in the specified VPC.
*
* DELETING
: Resolver is deleting this query logging configuration.
*
* FAILED
: Resolver can't deliver logs to the location that is specified in the query logging
* configuration. Here are two common causes:
*
* The specified destination (for example, an Amazon S3 bucket) was deleted. *
** Permissions don't allow sending logs to the destination. *
*
* CREATING
: Resolver is creating the query logging configuration.
*
* CREATED
: The query logging configuration was successfully created. Resolver is logging
* queries that originate in the specified VPC.
*
* DELETING
: Resolver is deleting this query logging configuration.
*
* FAILED
: Resolver can't deliver logs to the location that is specified in the query logging
* configuration. Here are two common causes:
*
* The specified destination (for example, an Amazon S3 bucket) was deleted. *
** Permissions don't allow sending logs to the destination. *
** An indication of whether the query logging configuration is shared with other Amazon Web Services accounts, or * was shared with the current account by another Amazon Web Services account. Sharing is configured through * Resource Access Manager (RAM). *
* * @param shareStatus * An indication of whether the query logging configuration is shared with other Amazon Web Services * accounts, or was shared with the current account by another Amazon Web Services account. Sharing is * configured through Resource Access Manager (RAM). * @see ShareStatus */ public void setShareStatus(String shareStatus) { this.shareStatus = shareStatus; } /** ** An indication of whether the query logging configuration is shared with other Amazon Web Services accounts, or * was shared with the current account by another Amazon Web Services account. Sharing is configured through * Resource Access Manager (RAM). *
* * @return An indication of whether the query logging configuration is shared with other Amazon Web Services * accounts, or was shared with the current account by another Amazon Web Services account. Sharing is * configured through Resource Access Manager (RAM). * @see ShareStatus */ public String getShareStatus() { return this.shareStatus; } /** ** An indication of whether the query logging configuration is shared with other Amazon Web Services accounts, or * was shared with the current account by another Amazon Web Services account. Sharing is configured through * Resource Access Manager (RAM). *
* * @param shareStatus * An indication of whether the query logging configuration is shared with other Amazon Web Services * accounts, or was shared with the current account by another Amazon Web Services account. Sharing is * configured through Resource Access Manager (RAM). * @return Returns a reference to this object so that method calls can be chained together. * @see ShareStatus */ public ResolverQueryLogConfig withShareStatus(String shareStatus) { setShareStatus(shareStatus); return this; } /** ** An indication of whether the query logging configuration is shared with other Amazon Web Services accounts, or * was shared with the current account by another Amazon Web Services account. Sharing is configured through * Resource Access Manager (RAM). *
* * @param shareStatus * An indication of whether the query logging configuration is shared with other Amazon Web Services * accounts, or was shared with the current account by another Amazon Web Services account. Sharing is * configured through Resource Access Manager (RAM). * @return Returns a reference to this object so that method calls can be chained together. * @see ShareStatus */ public ResolverQueryLogConfig withShareStatus(ShareStatus shareStatus) { this.shareStatus = shareStatus.toString(); return this; } /** ** The number of VPCs that are associated with the query logging configuration. *
* * @param associationCount * The number of VPCs that are associated with the query logging configuration. */ public void setAssociationCount(Integer associationCount) { this.associationCount = associationCount; } /** ** The number of VPCs that are associated with the query logging configuration. *
* * @return The number of VPCs that are associated with the query logging configuration. */ public Integer getAssociationCount() { return this.associationCount; } /** ** The number of VPCs that are associated with the query logging configuration. *
* * @param associationCount * The number of VPCs that are associated with the query logging configuration. * @return Returns a reference to this object so that method calls can be chained together. */ public ResolverQueryLogConfig withAssociationCount(Integer associationCount) { setAssociationCount(associationCount); return this; } /** ** The ARN for the query logging configuration. *
* * @param arn * The ARN for the query logging configuration. */ public void setArn(String arn) { this.arn = arn; } /** ** The ARN for the query logging configuration. *
* * @return The ARN for the query logging configuration. */ public String getArn() { return this.arn; } /** ** The ARN for the query logging configuration. *
* * @param arn * The ARN for the query logging configuration. * @return Returns a reference to this object so that method calls can be chained together. */ public ResolverQueryLogConfig withArn(String arn) { setArn(arn); return this; } /** ** The name of the query logging configuration. *
* * @param name * The name of the query logging configuration. */ public void setName(String name) { this.name = name; } /** ** The name of the query logging configuration. *
* * @return The name of the query logging configuration. */ public String getName() { return this.name; } /** ** The name of the query logging configuration. *
* * @param name * The name of the query logging configuration. * @return Returns a reference to this object so that method calls can be chained together. */ public ResolverQueryLogConfig withName(String name) { setName(name); return this; } /** ** The ARN of the resource that you want Resolver to send query logs: an Amazon S3 bucket, a CloudWatch Logs log * group, or a Kinesis Data Firehose delivery stream. *
* * @param destinationArn * The ARN of the resource that you want Resolver to send query logs: an Amazon S3 bucket, a CloudWatch Logs * log group, or a Kinesis Data Firehose delivery stream. */ public void setDestinationArn(String destinationArn) { this.destinationArn = destinationArn; } /** ** The ARN of the resource that you want Resolver to send query logs: an Amazon S3 bucket, a CloudWatch Logs log * group, or a Kinesis Data Firehose delivery stream. *
* * @return The ARN of the resource that you want Resolver to send query logs: an Amazon S3 bucket, a CloudWatch Logs * log group, or a Kinesis Data Firehose delivery stream. */ public String getDestinationArn() { return this.destinationArn; } /** ** The ARN of the resource that you want Resolver to send query logs: an Amazon S3 bucket, a CloudWatch Logs log * group, or a Kinesis Data Firehose delivery stream. *
* * @param destinationArn * The ARN of the resource that you want Resolver to send query logs: an Amazon S3 bucket, a CloudWatch Logs * log group, or a Kinesis Data Firehose delivery stream. * @return Returns a reference to this object so that method calls can be chained together. */ public ResolverQueryLogConfig withDestinationArn(String destinationArn) { setDestinationArn(destinationArn); return this; } /** *
* A unique string that identifies the request that created the query logging configuration. The
* CreatorRequestId
allows failed requests to be retried without the risk of running the operation
* twice.
*
CreatorRequestId
allows failed requests to be retried without the risk of running the
* operation twice.
*/
public void setCreatorRequestId(String creatorRequestId) {
this.creatorRequestId = creatorRequestId;
}
/**
*
* A unique string that identifies the request that created the query logging configuration. The
* CreatorRequestId
allows failed requests to be retried without the risk of running the operation
* twice.
*
CreatorRequestId
allows failed requests to be retried without the risk of running the
* operation twice.
*/
public String getCreatorRequestId() {
return this.creatorRequestId;
}
/**
*
* A unique string that identifies the request that created the query logging configuration. The
* CreatorRequestId
allows failed requests to be retried without the risk of running the operation
* twice.
*
CreatorRequestId
allows failed requests to be retried without the risk of running the
* operation twice.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ResolverQueryLogConfig withCreatorRequestId(String creatorRequestId) {
setCreatorRequestId(creatorRequestId);
return this;
}
/**
* * The date and time that the query logging configuration was created, in Unix time format and Coordinated Universal * Time (UTC). *
* * @param creationTime * The date and time that the query logging configuration was created, in Unix time format and Coordinated * Universal Time (UTC). */ public void setCreationTime(String creationTime) { this.creationTime = creationTime; } /** ** The date and time that the query logging configuration was created, in Unix time format and Coordinated Universal * Time (UTC). *
* * @return The date and time that the query logging configuration was created, in Unix time format and Coordinated * Universal Time (UTC). */ public String getCreationTime() { return this.creationTime; } /** ** The date and time that the query logging configuration was created, in Unix time format and Coordinated Universal * Time (UTC). *
* * @param creationTime * The date and time that the query logging configuration was created, in Unix time format and Coordinated * Universal Time (UTC). * @return Returns a reference to this object so that method calls can be chained together. */ public ResolverQueryLogConfig withCreationTime(String creationTime) { setCreationTime(creationTime); 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 (getId() != null) sb.append("Id: ").append(getId()).append(","); if (getOwnerId() != null) sb.append("OwnerId: ").append(getOwnerId()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getShareStatus() != null) sb.append("ShareStatus: ").append(getShareStatus()).append(","); if (getAssociationCount() != null) sb.append("AssociationCount: ").append(getAssociationCount()).append(","); if (getArn() != null) sb.append("Arn: ").append(getArn()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getDestinationArn() != null) sb.append("DestinationArn: ").append(getDestinationArn()).append(","); if (getCreatorRequestId() != null) sb.append("CreatorRequestId: ").append(getCreatorRequestId()).append(","); if (getCreationTime() != null) sb.append("CreationTime: ").append(getCreationTime()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ResolverQueryLogConfig == false) return false; ResolverQueryLogConfig other = (ResolverQueryLogConfig) obj; if (other.getId() == null ^ this.getId() == null) return false; if (other.getId() != null && other.getId().equals(this.getId()) == false) return false; if (other.getOwnerId() == null ^ this.getOwnerId() == null) return false; if (other.getOwnerId() != null && other.getOwnerId().equals(this.getOwnerId()) == 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.getShareStatus() == null ^ this.getShareStatus() == null) return false; if (other.getShareStatus() != null && other.getShareStatus().equals(this.getShareStatus()) == false) return false; if (other.getAssociationCount() == null ^ this.getAssociationCount() == null) return false; if (other.getAssociationCount() != null && other.getAssociationCount().equals(this.getAssociationCount()) == false) return false; if (other.getArn() == null ^ this.getArn() == null) return false; if (other.getArn() != null && other.getArn().equals(this.getArn()) == false) return false; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getDestinationArn() == null ^ this.getDestinationArn() == null) return false; if (other.getDestinationArn() != null && other.getDestinationArn().equals(this.getDestinationArn()) == false) return false; if (other.getCreatorRequestId() == null ^ this.getCreatorRequestId() == null) return false; if (other.getCreatorRequestId() != null && other.getCreatorRequestId().equals(this.getCreatorRequestId()) == false) return false; if (other.getCreationTime() == null ^ this.getCreationTime() == null) return false; if (other.getCreationTime() != null && other.getCreationTime().equals(this.getCreationTime()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode()); hashCode = prime * hashCode + ((getOwnerId() == null) ? 0 : getOwnerId().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getShareStatus() == null) ? 0 : getShareStatus().hashCode()); hashCode = prime * hashCode + ((getAssociationCount() == null) ? 0 : getAssociationCount().hashCode()); hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getDestinationArn() == null) ? 0 : getDestinationArn().hashCode()); hashCode = prime * hashCode + ((getCreatorRequestId() == null) ? 0 : getCreatorRequestId().hashCode()); hashCode = prime * hashCode + ((getCreationTime() == null) ? 0 : getCreationTime().hashCode()); return hashCode; } @Override public ResolverQueryLogConfig clone() { try { return (ResolverQueryLogConfig) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.route53resolver.model.transform.ResolverQueryLogConfigMarshaller.getInstance().marshall(this, protocolMarshaller); } }