Skip to content
This repository has been archived by the owner on Nov 22, 2023. It is now read-only.

Commit

Permalink
Merge 645cf12 into e4e9a94
Browse files Browse the repository at this point in the history
  • Loading branch information
violetd12 committed Jul 15, 2022
2 parents e4e9a94 + 645cf12 commit 1bd11d9
Showing 1 changed file with 8 additions and 2 deletions.
Expand Up @@ -19,7 +19,8 @@ public static Builder builder() {
.description("")
.metadata(ImmutableMap.of())
.expiry(0)
.type("");
.type("")
.owner("");
}

@AutoValue.Builder public abstract static class Builder {
Expand All @@ -32,6 +33,7 @@ public static Builder builder() {
public abstract Builder metadata(ImmutableMap<String, String> metadata);
public abstract Builder type(String type);
public abstract Builder expiry(long expiry);
public abstract Builder owner(String owner);

/**
* @throws IllegalArgumentException if builder data is invalid.
Expand All @@ -54,13 +56,15 @@ public CreateOrUpdateSecretRequestV2 build() {
@JsonProperty("description") @Nullable String description,
@JsonProperty("metadata") @Nullable Map<String, String> metadata,
@JsonProperty("expiry") long expiry,
@JsonProperty("type") @Nullable String type) {
@JsonProperty("type") @Nullable String type,
@JsonProperty("owner") @Nullable String owner) {
return builder()
.content(content)
.description(Strings.nullToEmpty(description))
.metadata(metadata == null ? ImmutableMap.of() : ImmutableMap.copyOf(metadata))
.expiry(expiry)
.type(Strings.nullToEmpty(type))
.owner(Strings.nullToEmpty(owner))
.build();
}

Expand All @@ -69,6 +73,7 @@ public CreateOrUpdateSecretRequestV2 build() {
@JsonProperty("metadata") public abstract ImmutableMap<String, String> metadata();
@JsonProperty("expiry") public abstract long expiry();
@JsonProperty("type") public abstract String type();
@JsonProperty("owner") public abstract String owner();

@Override public final String toString() {
return MoreObjects.toStringHelper(this)
Expand All @@ -77,6 +82,7 @@ public CreateOrUpdateSecretRequestV2 build() {
.add("metadata", metadata())
.add("expiry", expiry())
.add("type", type())
.add("owner", owner())
.omitNullValues()
.toString();
}
Expand Down

0 comments on commit 1bd11d9

Please sign in to comment.