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

com.amazonaws.services.iotevents.model.SetTimerAction Maven / Gradle / Ivy

Go to download

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

The 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.iotevents.model;

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

/**
 * 

* Information needed to set the timer. *

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

* The name of the timer. *

*/ private String timerName; /** *

* The number of seconds until the timer expires. The minimum value is 60 seconds to ensure accuracy. The maximum * value is 31622400 seconds. *

*/ @Deprecated private Integer seconds; /** *

* The duration of the timer, in seconds. You can use a string expression that includes numbers, variables ( * $variable.<variable-name>), and input values ( * $input.<input-name>.<path-to-datum>) as the duration. The range of the duration is * 1-31622400 seconds. To ensure accuracy, the minimum duration is 60 seconds. The evaluated result of the duration * is rounded down to the nearest whole number. *

*/ private String durationExpression; /** *

* The name of the timer. *

* * @param timerName * The name of the timer. */ public void setTimerName(String timerName) { this.timerName = timerName; } /** *

* The name of the timer. *

* * @return The name of the timer. */ public String getTimerName() { return this.timerName; } /** *

* The name of the timer. *

* * @param timerName * The name of the timer. * @return Returns a reference to this object so that method calls can be chained together. */ public SetTimerAction withTimerName(String timerName) { setTimerName(timerName); return this; } /** *

* The number of seconds until the timer expires. The minimum value is 60 seconds to ensure accuracy. The maximum * value is 31622400 seconds. *

* * @param seconds * The number of seconds until the timer expires. The minimum value is 60 seconds to ensure accuracy. The * maximum value is 31622400 seconds. */ @Deprecated public void setSeconds(Integer seconds) { this.seconds = seconds; } /** *

* The number of seconds until the timer expires. The minimum value is 60 seconds to ensure accuracy. The maximum * value is 31622400 seconds. *

* * @return The number of seconds until the timer expires. The minimum value is 60 seconds to ensure accuracy. The * maximum value is 31622400 seconds. */ @Deprecated public Integer getSeconds() { return this.seconds; } /** *

* The number of seconds until the timer expires. The minimum value is 60 seconds to ensure accuracy. The maximum * value is 31622400 seconds. *

* * @param seconds * The number of seconds until the timer expires. The minimum value is 60 seconds to ensure accuracy. The * maximum value is 31622400 seconds. * @return Returns a reference to this object so that method calls can be chained together. */ @Deprecated public SetTimerAction withSeconds(Integer seconds) { setSeconds(seconds); return this; } /** *

* The duration of the timer, in seconds. You can use a string expression that includes numbers, variables ( * $variable.<variable-name>), and input values ( * $input.<input-name>.<path-to-datum>) as the duration. The range of the duration is * 1-31622400 seconds. To ensure accuracy, the minimum duration is 60 seconds. The evaluated result of the duration * is rounded down to the nearest whole number. *

* * @param durationExpression * The duration of the timer, in seconds. You can use a string expression that includes numbers, variables ( * $variable.<variable-name>), and input values ( * $input.<input-name>.<path-to-datum>) as the duration. The range of the duration * is 1-31622400 seconds. To ensure accuracy, the minimum duration is 60 seconds. The evaluated result of the * duration is rounded down to the nearest whole number. */ public void setDurationExpression(String durationExpression) { this.durationExpression = durationExpression; } /** *

* The duration of the timer, in seconds. You can use a string expression that includes numbers, variables ( * $variable.<variable-name>), and input values ( * $input.<input-name>.<path-to-datum>) as the duration. The range of the duration is * 1-31622400 seconds. To ensure accuracy, the minimum duration is 60 seconds. The evaluated result of the duration * is rounded down to the nearest whole number. *

* * @return The duration of the timer, in seconds. You can use a string expression that includes numbers, variables ( * $variable.<variable-name>), and input values ( * $input.<input-name>.<path-to-datum>) as the duration. The range of the duration * is 1-31622400 seconds. To ensure accuracy, the minimum duration is 60 seconds. The evaluated result of * the duration is rounded down to the nearest whole number. */ public String getDurationExpression() { return this.durationExpression; } /** *

* The duration of the timer, in seconds. You can use a string expression that includes numbers, variables ( * $variable.<variable-name>), and input values ( * $input.<input-name>.<path-to-datum>) as the duration. The range of the duration is * 1-31622400 seconds. To ensure accuracy, the minimum duration is 60 seconds. The evaluated result of the duration * is rounded down to the nearest whole number. *

* * @param durationExpression * The duration of the timer, in seconds. You can use a string expression that includes numbers, variables ( * $variable.<variable-name>), and input values ( * $input.<input-name>.<path-to-datum>) as the duration. The range of the duration * is 1-31622400 seconds. To ensure accuracy, the minimum duration is 60 seconds. The evaluated result of the * duration is rounded down to the nearest whole number. * @return Returns a reference to this object so that method calls can be chained together. */ public SetTimerAction withDurationExpression(String durationExpression) { setDurationExpression(durationExpression); 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 (getTimerName() != null) sb.append("TimerName: ").append(getTimerName()).append(","); if (getSeconds() != null) sb.append("Seconds: ").append(getSeconds()).append(","); if (getDurationExpression() != null) sb.append("DurationExpression: ").append(getDurationExpression()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof SetTimerAction == false) return false; SetTimerAction other = (SetTimerAction) obj; if (other.getTimerName() == null ^ this.getTimerName() == null) return false; if (other.getTimerName() != null && other.getTimerName().equals(this.getTimerName()) == false) return false; if (other.getSeconds() == null ^ this.getSeconds() == null) return false; if (other.getSeconds() != null && other.getSeconds().equals(this.getSeconds()) == false) return false; if (other.getDurationExpression() == null ^ this.getDurationExpression() == null) return false; if (other.getDurationExpression() != null && other.getDurationExpression().equals(this.getDurationExpression()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTimerName() == null) ? 0 : getTimerName().hashCode()); hashCode = prime * hashCode + ((getSeconds() == null) ? 0 : getSeconds().hashCode()); hashCode = prime * hashCode + ((getDurationExpression() == null) ? 0 : getDurationExpression().hashCode()); return hashCode; } @Override public SetTimerAction clone() { try { return (SetTimerAction) 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.iotevents.model.transform.SetTimerActionMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy