/* * 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/provenance.proto package io.grafeas.v1; /** * * *
* A SourceContext is a reference to a tree of files. A SourceContext together * with a path point to a unique revision of a single file or directory. ** * Protobuf type {@code grafeas.v1.SourceContext} */ public final class SourceContext extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:grafeas.v1.SourceContext) SourceContextOrBuilder { private static final long serialVersionUID = 0L; // Use SourceContext.newBuilder() to construct. private SourceContext(com.google.protobuf.GeneratedMessageV3.Builder> builder) { super(builder); } private SourceContext() {} @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new SourceContext(); } @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.Provenance.internal_static_grafeas_v1_SourceContext_descriptor; } @SuppressWarnings({"rawtypes"}) @java.lang.Override protected com.google.protobuf.MapField internalGetMapField(int number) { switch (number) { case 4: return internalGetLabels(); default: throw new RuntimeException("Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.grafeas.v1.Provenance.internal_static_grafeas_v1_SourceContext_fieldAccessorTable .ensureFieldAccessorsInitialized( io.grafeas.v1.SourceContext.class, io.grafeas.v1.SourceContext.Builder.class); } private int contextCase_ = 0; private java.lang.Object context_; public enum ContextCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { CLOUD_REPO(1), GERRIT(2), GIT(3), CONTEXT_NOT_SET(0); private final int value; private ContextCase(int value) { this.value = value; } /** * @param value The number of the enum to look for. * @return The enum associated with the given number. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static ContextCase valueOf(int value) { return forNumber(value); } public static ContextCase forNumber(int value) { switch (value) { case 1: return CLOUD_REPO; case 2: return GERRIT; case 3: return GIT; case 0: return CONTEXT_NOT_SET; default: return null; } } public int getNumber() { return this.value; } }; public ContextCase getContextCase() { return ContextCase.forNumber(contextCase_); } public static final int CLOUD_REPO_FIELD_NUMBER = 1; /** * * *
* A SourceContext referring to a revision in a Google Cloud Source Repo. ** *
.grafeas.v1.CloudRepoSourceContext cloud_repo = 1;
*
* @return Whether the cloudRepo field is set.
*/
@java.lang.Override
public boolean hasCloudRepo() {
return contextCase_ == 1;
}
/**
*
*
* * A SourceContext referring to a revision in a Google Cloud Source Repo. ** *
.grafeas.v1.CloudRepoSourceContext cloud_repo = 1;
*
* @return The cloudRepo.
*/
@java.lang.Override
public io.grafeas.v1.CloudRepoSourceContext getCloudRepo() {
if (contextCase_ == 1) {
return (io.grafeas.v1.CloudRepoSourceContext) context_;
}
return io.grafeas.v1.CloudRepoSourceContext.getDefaultInstance();
}
/**
*
*
* * A SourceContext referring to a revision in a Google Cloud Source Repo. ** *
.grafeas.v1.CloudRepoSourceContext cloud_repo = 1;
*/
@java.lang.Override
public io.grafeas.v1.CloudRepoSourceContextOrBuilder getCloudRepoOrBuilder() {
if (contextCase_ == 1) {
return (io.grafeas.v1.CloudRepoSourceContext) context_;
}
return io.grafeas.v1.CloudRepoSourceContext.getDefaultInstance();
}
public static final int GERRIT_FIELD_NUMBER = 2;
/**
*
*
* * A SourceContext referring to a Gerrit project. ** *
.grafeas.v1.GerritSourceContext gerrit = 2;
*
* @return Whether the gerrit field is set.
*/
@java.lang.Override
public boolean hasGerrit() {
return contextCase_ == 2;
}
/**
*
*
* * A SourceContext referring to a Gerrit project. ** *
.grafeas.v1.GerritSourceContext gerrit = 2;
*
* @return The gerrit.
*/
@java.lang.Override
public io.grafeas.v1.GerritSourceContext getGerrit() {
if (contextCase_ == 2) {
return (io.grafeas.v1.GerritSourceContext) context_;
}
return io.grafeas.v1.GerritSourceContext.getDefaultInstance();
}
/**
*
*
* * A SourceContext referring to a Gerrit project. ** *
.grafeas.v1.GerritSourceContext gerrit = 2;
*/
@java.lang.Override
public io.grafeas.v1.GerritSourceContextOrBuilder getGerritOrBuilder() {
if (contextCase_ == 2) {
return (io.grafeas.v1.GerritSourceContext) context_;
}
return io.grafeas.v1.GerritSourceContext.getDefaultInstance();
}
public static final int GIT_FIELD_NUMBER = 3;
/**
*
*
* * A SourceContext referring to any third party Git repo (e.g., GitHub). ** *
.grafeas.v1.GitSourceContext git = 3;
*
* @return Whether the git field is set.
*/
@java.lang.Override
public boolean hasGit() {
return contextCase_ == 3;
}
/**
*
*
* * A SourceContext referring to any third party Git repo (e.g., GitHub). ** *
.grafeas.v1.GitSourceContext git = 3;
*
* @return The git.
*/
@java.lang.Override
public io.grafeas.v1.GitSourceContext getGit() {
if (contextCase_ == 3) {
return (io.grafeas.v1.GitSourceContext) context_;
}
return io.grafeas.v1.GitSourceContext.getDefaultInstance();
}
/**
*
*
* * A SourceContext referring to any third party Git repo (e.g., GitHub). ** *
.grafeas.v1.GitSourceContext git = 3;
*/
@java.lang.Override
public io.grafeas.v1.GitSourceContextOrBuilder getGitOrBuilder() {
if (contextCase_ == 3) {
return (io.grafeas.v1.GitSourceContext) context_;
}
return io.grafeas.v1.GitSourceContext.getDefaultInstance();
}
public static final int LABELS_FIELD_NUMBER = 4;
private static final class LabelsDefaultEntryHolder {
static final com.google.protobuf.MapEntry* Labels with user defined metadata. ** *
map<string, string> labels = 4;
*/
@java.lang.Override
public boolean containsLabels(java.lang.String key) {
if (key == null) {
throw new NullPointerException("map key");
}
return internalGetLabels().getMap().containsKey(key);
}
/** Use {@link #getLabelsMap()} instead. */
@java.lang.Override
@java.lang.Deprecated
public java.util.Map* Labels with user defined metadata. ** *
map<string, string> labels = 4;
*/
@java.lang.Override
public java.util.Map* Labels with user defined metadata. ** *
map<string, string> labels = 4;
*/
@java.lang.Override
public /* nullable */ java.lang.String getLabelsOrDefault(
java.lang.String key,
/* nullable */
java.lang.String defaultValue) {
if (key == null) {
throw new NullPointerException("map key");
}
java.util.Map* Labels with user defined metadata. ** *
map<string, string> labels = 4;
*/
@java.lang.Override
public java.lang.String getLabelsOrThrow(java.lang.String key) {
if (key == null) {
throw new NullPointerException("map key");
}
java.util.Map* A SourceContext is a reference to a tree of files. A SourceContext together * with a path point to a unique revision of a single file or directory. ** * Protobuf type {@code grafeas.v1.SourceContext} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
* A SourceContext referring to a revision in a Google Cloud Source Repo.
*
*
* .grafeas.v1.CloudRepoSourceContext cloud_repo = 1;
*
* @return Whether the cloudRepo field is set.
*/
@java.lang.Override
public boolean hasCloudRepo() {
return contextCase_ == 1;
}
/**
*
*
*
* A SourceContext referring to a revision in a Google Cloud Source Repo.
*
*
* .grafeas.v1.CloudRepoSourceContext cloud_repo = 1;
*
* @return The cloudRepo.
*/
@java.lang.Override
public io.grafeas.v1.CloudRepoSourceContext getCloudRepo() {
if (cloudRepoBuilder_ == null) {
if (contextCase_ == 1) {
return (io.grafeas.v1.CloudRepoSourceContext) context_;
}
return io.grafeas.v1.CloudRepoSourceContext.getDefaultInstance();
} else {
if (contextCase_ == 1) {
return cloudRepoBuilder_.getMessage();
}
return io.grafeas.v1.CloudRepoSourceContext.getDefaultInstance();
}
}
/**
*
*
*
* A SourceContext referring to a revision in a Google Cloud Source Repo.
*
*
* .grafeas.v1.CloudRepoSourceContext cloud_repo = 1;
*/
public Builder setCloudRepo(io.grafeas.v1.CloudRepoSourceContext value) {
if (cloudRepoBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
context_ = value;
onChanged();
} else {
cloudRepoBuilder_.setMessage(value);
}
contextCase_ = 1;
return this;
}
/**
*
*
*
* A SourceContext referring to a revision in a Google Cloud Source Repo.
*
*
* .grafeas.v1.CloudRepoSourceContext cloud_repo = 1;
*/
public Builder setCloudRepo(io.grafeas.v1.CloudRepoSourceContext.Builder builderForValue) {
if (cloudRepoBuilder_ == null) {
context_ = builderForValue.build();
onChanged();
} else {
cloudRepoBuilder_.setMessage(builderForValue.build());
}
contextCase_ = 1;
return this;
}
/**
*
*
*
* A SourceContext referring to a revision in a Google Cloud Source Repo.
*
*
* .grafeas.v1.CloudRepoSourceContext cloud_repo = 1;
*/
public Builder mergeCloudRepo(io.grafeas.v1.CloudRepoSourceContext value) {
if (cloudRepoBuilder_ == null) {
if (contextCase_ == 1
&& context_ != io.grafeas.v1.CloudRepoSourceContext.getDefaultInstance()) {
context_ =
io.grafeas.v1.CloudRepoSourceContext.newBuilder(
(io.grafeas.v1.CloudRepoSourceContext) context_)
.mergeFrom(value)
.buildPartial();
} else {
context_ = value;
}
onChanged();
} else {
if (contextCase_ == 1) {
cloudRepoBuilder_.mergeFrom(value);
} else {
cloudRepoBuilder_.setMessage(value);
}
}
contextCase_ = 1;
return this;
}
/**
*
*
*
* A SourceContext referring to a revision in a Google Cloud Source Repo.
*
*
* .grafeas.v1.CloudRepoSourceContext cloud_repo = 1;
*/
public Builder clearCloudRepo() {
if (cloudRepoBuilder_ == null) {
if (contextCase_ == 1) {
contextCase_ = 0;
context_ = null;
onChanged();
}
} else {
if (contextCase_ == 1) {
contextCase_ = 0;
context_ = null;
}
cloudRepoBuilder_.clear();
}
return this;
}
/**
*
*
*
* A SourceContext referring to a revision in a Google Cloud Source Repo.
*
*
* .grafeas.v1.CloudRepoSourceContext cloud_repo = 1;
*/
public io.grafeas.v1.CloudRepoSourceContext.Builder getCloudRepoBuilder() {
return getCloudRepoFieldBuilder().getBuilder();
}
/**
*
*
*
* A SourceContext referring to a revision in a Google Cloud Source Repo.
*
*
* .grafeas.v1.CloudRepoSourceContext cloud_repo = 1;
*/
@java.lang.Override
public io.grafeas.v1.CloudRepoSourceContextOrBuilder getCloudRepoOrBuilder() {
if ((contextCase_ == 1) && (cloudRepoBuilder_ != null)) {
return cloudRepoBuilder_.getMessageOrBuilder();
} else {
if (contextCase_ == 1) {
return (io.grafeas.v1.CloudRepoSourceContext) context_;
}
return io.grafeas.v1.CloudRepoSourceContext.getDefaultInstance();
}
}
/**
*
*
*
* A SourceContext referring to a revision in a Google Cloud Source Repo.
*
*
* .grafeas.v1.CloudRepoSourceContext cloud_repo = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.grafeas.v1.CloudRepoSourceContext,
io.grafeas.v1.CloudRepoSourceContext.Builder,
io.grafeas.v1.CloudRepoSourceContextOrBuilder>
getCloudRepoFieldBuilder() {
if (cloudRepoBuilder_ == null) {
if (!(contextCase_ == 1)) {
context_ = io.grafeas.v1.CloudRepoSourceContext.getDefaultInstance();
}
cloudRepoBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
io.grafeas.v1.CloudRepoSourceContext,
io.grafeas.v1.CloudRepoSourceContext.Builder,
io.grafeas.v1.CloudRepoSourceContextOrBuilder>(
(io.grafeas.v1.CloudRepoSourceContext) context_, getParentForChildren(), isClean());
context_ = null;
}
contextCase_ = 1;
onChanged();
return cloudRepoBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
io.grafeas.v1.GerritSourceContext,
io.grafeas.v1.GerritSourceContext.Builder,
io.grafeas.v1.GerritSourceContextOrBuilder>
gerritBuilder_;
/**
*
*
*
* A SourceContext referring to a Gerrit project.
*
*
* .grafeas.v1.GerritSourceContext gerrit = 2;
*
* @return Whether the gerrit field is set.
*/
@java.lang.Override
public boolean hasGerrit() {
return contextCase_ == 2;
}
/**
*
*
*
* A SourceContext referring to a Gerrit project.
*
*
* .grafeas.v1.GerritSourceContext gerrit = 2;
*
* @return The gerrit.
*/
@java.lang.Override
public io.grafeas.v1.GerritSourceContext getGerrit() {
if (gerritBuilder_ == null) {
if (contextCase_ == 2) {
return (io.grafeas.v1.GerritSourceContext) context_;
}
return io.grafeas.v1.GerritSourceContext.getDefaultInstance();
} else {
if (contextCase_ == 2) {
return gerritBuilder_.getMessage();
}
return io.grafeas.v1.GerritSourceContext.getDefaultInstance();
}
}
/**
*
*
*
* A SourceContext referring to a Gerrit project.
*
*
* .grafeas.v1.GerritSourceContext gerrit = 2;
*/
public Builder setGerrit(io.grafeas.v1.GerritSourceContext value) {
if (gerritBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
context_ = value;
onChanged();
} else {
gerritBuilder_.setMessage(value);
}
contextCase_ = 2;
return this;
}
/**
*
*
*
* A SourceContext referring to a Gerrit project.
*
*
* .grafeas.v1.GerritSourceContext gerrit = 2;
*/
public Builder setGerrit(io.grafeas.v1.GerritSourceContext.Builder builderForValue) {
if (gerritBuilder_ == null) {
context_ = builderForValue.build();
onChanged();
} else {
gerritBuilder_.setMessage(builderForValue.build());
}
contextCase_ = 2;
return this;
}
/**
*
*
*
* A SourceContext referring to a Gerrit project.
*
*
* .grafeas.v1.GerritSourceContext gerrit = 2;
*/
public Builder mergeGerrit(io.grafeas.v1.GerritSourceContext value) {
if (gerritBuilder_ == null) {
if (contextCase_ == 2
&& context_ != io.grafeas.v1.GerritSourceContext.getDefaultInstance()) {
context_ =
io.grafeas.v1.GerritSourceContext.newBuilder(
(io.grafeas.v1.GerritSourceContext) context_)
.mergeFrom(value)
.buildPartial();
} else {
context_ = value;
}
onChanged();
} else {
if (contextCase_ == 2) {
gerritBuilder_.mergeFrom(value);
} else {
gerritBuilder_.setMessage(value);
}
}
contextCase_ = 2;
return this;
}
/**
*
*
*
* A SourceContext referring to a Gerrit project.
*
*
* .grafeas.v1.GerritSourceContext gerrit = 2;
*/
public Builder clearGerrit() {
if (gerritBuilder_ == null) {
if (contextCase_ == 2) {
contextCase_ = 0;
context_ = null;
onChanged();
}
} else {
if (contextCase_ == 2) {
contextCase_ = 0;
context_ = null;
}
gerritBuilder_.clear();
}
return this;
}
/**
*
*
*
* A SourceContext referring to a Gerrit project.
*
*
* .grafeas.v1.GerritSourceContext gerrit = 2;
*/
public io.grafeas.v1.GerritSourceContext.Builder getGerritBuilder() {
return getGerritFieldBuilder().getBuilder();
}
/**
*
*
*
* A SourceContext referring to a Gerrit project.
*
*
* .grafeas.v1.GerritSourceContext gerrit = 2;
*/
@java.lang.Override
public io.grafeas.v1.GerritSourceContextOrBuilder getGerritOrBuilder() {
if ((contextCase_ == 2) && (gerritBuilder_ != null)) {
return gerritBuilder_.getMessageOrBuilder();
} else {
if (contextCase_ == 2) {
return (io.grafeas.v1.GerritSourceContext) context_;
}
return io.grafeas.v1.GerritSourceContext.getDefaultInstance();
}
}
/**
*
*
*
* A SourceContext referring to a Gerrit project.
*
*
* .grafeas.v1.GerritSourceContext gerrit = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.grafeas.v1.GerritSourceContext,
io.grafeas.v1.GerritSourceContext.Builder,
io.grafeas.v1.GerritSourceContextOrBuilder>
getGerritFieldBuilder() {
if (gerritBuilder_ == null) {
if (!(contextCase_ == 2)) {
context_ = io.grafeas.v1.GerritSourceContext.getDefaultInstance();
}
gerritBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
io.grafeas.v1.GerritSourceContext,
io.grafeas.v1.GerritSourceContext.Builder,
io.grafeas.v1.GerritSourceContextOrBuilder>(
(io.grafeas.v1.GerritSourceContext) context_, getParentForChildren(), isClean());
context_ = null;
}
contextCase_ = 2;
onChanged();
return gerritBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
io.grafeas.v1.GitSourceContext,
io.grafeas.v1.GitSourceContext.Builder,
io.grafeas.v1.GitSourceContextOrBuilder>
gitBuilder_;
/**
*
*
*
* A SourceContext referring to any third party Git repo (e.g., GitHub).
*
*
* .grafeas.v1.GitSourceContext git = 3;
*
* @return Whether the git field is set.
*/
@java.lang.Override
public boolean hasGit() {
return contextCase_ == 3;
}
/**
*
*
*
* A SourceContext referring to any third party Git repo (e.g., GitHub).
*
*
* .grafeas.v1.GitSourceContext git = 3;
*
* @return The git.
*/
@java.lang.Override
public io.grafeas.v1.GitSourceContext getGit() {
if (gitBuilder_ == null) {
if (contextCase_ == 3) {
return (io.grafeas.v1.GitSourceContext) context_;
}
return io.grafeas.v1.GitSourceContext.getDefaultInstance();
} else {
if (contextCase_ == 3) {
return gitBuilder_.getMessage();
}
return io.grafeas.v1.GitSourceContext.getDefaultInstance();
}
}
/**
*
*
*
* A SourceContext referring to any third party Git repo (e.g., GitHub).
*
*
* .grafeas.v1.GitSourceContext git = 3;
*/
public Builder setGit(io.grafeas.v1.GitSourceContext value) {
if (gitBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
context_ = value;
onChanged();
} else {
gitBuilder_.setMessage(value);
}
contextCase_ = 3;
return this;
}
/**
*
*
*
* A SourceContext referring to any third party Git repo (e.g., GitHub).
*
*
* .grafeas.v1.GitSourceContext git = 3;
*/
public Builder setGit(io.grafeas.v1.GitSourceContext.Builder builderForValue) {
if (gitBuilder_ == null) {
context_ = builderForValue.build();
onChanged();
} else {
gitBuilder_.setMessage(builderForValue.build());
}
contextCase_ = 3;
return this;
}
/**
*
*
*
* A SourceContext referring to any third party Git repo (e.g., GitHub).
*
*
* .grafeas.v1.GitSourceContext git = 3;
*/
public Builder mergeGit(io.grafeas.v1.GitSourceContext value) {
if (gitBuilder_ == null) {
if (contextCase_ == 3 && context_ != io.grafeas.v1.GitSourceContext.getDefaultInstance()) {
context_ =
io.grafeas.v1.GitSourceContext.newBuilder((io.grafeas.v1.GitSourceContext) context_)
.mergeFrom(value)
.buildPartial();
} else {
context_ = value;
}
onChanged();
} else {
if (contextCase_ == 3) {
gitBuilder_.mergeFrom(value);
} else {
gitBuilder_.setMessage(value);
}
}
contextCase_ = 3;
return this;
}
/**
*
*
*
* A SourceContext referring to any third party Git repo (e.g., GitHub).
*
*
* .grafeas.v1.GitSourceContext git = 3;
*/
public Builder clearGit() {
if (gitBuilder_ == null) {
if (contextCase_ == 3) {
contextCase_ = 0;
context_ = null;
onChanged();
}
} else {
if (contextCase_ == 3) {
contextCase_ = 0;
context_ = null;
}
gitBuilder_.clear();
}
return this;
}
/**
*
*
*
* A SourceContext referring to any third party Git repo (e.g., GitHub).
*
*
* .grafeas.v1.GitSourceContext git = 3;
*/
public io.grafeas.v1.GitSourceContext.Builder getGitBuilder() {
return getGitFieldBuilder().getBuilder();
}
/**
*
*
*
* A SourceContext referring to any third party Git repo (e.g., GitHub).
*
*
* .grafeas.v1.GitSourceContext git = 3;
*/
@java.lang.Override
public io.grafeas.v1.GitSourceContextOrBuilder getGitOrBuilder() {
if ((contextCase_ == 3) && (gitBuilder_ != null)) {
return gitBuilder_.getMessageOrBuilder();
} else {
if (contextCase_ == 3) {
return (io.grafeas.v1.GitSourceContext) context_;
}
return io.grafeas.v1.GitSourceContext.getDefaultInstance();
}
}
/**
*
*
*
* A SourceContext referring to any third party Git repo (e.g., GitHub).
*
*
* .grafeas.v1.GitSourceContext git = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.grafeas.v1.GitSourceContext,
io.grafeas.v1.GitSourceContext.Builder,
io.grafeas.v1.GitSourceContextOrBuilder>
getGitFieldBuilder() {
if (gitBuilder_ == null) {
if (!(contextCase_ == 3)) {
context_ = io.grafeas.v1.GitSourceContext.getDefaultInstance();
}
gitBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
io.grafeas.v1.GitSourceContext,
io.grafeas.v1.GitSourceContext.Builder,
io.grafeas.v1.GitSourceContextOrBuilder>(
(io.grafeas.v1.GitSourceContext) context_, getParentForChildren(), isClean());
context_ = null;
}
contextCase_ = 3;
onChanged();
return gitBuilder_;
}
private com.google.protobuf.MapField
* Labels with user defined metadata.
*
*
* map<string, string> labels = 4;
*/
@java.lang.Override
public boolean containsLabels(java.lang.String key) {
if (key == null) {
throw new NullPointerException("map key");
}
return internalGetLabels().getMap().containsKey(key);
}
/** Use {@link #getLabelsMap()} instead. */
@java.lang.Override
@java.lang.Deprecated
public java.util.Map
* Labels with user defined metadata.
*
*
* map<string, string> labels = 4;
*/
@java.lang.Override
public java.util.Map
* Labels with user defined metadata.
*
*
* map<string, string> labels = 4;
*/
@java.lang.Override
public /* nullable */ java.lang.String getLabelsOrDefault(
java.lang.String key,
/* nullable */
java.lang.String defaultValue) {
if (key == null) {
throw new NullPointerException("map key");
}
java.util.Map
* Labels with user defined metadata.
*
*
* map<string, string> labels = 4;
*/
@java.lang.Override
public java.lang.String getLabelsOrThrow(java.lang.String key) {
if (key == null) {
throw new NullPointerException("map key");
}
java.util.Map
* Labels with user defined metadata.
*
*
* map<string, string> labels = 4;
*/
public Builder removeLabels(java.lang.String key) {
if (key == null) {
throw new NullPointerException("map key");
}
internalGetMutableLabels().getMutableMap().remove(key);
return this;
}
/** Use alternate mutation accessors instead. */
@java.lang.Deprecated
public java.util.Map
* Labels with user defined metadata.
*
*
* map<string, string> labels = 4;
*/
public Builder putLabels(java.lang.String key, java.lang.String value) {
if (key == null) {
throw new NullPointerException("map key");
}
if (value == null) {
throw new NullPointerException("map value");
}
internalGetMutableLabels().getMutableMap().put(key, value);
bitField0_ |= 0x00000008;
return this;
}
/**
*
*
*
* Labels with user defined metadata.
*
*
* map<string, string> labels = 4;
*/
public Builder putAllLabels(java.util.Map