/* * 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 GetSchemaByDefinitionResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable { /** *

* The schema ID of the schema version. *

*/ private String schemaVersionId; /** *

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

*/ private String schemaArn; /** *

* The data format of the schema definition. Currently AVRO, JSON and * PROTOBUF are supported. *

*/ private String dataFormat; /** *

* The status of the schema version. *

*/ private String status; /** *

* The date and time the schema was created. *

*/ private String createdTime; /** *

* The schema ID of the schema version. *

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

* The schema ID of the schema version. *

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

* The schema ID of the schema version. *

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

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

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

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

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

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

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

* The data format of the schema definition. Currently AVRO, JSON and * PROTOBUF are supported. *

* * @param dataFormat * The data format of the schema definition. Currently AVRO, JSON and * PROTOBUF are supported. * @see DataFormat */ public void setDataFormat(String dataFormat) { this.dataFormat = dataFormat; } /** *

* The data format of the schema definition. Currently AVRO, JSON and * PROTOBUF are supported. *

* * @return The data format of the schema definition. Currently AVRO, JSON and * PROTOBUF are supported. * @see DataFormat */ public String getDataFormat() { return this.dataFormat; } /** *

* The data format of the schema definition. Currently AVRO, JSON and * PROTOBUF are supported. *

* * @param dataFormat * The data format of the schema definition. Currently AVRO, JSON and * PROTOBUF are supported. * @return Returns a reference to this object so that method calls can be chained together. * @see DataFormat */ public GetSchemaByDefinitionResult withDataFormat(String dataFormat) { setDataFormat(dataFormat); return this; } /** *

* The data format of the schema definition. Currently AVRO, JSON and * PROTOBUF are supported. *

* * @param dataFormat * The data format of the schema definition. Currently AVRO, JSON and * PROTOBUF are supported. * @return Returns a reference to this object so that method calls can be chained together. * @see DataFormat */ public GetSchemaByDefinitionResult withDataFormat(DataFormat dataFormat) { this.dataFormat = dataFormat.toString(); return this; } /** *

* The status of the schema version. *

* * @param status * The status of the schema version. * @see SchemaVersionStatus */ public void setStatus(String status) { this.status = status; } /** *

* The status of the schema version. *

* * @return The status of the schema version. * @see SchemaVersionStatus */ public String getStatus() { return this.status; } /** *

* The status of the schema version. *

* * @param status * The status of the schema version. * @return Returns a reference to this object so that method calls can be chained together. * @see SchemaVersionStatus */ public GetSchemaByDefinitionResult withStatus(String status) { setStatus(status); return this; } /** *

* The status of the schema version. *

* * @param status * The status of the schema version. * @return Returns a reference to this object so that method calls can be chained together. * @see SchemaVersionStatus */ public GetSchemaByDefinitionResult withStatus(SchemaVersionStatus status) { this.status = status.toString(); return this; } /** *

* The date and time the schema was created. *

* * @param createdTime * The date and time the schema was created. */ public void setCreatedTime(String createdTime) { this.createdTime = createdTime; } /** *

* The date and time the schema was created. *

* * @return The date and time the schema was created. */ public String getCreatedTime() { return this.createdTime; } /** *

* The date and time the schema was created. *

* * @param createdTime * The date and time the schema was created. * @return Returns a reference to this object so that method calls can be chained together. */ public GetSchemaByDefinitionResult withCreatedTime(String createdTime) { setCreatedTime(createdTime); 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 (getSchemaVersionId() != null) sb.append("SchemaVersionId: ").append(getSchemaVersionId()).append(","); if (getSchemaArn() != null) sb.append("SchemaArn: ").append(getSchemaArn()).append(","); if (getDataFormat() != null) sb.append("DataFormat: ").append(getDataFormat()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getCreatedTime() != null) sb.append("CreatedTime: ").append(getCreatedTime()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetSchemaByDefinitionResult == false) return false; GetSchemaByDefinitionResult other = (GetSchemaByDefinitionResult) obj; if (other.getSchemaVersionId() == null ^ this.getSchemaVersionId() == null) return false; if (other.getSchemaVersionId() != null && other.getSchemaVersionId().equals(this.getSchemaVersionId()) == false) return false; if (other.getSchemaArn() == null ^ this.getSchemaArn() == null) return false; if (other.getSchemaArn() != null && other.getSchemaArn().equals(this.getSchemaArn()) == false) return false; if (other.getDataFormat() == null ^ this.getDataFormat() == null) return false; if (other.getDataFormat() != null && other.getDataFormat().equals(this.getDataFormat()) == false) return false; if (other.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; if (other.getCreatedTime() == null ^ this.getCreatedTime() == null) return false; if (other.getCreatedTime() != null && other.getCreatedTime().equals(this.getCreatedTime()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getSchemaVersionId() == null) ? 0 : getSchemaVersionId().hashCode()); hashCode = prime * hashCode + ((getSchemaArn() == null) ? 0 : getSchemaArn().hashCode()); hashCode = prime * hashCode + ((getDataFormat() == null) ? 0 : getDataFormat().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getCreatedTime() == null) ? 0 : getCreatedTime().hashCode()); return hashCode; } @Override public GetSchemaByDefinitionResult clone() { try { return (GetSchemaByDefinitionResult) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }