@Test public void shouldConvertToInternalObject() { final Validator validator = new Validator(validatorInternal); assertThat(validator.asInternalValidator()).isEqualTo(validatorInternal); }
public tech.pegasys.teku.datastructures.state.Validator asInternalValidator() { return tech.pegasys.teku.datastructures.state.Validator.create( pubkey.asBLSPublicKey(), withdrawal_credentials, effective_balance, slashed, activation_eligibility_epoch, activation_epoch, exit_epoch, withdrawable_epoch); }
Validator { public tech.pegasys.teku.datastructures.state.Validator asInternalValidator() { return tech.pegasys.teku.datastructures.state.Validator.create( pubkey.asBLSPublicKey(), withdrawal_credentials, effective_balance, slashed, activation_eligibility_epoch, activation_epoch, exit_epoch, withdrawable_epoch); } }
Validator { public tech.pegasys.teku.datastructures.state.Validator asInternalValidator() { return tech.pegasys.teku.datastructures.state.Validator.create( pubkey.asBLSPublicKey(), withdrawal_credentials, effective_balance, slashed, activation_eligibility_epoch, activation_epoch, exit_epoch, withdrawable_epoch); } @JsonCreator  Validator(
      @JsonProperty("pubkey") final BLSPubKey pubkey,
      @JsonProperty("withdrawal_credentials") final Bytes32 withdrawal_credentials,
      @JsonProperty("effective_balance") final UInt64 effective_balance,
      @JsonProperty("slashed") final boolean slashed,
      @JsonProperty("activation_eligibility_epoch") final UInt64 activation_eligibility_epoch,
      @JsonProperty("activation_epoch") final UInt64 activation_epoch,
      @JsonProperty("exit_epoch") final UInt64 exit_epoch,
      @JsonProperty("withdrawable_epoch") final UInt64 withdrawable_epoch);  Validator(final tech.pegasys.teku.datastructures.state.Validator validator); }
Validator { public tech.pegasys.teku.datastructures.state.Validator asInternalValidator() { return tech.pegasys.teku.datastructures.state.Validator.create( pubkey.asBLSPublicKey(), withdrawal_credentials, effective_balance, slashed, activation_eligibility_epoch, activation_epoch, exit_epoch, withdrawable_epoch); } @JsonCreator  Validator(
      @JsonProperty("pubkey") final BLSPubKey pubkey,
      @JsonProperty("withdrawal_credentials") final Bytes32 withdrawal_credentials,
      @JsonProperty("effective_balance") final UInt64 effective_balance,
      @JsonProperty("slashed") final boolean slashed,
      @JsonProperty("activation_eligibility_epoch") final UInt64 activation_eligibility_epoch,
      @JsonProperty("activation_epoch") final UInt64 activation_epoch,
      @JsonProperty("exit_epoch") final UInt64 exit_epoch,
      @JsonProperty("withdrawable_epoch") final UInt64 withdrawable_epoch);  Validator(final tech.pegasys.teku.datastructures.state.Validator validator); tech.pegasys.teku.datastructures.state.Validator asInternalValidator(); @Override boolean equals(final Object o); @Override int hashCode(); }
Validator { public tech.pegasys.teku.datastructures.state.Validator asInternalValidator() { return tech.pegasys.teku.datastructures.state.Validator.create( pubkey.asBLSPublicKey(), withdrawal_credentials, effective_balance, slashed, activation_eligibility_epoch, activation_epoch, exit_epoch, withdrawable_epoch); } @JsonCreator  Validator(
      @JsonProperty("pubkey") final BLSPubKey pubkey,
      @JsonProperty("withdrawal_credentials") final Bytes32 withdrawal_credentials,
      @JsonProperty("effective_balance") final UInt64 effective_balance,
      @JsonProperty("slashed") final boolean slashed,
      @JsonProperty("activation_eligibility_epoch") final UInt64 activation_eligibility_epoch,
      @JsonProperty("activation_epoch") final UInt64 activation_epoch,
      @JsonProperty("exit_epoch") final UInt64 exit_epoch,
      @JsonProperty("withdrawable_epoch") final UInt64 withdrawable_epoch);  Validator(final tech.pegasys.teku.datastructures.state.Validator validator); tech.pegasys.teku.datastructures.state.Validator asInternalValidator(); @Override boolean equals(final Object o); @Override int hashCode(); @Schema(
      type = "string",
      pattern = PATTERN_PUBKEY,
      example = EXAMPLE_PUBKEY,
      description = DESCRIPTION_BYTES48)
  final BLSPubKey pubkey; @Schema(
      type = "string",
      pattern = PATTERN_BYTES32,
      example = EXAMPLE_BYTES32,
      description = "Root of withdrawal credentials")
  final Bytes32 withdrawal_credentials; @Schema(type = "string", example = EXAMPLE_UINT64, description = "Balance at stake in Gwei.")
  final UInt64 effective_balance; final boolean slashed; @Schema(
      type = "string",
      example = EXAMPLE_UINT64,
      description = "When criteria for activation were met.")
  final UInt64 activation_eligibility_epoch; @Schema(
      type = "string",
      example = EXAMPLE_UINT64,
      description = "Epoch when validator activated. 'FAR_FUTURE_EPOCH' if not activated.")
  final UInt64 activation_epoch; @Schema(
      type = "string",
      example = EXAMPLE_UINT64,
      description = "Epoch when validator exited. 'FAR_FUTURE_EPOCH' if not exited.")
  final UInt64 exit_epoch; @Schema(
      type = "string",
      example = EXAMPLE_UINT64,
      description =
          "When validator can withdraw or transfer funds. 'FAR_FUTURE_EPOCH' if not defined.")
  final UInt64 withdrawable_epoch; }