/* * 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; /** * * *
* Details of the derived image portion of the DockerImage relationship. This * image would be produced from a Dockerfile with FROM <DockerImage.Basis in * attached Note>. ** * Protobuf type {@code grafeas.v1.ImageOccurrence} */ public final class ImageOccurrence extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:grafeas.v1.ImageOccurrence) ImageOccurrenceOrBuilder { private static final long serialVersionUID = 0L; // Use ImageOccurrence.newBuilder() to construct. private ImageOccurrence(com.google.protobuf.GeneratedMessageV3.Builder> builder) { super(builder); } private ImageOccurrence() { layerInfo_ = java.util.Collections.emptyList(); baseResourceUrl_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new ImageOccurrence(); } @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_ImageOccurrence_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.grafeas.v1.Image.internal_static_grafeas_v1_ImageOccurrence_fieldAccessorTable .ensureFieldAccessorsInitialized( io.grafeas.v1.ImageOccurrence.class, io.grafeas.v1.ImageOccurrence.Builder.class); } public static final int FINGERPRINT_FIELD_NUMBER = 1; private io.grafeas.v1.Fingerprint fingerprint_; /** * * *
* Required. The fingerprint of the derived image. ** *
.grafeas.v1.Fingerprint fingerprint = 1;
*
* @return Whether the fingerprint field is set.
*/
@java.lang.Override
public boolean hasFingerprint() {
return fingerprint_ != null;
}
/**
*
*
* * Required. The fingerprint of the derived image. ** *
.grafeas.v1.Fingerprint fingerprint = 1;
*
* @return The fingerprint.
*/
@java.lang.Override
public io.grafeas.v1.Fingerprint getFingerprint() {
return fingerprint_ == null ? io.grafeas.v1.Fingerprint.getDefaultInstance() : fingerprint_;
}
/**
*
*
* * Required. The fingerprint of the derived image. ** *
.grafeas.v1.Fingerprint fingerprint = 1;
*/
@java.lang.Override
public io.grafeas.v1.FingerprintOrBuilder getFingerprintOrBuilder() {
return fingerprint_ == null ? io.grafeas.v1.Fingerprint.getDefaultInstance() : fingerprint_;
}
public static final int DISTANCE_FIELD_NUMBER = 2;
private int distance_ = 0;
/**
*
*
* * Output only. The number of layers by which this image differs from the * associated image basis. ** *
int32 distance = 2;
*
* @return The distance.
*/
@java.lang.Override
public int getDistance() {
return distance_;
}
public static final int LAYER_INFO_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private java.util.List* This contains layer-specific metadata, if populated it has length * "distance" and is ordered with [distance] being the layer immediately * following the base image and [1] being the final layer. ** *
repeated .grafeas.v1.Layer layer_info = 3;
*/
@java.lang.Override
public java.util.List* This contains layer-specific metadata, if populated it has length * "distance" and is ordered with [distance] being the layer immediately * following the base image and [1] being the final layer. ** *
repeated .grafeas.v1.Layer layer_info = 3;
*/
@java.lang.Override
public java.util.List extends io.grafeas.v1.LayerOrBuilder> getLayerInfoOrBuilderList() {
return layerInfo_;
}
/**
*
*
* * This contains layer-specific metadata, if populated it has length * "distance" and is ordered with [distance] being the layer immediately * following the base image and [1] being the final layer. ** *
repeated .grafeas.v1.Layer layer_info = 3;
*/
@java.lang.Override
public int getLayerInfoCount() {
return layerInfo_.size();
}
/**
*
*
* * This contains layer-specific metadata, if populated it has length * "distance" and is ordered with [distance] being the layer immediately * following the base image and [1] being the final layer. ** *
repeated .grafeas.v1.Layer layer_info = 3;
*/
@java.lang.Override
public io.grafeas.v1.Layer getLayerInfo(int index) {
return layerInfo_.get(index);
}
/**
*
*
* * This contains layer-specific metadata, if populated it has length * "distance" and is ordered with [distance] being the layer immediately * following the base image and [1] being the final layer. ** *
repeated .grafeas.v1.Layer layer_info = 3;
*/
@java.lang.Override
public io.grafeas.v1.LayerOrBuilder getLayerInfoOrBuilder(int index) {
return layerInfo_.get(index);
}
public static final int BASE_RESOURCE_URL_FIELD_NUMBER = 4;
@SuppressWarnings("serial")
private volatile java.lang.Object baseResourceUrl_ = "";
/**
*
*
* * Output only. This contains the base image URL for the derived image * occurrence. ** *
string base_resource_url = 4;
*
* @return The baseResourceUrl.
*/
@java.lang.Override
public java.lang.String getBaseResourceUrl() {
java.lang.Object ref = baseResourceUrl_;
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();
baseResourceUrl_ = s;
return s;
}
}
/**
*
*
* * Output only. This contains the base image URL for the derived image * occurrence. ** *
string base_resource_url = 4;
*
* @return The bytes for baseResourceUrl.
*/
@java.lang.Override
public com.google.protobuf.ByteString getBaseResourceUrlBytes() {
java.lang.Object ref = baseResourceUrl_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
baseResourceUrl_ = 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 (fingerprint_ != null) {
output.writeMessage(1, getFingerprint());
}
if (distance_ != 0) {
output.writeInt32(2, distance_);
}
for (int i = 0; i < layerInfo_.size(); i++) {
output.writeMessage(3, layerInfo_.get(i));
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(baseResourceUrl_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, baseResourceUrl_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (fingerprint_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getFingerprint());
}
if (distance_ != 0) {
size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, distance_);
}
for (int i = 0; i < layerInfo_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, layerInfo_.get(i));
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(baseResourceUrl_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, baseResourceUrl_);
}
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.ImageOccurrence)) {
return super.equals(obj);
}
io.grafeas.v1.ImageOccurrence other = (io.grafeas.v1.ImageOccurrence) obj;
if (hasFingerprint() != other.hasFingerprint()) return false;
if (hasFingerprint()) {
if (!getFingerprint().equals(other.getFingerprint())) return false;
}
if (getDistance() != other.getDistance()) return false;
if (!getLayerInfoList().equals(other.getLayerInfoList())) return false;
if (!getBaseResourceUrl().equals(other.getBaseResourceUrl())) 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 (hasFingerprint()) {
hash = (37 * hash) + FINGERPRINT_FIELD_NUMBER;
hash = (53 * hash) + getFingerprint().hashCode();
}
hash = (37 * hash) + DISTANCE_FIELD_NUMBER;
hash = (53 * hash) + getDistance();
if (getLayerInfoCount() > 0) {
hash = (37 * hash) + LAYER_INFO_FIELD_NUMBER;
hash = (53 * hash) + getLayerInfoList().hashCode();
}
hash = (37 * hash) + BASE_RESOURCE_URL_FIELD_NUMBER;
hash = (53 * hash) + getBaseResourceUrl().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.grafeas.v1.ImageOccurrence parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grafeas.v1.ImageOccurrence 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.ImageOccurrence parseFrom(com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grafeas.v1.ImageOccurrence 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.ImageOccurrence parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grafeas.v1.ImageOccurrence parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grafeas.v1.ImageOccurrence parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.grafeas.v1.ImageOccurrence 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.ImageOccurrence parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static io.grafeas.v1.ImageOccurrence 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.ImageOccurrence parseFrom(com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.grafeas.v1.ImageOccurrence 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.ImageOccurrence 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;
}
/**
*
*
* * Details of the derived image portion of the DockerImage relationship. This * image would be produced from a Dockerfile with FROM <DockerImage.Basis in * attached Note>. ** * Protobuf type {@code grafeas.v1.ImageOccurrence} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
* Required. The fingerprint of the derived image.
*
*
* .grafeas.v1.Fingerprint fingerprint = 1;
*
* @return Whether the fingerprint field is set.
*/
public boolean hasFingerprint() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Required. The fingerprint of the derived image.
*
*
* .grafeas.v1.Fingerprint fingerprint = 1;
*
* @return The fingerprint.
*/
public io.grafeas.v1.Fingerprint getFingerprint() {
if (fingerprintBuilder_ == null) {
return fingerprint_ == null ? io.grafeas.v1.Fingerprint.getDefaultInstance() : fingerprint_;
} else {
return fingerprintBuilder_.getMessage();
}
}
/**
*
*
*
* Required. The fingerprint of the derived image.
*
*
* .grafeas.v1.Fingerprint fingerprint = 1;
*/
public Builder setFingerprint(io.grafeas.v1.Fingerprint value) {
if (fingerprintBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
fingerprint_ = value;
} else {
fingerprintBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Required. The fingerprint of the derived image.
*
*
* .grafeas.v1.Fingerprint fingerprint = 1;
*/
public Builder setFingerprint(io.grafeas.v1.Fingerprint.Builder builderForValue) {
if (fingerprintBuilder_ == null) {
fingerprint_ = builderForValue.build();
} else {
fingerprintBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Required. The fingerprint of the derived image.
*
*
* .grafeas.v1.Fingerprint fingerprint = 1;
*/
public Builder mergeFingerprint(io.grafeas.v1.Fingerprint value) {
if (fingerprintBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)
&& fingerprint_ != null
&& fingerprint_ != io.grafeas.v1.Fingerprint.getDefaultInstance()) {
getFingerprintBuilder().mergeFrom(value);
} else {
fingerprint_ = value;
}
} else {
fingerprintBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Required. The fingerprint of the derived image.
*
*
* .grafeas.v1.Fingerprint fingerprint = 1;
*/
public Builder clearFingerprint() {
bitField0_ = (bitField0_ & ~0x00000001);
fingerprint_ = null;
if (fingerprintBuilder_ != null) {
fingerprintBuilder_.dispose();
fingerprintBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Required. The fingerprint of the derived image.
*
*
* .grafeas.v1.Fingerprint fingerprint = 1;
*/
public io.grafeas.v1.Fingerprint.Builder getFingerprintBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getFingerprintFieldBuilder().getBuilder();
}
/**
*
*
*
* Required. The fingerprint of the derived image.
*
*
* .grafeas.v1.Fingerprint fingerprint = 1;
*/
public io.grafeas.v1.FingerprintOrBuilder getFingerprintOrBuilder() {
if (fingerprintBuilder_ != null) {
return fingerprintBuilder_.getMessageOrBuilder();
} else {
return fingerprint_ == null ? io.grafeas.v1.Fingerprint.getDefaultInstance() : fingerprint_;
}
}
/**
*
*
*
* Required. The fingerprint of the derived image.
*
*
* .grafeas.v1.Fingerprint fingerprint = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.grafeas.v1.Fingerprint,
io.grafeas.v1.Fingerprint.Builder,
io.grafeas.v1.FingerprintOrBuilder>
getFingerprintFieldBuilder() {
if (fingerprintBuilder_ == null) {
fingerprintBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
io.grafeas.v1.Fingerprint,
io.grafeas.v1.Fingerprint.Builder,
io.grafeas.v1.FingerprintOrBuilder>(
getFingerprint(), getParentForChildren(), isClean());
fingerprint_ = null;
}
return fingerprintBuilder_;
}
private int distance_;
/**
*
*
*
* Output only. The number of layers by which this image differs from the
* associated image basis.
*
*
* int32 distance = 2;
*
* @return The distance.
*/
@java.lang.Override
public int getDistance() {
return distance_;
}
/**
*
*
*
* Output only. The number of layers by which this image differs from the
* associated image basis.
*
*
* int32 distance = 2;
*
* @param value The distance to set.
* @return This builder for chaining.
*/
public Builder setDistance(int value) {
distance_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Output only. The number of layers by which this image differs from the
* associated image basis.
*
*
* int32 distance = 2;
*
* @return This builder for chaining.
*/
public Builder clearDistance() {
bitField0_ = (bitField0_ & ~0x00000002);
distance_ = 0;
onChanged();
return this;
}
private java.util.List
* This contains layer-specific metadata, if populated it has length
* "distance" and is ordered with [distance] being the layer immediately
* following the base image and [1] being the final layer.
*
*
* repeated .grafeas.v1.Layer layer_info = 3;
*/
public java.util.List
* This contains layer-specific metadata, if populated it has length
* "distance" and is ordered with [distance] being the layer immediately
* following the base image and [1] being the final layer.
*
*
* repeated .grafeas.v1.Layer layer_info = 3;
*/
public int getLayerInfoCount() {
if (layerInfoBuilder_ == null) {
return layerInfo_.size();
} else {
return layerInfoBuilder_.getCount();
}
}
/**
*
*
*
* This contains layer-specific metadata, if populated it has length
* "distance" and is ordered with [distance] being the layer immediately
* following the base image and [1] being the final layer.
*
*
* repeated .grafeas.v1.Layer layer_info = 3;
*/
public io.grafeas.v1.Layer getLayerInfo(int index) {
if (layerInfoBuilder_ == null) {
return layerInfo_.get(index);
} else {
return layerInfoBuilder_.getMessage(index);
}
}
/**
*
*
*
* This contains layer-specific metadata, if populated it has length
* "distance" and is ordered with [distance] being the layer immediately
* following the base image and [1] being the final layer.
*
*
* repeated .grafeas.v1.Layer layer_info = 3;
*/
public Builder setLayerInfo(int index, io.grafeas.v1.Layer value) {
if (layerInfoBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLayerInfoIsMutable();
layerInfo_.set(index, value);
onChanged();
} else {
layerInfoBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*
* This contains layer-specific metadata, if populated it has length
* "distance" and is ordered with [distance] being the layer immediately
* following the base image and [1] being the final layer.
*
*
* repeated .grafeas.v1.Layer layer_info = 3;
*/
public Builder setLayerInfo(int index, io.grafeas.v1.Layer.Builder builderForValue) {
if (layerInfoBuilder_ == null) {
ensureLayerInfoIsMutable();
layerInfo_.set(index, builderForValue.build());
onChanged();
} else {
layerInfoBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* This contains layer-specific metadata, if populated it has length
* "distance" and is ordered with [distance] being the layer immediately
* following the base image and [1] being the final layer.
*
*
* repeated .grafeas.v1.Layer layer_info = 3;
*/
public Builder addLayerInfo(io.grafeas.v1.Layer value) {
if (layerInfoBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLayerInfoIsMutable();
layerInfo_.add(value);
onChanged();
} else {
layerInfoBuilder_.addMessage(value);
}
return this;
}
/**
*
*
*
* This contains layer-specific metadata, if populated it has length
* "distance" and is ordered with [distance] being the layer immediately
* following the base image and [1] being the final layer.
*
*
* repeated .grafeas.v1.Layer layer_info = 3;
*/
public Builder addLayerInfo(int index, io.grafeas.v1.Layer value) {
if (layerInfoBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLayerInfoIsMutable();
layerInfo_.add(index, value);
onChanged();
} else {
layerInfoBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*
* This contains layer-specific metadata, if populated it has length
* "distance" and is ordered with [distance] being the layer immediately
* following the base image and [1] being the final layer.
*
*
* repeated .grafeas.v1.Layer layer_info = 3;
*/
public Builder addLayerInfo(io.grafeas.v1.Layer.Builder builderForValue) {
if (layerInfoBuilder_ == null) {
ensureLayerInfoIsMutable();
layerInfo_.add(builderForValue.build());
onChanged();
} else {
layerInfoBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* This contains layer-specific metadata, if populated it has length
* "distance" and is ordered with [distance] being the layer immediately
* following the base image and [1] being the final layer.
*
*
* repeated .grafeas.v1.Layer layer_info = 3;
*/
public Builder addLayerInfo(int index, io.grafeas.v1.Layer.Builder builderForValue) {
if (layerInfoBuilder_ == null) {
ensureLayerInfoIsMutable();
layerInfo_.add(index, builderForValue.build());
onChanged();
} else {
layerInfoBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* This contains layer-specific metadata, if populated it has length
* "distance" and is ordered with [distance] being the layer immediately
* following the base image and [1] being the final layer.
*
*
* repeated .grafeas.v1.Layer layer_info = 3;
*/
public Builder addAllLayerInfo(java.lang.Iterable extends io.grafeas.v1.Layer> values) {
if (layerInfoBuilder_ == null) {
ensureLayerInfoIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, layerInfo_);
onChanged();
} else {
layerInfoBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*
*
* This contains layer-specific metadata, if populated it has length
* "distance" and is ordered with [distance] being the layer immediately
* following the base image and [1] being the final layer.
*
*
* repeated .grafeas.v1.Layer layer_info = 3;
*/
public Builder clearLayerInfo() {
if (layerInfoBuilder_ == null) {
layerInfo_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
} else {
layerInfoBuilder_.clear();
}
return this;
}
/**
*
*
*
* This contains layer-specific metadata, if populated it has length
* "distance" and is ordered with [distance] being the layer immediately
* following the base image and [1] being the final layer.
*
*
* repeated .grafeas.v1.Layer layer_info = 3;
*/
public Builder removeLayerInfo(int index) {
if (layerInfoBuilder_ == null) {
ensureLayerInfoIsMutable();
layerInfo_.remove(index);
onChanged();
} else {
layerInfoBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* This contains layer-specific metadata, if populated it has length
* "distance" and is ordered with [distance] being the layer immediately
* following the base image and [1] being the final layer.
*
*
* repeated .grafeas.v1.Layer layer_info = 3;
*/
public io.grafeas.v1.Layer.Builder getLayerInfoBuilder(int index) {
return getLayerInfoFieldBuilder().getBuilder(index);
}
/**
*
*
*
* This contains layer-specific metadata, if populated it has length
* "distance" and is ordered with [distance] being the layer immediately
* following the base image and [1] being the final layer.
*
*
* repeated .grafeas.v1.Layer layer_info = 3;
*/
public io.grafeas.v1.LayerOrBuilder getLayerInfoOrBuilder(int index) {
if (layerInfoBuilder_ == null) {
return layerInfo_.get(index);
} else {
return layerInfoBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*
*
* This contains layer-specific metadata, if populated it has length
* "distance" and is ordered with [distance] being the layer immediately
* following the base image and [1] being the final layer.
*
*
* repeated .grafeas.v1.Layer layer_info = 3;
*/
public java.util.List extends io.grafeas.v1.LayerOrBuilder> getLayerInfoOrBuilderList() {
if (layerInfoBuilder_ != null) {
return layerInfoBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(layerInfo_);
}
}
/**
*
*
*
* This contains layer-specific metadata, if populated it has length
* "distance" and is ordered with [distance] being the layer immediately
* following the base image and [1] being the final layer.
*
*
* repeated .grafeas.v1.Layer layer_info = 3;
*/
public io.grafeas.v1.Layer.Builder addLayerInfoBuilder() {
return getLayerInfoFieldBuilder().addBuilder(io.grafeas.v1.Layer.getDefaultInstance());
}
/**
*
*
*
* This contains layer-specific metadata, if populated it has length
* "distance" and is ordered with [distance] being the layer immediately
* following the base image and [1] being the final layer.
*
*
* repeated .grafeas.v1.Layer layer_info = 3;
*/
public io.grafeas.v1.Layer.Builder addLayerInfoBuilder(int index) {
return getLayerInfoFieldBuilder().addBuilder(index, io.grafeas.v1.Layer.getDefaultInstance());
}
/**
*
*
*
* This contains layer-specific metadata, if populated it has length
* "distance" and is ordered with [distance] being the layer immediately
* following the base image and [1] being the final layer.
*
*
* repeated .grafeas.v1.Layer layer_info = 3;
*/
public java.util.List
* Output only. This contains the base image URL for the derived image
* occurrence.
*
*
* string base_resource_url = 4;
*
* @return The baseResourceUrl.
*/
public java.lang.String getBaseResourceUrl() {
java.lang.Object ref = baseResourceUrl_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
baseResourceUrl_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Output only. This contains the base image URL for the derived image
* occurrence.
*
*
* string base_resource_url = 4;
*
* @return The bytes for baseResourceUrl.
*/
public com.google.protobuf.ByteString getBaseResourceUrlBytes() {
java.lang.Object ref = baseResourceUrl_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
baseResourceUrl_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Output only. This contains the base image URL for the derived image
* occurrence.
*
*
* string base_resource_url = 4;
*
* @param value The baseResourceUrl to set.
* @return This builder for chaining.
*/
public Builder setBaseResourceUrl(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
baseResourceUrl_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Output only. This contains the base image URL for the derived image
* occurrence.
*
*
* string base_resource_url = 4;
*
* @return This builder for chaining.
*/
public Builder clearBaseResourceUrl() {
baseResourceUrl_ = getDefaultInstance().getBaseResourceUrl();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
return this;
}
/**
*
*
*
* Output only. This contains the base image URL for the derived image
* occurrence.
*
*
* string base_resource_url = 4;
*
* @param value The bytes for baseResourceUrl to set.
* @return This builder for chaining.
*/
public Builder setBaseResourceUrlBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
baseResourceUrl_ = value;
bitField0_ |= 0x00000008;
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.ImageOccurrence)
}
// @@protoc_insertion_point(class_scope:grafeas.v1.ImageOccurrence)
private static final io.grafeas.v1.ImageOccurrence DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.grafeas.v1.ImageOccurrence();
}
public static io.grafeas.v1.ImageOccurrence getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser