com.amazonaws.services.simplesystemsmanagement.model.GetDeployablePatchSnapshotForInstanceResult 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 GetDeployablePatchSnapshotForInstanceResult extends com.amazonaws.AmazonWebServiceResult implements Serializable,
Cloneable {
/**
*
* The managed node ID.
*
*/
private String instanceId;
/**
*
* The user-defined snapshot ID.
*
*/
private String snapshotId;
/**
*
* A pre-signed Amazon Simple Storage Service (Amazon S3) URL that can be used to download the patch snapshot.
*
*/
private String snapshotDownloadUrl;
/**
*
* Returns the specific operating system (for example Windows Server 2012 or Amazon Linux 2015.09) on the managed
* node for the specified patch snapshot.
*
*/
private String product;
/**
*
* The managed node ID.
*
*
* @param instanceId
* The managed node ID.
*/
public void setInstanceId(String instanceId) {
this.instanceId = instanceId;
}
/**
*
* The managed node ID.
*
*
* @return The managed node ID.
*/
public String getInstanceId() {
return this.instanceId;
}
/**
*
* The managed node ID.
*
*
* @param instanceId
* The managed node ID.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetDeployablePatchSnapshotForInstanceResult withInstanceId(String instanceId) {
setInstanceId(instanceId);
return this;
}
/**
*
* The user-defined snapshot ID.
*
*
* @param snapshotId
* The user-defined snapshot ID.
*/
public void setSnapshotId(String snapshotId) {
this.snapshotId = snapshotId;
}
/**
*
* The user-defined snapshot ID.
*
*
* @return The user-defined snapshot ID.
*/
public String getSnapshotId() {
return this.snapshotId;
}
/**
*
* The user-defined snapshot ID.
*
*
* @param snapshotId
* The user-defined snapshot ID.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetDeployablePatchSnapshotForInstanceResult withSnapshotId(String snapshotId) {
setSnapshotId(snapshotId);
return this;
}
/**
*
* A pre-signed Amazon Simple Storage Service (Amazon S3) URL that can be used to download the patch snapshot.
*
*
* @param snapshotDownloadUrl
* A pre-signed Amazon Simple Storage Service (Amazon S3) URL that can be used to download the patch
* snapshot.
*/
public void setSnapshotDownloadUrl(String snapshotDownloadUrl) {
this.snapshotDownloadUrl = snapshotDownloadUrl;
}
/**
*
* A pre-signed Amazon Simple Storage Service (Amazon S3) URL that can be used to download the patch snapshot.
*
*
* @return A pre-signed Amazon Simple Storage Service (Amazon S3) URL that can be used to download the patch
* snapshot.
*/
public String getSnapshotDownloadUrl() {
return this.snapshotDownloadUrl;
}
/**
*
* A pre-signed Amazon Simple Storage Service (Amazon S3) URL that can be used to download the patch snapshot.
*
*
* @param snapshotDownloadUrl
* A pre-signed Amazon Simple Storage Service (Amazon S3) URL that can be used to download the patch
* snapshot.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetDeployablePatchSnapshotForInstanceResult withSnapshotDownloadUrl(String snapshotDownloadUrl) {
setSnapshotDownloadUrl(snapshotDownloadUrl);
return this;
}
/**
*
* Returns the specific operating system (for example Windows Server 2012 or Amazon Linux 2015.09) on the managed
* node for the specified patch snapshot.
*
*
* @param product
* Returns the specific operating system (for example Windows Server 2012 or Amazon Linux 2015.09) on the
* managed node for the specified patch snapshot.
*/
public void setProduct(String product) {
this.product = product;
}
/**
*
* Returns the specific operating system (for example Windows Server 2012 or Amazon Linux 2015.09) on the managed
* node for the specified patch snapshot.
*
*
* @return Returns the specific operating system (for example Windows Server 2012 or Amazon Linux 2015.09) on the
* managed node for the specified patch snapshot.
*/
public String getProduct() {
return this.product;
}
/**
*
* Returns the specific operating system (for example Windows Server 2012 or Amazon Linux 2015.09) on the managed
* node for the specified patch snapshot.
*
*
* @param product
* Returns the specific operating system (for example Windows Server 2012 or Amazon Linux 2015.09) on the
* managed node for the specified patch snapshot.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetDeployablePatchSnapshotForInstanceResult withProduct(String product) {
setProduct(product);
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 (getInstanceId() != null)
sb.append("InstanceId: ").append(getInstanceId()).append(",");
if (getSnapshotId() != null)
sb.append("SnapshotId: ").append(getSnapshotId()).append(",");
if (getSnapshotDownloadUrl() != null)
sb.append("SnapshotDownloadUrl: ").append(getSnapshotDownloadUrl()).append(",");
if (getProduct() != null)
sb.append("Product: ").append(getProduct());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof GetDeployablePatchSnapshotForInstanceResult == false)
return false;
GetDeployablePatchSnapshotForInstanceResult other = (GetDeployablePatchSnapshotForInstanceResult) obj;
if (other.getInstanceId() == null ^ this.getInstanceId() == null)
return false;
if (other.getInstanceId() != null && other.getInstanceId().equals(this.getInstanceId()) == false)
return false;
if (other.getSnapshotId() == null ^ this.getSnapshotId() == null)
return false;
if (other.getSnapshotId() != null && other.getSnapshotId().equals(this.getSnapshotId()) == false)
return false;
if (other.getSnapshotDownloadUrl() == null ^ this.getSnapshotDownloadUrl() == null)
return false;
if (other.getSnapshotDownloadUrl() != null && other.getSnapshotDownloadUrl().equals(this.getSnapshotDownloadUrl()) == false)
return false;
if (other.getProduct() == null ^ this.getProduct() == null)
return false;
if (other.getProduct() != null && other.getProduct().equals(this.getProduct()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getInstanceId() == null) ? 0 : getInstanceId().hashCode());
hashCode = prime * hashCode + ((getSnapshotId() == null) ? 0 : getSnapshotId().hashCode());
hashCode = prime * hashCode + ((getSnapshotDownloadUrl() == null) ? 0 : getSnapshotDownloadUrl().hashCode());
hashCode = prime * hashCode + ((getProduct() == null) ? 0 : getProduct().hashCode());
return hashCode;
}
@Override
public GetDeployablePatchSnapshotForInstanceResult clone() {
try {
return (GetDeployablePatchSnapshotForInstanceResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}