/* * Copyright 2019 The Grafeas Authors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: grafeas/v1/image.proto package io.grafeas.v1; /** * * *
* A set of properties that uniquely identify a given Docker image. ** * Protobuf type {@code grafeas.v1.Fingerprint} */ public final class Fingerprint extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:grafeas.v1.Fingerprint) FingerprintOrBuilder { private static final long serialVersionUID = 0L; // Use Fingerprint.newBuilder() to construct. private Fingerprint(com.google.protobuf.GeneratedMessageV3.Builder> builder) { super(builder); } private Fingerprint() { v1Name_ = ""; v2Blob_ = com.google.protobuf.LazyStringArrayList.EMPTY; v2Name_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new Fingerprint(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.grafeas.v1.Image.internal_static_grafeas_v1_Fingerprint_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.grafeas.v1.Image.internal_static_grafeas_v1_Fingerprint_fieldAccessorTable .ensureFieldAccessorsInitialized( io.grafeas.v1.Fingerprint.class, io.grafeas.v1.Fingerprint.Builder.class); } public static final int V1_NAME_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object v1Name_ = ""; /** * * *
* Required. The layer ID of the final layer in the Docker image's v1 * representation. ** *
string v1_name = 1;
*
* @return The v1Name.
*/
@java.lang.Override
public java.lang.String getV1Name() {
java.lang.Object ref = v1Name_;
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();
v1Name_ = s;
return s;
}
}
/**
*
*
* * Required. The layer ID of the final layer in the Docker image's v1 * representation. ** *
string v1_name = 1;
*
* @return The bytes for v1Name.
*/
@java.lang.Override
public com.google.protobuf.ByteString getV1NameBytes() {
java.lang.Object ref = v1Name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
v1Name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int V2_BLOB_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringList v2Blob_;
/**
*
*
* * Required. The ordered list of v2 blobs that represent a given image. ** *
repeated string v2_blob = 2;
*
* @return A list containing the v2Blob.
*/
public com.google.protobuf.ProtocolStringList getV2BlobList() {
return v2Blob_;
}
/**
*
*
* * Required. The ordered list of v2 blobs that represent a given image. ** *
repeated string v2_blob = 2;
*
* @return The count of v2Blob.
*/
public int getV2BlobCount() {
return v2Blob_.size();
}
/**
*
*
* * Required. The ordered list of v2 blobs that represent a given image. ** *
repeated string v2_blob = 2;
*
* @param index The index of the element to return.
* @return The v2Blob at the given index.
*/
public java.lang.String getV2Blob(int index) {
return v2Blob_.get(index);
}
/**
*
*
* * Required. The ordered list of v2 blobs that represent a given image. ** *
repeated string v2_blob = 2;
*
* @param index The index of the value to return.
* @return The bytes of the v2Blob at the given index.
*/
public com.google.protobuf.ByteString getV2BlobBytes(int index) {
return v2Blob_.getByteString(index);
}
public static final int V2_NAME_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object v2Name_ = "";
/**
*
*
* * Output only. The name of the image's v2 blobs computed via: * [bottom] := v2_blob[bottom] * [N] := sha256(v2_blob[N] + " " + v2_name[N+1]) * Only the name of the final blob is kept. ** *
string v2_name = 3;
*
* @return The v2Name.
*/
@java.lang.Override
public java.lang.String getV2Name() {
java.lang.Object ref = v2Name_;
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();
v2Name_ = s;
return s;
}
}
/**
*
*
* * Output only. The name of the image's v2 blobs computed via: * [bottom] := v2_blob[bottom] * [N] := sha256(v2_blob[N] + " " + v2_name[N+1]) * Only the name of the final blob is kept. ** *
string v2_name = 3;
*
* @return The bytes for v2Name.
*/
@java.lang.Override
public com.google.protobuf.ByteString getV2NameBytes() {
java.lang.Object ref = v2Name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
v2Name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
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.GeneratedMessageV3.isStringEmpty(v1Name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, v1Name_);
}
for (int i = 0; i < v2Blob_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, v2Blob_.getRaw(i));
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(v2Name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, v2Name_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(v1Name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, v1Name_);
}
{
int dataSize = 0;
for (int i = 0; i < v2Blob_.size(); i++) {
dataSize += computeStringSizeNoTag(v2Blob_.getRaw(i));
}
size += dataSize;
size += 1 * getV2BlobList().size();
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(v2Name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, v2Name_);
}
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 io.grafeas.v1.Fingerprint)) {
return super.equals(obj);
}
io.grafeas.v1.Fingerprint other = (io.grafeas.v1.Fingerprint) obj;
if (!getV1Name().equals(other.getV1Name())) return false;
if (!getV2BlobList().equals(other.getV2BlobList())) return false;
if (!getV2Name().equals(other.getV2Name())) 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) + V1_NAME_FIELD_NUMBER;
hash = (53 * hash) + getV1Name().hashCode();
if (getV2BlobCount() > 0) {
hash = (37 * hash) + V2_BLOB_FIELD_NUMBER;
hash = (53 * hash) + getV2BlobList().hashCode();
}
hash = (37 * hash) + V2_NAME_FIELD_NUMBER;
hash = (53 * hash) + getV2Name().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.grafeas.v1.Fingerprint parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grafeas.v1.Fingerprint parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grafeas.v1.Fingerprint parseFrom(com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grafeas.v1.Fingerprint parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grafeas.v1.Fingerprint parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grafeas.v1.Fingerprint parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grafeas.v1.Fingerprint parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.grafeas.v1.Fingerprint parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static io.grafeas.v1.Fingerprint parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static io.grafeas.v1.Fingerprint parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static io.grafeas.v1.Fingerprint parseFrom(com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.grafeas.v1.Fingerprint parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(io.grafeas.v1.Fingerprint 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.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
* * A set of properties that uniquely identify a given Docker image. ** * Protobuf type {@code grafeas.v1.Fingerprint} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
* Required. The layer ID of the final layer in the Docker image's v1
* representation.
*
*
* string v1_name = 1;
*
* @return The v1Name.
*/
public java.lang.String getV1Name() {
java.lang.Object ref = v1Name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
v1Name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Required. The layer ID of the final layer in the Docker image's v1
* representation.
*
*
* string v1_name = 1;
*
* @return The bytes for v1Name.
*/
public com.google.protobuf.ByteString getV1NameBytes() {
java.lang.Object ref = v1Name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
v1Name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Required. The layer ID of the final layer in the Docker image's v1
* representation.
*
*
* string v1_name = 1;
*
* @param value The v1Name to set.
* @return This builder for chaining.
*/
public Builder setV1Name(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
v1Name_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Required. The layer ID of the final layer in the Docker image's v1
* representation.
*
*
* string v1_name = 1;
*
* @return This builder for chaining.
*/
public Builder clearV1Name() {
v1Name_ = getDefaultInstance().getV1Name();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Required. The layer ID of the final layer in the Docker image's v1
* representation.
*
*
* string v1_name = 1;
*
* @param value The bytes for v1Name to set.
* @return This builder for chaining.
*/
public Builder setV1NameBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
v1Name_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private com.google.protobuf.LazyStringList v2Blob_ =
com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureV2BlobIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
v2Blob_ = new com.google.protobuf.LazyStringArrayList(v2Blob_);
bitField0_ |= 0x00000002;
}
}
/**
*
*
*
* Required. The ordered list of v2 blobs that represent a given image.
*
*
* repeated string v2_blob = 2;
*
* @return A list containing the v2Blob.
*/
public com.google.protobuf.ProtocolStringList getV2BlobList() {
return v2Blob_.getUnmodifiableView();
}
/**
*
*
*
* Required. The ordered list of v2 blobs that represent a given image.
*
*
* repeated string v2_blob = 2;
*
* @return The count of v2Blob.
*/
public int getV2BlobCount() {
return v2Blob_.size();
}
/**
*
*
*
* Required. The ordered list of v2 blobs that represent a given image.
*
*
* repeated string v2_blob = 2;
*
* @param index The index of the element to return.
* @return The v2Blob at the given index.
*/
public java.lang.String getV2Blob(int index) {
return v2Blob_.get(index);
}
/**
*
*
*
* Required. The ordered list of v2 blobs that represent a given image.
*
*
* repeated string v2_blob = 2;
*
* @param index The index of the value to return.
* @return The bytes of the v2Blob at the given index.
*/
public com.google.protobuf.ByteString getV2BlobBytes(int index) {
return v2Blob_.getByteString(index);
}
/**
*
*
*
* Required. The ordered list of v2 blobs that represent a given image.
*
*
* repeated string v2_blob = 2;
*
* @param index The index to set the value at.
* @param value The v2Blob to set.
* @return This builder for chaining.
*/
public Builder setV2Blob(int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureV2BlobIsMutable();
v2Blob_.set(index, value);
onChanged();
return this;
}
/**
*
*
*
* Required. The ordered list of v2 blobs that represent a given image.
*
*
* repeated string v2_blob = 2;
*
* @param value The v2Blob to add.
* @return This builder for chaining.
*/
public Builder addV2Blob(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureV2BlobIsMutable();
v2Blob_.add(value);
onChanged();
return this;
}
/**
*
*
*
* Required. The ordered list of v2 blobs that represent a given image.
*
*
* repeated string v2_blob = 2;
*
* @param values The v2Blob to add.
* @return This builder for chaining.
*/
public Builder addAllV2Blob(java.lang.Iterable
* Required. The ordered list of v2 blobs that represent a given image.
*
*
* repeated string v2_blob = 2;
*
* @return This builder for chaining.
*/
public Builder clearV2Blob() {
v2Blob_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*
* Required. The ordered list of v2 blobs that represent a given image.
*
*
* repeated string v2_blob = 2;
*
* @param value The bytes of the v2Blob to add.
* @return This builder for chaining.
*/
public Builder addV2BlobBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureV2BlobIsMutable();
v2Blob_.add(value);
onChanged();
return this;
}
private java.lang.Object v2Name_ = "";
/**
*
*
*
* Output only. The name of the image's v2 blobs computed via:
* [bottom] := v2_blob[bottom]
* [N] := sha256(v2_blob[N] + " " + v2_name[N+1])
* Only the name of the final blob is kept.
*
*
* string v2_name = 3;
*
* @return The v2Name.
*/
public java.lang.String getV2Name() {
java.lang.Object ref = v2Name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
v2Name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Output only. The name of the image's v2 blobs computed via:
* [bottom] := v2_blob[bottom]
* [N] := sha256(v2_blob[N] + " " + v2_name[N+1])
* Only the name of the final blob is kept.
*
*
* string v2_name = 3;
*
* @return The bytes for v2Name.
*/
public com.google.protobuf.ByteString getV2NameBytes() {
java.lang.Object ref = v2Name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
v2Name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Output only. The name of the image's v2 blobs computed via:
* [bottom] := v2_blob[bottom]
* [N] := sha256(v2_blob[N] + " " + v2_name[N+1])
* Only the name of the final blob is kept.
*
*
* string v2_name = 3;
*
* @param value The v2Name to set.
* @return This builder for chaining.
*/
public Builder setV2Name(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
v2Name_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Output only. The name of the image's v2 blobs computed via:
* [bottom] := v2_blob[bottom]
* [N] := sha256(v2_blob[N] + " " + v2_name[N+1])
* Only the name of the final blob is kept.
*
*
* string v2_name = 3;
*
* @return This builder for chaining.
*/
public Builder clearV2Name() {
v2Name_ = getDefaultInstance().getV2Name();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
*
*
* Output only. The name of the image's v2 blobs computed via:
* [bottom] := v2_blob[bottom]
* [N] := sha256(v2_blob[N] + " " + v2_name[N+1])
* Only the name of the final blob is kept.
*
*
* string v2_name = 3;
*
* @param value The bytes for v2Name to set.
* @return This builder for chaining.
*/
public Builder setV2NameBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
v2Name_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:grafeas.v1.Fingerprint)
}
// @@protoc_insertion_point(class_scope:grafeas.v1.Fingerprint)
private static final io.grafeas.v1.Fingerprint DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.grafeas.v1.Fingerprint();
}
public static io.grafeas.v1.Fingerprint getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser