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

com.amazonaws.services.athena.model.WorkGroupConfiguration Maven / Gradle / Ivy

Go to download

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

There is a newer version: 1.12.780
Show newest version
/*
 * Copyright 2016-2021 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.athena.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* The configuration of the workgroup, which includes the location in Amazon S3 where query results are stored, the * encryption option, if any, used for query results, whether the Amazon CloudWatch Metrics are enabled for the * workgroup and whether workgroup settings override query settings, and the data usage limits for the amount of data * scanned per query or per workgroup. The workgroup settings override is specified in EnforceWorkGroupConfiguration * (true/false) in the WorkGroupConfiguration. See WorkGroupConfiguration$EnforceWorkGroupConfiguration. *

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

* The configuration for the workgroup, which includes the location in Amazon S3 where query results are stored and * the encryption option, if any, used for query results. To run the query, you must specify the query results * location using one of the ways: either in the workgroup using this setting, or for individual queries * (client-side), using ResultConfiguration$OutputLocation. If none of them is set, Athena issues an error * that no output location is provided. For more information, see Query Results. *

*/ private ResultConfiguration resultConfiguration; /** *

* If set to "true", the settings for the workgroup override client-side settings. If set to "false", client-side * settings are used. For more information, see Workgroup Settings Override * Client-Side Settings. *

*/ private Boolean enforceWorkGroupConfiguration; /** *

* Indicates that the Amazon CloudWatch metrics are enabled for the workgroup. *

*/ private Boolean publishCloudWatchMetricsEnabled; /** *

* The upper data usage limit (cutoff) for the amount of bytes a single query in a workgroup is allowed to scan. *

*/ private Long bytesScannedCutoffPerQuery; /** *

* If set to true, allows members assigned to a workgroup to reference Amazon S3 Requester Pays buckets * in queries. If set to false, workgroup members cannot query data from Requester Pays buckets, and * queries that retrieve data from Requester Pays buckets cause an error. The default is false. For * more information about Requester Pays buckets, see Requester Pays Buckets in * the Amazon Simple Storage Service Developer Guide. *

*/ private Boolean requesterPaysEnabled; /** *

* The engine version that all queries running on the workgroup use. Queries on the * AmazonAthenaPreviewFunctionality workgroup run on the preview engine regardless of this setting. *

*/ private EngineVersion engineVersion; /** *

* The configuration for the workgroup, which includes the location in Amazon S3 where query results are stored and * the encryption option, if any, used for query results. To run the query, you must specify the query results * location using one of the ways: either in the workgroup using this setting, or for individual queries * (client-side), using ResultConfiguration$OutputLocation. If none of them is set, Athena issues an error * that no output location is provided. For more information, see Query Results. *

* * @param resultConfiguration * The configuration for the workgroup, which includes the location in Amazon S3 where query results are * stored and the encryption option, if any, used for query results. To run the query, you must specify the * query results location using one of the ways: either in the workgroup using this setting, or for * individual queries (client-side), using ResultConfiguration$OutputLocation. If none of them is set, * Athena issues an error that no output location is provided. For more information, see Query Results. */ public void setResultConfiguration(ResultConfiguration resultConfiguration) { this.resultConfiguration = resultConfiguration; } /** *

* The configuration for the workgroup, which includes the location in Amazon S3 where query results are stored and * the encryption option, if any, used for query results. To run the query, you must specify the query results * location using one of the ways: either in the workgroup using this setting, or for individual queries * (client-side), using ResultConfiguration$OutputLocation. If none of them is set, Athena issues an error * that no output location is provided. For more information, see Query Results. *

* * @return The configuration for the workgroup, which includes the location in Amazon S3 where query results are * stored and the encryption option, if any, used for query results. To run the query, you must specify the * query results location using one of the ways: either in the workgroup using this setting, or for * individual queries (client-side), using ResultConfiguration$OutputLocation. If none of them is * set, Athena issues an error that no output location is provided. For more information, see Query Results. */ public ResultConfiguration getResultConfiguration() { return this.resultConfiguration; } /** *

* The configuration for the workgroup, which includes the location in Amazon S3 where query results are stored and * the encryption option, if any, used for query results. To run the query, you must specify the query results * location using one of the ways: either in the workgroup using this setting, or for individual queries * (client-side), using ResultConfiguration$OutputLocation. If none of them is set, Athena issues an error * that no output location is provided. For more information, see Query Results. *

* * @param resultConfiguration * The configuration for the workgroup, which includes the location in Amazon S3 where query results are * stored and the encryption option, if any, used for query results. To run the query, you must specify the * query results location using one of the ways: either in the workgroup using this setting, or for * individual queries (client-side), using ResultConfiguration$OutputLocation. If none of them is set, * Athena issues an error that no output location is provided. For more information, see Query Results. * @return Returns a reference to this object so that method calls can be chained together. */ public WorkGroupConfiguration withResultConfiguration(ResultConfiguration resultConfiguration) { setResultConfiguration(resultConfiguration); return this; } /** *

* If set to "true", the settings for the workgroup override client-side settings. If set to "false", client-side * settings are used. For more information, see Workgroup Settings Override * Client-Side Settings. *

* * @param enforceWorkGroupConfiguration * If set to "true", the settings for the workgroup override client-side settings. If set to "false", * client-side settings are used. For more information, see Workgroup Settings * Override Client-Side Settings. */ public void setEnforceWorkGroupConfiguration(Boolean enforceWorkGroupConfiguration) { this.enforceWorkGroupConfiguration = enforceWorkGroupConfiguration; } /** *

* If set to "true", the settings for the workgroup override client-side settings. If set to "false", client-side * settings are used. For more information, see Workgroup Settings Override * Client-Side Settings. *

* * @return If set to "true", the settings for the workgroup override client-side settings. If set to "false", * client-side settings are used. For more information, see Workgroup Settings * Override Client-Side Settings. */ public Boolean getEnforceWorkGroupConfiguration() { return this.enforceWorkGroupConfiguration; } /** *

* If set to "true", the settings for the workgroup override client-side settings. If set to "false", client-side * settings are used. For more information, see Workgroup Settings Override * Client-Side Settings. *

* * @param enforceWorkGroupConfiguration * If set to "true", the settings for the workgroup override client-side settings. If set to "false", * client-side settings are used. For more information, see Workgroup Settings * Override Client-Side Settings. * @return Returns a reference to this object so that method calls can be chained together. */ public WorkGroupConfiguration withEnforceWorkGroupConfiguration(Boolean enforceWorkGroupConfiguration) { setEnforceWorkGroupConfiguration(enforceWorkGroupConfiguration); return this; } /** *

* If set to "true", the settings for the workgroup override client-side settings. If set to "false", client-side * settings are used. For more information, see Workgroup Settings Override * Client-Side Settings. *

* * @return If set to "true", the settings for the workgroup override client-side settings. If set to "false", * client-side settings are used. For more information, see Workgroup Settings * Override Client-Side Settings. */ public Boolean isEnforceWorkGroupConfiguration() { return this.enforceWorkGroupConfiguration; } /** *

* Indicates that the Amazon CloudWatch metrics are enabled for the workgroup. *

* * @param publishCloudWatchMetricsEnabled * Indicates that the Amazon CloudWatch metrics are enabled for the workgroup. */ public void setPublishCloudWatchMetricsEnabled(Boolean publishCloudWatchMetricsEnabled) { this.publishCloudWatchMetricsEnabled = publishCloudWatchMetricsEnabled; } /** *

* Indicates that the Amazon CloudWatch metrics are enabled for the workgroup. *

* * @return Indicates that the Amazon CloudWatch metrics are enabled for the workgroup. */ public Boolean getPublishCloudWatchMetricsEnabled() { return this.publishCloudWatchMetricsEnabled; } /** *

* Indicates that the Amazon CloudWatch metrics are enabled for the workgroup. *

* * @param publishCloudWatchMetricsEnabled * Indicates that the Amazon CloudWatch metrics are enabled for the workgroup. * @return Returns a reference to this object so that method calls can be chained together. */ public WorkGroupConfiguration withPublishCloudWatchMetricsEnabled(Boolean publishCloudWatchMetricsEnabled) { setPublishCloudWatchMetricsEnabled(publishCloudWatchMetricsEnabled); return this; } /** *

* Indicates that the Amazon CloudWatch metrics are enabled for the workgroup. *

* * @return Indicates that the Amazon CloudWatch metrics are enabled for the workgroup. */ public Boolean isPublishCloudWatchMetricsEnabled() { return this.publishCloudWatchMetricsEnabled; } /** *

* The upper data usage limit (cutoff) for the amount of bytes a single query in a workgroup is allowed to scan. *

* * @param bytesScannedCutoffPerQuery * The upper data usage limit (cutoff) for the amount of bytes a single query in a workgroup is allowed to * scan. */ public void setBytesScannedCutoffPerQuery(Long bytesScannedCutoffPerQuery) { this.bytesScannedCutoffPerQuery = bytesScannedCutoffPerQuery; } /** *

* The upper data usage limit (cutoff) for the amount of bytes a single query in a workgroup is allowed to scan. *

* * @return The upper data usage limit (cutoff) for the amount of bytes a single query in a workgroup is allowed to * scan. */ public Long getBytesScannedCutoffPerQuery() { return this.bytesScannedCutoffPerQuery; } /** *

* The upper data usage limit (cutoff) for the amount of bytes a single query in a workgroup is allowed to scan. *

* * @param bytesScannedCutoffPerQuery * The upper data usage limit (cutoff) for the amount of bytes a single query in a workgroup is allowed to * scan. * @return Returns a reference to this object so that method calls can be chained together. */ public WorkGroupConfiguration withBytesScannedCutoffPerQuery(Long bytesScannedCutoffPerQuery) { setBytesScannedCutoffPerQuery(bytesScannedCutoffPerQuery); return this; } /** *

* If set to true, allows members assigned to a workgroup to reference Amazon S3 Requester Pays buckets * in queries. If set to false, workgroup members cannot query data from Requester Pays buckets, and * queries that retrieve data from Requester Pays buckets cause an error. The default is false. For * more information about Requester Pays buckets, see Requester Pays Buckets in * the Amazon Simple Storage Service Developer Guide. *

* * @param requesterPaysEnabled * If set to true, allows members assigned to a workgroup to reference Amazon S3 Requester Pays * buckets in queries. If set to false, workgroup members cannot query data from Requester Pays * buckets, and queries that retrieve data from Requester Pays buckets cause an error. The default is * false. For more information about Requester Pays buckets, see Requester Pays * Buckets in the Amazon Simple Storage Service Developer Guide. */ public void setRequesterPaysEnabled(Boolean requesterPaysEnabled) { this.requesterPaysEnabled = requesterPaysEnabled; } /** *

* If set to true, allows members assigned to a workgroup to reference Amazon S3 Requester Pays buckets * in queries. If set to false, workgroup members cannot query data from Requester Pays buckets, and * queries that retrieve data from Requester Pays buckets cause an error. The default is false. For * more information about Requester Pays buckets, see Requester Pays Buckets in * the Amazon Simple Storage Service Developer Guide. *

* * @return If set to true, allows members assigned to a workgroup to reference Amazon S3 Requester Pays * buckets in queries. If set to false, workgroup members cannot query data from Requester Pays * buckets, and queries that retrieve data from Requester Pays buckets cause an error. The default is * false. For more information about Requester Pays buckets, see Requester Pays * Buckets in the Amazon Simple Storage Service Developer Guide. */ public Boolean getRequesterPaysEnabled() { return this.requesterPaysEnabled; } /** *

* If set to true, allows members assigned to a workgroup to reference Amazon S3 Requester Pays buckets * in queries. If set to false, workgroup members cannot query data from Requester Pays buckets, and * queries that retrieve data from Requester Pays buckets cause an error. The default is false. For * more information about Requester Pays buckets, see Requester Pays Buckets in * the Amazon Simple Storage Service Developer Guide. *

* * @param requesterPaysEnabled * If set to true, allows members assigned to a workgroup to reference Amazon S3 Requester Pays * buckets in queries. If set to false, workgroup members cannot query data from Requester Pays * buckets, and queries that retrieve data from Requester Pays buckets cause an error. The default is * false. For more information about Requester Pays buckets, see Requester Pays * Buckets in the Amazon Simple Storage Service Developer Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public WorkGroupConfiguration withRequesterPaysEnabled(Boolean requesterPaysEnabled) { setRequesterPaysEnabled(requesterPaysEnabled); return this; } /** *

* If set to true, allows members assigned to a workgroup to reference Amazon S3 Requester Pays buckets * in queries. If set to false, workgroup members cannot query data from Requester Pays buckets, and * queries that retrieve data from Requester Pays buckets cause an error. The default is false. For * more information about Requester Pays buckets, see Requester Pays Buckets in * the Amazon Simple Storage Service Developer Guide. *

* * @return If set to true, allows members assigned to a workgroup to reference Amazon S3 Requester Pays * buckets in queries. If set to false, workgroup members cannot query data from Requester Pays * buckets, and queries that retrieve data from Requester Pays buckets cause an error. The default is * false. For more information about Requester Pays buckets, see Requester Pays * Buckets in the Amazon Simple Storage Service Developer Guide. */ public Boolean isRequesterPaysEnabled() { return this.requesterPaysEnabled; } /** *

* The engine version that all queries running on the workgroup use. Queries on the * AmazonAthenaPreviewFunctionality workgroup run on the preview engine regardless of this setting. *

* * @param engineVersion * The engine version that all queries running on the workgroup use. Queries on the * AmazonAthenaPreviewFunctionality workgroup run on the preview engine regardless of this * setting. */ public void setEngineVersion(EngineVersion engineVersion) { this.engineVersion = engineVersion; } /** *

* The engine version that all queries running on the workgroup use. Queries on the * AmazonAthenaPreviewFunctionality workgroup run on the preview engine regardless of this setting. *

* * @return The engine version that all queries running on the workgroup use. Queries on the * AmazonAthenaPreviewFunctionality workgroup run on the preview engine regardless of this * setting. */ public EngineVersion getEngineVersion() { return this.engineVersion; } /** *

* The engine version that all queries running on the workgroup use. Queries on the * AmazonAthenaPreviewFunctionality workgroup run on the preview engine regardless of this setting. *

* * @param engineVersion * The engine version that all queries running on the workgroup use. Queries on the * AmazonAthenaPreviewFunctionality workgroup run on the preview engine regardless of this * setting. * @return Returns a reference to this object so that method calls can be chained together. */ public WorkGroupConfiguration withEngineVersion(EngineVersion engineVersion) { setEngineVersion(engineVersion); 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 (getResultConfiguration() != null) sb.append("ResultConfiguration: ").append(getResultConfiguration()).append(","); if (getEnforceWorkGroupConfiguration() != null) sb.append("EnforceWorkGroupConfiguration: ").append(getEnforceWorkGroupConfiguration()).append(","); if (getPublishCloudWatchMetricsEnabled() != null) sb.append("PublishCloudWatchMetricsEnabled: ").append(getPublishCloudWatchMetricsEnabled()).append(","); if (getBytesScannedCutoffPerQuery() != null) sb.append("BytesScannedCutoffPerQuery: ").append(getBytesScannedCutoffPerQuery()).append(","); if (getRequesterPaysEnabled() != null) sb.append("RequesterPaysEnabled: ").append(getRequesterPaysEnabled()).append(","); if (getEngineVersion() != null) sb.append("EngineVersion: ").append(getEngineVersion()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof WorkGroupConfiguration == false) return false; WorkGroupConfiguration other = (WorkGroupConfiguration) obj; if (other.getResultConfiguration() == null ^ this.getResultConfiguration() == null) return false; if (other.getResultConfiguration() != null && other.getResultConfiguration().equals(this.getResultConfiguration()) == false) return false; if (other.getEnforceWorkGroupConfiguration() == null ^ this.getEnforceWorkGroupConfiguration() == null) return false; if (other.getEnforceWorkGroupConfiguration() != null && other.getEnforceWorkGroupConfiguration().equals(this.getEnforceWorkGroupConfiguration()) == false) return false; if (other.getPublishCloudWatchMetricsEnabled() == null ^ this.getPublishCloudWatchMetricsEnabled() == null) return false; if (other.getPublishCloudWatchMetricsEnabled() != null && other.getPublishCloudWatchMetricsEnabled().equals(this.getPublishCloudWatchMetricsEnabled()) == false) return false; if (other.getBytesScannedCutoffPerQuery() == null ^ this.getBytesScannedCutoffPerQuery() == null) return false; if (other.getBytesScannedCutoffPerQuery() != null && other.getBytesScannedCutoffPerQuery().equals(this.getBytesScannedCutoffPerQuery()) == false) return false; if (other.getRequesterPaysEnabled() == null ^ this.getRequesterPaysEnabled() == null) return false; if (other.getRequesterPaysEnabled() != null && other.getRequesterPaysEnabled().equals(this.getRequesterPaysEnabled()) == false) return false; if (other.getEngineVersion() == null ^ this.getEngineVersion() == null) return false; if (other.getEngineVersion() != null && other.getEngineVersion().equals(this.getEngineVersion()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getResultConfiguration() == null) ? 0 : getResultConfiguration().hashCode()); hashCode = prime * hashCode + ((getEnforceWorkGroupConfiguration() == null) ? 0 : getEnforceWorkGroupConfiguration().hashCode()); hashCode = prime * hashCode + ((getPublishCloudWatchMetricsEnabled() == null) ? 0 : getPublishCloudWatchMetricsEnabled().hashCode()); hashCode = prime * hashCode + ((getBytesScannedCutoffPerQuery() == null) ? 0 : getBytesScannedCutoffPerQuery().hashCode()); hashCode = prime * hashCode + ((getRequesterPaysEnabled() == null) ? 0 : getRequesterPaysEnabled().hashCode()); hashCode = prime * hashCode + ((getEngineVersion() == null) ? 0 : getEngineVersion().hashCode()); return hashCode; } @Override public WorkGroupConfiguration clone() { try { return (WorkGroupConfiguration) 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.athena.model.transform.WorkGroupConfigurationMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy