com.amazonaws.services.simplesystemsmanagement.model.GetMaintenanceWindowResult Maven / Gradle / Ivy
Show all versions of aws-java-sdk-ssm Show documentation
/*
* 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.simplesystemsmanagement.model;
import java.io.Serializable;
import javax.annotation.Generated;
/**
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class GetMaintenanceWindowResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable {
/**
*
* The ID of the created maintenance window.
*
*/
private String windowId;
/**
*
* The name of the maintenance window.
*
*/
private String name;
/**
*
* The description of the maintenance window.
*
*/
private String description;
/**
*
* The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become active.
* The maintenance window won't run before this specified time.
*
*/
private String startDate;
/**
*
* The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become inactive.
* The maintenance window won't run after this specified time.
*
*/
private String endDate;
/**
*
* The schedule of the maintenance window in the form of a cron or rate expression.
*
*/
private String schedule;
/**
*
* The time zone that the scheduled maintenance window executions are based on, in Internet Assigned Numbers
* Authority (IANA) format. For example: "America/Los_Angeles", "UTC", or "Asia/Seoul". For more information, see
* the Time Zone Database on the IANA website.
*
*/
private String scheduleTimezone;
/**
*
* The number of days to wait to run a maintenance window after the scheduled cron expression date and time.
*
*/
private Integer scheduleOffset;
/**
*
* The next time the maintenance window will actually run, taking into account any specified times for the
* maintenance window to become active or inactive.
*
*/
private String nextExecutionTime;
/**
*
* The duration of the maintenance window in hours.
*
*/
private Integer duration;
/**
*
* The number of hours before the end of the maintenance window that Amazon Web Services Systems Manager stops
* scheduling new tasks for execution.
*
*/
private Integer cutoff;
/**
*
* Whether targets must be registered with the maintenance window before tasks can be defined for those targets.
*
*/
private Boolean allowUnassociatedTargets;
/**
*
* Indicates whether the maintenance window is enabled.
*
*/
private Boolean enabled;
/**
*
* The date the maintenance window was created.
*
*/
private java.util.Date createdDate;
/**
*
* The date the maintenance window was last modified.
*
*/
private java.util.Date modifiedDate;
/**
*
* The ID of the created maintenance window.
*
*
* @param windowId
* The ID of the created maintenance window.
*/
public void setWindowId(String windowId) {
this.windowId = windowId;
}
/**
*
* The ID of the created maintenance window.
*
*
* @return The ID of the created maintenance window.
*/
public String getWindowId() {
return this.windowId;
}
/**
*
* The ID of the created maintenance window.
*
*
* @param windowId
* The ID of the created maintenance window.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetMaintenanceWindowResult withWindowId(String windowId) {
setWindowId(windowId);
return this;
}
/**
*
* The name of the maintenance window.
*
*
* @param name
* The name of the maintenance window.
*/
public void setName(String name) {
this.name = name;
}
/**
*
* The name of the maintenance window.
*
*
* @return The name of the maintenance window.
*/
public String getName() {
return this.name;
}
/**
*
* The name of the maintenance window.
*
*
* @param name
* The name of the maintenance window.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetMaintenanceWindowResult withName(String name) {
setName(name);
return this;
}
/**
*
* The description of the maintenance window.
*
*
* @param description
* The description of the maintenance window.
*/
public void setDescription(String description) {
this.description = description;
}
/**
*
* The description of the maintenance window.
*
*
* @return The description of the maintenance window.
*/
public String getDescription() {
return this.description;
}
/**
*
* The description of the maintenance window.
*
*
* @param description
* The description of the maintenance window.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetMaintenanceWindowResult withDescription(String description) {
setDescription(description);
return this;
}
/**
*
* The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become active.
* The maintenance window won't run before this specified time.
*
*
* @param startDate
* The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become
* active. The maintenance window won't run before this specified time.
*/
public void setStartDate(String startDate) {
this.startDate = startDate;
}
/**
*
* The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become active.
* The maintenance window won't run before this specified time.
*
*
* @return The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become
* active. The maintenance window won't run before this specified time.
*/
public String getStartDate() {
return this.startDate;
}
/**
*
* The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become active.
* The maintenance window won't run before this specified time.
*
*
* @param startDate
* The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become
* active. The maintenance window won't run before this specified time.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetMaintenanceWindowResult withStartDate(String startDate) {
setStartDate(startDate);
return this;
}
/**
*
* The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become inactive.
* The maintenance window won't run after this specified time.
*
*
* @param endDate
* The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become
* inactive. The maintenance window won't run after this specified time.
*/
public void setEndDate(String endDate) {
this.endDate = endDate;
}
/**
*
* The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become inactive.
* The maintenance window won't run after this specified time.
*
*
* @return The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become
* inactive. The maintenance window won't run after this specified time.
*/
public String getEndDate() {
return this.endDate;
}
/**
*
* The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become inactive.
* The maintenance window won't run after this specified time.
*
*
* @param endDate
* The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become
* inactive. The maintenance window won't run after this specified time.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetMaintenanceWindowResult withEndDate(String endDate) {
setEndDate(endDate);
return this;
}
/**
*
* The schedule of the maintenance window in the form of a cron or rate expression.
*
*
* @param schedule
* The schedule of the maintenance window in the form of a cron or rate expression.
*/
public void setSchedule(String schedule) {
this.schedule = schedule;
}
/**
*
* The schedule of the maintenance window in the form of a cron or rate expression.
*
*
* @return The schedule of the maintenance window in the form of a cron or rate expression.
*/
public String getSchedule() {
return this.schedule;
}
/**
*
* The schedule of the maintenance window in the form of a cron or rate expression.
*
*
* @param schedule
* The schedule of the maintenance window in the form of a cron or rate expression.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetMaintenanceWindowResult withSchedule(String schedule) {
setSchedule(schedule);
return this;
}
/**
*
* The time zone that the scheduled maintenance window executions are based on, in Internet Assigned Numbers
* Authority (IANA) format. For example: "America/Los_Angeles", "UTC", or "Asia/Seoul". For more information, see
* the Time Zone Database on the IANA website.
*
*
* @param scheduleTimezone
* The time zone that the scheduled maintenance window executions are based on, in Internet Assigned Numbers
* Authority (IANA) format. For example: "America/Los_Angeles", "UTC", or "Asia/Seoul". For more information,
* see the Time Zone Database on the IANA website.
*/
public void setScheduleTimezone(String scheduleTimezone) {
this.scheduleTimezone = scheduleTimezone;
}
/**
*
* The time zone that the scheduled maintenance window executions are based on, in Internet Assigned Numbers
* Authority (IANA) format. For example: "America/Los_Angeles", "UTC", or "Asia/Seoul". For more information, see
* the Time Zone Database on the IANA website.
*
*
* @return The time zone that the scheduled maintenance window executions are based on, in Internet Assigned Numbers
* Authority (IANA) format. For example: "America/Los_Angeles", "UTC", or "Asia/Seoul". For more
* information, see the Time Zone Database on the IANA
* website.
*/
public String getScheduleTimezone() {
return this.scheduleTimezone;
}
/**
*
* The time zone that the scheduled maintenance window executions are based on, in Internet Assigned Numbers
* Authority (IANA) format. For example: "America/Los_Angeles", "UTC", or "Asia/Seoul". For more information, see
* the Time Zone Database on the IANA website.
*
*
* @param scheduleTimezone
* The time zone that the scheduled maintenance window executions are based on, in Internet Assigned Numbers
* Authority (IANA) format. For example: "America/Los_Angeles", "UTC", or "Asia/Seoul". For more information,
* see the Time Zone Database on the IANA website.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetMaintenanceWindowResult withScheduleTimezone(String scheduleTimezone) {
setScheduleTimezone(scheduleTimezone);
return this;
}
/**
*
* The number of days to wait to run a maintenance window after the scheduled cron expression date and time.
*
*
* @param scheduleOffset
* The number of days to wait to run a maintenance window after the scheduled cron expression date and time.
*/
public void setScheduleOffset(Integer scheduleOffset) {
this.scheduleOffset = scheduleOffset;
}
/**
*
* The number of days to wait to run a maintenance window after the scheduled cron expression date and time.
*
*
* @return The number of days to wait to run a maintenance window after the scheduled cron expression date and time.
*/
public Integer getScheduleOffset() {
return this.scheduleOffset;
}
/**
*
* The number of days to wait to run a maintenance window after the scheduled cron expression date and time.
*
*
* @param scheduleOffset
* The number of days to wait to run a maintenance window after the scheduled cron expression date and time.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetMaintenanceWindowResult withScheduleOffset(Integer scheduleOffset) {
setScheduleOffset(scheduleOffset);
return this;
}
/**
*
* The next time the maintenance window will actually run, taking into account any specified times for the
* maintenance window to become active or inactive.
*
*
* @param nextExecutionTime
* The next time the maintenance window will actually run, taking into account any specified times for the
* maintenance window to become active or inactive.
*/
public void setNextExecutionTime(String nextExecutionTime) {
this.nextExecutionTime = nextExecutionTime;
}
/**
*
* The next time the maintenance window will actually run, taking into account any specified times for the
* maintenance window to become active or inactive.
*
*
* @return The next time the maintenance window will actually run, taking into account any specified times for the
* maintenance window to become active or inactive.
*/
public String getNextExecutionTime() {
return this.nextExecutionTime;
}
/**
*
* The next time the maintenance window will actually run, taking into account any specified times for the
* maintenance window to become active or inactive.
*
*
* @param nextExecutionTime
* The next time the maintenance window will actually run, taking into account any specified times for the
* maintenance window to become active or inactive.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetMaintenanceWindowResult withNextExecutionTime(String nextExecutionTime) {
setNextExecutionTime(nextExecutionTime);
return this;
}
/**
*
* The duration of the maintenance window in hours.
*
*
* @param duration
* The duration of the maintenance window in hours.
*/
public void setDuration(Integer duration) {
this.duration = duration;
}
/**
*
* The duration of the maintenance window in hours.
*
*
* @return The duration of the maintenance window in hours.
*/
public Integer getDuration() {
return this.duration;
}
/**
*
* The duration of the maintenance window in hours.
*
*
* @param duration
* The duration of the maintenance window in hours.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetMaintenanceWindowResult withDuration(Integer duration) {
setDuration(duration);
return this;
}
/**
*
* The number of hours before the end of the maintenance window that Amazon Web Services Systems Manager stops
* scheduling new tasks for execution.
*
*
* @param cutoff
* The number of hours before the end of the maintenance window that Amazon Web Services Systems Manager
* stops scheduling new tasks for execution.
*/
public void setCutoff(Integer cutoff) {
this.cutoff = cutoff;
}
/**
*
* The number of hours before the end of the maintenance window that Amazon Web Services Systems Manager stops
* scheduling new tasks for execution.
*
*
* @return The number of hours before the end of the maintenance window that Amazon Web Services Systems Manager
* stops scheduling new tasks for execution.
*/
public Integer getCutoff() {
return this.cutoff;
}
/**
*
* The number of hours before the end of the maintenance window that Amazon Web Services Systems Manager stops
* scheduling new tasks for execution.
*
*
* @param cutoff
* The number of hours before the end of the maintenance window that Amazon Web Services Systems Manager
* stops scheduling new tasks for execution.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetMaintenanceWindowResult withCutoff(Integer cutoff) {
setCutoff(cutoff);
return this;
}
/**
*
* Whether targets must be registered with the maintenance window before tasks can be defined for those targets.
*
*
* @param allowUnassociatedTargets
* Whether targets must be registered with the maintenance window before tasks can be defined for those
* targets.
*/
public void setAllowUnassociatedTargets(Boolean allowUnassociatedTargets) {
this.allowUnassociatedTargets = allowUnassociatedTargets;
}
/**
*
* Whether targets must be registered with the maintenance window before tasks can be defined for those targets.
*
*
* @return Whether targets must be registered with the maintenance window before tasks can be defined for those
* targets.
*/
public Boolean getAllowUnassociatedTargets() {
return this.allowUnassociatedTargets;
}
/**
*
* Whether targets must be registered with the maintenance window before tasks can be defined for those targets.
*
*
* @param allowUnassociatedTargets
* Whether targets must be registered with the maintenance window before tasks can be defined for those
* targets.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetMaintenanceWindowResult withAllowUnassociatedTargets(Boolean allowUnassociatedTargets) {
setAllowUnassociatedTargets(allowUnassociatedTargets);
return this;
}
/**
*
* Whether targets must be registered with the maintenance window before tasks can be defined for those targets.
*
*
* @return Whether targets must be registered with the maintenance window before tasks can be defined for those
* targets.
*/
public Boolean isAllowUnassociatedTargets() {
return this.allowUnassociatedTargets;
}
/**
*
* Indicates whether the maintenance window is enabled.
*
*
* @param enabled
* Indicates whether the maintenance window is enabled.
*/
public void setEnabled(Boolean enabled) {
this.enabled = enabled;
}
/**
*
* Indicates whether the maintenance window is enabled.
*
*
* @return Indicates whether the maintenance window is enabled.
*/
public Boolean getEnabled() {
return this.enabled;
}
/**
*
* Indicates whether the maintenance window is enabled.
*
*
* @param enabled
* Indicates whether the maintenance window is enabled.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetMaintenanceWindowResult withEnabled(Boolean enabled) {
setEnabled(enabled);
return this;
}
/**
*
* Indicates whether the maintenance window is enabled.
*
*
* @return Indicates whether the maintenance window is enabled.
*/
public Boolean isEnabled() {
return this.enabled;
}
/**
*
* The date the maintenance window was created.
*
*
* @param createdDate
* The date the maintenance window was created.
*/
public void setCreatedDate(java.util.Date createdDate) {
this.createdDate = createdDate;
}
/**
*
* The date the maintenance window was created.
*
*
* @return The date the maintenance window was created.
*/
public java.util.Date getCreatedDate() {
return this.createdDate;
}
/**
*
* The date the maintenance window was created.
*
*
* @param createdDate
* The date the maintenance window was created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetMaintenanceWindowResult withCreatedDate(java.util.Date createdDate) {
setCreatedDate(createdDate);
return this;
}
/**
*
* The date the maintenance window was last modified.
*
*
* @param modifiedDate
* The date the maintenance window was last modified.
*/
public void setModifiedDate(java.util.Date modifiedDate) {
this.modifiedDate = modifiedDate;
}
/**
*
* The date the maintenance window was last modified.
*
*
* @return The date the maintenance window was last modified.
*/
public java.util.Date getModifiedDate() {
return this.modifiedDate;
}
/**
*
* The date the maintenance window was last modified.
*
*
* @param modifiedDate
* The date the maintenance window was last modified.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetMaintenanceWindowResult withModifiedDate(java.util.Date modifiedDate) {
setModifiedDate(modifiedDate);
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 (getWindowId() != null)
sb.append("WindowId: ").append(getWindowId()).append(",");
if (getName() != null)
sb.append("Name: ").append(getName()).append(",");
if (getDescription() != null)
sb.append("Description: ").append("***Sensitive Data Redacted***").append(",");
if (getStartDate() != null)
sb.append("StartDate: ").append(getStartDate()).append(",");
if (getEndDate() != null)
sb.append("EndDate: ").append(getEndDate()).append(",");
if (getSchedule() != null)
sb.append("Schedule: ").append(getSchedule()).append(",");
if (getScheduleTimezone() != null)
sb.append("ScheduleTimezone: ").append(getScheduleTimezone()).append(",");
if (getScheduleOffset() != null)
sb.append("ScheduleOffset: ").append(getScheduleOffset()).append(",");
if (getNextExecutionTime() != null)
sb.append("NextExecutionTime: ").append(getNextExecutionTime()).append(",");
if (getDuration() != null)
sb.append("Duration: ").append(getDuration()).append(",");
if (getCutoff() != null)
sb.append("Cutoff: ").append(getCutoff()).append(",");
if (getAllowUnassociatedTargets() != null)
sb.append("AllowUnassociatedTargets: ").append(getAllowUnassociatedTargets()).append(",");
if (getEnabled() != null)
sb.append("Enabled: ").append(getEnabled()).append(",");
if (getCreatedDate() != null)
sb.append("CreatedDate: ").append(getCreatedDate()).append(",");
if (getModifiedDate() != null)
sb.append("ModifiedDate: ").append(getModifiedDate());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof GetMaintenanceWindowResult == false)
return false;
GetMaintenanceWindowResult other = (GetMaintenanceWindowResult) obj;
if (other.getWindowId() == null ^ this.getWindowId() == null)
return false;
if (other.getWindowId() != null && other.getWindowId().equals(this.getWindowId()) == false)
return false;
if (other.getName() == null ^ this.getName() == null)
return false;
if (other.getName() != null && other.getName().equals(this.getName()) == false)
return false;
if (other.getDescription() == null ^ this.getDescription() == null)
return false;
if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false)
return false;
if (other.getStartDate() == null ^ this.getStartDate() == null)
return false;
if (other.getStartDate() != null && other.getStartDate().equals(this.getStartDate()) == false)
return false;
if (other.getEndDate() == null ^ this.getEndDate() == null)
return false;
if (other.getEndDate() != null && other.getEndDate().equals(this.getEndDate()) == false)
return false;
if (other.getSchedule() == null ^ this.getSchedule() == null)
return false;
if (other.getSchedule() != null && other.getSchedule().equals(this.getSchedule()) == false)
return false;
if (other.getScheduleTimezone() == null ^ this.getScheduleTimezone() == null)
return false;
if (other.getScheduleTimezone() != null && other.getScheduleTimezone().equals(this.getScheduleTimezone()) == false)
return false;
if (other.getScheduleOffset() == null ^ this.getScheduleOffset() == null)
return false;
if (other.getScheduleOffset() != null && other.getScheduleOffset().equals(this.getScheduleOffset()) == false)
return false;
if (other.getNextExecutionTime() == null ^ this.getNextExecutionTime() == null)
return false;
if (other.getNextExecutionTime() != null && other.getNextExecutionTime().equals(this.getNextExecutionTime()) == false)
return false;
if (other.getDuration() == null ^ this.getDuration() == null)
return false;
if (other.getDuration() != null && other.getDuration().equals(this.getDuration()) == false)
return false;
if (other.getCutoff() == null ^ this.getCutoff() == null)
return false;
if (other.getCutoff() != null && other.getCutoff().equals(this.getCutoff()) == false)
return false;
if (other.getAllowUnassociatedTargets() == null ^ this.getAllowUnassociatedTargets() == null)
return false;
if (other.getAllowUnassociatedTargets() != null && other.getAllowUnassociatedTargets().equals(this.getAllowUnassociatedTargets()) == false)
return false;
if (other.getEnabled() == null ^ this.getEnabled() == null)
return false;
if (other.getEnabled() != null && other.getEnabled().equals(this.getEnabled()) == false)
return false;
if (other.getCreatedDate() == null ^ this.getCreatedDate() == null)
return false;
if (other.getCreatedDate() != null && other.getCreatedDate().equals(this.getCreatedDate()) == false)
return false;
if (other.getModifiedDate() == null ^ this.getModifiedDate() == null)
return false;
if (other.getModifiedDate() != null && other.getModifiedDate().equals(this.getModifiedDate()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getWindowId() == null) ? 0 : getWindowId().hashCode());
hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode());
hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode());
hashCode = prime * hashCode + ((getStartDate() == null) ? 0 : getStartDate().hashCode());
hashCode = prime * hashCode + ((getEndDate() == null) ? 0 : getEndDate().hashCode());
hashCode = prime * hashCode + ((getSchedule() == null) ? 0 : getSchedule().hashCode());
hashCode = prime * hashCode + ((getScheduleTimezone() == null) ? 0 : getScheduleTimezone().hashCode());
hashCode = prime * hashCode + ((getScheduleOffset() == null) ? 0 : getScheduleOffset().hashCode());
hashCode = prime * hashCode + ((getNextExecutionTime() == null) ? 0 : getNextExecutionTime().hashCode());
hashCode = prime * hashCode + ((getDuration() == null) ? 0 : getDuration().hashCode());
hashCode = prime * hashCode + ((getCutoff() == null) ? 0 : getCutoff().hashCode());
hashCode = prime * hashCode + ((getAllowUnassociatedTargets() == null) ? 0 : getAllowUnassociatedTargets().hashCode());
hashCode = prime * hashCode + ((getEnabled() == null) ? 0 : getEnabled().hashCode());
hashCode = prime * hashCode + ((getCreatedDate() == null) ? 0 : getCreatedDate().hashCode());
hashCode = prime * hashCode + ((getModifiedDate() == null) ? 0 : getModifiedDate().hashCode());
return hashCode;
}
@Override
public GetMaintenanceWindowResult clone() {
try {
return (GetMaintenanceWindowResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}