@Override public AccountLimit build() { return new AccountLimit(this); }
@Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(totalCodeSize()); hashCode = 31 * hashCode + Objects.hashCode(codeSizeUnzipped()); hashCode = 31 * hashCode + Objects.hashCode(codeSizeZipped()); hashCode = 31 * hashCode + Objects.hashCode(concurrentExecutions()); hashCode = 31 * hashCode + Objects.hashCode(unreservedConcurrentExecutions()); return hashCode; }
public final AccountLimit.Builder getAccountLimit() { return accountLimit != null ? accountLimit.toBuilder() : null; }
/** * <p> * Limits related to concurrency and code storage. * </p> * This is a convenience that creates an instance of the {@link AccountLimit.Builder} avoiding the need to * create one manually via {@link AccountLimit#builder()}. * * When the {@link Consumer} completes, {@link AccountLimit.Builder#build()} is called immediately and its * result is passed to {@link #accountLimit(AccountLimit)}. * * @param accountLimit * a consumer that will call methods on {@link AccountLimit.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #accountLimit(AccountLimit) */ default Builder accountLimit(Consumer<AccountLimit.Builder> accountLimit) { return accountLimit(AccountLimit.builder().applyMutation(accountLimit).build()); }
/** * <p> * Limits related to concurrency and code storage. * </p> * This is a convenience that creates an instance of the {@link AccountLimit.Builder} avoiding the need to * create one manually via {@link AccountLimit#builder()}. * * When the {@link Consumer} completes, {@link AccountLimit.Builder#build()} is called immediately and its * result is passed to {@link #accountLimit(AccountLimit)}. * * @param accountLimit * a consumer that will call methods on {@link AccountLimit.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #accountLimit(AccountLimit) */ default Builder accountLimit(Consumer<AccountLimit.Builder> accountLimit) { return accountLimit(AccountLimit.builder().applyMutation(accountLimit).build()); }
@Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(totalCodeSize()); hashCode = 31 * hashCode + Objects.hashCode(codeSizeUnzipped()); hashCode = 31 * hashCode + Objects.hashCode(codeSizeZipped()); hashCode = 31 * hashCode + Objects.hashCode(concurrentExecutions()); hashCode = 31 * hashCode + Objects.hashCode(unreservedConcurrentExecutions()); return hashCode; }
@Override public AccountLimit build() { return new AccountLimit(this); }
public final AccountLimit.Builder getAccountLimit() { return accountLimit != null ? accountLimit.toBuilder() : null; }
/** * 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. */ @Override public String toString() { return ToString.builder("AccountLimit").add("TotalCodeSize", totalCodeSize()).add("CodeSizeUnzipped", codeSizeUnzipped()) .add("CodeSizeZipped", codeSizeZipped()).add("ConcurrentExecutions", concurrentExecutions()) .add("UnreservedConcurrentExecutions", unreservedConcurrentExecutions()).build(); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof AccountLimit)) { return false; } AccountLimit other = (AccountLimit) obj; return Objects.equals(totalCodeSize(), other.totalCodeSize()) && Objects.equals(codeSizeUnzipped(), other.codeSizeUnzipped()) && Objects.equals(codeSizeZipped(), other.codeSizeZipped()) && Objects.equals(concurrentExecutions(), other.concurrentExecutions()) && Objects.equals(unreservedConcurrentExecutions(), other.unreservedConcurrentExecutions()); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof AccountLimit)) { return false; } AccountLimit other = (AccountLimit) obj; return Objects.equals(totalCodeSize(), other.totalCodeSize()) && Objects.equals(codeSizeUnzipped(), other.codeSizeUnzipped()) && Objects.equals(codeSizeZipped(), other.codeSizeZipped()) && Objects.equals(concurrentExecutions(), other.concurrentExecutions()) && Objects.equals(unreservedConcurrentExecutions(), other.unreservedConcurrentExecutions()); }
/** * 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. */ @Override public String toString() { return ToString.builder("AccountLimit").add("TotalCodeSize", totalCodeSize()).add("CodeSizeUnzipped", codeSizeUnzipped()) .add("CodeSizeZipped", codeSizeZipped()).add("ConcurrentExecutions", concurrentExecutions()) .add("UnreservedConcurrentExecutions", unreservedConcurrentExecutions()).build(); }
public <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) { switch (fieldName) { case "TotalCodeSize": return Optional.ofNullable(clazz.cast(totalCodeSize())); case "CodeSizeUnzipped": return Optional.ofNullable(clazz.cast(codeSizeUnzipped())); case "CodeSizeZipped": return Optional.ofNullable(clazz.cast(codeSizeZipped())); case "ConcurrentExecutions": return Optional.ofNullable(clazz.cast(concurrentExecutions())); case "UnreservedConcurrentExecutions": return Optional.ofNullable(clazz.cast(unreservedConcurrentExecutions())); default: return Optional.empty(); } }
public <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) { switch (fieldName) { case "TotalCodeSize": return Optional.ofNullable(clazz.cast(totalCodeSize())); case "CodeSizeUnzipped": return Optional.ofNullable(clazz.cast(codeSizeUnzipped())); case "CodeSizeZipped": return Optional.ofNullable(clazz.cast(codeSizeZipped())); case "ConcurrentExecutions": return Optional.ofNullable(clazz.cast(concurrentExecutions())); case "UnreservedConcurrentExecutions": return Optional.ofNullable(clazz.cast(unreservedConcurrentExecutions())); default: return Optional.empty(); } }