ObjectIdentifier.java
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: sigstore_common.proto
// Protobuf Java Version: 4.30.2
package dev.sigstore.proto.common.v1;
/**
* <pre>
* An ASN.1 OBJECT IDENTIFIER
* </pre>
*
* Protobuf type {@code dev.sigstore.common.v1.ObjectIdentifier}
*/
@javax.annotation.Generated(value="protoc", comments="annotations:ObjectIdentifier.java.pb.meta")
public final class ObjectIdentifier extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:dev.sigstore.common.v1.ObjectIdentifier)
ObjectIdentifierOrBuilder {
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= */ "",
ObjectIdentifier.class.getName());
}
// Use ObjectIdentifier.newBuilder() to construct.
private ObjectIdentifier(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
}
private ObjectIdentifier() {
id_ = emptyIntList();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.sigstore.proto.common.v1.CommonProto.internal_static_dev_sigstore_common_v1_ObjectIdentifier_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.sigstore.proto.common.v1.CommonProto.internal_static_dev_sigstore_common_v1_ObjectIdentifier_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.sigstore.proto.common.v1.ObjectIdentifier.class, dev.sigstore.proto.common.v1.ObjectIdentifier.Builder.class);
}
public static final int ID_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private com.google.protobuf.Internal.IntList id_ =
emptyIntList();
/**
* <code>repeated int32 id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
* @return A list containing the id.
*/
@java.lang.Override
public java.util.List<java.lang.Integer>
getIdList() {
return id_;
}
/**
* <code>repeated int32 id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
* @return The count of id.
*/
public int getIdCount() {
return id_.size();
}
/**
* <code>repeated int32 id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
* @param index The index of the element to return.
* @return The id at the given index.
*/
public int getId(int index) {
return id_.getInt(index);
}
private int idMemoizedSerializedSize = -1;
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 {
getSerializedSize();
if (getIdList().size() > 0) {
output.writeUInt32NoTag(10);
output.writeUInt32NoTag(idMemoizedSerializedSize);
}
for (int i = 0; i < id_.size(); i++) {
output.writeInt32NoTag(id_.getInt(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
{
int dataSize = 0;
for (int i = 0; i < id_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(id_.getInt(i));
}
size += dataSize;
if (!getIdList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
idMemoizedSerializedSize = dataSize;
}
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.common.v1.ObjectIdentifier)) {
return super.equals(obj);
}
dev.sigstore.proto.common.v1.ObjectIdentifier other = (dev.sigstore.proto.common.v1.ObjectIdentifier) obj;
if (!getIdList()
.equals(other.getIdList())) 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();
if (getIdCount() > 0) {
hash = (37 * hash) + ID_FIELD_NUMBER;
hash = (53 * hash) + getIdList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static dev.sigstore.proto.common.v1.ObjectIdentifier parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.sigstore.proto.common.v1.ObjectIdentifier 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.common.v1.ObjectIdentifier parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.sigstore.proto.common.v1.ObjectIdentifier 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.common.v1.ObjectIdentifier parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.sigstore.proto.common.v1.ObjectIdentifier parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.sigstore.proto.common.v1.ObjectIdentifier parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static dev.sigstore.proto.common.v1.ObjectIdentifier 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.common.v1.ObjectIdentifier parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static dev.sigstore.proto.common.v1.ObjectIdentifier 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.common.v1.ObjectIdentifier parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static dev.sigstore.proto.common.v1.ObjectIdentifier 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.common.v1.ObjectIdentifier 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>
* An ASN.1 OBJECT IDENTIFIER
* </pre>
*
* Protobuf type {@code dev.sigstore.common.v1.ObjectIdentifier}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:dev.sigstore.common.v1.ObjectIdentifier)
dev.sigstore.proto.common.v1.ObjectIdentifierOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.sigstore.proto.common.v1.CommonProto.internal_static_dev_sigstore_common_v1_ObjectIdentifier_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.sigstore.proto.common.v1.CommonProto.internal_static_dev_sigstore_common_v1_ObjectIdentifier_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.sigstore.proto.common.v1.ObjectIdentifier.class, dev.sigstore.proto.common.v1.ObjectIdentifier.Builder.class);
}
// Construct using dev.sigstore.proto.common.v1.ObjectIdentifier.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
id_ = emptyIntList();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return dev.sigstore.proto.common.v1.CommonProto.internal_static_dev_sigstore_common_v1_ObjectIdentifier_descriptor;
}
@java.lang.Override
public dev.sigstore.proto.common.v1.ObjectIdentifier getDefaultInstanceForType() {
return dev.sigstore.proto.common.v1.ObjectIdentifier.getDefaultInstance();
}
@java.lang.Override
public dev.sigstore.proto.common.v1.ObjectIdentifier build() {
dev.sigstore.proto.common.v1.ObjectIdentifier result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public dev.sigstore.proto.common.v1.ObjectIdentifier buildPartial() {
dev.sigstore.proto.common.v1.ObjectIdentifier result = new dev.sigstore.proto.common.v1.ObjectIdentifier(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(dev.sigstore.proto.common.v1.ObjectIdentifier result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
id_.makeImmutable();
result.id_ = id_;
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof dev.sigstore.proto.common.v1.ObjectIdentifier) {
return mergeFrom((dev.sigstore.proto.common.v1.ObjectIdentifier)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(dev.sigstore.proto.common.v1.ObjectIdentifier other) {
if (other == dev.sigstore.proto.common.v1.ObjectIdentifier.getDefaultInstance()) return this;
if (!other.id_.isEmpty()) {
if (id_.isEmpty()) {
id_ = other.id_;
id_.makeImmutable();
bitField0_ |= 0x00000001;
} else {
ensureIdIsMutable();
id_.addAll(other.id_);
}
onChanged();
}
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 8: {
int v = input.readInt32();
ensureIdIsMutable();
id_.addInt(v);
break;
} // case 8
case 10: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
ensureIdIsMutable();
while (input.getBytesUntilLimit() > 0) {
id_.addInt(input.readInt32());
}
input.popLimit(limit);
break;
} // case 10
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 com.google.protobuf.Internal.IntList id_ = emptyIntList();
private void ensureIdIsMutable() {
if (!id_.isModifiable()) {
id_ = makeMutableCopy(id_);
}
bitField0_ |= 0x00000001;
}
/**
* <code>repeated int32 id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
* @return A list containing the id.
*/
public java.util.List<java.lang.Integer>
getIdList() {
id_.makeImmutable();
return id_;
}
/**
* <code>repeated int32 id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
* @return The count of id.
*/
public int getIdCount() {
return id_.size();
}
/**
* <code>repeated int32 id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
* @param index The index of the element to return.
* @return The id at the given index.
*/
public int getId(int index) {
return id_.getInt(index);
}
/**
* <code>repeated int32 id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
* @param index The index to set the value at.
* @param value The id to set.
* @return This builder for chaining.
*/
public Builder setId(
int index, int value) {
ensureIdIsMutable();
id_.setInt(index, value);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* <code>repeated int32 id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
* @param value The id to add.
* @return This builder for chaining.
*/
public Builder addId(int value) {
ensureIdIsMutable();
id_.addInt(value);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* <code>repeated int32 id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
* @param values The id to add.
* @return This builder for chaining.
*/
public Builder addAllId(
java.lang.Iterable<? extends java.lang.Integer> values) {
ensureIdIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, id_);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* <code>repeated int32 id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
* @return This builder for chaining.
*/
public Builder clearId() {
id_ = emptyIntList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:dev.sigstore.common.v1.ObjectIdentifier)
}
// @@protoc_insertion_point(class_scope:dev.sigstore.common.v1.ObjectIdentifier)
private static final dev.sigstore.proto.common.v1.ObjectIdentifier DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new dev.sigstore.proto.common.v1.ObjectIdentifier();
}
public static dev.sigstore.proto.common.v1.ObjectIdentifier getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<ObjectIdentifier>
PARSER = new com.google.protobuf.AbstractParser<ObjectIdentifier>() {
@java.lang.Override
public ObjectIdentifier 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<ObjectIdentifier> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<ObjectIdentifier> getParserForType() {
return PARSER;
}
@java.lang.Override
public dev.sigstore.proto.common.v1.ObjectIdentifier getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}