* The state of the calendar. An OPEN
calendar indicates that actions are allowed to proceed, and a
* CLOSED
calendar indicates that actions aren't allowed to proceed.
*
* The time, as an ISO 8601 string, that you specified in your
* command. If you don't specify a time, GetCalendarState
uses the current time.
*
* The time, as an ISO 8601 string, that the calendar state
* will change. If the current calendar state is OPEN
, NextTransitionTime
indicates when
* the calendar state changes to CLOSED
, and vice-versa.
*
* The state of the calendar. An OPEN
calendar indicates that actions are allowed to proceed, and a
* CLOSED
calendar indicates that actions aren't allowed to proceed.
*
OPEN
calendar indicates that actions are allowed to proceed,
* and a CLOSED
calendar indicates that actions aren't allowed to proceed.
* @see CalendarState
*/
public void setState(String state) {
this.state = state;
}
/**
*
* The state of the calendar. An OPEN
calendar indicates that actions are allowed to proceed, and a
* CLOSED
calendar indicates that actions aren't allowed to proceed.
*
OPEN
calendar indicates that actions are allowed to proceed,
* and a CLOSED
calendar indicates that actions aren't allowed to proceed.
* @see CalendarState
*/
public String getState() {
return this.state;
}
/**
*
* The state of the calendar. An OPEN
calendar indicates that actions are allowed to proceed, and a
* CLOSED
calendar indicates that actions aren't allowed to proceed.
*
OPEN
calendar indicates that actions are allowed to proceed,
* and a CLOSED
calendar indicates that actions aren't allowed to proceed.
* @return Returns a reference to this object so that method calls can be chained together.
* @see CalendarState
*/
public GetCalendarStateResult withState(String state) {
setState(state);
return this;
}
/**
*
* The state of the calendar. An OPEN
calendar indicates that actions are allowed to proceed, and a
* CLOSED
calendar indicates that actions aren't allowed to proceed.
*
OPEN
calendar indicates that actions are allowed to proceed,
* and a CLOSED
calendar indicates that actions aren't allowed to proceed.
* @return Returns a reference to this object so that method calls can be chained together.
* @see CalendarState
*/
public GetCalendarStateResult withState(CalendarState state) {
this.state = state.toString();
return this;
}
/**
*
* The time, as an ISO 8601 string, that you specified in your
* command. If you don't specify a time, GetCalendarState
uses the current time.
*
GetCalendarState
uses the current time.
*/
public void setAtTime(String atTime) {
this.atTime = atTime;
}
/**
*
* The time, as an ISO 8601 string, that you specified in your
* command. If you don't specify a time, GetCalendarState
uses the current time.
*
GetCalendarState
uses the current time.
*/
public String getAtTime() {
return this.atTime;
}
/**
*
* The time, as an ISO 8601 string, that you specified in your
* command. If you don't specify a time, GetCalendarState
uses the current time.
*
GetCalendarState
uses the current time.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetCalendarStateResult withAtTime(String atTime) {
setAtTime(atTime);
return this;
}
/**
*
* The time, as an ISO 8601 string, that the calendar state
* will change. If the current calendar state is OPEN
, NextTransitionTime
indicates when
* the calendar state changes to CLOSED
, and vice-versa.
*
OPEN
, NextTransitionTime
* indicates when the calendar state changes to CLOSED
, and vice-versa.
*/
public void setNextTransitionTime(String nextTransitionTime) {
this.nextTransitionTime = nextTransitionTime;
}
/**
*
* The time, as an ISO 8601 string, that the calendar state
* will change. If the current calendar state is OPEN
, NextTransitionTime
indicates when
* the calendar state changes to CLOSED
, and vice-versa.
*
OPEN
, NextTransitionTime
* indicates when the calendar state changes to CLOSED
, and vice-versa.
*/
public String getNextTransitionTime() {
return this.nextTransitionTime;
}
/**
*
* The time, as an ISO 8601 string, that the calendar state
* will change. If the current calendar state is OPEN
, NextTransitionTime
indicates when
* the calendar state changes to CLOSED
, and vice-versa.
*
OPEN
, NextTransitionTime
* indicates when the calendar state changes to CLOSED
, and vice-versa.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetCalendarStateResult withNextTransitionTime(String nextTransitionTime) {
setNextTransitionTime(nextTransitionTime);
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 (getState() != null)
sb.append("State: ").append(getState()).append(",");
if (getAtTime() != null)
sb.append("AtTime: ").append(getAtTime()).append(",");
if (getNextTransitionTime() != null)
sb.append("NextTransitionTime: ").append(getNextTransitionTime());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof GetCalendarStateResult == false)
return false;
GetCalendarStateResult other = (GetCalendarStateResult) obj;
if (other.getState() == null ^ this.getState() == null)
return false;
if (other.getState() != null && other.getState().equals(this.getState()) == false)
return false;
if (other.getAtTime() == null ^ this.getAtTime() == null)
return false;
if (other.getAtTime() != null && other.getAtTime().equals(this.getAtTime()) == false)
return false;
if (other.getNextTransitionTime() == null ^ this.getNextTransitionTime() == null)
return false;
if (other.getNextTransitionTime() != null && other.getNextTransitionTime().equals(this.getNextTransitionTime()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getState() == null) ? 0 : getState().hashCode());
hashCode = prime * hashCode + ((getAtTime() == null) ? 0 : getAtTime().hashCode());
hashCode = prime * hashCode + ((getNextTransitionTime() == null) ? 0 : getNextTransitionTime().hashCode());
return hashCode;
}
@Override
public GetCalendarStateResult clone() {
try {
return (GetCalendarStateResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}