com.amazonaws.services.forecast.model.CreateDatasetRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-forecast Show documentation
/*
* Copyright 2015-2020 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.forecast.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
/**
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CreateDatasetRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* A name for the dataset.
*
*/
private String datasetName;
/**
*
* The domain associated with the dataset. When you add a dataset to a dataset group, this value and the value
* specified for the Domain
parameter of the CreateDatasetGroup operation must match.
*
*
* The Domain
and DatasetType
that you choose determine the fields that must be present in
* the training data that you import to the dataset. For example, if you choose the RETAIL
domain and
* TARGET_TIME_SERIES
as the DatasetType
, Amazon Forecast requires item_id
,
* timestamp
, and demand
fields to be present in your data. For more information, see
* howitworks-datasets-groups.
*
*/
private String domain;
/**
*
* The dataset type. Valid values depend on the chosen Domain
.
*
*/
private String datasetType;
/**
*
* The frequency of data collection. This parameter is required for RELATED_TIME_SERIES datasets.
*
*
* Valid intervals are Y (Year), M (Month), W (Week), D (Day), H (Hour), 30min (30 minutes), 15min (15 minutes),
* 10min (10 minutes), 5min (5 minutes), and 1min (1 minute). For example, "D" indicates every day and "15min"
* indicates every 15 minutes.
*
*/
private String dataFrequency;
/**
*
* The schema for the dataset. The schema attributes and their order must match the fields in your data. The dataset
* Domain
and DatasetType
that you choose determine the minimum required fields in your
* training data. For information about the required fields for a specific dataset domain and type, see
* howitworks-domains-ds-types.
*
*/
private Schema schema;
/**
*
* An AWS Key Management Service (KMS) key and the AWS Identity and Access Management (IAM) role that Amazon
* Forecast can assume to access the key.
*
*/
private EncryptionConfig encryptionConfig;
/**
*
* A name for the dataset.
*
*
* @param datasetName
* A name for the dataset.
*/
public void setDatasetName(String datasetName) {
this.datasetName = datasetName;
}
/**
*
* A name for the dataset.
*
*
* @return A name for the dataset.
*/
public String getDatasetName() {
return this.datasetName;
}
/**
*
* A name for the dataset.
*
*
* @param datasetName
* A name for the dataset.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDatasetRequest withDatasetName(String datasetName) {
setDatasetName(datasetName);
return this;
}
/**
*
* The domain associated with the dataset. When you add a dataset to a dataset group, this value and the value
* specified for the Domain
parameter of the CreateDatasetGroup operation must match.
*
*
* The Domain
and DatasetType
that you choose determine the fields that must be present in
* the training data that you import to the dataset. For example, if you choose the RETAIL
domain and
* TARGET_TIME_SERIES
as the DatasetType
, Amazon Forecast requires item_id
,
* timestamp
, and demand
fields to be present in your data. For more information, see
* howitworks-datasets-groups.
*
*
* @param domain
* The domain associated with the dataset. When you add a dataset to a dataset group, this value and the
* value specified for the Domain
parameter of the CreateDatasetGroup operation must
* match.
*
* The Domain
and DatasetType
that you choose determine the fields that must be
* present in the training data that you import to the dataset. For example, if you choose the
* RETAIL
domain and TARGET_TIME_SERIES
as the DatasetType
, Amazon
* Forecast requires item_id
, timestamp
, and demand
fields to be
* present in your data. For more information, see howitworks-datasets-groups.
* @see Domain
*/
public void setDomain(String domain) {
this.domain = domain;
}
/**
*
* The domain associated with the dataset. When you add a dataset to a dataset group, this value and the value
* specified for the Domain
parameter of the CreateDatasetGroup operation must match.
*
*
* The Domain
and DatasetType
that you choose determine the fields that must be present in
* the training data that you import to the dataset. For example, if you choose the RETAIL
domain and
* TARGET_TIME_SERIES
as the DatasetType
, Amazon Forecast requires item_id
,
* timestamp
, and demand
fields to be present in your data. For more information, see
* howitworks-datasets-groups.
*
*
* @return The domain associated with the dataset. When you add a dataset to a dataset group, this value and the
* value specified for the Domain
parameter of the CreateDatasetGroup operation must
* match.
*
* The Domain
and DatasetType
that you choose determine the fields that must be
* present in the training data that you import to the dataset. For example, if you choose the
* RETAIL
domain and TARGET_TIME_SERIES
as the DatasetType
, Amazon
* Forecast requires item_id
, timestamp
, and demand
fields to be
* present in your data. For more information, see howitworks-datasets-groups.
* @see Domain
*/
public String getDomain() {
return this.domain;
}
/**
*
* The domain associated with the dataset. When you add a dataset to a dataset group, this value and the value
* specified for the Domain
parameter of the CreateDatasetGroup operation must match.
*
*
* The Domain
and DatasetType
that you choose determine the fields that must be present in
* the training data that you import to the dataset. For example, if you choose the RETAIL
domain and
* TARGET_TIME_SERIES
as the DatasetType
, Amazon Forecast requires item_id
,
* timestamp
, and demand
fields to be present in your data. For more information, see
* howitworks-datasets-groups.
*
*
* @param domain
* The domain associated with the dataset. When you add a dataset to a dataset group, this value and the
* value specified for the Domain
parameter of the CreateDatasetGroup operation must
* match.
*
* The Domain
and DatasetType
that you choose determine the fields that must be
* present in the training data that you import to the dataset. For example, if you choose the
* RETAIL
domain and TARGET_TIME_SERIES
as the DatasetType
, Amazon
* Forecast requires item_id
, timestamp
, and demand
fields to be
* present in your data. For more information, see howitworks-datasets-groups.
* @return Returns a reference to this object so that method calls can be chained together.
* @see Domain
*/
public CreateDatasetRequest withDomain(String domain) {
setDomain(domain);
return this;
}
/**
*
* The domain associated with the dataset. When you add a dataset to a dataset group, this value and the value
* specified for the Domain
parameter of the CreateDatasetGroup operation must match.
*
*
* The Domain
and DatasetType
that you choose determine the fields that must be present in
* the training data that you import to the dataset. For example, if you choose the RETAIL
domain and
* TARGET_TIME_SERIES
as the DatasetType
, Amazon Forecast requires item_id
,
* timestamp
, and demand
fields to be present in your data. For more information, see
* howitworks-datasets-groups.
*
*
* @param domain
* The domain associated with the dataset. When you add a dataset to a dataset group, this value and the
* value specified for the Domain
parameter of the CreateDatasetGroup operation must
* match.
*
* The Domain
and DatasetType
that you choose determine the fields that must be
* present in the training data that you import to the dataset. For example, if you choose the
* RETAIL
domain and TARGET_TIME_SERIES
as the DatasetType
, Amazon
* Forecast requires item_id
, timestamp
, and demand
fields to be
* present in your data. For more information, see howitworks-datasets-groups.
* @return Returns a reference to this object so that method calls can be chained together.
* @see Domain
*/
public CreateDatasetRequest withDomain(Domain domain) {
this.domain = domain.toString();
return this;
}
/**
*
* The dataset type. Valid values depend on the chosen Domain
.
*
*
* @param datasetType
* The dataset type. Valid values depend on the chosen Domain
.
* @see DatasetType
*/
public void setDatasetType(String datasetType) {
this.datasetType = datasetType;
}
/**
*
* The dataset type. Valid values depend on the chosen Domain
.
*
*
* @return The dataset type. Valid values depend on the chosen Domain
.
* @see DatasetType
*/
public String getDatasetType() {
return this.datasetType;
}
/**
*
* The dataset type. Valid values depend on the chosen Domain
.
*
*
* @param datasetType
* The dataset type. Valid values depend on the chosen Domain
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see DatasetType
*/
public CreateDatasetRequest withDatasetType(String datasetType) {
setDatasetType(datasetType);
return this;
}
/**
*
* The dataset type. Valid values depend on the chosen Domain
.
*
*
* @param datasetType
* The dataset type. Valid values depend on the chosen Domain
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see DatasetType
*/
public CreateDatasetRequest withDatasetType(DatasetType datasetType) {
this.datasetType = datasetType.toString();
return this;
}
/**
*
* The frequency of data collection. This parameter is required for RELATED_TIME_SERIES datasets.
*
*
* Valid intervals are Y (Year), M (Month), W (Week), D (Day), H (Hour), 30min (30 minutes), 15min (15 minutes),
* 10min (10 minutes), 5min (5 minutes), and 1min (1 minute). For example, "D" indicates every day and "15min"
* indicates every 15 minutes.
*
*
* @param dataFrequency
* The frequency of data collection. This parameter is required for RELATED_TIME_SERIES datasets.
*
* Valid intervals are Y (Year), M (Month), W (Week), D (Day), H (Hour), 30min (30 minutes), 15min (15
* minutes), 10min (10 minutes), 5min (5 minutes), and 1min (1 minute). For example, "D" indicates every day
* and "15min" indicates every 15 minutes.
*/
public void setDataFrequency(String dataFrequency) {
this.dataFrequency = dataFrequency;
}
/**
*
* The frequency of data collection. This parameter is required for RELATED_TIME_SERIES datasets.
*
*
* Valid intervals are Y (Year), M (Month), W (Week), D (Day), H (Hour), 30min (30 minutes), 15min (15 minutes),
* 10min (10 minutes), 5min (5 minutes), and 1min (1 minute). For example, "D" indicates every day and "15min"
* indicates every 15 minutes.
*
*
* @return The frequency of data collection. This parameter is required for RELATED_TIME_SERIES datasets.
*
* Valid intervals are Y (Year), M (Month), W (Week), D (Day), H (Hour), 30min (30 minutes), 15min (15
* minutes), 10min (10 minutes), 5min (5 minutes), and 1min (1 minute). For example, "D" indicates every day
* and "15min" indicates every 15 minutes.
*/
public String getDataFrequency() {
return this.dataFrequency;
}
/**
*
* The frequency of data collection. This parameter is required for RELATED_TIME_SERIES datasets.
*
*
* Valid intervals are Y (Year), M (Month), W (Week), D (Day), H (Hour), 30min (30 minutes), 15min (15 minutes),
* 10min (10 minutes), 5min (5 minutes), and 1min (1 minute). For example, "D" indicates every day and "15min"
* indicates every 15 minutes.
*
*
* @param dataFrequency
* The frequency of data collection. This parameter is required for RELATED_TIME_SERIES datasets.
*
* Valid intervals are Y (Year), M (Month), W (Week), D (Day), H (Hour), 30min (30 minutes), 15min (15
* minutes), 10min (10 minutes), 5min (5 minutes), and 1min (1 minute). For example, "D" indicates every day
* and "15min" indicates every 15 minutes.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDatasetRequest withDataFrequency(String dataFrequency) {
setDataFrequency(dataFrequency);
return this;
}
/**
*
* The schema for the dataset. The schema attributes and their order must match the fields in your data. The dataset
* Domain
and DatasetType
that you choose determine the minimum required fields in your
* training data. For information about the required fields for a specific dataset domain and type, see
* howitworks-domains-ds-types.
*
*
* @param schema
* The schema for the dataset. The schema attributes and their order must match the fields in your data. The
* dataset Domain
and DatasetType
that you choose determine the minimum required
* fields in your training data. For information about the required fields for a specific dataset domain and
* type, see howitworks-domains-ds-types.
*/
public void setSchema(Schema schema) {
this.schema = schema;
}
/**
*
* The schema for the dataset. The schema attributes and their order must match the fields in your data. The dataset
* Domain
and DatasetType
that you choose determine the minimum required fields in your
* training data. For information about the required fields for a specific dataset domain and type, see
* howitworks-domains-ds-types.
*
*
* @return The schema for the dataset. The schema attributes and their order must match the fields in your data. The
* dataset Domain
and DatasetType
that you choose determine the minimum required
* fields in your training data. For information about the required fields for a specific dataset domain and
* type, see howitworks-domains-ds-types.
*/
public Schema getSchema() {
return this.schema;
}
/**
*
* The schema for the dataset. The schema attributes and their order must match the fields in your data. The dataset
* Domain
and DatasetType
that you choose determine the minimum required fields in your
* training data. For information about the required fields for a specific dataset domain and type, see
* howitworks-domains-ds-types.
*
*
* @param schema
* The schema for the dataset. The schema attributes and their order must match the fields in your data. The
* dataset Domain
and DatasetType
that you choose determine the minimum required
* fields in your training data. For information about the required fields for a specific dataset domain and
* type, see howitworks-domains-ds-types.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDatasetRequest withSchema(Schema schema) {
setSchema(schema);
return this;
}
/**
*
* An AWS Key Management Service (KMS) key and the AWS Identity and Access Management (IAM) role that Amazon
* Forecast can assume to access the key.
*
*
* @param encryptionConfig
* An AWS Key Management Service (KMS) key and the AWS Identity and Access Management (IAM) role that Amazon
* Forecast can assume to access the key.
*/
public void setEncryptionConfig(EncryptionConfig encryptionConfig) {
this.encryptionConfig = encryptionConfig;
}
/**
*
* An AWS Key Management Service (KMS) key and the AWS Identity and Access Management (IAM) role that Amazon
* Forecast can assume to access the key.
*
*
* @return An AWS Key Management Service (KMS) key and the AWS Identity and Access Management (IAM) role that Amazon
* Forecast can assume to access the key.
*/
public EncryptionConfig getEncryptionConfig() {
return this.encryptionConfig;
}
/**
*
* An AWS Key Management Service (KMS) key and the AWS Identity and Access Management (IAM) role that Amazon
* Forecast can assume to access the key.
*
*
* @param encryptionConfig
* An AWS Key Management Service (KMS) key and the AWS Identity and Access Management (IAM) role that Amazon
* Forecast can assume to access the key.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDatasetRequest withEncryptionConfig(EncryptionConfig encryptionConfig) {
setEncryptionConfig(encryptionConfig);
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 (getDatasetName() != null)
sb.append("DatasetName: ").append(getDatasetName()).append(",");
if (getDomain() != null)
sb.append("Domain: ").append(getDomain()).append(",");
if (getDatasetType() != null)
sb.append("DatasetType: ").append(getDatasetType()).append(",");
if (getDataFrequency() != null)
sb.append("DataFrequency: ").append(getDataFrequency()).append(",");
if (getSchema() != null)
sb.append("Schema: ").append(getSchema()).append(",");
if (getEncryptionConfig() != null)
sb.append("EncryptionConfig: ").append(getEncryptionConfig());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof CreateDatasetRequest == false)
return false;
CreateDatasetRequest other = (CreateDatasetRequest) obj;
if (other.getDatasetName() == null ^ this.getDatasetName() == null)
return false;
if (other.getDatasetName() != null && other.getDatasetName().equals(this.getDatasetName()) == false)
return false;
if (other.getDomain() == null ^ this.getDomain() == null)
return false;
if (other.getDomain() != null && other.getDomain().equals(this.getDomain()) == false)
return false;
if (other.getDatasetType() == null ^ this.getDatasetType() == null)
return false;
if (other.getDatasetType() != null && other.getDatasetType().equals(this.getDatasetType()) == false)
return false;
if (other.getDataFrequency() == null ^ this.getDataFrequency() == null)
return false;
if (other.getDataFrequency() != null && other.getDataFrequency().equals(this.getDataFrequency()) == false)
return false;
if (other.getSchema() == null ^ this.getSchema() == null)
return false;
if (other.getSchema() != null && other.getSchema().equals(this.getSchema()) == false)
return false;
if (other.getEncryptionConfig() == null ^ this.getEncryptionConfig() == null)
return false;
if (other.getEncryptionConfig() != null && other.getEncryptionConfig().equals(this.getEncryptionConfig()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getDatasetName() == null) ? 0 : getDatasetName().hashCode());
hashCode = prime * hashCode + ((getDomain() == null) ? 0 : getDomain().hashCode());
hashCode = prime * hashCode + ((getDatasetType() == null) ? 0 : getDatasetType().hashCode());
hashCode = prime * hashCode + ((getDataFrequency() == null) ? 0 : getDataFrequency().hashCode());
hashCode = prime * hashCode + ((getSchema() == null) ? 0 : getSchema().hashCode());
hashCode = prime * hashCode + ((getEncryptionConfig() == null) ? 0 : getEncryptionConfig().hashCode());
return hashCode;
}
@Override
public CreateDatasetRequest clone() {
return (CreateDatasetRequest) super.clone();
}
}