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

com.amazonaws.services.forecast.model.Action 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.772
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;

/**
 * 

* Defines the modifications that you are making to an attribute for a what-if forecast. For example, you can use this * operation to create a what-if forecast that investigates a 10% off sale on all shoes. To do this, you specify * "AttributeName": "shoes", "Operation": "MULTIPLY", and "Value": "0.90". Pair * this operation with the TimeSeriesCondition operation within the * CreateWhatIfForecastRequest$TimeSeriesTransformations operation to define a subset of attribute items that are * modified. *

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

* The related time series that you are modifying. This value is case insensitive. *

*/ private String attributeName; /** *

* The operation that is applied to the provided attribute. Operations include: *

*
    *
  • *

    * ADD - adds Value to all rows of AttributeName. *

    *
  • *
  • *

    * SUBTRACT - subtracts Value from all rows of AttributeName. *

    *
  • *
  • *

    * MULTIPLY - multiplies all rows of AttributeName by Value. *

    *
  • *
  • *

    * DIVIDE - divides all rows of AttributeName by Value. *

    *
  • *
*/ private String operation; /** *

* The value that is applied for the chosen Operation. *

*/ private Double value; /** *

* The related time series that you are modifying. This value is case insensitive. *

* * @param attributeName * The related time series that you are modifying. This value is case insensitive. */ public void setAttributeName(String attributeName) { this.attributeName = attributeName; } /** *

* The related time series that you are modifying. This value is case insensitive. *

* * @return The related time series that you are modifying. This value is case insensitive. */ public String getAttributeName() { return this.attributeName; } /** *

* The related time series that you are modifying. This value is case insensitive. *

* * @param attributeName * The related time series that you are modifying. This value is case insensitive. * @return Returns a reference to this object so that method calls can be chained together. */ public Action withAttributeName(String attributeName) { setAttributeName(attributeName); return this; } /** *

* The operation that is applied to the provided attribute. Operations include: *

*
    *
  • *

    * ADD - adds Value to all rows of AttributeName. *

    *
  • *
  • *

    * SUBTRACT - subtracts Value from all rows of AttributeName. *

    *
  • *
  • *

    * MULTIPLY - multiplies all rows of AttributeName by Value. *

    *
  • *
  • *

    * DIVIDE - divides all rows of AttributeName by Value. *

    *
  • *
* * @param operation * The operation that is applied to the provided attribute. Operations include:

*
    *
  • *

    * ADD - adds Value to all rows of AttributeName. *

    *
  • *
  • *

    * SUBTRACT - subtracts Value from all rows of AttributeName. *

    *
  • *
  • *

    * MULTIPLY - multiplies all rows of AttributeName by Value. *

    *
  • *
  • *

    * DIVIDE - divides all rows of AttributeName by Value. *

    *
  • * @see Operation */ public void setOperation(String operation) { this.operation = operation; } /** *

    * The operation that is applied to the provided attribute. Operations include: *

    *
      *
    • *

      * ADD - adds Value to all rows of AttributeName. *

      *
    • *
    • *

      * SUBTRACT - subtracts Value from all rows of AttributeName. *

      *
    • *
    • *

      * MULTIPLY - multiplies all rows of AttributeName by Value. *

      *
    • *
    • *

      * DIVIDE - divides all rows of AttributeName by Value. *

      *
    • *
    * * @return The operation that is applied to the provided attribute. Operations include:

    *
      *
    • *

      * ADD - adds Value to all rows of AttributeName. *

      *
    • *
    • *

      * SUBTRACT - subtracts Value from all rows of AttributeName. *

      *
    • *
    • *

      * MULTIPLY - multiplies all rows of AttributeName by Value. *

      *
    • *
    • *

      * DIVIDE - divides all rows of AttributeName by Value. *

      *
    • * @see Operation */ public String getOperation() { return this.operation; } /** *

      * The operation that is applied to the provided attribute. Operations include: *

      *
        *
      • *

        * ADD - adds Value to all rows of AttributeName. *

        *
      • *
      • *

        * SUBTRACT - subtracts Value from all rows of AttributeName. *

        *
      • *
      • *

        * MULTIPLY - multiplies all rows of AttributeName by Value. *

        *
      • *
      • *

        * DIVIDE - divides all rows of AttributeName by Value. *

        *
      • *
      * * @param operation * The operation that is applied to the provided attribute. Operations include:

      *
        *
      • *

        * ADD - adds Value to all rows of AttributeName. *

        *
      • *
      • *

        * SUBTRACT - subtracts Value from all rows of AttributeName. *

        *
      • *
      • *

        * MULTIPLY - multiplies all rows of AttributeName by Value. *

        *
      • *
      • *

        * DIVIDE - divides all rows of AttributeName by Value. *

        *
      • * @return Returns a reference to this object so that method calls can be chained together. * @see Operation */ public Action withOperation(String operation) { setOperation(operation); return this; } /** *

        * The operation that is applied to the provided attribute. Operations include: *

        *
          *
        • *

          * ADD - adds Value to all rows of AttributeName. *

          *
        • *
        • *

          * SUBTRACT - subtracts Value from all rows of AttributeName. *

          *
        • *
        • *

          * MULTIPLY - multiplies all rows of AttributeName by Value. *

          *
        • *
        • *

          * DIVIDE - divides all rows of AttributeName by Value. *

          *
        • *
        * * @param operation * The operation that is applied to the provided attribute. Operations include:

        *
          *
        • *

          * ADD - adds Value to all rows of AttributeName. *

          *
        • *
        • *

          * SUBTRACT - subtracts Value from all rows of AttributeName. *

          *
        • *
        • *

          * MULTIPLY - multiplies all rows of AttributeName by Value. *

          *
        • *
        • *

          * DIVIDE - divides all rows of AttributeName by Value. *

          *
        • * @return Returns a reference to this object so that method calls can be chained together. * @see Operation */ public Action withOperation(Operation operation) { this.operation = operation.toString(); return this; } /** *

          * The value that is applied for the chosen Operation. *

          * * @param value * The value that is applied for the chosen Operation. */ public void setValue(Double value) { this.value = value; } /** *

          * The value that is applied for the chosen Operation. *

          * * @return The value that is applied for the chosen Operation. */ public Double getValue() { return this.value; } /** *

          * The value that is applied for the chosen Operation. *

          * * @param value * The value that is applied for the chosen Operation. * @return Returns a reference to this object so that method calls can be chained together. */ public Action withValue(Double value) { setValue(value); 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 (getOperation() != null) sb.append("Operation: ").append(getOperation()).append(","); if (getValue() != null) sb.append("Value: ").append(getValue()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Action == false) return false; Action other = (Action) obj; if (other.getAttributeName() == null ^ this.getAttributeName() == null) return false; if (other.getAttributeName() != null && other.getAttributeName().equals(this.getAttributeName()) == false) return false; if (other.getOperation() == null ^ this.getOperation() == null) return false; if (other.getOperation() != null && other.getOperation().equals(this.getOperation()) == false) return false; if (other.getValue() == null ^ this.getValue() == null) return false; if (other.getValue() != null && other.getValue().equals(this.getValue()) == 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 + ((getOperation() == null) ? 0 : getOperation().hashCode()); hashCode = prime * hashCode + ((getValue() == null) ? 0 : getValue().hashCode()); return hashCode; } @Override public Action clone() { try { return (Action) 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.ActionMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy