/* * Copyright 2020 Google LLC * * 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: google/devtools/containeranalysis/v1beta1/grafeas/grafeas.proto package io.grafeas.v1beta1; /** * * *
* Request to create notes in batch. ** * Protobuf type {@code grafeas.v1beta1.BatchCreateNotesRequest} */ public final class BatchCreateNotesRequest extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:grafeas.v1beta1.BatchCreateNotesRequest) BatchCreateNotesRequestOrBuilder { private static final long serialVersionUID = 0L; // Use BatchCreateNotesRequest.newBuilder() to construct. private BatchCreateNotesRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) { super(builder); } private BatchCreateNotesRequest() { parent_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new BatchCreateNotesRequest(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private BatchCreateNotesRequest( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { java.lang.String s = input.readStringRequireUtf8(); parent_ = s; break; } case 18: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { notes_ = com.google.protobuf.MapField.newMapField(NotesDefaultEntryHolder.defaultEntry); mutable_bitField0_ |= 0x00000001; } com.google.protobuf.MapEntry
* The name of the project in the form of `projects/[PROJECT_ID]`, under which * the notes are to be created. ** *
string parent = 1;
*
* @return The parent.
*/
@java.lang.Override
public java.lang.String getParent() {
java.lang.Object ref = parent_;
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();
parent_ = s;
return s;
}
}
/**
*
*
* * The name of the project in the form of `projects/[PROJECT_ID]`, under which * the notes are to be created. ** *
string parent = 1;
*
* @return The bytes for parent.
*/
@java.lang.Override
public com.google.protobuf.ByteString getParentBytes() {
java.lang.Object ref = parent_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
parent_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int NOTES_FIELD_NUMBER = 2;
private static final class NotesDefaultEntryHolder {
static final com.google.protobuf.MapEntry* The notes to create. ** *
map<string, .grafeas.v1beta1.Note> notes = 2;
*/
@java.lang.Override
public boolean containsNotes(java.lang.String key) {
if (key == null) {
throw new java.lang.NullPointerException();
}
return internalGetNotes().getMap().containsKey(key);
}
/** Use {@link #getNotesMap()} instead. */
@java.lang.Override
@java.lang.Deprecated
public java.util.Map* The notes to create. ** *
map<string, .grafeas.v1beta1.Note> notes = 2;
*/
@java.lang.Override
public java.util.Map* The notes to create. ** *
map<string, .grafeas.v1beta1.Note> notes = 2;
*/
@java.lang.Override
public io.grafeas.v1beta1.Note getNotesOrDefault(
java.lang.String key, io.grafeas.v1beta1.Note defaultValue) {
if (key == null) {
throw new java.lang.NullPointerException();
}
java.util.Map* The notes to create. ** *
map<string, .grafeas.v1beta1.Note> notes = 2;
*/
@java.lang.Override
public io.grafeas.v1beta1.Note getNotesOrThrow(java.lang.String key) {
if (key == null) {
throw new java.lang.NullPointerException();
}
java.util.Map* Request to create notes in batch. ** * Protobuf type {@code grafeas.v1beta1.BatchCreateNotesRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
* The name of the project in the form of `projects/[PROJECT_ID]`, under which
* the notes are to be created.
*
*
* string parent = 1;
*
* @return The parent.
*/
public java.lang.String getParent() {
java.lang.Object ref = parent_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
parent_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* The name of the project in the form of `projects/[PROJECT_ID]`, under which
* the notes are to be created.
*
*
* string parent = 1;
*
* @return The bytes for parent.
*/
public com.google.protobuf.ByteString getParentBytes() {
java.lang.Object ref = parent_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
parent_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* The name of the project in the form of `projects/[PROJECT_ID]`, under which
* the notes are to be created.
*
*
* string parent = 1;
*
* @param value The parent to set.
* @return This builder for chaining.
*/
public Builder setParent(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
parent_ = value;
onChanged();
return this;
}
/**
*
*
*
* The name of the project in the form of `projects/[PROJECT_ID]`, under which
* the notes are to be created.
*
*
* string parent = 1;
*
* @return This builder for chaining.
*/
public Builder clearParent() {
parent_ = getDefaultInstance().getParent();
onChanged();
return this;
}
/**
*
*
*
* The name of the project in the form of `projects/[PROJECT_ID]`, under which
* the notes are to be created.
*
*
* string parent = 1;
*
* @param value The bytes for parent to set.
* @return This builder for chaining.
*/
public Builder setParentBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
parent_ = value;
onChanged();
return this;
}
private com.google.protobuf.MapField
* The notes to create.
*
*
* map<string, .grafeas.v1beta1.Note> notes = 2;
*/
@java.lang.Override
public boolean containsNotes(java.lang.String key) {
if (key == null) {
throw new java.lang.NullPointerException();
}
return internalGetNotes().getMap().containsKey(key);
}
/** Use {@link #getNotesMap()} instead. */
@java.lang.Override
@java.lang.Deprecated
public java.util.Map
* The notes to create.
*
*
* map<string, .grafeas.v1beta1.Note> notes = 2;
*/
@java.lang.Override
public java.util.Map
* The notes to create.
*
*
* map<string, .grafeas.v1beta1.Note> notes = 2;
*/
@java.lang.Override
public io.grafeas.v1beta1.Note getNotesOrDefault(
java.lang.String key, io.grafeas.v1beta1.Note defaultValue) {
if (key == null) {
throw new java.lang.NullPointerException();
}
java.util.Map
* The notes to create.
*
*
* map<string, .grafeas.v1beta1.Note> notes = 2;
*/
@java.lang.Override
public io.grafeas.v1beta1.Note getNotesOrThrow(java.lang.String key) {
if (key == null) {
throw new java.lang.NullPointerException();
}
java.util.Map
* The notes to create.
*
*
* map<string, .grafeas.v1beta1.Note> notes = 2;
*/
public Builder removeNotes(java.lang.String key) {
if (key == null) {
throw new java.lang.NullPointerException();
}
internalGetMutableNotes().getMutableMap().remove(key);
return this;
}
/** Use alternate mutation accessors instead. */
@java.lang.Deprecated
public java.util.Map
* The notes to create.
*
*
* map<string, .grafeas.v1beta1.Note> notes = 2;
*/
public Builder putNotes(java.lang.String key, io.grafeas.v1beta1.Note value) {
if (key == null) {
throw new java.lang.NullPointerException();
}
if (value == null) {
throw new java.lang.NullPointerException();
}
internalGetMutableNotes().getMutableMap().put(key, value);
return this;
}
/**
*
*
*
* The notes to create.
*
*
* map<string, .grafeas.v1beta1.Note> notes = 2;
*/
public Builder putAllNotes(java.util.Map