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

* The Amazon Resource Name (ARN) for the schema. *

*/ private String schemaArn; /** *

* The name for the schema. *

*/ private String schemaName; /** *

* The name for the registry. *

*/ private String registryName; /** *

* The latest version of the schema. *

*/ private Boolean latestVersion; /** *

* The version number of the schema. *

*/ private Long versionNumber; /** *

* The unique version ID of the schema version. *

*/ private String schemaVersionId; /** *

* The metadata key. *

*/ private String metadataKey; /** *

* The value of the metadata key. *

*/ private String metadataValue; /** *

* The Amazon Resource Name (ARN) for the schema. *

* * @param schemaArn * The Amazon Resource Name (ARN) for the schema. */ public void setSchemaArn(String schemaArn) { this.schemaArn = schemaArn; } /** *

* The Amazon Resource Name (ARN) for the schema. *

* * @return The Amazon Resource Name (ARN) for the schema. */ public String getSchemaArn() { return this.schemaArn; } /** *

* The Amazon Resource Name (ARN) for the schema. *

* * @param schemaArn * The Amazon Resource Name (ARN) for the schema. * @return Returns a reference to this object so that method calls can be chained together. */ public PutSchemaVersionMetadataResult withSchemaArn(String schemaArn) { setSchemaArn(schemaArn); return this; } /** *

* The name for the schema. *

* * @param schemaName * The name for the schema. */ public void setSchemaName(String schemaName) { this.schemaName = schemaName; } /** *

* The name for the schema. *

* * @return The name for the schema. */ public String getSchemaName() { return this.schemaName; } /** *

* The name for the schema. *

* * @param schemaName * The name for the schema. * @return Returns a reference to this object so that method calls can be chained together. */ public PutSchemaVersionMetadataResult withSchemaName(String schemaName) { setSchemaName(schemaName); return this; } /** *

* The name for the registry. *

* * @param registryName * The name for the registry. */ public void setRegistryName(String registryName) { this.registryName = registryName; } /** *

* The name for the registry. *

* * @return The name for the registry. */ public String getRegistryName() { return this.registryName; } /** *

* The name for the registry. *

* * @param registryName * The name for the registry. * @return Returns a reference to this object so that method calls can be chained together. */ public PutSchemaVersionMetadataResult withRegistryName(String registryName) { setRegistryName(registryName); return this; } /** *

* The latest version of the schema. *

* * @param latestVersion * The latest version of the schema. */ public void setLatestVersion(Boolean latestVersion) { this.latestVersion = latestVersion; } /** *

* The latest version of the schema. *

* * @return The latest version of the schema. */ public Boolean getLatestVersion() { return this.latestVersion; } /** *

* The latest version of the schema. *

* * @param latestVersion * The latest version of the schema. * @return Returns a reference to this object so that method calls can be chained together. */ public PutSchemaVersionMetadataResult withLatestVersion(Boolean latestVersion) { setLatestVersion(latestVersion); return this; } /** *

* The latest version of the schema. *

* * @return The latest version of the schema. */ public Boolean isLatestVersion() { return this.latestVersion; } /** *

* The version number of the schema. *

* * @param versionNumber * The version number of the schema. */ public void setVersionNumber(Long versionNumber) { this.versionNumber = versionNumber; } /** *

* The version number of the schema. *

* * @return The version number of the schema. */ public Long getVersionNumber() { return this.versionNumber; } /** *

* The version number of the schema. *

* * @param versionNumber * The version number of the schema. * @return Returns a reference to this object so that method calls can be chained together. */ public PutSchemaVersionMetadataResult withVersionNumber(Long versionNumber) { setVersionNumber(versionNumber); return this; } /** *

* The unique version ID of the schema version. *

* * @param schemaVersionId * The unique version ID of the schema version. */ public void setSchemaVersionId(String schemaVersionId) { this.schemaVersionId = schemaVersionId; } /** *

* The unique version ID of the schema version. *

* * @return The unique version ID of the schema version. */ public String getSchemaVersionId() { return this.schemaVersionId; } /** *

* The unique version ID of the schema version. *

* * @param schemaVersionId * The unique version ID of the schema version. * @return Returns a reference to this object so that method calls can be chained together. */ public PutSchemaVersionMetadataResult withSchemaVersionId(String schemaVersionId) { setSchemaVersionId(schemaVersionId); return this; } /** *

* The metadata key. *

* * @param metadataKey * The metadata key. */ public void setMetadataKey(String metadataKey) { this.metadataKey = metadataKey; } /** *

* The metadata key. *

* * @return The metadata key. */ public String getMetadataKey() { return this.metadataKey; } /** *

* The metadata key. *

* * @param metadataKey * The metadata key. * @return Returns a reference to this object so that method calls can be chained together. */ public PutSchemaVersionMetadataResult withMetadataKey(String metadataKey) { setMetadataKey(metadataKey); return this; } /** *

* The value of the metadata key. *

* * @param metadataValue * The value of the metadata key. */ public void setMetadataValue(String metadataValue) { this.metadataValue = metadataValue; } /** *

* The value of the metadata key. *

* * @return The value of the metadata key. */ public String getMetadataValue() { return this.metadataValue; } /** *

* The value of the metadata key. *

* * @param metadataValue * The value of the metadata key. * @return Returns a reference to this object so that method calls can be chained together. */ public PutSchemaVersionMetadataResult withMetadataValue(String metadataValue) { setMetadataValue(metadataValue); 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 (getSchemaArn() != null) sb.append("SchemaArn: ").append(getSchemaArn()).append(","); if (getSchemaName() != null) sb.append("SchemaName: ").append(getSchemaName()).append(","); if (getRegistryName() != null) sb.append("RegistryName: ").append(getRegistryName()).append(","); if (getLatestVersion() != null) sb.append("LatestVersion: ").append(getLatestVersion()).append(","); if (getVersionNumber() != null) sb.append("VersionNumber: ").append(getVersionNumber()).append(","); if (getSchemaVersionId() != null) sb.append("SchemaVersionId: ").append(getSchemaVersionId()).append(","); if (getMetadataKey() != null) sb.append("MetadataKey: ").append(getMetadataKey()).append(","); if (getMetadataValue() != null) sb.append("MetadataValue: ").append(getMetadataValue()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof PutSchemaVersionMetadataResult == false) return false; PutSchemaVersionMetadataResult other = (PutSchemaVersionMetadataResult) obj; if (other.getSchemaArn() == null ^ this.getSchemaArn() == null) return false; if (other.getSchemaArn() != null && other.getSchemaArn().equals(this.getSchemaArn()) == false) return false; if (other.getSchemaName() == null ^ this.getSchemaName() == null) return false; if (other.getSchemaName() != null && other.getSchemaName().equals(this.getSchemaName()) == false) return false; if (other.getRegistryName() == null ^ this.getRegistryName() == null) return false; if (other.getRegistryName() != null && other.getRegistryName().equals(this.getRegistryName()) == false) return false; if (other.getLatestVersion() == null ^ this.getLatestVersion() == null) return false; if (other.getLatestVersion() != null && other.getLatestVersion().equals(this.getLatestVersion()) == false) return false; if (other.getVersionNumber() == null ^ this.getVersionNumber() == null) return false; if (other.getVersionNumber() != null && other.getVersionNumber().equals(this.getVersionNumber()) == false) return false; if (other.getSchemaVersionId() == null ^ this.getSchemaVersionId() == null) return false; if (other.getSchemaVersionId() != null && other.getSchemaVersionId().equals(this.getSchemaVersionId()) == false) return false; if (other.getMetadataKey() == null ^ this.getMetadataKey() == null) return false; if (other.getMetadataKey() != null && other.getMetadataKey().equals(this.getMetadataKey()) == false) return false; if (other.getMetadataValue() == null ^ this.getMetadataValue() == null) return false; if (other.getMetadataValue() != null && other.getMetadataValue().equals(this.getMetadataValue()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getSchemaArn() == null) ? 0 : getSchemaArn().hashCode()); hashCode = prime * hashCode + ((getSchemaName() == null) ? 0 : getSchemaName().hashCode()); hashCode = prime * hashCode + ((getRegistryName() == null) ? 0 : getRegistryName().hashCode()); hashCode = prime * hashCode + ((getLatestVersion() == null) ? 0 : getLatestVersion().hashCode()); hashCode = prime * hashCode + ((getVersionNumber() == null) ? 0 : getVersionNumber().hashCode()); hashCode = prime * hashCode + ((getSchemaVersionId() == null) ? 0 : getSchemaVersionId().hashCode()); hashCode = prime * hashCode + ((getMetadataKey() == null) ? 0 : getMetadataKey().hashCode()); hashCode = prime * hashCode + ((getMetadataValue() == null) ? 0 : getMetadataValue().hashCode()); return hashCode; } @Override public PutSchemaVersionMetadataResult clone() { try { return (PutSchemaVersionMetadataResult) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }