ClientTrustConfig.java
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: sigstore_trustroot.proto
// Protobuf Java Version: 4.30.2
package dev.sigstore.proto.trustroot.v1;
/**
* <pre>
* ClientTrustConfig describes the complete state needed by a client
* to perform both signing and verification operations against a particular
* instance of Sigstore.
* </pre>
*
* Protobuf type {@code dev.sigstore.trustroot.v1.ClientTrustConfig}
*/
@javax.annotation.Generated(value="protoc", comments="annotations:ClientTrustConfig.java.pb.meta")
public final class ClientTrustConfig extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:dev.sigstore.trustroot.v1.ClientTrustConfig)
ClientTrustConfigOrBuilder {
private static final long serialVersionUID = 0L;
static {
com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
/* major= */ 4,
/* minor= */ 30,
/* patch= */ 2,
/* suffix= */ "",
ClientTrustConfig.class.getName());
}
// Use ClientTrustConfig.newBuilder() to construct.
private ClientTrustConfig(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
}
private ClientTrustConfig() {
mediaType_ = "";
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.sigstore.proto.trustroot.v1.TrustRootProto.internal_static_dev_sigstore_trustroot_v1_ClientTrustConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.sigstore.proto.trustroot.v1.TrustRootProto.internal_static_dev_sigstore_trustroot_v1_ClientTrustConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.sigstore.proto.trustroot.v1.ClientTrustConfig.class, dev.sigstore.proto.trustroot.v1.ClientTrustConfig.Builder.class);
}
private int bitField0_;
public static final int MEDIA_TYPE_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object mediaType_ = "";
/**
* <pre>
* MUST be application/vnd.dev.sigstore.clienttrustconfig.v0.1+json
* </pre>
*
* <code>string media_type = 1;</code>
* @return The mediaType.
*/
@java.lang.Override
public java.lang.String getMediaType() {
java.lang.Object ref = mediaType_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
mediaType_ = s;
return s;
}
}
/**
* <pre>
* MUST be application/vnd.dev.sigstore.clienttrustconfig.v0.1+json
* </pre>
*
* <code>string media_type = 1;</code>
* @return The bytes for mediaType.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getMediaTypeBytes() {
java.lang.Object ref = mediaType_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
mediaType_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int TRUSTED_ROOT_FIELD_NUMBER = 2;
private dev.sigstore.proto.trustroot.v1.TrustedRoot trustedRoot_;
/**
* <pre>
* The root of trust, which MUST be present.
* </pre>
*
* <code>.dev.sigstore.trustroot.v1.TrustedRoot trusted_root = 2 [(.google.api.field_behavior) = REQUIRED];</code>
* @return Whether the trustedRoot field is set.
*/
@java.lang.Override
public boolean hasTrustedRoot() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* <pre>
* The root of trust, which MUST be present.
* </pre>
*
* <code>.dev.sigstore.trustroot.v1.TrustedRoot trusted_root = 2 [(.google.api.field_behavior) = REQUIRED];</code>
* @return The trustedRoot.
*/
@java.lang.Override
public dev.sigstore.proto.trustroot.v1.TrustedRoot getTrustedRoot() {
return trustedRoot_ == null ? dev.sigstore.proto.trustroot.v1.TrustedRoot.getDefaultInstance() : trustedRoot_;
}
/**
* <pre>
* The root of trust, which MUST be present.
* </pre>
*
* <code>.dev.sigstore.trustroot.v1.TrustedRoot trusted_root = 2 [(.google.api.field_behavior) = REQUIRED];</code>
*/
@java.lang.Override
public dev.sigstore.proto.trustroot.v1.TrustedRootOrBuilder getTrustedRootOrBuilder() {
return trustedRoot_ == null ? dev.sigstore.proto.trustroot.v1.TrustedRoot.getDefaultInstance() : trustedRoot_;
}
public static final int SIGNING_CONFIG_FIELD_NUMBER = 3;
private dev.sigstore.proto.trustroot.v1.SigningConfig signingConfig_;
/**
* <pre>
* Configuration for signing clients, which MUST be present.
* </pre>
*
* <code>.dev.sigstore.trustroot.v1.SigningConfig signing_config = 3 [(.google.api.field_behavior) = REQUIRED];</code>
* @return Whether the signingConfig field is set.
*/
@java.lang.Override
public boolean hasSigningConfig() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
* <pre>
* Configuration for signing clients, which MUST be present.
* </pre>
*
* <code>.dev.sigstore.trustroot.v1.SigningConfig signing_config = 3 [(.google.api.field_behavior) = REQUIRED];</code>
* @return The signingConfig.
*/
@java.lang.Override
public dev.sigstore.proto.trustroot.v1.SigningConfig getSigningConfig() {
return signingConfig_ == null ? dev.sigstore.proto.trustroot.v1.SigningConfig.getDefaultInstance() : signingConfig_;
}
/**
* <pre>
* Configuration for signing clients, which MUST be present.
* </pre>
*
* <code>.dev.sigstore.trustroot.v1.SigningConfig signing_config = 3 [(.google.api.field_behavior) = REQUIRED];</code>
*/
@java.lang.Override
public dev.sigstore.proto.trustroot.v1.SigningConfigOrBuilder getSigningConfigOrBuilder() {
return signingConfig_ == null ? dev.sigstore.proto.trustroot.v1.SigningConfig.getDefaultInstance() : signingConfig_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(mediaType_)) {
com.google.protobuf.GeneratedMessage.writeString(output, 1, mediaType_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(2, getTrustedRoot());
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(3, getSigningConfig());
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(mediaType_)) {
size += com.google.protobuf.GeneratedMessage.computeStringSize(1, mediaType_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getTrustedRoot());
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getSigningConfig());
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof dev.sigstore.proto.trustroot.v1.ClientTrustConfig)) {
return super.equals(obj);
}
dev.sigstore.proto.trustroot.v1.ClientTrustConfig other = (dev.sigstore.proto.trustroot.v1.ClientTrustConfig) obj;
if (!getMediaType()
.equals(other.getMediaType())) return false;
if (hasTrustedRoot() != other.hasTrustedRoot()) return false;
if (hasTrustedRoot()) {
if (!getTrustedRoot()
.equals(other.getTrustedRoot())) return false;
}
if (hasSigningConfig() != other.hasSigningConfig()) return false;
if (hasSigningConfig()) {
if (!getSigningConfig()
.equals(other.getSigningConfig())) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + MEDIA_TYPE_FIELD_NUMBER;
hash = (53 * hash) + getMediaType().hashCode();
if (hasTrustedRoot()) {
hash = (37 * hash) + TRUSTED_ROOT_FIELD_NUMBER;
hash = (53 * hash) + getTrustedRoot().hashCode();
}
if (hasSigningConfig()) {
hash = (37 * hash) + SIGNING_CONFIG_FIELD_NUMBER;
hash = (53 * hash) + getSigningConfig().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static dev.sigstore.proto.trustroot.v1.ClientTrustConfig parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.sigstore.proto.trustroot.v1.ClientTrustConfig parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.sigstore.proto.trustroot.v1.ClientTrustConfig parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.sigstore.proto.trustroot.v1.ClientTrustConfig parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.sigstore.proto.trustroot.v1.ClientTrustConfig parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.sigstore.proto.trustroot.v1.ClientTrustConfig parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.sigstore.proto.trustroot.v1.ClientTrustConfig parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static dev.sigstore.proto.trustroot.v1.ClientTrustConfig parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static dev.sigstore.proto.trustroot.v1.ClientTrustConfig parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static dev.sigstore.proto.trustroot.v1.ClientTrustConfig parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static dev.sigstore.proto.trustroot.v1.ClientTrustConfig parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static dev.sigstore.proto.trustroot.v1.ClientTrustConfig parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(dev.sigstore.proto.trustroot.v1.ClientTrustConfig prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* <pre>
* ClientTrustConfig describes the complete state needed by a client
* to perform both signing and verification operations against a particular
* instance of Sigstore.
* </pre>
*
* Protobuf type {@code dev.sigstore.trustroot.v1.ClientTrustConfig}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:dev.sigstore.trustroot.v1.ClientTrustConfig)
dev.sigstore.proto.trustroot.v1.ClientTrustConfigOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.sigstore.proto.trustroot.v1.TrustRootProto.internal_static_dev_sigstore_trustroot_v1_ClientTrustConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.sigstore.proto.trustroot.v1.TrustRootProto.internal_static_dev_sigstore_trustroot_v1_ClientTrustConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.sigstore.proto.trustroot.v1.ClientTrustConfig.class, dev.sigstore.proto.trustroot.v1.ClientTrustConfig.Builder.class);
}
// Construct using dev.sigstore.proto.trustroot.v1.ClientTrustConfig.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage
.alwaysUseFieldBuilders) {
internalGetTrustedRootFieldBuilder();
internalGetSigningConfigFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
mediaType_ = "";
trustedRoot_ = null;
if (trustedRootBuilder_ != null) {
trustedRootBuilder_.dispose();
trustedRootBuilder_ = null;
}
signingConfig_ = null;
if (signingConfigBuilder_ != null) {
signingConfigBuilder_.dispose();
signingConfigBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return dev.sigstore.proto.trustroot.v1.TrustRootProto.internal_static_dev_sigstore_trustroot_v1_ClientTrustConfig_descriptor;
}
@java.lang.Override
public dev.sigstore.proto.trustroot.v1.ClientTrustConfig getDefaultInstanceForType() {
return dev.sigstore.proto.trustroot.v1.ClientTrustConfig.getDefaultInstance();
}
@java.lang.Override
public dev.sigstore.proto.trustroot.v1.ClientTrustConfig build() {
dev.sigstore.proto.trustroot.v1.ClientTrustConfig result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public dev.sigstore.proto.trustroot.v1.ClientTrustConfig buildPartial() {
dev.sigstore.proto.trustroot.v1.ClientTrustConfig result = new dev.sigstore.proto.trustroot.v1.ClientTrustConfig(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(dev.sigstore.proto.trustroot.v1.ClientTrustConfig result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.mediaType_ = mediaType_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000002) != 0)) {
result.trustedRoot_ = trustedRootBuilder_ == null
? trustedRoot_
: trustedRootBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.signingConfig_ = signingConfigBuilder_ == null
? signingConfig_
: signingConfigBuilder_.build();
to_bitField0_ |= 0x00000002;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof dev.sigstore.proto.trustroot.v1.ClientTrustConfig) {
return mergeFrom((dev.sigstore.proto.trustroot.v1.ClientTrustConfig)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(dev.sigstore.proto.trustroot.v1.ClientTrustConfig other) {
if (other == dev.sigstore.proto.trustroot.v1.ClientTrustConfig.getDefaultInstance()) return this;
if (!other.getMediaType().isEmpty()) {
mediaType_ = other.mediaType_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.hasTrustedRoot()) {
mergeTrustedRoot(other.getTrustedRoot());
}
if (other.hasSigningConfig()) {
mergeSigningConfig(other.getSigningConfig());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
mediaType_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
input.readMessage(
internalGetTrustedRootFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000002;
break;
} // case 18
case 26: {
input.readMessage(
internalGetSigningConfigFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000004;
break;
} // case 26
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object mediaType_ = "";
/**
* <pre>
* MUST be application/vnd.dev.sigstore.clienttrustconfig.v0.1+json
* </pre>
*
* <code>string media_type = 1;</code>
* @return The mediaType.
*/
public java.lang.String getMediaType() {
java.lang.Object ref = mediaType_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
mediaType_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* MUST be application/vnd.dev.sigstore.clienttrustconfig.v0.1+json
* </pre>
*
* <code>string media_type = 1;</code>
* @return The bytes for mediaType.
*/
public com.google.protobuf.ByteString
getMediaTypeBytes() {
java.lang.Object ref = mediaType_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
mediaType_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* MUST be application/vnd.dev.sigstore.clienttrustconfig.v0.1+json
* </pre>
*
* <code>string media_type = 1;</code>
* @param value The mediaType to set.
* @return This builder for chaining.
*/
public Builder setMediaType(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
mediaType_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* <pre>
* MUST be application/vnd.dev.sigstore.clienttrustconfig.v0.1+json
* </pre>
*
* <code>string media_type = 1;</code>
* @return This builder for chaining.
*/
public Builder clearMediaType() {
mediaType_ = getDefaultInstance().getMediaType();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
* <pre>
* MUST be application/vnd.dev.sigstore.clienttrustconfig.v0.1+json
* </pre>
*
* <code>string media_type = 1;</code>
* @param value The bytes for mediaType to set.
* @return This builder for chaining.
*/
public Builder setMediaTypeBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
mediaType_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private dev.sigstore.proto.trustroot.v1.TrustedRoot trustedRoot_;
private com.google.protobuf.SingleFieldBuilder<
dev.sigstore.proto.trustroot.v1.TrustedRoot, dev.sigstore.proto.trustroot.v1.TrustedRoot.Builder, dev.sigstore.proto.trustroot.v1.TrustedRootOrBuilder> trustedRootBuilder_;
/**
* <pre>
* The root of trust, which MUST be present.
* </pre>
*
* <code>.dev.sigstore.trustroot.v1.TrustedRoot trusted_root = 2 [(.google.api.field_behavior) = REQUIRED];</code>
* @return Whether the trustedRoot field is set.
*/
public boolean hasTrustedRoot() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
* <pre>
* The root of trust, which MUST be present.
* </pre>
*
* <code>.dev.sigstore.trustroot.v1.TrustedRoot trusted_root = 2 [(.google.api.field_behavior) = REQUIRED];</code>
* @return The trustedRoot.
*/
public dev.sigstore.proto.trustroot.v1.TrustedRoot getTrustedRoot() {
if (trustedRootBuilder_ == null) {
return trustedRoot_ == null ? dev.sigstore.proto.trustroot.v1.TrustedRoot.getDefaultInstance() : trustedRoot_;
} else {
return trustedRootBuilder_.getMessage();
}
}
/**
* <pre>
* The root of trust, which MUST be present.
* </pre>
*
* <code>.dev.sigstore.trustroot.v1.TrustedRoot trusted_root = 2 [(.google.api.field_behavior) = REQUIRED];</code>
*/
public Builder setTrustedRoot(dev.sigstore.proto.trustroot.v1.TrustedRoot value) {
if (trustedRootBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
trustedRoot_ = value;
} else {
trustedRootBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* <pre>
* The root of trust, which MUST be present.
* </pre>
*
* <code>.dev.sigstore.trustroot.v1.TrustedRoot trusted_root = 2 [(.google.api.field_behavior) = REQUIRED];</code>
*/
public Builder setTrustedRoot(
dev.sigstore.proto.trustroot.v1.TrustedRoot.Builder builderForValue) {
if (trustedRootBuilder_ == null) {
trustedRoot_ = builderForValue.build();
} else {
trustedRootBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* <pre>
* The root of trust, which MUST be present.
* </pre>
*
* <code>.dev.sigstore.trustroot.v1.TrustedRoot trusted_root = 2 [(.google.api.field_behavior) = REQUIRED];</code>
*/
public Builder mergeTrustedRoot(dev.sigstore.proto.trustroot.v1.TrustedRoot value) {
if (trustedRootBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0) &&
trustedRoot_ != null &&
trustedRoot_ != dev.sigstore.proto.trustroot.v1.TrustedRoot.getDefaultInstance()) {
getTrustedRootBuilder().mergeFrom(value);
} else {
trustedRoot_ = value;
}
} else {
trustedRootBuilder_.mergeFrom(value);
}
if (trustedRoot_ != null) {
bitField0_ |= 0x00000002;
onChanged();
}
return this;
}
/**
* <pre>
* The root of trust, which MUST be present.
* </pre>
*
* <code>.dev.sigstore.trustroot.v1.TrustedRoot trusted_root = 2 [(.google.api.field_behavior) = REQUIRED];</code>
*/
public Builder clearTrustedRoot() {
bitField0_ = (bitField0_ & ~0x00000002);
trustedRoot_ = null;
if (trustedRootBuilder_ != null) {
trustedRootBuilder_.dispose();
trustedRootBuilder_ = null;
}
onChanged();
return this;
}
/**
* <pre>
* The root of trust, which MUST be present.
* </pre>
*
* <code>.dev.sigstore.trustroot.v1.TrustedRoot trusted_root = 2 [(.google.api.field_behavior) = REQUIRED];</code>
*/
public dev.sigstore.proto.trustroot.v1.TrustedRoot.Builder getTrustedRootBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return internalGetTrustedRootFieldBuilder().getBuilder();
}
/**
* <pre>
* The root of trust, which MUST be present.
* </pre>
*
* <code>.dev.sigstore.trustroot.v1.TrustedRoot trusted_root = 2 [(.google.api.field_behavior) = REQUIRED];</code>
*/
public dev.sigstore.proto.trustroot.v1.TrustedRootOrBuilder getTrustedRootOrBuilder() {
if (trustedRootBuilder_ != null) {
return trustedRootBuilder_.getMessageOrBuilder();
} else {
return trustedRoot_ == null ?
dev.sigstore.proto.trustroot.v1.TrustedRoot.getDefaultInstance() : trustedRoot_;
}
}
/**
* <pre>
* The root of trust, which MUST be present.
* </pre>
*
* <code>.dev.sigstore.trustroot.v1.TrustedRoot trusted_root = 2 [(.google.api.field_behavior) = REQUIRED];</code>
*/
private com.google.protobuf.SingleFieldBuilder<
dev.sigstore.proto.trustroot.v1.TrustedRoot, dev.sigstore.proto.trustroot.v1.TrustedRoot.Builder, dev.sigstore.proto.trustroot.v1.TrustedRootOrBuilder>
internalGetTrustedRootFieldBuilder() {
if (trustedRootBuilder_ == null) {
trustedRootBuilder_ = new com.google.protobuf.SingleFieldBuilder<
dev.sigstore.proto.trustroot.v1.TrustedRoot, dev.sigstore.proto.trustroot.v1.TrustedRoot.Builder, dev.sigstore.proto.trustroot.v1.TrustedRootOrBuilder>(
getTrustedRoot(),
getParentForChildren(),
isClean());
trustedRoot_ = null;
}
return trustedRootBuilder_;
}
private dev.sigstore.proto.trustroot.v1.SigningConfig signingConfig_;
private com.google.protobuf.SingleFieldBuilder<
dev.sigstore.proto.trustroot.v1.SigningConfig, dev.sigstore.proto.trustroot.v1.SigningConfig.Builder, dev.sigstore.proto.trustroot.v1.SigningConfigOrBuilder> signingConfigBuilder_;
/**
* <pre>
* Configuration for signing clients, which MUST be present.
* </pre>
*
* <code>.dev.sigstore.trustroot.v1.SigningConfig signing_config = 3 [(.google.api.field_behavior) = REQUIRED];</code>
* @return Whether the signingConfig field is set.
*/
public boolean hasSigningConfig() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
* <pre>
* Configuration for signing clients, which MUST be present.
* </pre>
*
* <code>.dev.sigstore.trustroot.v1.SigningConfig signing_config = 3 [(.google.api.field_behavior) = REQUIRED];</code>
* @return The signingConfig.
*/
public dev.sigstore.proto.trustroot.v1.SigningConfig getSigningConfig() {
if (signingConfigBuilder_ == null) {
return signingConfig_ == null ? dev.sigstore.proto.trustroot.v1.SigningConfig.getDefaultInstance() : signingConfig_;
} else {
return signingConfigBuilder_.getMessage();
}
}
/**
* <pre>
* Configuration for signing clients, which MUST be present.
* </pre>
*
* <code>.dev.sigstore.trustroot.v1.SigningConfig signing_config = 3 [(.google.api.field_behavior) = REQUIRED];</code>
*/
public Builder setSigningConfig(dev.sigstore.proto.trustroot.v1.SigningConfig value) {
if (signingConfigBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
signingConfig_ = value;
} else {
signingConfigBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
* <pre>
* Configuration for signing clients, which MUST be present.
* </pre>
*
* <code>.dev.sigstore.trustroot.v1.SigningConfig signing_config = 3 [(.google.api.field_behavior) = REQUIRED];</code>
*/
public Builder setSigningConfig(
dev.sigstore.proto.trustroot.v1.SigningConfig.Builder builderForValue) {
if (signingConfigBuilder_ == null) {
signingConfig_ = builderForValue.build();
} else {
signingConfigBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
* <pre>
* Configuration for signing clients, which MUST be present.
* </pre>
*
* <code>.dev.sigstore.trustroot.v1.SigningConfig signing_config = 3 [(.google.api.field_behavior) = REQUIRED];</code>
*/
public Builder mergeSigningConfig(dev.sigstore.proto.trustroot.v1.SigningConfig value) {
if (signingConfigBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0) &&
signingConfig_ != null &&
signingConfig_ != dev.sigstore.proto.trustroot.v1.SigningConfig.getDefaultInstance()) {
getSigningConfigBuilder().mergeFrom(value);
} else {
signingConfig_ = value;
}
} else {
signingConfigBuilder_.mergeFrom(value);
}
if (signingConfig_ != null) {
bitField0_ |= 0x00000004;
onChanged();
}
return this;
}
/**
* <pre>
* Configuration for signing clients, which MUST be present.
* </pre>
*
* <code>.dev.sigstore.trustroot.v1.SigningConfig signing_config = 3 [(.google.api.field_behavior) = REQUIRED];</code>
*/
public Builder clearSigningConfig() {
bitField0_ = (bitField0_ & ~0x00000004);
signingConfig_ = null;
if (signingConfigBuilder_ != null) {
signingConfigBuilder_.dispose();
signingConfigBuilder_ = null;
}
onChanged();
return this;
}
/**
* <pre>
* Configuration for signing clients, which MUST be present.
* </pre>
*
* <code>.dev.sigstore.trustroot.v1.SigningConfig signing_config = 3 [(.google.api.field_behavior) = REQUIRED];</code>
*/
public dev.sigstore.proto.trustroot.v1.SigningConfig.Builder getSigningConfigBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return internalGetSigningConfigFieldBuilder().getBuilder();
}
/**
* <pre>
* Configuration for signing clients, which MUST be present.
* </pre>
*
* <code>.dev.sigstore.trustroot.v1.SigningConfig signing_config = 3 [(.google.api.field_behavior) = REQUIRED];</code>
*/
public dev.sigstore.proto.trustroot.v1.SigningConfigOrBuilder getSigningConfigOrBuilder() {
if (signingConfigBuilder_ != null) {
return signingConfigBuilder_.getMessageOrBuilder();
} else {
return signingConfig_ == null ?
dev.sigstore.proto.trustroot.v1.SigningConfig.getDefaultInstance() : signingConfig_;
}
}
/**
* <pre>
* Configuration for signing clients, which MUST be present.
* </pre>
*
* <code>.dev.sigstore.trustroot.v1.SigningConfig signing_config = 3 [(.google.api.field_behavior) = REQUIRED];</code>
*/
private com.google.protobuf.SingleFieldBuilder<
dev.sigstore.proto.trustroot.v1.SigningConfig, dev.sigstore.proto.trustroot.v1.SigningConfig.Builder, dev.sigstore.proto.trustroot.v1.SigningConfigOrBuilder>
internalGetSigningConfigFieldBuilder() {
if (signingConfigBuilder_ == null) {
signingConfigBuilder_ = new com.google.protobuf.SingleFieldBuilder<
dev.sigstore.proto.trustroot.v1.SigningConfig, dev.sigstore.proto.trustroot.v1.SigningConfig.Builder, dev.sigstore.proto.trustroot.v1.SigningConfigOrBuilder>(
getSigningConfig(),
getParentForChildren(),
isClean());
signingConfig_ = null;
}
return signingConfigBuilder_;
}
// @@protoc_insertion_point(builder_scope:dev.sigstore.trustroot.v1.ClientTrustConfig)
}
// @@protoc_insertion_point(class_scope:dev.sigstore.trustroot.v1.ClientTrustConfig)
private static final dev.sigstore.proto.trustroot.v1.ClientTrustConfig DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new dev.sigstore.proto.trustroot.v1.ClientTrustConfig();
}
public static dev.sigstore.proto.trustroot.v1.ClientTrustConfig getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<ClientTrustConfig>
PARSER = new com.google.protobuf.AbstractParser<ClientTrustConfig>() {
@java.lang.Override
public ClientTrustConfig parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser<ClientTrustConfig> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<ClientTrustConfig> getParserForType() {
return PARSER;
}
@java.lang.Override
public dev.sigstore.proto.trustroot.v1.ClientTrustConfig getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}