• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2020 Google LLC
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     https://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 // Generated by the protocol buffer compiler.  DO NOT EDIT!
17 // source: google/cloud/webrisk/v1/webrisk.proto
18 
19 package com.google.webrisk.v1;
20 
21 /**
22  *
23  *
24  * <pre>
25  * Request to send a potentially phishy URI to WebRisk.
26  * </pre>
27  *
28  * Protobuf type {@code google.cloud.webrisk.v1.CreateSubmissionRequest}
29  */
30 public final class CreateSubmissionRequest extends com.google.protobuf.GeneratedMessageV3
31     implements
32     // @@protoc_insertion_point(message_implements:google.cloud.webrisk.v1.CreateSubmissionRequest)
33     CreateSubmissionRequestOrBuilder {
34   private static final long serialVersionUID = 0L;
35   // Use CreateSubmissionRequest.newBuilder() to construct.
CreateSubmissionRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36   private CreateSubmissionRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
37     super(builder);
38   }
39 
CreateSubmissionRequest()40   private CreateSubmissionRequest() {
41     parent_ = "";
42   }
43 
44   @java.lang.Override
45   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)46   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
47     return new CreateSubmissionRequest();
48   }
49 
50   @java.lang.Override
getUnknownFields()51   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
52     return this.unknownFields;
53   }
54 
getDescriptor()55   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
56     return com.google.webrisk.v1.WebRiskProto
57         .internal_static_google_cloud_webrisk_v1_CreateSubmissionRequest_descriptor;
58   }
59 
60   @java.lang.Override
61   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()62       internalGetFieldAccessorTable() {
63     return com.google.webrisk.v1.WebRiskProto
64         .internal_static_google_cloud_webrisk_v1_CreateSubmissionRequest_fieldAccessorTable
65         .ensureFieldAccessorsInitialized(
66             com.google.webrisk.v1.CreateSubmissionRequest.class,
67             com.google.webrisk.v1.CreateSubmissionRequest.Builder.class);
68   }
69 
70   public static final int PARENT_FIELD_NUMBER = 1;
71 
72   @SuppressWarnings("serial")
73   private volatile java.lang.Object parent_ = "";
74   /**
75    *
76    *
77    * <pre>
78    * Required. The name of the project that is making the submission. This string is in
79    * the format "projects/{project_number}".
80    * </pre>
81    *
82    * <code>
83    * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
84    * </code>
85    *
86    * @return The parent.
87    */
88   @java.lang.Override
getParent()89   public java.lang.String getParent() {
90     java.lang.Object ref = parent_;
91     if (ref instanceof java.lang.String) {
92       return (java.lang.String) ref;
93     } else {
94       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
95       java.lang.String s = bs.toStringUtf8();
96       parent_ = s;
97       return s;
98     }
99   }
100   /**
101    *
102    *
103    * <pre>
104    * Required. The name of the project that is making the submission. This string is in
105    * the format "projects/{project_number}".
106    * </pre>
107    *
108    * <code>
109    * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
110    * </code>
111    *
112    * @return The bytes for parent.
113    */
114   @java.lang.Override
getParentBytes()115   public com.google.protobuf.ByteString getParentBytes() {
116     java.lang.Object ref = parent_;
117     if (ref instanceof java.lang.String) {
118       com.google.protobuf.ByteString b =
119           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
120       parent_ = b;
121       return b;
122     } else {
123       return (com.google.protobuf.ByteString) ref;
124     }
125   }
126 
127   public static final int SUBMISSION_FIELD_NUMBER = 2;
128   private com.google.webrisk.v1.Submission submission_;
129   /**
130    *
131    *
132    * <pre>
133    * Required. The submission that contains the content of the phishing report.
134    * </pre>
135    *
136    * <code>
137    * .google.cloud.webrisk.v1.Submission submission = 2 [(.google.api.field_behavior) = REQUIRED];
138    * </code>
139    *
140    * @return Whether the submission field is set.
141    */
142   @java.lang.Override
hasSubmission()143   public boolean hasSubmission() {
144     return submission_ != null;
145   }
146   /**
147    *
148    *
149    * <pre>
150    * Required. The submission that contains the content of the phishing report.
151    * </pre>
152    *
153    * <code>
154    * .google.cloud.webrisk.v1.Submission submission = 2 [(.google.api.field_behavior) = REQUIRED];
155    * </code>
156    *
157    * @return The submission.
158    */
159   @java.lang.Override
getSubmission()160   public com.google.webrisk.v1.Submission getSubmission() {
161     return submission_ == null
162         ? com.google.webrisk.v1.Submission.getDefaultInstance()
163         : submission_;
164   }
165   /**
166    *
167    *
168    * <pre>
169    * Required. The submission that contains the content of the phishing report.
170    * </pre>
171    *
172    * <code>
173    * .google.cloud.webrisk.v1.Submission submission = 2 [(.google.api.field_behavior) = REQUIRED];
174    * </code>
175    */
176   @java.lang.Override
getSubmissionOrBuilder()177   public com.google.webrisk.v1.SubmissionOrBuilder getSubmissionOrBuilder() {
178     return submission_ == null
179         ? com.google.webrisk.v1.Submission.getDefaultInstance()
180         : submission_;
181   }
182 
183   private byte memoizedIsInitialized = -1;
184 
185   @java.lang.Override
isInitialized()186   public final boolean isInitialized() {
187     byte isInitialized = memoizedIsInitialized;
188     if (isInitialized == 1) return true;
189     if (isInitialized == 0) return false;
190 
191     memoizedIsInitialized = 1;
192     return true;
193   }
194 
195   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)196   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
197     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) {
198       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_);
199     }
200     if (submission_ != null) {
201       output.writeMessage(2, getSubmission());
202     }
203     getUnknownFields().writeTo(output);
204   }
205 
206   @java.lang.Override
getSerializedSize()207   public int getSerializedSize() {
208     int size = memoizedSize;
209     if (size != -1) return size;
210 
211     size = 0;
212     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) {
213       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_);
214     }
215     if (submission_ != null) {
216       size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSubmission());
217     }
218     size += getUnknownFields().getSerializedSize();
219     memoizedSize = size;
220     return size;
221   }
222 
223   @java.lang.Override
equals(final java.lang.Object obj)224   public boolean equals(final java.lang.Object obj) {
225     if (obj == this) {
226       return true;
227     }
228     if (!(obj instanceof com.google.webrisk.v1.CreateSubmissionRequest)) {
229       return super.equals(obj);
230     }
231     com.google.webrisk.v1.CreateSubmissionRequest other =
232         (com.google.webrisk.v1.CreateSubmissionRequest) obj;
233 
234     if (!getParent().equals(other.getParent())) return false;
235     if (hasSubmission() != other.hasSubmission()) return false;
236     if (hasSubmission()) {
237       if (!getSubmission().equals(other.getSubmission())) return false;
238     }
239     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
240     return true;
241   }
242 
243   @java.lang.Override
hashCode()244   public int hashCode() {
245     if (memoizedHashCode != 0) {
246       return memoizedHashCode;
247     }
248     int hash = 41;
249     hash = (19 * hash) + getDescriptor().hashCode();
250     hash = (37 * hash) + PARENT_FIELD_NUMBER;
251     hash = (53 * hash) + getParent().hashCode();
252     if (hasSubmission()) {
253       hash = (37 * hash) + SUBMISSION_FIELD_NUMBER;
254       hash = (53 * hash) + getSubmission().hashCode();
255     }
256     hash = (29 * hash) + getUnknownFields().hashCode();
257     memoizedHashCode = hash;
258     return hash;
259   }
260 
parseFrom(java.nio.ByteBuffer data)261   public static com.google.webrisk.v1.CreateSubmissionRequest parseFrom(java.nio.ByteBuffer data)
262       throws com.google.protobuf.InvalidProtocolBufferException {
263     return PARSER.parseFrom(data);
264   }
265 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)266   public static com.google.webrisk.v1.CreateSubmissionRequest parseFrom(
267       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
268       throws com.google.protobuf.InvalidProtocolBufferException {
269     return PARSER.parseFrom(data, extensionRegistry);
270   }
271 
parseFrom( com.google.protobuf.ByteString data)272   public static com.google.webrisk.v1.CreateSubmissionRequest parseFrom(
273       com.google.protobuf.ByteString data)
274       throws com.google.protobuf.InvalidProtocolBufferException {
275     return PARSER.parseFrom(data);
276   }
277 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)278   public static com.google.webrisk.v1.CreateSubmissionRequest parseFrom(
279       com.google.protobuf.ByteString data,
280       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
281       throws com.google.protobuf.InvalidProtocolBufferException {
282     return PARSER.parseFrom(data, extensionRegistry);
283   }
284 
parseFrom(byte[] data)285   public static com.google.webrisk.v1.CreateSubmissionRequest parseFrom(byte[] data)
286       throws com.google.protobuf.InvalidProtocolBufferException {
287     return PARSER.parseFrom(data);
288   }
289 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)290   public static com.google.webrisk.v1.CreateSubmissionRequest parseFrom(
291       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
292       throws com.google.protobuf.InvalidProtocolBufferException {
293     return PARSER.parseFrom(data, extensionRegistry);
294   }
295 
parseFrom(java.io.InputStream input)296   public static com.google.webrisk.v1.CreateSubmissionRequest parseFrom(java.io.InputStream input)
297       throws java.io.IOException {
298     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
299   }
300 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)301   public static com.google.webrisk.v1.CreateSubmissionRequest parseFrom(
302       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
303       throws java.io.IOException {
304     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
305         PARSER, input, extensionRegistry);
306   }
307 
parseDelimitedFrom( java.io.InputStream input)308   public static com.google.webrisk.v1.CreateSubmissionRequest parseDelimitedFrom(
309       java.io.InputStream input) throws java.io.IOException {
310     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
311   }
312 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)313   public static com.google.webrisk.v1.CreateSubmissionRequest parseDelimitedFrom(
314       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
315       throws java.io.IOException {
316     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
317         PARSER, input, extensionRegistry);
318   }
319 
parseFrom( com.google.protobuf.CodedInputStream input)320   public static com.google.webrisk.v1.CreateSubmissionRequest parseFrom(
321       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
322     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
323   }
324 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)325   public static com.google.webrisk.v1.CreateSubmissionRequest parseFrom(
326       com.google.protobuf.CodedInputStream input,
327       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
328       throws java.io.IOException {
329     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
330         PARSER, input, extensionRegistry);
331   }
332 
333   @java.lang.Override
newBuilderForType()334   public Builder newBuilderForType() {
335     return newBuilder();
336   }
337 
newBuilder()338   public static Builder newBuilder() {
339     return DEFAULT_INSTANCE.toBuilder();
340   }
341 
newBuilder(com.google.webrisk.v1.CreateSubmissionRequest prototype)342   public static Builder newBuilder(com.google.webrisk.v1.CreateSubmissionRequest prototype) {
343     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
344   }
345 
346   @java.lang.Override
toBuilder()347   public Builder toBuilder() {
348     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
349   }
350 
351   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)352   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
353     Builder builder = new Builder(parent);
354     return builder;
355   }
356   /**
357    *
358    *
359    * <pre>
360    * Request to send a potentially phishy URI to WebRisk.
361    * </pre>
362    *
363    * Protobuf type {@code google.cloud.webrisk.v1.CreateSubmissionRequest}
364    */
365   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
366       implements
367       // @@protoc_insertion_point(builder_implements:google.cloud.webrisk.v1.CreateSubmissionRequest)
368       com.google.webrisk.v1.CreateSubmissionRequestOrBuilder {
getDescriptor()369     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
370       return com.google.webrisk.v1.WebRiskProto
371           .internal_static_google_cloud_webrisk_v1_CreateSubmissionRequest_descriptor;
372     }
373 
374     @java.lang.Override
375     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()376         internalGetFieldAccessorTable() {
377       return com.google.webrisk.v1.WebRiskProto
378           .internal_static_google_cloud_webrisk_v1_CreateSubmissionRequest_fieldAccessorTable
379           .ensureFieldAccessorsInitialized(
380               com.google.webrisk.v1.CreateSubmissionRequest.class,
381               com.google.webrisk.v1.CreateSubmissionRequest.Builder.class);
382     }
383 
384     // Construct using com.google.webrisk.v1.CreateSubmissionRequest.newBuilder()
Builder()385     private Builder() {}
386 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)387     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
388       super(parent);
389     }
390 
391     @java.lang.Override
clear()392     public Builder clear() {
393       super.clear();
394       bitField0_ = 0;
395       parent_ = "";
396       submission_ = null;
397       if (submissionBuilder_ != null) {
398         submissionBuilder_.dispose();
399         submissionBuilder_ = null;
400       }
401       return this;
402     }
403 
404     @java.lang.Override
getDescriptorForType()405     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
406       return com.google.webrisk.v1.WebRiskProto
407           .internal_static_google_cloud_webrisk_v1_CreateSubmissionRequest_descriptor;
408     }
409 
410     @java.lang.Override
getDefaultInstanceForType()411     public com.google.webrisk.v1.CreateSubmissionRequest getDefaultInstanceForType() {
412       return com.google.webrisk.v1.CreateSubmissionRequest.getDefaultInstance();
413     }
414 
415     @java.lang.Override
build()416     public com.google.webrisk.v1.CreateSubmissionRequest build() {
417       com.google.webrisk.v1.CreateSubmissionRequest result = buildPartial();
418       if (!result.isInitialized()) {
419         throw newUninitializedMessageException(result);
420       }
421       return result;
422     }
423 
424     @java.lang.Override
buildPartial()425     public com.google.webrisk.v1.CreateSubmissionRequest buildPartial() {
426       com.google.webrisk.v1.CreateSubmissionRequest result =
427           new com.google.webrisk.v1.CreateSubmissionRequest(this);
428       if (bitField0_ != 0) {
429         buildPartial0(result);
430       }
431       onBuilt();
432       return result;
433     }
434 
buildPartial0(com.google.webrisk.v1.CreateSubmissionRequest result)435     private void buildPartial0(com.google.webrisk.v1.CreateSubmissionRequest result) {
436       int from_bitField0_ = bitField0_;
437       if (((from_bitField0_ & 0x00000001) != 0)) {
438         result.parent_ = parent_;
439       }
440       if (((from_bitField0_ & 0x00000002) != 0)) {
441         result.submission_ = submissionBuilder_ == null ? submission_ : submissionBuilder_.build();
442       }
443     }
444 
445     @java.lang.Override
clone()446     public Builder clone() {
447       return super.clone();
448     }
449 
450     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)451     public Builder setField(
452         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
453       return super.setField(field, value);
454     }
455 
456     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)457     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
458       return super.clearField(field);
459     }
460 
461     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)462     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
463       return super.clearOneof(oneof);
464     }
465 
466     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)467     public Builder setRepeatedField(
468         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
469       return super.setRepeatedField(field, index, value);
470     }
471 
472     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)473     public Builder addRepeatedField(
474         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
475       return super.addRepeatedField(field, value);
476     }
477 
478     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)479     public Builder mergeFrom(com.google.protobuf.Message other) {
480       if (other instanceof com.google.webrisk.v1.CreateSubmissionRequest) {
481         return mergeFrom((com.google.webrisk.v1.CreateSubmissionRequest) other);
482       } else {
483         super.mergeFrom(other);
484         return this;
485       }
486     }
487 
mergeFrom(com.google.webrisk.v1.CreateSubmissionRequest other)488     public Builder mergeFrom(com.google.webrisk.v1.CreateSubmissionRequest other) {
489       if (other == com.google.webrisk.v1.CreateSubmissionRequest.getDefaultInstance()) return this;
490       if (!other.getParent().isEmpty()) {
491         parent_ = other.parent_;
492         bitField0_ |= 0x00000001;
493         onChanged();
494       }
495       if (other.hasSubmission()) {
496         mergeSubmission(other.getSubmission());
497       }
498       this.mergeUnknownFields(other.getUnknownFields());
499       onChanged();
500       return this;
501     }
502 
503     @java.lang.Override
isInitialized()504     public final boolean isInitialized() {
505       return true;
506     }
507 
508     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)509     public Builder mergeFrom(
510         com.google.protobuf.CodedInputStream input,
511         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
512         throws java.io.IOException {
513       if (extensionRegistry == null) {
514         throw new java.lang.NullPointerException();
515       }
516       try {
517         boolean done = false;
518         while (!done) {
519           int tag = input.readTag();
520           switch (tag) {
521             case 0:
522               done = true;
523               break;
524             case 10:
525               {
526                 parent_ = input.readStringRequireUtf8();
527                 bitField0_ |= 0x00000001;
528                 break;
529               } // case 10
530             case 18:
531               {
532                 input.readMessage(getSubmissionFieldBuilder().getBuilder(), extensionRegistry);
533                 bitField0_ |= 0x00000002;
534                 break;
535               } // case 18
536             default:
537               {
538                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
539                   done = true; // was an endgroup tag
540                 }
541                 break;
542               } // default:
543           } // switch (tag)
544         } // while (!done)
545       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
546         throw e.unwrapIOException();
547       } finally {
548         onChanged();
549       } // finally
550       return this;
551     }
552 
553     private int bitField0_;
554 
555     private java.lang.Object parent_ = "";
556     /**
557      *
558      *
559      * <pre>
560      * Required. The name of the project that is making the submission. This string is in
561      * the format "projects/{project_number}".
562      * </pre>
563      *
564      * <code>
565      * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
566      * </code>
567      *
568      * @return The parent.
569      */
getParent()570     public java.lang.String getParent() {
571       java.lang.Object ref = parent_;
572       if (!(ref instanceof java.lang.String)) {
573         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
574         java.lang.String s = bs.toStringUtf8();
575         parent_ = s;
576         return s;
577       } else {
578         return (java.lang.String) ref;
579       }
580     }
581     /**
582      *
583      *
584      * <pre>
585      * Required. The name of the project that is making the submission. This string is in
586      * the format "projects/{project_number}".
587      * </pre>
588      *
589      * <code>
590      * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
591      * </code>
592      *
593      * @return The bytes for parent.
594      */
getParentBytes()595     public com.google.protobuf.ByteString getParentBytes() {
596       java.lang.Object ref = parent_;
597       if (ref instanceof String) {
598         com.google.protobuf.ByteString b =
599             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
600         parent_ = b;
601         return b;
602       } else {
603         return (com.google.protobuf.ByteString) ref;
604       }
605     }
606     /**
607      *
608      *
609      * <pre>
610      * Required. The name of the project that is making the submission. This string is in
611      * the format "projects/{project_number}".
612      * </pre>
613      *
614      * <code>
615      * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
616      * </code>
617      *
618      * @param value The parent to set.
619      * @return This builder for chaining.
620      */
setParent(java.lang.String value)621     public Builder setParent(java.lang.String value) {
622       if (value == null) {
623         throw new NullPointerException();
624       }
625       parent_ = value;
626       bitField0_ |= 0x00000001;
627       onChanged();
628       return this;
629     }
630     /**
631      *
632      *
633      * <pre>
634      * Required. The name of the project that is making the submission. This string is in
635      * the format "projects/{project_number}".
636      * </pre>
637      *
638      * <code>
639      * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
640      * </code>
641      *
642      * @return This builder for chaining.
643      */
clearParent()644     public Builder clearParent() {
645       parent_ = getDefaultInstance().getParent();
646       bitField0_ = (bitField0_ & ~0x00000001);
647       onChanged();
648       return this;
649     }
650     /**
651      *
652      *
653      * <pre>
654      * Required. The name of the project that is making the submission. This string is in
655      * the format "projects/{project_number}".
656      * </pre>
657      *
658      * <code>
659      * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
660      * </code>
661      *
662      * @param value The bytes for parent to set.
663      * @return This builder for chaining.
664      */
setParentBytes(com.google.protobuf.ByteString value)665     public Builder setParentBytes(com.google.protobuf.ByteString value) {
666       if (value == null) {
667         throw new NullPointerException();
668       }
669       checkByteStringIsUtf8(value);
670       parent_ = value;
671       bitField0_ |= 0x00000001;
672       onChanged();
673       return this;
674     }
675 
676     private com.google.webrisk.v1.Submission submission_;
677     private com.google.protobuf.SingleFieldBuilderV3<
678             com.google.webrisk.v1.Submission,
679             com.google.webrisk.v1.Submission.Builder,
680             com.google.webrisk.v1.SubmissionOrBuilder>
681         submissionBuilder_;
682     /**
683      *
684      *
685      * <pre>
686      * Required. The submission that contains the content of the phishing report.
687      * </pre>
688      *
689      * <code>
690      * .google.cloud.webrisk.v1.Submission submission = 2 [(.google.api.field_behavior) = REQUIRED];
691      * </code>
692      *
693      * @return Whether the submission field is set.
694      */
hasSubmission()695     public boolean hasSubmission() {
696       return ((bitField0_ & 0x00000002) != 0);
697     }
698     /**
699      *
700      *
701      * <pre>
702      * Required. The submission that contains the content of the phishing report.
703      * </pre>
704      *
705      * <code>
706      * .google.cloud.webrisk.v1.Submission submission = 2 [(.google.api.field_behavior) = REQUIRED];
707      * </code>
708      *
709      * @return The submission.
710      */
getSubmission()711     public com.google.webrisk.v1.Submission getSubmission() {
712       if (submissionBuilder_ == null) {
713         return submission_ == null
714             ? com.google.webrisk.v1.Submission.getDefaultInstance()
715             : submission_;
716       } else {
717         return submissionBuilder_.getMessage();
718       }
719     }
720     /**
721      *
722      *
723      * <pre>
724      * Required. The submission that contains the content of the phishing report.
725      * </pre>
726      *
727      * <code>
728      * .google.cloud.webrisk.v1.Submission submission = 2 [(.google.api.field_behavior) = REQUIRED];
729      * </code>
730      */
setSubmission(com.google.webrisk.v1.Submission value)731     public Builder setSubmission(com.google.webrisk.v1.Submission value) {
732       if (submissionBuilder_ == null) {
733         if (value == null) {
734           throw new NullPointerException();
735         }
736         submission_ = value;
737       } else {
738         submissionBuilder_.setMessage(value);
739       }
740       bitField0_ |= 0x00000002;
741       onChanged();
742       return this;
743     }
744     /**
745      *
746      *
747      * <pre>
748      * Required. The submission that contains the content of the phishing report.
749      * </pre>
750      *
751      * <code>
752      * .google.cloud.webrisk.v1.Submission submission = 2 [(.google.api.field_behavior) = REQUIRED];
753      * </code>
754      */
setSubmission(com.google.webrisk.v1.Submission.Builder builderForValue)755     public Builder setSubmission(com.google.webrisk.v1.Submission.Builder builderForValue) {
756       if (submissionBuilder_ == null) {
757         submission_ = builderForValue.build();
758       } else {
759         submissionBuilder_.setMessage(builderForValue.build());
760       }
761       bitField0_ |= 0x00000002;
762       onChanged();
763       return this;
764     }
765     /**
766      *
767      *
768      * <pre>
769      * Required. The submission that contains the content of the phishing report.
770      * </pre>
771      *
772      * <code>
773      * .google.cloud.webrisk.v1.Submission submission = 2 [(.google.api.field_behavior) = REQUIRED];
774      * </code>
775      */
mergeSubmission(com.google.webrisk.v1.Submission value)776     public Builder mergeSubmission(com.google.webrisk.v1.Submission value) {
777       if (submissionBuilder_ == null) {
778         if (((bitField0_ & 0x00000002) != 0)
779             && submission_ != null
780             && submission_ != com.google.webrisk.v1.Submission.getDefaultInstance()) {
781           getSubmissionBuilder().mergeFrom(value);
782         } else {
783           submission_ = value;
784         }
785       } else {
786         submissionBuilder_.mergeFrom(value);
787       }
788       bitField0_ |= 0x00000002;
789       onChanged();
790       return this;
791     }
792     /**
793      *
794      *
795      * <pre>
796      * Required. The submission that contains the content of the phishing report.
797      * </pre>
798      *
799      * <code>
800      * .google.cloud.webrisk.v1.Submission submission = 2 [(.google.api.field_behavior) = REQUIRED];
801      * </code>
802      */
clearSubmission()803     public Builder clearSubmission() {
804       bitField0_ = (bitField0_ & ~0x00000002);
805       submission_ = null;
806       if (submissionBuilder_ != null) {
807         submissionBuilder_.dispose();
808         submissionBuilder_ = null;
809       }
810       onChanged();
811       return this;
812     }
813     /**
814      *
815      *
816      * <pre>
817      * Required. The submission that contains the content of the phishing report.
818      * </pre>
819      *
820      * <code>
821      * .google.cloud.webrisk.v1.Submission submission = 2 [(.google.api.field_behavior) = REQUIRED];
822      * </code>
823      */
getSubmissionBuilder()824     public com.google.webrisk.v1.Submission.Builder getSubmissionBuilder() {
825       bitField0_ |= 0x00000002;
826       onChanged();
827       return getSubmissionFieldBuilder().getBuilder();
828     }
829     /**
830      *
831      *
832      * <pre>
833      * Required. The submission that contains the content of the phishing report.
834      * </pre>
835      *
836      * <code>
837      * .google.cloud.webrisk.v1.Submission submission = 2 [(.google.api.field_behavior) = REQUIRED];
838      * </code>
839      */
getSubmissionOrBuilder()840     public com.google.webrisk.v1.SubmissionOrBuilder getSubmissionOrBuilder() {
841       if (submissionBuilder_ != null) {
842         return submissionBuilder_.getMessageOrBuilder();
843       } else {
844         return submission_ == null
845             ? com.google.webrisk.v1.Submission.getDefaultInstance()
846             : submission_;
847       }
848     }
849     /**
850      *
851      *
852      * <pre>
853      * Required. The submission that contains the content of the phishing report.
854      * </pre>
855      *
856      * <code>
857      * .google.cloud.webrisk.v1.Submission submission = 2 [(.google.api.field_behavior) = REQUIRED];
858      * </code>
859      */
860     private com.google.protobuf.SingleFieldBuilderV3<
861             com.google.webrisk.v1.Submission,
862             com.google.webrisk.v1.Submission.Builder,
863             com.google.webrisk.v1.SubmissionOrBuilder>
getSubmissionFieldBuilder()864         getSubmissionFieldBuilder() {
865       if (submissionBuilder_ == null) {
866         submissionBuilder_ =
867             new com.google.protobuf.SingleFieldBuilderV3<
868                 com.google.webrisk.v1.Submission,
869                 com.google.webrisk.v1.Submission.Builder,
870                 com.google.webrisk.v1.SubmissionOrBuilder>(
871                 getSubmission(), getParentForChildren(), isClean());
872         submission_ = null;
873       }
874       return submissionBuilder_;
875     }
876 
877     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)878     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
879       return super.setUnknownFields(unknownFields);
880     }
881 
882     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)883     public final Builder mergeUnknownFields(
884         final com.google.protobuf.UnknownFieldSet unknownFields) {
885       return super.mergeUnknownFields(unknownFields);
886     }
887 
888     // @@protoc_insertion_point(builder_scope:google.cloud.webrisk.v1.CreateSubmissionRequest)
889   }
890 
891   // @@protoc_insertion_point(class_scope:google.cloud.webrisk.v1.CreateSubmissionRequest)
892   private static final com.google.webrisk.v1.CreateSubmissionRequest DEFAULT_INSTANCE;
893 
894   static {
895     DEFAULT_INSTANCE = new com.google.webrisk.v1.CreateSubmissionRequest();
896   }
897 
getDefaultInstance()898   public static com.google.webrisk.v1.CreateSubmissionRequest getDefaultInstance() {
899     return DEFAULT_INSTANCE;
900   }
901 
902   private static final com.google.protobuf.Parser<CreateSubmissionRequest> PARSER =
903       new com.google.protobuf.AbstractParser<CreateSubmissionRequest>() {
904         @java.lang.Override
905         public CreateSubmissionRequest parsePartialFrom(
906             com.google.protobuf.CodedInputStream input,
907             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
908             throws com.google.protobuf.InvalidProtocolBufferException {
909           Builder builder = newBuilder();
910           try {
911             builder.mergeFrom(input, extensionRegistry);
912           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
913             throw e.setUnfinishedMessage(builder.buildPartial());
914           } catch (com.google.protobuf.UninitializedMessageException e) {
915             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
916           } catch (java.io.IOException e) {
917             throw new com.google.protobuf.InvalidProtocolBufferException(e)
918                 .setUnfinishedMessage(builder.buildPartial());
919           }
920           return builder.buildPartial();
921         }
922       };
923 
parser()924   public static com.google.protobuf.Parser<CreateSubmissionRequest> parser() {
925     return PARSER;
926   }
927 
928   @java.lang.Override
getParserForType()929   public com.google.protobuf.Parser<CreateSubmissionRequest> getParserForType() {
930     return PARSER;
931   }
932 
933   @java.lang.Override
getDefaultInstanceForType()934   public com.google.webrisk.v1.CreateSubmissionRequest getDefaultInstanceForType() {
935     return DEFAULT_INSTANCE;
936   }
937 }
938