• 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/compute/v1/compute.proto
18 
19 package com.google.cloud.compute.v1;
20 
21 /**
22  *
23  *
24  * <pre>
25  * Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() &lt; 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' &amp;&amp; document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.
26  * </pre>
27  *
28  * Protobuf type {@code google.cloud.compute.v1.Expr}
29  */
30 public final class Expr extends com.google.protobuf.GeneratedMessageV3
31     implements
32     // @@protoc_insertion_point(message_implements:google.cloud.compute.v1.Expr)
33     ExprOrBuilder {
34   private static final long serialVersionUID = 0L;
35   // Use Expr.newBuilder() to construct.
Expr(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36   private Expr(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
37     super(builder);
38   }
39 
Expr()40   private Expr() {
41     description_ = "";
42     expression_ = "";
43     location_ = "";
44     title_ = "";
45   }
46 
47   @java.lang.Override
48   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)49   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
50     return new Expr();
51   }
52 
53   @java.lang.Override
getUnknownFields()54   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
55     return this.unknownFields;
56   }
57 
getDescriptor()58   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
59     return com.google.cloud.compute.v1.Compute
60         .internal_static_google_cloud_compute_v1_Expr_descriptor;
61   }
62 
63   @java.lang.Override
64   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()65       internalGetFieldAccessorTable() {
66     return com.google.cloud.compute.v1.Compute
67         .internal_static_google_cloud_compute_v1_Expr_fieldAccessorTable
68         .ensureFieldAccessorsInitialized(
69             com.google.cloud.compute.v1.Expr.class, com.google.cloud.compute.v1.Expr.Builder.class);
70   }
71 
72   private int bitField0_;
73   public static final int DESCRIPTION_FIELD_NUMBER = 422937596;
74 
75   @SuppressWarnings("serial")
76   private volatile java.lang.Object description_ = "";
77   /**
78    *
79    *
80    * <pre>
81    * Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
82    * </pre>
83    *
84    * <code>optional string description = 422937596;</code>
85    *
86    * @return Whether the description field is set.
87    */
88   @java.lang.Override
hasDescription()89   public boolean hasDescription() {
90     return ((bitField0_ & 0x00000001) != 0);
91   }
92   /**
93    *
94    *
95    * <pre>
96    * Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
97    * </pre>
98    *
99    * <code>optional string description = 422937596;</code>
100    *
101    * @return The description.
102    */
103   @java.lang.Override
getDescription()104   public java.lang.String getDescription() {
105     java.lang.Object ref = description_;
106     if (ref instanceof java.lang.String) {
107       return (java.lang.String) ref;
108     } else {
109       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
110       java.lang.String s = bs.toStringUtf8();
111       description_ = s;
112       return s;
113     }
114   }
115   /**
116    *
117    *
118    * <pre>
119    * Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
120    * </pre>
121    *
122    * <code>optional string description = 422937596;</code>
123    *
124    * @return The bytes for description.
125    */
126   @java.lang.Override
getDescriptionBytes()127   public com.google.protobuf.ByteString getDescriptionBytes() {
128     java.lang.Object ref = description_;
129     if (ref instanceof java.lang.String) {
130       com.google.protobuf.ByteString b =
131           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
132       description_ = b;
133       return b;
134     } else {
135       return (com.google.protobuf.ByteString) ref;
136     }
137   }
138 
139   public static final int EXPRESSION_FIELD_NUMBER = 352031384;
140 
141   @SuppressWarnings("serial")
142   private volatile java.lang.Object expression_ = "";
143   /**
144    *
145    *
146    * <pre>
147    * Textual representation of an expression in Common Expression Language syntax.
148    * </pre>
149    *
150    * <code>optional string expression = 352031384;</code>
151    *
152    * @return Whether the expression field is set.
153    */
154   @java.lang.Override
hasExpression()155   public boolean hasExpression() {
156     return ((bitField0_ & 0x00000002) != 0);
157   }
158   /**
159    *
160    *
161    * <pre>
162    * Textual representation of an expression in Common Expression Language syntax.
163    * </pre>
164    *
165    * <code>optional string expression = 352031384;</code>
166    *
167    * @return The expression.
168    */
169   @java.lang.Override
getExpression()170   public java.lang.String getExpression() {
171     java.lang.Object ref = expression_;
172     if (ref instanceof java.lang.String) {
173       return (java.lang.String) ref;
174     } else {
175       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
176       java.lang.String s = bs.toStringUtf8();
177       expression_ = s;
178       return s;
179     }
180   }
181   /**
182    *
183    *
184    * <pre>
185    * Textual representation of an expression in Common Expression Language syntax.
186    * </pre>
187    *
188    * <code>optional string expression = 352031384;</code>
189    *
190    * @return The bytes for expression.
191    */
192   @java.lang.Override
getExpressionBytes()193   public com.google.protobuf.ByteString getExpressionBytes() {
194     java.lang.Object ref = expression_;
195     if (ref instanceof java.lang.String) {
196       com.google.protobuf.ByteString b =
197           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
198       expression_ = b;
199       return b;
200     } else {
201       return (com.google.protobuf.ByteString) ref;
202     }
203   }
204 
205   public static final int LOCATION_FIELD_NUMBER = 290430901;
206 
207   @SuppressWarnings("serial")
208   private volatile java.lang.Object location_ = "";
209   /**
210    *
211    *
212    * <pre>
213    * Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
214    * </pre>
215    *
216    * <code>optional string location = 290430901;</code>
217    *
218    * @return Whether the location field is set.
219    */
220   @java.lang.Override
hasLocation()221   public boolean hasLocation() {
222     return ((bitField0_ & 0x00000004) != 0);
223   }
224   /**
225    *
226    *
227    * <pre>
228    * Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
229    * </pre>
230    *
231    * <code>optional string location = 290430901;</code>
232    *
233    * @return The location.
234    */
235   @java.lang.Override
getLocation()236   public java.lang.String getLocation() {
237     java.lang.Object ref = location_;
238     if (ref instanceof java.lang.String) {
239       return (java.lang.String) ref;
240     } else {
241       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
242       java.lang.String s = bs.toStringUtf8();
243       location_ = s;
244       return s;
245     }
246   }
247   /**
248    *
249    *
250    * <pre>
251    * Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
252    * </pre>
253    *
254    * <code>optional string location = 290430901;</code>
255    *
256    * @return The bytes for location.
257    */
258   @java.lang.Override
getLocationBytes()259   public com.google.protobuf.ByteString getLocationBytes() {
260     java.lang.Object ref = location_;
261     if (ref instanceof java.lang.String) {
262       com.google.protobuf.ByteString b =
263           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
264       location_ = b;
265       return b;
266     } else {
267       return (com.google.protobuf.ByteString) ref;
268     }
269   }
270 
271   public static final int TITLE_FIELD_NUMBER = 110371416;
272 
273   @SuppressWarnings("serial")
274   private volatile java.lang.Object title_ = "";
275   /**
276    *
277    *
278    * <pre>
279    * Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
280    * </pre>
281    *
282    * <code>optional string title = 110371416;</code>
283    *
284    * @return Whether the title field is set.
285    */
286   @java.lang.Override
hasTitle()287   public boolean hasTitle() {
288     return ((bitField0_ & 0x00000008) != 0);
289   }
290   /**
291    *
292    *
293    * <pre>
294    * Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
295    * </pre>
296    *
297    * <code>optional string title = 110371416;</code>
298    *
299    * @return The title.
300    */
301   @java.lang.Override
getTitle()302   public java.lang.String getTitle() {
303     java.lang.Object ref = title_;
304     if (ref instanceof java.lang.String) {
305       return (java.lang.String) ref;
306     } else {
307       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
308       java.lang.String s = bs.toStringUtf8();
309       title_ = s;
310       return s;
311     }
312   }
313   /**
314    *
315    *
316    * <pre>
317    * Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
318    * </pre>
319    *
320    * <code>optional string title = 110371416;</code>
321    *
322    * @return The bytes for title.
323    */
324   @java.lang.Override
getTitleBytes()325   public com.google.protobuf.ByteString getTitleBytes() {
326     java.lang.Object ref = title_;
327     if (ref instanceof java.lang.String) {
328       com.google.protobuf.ByteString b =
329           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
330       title_ = b;
331       return b;
332     } else {
333       return (com.google.protobuf.ByteString) ref;
334     }
335   }
336 
337   private byte memoizedIsInitialized = -1;
338 
339   @java.lang.Override
isInitialized()340   public final boolean isInitialized() {
341     byte isInitialized = memoizedIsInitialized;
342     if (isInitialized == 1) return true;
343     if (isInitialized == 0) return false;
344 
345     memoizedIsInitialized = 1;
346     return true;
347   }
348 
349   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)350   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
351     if (((bitField0_ & 0x00000008) != 0)) {
352       com.google.protobuf.GeneratedMessageV3.writeString(output, 110371416, title_);
353     }
354     if (((bitField0_ & 0x00000004) != 0)) {
355       com.google.protobuf.GeneratedMessageV3.writeString(output, 290430901, location_);
356     }
357     if (((bitField0_ & 0x00000002) != 0)) {
358       com.google.protobuf.GeneratedMessageV3.writeString(output, 352031384, expression_);
359     }
360     if (((bitField0_ & 0x00000001) != 0)) {
361       com.google.protobuf.GeneratedMessageV3.writeString(output, 422937596, description_);
362     }
363     getUnknownFields().writeTo(output);
364   }
365 
366   @java.lang.Override
getSerializedSize()367   public int getSerializedSize() {
368     int size = memoizedSize;
369     if (size != -1) return size;
370 
371     size = 0;
372     if (((bitField0_ & 0x00000008) != 0)) {
373       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(110371416, title_);
374     }
375     if (((bitField0_ & 0x00000004) != 0)) {
376       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(290430901, location_);
377     }
378     if (((bitField0_ & 0x00000002) != 0)) {
379       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(352031384, expression_);
380     }
381     if (((bitField0_ & 0x00000001) != 0)) {
382       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(422937596, description_);
383     }
384     size += getUnknownFields().getSerializedSize();
385     memoizedSize = size;
386     return size;
387   }
388 
389   @java.lang.Override
equals(final java.lang.Object obj)390   public boolean equals(final java.lang.Object obj) {
391     if (obj == this) {
392       return true;
393     }
394     if (!(obj instanceof com.google.cloud.compute.v1.Expr)) {
395       return super.equals(obj);
396     }
397     com.google.cloud.compute.v1.Expr other = (com.google.cloud.compute.v1.Expr) obj;
398 
399     if (hasDescription() != other.hasDescription()) return false;
400     if (hasDescription()) {
401       if (!getDescription().equals(other.getDescription())) return false;
402     }
403     if (hasExpression() != other.hasExpression()) return false;
404     if (hasExpression()) {
405       if (!getExpression().equals(other.getExpression())) return false;
406     }
407     if (hasLocation() != other.hasLocation()) return false;
408     if (hasLocation()) {
409       if (!getLocation().equals(other.getLocation())) return false;
410     }
411     if (hasTitle() != other.hasTitle()) return false;
412     if (hasTitle()) {
413       if (!getTitle().equals(other.getTitle())) return false;
414     }
415     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
416     return true;
417   }
418 
419   @java.lang.Override
hashCode()420   public int hashCode() {
421     if (memoizedHashCode != 0) {
422       return memoizedHashCode;
423     }
424     int hash = 41;
425     hash = (19 * hash) + getDescriptor().hashCode();
426     if (hasDescription()) {
427       hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
428       hash = (53 * hash) + getDescription().hashCode();
429     }
430     if (hasExpression()) {
431       hash = (37 * hash) + EXPRESSION_FIELD_NUMBER;
432       hash = (53 * hash) + getExpression().hashCode();
433     }
434     if (hasLocation()) {
435       hash = (37 * hash) + LOCATION_FIELD_NUMBER;
436       hash = (53 * hash) + getLocation().hashCode();
437     }
438     if (hasTitle()) {
439       hash = (37 * hash) + TITLE_FIELD_NUMBER;
440       hash = (53 * hash) + getTitle().hashCode();
441     }
442     hash = (29 * hash) + getUnknownFields().hashCode();
443     memoizedHashCode = hash;
444     return hash;
445   }
446 
parseFrom(java.nio.ByteBuffer data)447   public static com.google.cloud.compute.v1.Expr parseFrom(java.nio.ByteBuffer data)
448       throws com.google.protobuf.InvalidProtocolBufferException {
449     return PARSER.parseFrom(data);
450   }
451 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)452   public static com.google.cloud.compute.v1.Expr parseFrom(
453       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
454       throws com.google.protobuf.InvalidProtocolBufferException {
455     return PARSER.parseFrom(data, extensionRegistry);
456   }
457 
parseFrom(com.google.protobuf.ByteString data)458   public static com.google.cloud.compute.v1.Expr parseFrom(com.google.protobuf.ByteString data)
459       throws com.google.protobuf.InvalidProtocolBufferException {
460     return PARSER.parseFrom(data);
461   }
462 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)463   public static com.google.cloud.compute.v1.Expr parseFrom(
464       com.google.protobuf.ByteString data,
465       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
466       throws com.google.protobuf.InvalidProtocolBufferException {
467     return PARSER.parseFrom(data, extensionRegistry);
468   }
469 
parseFrom(byte[] data)470   public static com.google.cloud.compute.v1.Expr parseFrom(byte[] data)
471       throws com.google.protobuf.InvalidProtocolBufferException {
472     return PARSER.parseFrom(data);
473   }
474 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)475   public static com.google.cloud.compute.v1.Expr parseFrom(
476       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
477       throws com.google.protobuf.InvalidProtocolBufferException {
478     return PARSER.parseFrom(data, extensionRegistry);
479   }
480 
parseFrom(java.io.InputStream input)481   public static com.google.cloud.compute.v1.Expr parseFrom(java.io.InputStream input)
482       throws java.io.IOException {
483     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
484   }
485 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)486   public static com.google.cloud.compute.v1.Expr parseFrom(
487       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
488       throws java.io.IOException {
489     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
490         PARSER, input, extensionRegistry);
491   }
492 
parseDelimitedFrom(java.io.InputStream input)493   public static com.google.cloud.compute.v1.Expr parseDelimitedFrom(java.io.InputStream input)
494       throws java.io.IOException {
495     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
496   }
497 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)498   public static com.google.cloud.compute.v1.Expr parseDelimitedFrom(
499       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
500       throws java.io.IOException {
501     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
502         PARSER, input, extensionRegistry);
503   }
504 
parseFrom( com.google.protobuf.CodedInputStream input)505   public static com.google.cloud.compute.v1.Expr parseFrom(
506       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
507     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
508   }
509 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)510   public static com.google.cloud.compute.v1.Expr parseFrom(
511       com.google.protobuf.CodedInputStream input,
512       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
513       throws java.io.IOException {
514     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
515         PARSER, input, extensionRegistry);
516   }
517 
518   @java.lang.Override
newBuilderForType()519   public Builder newBuilderForType() {
520     return newBuilder();
521   }
522 
newBuilder()523   public static Builder newBuilder() {
524     return DEFAULT_INSTANCE.toBuilder();
525   }
526 
newBuilder(com.google.cloud.compute.v1.Expr prototype)527   public static Builder newBuilder(com.google.cloud.compute.v1.Expr prototype) {
528     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
529   }
530 
531   @java.lang.Override
toBuilder()532   public Builder toBuilder() {
533     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
534   }
535 
536   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)537   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
538     Builder builder = new Builder(parent);
539     return builder;
540   }
541   /**
542    *
543    *
544    * <pre>
545    * Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() &lt; 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' &amp;&amp; document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.
546    * </pre>
547    *
548    * Protobuf type {@code google.cloud.compute.v1.Expr}
549    */
550   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
551       implements
552       // @@protoc_insertion_point(builder_implements:google.cloud.compute.v1.Expr)
553       com.google.cloud.compute.v1.ExprOrBuilder {
getDescriptor()554     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
555       return com.google.cloud.compute.v1.Compute
556           .internal_static_google_cloud_compute_v1_Expr_descriptor;
557     }
558 
559     @java.lang.Override
560     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()561         internalGetFieldAccessorTable() {
562       return com.google.cloud.compute.v1.Compute
563           .internal_static_google_cloud_compute_v1_Expr_fieldAccessorTable
564           .ensureFieldAccessorsInitialized(
565               com.google.cloud.compute.v1.Expr.class,
566               com.google.cloud.compute.v1.Expr.Builder.class);
567     }
568 
569     // Construct using com.google.cloud.compute.v1.Expr.newBuilder()
Builder()570     private Builder() {}
571 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)572     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
573       super(parent);
574     }
575 
576     @java.lang.Override
clear()577     public Builder clear() {
578       super.clear();
579       bitField0_ = 0;
580       description_ = "";
581       expression_ = "";
582       location_ = "";
583       title_ = "";
584       return this;
585     }
586 
587     @java.lang.Override
getDescriptorForType()588     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
589       return com.google.cloud.compute.v1.Compute
590           .internal_static_google_cloud_compute_v1_Expr_descriptor;
591     }
592 
593     @java.lang.Override
getDefaultInstanceForType()594     public com.google.cloud.compute.v1.Expr getDefaultInstanceForType() {
595       return com.google.cloud.compute.v1.Expr.getDefaultInstance();
596     }
597 
598     @java.lang.Override
build()599     public com.google.cloud.compute.v1.Expr build() {
600       com.google.cloud.compute.v1.Expr result = buildPartial();
601       if (!result.isInitialized()) {
602         throw newUninitializedMessageException(result);
603       }
604       return result;
605     }
606 
607     @java.lang.Override
buildPartial()608     public com.google.cloud.compute.v1.Expr buildPartial() {
609       com.google.cloud.compute.v1.Expr result = new com.google.cloud.compute.v1.Expr(this);
610       if (bitField0_ != 0) {
611         buildPartial0(result);
612       }
613       onBuilt();
614       return result;
615     }
616 
buildPartial0(com.google.cloud.compute.v1.Expr result)617     private void buildPartial0(com.google.cloud.compute.v1.Expr result) {
618       int from_bitField0_ = bitField0_;
619       int to_bitField0_ = 0;
620       if (((from_bitField0_ & 0x00000001) != 0)) {
621         result.description_ = description_;
622         to_bitField0_ |= 0x00000001;
623       }
624       if (((from_bitField0_ & 0x00000002) != 0)) {
625         result.expression_ = expression_;
626         to_bitField0_ |= 0x00000002;
627       }
628       if (((from_bitField0_ & 0x00000004) != 0)) {
629         result.location_ = location_;
630         to_bitField0_ |= 0x00000004;
631       }
632       if (((from_bitField0_ & 0x00000008) != 0)) {
633         result.title_ = title_;
634         to_bitField0_ |= 0x00000008;
635       }
636       result.bitField0_ |= to_bitField0_;
637     }
638 
639     @java.lang.Override
clone()640     public Builder clone() {
641       return super.clone();
642     }
643 
644     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)645     public Builder setField(
646         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
647       return super.setField(field, value);
648     }
649 
650     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)651     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
652       return super.clearField(field);
653     }
654 
655     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)656     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
657       return super.clearOneof(oneof);
658     }
659 
660     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)661     public Builder setRepeatedField(
662         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
663       return super.setRepeatedField(field, index, value);
664     }
665 
666     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)667     public Builder addRepeatedField(
668         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
669       return super.addRepeatedField(field, value);
670     }
671 
672     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)673     public Builder mergeFrom(com.google.protobuf.Message other) {
674       if (other instanceof com.google.cloud.compute.v1.Expr) {
675         return mergeFrom((com.google.cloud.compute.v1.Expr) other);
676       } else {
677         super.mergeFrom(other);
678         return this;
679       }
680     }
681 
mergeFrom(com.google.cloud.compute.v1.Expr other)682     public Builder mergeFrom(com.google.cloud.compute.v1.Expr other) {
683       if (other == com.google.cloud.compute.v1.Expr.getDefaultInstance()) return this;
684       if (other.hasDescription()) {
685         description_ = other.description_;
686         bitField0_ |= 0x00000001;
687         onChanged();
688       }
689       if (other.hasExpression()) {
690         expression_ = other.expression_;
691         bitField0_ |= 0x00000002;
692         onChanged();
693       }
694       if (other.hasLocation()) {
695         location_ = other.location_;
696         bitField0_ |= 0x00000004;
697         onChanged();
698       }
699       if (other.hasTitle()) {
700         title_ = other.title_;
701         bitField0_ |= 0x00000008;
702         onChanged();
703       }
704       this.mergeUnknownFields(other.getUnknownFields());
705       onChanged();
706       return this;
707     }
708 
709     @java.lang.Override
isInitialized()710     public final boolean isInitialized() {
711       return true;
712     }
713 
714     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)715     public Builder mergeFrom(
716         com.google.protobuf.CodedInputStream input,
717         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
718         throws java.io.IOException {
719       if (extensionRegistry == null) {
720         throw new java.lang.NullPointerException();
721       }
722       try {
723         boolean done = false;
724         while (!done) {
725           int tag = input.readTag();
726           switch (tag) {
727             case 0:
728               done = true;
729               break;
730             case 882971330:
731               {
732                 title_ = input.readStringRequireUtf8();
733                 bitField0_ |= 0x00000008;
734                 break;
735               } // case 882971330
736             case -1971520086:
737               {
738                 location_ = input.readStringRequireUtf8();
739                 bitField0_ |= 0x00000004;
740                 break;
741               } // case -1971520086
742             case -1478716222:
743               {
744                 expression_ = input.readStringRequireUtf8();
745                 bitField0_ |= 0x00000002;
746                 break;
747               } // case -1478716222
748             case -911466526:
749               {
750                 description_ = input.readStringRequireUtf8();
751                 bitField0_ |= 0x00000001;
752                 break;
753               } // case -911466526
754             default:
755               {
756                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
757                   done = true; // was an endgroup tag
758                 }
759                 break;
760               } // default:
761           } // switch (tag)
762         } // while (!done)
763       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
764         throw e.unwrapIOException();
765       } finally {
766         onChanged();
767       } // finally
768       return this;
769     }
770 
771     private int bitField0_;
772 
773     private java.lang.Object description_ = "";
774     /**
775      *
776      *
777      * <pre>
778      * Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
779      * </pre>
780      *
781      * <code>optional string description = 422937596;</code>
782      *
783      * @return Whether the description field is set.
784      */
hasDescription()785     public boolean hasDescription() {
786       return ((bitField0_ & 0x00000001) != 0);
787     }
788     /**
789      *
790      *
791      * <pre>
792      * Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
793      * </pre>
794      *
795      * <code>optional string description = 422937596;</code>
796      *
797      * @return The description.
798      */
getDescription()799     public java.lang.String getDescription() {
800       java.lang.Object ref = description_;
801       if (!(ref instanceof java.lang.String)) {
802         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
803         java.lang.String s = bs.toStringUtf8();
804         description_ = s;
805         return s;
806       } else {
807         return (java.lang.String) ref;
808       }
809     }
810     /**
811      *
812      *
813      * <pre>
814      * Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
815      * </pre>
816      *
817      * <code>optional string description = 422937596;</code>
818      *
819      * @return The bytes for description.
820      */
getDescriptionBytes()821     public com.google.protobuf.ByteString getDescriptionBytes() {
822       java.lang.Object ref = description_;
823       if (ref instanceof String) {
824         com.google.protobuf.ByteString b =
825             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
826         description_ = b;
827         return b;
828       } else {
829         return (com.google.protobuf.ByteString) ref;
830       }
831     }
832     /**
833      *
834      *
835      * <pre>
836      * Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
837      * </pre>
838      *
839      * <code>optional string description = 422937596;</code>
840      *
841      * @param value The description to set.
842      * @return This builder for chaining.
843      */
setDescription(java.lang.String value)844     public Builder setDescription(java.lang.String value) {
845       if (value == null) {
846         throw new NullPointerException();
847       }
848       description_ = value;
849       bitField0_ |= 0x00000001;
850       onChanged();
851       return this;
852     }
853     /**
854      *
855      *
856      * <pre>
857      * Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
858      * </pre>
859      *
860      * <code>optional string description = 422937596;</code>
861      *
862      * @return This builder for chaining.
863      */
clearDescription()864     public Builder clearDescription() {
865       description_ = getDefaultInstance().getDescription();
866       bitField0_ = (bitField0_ & ~0x00000001);
867       onChanged();
868       return this;
869     }
870     /**
871      *
872      *
873      * <pre>
874      * Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
875      * </pre>
876      *
877      * <code>optional string description = 422937596;</code>
878      *
879      * @param value The bytes for description to set.
880      * @return This builder for chaining.
881      */
setDescriptionBytes(com.google.protobuf.ByteString value)882     public Builder setDescriptionBytes(com.google.protobuf.ByteString value) {
883       if (value == null) {
884         throw new NullPointerException();
885       }
886       checkByteStringIsUtf8(value);
887       description_ = value;
888       bitField0_ |= 0x00000001;
889       onChanged();
890       return this;
891     }
892 
893     private java.lang.Object expression_ = "";
894     /**
895      *
896      *
897      * <pre>
898      * Textual representation of an expression in Common Expression Language syntax.
899      * </pre>
900      *
901      * <code>optional string expression = 352031384;</code>
902      *
903      * @return Whether the expression field is set.
904      */
hasExpression()905     public boolean hasExpression() {
906       return ((bitField0_ & 0x00000002) != 0);
907     }
908     /**
909      *
910      *
911      * <pre>
912      * Textual representation of an expression in Common Expression Language syntax.
913      * </pre>
914      *
915      * <code>optional string expression = 352031384;</code>
916      *
917      * @return The expression.
918      */
getExpression()919     public java.lang.String getExpression() {
920       java.lang.Object ref = expression_;
921       if (!(ref instanceof java.lang.String)) {
922         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
923         java.lang.String s = bs.toStringUtf8();
924         expression_ = s;
925         return s;
926       } else {
927         return (java.lang.String) ref;
928       }
929     }
930     /**
931      *
932      *
933      * <pre>
934      * Textual representation of an expression in Common Expression Language syntax.
935      * </pre>
936      *
937      * <code>optional string expression = 352031384;</code>
938      *
939      * @return The bytes for expression.
940      */
getExpressionBytes()941     public com.google.protobuf.ByteString getExpressionBytes() {
942       java.lang.Object ref = expression_;
943       if (ref instanceof String) {
944         com.google.protobuf.ByteString b =
945             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
946         expression_ = b;
947         return b;
948       } else {
949         return (com.google.protobuf.ByteString) ref;
950       }
951     }
952     /**
953      *
954      *
955      * <pre>
956      * Textual representation of an expression in Common Expression Language syntax.
957      * </pre>
958      *
959      * <code>optional string expression = 352031384;</code>
960      *
961      * @param value The expression to set.
962      * @return This builder for chaining.
963      */
setExpression(java.lang.String value)964     public Builder setExpression(java.lang.String value) {
965       if (value == null) {
966         throw new NullPointerException();
967       }
968       expression_ = value;
969       bitField0_ |= 0x00000002;
970       onChanged();
971       return this;
972     }
973     /**
974      *
975      *
976      * <pre>
977      * Textual representation of an expression in Common Expression Language syntax.
978      * </pre>
979      *
980      * <code>optional string expression = 352031384;</code>
981      *
982      * @return This builder for chaining.
983      */
clearExpression()984     public Builder clearExpression() {
985       expression_ = getDefaultInstance().getExpression();
986       bitField0_ = (bitField0_ & ~0x00000002);
987       onChanged();
988       return this;
989     }
990     /**
991      *
992      *
993      * <pre>
994      * Textual representation of an expression in Common Expression Language syntax.
995      * </pre>
996      *
997      * <code>optional string expression = 352031384;</code>
998      *
999      * @param value The bytes for expression to set.
1000      * @return This builder for chaining.
1001      */
setExpressionBytes(com.google.protobuf.ByteString value)1002     public Builder setExpressionBytes(com.google.protobuf.ByteString value) {
1003       if (value == null) {
1004         throw new NullPointerException();
1005       }
1006       checkByteStringIsUtf8(value);
1007       expression_ = value;
1008       bitField0_ |= 0x00000002;
1009       onChanged();
1010       return this;
1011     }
1012 
1013     private java.lang.Object location_ = "";
1014     /**
1015      *
1016      *
1017      * <pre>
1018      * Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
1019      * </pre>
1020      *
1021      * <code>optional string location = 290430901;</code>
1022      *
1023      * @return Whether the location field is set.
1024      */
hasLocation()1025     public boolean hasLocation() {
1026       return ((bitField0_ & 0x00000004) != 0);
1027     }
1028     /**
1029      *
1030      *
1031      * <pre>
1032      * Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
1033      * </pre>
1034      *
1035      * <code>optional string location = 290430901;</code>
1036      *
1037      * @return The location.
1038      */
getLocation()1039     public java.lang.String getLocation() {
1040       java.lang.Object ref = location_;
1041       if (!(ref instanceof java.lang.String)) {
1042         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1043         java.lang.String s = bs.toStringUtf8();
1044         location_ = s;
1045         return s;
1046       } else {
1047         return (java.lang.String) ref;
1048       }
1049     }
1050     /**
1051      *
1052      *
1053      * <pre>
1054      * Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
1055      * </pre>
1056      *
1057      * <code>optional string location = 290430901;</code>
1058      *
1059      * @return The bytes for location.
1060      */
getLocationBytes()1061     public com.google.protobuf.ByteString getLocationBytes() {
1062       java.lang.Object ref = location_;
1063       if (ref instanceof String) {
1064         com.google.protobuf.ByteString b =
1065             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1066         location_ = b;
1067         return b;
1068       } else {
1069         return (com.google.protobuf.ByteString) ref;
1070       }
1071     }
1072     /**
1073      *
1074      *
1075      * <pre>
1076      * Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
1077      * </pre>
1078      *
1079      * <code>optional string location = 290430901;</code>
1080      *
1081      * @param value The location to set.
1082      * @return This builder for chaining.
1083      */
setLocation(java.lang.String value)1084     public Builder setLocation(java.lang.String value) {
1085       if (value == null) {
1086         throw new NullPointerException();
1087       }
1088       location_ = value;
1089       bitField0_ |= 0x00000004;
1090       onChanged();
1091       return this;
1092     }
1093     /**
1094      *
1095      *
1096      * <pre>
1097      * Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
1098      * </pre>
1099      *
1100      * <code>optional string location = 290430901;</code>
1101      *
1102      * @return This builder for chaining.
1103      */
clearLocation()1104     public Builder clearLocation() {
1105       location_ = getDefaultInstance().getLocation();
1106       bitField0_ = (bitField0_ & ~0x00000004);
1107       onChanged();
1108       return this;
1109     }
1110     /**
1111      *
1112      *
1113      * <pre>
1114      * Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
1115      * </pre>
1116      *
1117      * <code>optional string location = 290430901;</code>
1118      *
1119      * @param value The bytes for location to set.
1120      * @return This builder for chaining.
1121      */
setLocationBytes(com.google.protobuf.ByteString value)1122     public Builder setLocationBytes(com.google.protobuf.ByteString value) {
1123       if (value == null) {
1124         throw new NullPointerException();
1125       }
1126       checkByteStringIsUtf8(value);
1127       location_ = value;
1128       bitField0_ |= 0x00000004;
1129       onChanged();
1130       return this;
1131     }
1132 
1133     private java.lang.Object title_ = "";
1134     /**
1135      *
1136      *
1137      * <pre>
1138      * Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
1139      * </pre>
1140      *
1141      * <code>optional string title = 110371416;</code>
1142      *
1143      * @return Whether the title field is set.
1144      */
hasTitle()1145     public boolean hasTitle() {
1146       return ((bitField0_ & 0x00000008) != 0);
1147     }
1148     /**
1149      *
1150      *
1151      * <pre>
1152      * Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
1153      * </pre>
1154      *
1155      * <code>optional string title = 110371416;</code>
1156      *
1157      * @return The title.
1158      */
getTitle()1159     public java.lang.String getTitle() {
1160       java.lang.Object ref = title_;
1161       if (!(ref instanceof java.lang.String)) {
1162         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1163         java.lang.String s = bs.toStringUtf8();
1164         title_ = s;
1165         return s;
1166       } else {
1167         return (java.lang.String) ref;
1168       }
1169     }
1170     /**
1171      *
1172      *
1173      * <pre>
1174      * Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
1175      * </pre>
1176      *
1177      * <code>optional string title = 110371416;</code>
1178      *
1179      * @return The bytes for title.
1180      */
getTitleBytes()1181     public com.google.protobuf.ByteString getTitleBytes() {
1182       java.lang.Object ref = title_;
1183       if (ref instanceof String) {
1184         com.google.protobuf.ByteString b =
1185             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1186         title_ = b;
1187         return b;
1188       } else {
1189         return (com.google.protobuf.ByteString) ref;
1190       }
1191     }
1192     /**
1193      *
1194      *
1195      * <pre>
1196      * Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
1197      * </pre>
1198      *
1199      * <code>optional string title = 110371416;</code>
1200      *
1201      * @param value The title to set.
1202      * @return This builder for chaining.
1203      */
setTitle(java.lang.String value)1204     public Builder setTitle(java.lang.String value) {
1205       if (value == null) {
1206         throw new NullPointerException();
1207       }
1208       title_ = value;
1209       bitField0_ |= 0x00000008;
1210       onChanged();
1211       return this;
1212     }
1213     /**
1214      *
1215      *
1216      * <pre>
1217      * Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
1218      * </pre>
1219      *
1220      * <code>optional string title = 110371416;</code>
1221      *
1222      * @return This builder for chaining.
1223      */
clearTitle()1224     public Builder clearTitle() {
1225       title_ = getDefaultInstance().getTitle();
1226       bitField0_ = (bitField0_ & ~0x00000008);
1227       onChanged();
1228       return this;
1229     }
1230     /**
1231      *
1232      *
1233      * <pre>
1234      * Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
1235      * </pre>
1236      *
1237      * <code>optional string title = 110371416;</code>
1238      *
1239      * @param value The bytes for title to set.
1240      * @return This builder for chaining.
1241      */
setTitleBytes(com.google.protobuf.ByteString value)1242     public Builder setTitleBytes(com.google.protobuf.ByteString value) {
1243       if (value == null) {
1244         throw new NullPointerException();
1245       }
1246       checkByteStringIsUtf8(value);
1247       title_ = value;
1248       bitField0_ |= 0x00000008;
1249       onChanged();
1250       return this;
1251     }
1252 
1253     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1254     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
1255       return super.setUnknownFields(unknownFields);
1256     }
1257 
1258     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1259     public final Builder mergeUnknownFields(
1260         final com.google.protobuf.UnknownFieldSet unknownFields) {
1261       return super.mergeUnknownFields(unknownFields);
1262     }
1263 
1264     // @@protoc_insertion_point(builder_scope:google.cloud.compute.v1.Expr)
1265   }
1266 
1267   // @@protoc_insertion_point(class_scope:google.cloud.compute.v1.Expr)
1268   private static final com.google.cloud.compute.v1.Expr DEFAULT_INSTANCE;
1269 
1270   static {
1271     DEFAULT_INSTANCE = new com.google.cloud.compute.v1.Expr();
1272   }
1273 
getDefaultInstance()1274   public static com.google.cloud.compute.v1.Expr getDefaultInstance() {
1275     return DEFAULT_INSTANCE;
1276   }
1277 
1278   private static final com.google.protobuf.Parser<Expr> PARSER =
1279       new com.google.protobuf.AbstractParser<Expr>() {
1280         @java.lang.Override
1281         public Expr parsePartialFrom(
1282             com.google.protobuf.CodedInputStream input,
1283             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1284             throws com.google.protobuf.InvalidProtocolBufferException {
1285           Builder builder = newBuilder();
1286           try {
1287             builder.mergeFrom(input, extensionRegistry);
1288           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1289             throw e.setUnfinishedMessage(builder.buildPartial());
1290           } catch (com.google.protobuf.UninitializedMessageException e) {
1291             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
1292           } catch (java.io.IOException e) {
1293             throw new com.google.protobuf.InvalidProtocolBufferException(e)
1294                 .setUnfinishedMessage(builder.buildPartial());
1295           }
1296           return builder.buildPartial();
1297         }
1298       };
1299 
parser()1300   public static com.google.protobuf.Parser<Expr> parser() {
1301     return PARSER;
1302   }
1303 
1304   @java.lang.Override
getParserForType()1305   public com.google.protobuf.Parser<Expr> getParserForType() {
1306     return PARSER;
1307   }
1308 
1309   @java.lang.Override
getDefaultInstanceForType()1310   public com.google.cloud.compute.v1.Expr getDefaultInstanceForType() {
1311     return DEFAULT_INSTANCE;
1312   }
1313 }
1314