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

com.amazonaws.services.forecast.model.FeaturizationMethod 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 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.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* Provides information about the method that featurizes (transforms) a dataset field. The method is part of the * FeaturizationPipeline of the Featurization object. If you don't specify * FeaturizationMethodParameters, Amazon Forecast uses default parameters. *

*

* The following is an example of how you specify a FeaturizationMethod object. *

*

* { *

*

* "FeaturizationMethodName": "filling", *

*

* "FeaturizationMethodParameters": {"aggregation": "avg", "backfill": "nan"} *

*

* } *

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

* The name of the method. The "filling" method is the only supported method. *

*/ private String featurizationMethodName; /** *

* The method parameters (key-value pairs). Specify these parameters to override the default values. The following * list shows the parameters and their valid values. Bold signifies the default value. *

*
    *
  • *

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

    *
  • *
  • *

    * frontfill: none *

    *
  • *
  • *

    * middlefill: zero, nan (not a number) *

    *
  • *
  • *

    * backfill: zero, nan *

    *
  • *
*/ private java.util.Map featurizationMethodParameters; /** *

* The name of the method. The "filling" method is the only supported method. *

* * @param featurizationMethodName * The name of the method. The "filling" method is the only supported method. * @see FeaturizationMethodName */ public void setFeaturizationMethodName(String featurizationMethodName) { this.featurizationMethodName = featurizationMethodName; } /** *

* The name of the method. The "filling" method is the only supported method. *

* * @return The name of the method. The "filling" method is the only supported method. * @see FeaturizationMethodName */ public String getFeaturizationMethodName() { return this.featurizationMethodName; } /** *

* The name of the method. The "filling" method is the only supported method. *

* * @param featurizationMethodName * The name of the method. The "filling" method is the only supported method. * @return Returns a reference to this object so that method calls can be chained together. * @see FeaturizationMethodName */ public FeaturizationMethod withFeaturizationMethodName(String featurizationMethodName) { setFeaturizationMethodName(featurizationMethodName); return this; } /** *

* The name of the method. The "filling" method is the only supported method. *

* * @param featurizationMethodName * The name of the method. The "filling" method is the only supported method. * @return Returns a reference to this object so that method calls can be chained together. * @see FeaturizationMethodName */ public FeaturizationMethod withFeaturizationMethodName(FeaturizationMethodName featurizationMethodName) { this.featurizationMethodName = featurizationMethodName.toString(); return this; } /** *

* The method parameters (key-value pairs). Specify these parameters to override the default values. The following * list shows the parameters and their valid values. Bold signifies the default value. *

*
    *
  • *

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

    *
  • *
  • *

    * frontfill: none *

    *
  • *
  • *

    * middlefill: zero, nan (not a number) *

    *
  • *
  • *

    * backfill: zero, nan *

    *
  • *
* * @return The method parameters (key-value pairs). Specify these parameters to override the default values. The * following list shows the parameters and their valid values. Bold signifies the default value.

*
    *
  • *

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

    *
  • *
  • *

    * frontfill: none *

    *
  • *
  • *

    * middlefill: zero, nan (not a number) *

    *
  • *
  • *

    * backfill: zero, nan *

    *
  • */ public java.util.Map getFeaturizationMethodParameters() { return featurizationMethodParameters; } /** *

    * The method parameters (key-value pairs). Specify these parameters to override the default values. The following * list shows the parameters and their valid values. Bold signifies the default value. *

    *
      *
    • *

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

      *
    • *
    • *

      * frontfill: none *

      *
    • *
    • *

      * middlefill: zero, nan (not a number) *

      *
    • *
    • *

      * backfill: zero, nan *

      *
    • *
    * * @param featurizationMethodParameters * The method parameters (key-value pairs). Specify these parameters to override the default values. The * following list shows the parameters and their valid values. Bold signifies the default value.

    *
      *
    • *

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

      *
    • *
    • *

      * frontfill: none *

      *
    • *
    • *

      * middlefill: zero, nan (not a number) *

      *
    • *
    • *

      * backfill: zero, nan *

      *
    • */ public void setFeaturizationMethodParameters(java.util.Map featurizationMethodParameters) { this.featurizationMethodParameters = featurizationMethodParameters; } /** *

      * The method parameters (key-value pairs). Specify these parameters to override the default values. The following * list shows the parameters and their valid values. Bold signifies the default value. *

      *
        *
      • *

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

        *
      • *
      • *

        * frontfill: none *

        *
      • *
      • *

        * middlefill: zero, nan (not a number) *

        *
      • *
      • *

        * backfill: zero, nan *

        *
      • *
      * * @param featurizationMethodParameters * The method parameters (key-value pairs). Specify these parameters to override the default values. The * following list shows the parameters and their valid values. Bold signifies the default value.

      *
        *
      • *

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

        *
      • *
      • *

        * frontfill: none *

        *
      • *
      • *

        * middlefill: zero, nan (not a number) *

        *
      • *
      • *

        * backfill: zero, nan *

        *
      • * @return Returns a reference to this object so that method calls can be chained together. */ public FeaturizationMethod withFeaturizationMethodParameters(java.util.Map featurizationMethodParameters) { setFeaturizationMethodParameters(featurizationMethodParameters); return this; } public FeaturizationMethod addFeaturizationMethodParametersEntry(String key, String value) { if (null == this.featurizationMethodParameters) { this.featurizationMethodParameters = new java.util.HashMap(); } if (this.featurizationMethodParameters.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.featurizationMethodParameters.put(key, value); return this; } /** * Removes all the entries added into FeaturizationMethodParameters. * * @return Returns a reference to this object so that method calls can be chained together. */ public FeaturizationMethod clearFeaturizationMethodParametersEntries() { this.featurizationMethodParameters = 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 (getFeaturizationMethodName() != null) sb.append("FeaturizationMethodName: ").append(getFeaturizationMethodName()).append(","); if (getFeaturizationMethodParameters() != null) sb.append("FeaturizationMethodParameters: ").append(getFeaturizationMethodParameters()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof FeaturizationMethod == false) return false; FeaturizationMethod other = (FeaturizationMethod) obj; if (other.getFeaturizationMethodName() == null ^ this.getFeaturizationMethodName() == null) return false; if (other.getFeaturizationMethodName() != null && other.getFeaturizationMethodName().equals(this.getFeaturizationMethodName()) == false) return false; if (other.getFeaturizationMethodParameters() == null ^ this.getFeaturizationMethodParameters() == null) return false; if (other.getFeaturizationMethodParameters() != null && other.getFeaturizationMethodParameters().equals(this.getFeaturizationMethodParameters()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getFeaturizationMethodName() == null) ? 0 : getFeaturizationMethodName().hashCode()); hashCode = prime * hashCode + ((getFeaturizationMethodParameters() == null) ? 0 : getFeaturizationMethodParameters().hashCode()); return hashCode; } @Override public FeaturizationMethod clone() { try { return (FeaturizationMethod) 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.FeaturizationMethodMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy