/* * 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.qldb.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 CancelJournalKinesisStreamRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *

* The name of the ledger. *

*/ private String ledgerName; /** *

* The UUID (represented in Base62-encoded text) of the QLDB journal stream to be canceled. *

*/ private String streamId; /** *

* The name of the ledger. *

* * @param ledgerName * The name of the ledger. */ public void setLedgerName(String ledgerName) { this.ledgerName = ledgerName; } /** *

* The name of the ledger. *

* * @return The name of the ledger. */ public String getLedgerName() { return this.ledgerName; } /** *

* The name of the ledger. *

* * @param ledgerName * The name of the ledger. * @return Returns a reference to this object so that method calls can be chained together. */ public CancelJournalKinesisStreamRequest withLedgerName(String ledgerName) { setLedgerName(ledgerName); return this; } /** *

* The UUID (represented in Base62-encoded text) of the QLDB journal stream to be canceled. *

* * @param streamId * The UUID (represented in Base62-encoded text) of the QLDB journal stream to be canceled. */ public void setStreamId(String streamId) { this.streamId = streamId; } /** *

* The UUID (represented in Base62-encoded text) of the QLDB journal stream to be canceled. *

* * @return The UUID (represented in Base62-encoded text) of the QLDB journal stream to be canceled. */ public String getStreamId() { return this.streamId; } /** *

* The UUID (represented in Base62-encoded text) of the QLDB journal stream to be canceled. *

* * @param streamId * The UUID (represented in Base62-encoded text) of the QLDB journal stream to be canceled. * @return Returns a reference to this object so that method calls can be chained together. */ public CancelJournalKinesisStreamRequest withStreamId(String streamId) { setStreamId(streamId); 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 (getLedgerName() != null) sb.append("LedgerName: ").append(getLedgerName()).append(","); if (getStreamId() != null) sb.append("StreamId: ").append(getStreamId()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CancelJournalKinesisStreamRequest == false) return false; CancelJournalKinesisStreamRequest other = (CancelJournalKinesisStreamRequest) obj; if (other.getLedgerName() == null ^ this.getLedgerName() == null) return false; if (other.getLedgerName() != null && other.getLedgerName().equals(this.getLedgerName()) == false) return false; if (other.getStreamId() == null ^ this.getStreamId() == null) return false; if (other.getStreamId() != null && other.getStreamId().equals(this.getStreamId()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getLedgerName() == null) ? 0 : getLedgerName().hashCode()); hashCode = prime * hashCode + ((getStreamId() == null) ? 0 : getStreamId().hashCode()); return hashCode; } @Override public CancelJournalKinesisStreamRequest clone() { return (CancelJournalKinesisStreamRequest) super.clone(); } }