• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

square / keywhiz / 3632037751

pending completion
3632037751

push

github

GitHub
Adding API for batch secret creation/updates (#1162)

136 of 136 new or added lines in 8 files covered. (100.0%)

5130 of 6638 relevant lines covered (77.28%)

0.77 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

61.54
/api/src/main/java/keywhiz/api/automation/v2/BatchCreateOrUpdateSecretsRequestV2.java
1
package keywhiz.api.automation.v2;
2

3
import com.fasterxml.jackson.annotation.JsonCreator;
4
import com.fasterxml.jackson.annotation.JsonProperty;
5
import com.google.auto.value.AutoValue;
6
import com.google.common.base.MoreObjects;
7
import com.google.common.collect.ImmutableList;
8
import java.util.List;
9

10
@AutoValue public abstract class BatchCreateOrUpdateSecretsRequestV2 {
11
  BatchCreateOrUpdateSecretsRequestV2() {}
1✔
12

13
  public static BatchCreateOrUpdateSecretsRequestV2.Builder builder() {
14
    return new AutoValue_BatchCreateOrUpdateSecretsRequestV2.Builder();
1✔
15
  }
16

17
  @AutoValue.Builder public abstract static class Builder {
1✔
18
    abstract Builder secrets(List<CreateOrUpdateSecretInfoV2> secrets);
19

20
    public Builder secrets(CreateOrUpdateSecretInfoV2... secrets) {
21
      return secrets(ImmutableList.copyOf(secrets));
1✔
22
    }
23

24
    public abstract Builder batchMode(String batchMode);
25
    public abstract BatchCreateOrUpdateSecretsRequestV2 build();
26
  }
27

28
  @JsonCreator public static BatchCreateOrUpdateSecretsRequestV2 fromParts(
29
      @JsonProperty("secrets") List<CreateOrUpdateSecretInfoV2> secrets,
30
      @JsonProperty("batchMode") String batchMode) {
31
    return builder()
1✔
32
        .batchMode(batchMode)
1✔
33
        .secrets(ImmutableList.copyOf(secrets))
1✔
34
        .build();
1✔
35
  }
36

37
  @JsonProperty("secrets") public abstract List<CreateOrUpdateSecretInfoV2> secrets();
38
  @JsonProperty("batchMode") public abstract String batchMode();
39

40
  @Override public final String toString() {
41
    return MoreObjects.toStringHelper(this)
×
42
        .add("secrets", secrets())
×
43
        .add("batchMode", batchMode())
×
44
        .omitNullValues()
×
45
        .toString();
×
46
  }
47
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc