• 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/devtools/cloudprofiler/v2/profiler.proto
18 
19 package com.google.devtools.cloudprofiler.v2;
20 
21 /**
22  *
23  *
24  * <pre>
25  * Profile resource.
26  * </pre>
27  *
28  * Protobuf type {@code google.devtools.cloudprofiler.v2.Profile}
29  */
30 public final class Profile extends com.google.protobuf.GeneratedMessageV3
31     implements
32     // @@protoc_insertion_point(message_implements:google.devtools.cloudprofiler.v2.Profile)
33     ProfileOrBuilder {
34   private static final long serialVersionUID = 0L;
35   // Use Profile.newBuilder() to construct.
Profile(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36   private Profile(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
37     super(builder);
38   }
39 
Profile()40   private Profile() {
41     name_ = "";
42     profileType_ = 0;
43     profileBytes_ = com.google.protobuf.ByteString.EMPTY;
44   }
45 
46   @java.lang.Override
47   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)48   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
49     return new Profile();
50   }
51 
52   @java.lang.Override
getUnknownFields()53   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
54     return this.unknownFields;
55   }
56 
getDescriptor()57   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
58     return com.google.devtools.cloudprofiler.v2.ProfilerProto
59         .internal_static_google_devtools_cloudprofiler_v2_Profile_descriptor;
60   }
61 
62   @SuppressWarnings({"rawtypes"})
63   @java.lang.Override
internalGetMapField(int number)64   protected com.google.protobuf.MapField internalGetMapField(int number) {
65     switch (number) {
66       case 6:
67         return internalGetLabels();
68       default:
69         throw new RuntimeException("Invalid map field number: " + number);
70     }
71   }
72 
73   @java.lang.Override
74   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()75       internalGetFieldAccessorTable() {
76     return com.google.devtools.cloudprofiler.v2.ProfilerProto
77         .internal_static_google_devtools_cloudprofiler_v2_Profile_fieldAccessorTable
78         .ensureFieldAccessorsInitialized(
79             com.google.devtools.cloudprofiler.v2.Profile.class,
80             com.google.devtools.cloudprofiler.v2.Profile.Builder.class);
81   }
82 
83   public static final int NAME_FIELD_NUMBER = 1;
84 
85   @SuppressWarnings("serial")
86   private volatile java.lang.Object name_ = "";
87   /**
88    *
89    *
90    * <pre>
91    * Output only. Opaque, server-assigned, unique ID for this profile.
92    * </pre>
93    *
94    * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
95    *
96    * @return The name.
97    */
98   @java.lang.Override
getName()99   public java.lang.String getName() {
100     java.lang.Object ref = name_;
101     if (ref instanceof java.lang.String) {
102       return (java.lang.String) ref;
103     } else {
104       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
105       java.lang.String s = bs.toStringUtf8();
106       name_ = s;
107       return s;
108     }
109   }
110   /**
111    *
112    *
113    * <pre>
114    * Output only. Opaque, server-assigned, unique ID for this profile.
115    * </pre>
116    *
117    * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
118    *
119    * @return The bytes for name.
120    */
121   @java.lang.Override
getNameBytes()122   public com.google.protobuf.ByteString getNameBytes() {
123     java.lang.Object ref = name_;
124     if (ref instanceof java.lang.String) {
125       com.google.protobuf.ByteString b =
126           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
127       name_ = b;
128       return b;
129     } else {
130       return (com.google.protobuf.ByteString) ref;
131     }
132   }
133 
134   public static final int PROFILE_TYPE_FIELD_NUMBER = 2;
135   private int profileType_ = 0;
136   /**
137    *
138    *
139    * <pre>
140    * Type of profile.
141    * For offline mode, this must be specified when creating the profile. For
142    * online mode it is assigned and returned by the server.
143    * </pre>
144    *
145    * <code>.google.devtools.cloudprofiler.v2.ProfileType profile_type = 2;</code>
146    *
147    * @return The enum numeric value on the wire for profileType.
148    */
149   @java.lang.Override
getProfileTypeValue()150   public int getProfileTypeValue() {
151     return profileType_;
152   }
153   /**
154    *
155    *
156    * <pre>
157    * Type of profile.
158    * For offline mode, this must be specified when creating the profile. For
159    * online mode it is assigned and returned by the server.
160    * </pre>
161    *
162    * <code>.google.devtools.cloudprofiler.v2.ProfileType profile_type = 2;</code>
163    *
164    * @return The profileType.
165    */
166   @java.lang.Override
getProfileType()167   public com.google.devtools.cloudprofiler.v2.ProfileType getProfileType() {
168     com.google.devtools.cloudprofiler.v2.ProfileType result =
169         com.google.devtools.cloudprofiler.v2.ProfileType.forNumber(profileType_);
170     return result == null ? com.google.devtools.cloudprofiler.v2.ProfileType.UNRECOGNIZED : result;
171   }
172 
173   public static final int DEPLOYMENT_FIELD_NUMBER = 3;
174   private com.google.devtools.cloudprofiler.v2.Deployment deployment_;
175   /**
176    *
177    *
178    * <pre>
179    * Deployment this profile corresponds to.
180    * </pre>
181    *
182    * <code>.google.devtools.cloudprofiler.v2.Deployment deployment = 3;</code>
183    *
184    * @return Whether the deployment field is set.
185    */
186   @java.lang.Override
hasDeployment()187   public boolean hasDeployment() {
188     return deployment_ != null;
189   }
190   /**
191    *
192    *
193    * <pre>
194    * Deployment this profile corresponds to.
195    * </pre>
196    *
197    * <code>.google.devtools.cloudprofiler.v2.Deployment deployment = 3;</code>
198    *
199    * @return The deployment.
200    */
201   @java.lang.Override
getDeployment()202   public com.google.devtools.cloudprofiler.v2.Deployment getDeployment() {
203     return deployment_ == null
204         ? com.google.devtools.cloudprofiler.v2.Deployment.getDefaultInstance()
205         : deployment_;
206   }
207   /**
208    *
209    *
210    * <pre>
211    * Deployment this profile corresponds to.
212    * </pre>
213    *
214    * <code>.google.devtools.cloudprofiler.v2.Deployment deployment = 3;</code>
215    */
216   @java.lang.Override
getDeploymentOrBuilder()217   public com.google.devtools.cloudprofiler.v2.DeploymentOrBuilder getDeploymentOrBuilder() {
218     return deployment_ == null
219         ? com.google.devtools.cloudprofiler.v2.Deployment.getDefaultInstance()
220         : deployment_;
221   }
222 
223   public static final int DURATION_FIELD_NUMBER = 4;
224   private com.google.protobuf.Duration duration_;
225   /**
226    *
227    *
228    * <pre>
229    * Duration of the profiling session.
230    * Input (for the offline mode) or output (for the online mode).
231    * The field represents requested profiling duration. It may slightly differ
232    * from the effective profiling duration, which is recorded in the profile
233    * data, in case the profiling can't be stopped immediately (e.g. in case
234    * stopping the profiling is handled asynchronously).
235    * </pre>
236    *
237    * <code>.google.protobuf.Duration duration = 4;</code>
238    *
239    * @return Whether the duration field is set.
240    */
241   @java.lang.Override
hasDuration()242   public boolean hasDuration() {
243     return duration_ != null;
244   }
245   /**
246    *
247    *
248    * <pre>
249    * Duration of the profiling session.
250    * Input (for the offline mode) or output (for the online mode).
251    * The field represents requested profiling duration. It may slightly differ
252    * from the effective profiling duration, which is recorded in the profile
253    * data, in case the profiling can't be stopped immediately (e.g. in case
254    * stopping the profiling is handled asynchronously).
255    * </pre>
256    *
257    * <code>.google.protobuf.Duration duration = 4;</code>
258    *
259    * @return The duration.
260    */
261   @java.lang.Override
getDuration()262   public com.google.protobuf.Duration getDuration() {
263     return duration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : duration_;
264   }
265   /**
266    *
267    *
268    * <pre>
269    * Duration of the profiling session.
270    * Input (for the offline mode) or output (for the online mode).
271    * The field represents requested profiling duration. It may slightly differ
272    * from the effective profiling duration, which is recorded in the profile
273    * data, in case the profiling can't be stopped immediately (e.g. in case
274    * stopping the profiling is handled asynchronously).
275    * </pre>
276    *
277    * <code>.google.protobuf.Duration duration = 4;</code>
278    */
279   @java.lang.Override
getDurationOrBuilder()280   public com.google.protobuf.DurationOrBuilder getDurationOrBuilder() {
281     return duration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : duration_;
282   }
283 
284   public static final int PROFILE_BYTES_FIELD_NUMBER = 5;
285   private com.google.protobuf.ByteString profileBytes_ = com.google.protobuf.ByteString.EMPTY;
286   /**
287    *
288    *
289    * <pre>
290    * Input only. Profile bytes, as a gzip compressed serialized proto, the
291    * format is https://github.com/google/pprof/blob/master/proto/profile.proto.
292    * </pre>
293    *
294    * <code>bytes profile_bytes = 5 [(.google.api.field_behavior) = INPUT_ONLY];</code>
295    *
296    * @return The profileBytes.
297    */
298   @java.lang.Override
getProfileBytes()299   public com.google.protobuf.ByteString getProfileBytes() {
300     return profileBytes_;
301   }
302 
303   public static final int LABELS_FIELD_NUMBER = 6;
304 
305   private static final class LabelsDefaultEntryHolder {
306     static final com.google.protobuf.MapEntry<java.lang.String, java.lang.String> defaultEntry =
307         com.google.protobuf.MapEntry.<java.lang.String, java.lang.String>newDefaultInstance(
308             com.google.devtools.cloudprofiler.v2.ProfilerProto
309                 .internal_static_google_devtools_cloudprofiler_v2_Profile_LabelsEntry_descriptor,
310             com.google.protobuf.WireFormat.FieldType.STRING,
311             "",
312             com.google.protobuf.WireFormat.FieldType.STRING,
313             "");
314   }
315 
316   @SuppressWarnings("serial")
317   private com.google.protobuf.MapField<java.lang.String, java.lang.String> labels_;
318 
internalGetLabels()319   private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetLabels() {
320     if (labels_ == null) {
321       return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry);
322     }
323     return labels_;
324   }
325 
getLabelsCount()326   public int getLabelsCount() {
327     return internalGetLabels().getMap().size();
328   }
329   /**
330    *
331    *
332    * <pre>
333    * Input only. Labels associated to this specific profile. These labels will
334    * get merged with the deployment labels for the final data set. See
335    * documentation on deployment labels for validation rules and limits.
336    * </pre>
337    *
338    * <code>map&lt;string, string&gt; labels = 6 [(.google.api.field_behavior) = INPUT_ONLY];</code>
339    */
340   @java.lang.Override
containsLabels(java.lang.String key)341   public boolean containsLabels(java.lang.String key) {
342     if (key == null) {
343       throw new NullPointerException("map key");
344     }
345     return internalGetLabels().getMap().containsKey(key);
346   }
347   /** Use {@link #getLabelsMap()} instead. */
348   @java.lang.Override
349   @java.lang.Deprecated
getLabels()350   public java.util.Map<java.lang.String, java.lang.String> getLabels() {
351     return getLabelsMap();
352   }
353   /**
354    *
355    *
356    * <pre>
357    * Input only. Labels associated to this specific profile. These labels will
358    * get merged with the deployment labels for the final data set. See
359    * documentation on deployment labels for validation rules and limits.
360    * </pre>
361    *
362    * <code>map&lt;string, string&gt; labels = 6 [(.google.api.field_behavior) = INPUT_ONLY];</code>
363    */
364   @java.lang.Override
getLabelsMap()365   public java.util.Map<java.lang.String, java.lang.String> getLabelsMap() {
366     return internalGetLabels().getMap();
367   }
368   /**
369    *
370    *
371    * <pre>
372    * Input only. Labels associated to this specific profile. These labels will
373    * get merged with the deployment labels for the final data set. See
374    * documentation on deployment labels for validation rules and limits.
375    * </pre>
376    *
377    * <code>map&lt;string, string&gt; labels = 6 [(.google.api.field_behavior) = INPUT_ONLY];</code>
378    */
379   @java.lang.Override
getLabelsOrDefault( java.lang.String key, java.lang.String defaultValue)380   public /* nullable */ java.lang.String getLabelsOrDefault(
381       java.lang.String key,
382       /* nullable */
383       java.lang.String defaultValue) {
384     if (key == null) {
385       throw new NullPointerException("map key");
386     }
387     java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap();
388     return map.containsKey(key) ? map.get(key) : defaultValue;
389   }
390   /**
391    *
392    *
393    * <pre>
394    * Input only. Labels associated to this specific profile. These labels will
395    * get merged with the deployment labels for the final data set. See
396    * documentation on deployment labels for validation rules and limits.
397    * </pre>
398    *
399    * <code>map&lt;string, string&gt; labels = 6 [(.google.api.field_behavior) = INPUT_ONLY];</code>
400    */
401   @java.lang.Override
getLabelsOrThrow(java.lang.String key)402   public java.lang.String getLabelsOrThrow(java.lang.String key) {
403     if (key == null) {
404       throw new NullPointerException("map key");
405     }
406     java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap();
407     if (!map.containsKey(key)) {
408       throw new java.lang.IllegalArgumentException();
409     }
410     return map.get(key);
411   }
412 
413   private byte memoizedIsInitialized = -1;
414 
415   @java.lang.Override
isInitialized()416   public final boolean isInitialized() {
417     byte isInitialized = memoizedIsInitialized;
418     if (isInitialized == 1) return true;
419     if (isInitialized == 0) return false;
420 
421     memoizedIsInitialized = 1;
422     return true;
423   }
424 
425   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)426   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
427     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
428       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
429     }
430     if (profileType_
431         != com.google.devtools.cloudprofiler.v2.ProfileType.PROFILE_TYPE_UNSPECIFIED.getNumber()) {
432       output.writeEnum(2, profileType_);
433     }
434     if (deployment_ != null) {
435       output.writeMessage(3, getDeployment());
436     }
437     if (duration_ != null) {
438       output.writeMessage(4, getDuration());
439     }
440     if (!profileBytes_.isEmpty()) {
441       output.writeBytes(5, profileBytes_);
442     }
443     com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
444         output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 6);
445     getUnknownFields().writeTo(output);
446   }
447 
448   @java.lang.Override
getSerializedSize()449   public int getSerializedSize() {
450     int size = memoizedSize;
451     if (size != -1) return size;
452 
453     size = 0;
454     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
455       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
456     }
457     if (profileType_
458         != com.google.devtools.cloudprofiler.v2.ProfileType.PROFILE_TYPE_UNSPECIFIED.getNumber()) {
459       size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, profileType_);
460     }
461     if (deployment_ != null) {
462       size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getDeployment());
463     }
464     if (duration_ != null) {
465       size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getDuration());
466     }
467     if (!profileBytes_.isEmpty()) {
468       size += com.google.protobuf.CodedOutputStream.computeBytesSize(5, profileBytes_);
469     }
470     for (java.util.Map.Entry<java.lang.String, java.lang.String> entry :
471         internalGetLabels().getMap().entrySet()) {
472       com.google.protobuf.MapEntry<java.lang.String, java.lang.String> labels__ =
473           LabelsDefaultEntryHolder.defaultEntry
474               .newBuilderForType()
475               .setKey(entry.getKey())
476               .setValue(entry.getValue())
477               .build();
478       size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, labels__);
479     }
480     size += getUnknownFields().getSerializedSize();
481     memoizedSize = size;
482     return size;
483   }
484 
485   @java.lang.Override
equals(final java.lang.Object obj)486   public boolean equals(final java.lang.Object obj) {
487     if (obj == this) {
488       return true;
489     }
490     if (!(obj instanceof com.google.devtools.cloudprofiler.v2.Profile)) {
491       return super.equals(obj);
492     }
493     com.google.devtools.cloudprofiler.v2.Profile other =
494         (com.google.devtools.cloudprofiler.v2.Profile) obj;
495 
496     if (!getName().equals(other.getName())) return false;
497     if (profileType_ != other.profileType_) return false;
498     if (hasDeployment() != other.hasDeployment()) return false;
499     if (hasDeployment()) {
500       if (!getDeployment().equals(other.getDeployment())) return false;
501     }
502     if (hasDuration() != other.hasDuration()) return false;
503     if (hasDuration()) {
504       if (!getDuration().equals(other.getDuration())) return false;
505     }
506     if (!getProfileBytes().equals(other.getProfileBytes())) return false;
507     if (!internalGetLabels().equals(other.internalGetLabels())) return false;
508     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
509     return true;
510   }
511 
512   @java.lang.Override
hashCode()513   public int hashCode() {
514     if (memoizedHashCode != 0) {
515       return memoizedHashCode;
516     }
517     int hash = 41;
518     hash = (19 * hash) + getDescriptor().hashCode();
519     hash = (37 * hash) + NAME_FIELD_NUMBER;
520     hash = (53 * hash) + getName().hashCode();
521     hash = (37 * hash) + PROFILE_TYPE_FIELD_NUMBER;
522     hash = (53 * hash) + profileType_;
523     if (hasDeployment()) {
524       hash = (37 * hash) + DEPLOYMENT_FIELD_NUMBER;
525       hash = (53 * hash) + getDeployment().hashCode();
526     }
527     if (hasDuration()) {
528       hash = (37 * hash) + DURATION_FIELD_NUMBER;
529       hash = (53 * hash) + getDuration().hashCode();
530     }
531     hash = (37 * hash) + PROFILE_BYTES_FIELD_NUMBER;
532     hash = (53 * hash) + getProfileBytes().hashCode();
533     if (!internalGetLabels().getMap().isEmpty()) {
534       hash = (37 * hash) + LABELS_FIELD_NUMBER;
535       hash = (53 * hash) + internalGetLabels().hashCode();
536     }
537     hash = (29 * hash) + getUnknownFields().hashCode();
538     memoizedHashCode = hash;
539     return hash;
540   }
541 
parseFrom(java.nio.ByteBuffer data)542   public static com.google.devtools.cloudprofiler.v2.Profile parseFrom(java.nio.ByteBuffer data)
543       throws com.google.protobuf.InvalidProtocolBufferException {
544     return PARSER.parseFrom(data);
545   }
546 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)547   public static com.google.devtools.cloudprofiler.v2.Profile parseFrom(
548       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
549       throws com.google.protobuf.InvalidProtocolBufferException {
550     return PARSER.parseFrom(data, extensionRegistry);
551   }
552 
parseFrom( com.google.protobuf.ByteString data)553   public static com.google.devtools.cloudprofiler.v2.Profile parseFrom(
554       com.google.protobuf.ByteString data)
555       throws com.google.protobuf.InvalidProtocolBufferException {
556     return PARSER.parseFrom(data);
557   }
558 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)559   public static com.google.devtools.cloudprofiler.v2.Profile parseFrom(
560       com.google.protobuf.ByteString data,
561       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
562       throws com.google.protobuf.InvalidProtocolBufferException {
563     return PARSER.parseFrom(data, extensionRegistry);
564   }
565 
parseFrom(byte[] data)566   public static com.google.devtools.cloudprofiler.v2.Profile parseFrom(byte[] data)
567       throws com.google.protobuf.InvalidProtocolBufferException {
568     return PARSER.parseFrom(data);
569   }
570 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)571   public static com.google.devtools.cloudprofiler.v2.Profile parseFrom(
572       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
573       throws com.google.protobuf.InvalidProtocolBufferException {
574     return PARSER.parseFrom(data, extensionRegistry);
575   }
576 
parseFrom(java.io.InputStream input)577   public static com.google.devtools.cloudprofiler.v2.Profile parseFrom(java.io.InputStream input)
578       throws java.io.IOException {
579     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
580   }
581 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)582   public static com.google.devtools.cloudprofiler.v2.Profile parseFrom(
583       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
584       throws java.io.IOException {
585     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
586         PARSER, input, extensionRegistry);
587   }
588 
parseDelimitedFrom( java.io.InputStream input)589   public static com.google.devtools.cloudprofiler.v2.Profile parseDelimitedFrom(
590       java.io.InputStream input) throws java.io.IOException {
591     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
592   }
593 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)594   public static com.google.devtools.cloudprofiler.v2.Profile parseDelimitedFrom(
595       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
596       throws java.io.IOException {
597     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
598         PARSER, input, extensionRegistry);
599   }
600 
parseFrom( com.google.protobuf.CodedInputStream input)601   public static com.google.devtools.cloudprofiler.v2.Profile parseFrom(
602       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
603     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
604   }
605 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)606   public static com.google.devtools.cloudprofiler.v2.Profile parseFrom(
607       com.google.protobuf.CodedInputStream input,
608       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
609       throws java.io.IOException {
610     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
611         PARSER, input, extensionRegistry);
612   }
613 
614   @java.lang.Override
newBuilderForType()615   public Builder newBuilderForType() {
616     return newBuilder();
617   }
618 
newBuilder()619   public static Builder newBuilder() {
620     return DEFAULT_INSTANCE.toBuilder();
621   }
622 
newBuilder(com.google.devtools.cloudprofiler.v2.Profile prototype)623   public static Builder newBuilder(com.google.devtools.cloudprofiler.v2.Profile prototype) {
624     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
625   }
626 
627   @java.lang.Override
toBuilder()628   public Builder toBuilder() {
629     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
630   }
631 
632   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)633   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
634     Builder builder = new Builder(parent);
635     return builder;
636   }
637   /**
638    *
639    *
640    * <pre>
641    * Profile resource.
642    * </pre>
643    *
644    * Protobuf type {@code google.devtools.cloudprofiler.v2.Profile}
645    */
646   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
647       implements
648       // @@protoc_insertion_point(builder_implements:google.devtools.cloudprofiler.v2.Profile)
649       com.google.devtools.cloudprofiler.v2.ProfileOrBuilder {
getDescriptor()650     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
651       return com.google.devtools.cloudprofiler.v2.ProfilerProto
652           .internal_static_google_devtools_cloudprofiler_v2_Profile_descriptor;
653     }
654 
655     @SuppressWarnings({"rawtypes"})
internalGetMapField(int number)656     protected com.google.protobuf.MapField internalGetMapField(int number) {
657       switch (number) {
658         case 6:
659           return internalGetLabels();
660         default:
661           throw new RuntimeException("Invalid map field number: " + number);
662       }
663     }
664 
665     @SuppressWarnings({"rawtypes"})
internalGetMutableMapField(int number)666     protected com.google.protobuf.MapField internalGetMutableMapField(int number) {
667       switch (number) {
668         case 6:
669           return internalGetMutableLabels();
670         default:
671           throw new RuntimeException("Invalid map field number: " + number);
672       }
673     }
674 
675     @java.lang.Override
676     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()677         internalGetFieldAccessorTable() {
678       return com.google.devtools.cloudprofiler.v2.ProfilerProto
679           .internal_static_google_devtools_cloudprofiler_v2_Profile_fieldAccessorTable
680           .ensureFieldAccessorsInitialized(
681               com.google.devtools.cloudprofiler.v2.Profile.class,
682               com.google.devtools.cloudprofiler.v2.Profile.Builder.class);
683     }
684 
685     // Construct using com.google.devtools.cloudprofiler.v2.Profile.newBuilder()
Builder()686     private Builder() {}
687 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)688     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
689       super(parent);
690     }
691 
692     @java.lang.Override
clear()693     public Builder clear() {
694       super.clear();
695       bitField0_ = 0;
696       name_ = "";
697       profileType_ = 0;
698       deployment_ = null;
699       if (deploymentBuilder_ != null) {
700         deploymentBuilder_.dispose();
701         deploymentBuilder_ = null;
702       }
703       duration_ = null;
704       if (durationBuilder_ != null) {
705         durationBuilder_.dispose();
706         durationBuilder_ = null;
707       }
708       profileBytes_ = com.google.protobuf.ByteString.EMPTY;
709       internalGetMutableLabels().clear();
710       return this;
711     }
712 
713     @java.lang.Override
getDescriptorForType()714     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
715       return com.google.devtools.cloudprofiler.v2.ProfilerProto
716           .internal_static_google_devtools_cloudprofiler_v2_Profile_descriptor;
717     }
718 
719     @java.lang.Override
getDefaultInstanceForType()720     public com.google.devtools.cloudprofiler.v2.Profile getDefaultInstanceForType() {
721       return com.google.devtools.cloudprofiler.v2.Profile.getDefaultInstance();
722     }
723 
724     @java.lang.Override
build()725     public com.google.devtools.cloudprofiler.v2.Profile build() {
726       com.google.devtools.cloudprofiler.v2.Profile result = buildPartial();
727       if (!result.isInitialized()) {
728         throw newUninitializedMessageException(result);
729       }
730       return result;
731     }
732 
733     @java.lang.Override
buildPartial()734     public com.google.devtools.cloudprofiler.v2.Profile buildPartial() {
735       com.google.devtools.cloudprofiler.v2.Profile result =
736           new com.google.devtools.cloudprofiler.v2.Profile(this);
737       if (bitField0_ != 0) {
738         buildPartial0(result);
739       }
740       onBuilt();
741       return result;
742     }
743 
buildPartial0(com.google.devtools.cloudprofiler.v2.Profile result)744     private void buildPartial0(com.google.devtools.cloudprofiler.v2.Profile result) {
745       int from_bitField0_ = bitField0_;
746       if (((from_bitField0_ & 0x00000001) != 0)) {
747         result.name_ = name_;
748       }
749       if (((from_bitField0_ & 0x00000002) != 0)) {
750         result.profileType_ = profileType_;
751       }
752       if (((from_bitField0_ & 0x00000004) != 0)) {
753         result.deployment_ = deploymentBuilder_ == null ? deployment_ : deploymentBuilder_.build();
754       }
755       if (((from_bitField0_ & 0x00000008) != 0)) {
756         result.duration_ = durationBuilder_ == null ? duration_ : durationBuilder_.build();
757       }
758       if (((from_bitField0_ & 0x00000010) != 0)) {
759         result.profileBytes_ = profileBytes_;
760       }
761       if (((from_bitField0_ & 0x00000020) != 0)) {
762         result.labels_ = internalGetLabels();
763         result.labels_.makeImmutable();
764       }
765     }
766 
767     @java.lang.Override
clone()768     public Builder clone() {
769       return super.clone();
770     }
771 
772     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)773     public Builder setField(
774         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
775       return super.setField(field, value);
776     }
777 
778     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)779     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
780       return super.clearField(field);
781     }
782 
783     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)784     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
785       return super.clearOneof(oneof);
786     }
787 
788     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)789     public Builder setRepeatedField(
790         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
791       return super.setRepeatedField(field, index, value);
792     }
793 
794     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)795     public Builder addRepeatedField(
796         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
797       return super.addRepeatedField(field, value);
798     }
799 
800     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)801     public Builder mergeFrom(com.google.protobuf.Message other) {
802       if (other instanceof com.google.devtools.cloudprofiler.v2.Profile) {
803         return mergeFrom((com.google.devtools.cloudprofiler.v2.Profile) other);
804       } else {
805         super.mergeFrom(other);
806         return this;
807       }
808     }
809 
mergeFrom(com.google.devtools.cloudprofiler.v2.Profile other)810     public Builder mergeFrom(com.google.devtools.cloudprofiler.v2.Profile other) {
811       if (other == com.google.devtools.cloudprofiler.v2.Profile.getDefaultInstance()) return this;
812       if (!other.getName().isEmpty()) {
813         name_ = other.name_;
814         bitField0_ |= 0x00000001;
815         onChanged();
816       }
817       if (other.profileType_ != 0) {
818         setProfileTypeValue(other.getProfileTypeValue());
819       }
820       if (other.hasDeployment()) {
821         mergeDeployment(other.getDeployment());
822       }
823       if (other.hasDuration()) {
824         mergeDuration(other.getDuration());
825       }
826       if (other.getProfileBytes() != com.google.protobuf.ByteString.EMPTY) {
827         setProfileBytes(other.getProfileBytes());
828       }
829       internalGetMutableLabels().mergeFrom(other.internalGetLabels());
830       bitField0_ |= 0x00000020;
831       this.mergeUnknownFields(other.getUnknownFields());
832       onChanged();
833       return this;
834     }
835 
836     @java.lang.Override
isInitialized()837     public final boolean isInitialized() {
838       return true;
839     }
840 
841     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)842     public Builder mergeFrom(
843         com.google.protobuf.CodedInputStream input,
844         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
845         throws java.io.IOException {
846       if (extensionRegistry == null) {
847         throw new java.lang.NullPointerException();
848       }
849       try {
850         boolean done = false;
851         while (!done) {
852           int tag = input.readTag();
853           switch (tag) {
854             case 0:
855               done = true;
856               break;
857             case 10:
858               {
859                 name_ = input.readStringRequireUtf8();
860                 bitField0_ |= 0x00000001;
861                 break;
862               } // case 10
863             case 16:
864               {
865                 profileType_ = input.readEnum();
866                 bitField0_ |= 0x00000002;
867                 break;
868               } // case 16
869             case 26:
870               {
871                 input.readMessage(getDeploymentFieldBuilder().getBuilder(), extensionRegistry);
872                 bitField0_ |= 0x00000004;
873                 break;
874               } // case 26
875             case 34:
876               {
877                 input.readMessage(getDurationFieldBuilder().getBuilder(), extensionRegistry);
878                 bitField0_ |= 0x00000008;
879                 break;
880               } // case 34
881             case 42:
882               {
883                 profileBytes_ = input.readBytes();
884                 bitField0_ |= 0x00000010;
885                 break;
886               } // case 42
887             case 50:
888               {
889                 com.google.protobuf.MapEntry<java.lang.String, java.lang.String> labels__ =
890                     input.readMessage(
891                         LabelsDefaultEntryHolder.defaultEntry.getParserForType(),
892                         extensionRegistry);
893                 internalGetMutableLabels()
894                     .getMutableMap()
895                     .put(labels__.getKey(), labels__.getValue());
896                 bitField0_ |= 0x00000020;
897                 break;
898               } // case 50
899             default:
900               {
901                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
902                   done = true; // was an endgroup tag
903                 }
904                 break;
905               } // default:
906           } // switch (tag)
907         } // while (!done)
908       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
909         throw e.unwrapIOException();
910       } finally {
911         onChanged();
912       } // finally
913       return this;
914     }
915 
916     private int bitField0_;
917 
918     private java.lang.Object name_ = "";
919     /**
920      *
921      *
922      * <pre>
923      * Output only. Opaque, server-assigned, unique ID for this profile.
924      * </pre>
925      *
926      * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
927      *
928      * @return The name.
929      */
getName()930     public java.lang.String getName() {
931       java.lang.Object ref = name_;
932       if (!(ref instanceof java.lang.String)) {
933         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
934         java.lang.String s = bs.toStringUtf8();
935         name_ = s;
936         return s;
937       } else {
938         return (java.lang.String) ref;
939       }
940     }
941     /**
942      *
943      *
944      * <pre>
945      * Output only. Opaque, server-assigned, unique ID for this profile.
946      * </pre>
947      *
948      * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
949      *
950      * @return The bytes for name.
951      */
getNameBytes()952     public com.google.protobuf.ByteString getNameBytes() {
953       java.lang.Object ref = name_;
954       if (ref instanceof String) {
955         com.google.protobuf.ByteString b =
956             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
957         name_ = b;
958         return b;
959       } else {
960         return (com.google.protobuf.ByteString) ref;
961       }
962     }
963     /**
964      *
965      *
966      * <pre>
967      * Output only. Opaque, server-assigned, unique ID for this profile.
968      * </pre>
969      *
970      * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
971      *
972      * @param value The name to set.
973      * @return This builder for chaining.
974      */
setName(java.lang.String value)975     public Builder setName(java.lang.String value) {
976       if (value == null) {
977         throw new NullPointerException();
978       }
979       name_ = value;
980       bitField0_ |= 0x00000001;
981       onChanged();
982       return this;
983     }
984     /**
985      *
986      *
987      * <pre>
988      * Output only. Opaque, server-assigned, unique ID for this profile.
989      * </pre>
990      *
991      * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
992      *
993      * @return This builder for chaining.
994      */
clearName()995     public Builder clearName() {
996       name_ = getDefaultInstance().getName();
997       bitField0_ = (bitField0_ & ~0x00000001);
998       onChanged();
999       return this;
1000     }
1001     /**
1002      *
1003      *
1004      * <pre>
1005      * Output only. Opaque, server-assigned, unique ID for this profile.
1006      * </pre>
1007      *
1008      * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1009      *
1010      * @param value The bytes for name to set.
1011      * @return This builder for chaining.
1012      */
setNameBytes(com.google.protobuf.ByteString value)1013     public Builder setNameBytes(com.google.protobuf.ByteString value) {
1014       if (value == null) {
1015         throw new NullPointerException();
1016       }
1017       checkByteStringIsUtf8(value);
1018       name_ = value;
1019       bitField0_ |= 0x00000001;
1020       onChanged();
1021       return this;
1022     }
1023 
1024     private int profileType_ = 0;
1025     /**
1026      *
1027      *
1028      * <pre>
1029      * Type of profile.
1030      * For offline mode, this must be specified when creating the profile. For
1031      * online mode it is assigned and returned by the server.
1032      * </pre>
1033      *
1034      * <code>.google.devtools.cloudprofiler.v2.ProfileType profile_type = 2;</code>
1035      *
1036      * @return The enum numeric value on the wire for profileType.
1037      */
1038     @java.lang.Override
getProfileTypeValue()1039     public int getProfileTypeValue() {
1040       return profileType_;
1041     }
1042     /**
1043      *
1044      *
1045      * <pre>
1046      * Type of profile.
1047      * For offline mode, this must be specified when creating the profile. For
1048      * online mode it is assigned and returned by the server.
1049      * </pre>
1050      *
1051      * <code>.google.devtools.cloudprofiler.v2.ProfileType profile_type = 2;</code>
1052      *
1053      * @param value The enum numeric value on the wire for profileType to set.
1054      * @return This builder for chaining.
1055      */
setProfileTypeValue(int value)1056     public Builder setProfileTypeValue(int value) {
1057       profileType_ = value;
1058       bitField0_ |= 0x00000002;
1059       onChanged();
1060       return this;
1061     }
1062     /**
1063      *
1064      *
1065      * <pre>
1066      * Type of profile.
1067      * For offline mode, this must be specified when creating the profile. For
1068      * online mode it is assigned and returned by the server.
1069      * </pre>
1070      *
1071      * <code>.google.devtools.cloudprofiler.v2.ProfileType profile_type = 2;</code>
1072      *
1073      * @return The profileType.
1074      */
1075     @java.lang.Override
getProfileType()1076     public com.google.devtools.cloudprofiler.v2.ProfileType getProfileType() {
1077       com.google.devtools.cloudprofiler.v2.ProfileType result =
1078           com.google.devtools.cloudprofiler.v2.ProfileType.forNumber(profileType_);
1079       return result == null
1080           ? com.google.devtools.cloudprofiler.v2.ProfileType.UNRECOGNIZED
1081           : result;
1082     }
1083     /**
1084      *
1085      *
1086      * <pre>
1087      * Type of profile.
1088      * For offline mode, this must be specified when creating the profile. For
1089      * online mode it is assigned and returned by the server.
1090      * </pre>
1091      *
1092      * <code>.google.devtools.cloudprofiler.v2.ProfileType profile_type = 2;</code>
1093      *
1094      * @param value The profileType to set.
1095      * @return This builder for chaining.
1096      */
setProfileType(com.google.devtools.cloudprofiler.v2.ProfileType value)1097     public Builder setProfileType(com.google.devtools.cloudprofiler.v2.ProfileType value) {
1098       if (value == null) {
1099         throw new NullPointerException();
1100       }
1101       bitField0_ |= 0x00000002;
1102       profileType_ = value.getNumber();
1103       onChanged();
1104       return this;
1105     }
1106     /**
1107      *
1108      *
1109      * <pre>
1110      * Type of profile.
1111      * For offline mode, this must be specified when creating the profile. For
1112      * online mode it is assigned and returned by the server.
1113      * </pre>
1114      *
1115      * <code>.google.devtools.cloudprofiler.v2.ProfileType profile_type = 2;</code>
1116      *
1117      * @return This builder for chaining.
1118      */
clearProfileType()1119     public Builder clearProfileType() {
1120       bitField0_ = (bitField0_ & ~0x00000002);
1121       profileType_ = 0;
1122       onChanged();
1123       return this;
1124     }
1125 
1126     private com.google.devtools.cloudprofiler.v2.Deployment deployment_;
1127     private com.google.protobuf.SingleFieldBuilderV3<
1128             com.google.devtools.cloudprofiler.v2.Deployment,
1129             com.google.devtools.cloudprofiler.v2.Deployment.Builder,
1130             com.google.devtools.cloudprofiler.v2.DeploymentOrBuilder>
1131         deploymentBuilder_;
1132     /**
1133      *
1134      *
1135      * <pre>
1136      * Deployment this profile corresponds to.
1137      * </pre>
1138      *
1139      * <code>.google.devtools.cloudprofiler.v2.Deployment deployment = 3;</code>
1140      *
1141      * @return Whether the deployment field is set.
1142      */
hasDeployment()1143     public boolean hasDeployment() {
1144       return ((bitField0_ & 0x00000004) != 0);
1145     }
1146     /**
1147      *
1148      *
1149      * <pre>
1150      * Deployment this profile corresponds to.
1151      * </pre>
1152      *
1153      * <code>.google.devtools.cloudprofiler.v2.Deployment deployment = 3;</code>
1154      *
1155      * @return The deployment.
1156      */
getDeployment()1157     public com.google.devtools.cloudprofiler.v2.Deployment getDeployment() {
1158       if (deploymentBuilder_ == null) {
1159         return deployment_ == null
1160             ? com.google.devtools.cloudprofiler.v2.Deployment.getDefaultInstance()
1161             : deployment_;
1162       } else {
1163         return deploymentBuilder_.getMessage();
1164       }
1165     }
1166     /**
1167      *
1168      *
1169      * <pre>
1170      * Deployment this profile corresponds to.
1171      * </pre>
1172      *
1173      * <code>.google.devtools.cloudprofiler.v2.Deployment deployment = 3;</code>
1174      */
setDeployment(com.google.devtools.cloudprofiler.v2.Deployment value)1175     public Builder setDeployment(com.google.devtools.cloudprofiler.v2.Deployment value) {
1176       if (deploymentBuilder_ == null) {
1177         if (value == null) {
1178           throw new NullPointerException();
1179         }
1180         deployment_ = value;
1181       } else {
1182         deploymentBuilder_.setMessage(value);
1183       }
1184       bitField0_ |= 0x00000004;
1185       onChanged();
1186       return this;
1187     }
1188     /**
1189      *
1190      *
1191      * <pre>
1192      * Deployment this profile corresponds to.
1193      * </pre>
1194      *
1195      * <code>.google.devtools.cloudprofiler.v2.Deployment deployment = 3;</code>
1196      */
setDeployment( com.google.devtools.cloudprofiler.v2.Deployment.Builder builderForValue)1197     public Builder setDeployment(
1198         com.google.devtools.cloudprofiler.v2.Deployment.Builder builderForValue) {
1199       if (deploymentBuilder_ == null) {
1200         deployment_ = builderForValue.build();
1201       } else {
1202         deploymentBuilder_.setMessage(builderForValue.build());
1203       }
1204       bitField0_ |= 0x00000004;
1205       onChanged();
1206       return this;
1207     }
1208     /**
1209      *
1210      *
1211      * <pre>
1212      * Deployment this profile corresponds to.
1213      * </pre>
1214      *
1215      * <code>.google.devtools.cloudprofiler.v2.Deployment deployment = 3;</code>
1216      */
mergeDeployment(com.google.devtools.cloudprofiler.v2.Deployment value)1217     public Builder mergeDeployment(com.google.devtools.cloudprofiler.v2.Deployment value) {
1218       if (deploymentBuilder_ == null) {
1219         if (((bitField0_ & 0x00000004) != 0)
1220             && deployment_ != null
1221             && deployment_
1222                 != com.google.devtools.cloudprofiler.v2.Deployment.getDefaultInstance()) {
1223           getDeploymentBuilder().mergeFrom(value);
1224         } else {
1225           deployment_ = value;
1226         }
1227       } else {
1228         deploymentBuilder_.mergeFrom(value);
1229       }
1230       bitField0_ |= 0x00000004;
1231       onChanged();
1232       return this;
1233     }
1234     /**
1235      *
1236      *
1237      * <pre>
1238      * Deployment this profile corresponds to.
1239      * </pre>
1240      *
1241      * <code>.google.devtools.cloudprofiler.v2.Deployment deployment = 3;</code>
1242      */
clearDeployment()1243     public Builder clearDeployment() {
1244       bitField0_ = (bitField0_ & ~0x00000004);
1245       deployment_ = null;
1246       if (deploymentBuilder_ != null) {
1247         deploymentBuilder_.dispose();
1248         deploymentBuilder_ = null;
1249       }
1250       onChanged();
1251       return this;
1252     }
1253     /**
1254      *
1255      *
1256      * <pre>
1257      * Deployment this profile corresponds to.
1258      * </pre>
1259      *
1260      * <code>.google.devtools.cloudprofiler.v2.Deployment deployment = 3;</code>
1261      */
getDeploymentBuilder()1262     public com.google.devtools.cloudprofiler.v2.Deployment.Builder getDeploymentBuilder() {
1263       bitField0_ |= 0x00000004;
1264       onChanged();
1265       return getDeploymentFieldBuilder().getBuilder();
1266     }
1267     /**
1268      *
1269      *
1270      * <pre>
1271      * Deployment this profile corresponds to.
1272      * </pre>
1273      *
1274      * <code>.google.devtools.cloudprofiler.v2.Deployment deployment = 3;</code>
1275      */
getDeploymentOrBuilder()1276     public com.google.devtools.cloudprofiler.v2.DeploymentOrBuilder getDeploymentOrBuilder() {
1277       if (deploymentBuilder_ != null) {
1278         return deploymentBuilder_.getMessageOrBuilder();
1279       } else {
1280         return deployment_ == null
1281             ? com.google.devtools.cloudprofiler.v2.Deployment.getDefaultInstance()
1282             : deployment_;
1283       }
1284     }
1285     /**
1286      *
1287      *
1288      * <pre>
1289      * Deployment this profile corresponds to.
1290      * </pre>
1291      *
1292      * <code>.google.devtools.cloudprofiler.v2.Deployment deployment = 3;</code>
1293      */
1294     private com.google.protobuf.SingleFieldBuilderV3<
1295             com.google.devtools.cloudprofiler.v2.Deployment,
1296             com.google.devtools.cloudprofiler.v2.Deployment.Builder,
1297             com.google.devtools.cloudprofiler.v2.DeploymentOrBuilder>
getDeploymentFieldBuilder()1298         getDeploymentFieldBuilder() {
1299       if (deploymentBuilder_ == null) {
1300         deploymentBuilder_ =
1301             new com.google.protobuf.SingleFieldBuilderV3<
1302                 com.google.devtools.cloudprofiler.v2.Deployment,
1303                 com.google.devtools.cloudprofiler.v2.Deployment.Builder,
1304                 com.google.devtools.cloudprofiler.v2.DeploymentOrBuilder>(
1305                 getDeployment(), getParentForChildren(), isClean());
1306         deployment_ = null;
1307       }
1308       return deploymentBuilder_;
1309     }
1310 
1311     private com.google.protobuf.Duration duration_;
1312     private com.google.protobuf.SingleFieldBuilderV3<
1313             com.google.protobuf.Duration,
1314             com.google.protobuf.Duration.Builder,
1315             com.google.protobuf.DurationOrBuilder>
1316         durationBuilder_;
1317     /**
1318      *
1319      *
1320      * <pre>
1321      * Duration of the profiling session.
1322      * Input (for the offline mode) or output (for the online mode).
1323      * The field represents requested profiling duration. It may slightly differ
1324      * from the effective profiling duration, which is recorded in the profile
1325      * data, in case the profiling can't be stopped immediately (e.g. in case
1326      * stopping the profiling is handled asynchronously).
1327      * </pre>
1328      *
1329      * <code>.google.protobuf.Duration duration = 4;</code>
1330      *
1331      * @return Whether the duration field is set.
1332      */
hasDuration()1333     public boolean hasDuration() {
1334       return ((bitField0_ & 0x00000008) != 0);
1335     }
1336     /**
1337      *
1338      *
1339      * <pre>
1340      * Duration of the profiling session.
1341      * Input (for the offline mode) or output (for the online mode).
1342      * The field represents requested profiling duration. It may slightly differ
1343      * from the effective profiling duration, which is recorded in the profile
1344      * data, in case the profiling can't be stopped immediately (e.g. in case
1345      * stopping the profiling is handled asynchronously).
1346      * </pre>
1347      *
1348      * <code>.google.protobuf.Duration duration = 4;</code>
1349      *
1350      * @return The duration.
1351      */
getDuration()1352     public com.google.protobuf.Duration getDuration() {
1353       if (durationBuilder_ == null) {
1354         return duration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : duration_;
1355       } else {
1356         return durationBuilder_.getMessage();
1357       }
1358     }
1359     /**
1360      *
1361      *
1362      * <pre>
1363      * Duration of the profiling session.
1364      * Input (for the offline mode) or output (for the online mode).
1365      * The field represents requested profiling duration. It may slightly differ
1366      * from the effective profiling duration, which is recorded in the profile
1367      * data, in case the profiling can't be stopped immediately (e.g. in case
1368      * stopping the profiling is handled asynchronously).
1369      * </pre>
1370      *
1371      * <code>.google.protobuf.Duration duration = 4;</code>
1372      */
setDuration(com.google.protobuf.Duration value)1373     public Builder setDuration(com.google.protobuf.Duration value) {
1374       if (durationBuilder_ == null) {
1375         if (value == null) {
1376           throw new NullPointerException();
1377         }
1378         duration_ = value;
1379       } else {
1380         durationBuilder_.setMessage(value);
1381       }
1382       bitField0_ |= 0x00000008;
1383       onChanged();
1384       return this;
1385     }
1386     /**
1387      *
1388      *
1389      * <pre>
1390      * Duration of the profiling session.
1391      * Input (for the offline mode) or output (for the online mode).
1392      * The field represents requested profiling duration. It may slightly differ
1393      * from the effective profiling duration, which is recorded in the profile
1394      * data, in case the profiling can't be stopped immediately (e.g. in case
1395      * stopping the profiling is handled asynchronously).
1396      * </pre>
1397      *
1398      * <code>.google.protobuf.Duration duration = 4;</code>
1399      */
setDuration(com.google.protobuf.Duration.Builder builderForValue)1400     public Builder setDuration(com.google.protobuf.Duration.Builder builderForValue) {
1401       if (durationBuilder_ == null) {
1402         duration_ = builderForValue.build();
1403       } else {
1404         durationBuilder_.setMessage(builderForValue.build());
1405       }
1406       bitField0_ |= 0x00000008;
1407       onChanged();
1408       return this;
1409     }
1410     /**
1411      *
1412      *
1413      * <pre>
1414      * Duration of the profiling session.
1415      * Input (for the offline mode) or output (for the online mode).
1416      * The field represents requested profiling duration. It may slightly differ
1417      * from the effective profiling duration, which is recorded in the profile
1418      * data, in case the profiling can't be stopped immediately (e.g. in case
1419      * stopping the profiling is handled asynchronously).
1420      * </pre>
1421      *
1422      * <code>.google.protobuf.Duration duration = 4;</code>
1423      */
mergeDuration(com.google.protobuf.Duration value)1424     public Builder mergeDuration(com.google.protobuf.Duration value) {
1425       if (durationBuilder_ == null) {
1426         if (((bitField0_ & 0x00000008) != 0)
1427             && duration_ != null
1428             && duration_ != com.google.protobuf.Duration.getDefaultInstance()) {
1429           getDurationBuilder().mergeFrom(value);
1430         } else {
1431           duration_ = value;
1432         }
1433       } else {
1434         durationBuilder_.mergeFrom(value);
1435       }
1436       bitField0_ |= 0x00000008;
1437       onChanged();
1438       return this;
1439     }
1440     /**
1441      *
1442      *
1443      * <pre>
1444      * Duration of the profiling session.
1445      * Input (for the offline mode) or output (for the online mode).
1446      * The field represents requested profiling duration. It may slightly differ
1447      * from the effective profiling duration, which is recorded in the profile
1448      * data, in case the profiling can't be stopped immediately (e.g. in case
1449      * stopping the profiling is handled asynchronously).
1450      * </pre>
1451      *
1452      * <code>.google.protobuf.Duration duration = 4;</code>
1453      */
clearDuration()1454     public Builder clearDuration() {
1455       bitField0_ = (bitField0_ & ~0x00000008);
1456       duration_ = null;
1457       if (durationBuilder_ != null) {
1458         durationBuilder_.dispose();
1459         durationBuilder_ = null;
1460       }
1461       onChanged();
1462       return this;
1463     }
1464     /**
1465      *
1466      *
1467      * <pre>
1468      * Duration of the profiling session.
1469      * Input (for the offline mode) or output (for the online mode).
1470      * The field represents requested profiling duration. It may slightly differ
1471      * from the effective profiling duration, which is recorded in the profile
1472      * data, in case the profiling can't be stopped immediately (e.g. in case
1473      * stopping the profiling is handled asynchronously).
1474      * </pre>
1475      *
1476      * <code>.google.protobuf.Duration duration = 4;</code>
1477      */
getDurationBuilder()1478     public com.google.protobuf.Duration.Builder getDurationBuilder() {
1479       bitField0_ |= 0x00000008;
1480       onChanged();
1481       return getDurationFieldBuilder().getBuilder();
1482     }
1483     /**
1484      *
1485      *
1486      * <pre>
1487      * Duration of the profiling session.
1488      * Input (for the offline mode) or output (for the online mode).
1489      * The field represents requested profiling duration. It may slightly differ
1490      * from the effective profiling duration, which is recorded in the profile
1491      * data, in case the profiling can't be stopped immediately (e.g. in case
1492      * stopping the profiling is handled asynchronously).
1493      * </pre>
1494      *
1495      * <code>.google.protobuf.Duration duration = 4;</code>
1496      */
getDurationOrBuilder()1497     public com.google.protobuf.DurationOrBuilder getDurationOrBuilder() {
1498       if (durationBuilder_ != null) {
1499         return durationBuilder_.getMessageOrBuilder();
1500       } else {
1501         return duration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : duration_;
1502       }
1503     }
1504     /**
1505      *
1506      *
1507      * <pre>
1508      * Duration of the profiling session.
1509      * Input (for the offline mode) or output (for the online mode).
1510      * The field represents requested profiling duration. It may slightly differ
1511      * from the effective profiling duration, which is recorded in the profile
1512      * data, in case the profiling can't be stopped immediately (e.g. in case
1513      * stopping the profiling is handled asynchronously).
1514      * </pre>
1515      *
1516      * <code>.google.protobuf.Duration duration = 4;</code>
1517      */
1518     private com.google.protobuf.SingleFieldBuilderV3<
1519             com.google.protobuf.Duration,
1520             com.google.protobuf.Duration.Builder,
1521             com.google.protobuf.DurationOrBuilder>
getDurationFieldBuilder()1522         getDurationFieldBuilder() {
1523       if (durationBuilder_ == null) {
1524         durationBuilder_ =
1525             new com.google.protobuf.SingleFieldBuilderV3<
1526                 com.google.protobuf.Duration,
1527                 com.google.protobuf.Duration.Builder,
1528                 com.google.protobuf.DurationOrBuilder>(
1529                 getDuration(), getParentForChildren(), isClean());
1530         duration_ = null;
1531       }
1532       return durationBuilder_;
1533     }
1534 
1535     private com.google.protobuf.ByteString profileBytes_ = com.google.protobuf.ByteString.EMPTY;
1536     /**
1537      *
1538      *
1539      * <pre>
1540      * Input only. Profile bytes, as a gzip compressed serialized proto, the
1541      * format is https://github.com/google/pprof/blob/master/proto/profile.proto.
1542      * </pre>
1543      *
1544      * <code>bytes profile_bytes = 5 [(.google.api.field_behavior) = INPUT_ONLY];</code>
1545      *
1546      * @return The profileBytes.
1547      */
1548     @java.lang.Override
getProfileBytes()1549     public com.google.protobuf.ByteString getProfileBytes() {
1550       return profileBytes_;
1551     }
1552     /**
1553      *
1554      *
1555      * <pre>
1556      * Input only. Profile bytes, as a gzip compressed serialized proto, the
1557      * format is https://github.com/google/pprof/blob/master/proto/profile.proto.
1558      * </pre>
1559      *
1560      * <code>bytes profile_bytes = 5 [(.google.api.field_behavior) = INPUT_ONLY];</code>
1561      *
1562      * @param value The profileBytes to set.
1563      * @return This builder for chaining.
1564      */
setProfileBytes(com.google.protobuf.ByteString value)1565     public Builder setProfileBytes(com.google.protobuf.ByteString value) {
1566       if (value == null) {
1567         throw new NullPointerException();
1568       }
1569       profileBytes_ = value;
1570       bitField0_ |= 0x00000010;
1571       onChanged();
1572       return this;
1573     }
1574     /**
1575      *
1576      *
1577      * <pre>
1578      * Input only. Profile bytes, as a gzip compressed serialized proto, the
1579      * format is https://github.com/google/pprof/blob/master/proto/profile.proto.
1580      * </pre>
1581      *
1582      * <code>bytes profile_bytes = 5 [(.google.api.field_behavior) = INPUT_ONLY];</code>
1583      *
1584      * @return This builder for chaining.
1585      */
clearProfileBytes()1586     public Builder clearProfileBytes() {
1587       bitField0_ = (bitField0_ & ~0x00000010);
1588       profileBytes_ = getDefaultInstance().getProfileBytes();
1589       onChanged();
1590       return this;
1591     }
1592 
1593     private com.google.protobuf.MapField<java.lang.String, java.lang.String> labels_;
1594 
internalGetLabels()1595     private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetLabels() {
1596       if (labels_ == null) {
1597         return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry);
1598       }
1599       return labels_;
1600     }
1601 
1602     private com.google.protobuf.MapField<java.lang.String, java.lang.String>
internalGetMutableLabels()1603         internalGetMutableLabels() {
1604       if (labels_ == null) {
1605         labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry);
1606       }
1607       if (!labels_.isMutable()) {
1608         labels_ = labels_.copy();
1609       }
1610       bitField0_ |= 0x00000020;
1611       onChanged();
1612       return labels_;
1613     }
1614 
getLabelsCount()1615     public int getLabelsCount() {
1616       return internalGetLabels().getMap().size();
1617     }
1618     /**
1619      *
1620      *
1621      * <pre>
1622      * Input only. Labels associated to this specific profile. These labels will
1623      * get merged with the deployment labels for the final data set. See
1624      * documentation on deployment labels for validation rules and limits.
1625      * </pre>
1626      *
1627      * <code>map&lt;string, string&gt; labels = 6 [(.google.api.field_behavior) = INPUT_ONLY];
1628      * </code>
1629      */
1630     @java.lang.Override
containsLabels(java.lang.String key)1631     public boolean containsLabels(java.lang.String key) {
1632       if (key == null) {
1633         throw new NullPointerException("map key");
1634       }
1635       return internalGetLabels().getMap().containsKey(key);
1636     }
1637     /** Use {@link #getLabelsMap()} instead. */
1638     @java.lang.Override
1639     @java.lang.Deprecated
getLabels()1640     public java.util.Map<java.lang.String, java.lang.String> getLabels() {
1641       return getLabelsMap();
1642     }
1643     /**
1644      *
1645      *
1646      * <pre>
1647      * Input only. Labels associated to this specific profile. These labels will
1648      * get merged with the deployment labels for the final data set. See
1649      * documentation on deployment labels for validation rules and limits.
1650      * </pre>
1651      *
1652      * <code>map&lt;string, string&gt; labels = 6 [(.google.api.field_behavior) = INPUT_ONLY];
1653      * </code>
1654      */
1655     @java.lang.Override
getLabelsMap()1656     public java.util.Map<java.lang.String, java.lang.String> getLabelsMap() {
1657       return internalGetLabels().getMap();
1658     }
1659     /**
1660      *
1661      *
1662      * <pre>
1663      * Input only. Labels associated to this specific profile. These labels will
1664      * get merged with the deployment labels for the final data set. See
1665      * documentation on deployment labels for validation rules and limits.
1666      * </pre>
1667      *
1668      * <code>map&lt;string, string&gt; labels = 6 [(.google.api.field_behavior) = INPUT_ONLY];
1669      * </code>
1670      */
1671     @java.lang.Override
getLabelsOrDefault( java.lang.String key, java.lang.String defaultValue)1672     public /* nullable */ java.lang.String getLabelsOrDefault(
1673         java.lang.String key,
1674         /* nullable */
1675         java.lang.String defaultValue) {
1676       if (key == null) {
1677         throw new NullPointerException("map key");
1678       }
1679       java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap();
1680       return map.containsKey(key) ? map.get(key) : defaultValue;
1681     }
1682     /**
1683      *
1684      *
1685      * <pre>
1686      * Input only. Labels associated to this specific profile. These labels will
1687      * get merged with the deployment labels for the final data set. See
1688      * documentation on deployment labels for validation rules and limits.
1689      * </pre>
1690      *
1691      * <code>map&lt;string, string&gt; labels = 6 [(.google.api.field_behavior) = INPUT_ONLY];
1692      * </code>
1693      */
1694     @java.lang.Override
getLabelsOrThrow(java.lang.String key)1695     public java.lang.String getLabelsOrThrow(java.lang.String key) {
1696       if (key == null) {
1697         throw new NullPointerException("map key");
1698       }
1699       java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap();
1700       if (!map.containsKey(key)) {
1701         throw new java.lang.IllegalArgumentException();
1702       }
1703       return map.get(key);
1704     }
1705 
clearLabels()1706     public Builder clearLabels() {
1707       bitField0_ = (bitField0_ & ~0x00000020);
1708       internalGetMutableLabels().getMutableMap().clear();
1709       return this;
1710     }
1711     /**
1712      *
1713      *
1714      * <pre>
1715      * Input only. Labels associated to this specific profile. These labels will
1716      * get merged with the deployment labels for the final data set. See
1717      * documentation on deployment labels for validation rules and limits.
1718      * </pre>
1719      *
1720      * <code>map&lt;string, string&gt; labels = 6 [(.google.api.field_behavior) = INPUT_ONLY];
1721      * </code>
1722      */
removeLabels(java.lang.String key)1723     public Builder removeLabels(java.lang.String key) {
1724       if (key == null) {
1725         throw new NullPointerException("map key");
1726       }
1727       internalGetMutableLabels().getMutableMap().remove(key);
1728       return this;
1729     }
1730     /** Use alternate mutation accessors instead. */
1731     @java.lang.Deprecated
getMutableLabels()1732     public java.util.Map<java.lang.String, java.lang.String> getMutableLabels() {
1733       bitField0_ |= 0x00000020;
1734       return internalGetMutableLabels().getMutableMap();
1735     }
1736     /**
1737      *
1738      *
1739      * <pre>
1740      * Input only. Labels associated to this specific profile. These labels will
1741      * get merged with the deployment labels for the final data set. See
1742      * documentation on deployment labels for validation rules and limits.
1743      * </pre>
1744      *
1745      * <code>map&lt;string, string&gt; labels = 6 [(.google.api.field_behavior) = INPUT_ONLY];
1746      * </code>
1747      */
putLabels(java.lang.String key, java.lang.String value)1748     public Builder putLabels(java.lang.String key, java.lang.String value) {
1749       if (key == null) {
1750         throw new NullPointerException("map key");
1751       }
1752       if (value == null) {
1753         throw new NullPointerException("map value");
1754       }
1755       internalGetMutableLabels().getMutableMap().put(key, value);
1756       bitField0_ |= 0x00000020;
1757       return this;
1758     }
1759     /**
1760      *
1761      *
1762      * <pre>
1763      * Input only. Labels associated to this specific profile. These labels will
1764      * get merged with the deployment labels for the final data set. See
1765      * documentation on deployment labels for validation rules and limits.
1766      * </pre>
1767      *
1768      * <code>map&lt;string, string&gt; labels = 6 [(.google.api.field_behavior) = INPUT_ONLY];
1769      * </code>
1770      */
putAllLabels(java.util.Map<java.lang.String, java.lang.String> values)1771     public Builder putAllLabels(java.util.Map<java.lang.String, java.lang.String> values) {
1772       internalGetMutableLabels().getMutableMap().putAll(values);
1773       bitField0_ |= 0x00000020;
1774       return this;
1775     }
1776 
1777     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1778     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
1779       return super.setUnknownFields(unknownFields);
1780     }
1781 
1782     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1783     public final Builder mergeUnknownFields(
1784         final com.google.protobuf.UnknownFieldSet unknownFields) {
1785       return super.mergeUnknownFields(unknownFields);
1786     }
1787 
1788     // @@protoc_insertion_point(builder_scope:google.devtools.cloudprofiler.v2.Profile)
1789   }
1790 
1791   // @@protoc_insertion_point(class_scope:google.devtools.cloudprofiler.v2.Profile)
1792   private static final com.google.devtools.cloudprofiler.v2.Profile DEFAULT_INSTANCE;
1793 
1794   static {
1795     DEFAULT_INSTANCE = new com.google.devtools.cloudprofiler.v2.Profile();
1796   }
1797 
getDefaultInstance()1798   public static com.google.devtools.cloudprofiler.v2.Profile getDefaultInstance() {
1799     return DEFAULT_INSTANCE;
1800   }
1801 
1802   private static final com.google.protobuf.Parser<Profile> PARSER =
1803       new com.google.protobuf.AbstractParser<Profile>() {
1804         @java.lang.Override
1805         public Profile parsePartialFrom(
1806             com.google.protobuf.CodedInputStream input,
1807             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1808             throws com.google.protobuf.InvalidProtocolBufferException {
1809           Builder builder = newBuilder();
1810           try {
1811             builder.mergeFrom(input, extensionRegistry);
1812           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1813             throw e.setUnfinishedMessage(builder.buildPartial());
1814           } catch (com.google.protobuf.UninitializedMessageException e) {
1815             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
1816           } catch (java.io.IOException e) {
1817             throw new com.google.protobuf.InvalidProtocolBufferException(e)
1818                 .setUnfinishedMessage(builder.buildPartial());
1819           }
1820           return builder.buildPartial();
1821         }
1822       };
1823 
parser()1824   public static com.google.protobuf.Parser<Profile> parser() {
1825     return PARSER;
1826   }
1827 
1828   @java.lang.Override
getParserForType()1829   public com.google.protobuf.Parser<Profile> getParserForType() {
1830     return PARSER;
1831   }
1832 
1833   @java.lang.Override
getDefaultInstanceForType()1834   public com.google.devtools.cloudprofiler.v2.Profile getDefaultInstanceForType() {
1835     return DEFAULT_INSTANCE;
1836   }
1837 }
1838