/* * 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.managedblockchain.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Properties of a proposal. *
** Applies only to Hyperledger Fabric. *
* * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ProposalSummary implements Serializable, Cloneable, StructuredPojo { /** ** The unique identifier of the proposal. *
*/ private String proposalId; /** ** The description of the proposal. *
*/ private String description; /** ** The unique identifier of the member that created the proposal. *
*/ private String proposedByMemberId; /** ** The name of the member that created the proposal. *
*/ private String proposedByMemberName; /** ** The status of the proposal. Values are as follows: *
*
* IN_PROGRESS
- The proposal is active and open for member voting.
*
* APPROVED
- The proposal was approved with sufficient YES
votes among members according
* to the VotingPolicy
specified for the Network
. The specified proposal actions are
* carried out.
*
* REJECTED
- The proposal was rejected with insufficient YES
votes among members
* according to the VotingPolicy
specified for the Network
. The specified
* ProposalActions
aren't carried out.
*
* EXPIRED
- Members didn't cast the number of votes required to determine the proposal outcome before
* the proposal expired. The specified ProposalActions
aren't carried out.
*
* ACTION_FAILED
- One or more of the specified ProposalActions
in a proposal that was
* approved couldn't be completed because of an error.
*
* The date and time that the proposal was created. *
*/ private java.util.Date creationDate; /** *
* The date and time that the proposal expires. This is the CreationDate
plus the
* ProposalDurationInHours
that is specified in the ProposalThresholdPolicy
. After this
* date and time, if members haven't cast enough votes to determine the outcome according to the voting policy, the
* proposal is EXPIRED
and Actions
aren't carried out.
*
* The Amazon Resource Name (ARN) of the proposal. For more information about ARNs and their format, see Amazon Resource Names * (ARNs) in the Amazon Web Services General Reference. *
*/ private String arn; /** ** The unique identifier of the proposal. *
* * @param proposalId * The unique identifier of the proposal. */ public void setProposalId(String proposalId) { this.proposalId = proposalId; } /** ** The unique identifier of the proposal. *
* * @return The unique identifier of the proposal. */ public String getProposalId() { return this.proposalId; } /** ** The unique identifier of the proposal. *
* * @param proposalId * The unique identifier of the proposal. * @return Returns a reference to this object so that method calls can be chained together. */ public ProposalSummary withProposalId(String proposalId) { setProposalId(proposalId); return this; } /** ** The description of the proposal. *
* * @param description * The description of the proposal. */ public void setDescription(String description) { this.description = description; } /** ** The description of the proposal. *
* * @return The description of the proposal. */ public String getDescription() { return this.description; } /** ** The description of the proposal. *
* * @param description * The description of the proposal. * @return Returns a reference to this object so that method calls can be chained together. */ public ProposalSummary withDescription(String description) { setDescription(description); return this; } /** ** The unique identifier of the member that created the proposal. *
* * @param proposedByMemberId * The unique identifier of the member that created the proposal. */ public void setProposedByMemberId(String proposedByMemberId) { this.proposedByMemberId = proposedByMemberId; } /** ** The unique identifier of the member that created the proposal. *
* * @return The unique identifier of the member that created the proposal. */ public String getProposedByMemberId() { return this.proposedByMemberId; } /** ** The unique identifier of the member that created the proposal. *
* * @param proposedByMemberId * The unique identifier of the member that created the proposal. * @return Returns a reference to this object so that method calls can be chained together. */ public ProposalSummary withProposedByMemberId(String proposedByMemberId) { setProposedByMemberId(proposedByMemberId); return this; } /** ** The name of the member that created the proposal. *
* * @param proposedByMemberName * The name of the member that created the proposal. */ public void setProposedByMemberName(String proposedByMemberName) { this.proposedByMemberName = proposedByMemberName; } /** ** The name of the member that created the proposal. *
* * @return The name of the member that created the proposal. */ public String getProposedByMemberName() { return this.proposedByMemberName; } /** ** The name of the member that created the proposal. *
* * @param proposedByMemberName * The name of the member that created the proposal. * @return Returns a reference to this object so that method calls can be chained together. */ public ProposalSummary withProposedByMemberName(String proposedByMemberName) { setProposedByMemberName(proposedByMemberName); return this; } /** ** The status of the proposal. Values are as follows: *
*
* IN_PROGRESS
- The proposal is active and open for member voting.
*
* APPROVED
- The proposal was approved with sufficient YES
votes among members according
* to the VotingPolicy
specified for the Network
. The specified proposal actions are
* carried out.
*
* REJECTED
- The proposal was rejected with insufficient YES
votes among members
* according to the VotingPolicy
specified for the Network
. The specified
* ProposalActions
aren't carried out.
*
* EXPIRED
- Members didn't cast the number of votes required to determine the proposal outcome before
* the proposal expired. The specified ProposalActions
aren't carried out.
*
* ACTION_FAILED
- One or more of the specified ProposalActions
in a proposal that was
* approved couldn't be completed because of an error.
*
* IN_PROGRESS
- The proposal is active and open for member voting.
*
* APPROVED
- The proposal was approved with sufficient YES
votes among members
* according to the VotingPolicy
specified for the Network
. The specified proposal
* actions are carried out.
*
* REJECTED
- The proposal was rejected with insufficient YES
votes among members
* according to the VotingPolicy
specified for the Network
. The specified
* ProposalActions
aren't carried out.
*
* EXPIRED
- Members didn't cast the number of votes required to determine the proposal outcome
* before the proposal expired. The specified ProposalActions
aren't carried out.
*
* ACTION_FAILED
- One or more of the specified ProposalActions
in a proposal that
* was approved couldn't be completed because of an error.
*
* The status of the proposal. Values are as follows: *
*
* IN_PROGRESS
- The proposal is active and open for member voting.
*
* APPROVED
- The proposal was approved with sufficient YES
votes among members according
* to the VotingPolicy
specified for the Network
. The specified proposal actions are
* carried out.
*
* REJECTED
- The proposal was rejected with insufficient YES
votes among members
* according to the VotingPolicy
specified for the Network
. The specified
* ProposalActions
aren't carried out.
*
* EXPIRED
- Members didn't cast the number of votes required to determine the proposal outcome before
* the proposal expired. The specified ProposalActions
aren't carried out.
*
* ACTION_FAILED
- One or more of the specified ProposalActions
in a proposal that was
* approved couldn't be completed because of an error.
*
* IN_PROGRESS
- The proposal is active and open for member voting.
*
* APPROVED
- The proposal was approved with sufficient YES
votes among members
* according to the VotingPolicy
specified for the Network
. The specified proposal
* actions are carried out.
*
* REJECTED
- The proposal was rejected with insufficient YES
votes among members
* according to the VotingPolicy
specified for the Network
. The specified
* ProposalActions
aren't carried out.
*
* EXPIRED
- Members didn't cast the number of votes required to determine the proposal outcome
* before the proposal expired. The specified ProposalActions
aren't carried out.
*
* ACTION_FAILED
- One or more of the specified ProposalActions
in a proposal that
* was approved couldn't be completed because of an error.
*
* The status of the proposal. Values are as follows: *
*
* IN_PROGRESS
- The proposal is active and open for member voting.
*
* APPROVED
- The proposal was approved with sufficient YES
votes among members according
* to the VotingPolicy
specified for the Network
. The specified proposal actions are
* carried out.
*
* REJECTED
- The proposal was rejected with insufficient YES
votes among members
* according to the VotingPolicy
specified for the Network
. The specified
* ProposalActions
aren't carried out.
*
* EXPIRED
- Members didn't cast the number of votes required to determine the proposal outcome before
* the proposal expired. The specified ProposalActions
aren't carried out.
*
* ACTION_FAILED
- One or more of the specified ProposalActions
in a proposal that was
* approved couldn't be completed because of an error.
*
* IN_PROGRESS
- The proposal is active and open for member voting.
*
* APPROVED
- The proposal was approved with sufficient YES
votes among members
* according to the VotingPolicy
specified for the Network
. The specified proposal
* actions are carried out.
*
* REJECTED
- The proposal was rejected with insufficient YES
votes among members
* according to the VotingPolicy
specified for the Network
. The specified
* ProposalActions
aren't carried out.
*
* EXPIRED
- Members didn't cast the number of votes required to determine the proposal outcome
* before the proposal expired. The specified ProposalActions
aren't carried out.
*
* ACTION_FAILED
- One or more of the specified ProposalActions
in a proposal that
* was approved couldn't be completed because of an error.
*
* The status of the proposal. Values are as follows: *
*
* IN_PROGRESS
- The proposal is active and open for member voting.
*
* APPROVED
- The proposal was approved with sufficient YES
votes among members according
* to the VotingPolicy
specified for the Network
. The specified proposal actions are
* carried out.
*
* REJECTED
- The proposal was rejected with insufficient YES
votes among members
* according to the VotingPolicy
specified for the Network
. The specified
* ProposalActions
aren't carried out.
*
* EXPIRED
- Members didn't cast the number of votes required to determine the proposal outcome before
* the proposal expired. The specified ProposalActions
aren't carried out.
*
* ACTION_FAILED
- One or more of the specified ProposalActions
in a proposal that was
* approved couldn't be completed because of an error.
*
* IN_PROGRESS
- The proposal is active and open for member voting.
*
* APPROVED
- The proposal was approved with sufficient YES
votes among members
* according to the VotingPolicy
specified for the Network
. The specified proposal
* actions are carried out.
*
* REJECTED
- The proposal was rejected with insufficient YES
votes among members
* according to the VotingPolicy
specified for the Network
. The specified
* ProposalActions
aren't carried out.
*
* EXPIRED
- Members didn't cast the number of votes required to determine the proposal outcome
* before the proposal expired. The specified ProposalActions
aren't carried out.
*
* ACTION_FAILED
- One or more of the specified ProposalActions
in a proposal that
* was approved couldn't be completed because of an error.
*
* The date and time that the proposal was created. *
* * @param creationDate * The date and time that the proposal was created. */ public void setCreationDate(java.util.Date creationDate) { this.creationDate = creationDate; } /** ** The date and time that the proposal was created. *
* * @return The date and time that the proposal was created. */ public java.util.Date getCreationDate() { return this.creationDate; } /** ** The date and time that the proposal was created. *
* * @param creationDate * The date and time that the proposal was created. * @return Returns a reference to this object so that method calls can be chained together. */ public ProposalSummary withCreationDate(java.util.Date creationDate) { setCreationDate(creationDate); return this; } /** *
* The date and time that the proposal expires. This is the CreationDate
plus the
* ProposalDurationInHours
that is specified in the ProposalThresholdPolicy
. After this
* date and time, if members haven't cast enough votes to determine the outcome according to the voting policy, the
* proposal is EXPIRED
and Actions
aren't carried out.
*
CreationDate
plus the
* ProposalDurationInHours
that is specified in the ProposalThresholdPolicy
. After
* this date and time, if members haven't cast enough votes to determine the outcome according to the voting
* policy, the proposal is EXPIRED
and Actions
aren't carried out.
*/
public void setExpirationDate(java.util.Date expirationDate) {
this.expirationDate = expirationDate;
}
/**
*
* The date and time that the proposal expires. This is the CreationDate
plus the
* ProposalDurationInHours
that is specified in the ProposalThresholdPolicy
. After this
* date and time, if members haven't cast enough votes to determine the outcome according to the voting policy, the
* proposal is EXPIRED
and Actions
aren't carried out.
*
CreationDate
plus the
* ProposalDurationInHours
that is specified in the ProposalThresholdPolicy
. After
* this date and time, if members haven't cast enough votes to determine the outcome according to the voting
* policy, the proposal is EXPIRED
and Actions
aren't carried out.
*/
public java.util.Date getExpirationDate() {
return this.expirationDate;
}
/**
*
* The date and time that the proposal expires. This is the CreationDate
plus the
* ProposalDurationInHours
that is specified in the ProposalThresholdPolicy
. After this
* date and time, if members haven't cast enough votes to determine the outcome according to the voting policy, the
* proposal is EXPIRED
and Actions
aren't carried out.
*
CreationDate
plus the
* ProposalDurationInHours
that is specified in the ProposalThresholdPolicy
. After
* this date and time, if members haven't cast enough votes to determine the outcome according to the voting
* policy, the proposal is EXPIRED
and Actions
aren't carried out.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ProposalSummary withExpirationDate(java.util.Date expirationDate) {
setExpirationDate(expirationDate);
return this;
}
/**
* * The Amazon Resource Name (ARN) of the proposal. For more information about ARNs and their format, see Amazon Resource Names * (ARNs) in the Amazon Web Services General Reference. *
* * @param arn * The Amazon Resource Name (ARN) of the proposal. For more information about ARNs and their format, see Amazon Resource Names * (ARNs) in the Amazon Web Services General Reference. */ public void setArn(String arn) { this.arn = arn; } /** ** The Amazon Resource Name (ARN) of the proposal. For more information about ARNs and their format, see Amazon Resource Names * (ARNs) in the Amazon Web Services General Reference. *
* * @return The Amazon Resource Name (ARN) of the proposal. For more information about ARNs and their format, see Amazon Resource Names * (ARNs) in the Amazon Web Services General Reference. */ public String getArn() { return this.arn; } /** ** The Amazon Resource Name (ARN) of the proposal. For more information about ARNs and their format, see Amazon Resource Names * (ARNs) in the Amazon Web Services General Reference. *
* * @param arn * The Amazon Resource Name (ARN) of the proposal. For more information about ARNs and their format, see Amazon Resource Names * (ARNs) in the Amazon Web Services General Reference. * @return Returns a reference to this object so that method calls can be chained together. */ public ProposalSummary withArn(String arn) { setArn(arn); 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 (getProposalId() != null) sb.append("ProposalId: ").append(getProposalId()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getProposedByMemberId() != null) sb.append("ProposedByMemberId: ").append(getProposedByMemberId()).append(","); if (getProposedByMemberName() != null) sb.append("ProposedByMemberName: ").append(getProposedByMemberName()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getCreationDate() != null) sb.append("CreationDate: ").append(getCreationDate()).append(","); if (getExpirationDate() != null) sb.append("ExpirationDate: ").append(getExpirationDate()).append(","); if (getArn() != null) sb.append("Arn: ").append(getArn()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ProposalSummary == false) return false; ProposalSummary other = (ProposalSummary) obj; if (other.getProposalId() == null ^ this.getProposalId() == null) return false; if (other.getProposalId() != null && other.getProposalId().equals(this.getProposalId()) == false) return false; if (other.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false) return false; if (other.getProposedByMemberId() == null ^ this.getProposedByMemberId() == null) return false; if (other.getProposedByMemberId() != null && other.getProposedByMemberId().equals(this.getProposedByMemberId()) == false) return false; if (other.getProposedByMemberName() == null ^ this.getProposedByMemberName() == null) return false; if (other.getProposedByMemberName() != null && other.getProposedByMemberName().equals(this.getProposedByMemberName()) == 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.getCreationDate() == null ^ this.getCreationDate() == null) return false; if (other.getCreationDate() != null && other.getCreationDate().equals(this.getCreationDate()) == false) return false; if (other.getExpirationDate() == null ^ this.getExpirationDate() == null) return false; if (other.getExpirationDate() != null && other.getExpirationDate().equals(this.getExpirationDate()) == false) return false; if (other.getArn() == null ^ this.getArn() == null) return false; if (other.getArn() != null && other.getArn().equals(this.getArn()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getProposalId() == null) ? 0 : getProposalId().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getProposedByMemberId() == null) ? 0 : getProposedByMemberId().hashCode()); hashCode = prime * hashCode + ((getProposedByMemberName() == null) ? 0 : getProposedByMemberName().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getCreationDate() == null) ? 0 : getCreationDate().hashCode()); hashCode = prime * hashCode + ((getExpirationDate() == null) ? 0 : getExpirationDate().hashCode()); hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode()); return hashCode; } @Override public ProposalSummary clone() { try { return (ProposalSummary) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.managedblockchain.model.transform.ProposalSummaryMarshaller.getInstance().marshall(this, protocolMarshaller); } }