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

com.amazonaws.services.forecast.model.AttributeConfig Maven / Gradle / Ivy

Go to download

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

There is a newer version: 1.12.780
Show newest version
/*
 * Copyright 2019-2024 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.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* Provides information about the method used to transform attributes. *

*

* The following is an example using the RETAIL domain: *

*

* { *

*

* "AttributeName": "demand", *

*

* "Transformations": {"aggregation": "sum", "middlefill": "zero", "backfill": "zero"} *

*

* } *

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

* The name of the attribute as specified in the schema. Amazon Forecast supports the target field of the target * time series and the related time series datasets. For example, for the RETAIL domain, the target is * demand. *

*/ private String attributeName; /** *

* The method parameters (key-value pairs), which are a map of override parameters. Specify these parameters to * override the default values. Related Time Series attributes do not accept aggregation parameters. *

*

* The following list shows the parameters and their valid values for the "filling" featurization method for a * Target Time Series dataset. Default values are bolded. *

*
    *
  • *

    * aggregation: sum, avg, first, min, max *

    *
  • *
  • *

    * frontfill: none *

    *
  • *
  • *

    * middlefill: zero, nan (not a number), value, median, * mean, min, max *

    *
  • *
  • *

    * backfill: zero, nan, value, median, mean, * min, max *

    *
  • *
*

* The following list shows the parameters and their valid values for a Related Time Series featurization * method (there are no defaults): *

*
    *
  • *

    * middlefill: zero, value, median, mean, * min, max *

    *
  • *
  • *

    * backfill: zero, value, median, mean, * min, max *

    *
  • *
  • *

    * futurefill: zero, value, median, mean, * min, max *

    *
  • *
*

* To set a filling method to a specific value, set the fill parameter to value and define the value in * a corresponding _value parameter. For example, to set backfilling to a value of 2, include the * following: "backfill": "value" and "backfill_value":"2". *

*/ private java.util.Map transformations; /** *

* The name of the attribute as specified in the schema. Amazon Forecast supports the target field of the target * time series and the related time series datasets. For example, for the RETAIL domain, the target is * demand. *

* * @param attributeName * The name of the attribute as specified in the schema. Amazon Forecast supports the target field of the * target time series and the related time series datasets. For example, for the RETAIL domain, the target is * demand. */ public void setAttributeName(String attributeName) { this.attributeName = attributeName; } /** *

* The name of the attribute as specified in the schema. Amazon Forecast supports the target field of the target * time series and the related time series datasets. For example, for the RETAIL domain, the target is * demand. *

* * @return The name of the attribute as specified in the schema. Amazon Forecast supports the target field of the * target time series and the related time series datasets. For example, for the RETAIL domain, the target * is demand. */ public String getAttributeName() { return this.attributeName; } /** *

* The name of the attribute as specified in the schema. Amazon Forecast supports the target field of the target * time series and the related time series datasets. For example, for the RETAIL domain, the target is * demand. *

* * @param attributeName * The name of the attribute as specified in the schema. Amazon Forecast supports the target field of the * target time series and the related time series datasets. For example, for the RETAIL domain, the target is * demand. * @return Returns a reference to this object so that method calls can be chained together. */ public AttributeConfig withAttributeName(String attributeName) { setAttributeName(attributeName); return this; } /** *

* The method parameters (key-value pairs), which are a map of override parameters. Specify these parameters to * override the default values. Related Time Series attributes do not accept aggregation parameters. *

*

* The following list shows the parameters and their valid values for the "filling" featurization method for a * Target Time Series dataset. Default values are bolded. *

*
    *
  • *

    * aggregation: sum, avg, first, min, max *

    *
  • *
  • *

    * frontfill: none *

    *
  • *
  • *

    * middlefill: zero, nan (not a number), value, median, * mean, min, max *

    *
  • *
  • *

    * backfill: zero, nan, value, median, mean, * min, max *

    *
  • *
*

* The following list shows the parameters and their valid values for a Related Time Series featurization * method (there are no defaults): *

*
    *
  • *

    * middlefill: zero, value, median, mean, * min, max *

    *
  • *
  • *

    * backfill: zero, value, median, mean, * min, max *

    *
  • *
  • *

    * futurefill: zero, value, median, mean, * min, max *

    *
  • *
*

* To set a filling method to a specific value, set the fill parameter to value and define the value in * a corresponding _value parameter. For example, to set backfilling to a value of 2, include the * following: "backfill": "value" and "backfill_value":"2". *

* * @return The method parameters (key-value pairs), which are a map of override parameters. Specify these parameters * to override the default values. Related Time Series attributes do not accept aggregation parameters.

*

* The following list shows the parameters and their valid values for the "filling" featurization method for * a Target Time Series dataset. Default values are bolded. *

*
    *
  • *

    * aggregation: sum, avg, first, min, * max *

    *
  • *
  • *

    * frontfill: none *

    *
  • *
  • *

    * middlefill: zero, nan (not a number), value, * median, mean, min, max *

    *
  • *
  • *

    * backfill: zero, nan, value, median, * mean, min, max *

    *
  • *
*

* The following list shows the parameters and their valid values for a Related Time Series * featurization method (there are no defaults): *

*
    *
  • *

    * middlefill: zero, value, median, mean, * min, max *

    *
  • *
  • *

    * backfill: zero, value, median, mean, * min, max *

    *
  • *
  • *

    * futurefill: zero, value, median, mean, * min, max *

    *
  • *
*

* To set a filling method to a specific value, set the fill parameter to value and define the * value in a corresponding _value parameter. For example, to set backfilling to a value of 2, * include the following: "backfill": "value" and "backfill_value":"2". */ public java.util.Map getTransformations() { return transformations; } /** *

* The method parameters (key-value pairs), which are a map of override parameters. Specify these parameters to * override the default values. Related Time Series attributes do not accept aggregation parameters. *

*

* The following list shows the parameters and their valid values for the "filling" featurization method for a * Target Time Series dataset. Default values are bolded. *

*
    *
  • *

    * aggregation: sum, avg, first, min, max *

    *
  • *
  • *

    * frontfill: none *

    *
  • *
  • *

    * middlefill: zero, nan (not a number), value, median, * mean, min, max *

    *
  • *
  • *

    * backfill: zero, nan, value, median, mean, * min, max *

    *
  • *
*

* The following list shows the parameters and their valid values for a Related Time Series featurization * method (there are no defaults): *

*
    *
  • *

    * middlefill: zero, value, median, mean, * min, max *

    *
  • *
  • *

    * backfill: zero, value, median, mean, * min, max *

    *
  • *
  • *

    * futurefill: zero, value, median, mean, * min, max *

    *
  • *
*

* To set a filling method to a specific value, set the fill parameter to value and define the value in * a corresponding _value parameter. For example, to set backfilling to a value of 2, include the * following: "backfill": "value" and "backfill_value":"2". *

* * @param transformations * The method parameters (key-value pairs), which are a map of override parameters. Specify these parameters * to override the default values. Related Time Series attributes do not accept aggregation parameters.

*

* The following list shows the parameters and their valid values for the "filling" featurization method for * a Target Time Series dataset. Default values are bolded. *

*
    *
  • *

    * aggregation: sum, avg, first, min, * max *

    *
  • *
  • *

    * frontfill: none *

    *
  • *
  • *

    * middlefill: zero, nan (not a number), value, * median, mean, min, max *

    *
  • *
  • *

    * backfill: zero, nan, value, median, * mean, min, max *

    *
  • *
*

* The following list shows the parameters and their valid values for a Related Time Series * featurization method (there are no defaults): *

*
    *
  • *

    * middlefill: zero, value, median, mean, * min, max *

    *
  • *
  • *

    * backfill: zero, value, median, mean, * min, max *

    *
  • *
  • *

    * futurefill: zero, value, median, mean, * min, max *

    *
  • *
*

* To set a filling method to a specific value, set the fill parameter to value and define the * value in a corresponding _value parameter. For example, to set backfilling to a value of 2, * include the following: "backfill": "value" and "backfill_value":"2". */ public void setTransformations(java.util.Map transformations) { this.transformations = transformations; } /** *

* The method parameters (key-value pairs), which are a map of override parameters. Specify these parameters to * override the default values. Related Time Series attributes do not accept aggregation parameters. *

*

* The following list shows the parameters and their valid values for the "filling" featurization method for a * Target Time Series dataset. Default values are bolded. *

*
    *
  • *

    * aggregation: sum, avg, first, min, max *

    *
  • *
  • *

    * frontfill: none *

    *
  • *
  • *

    * middlefill: zero, nan (not a number), value, median, * mean, min, max *

    *
  • *
  • *

    * backfill: zero, nan, value, median, mean, * min, max *

    *
  • *
*

* The following list shows the parameters and their valid values for a Related Time Series featurization * method (there are no defaults): *

*
    *
  • *

    * middlefill: zero, value, median, mean, * min, max *

    *
  • *
  • *

    * backfill: zero, value, median, mean, * min, max *

    *
  • *
  • *

    * futurefill: zero, value, median, mean, * min, max *

    *
  • *
*

* To set a filling method to a specific value, set the fill parameter to value and define the value in * a corresponding _value parameter. For example, to set backfilling to a value of 2, include the * following: "backfill": "value" and "backfill_value":"2". *

* * @param transformations * The method parameters (key-value pairs), which are a map of override parameters. Specify these parameters * to override the default values. Related Time Series attributes do not accept aggregation parameters.

*

* The following list shows the parameters and their valid values for the "filling" featurization method for * a Target Time Series dataset. Default values are bolded. *

*
    *
  • *

    * aggregation: sum, avg, first, min, * max *

    *
  • *
  • *

    * frontfill: none *

    *
  • *
  • *

    * middlefill: zero, nan (not a number), value, * median, mean, min, max *

    *
  • *
  • *

    * backfill: zero, nan, value, median, * mean, min, max *

    *
  • *
*

* The following list shows the parameters and their valid values for a Related Time Series * featurization method (there are no defaults): *

*
    *
  • *

    * middlefill: zero, value, median, mean, * min, max *

    *
  • *
  • *

    * backfill: zero, value, median, mean, * min, max *

    *
  • *
  • *

    * futurefill: zero, value, median, mean, * min, max *

    *
  • *
*

* To set a filling method to a specific value, set the fill parameter to value and define the * value in a corresponding _value parameter. For example, to set backfilling to a value of 2, * include the following: "backfill": "value" and "backfill_value":"2". * @return Returns a reference to this object so that method calls can be chained together. */ public AttributeConfig withTransformations(java.util.Map transformations) { setTransformations(transformations); return this; } /** * Add a single Transformations entry * * @see AttributeConfig#withTransformations * @returns a reference to this object so that method calls can be chained together. */ public AttributeConfig addTransformationsEntry(String key, String value) { if (null == this.transformations) { this.transformations = new java.util.HashMap(); } if (this.transformations.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.transformations.put(key, value); return this; } /** * Removes all the entries added into Transformations. * * @return Returns a reference to this object so that method calls can be chained together. */ public AttributeConfig clearTransformationsEntries() { this.transformations = null; 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 (getAttributeName() != null) sb.append("AttributeName: ").append(getAttributeName()).append(","); if (getTransformations() != null) sb.append("Transformations: ").append(getTransformations()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof AttributeConfig == false) return false; AttributeConfig other = (AttributeConfig) obj; if (other.getAttributeName() == null ^ this.getAttributeName() == null) return false; if (other.getAttributeName() != null && other.getAttributeName().equals(this.getAttributeName()) == false) return false; if (other.getTransformations() == null ^ this.getTransformations() == null) return false; if (other.getTransformations() != null && other.getTransformations().equals(this.getTransformations()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAttributeName() == null) ? 0 : getAttributeName().hashCode()); hashCode = prime * hashCode + ((getTransformations() == null) ? 0 : getTransformations().hashCode()); return hashCode; } @Override public AttributeConfig clone() { try { return (AttributeConfig) 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.forecast.model.transform.AttributeConfigMarshaller.getInstance().marshall(this, protocolMarshaller); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy