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

* The name of the home region of the calling account. *

*/ private String homeRegion; /** *

* The name of the home region of the calling account. *

* * @param homeRegion * The name of the home region of the calling account. */ public void setHomeRegion(String homeRegion) { this.homeRegion = homeRegion; } /** *

* The name of the home region of the calling account. *

* * @return The name of the home region of the calling account. */ public String getHomeRegion() { return this.homeRegion; } /** *

* The name of the home region of the calling account. *

* * @param homeRegion * The name of the home region of the calling account. * @return Returns a reference to this object so that method calls can be chained together. */ public GetHomeRegionResult withHomeRegion(String homeRegion) { setHomeRegion(homeRegion); 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 (getHomeRegion() != null) sb.append("HomeRegion: ").append(getHomeRegion()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetHomeRegionResult == false) return false; GetHomeRegionResult other = (GetHomeRegionResult) obj; if (other.getHomeRegion() == null ^ this.getHomeRegion() == null) return false; if (other.getHomeRegion() != null && other.getHomeRegion().equals(this.getHomeRegion()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getHomeRegion() == null) ? 0 : getHomeRegion().hashCode()); return hashCode; } @Override public GetHomeRegionResult clone() { try { return (GetHomeRegionResult) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }