/* * Copyright 2018-2023 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.opensearch.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; @Generated("com.amazonaws:aws-java-sdk-code-generator") public class UpdateScheduledActionRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* The name of the domain to reschedule an action for. *
*/ private String domainName; /** ** The unique identifier of the action to reschedule. To retrieve this ID, send a ListScheduledActions request. *
*/ private String actionID; /** *
* The type of action to reschedule. Can be one of SERVICE_SOFTWARE_UPDATE
,
* JVM_HEAP_SIZE_TUNING
, or JVM_YOUNG_GEN_TUNING
. To retrieve this value, send a ListScheduledActions request.
*
* When to schedule the action. *
*
* NOW
- Immediately schedules the update to happen in the current hour if there's capacity available.
*
* TIMESTAMP
- Lets you specify a custom date and time to apply the update. If you specify this value,
* you must also provide a value for DesiredStartTime
.
*
* OFF_PEAK_WINDOW
- Marks the action to be picked up during an upcoming off-peak window. There's no
* guarantee that the change will be implemented during the next immediate window. Depending on capacity, it might
* happen in subsequent days.
*
* The time to implement the change, in Coordinated Universal Time (UTC). Only specify this parameter if you set
* ScheduleAt
to TIMESTAMP
.
*
* The name of the domain to reschedule an action for. *
* * @param domainName * The name of the domain to reschedule an action for. */ public void setDomainName(String domainName) { this.domainName = domainName; } /** ** The name of the domain to reschedule an action for. *
* * @return The name of the domain to reschedule an action for. */ public String getDomainName() { return this.domainName; } /** ** The name of the domain to reschedule an action for. *
* * @param domainName * The name of the domain to reschedule an action for. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateScheduledActionRequest withDomainName(String domainName) { setDomainName(domainName); return this; } /** ** The unique identifier of the action to reschedule. To retrieve this ID, send a ListScheduledActions request. *
* * @param actionID * The unique identifier of the action to reschedule. To retrieve this ID, send a ListScheduledActions request. */ public void setActionID(String actionID) { this.actionID = actionID; } /** ** The unique identifier of the action to reschedule. To retrieve this ID, send a ListScheduledActions request. *
* * @return The unique identifier of the action to reschedule. To retrieve this ID, send a ListScheduledActions request. */ public String getActionID() { return this.actionID; } /** ** The unique identifier of the action to reschedule. To retrieve this ID, send a ListScheduledActions request. *
* * @param actionID * The unique identifier of the action to reschedule. To retrieve this ID, send a ListScheduledActions request. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateScheduledActionRequest withActionID(String actionID) { setActionID(actionID); return this; } /** *
* The type of action to reschedule. Can be one of SERVICE_SOFTWARE_UPDATE
,
* JVM_HEAP_SIZE_TUNING
, or JVM_YOUNG_GEN_TUNING
. To retrieve this value, send a ListScheduledActions request.
*
SERVICE_SOFTWARE_UPDATE
,
* JVM_HEAP_SIZE_TUNING
, or JVM_YOUNG_GEN_TUNING
. To retrieve this value, send a
* ListScheduledActions request.
* @see ActionType
*/
public void setActionType(String actionType) {
this.actionType = actionType;
}
/**
*
* The type of action to reschedule. Can be one of SERVICE_SOFTWARE_UPDATE
,
* JVM_HEAP_SIZE_TUNING
, or JVM_YOUNG_GEN_TUNING
. To retrieve this value, send a ListScheduledActions request.
*
SERVICE_SOFTWARE_UPDATE
,
* JVM_HEAP_SIZE_TUNING
, or JVM_YOUNG_GEN_TUNING
. To retrieve this value, send a
* ListScheduledActions request.
* @see ActionType
*/
public String getActionType() {
return this.actionType;
}
/**
*
* The type of action to reschedule. Can be one of SERVICE_SOFTWARE_UPDATE
,
* JVM_HEAP_SIZE_TUNING
, or JVM_YOUNG_GEN_TUNING
. To retrieve this value, send a ListScheduledActions request.
*
SERVICE_SOFTWARE_UPDATE
,
* JVM_HEAP_SIZE_TUNING
, or JVM_YOUNG_GEN_TUNING
. To retrieve this value, send a
* ListScheduledActions request.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ActionType
*/
public UpdateScheduledActionRequest withActionType(String actionType) {
setActionType(actionType);
return this;
}
/**
*
* The type of action to reschedule. Can be one of SERVICE_SOFTWARE_UPDATE
,
* JVM_HEAP_SIZE_TUNING
, or JVM_YOUNG_GEN_TUNING
. To retrieve this value, send a ListScheduledActions request.
*
SERVICE_SOFTWARE_UPDATE
,
* JVM_HEAP_SIZE_TUNING
, or JVM_YOUNG_GEN_TUNING
. To retrieve this value, send a
* ListScheduledActions request.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ActionType
*/
public UpdateScheduledActionRequest withActionType(ActionType actionType) {
this.actionType = actionType.toString();
return this;
}
/**
* * When to schedule the action. *
*
* NOW
- Immediately schedules the update to happen in the current hour if there's capacity available.
*
* TIMESTAMP
- Lets you specify a custom date and time to apply the update. If you specify this value,
* you must also provide a value for DesiredStartTime
.
*
* OFF_PEAK_WINDOW
- Marks the action to be picked up during an upcoming off-peak window. There's no
* guarantee that the change will be implemented during the next immediate window. Depending on capacity, it might
* happen in subsequent days.
*
* NOW
- Immediately schedules the update to happen in the current hour if there's capacity
* available.
*
* TIMESTAMP
- Lets you specify a custom date and time to apply the update. If you specify this
* value, you must also provide a value for DesiredStartTime
.
*
* OFF_PEAK_WINDOW
- Marks the action to be picked up during an upcoming off-peak window.
* There's no guarantee that the change will be implemented during the next immediate window. Depending on
* capacity, it might happen in subsequent days.
*
* When to schedule the action. *
*
* NOW
- Immediately schedules the update to happen in the current hour if there's capacity available.
*
* TIMESTAMP
- Lets you specify a custom date and time to apply the update. If you specify this value,
* you must also provide a value for DesiredStartTime
.
*
* OFF_PEAK_WINDOW
- Marks the action to be picked up during an upcoming off-peak window. There's no
* guarantee that the change will be implemented during the next immediate window. Depending on capacity, it might
* happen in subsequent days.
*
* NOW
- Immediately schedules the update to happen in the current hour if there's capacity
* available.
*
* TIMESTAMP
- Lets you specify a custom date and time to apply the update. If you specify this
* value, you must also provide a value for DesiredStartTime
.
*
* OFF_PEAK_WINDOW
- Marks the action to be picked up during an upcoming off-peak window.
* There's no guarantee that the change will be implemented during the next immediate window. Depending on
* capacity, it might happen in subsequent days.
*
* When to schedule the action. *
*
* NOW
- Immediately schedules the update to happen in the current hour if there's capacity available.
*
* TIMESTAMP
- Lets you specify a custom date and time to apply the update. If you specify this value,
* you must also provide a value for DesiredStartTime
.
*
* OFF_PEAK_WINDOW
- Marks the action to be picked up during an upcoming off-peak window. There's no
* guarantee that the change will be implemented during the next immediate window. Depending on capacity, it might
* happen in subsequent days.
*
* NOW
- Immediately schedules the update to happen in the current hour if there's capacity
* available.
*
* TIMESTAMP
- Lets you specify a custom date and time to apply the update. If you specify this
* value, you must also provide a value for DesiredStartTime
.
*
* OFF_PEAK_WINDOW
- Marks the action to be picked up during an upcoming off-peak window.
* There's no guarantee that the change will be implemented during the next immediate window. Depending on
* capacity, it might happen in subsequent days.
*
* When to schedule the action. *
*
* NOW
- Immediately schedules the update to happen in the current hour if there's capacity available.
*
* TIMESTAMP
- Lets you specify a custom date and time to apply the update. If you specify this value,
* you must also provide a value for DesiredStartTime
.
*
* OFF_PEAK_WINDOW
- Marks the action to be picked up during an upcoming off-peak window. There's no
* guarantee that the change will be implemented during the next immediate window. Depending on capacity, it might
* happen in subsequent days.
*
* NOW
- Immediately schedules the update to happen in the current hour if there's capacity
* available.
*
* TIMESTAMP
- Lets you specify a custom date and time to apply the update. If you specify this
* value, you must also provide a value for DesiredStartTime
.
*
* OFF_PEAK_WINDOW
- Marks the action to be picked up during an upcoming off-peak window.
* There's no guarantee that the change will be implemented during the next immediate window. Depending on
* capacity, it might happen in subsequent days.
*
* The time to implement the change, in Coordinated Universal Time (UTC). Only specify this parameter if you set
* ScheduleAt
to TIMESTAMP
.
*
ScheduleAt
to TIMESTAMP
.
*/
public void setDesiredStartTime(Long desiredStartTime) {
this.desiredStartTime = desiredStartTime;
}
/**
*
* The time to implement the change, in Coordinated Universal Time (UTC). Only specify this parameter if you set
* ScheduleAt
to TIMESTAMP
.
*
ScheduleAt
to TIMESTAMP
.
*/
public Long getDesiredStartTime() {
return this.desiredStartTime;
}
/**
*
* The time to implement the change, in Coordinated Universal Time (UTC). Only specify this parameter if you set
* ScheduleAt
to TIMESTAMP
.
*
ScheduleAt
to TIMESTAMP
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateScheduledActionRequest withDesiredStartTime(Long desiredStartTime) {
setDesiredStartTime(desiredStartTime);
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 (getDomainName() != null)
sb.append("DomainName: ").append(getDomainName()).append(",");
if (getActionID() != null)
sb.append("ActionID: ").append(getActionID()).append(",");
if (getActionType() != null)
sb.append("ActionType: ").append(getActionType()).append(",");
if (getScheduleAt() != null)
sb.append("ScheduleAt: ").append(getScheduleAt()).append(",");
if (getDesiredStartTime() != null)
sb.append("DesiredStartTime: ").append(getDesiredStartTime());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof UpdateScheduledActionRequest == false)
return false;
UpdateScheduledActionRequest other = (UpdateScheduledActionRequest) obj;
if (other.getDomainName() == null ^ this.getDomainName() == null)
return false;
if (other.getDomainName() != null && other.getDomainName().equals(this.getDomainName()) == false)
return false;
if (other.getActionID() == null ^ this.getActionID() == null)
return false;
if (other.getActionID() != null && other.getActionID().equals(this.getActionID()) == false)
return false;
if (other.getActionType() == null ^ this.getActionType() == null)
return false;
if (other.getActionType() != null && other.getActionType().equals(this.getActionType()) == false)
return false;
if (other.getScheduleAt() == null ^ this.getScheduleAt() == null)
return false;
if (other.getScheduleAt() != null && other.getScheduleAt().equals(this.getScheduleAt()) == false)
return false;
if (other.getDesiredStartTime() == null ^ this.getDesiredStartTime() == null)
return false;
if (other.getDesiredStartTime() != null && other.getDesiredStartTime().equals(this.getDesiredStartTime()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getDomainName() == null) ? 0 : getDomainName().hashCode());
hashCode = prime * hashCode + ((getActionID() == null) ? 0 : getActionID().hashCode());
hashCode = prime * hashCode + ((getActionType() == null) ? 0 : getActionType().hashCode());
hashCode = prime * hashCode + ((getScheduleAt() == null) ? 0 : getScheduleAt().hashCode());
hashCode = prime * hashCode + ((getDesiredStartTime() == null) ? 0 : getDesiredStartTime().hashCode());
return hashCode;
}
@Override
public UpdateScheduledActionRequest clone() {
return (UpdateScheduledActionRequest) super.clone();
}
}