/* * 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.simplesystemsmanagement.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class DeregisterTargetFromMaintenanceWindowRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *

* The ID of the maintenance window the target should be removed from. *

*/ private String windowId; /** *

* The ID of the target definition to remove. *

*/ private String windowTargetId; /** *

* The system checks if the target is being referenced by a task. If the target is being referenced, the system * returns an error and doesn't deregister the target from the maintenance window. *

*/ private Boolean safe; /** *

* The ID of the maintenance window the target should be removed from. *

* * @param windowId * The ID of the maintenance window the target should be removed from. */ public void setWindowId(String windowId) { this.windowId = windowId; } /** *

* The ID of the maintenance window the target should be removed from. *

* * @return The ID of the maintenance window the target should be removed from. */ public String getWindowId() { return this.windowId; } /** *

* The ID of the maintenance window the target should be removed from. *

* * @param windowId * The ID of the maintenance window the target should be removed from. * @return Returns a reference to this object so that method calls can be chained together. */ public DeregisterTargetFromMaintenanceWindowRequest withWindowId(String windowId) { setWindowId(windowId); return this; } /** *

* The ID of the target definition to remove. *

* * @param windowTargetId * The ID of the target definition to remove. */ public void setWindowTargetId(String windowTargetId) { this.windowTargetId = windowTargetId; } /** *

* The ID of the target definition to remove. *

* * @return The ID of the target definition to remove. */ public String getWindowTargetId() { return this.windowTargetId; } /** *

* The ID of the target definition to remove. *

* * @param windowTargetId * The ID of the target definition to remove. * @return Returns a reference to this object so that method calls can be chained together. */ public DeregisterTargetFromMaintenanceWindowRequest withWindowTargetId(String windowTargetId) { setWindowTargetId(windowTargetId); return this; } /** *

* The system checks if the target is being referenced by a task. If the target is being referenced, the system * returns an error and doesn't deregister the target from the maintenance window. *

* * @param safe * The system checks if the target is being referenced by a task. If the target is being referenced, the * system returns an error and doesn't deregister the target from the maintenance window. */ public void setSafe(Boolean safe) { this.safe = safe; } /** *

* The system checks if the target is being referenced by a task. If the target is being referenced, the system * returns an error and doesn't deregister the target from the maintenance window. *

* * @return The system checks if the target is being referenced by a task. If the target is being referenced, the * system returns an error and doesn't deregister the target from the maintenance window. */ public Boolean getSafe() { return this.safe; } /** *

* The system checks if the target is being referenced by a task. If the target is being referenced, the system * returns an error and doesn't deregister the target from the maintenance window. *

* * @param safe * The system checks if the target is being referenced by a task. If the target is being referenced, the * system returns an error and doesn't deregister the target from the maintenance window. * @return Returns a reference to this object so that method calls can be chained together. */ public DeregisterTargetFromMaintenanceWindowRequest withSafe(Boolean safe) { setSafe(safe); return this; } /** *

* The system checks if the target is being referenced by a task. If the target is being referenced, the system * returns an error and doesn't deregister the target from the maintenance window. *

* * @return The system checks if the target is being referenced by a task. If the target is being referenced, the * system returns an error and doesn't deregister the target from the maintenance window. */ public Boolean isSafe() { return this.safe; } /** * 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 (getWindowTargetId() != null) sb.append("WindowTargetId: ").append(getWindowTargetId()).append(","); if (getSafe() != null) sb.append("Safe: ").append(getSafe()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DeregisterTargetFromMaintenanceWindowRequest == false) return false; DeregisterTargetFromMaintenanceWindowRequest other = (DeregisterTargetFromMaintenanceWindowRequest) obj; if (other.getWindowId() == null ^ this.getWindowId() == null) return false; if (other.getWindowId() != null && other.getWindowId().equals(this.getWindowId()) == false) return false; if (other.getWindowTargetId() == null ^ this.getWindowTargetId() == null) return false; if (other.getWindowTargetId() != null && other.getWindowTargetId().equals(this.getWindowTargetId()) == false) return false; if (other.getSafe() == null ^ this.getSafe() == null) return false; if (other.getSafe() != null && other.getSafe().equals(this.getSafe()) == 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 + ((getWindowTargetId() == null) ? 0 : getWindowTargetId().hashCode()); hashCode = prime * hashCode + ((getSafe() == null) ? 0 : getSafe().hashCode()); return hashCode; } @Override public DeregisterTargetFromMaintenanceWindowRequest clone() { return (DeregisterTargetFromMaintenanceWindowRequest) super.clone(); } }