• 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/run/v2/k8s.min.proto
18 
19 package com.google.cloud.run.v2;
20 
21 /**
22  *
23  *
24  * <pre>
25  * Represents a set of Cloud SQL instances. Each one will be available under
26  * /cloudsql/[instance]. Visit
27  * https://cloud.google.com/sql/docs/mysql/connect-run for more information on
28  * how to connect Cloud SQL and Cloud Run.
29  * </pre>
30  *
31  * Protobuf type {@code google.cloud.run.v2.CloudSqlInstance}
32  */
33 public final class CloudSqlInstance extends com.google.protobuf.GeneratedMessageV3
34     implements
35     // @@protoc_insertion_point(message_implements:google.cloud.run.v2.CloudSqlInstance)
36     CloudSqlInstanceOrBuilder {
37   private static final long serialVersionUID = 0L;
38   // Use CloudSqlInstance.newBuilder() to construct.
CloudSqlInstance(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)39   private CloudSqlInstance(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
40     super(builder);
41   }
42 
CloudSqlInstance()43   private CloudSqlInstance() {
44     instances_ = com.google.protobuf.LazyStringArrayList.EMPTY;
45   }
46 
47   @java.lang.Override
48   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)49   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
50     return new CloudSqlInstance();
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.run.v2.K8sMinProto
60         .internal_static_google_cloud_run_v2_CloudSqlInstance_descriptor;
61   }
62 
63   @java.lang.Override
64   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()65       internalGetFieldAccessorTable() {
66     return com.google.cloud.run.v2.K8sMinProto
67         .internal_static_google_cloud_run_v2_CloudSqlInstance_fieldAccessorTable
68         .ensureFieldAccessorsInitialized(
69             com.google.cloud.run.v2.CloudSqlInstance.class,
70             com.google.cloud.run.v2.CloudSqlInstance.Builder.class);
71   }
72 
73   public static final int INSTANCES_FIELD_NUMBER = 1;
74 
75   @SuppressWarnings("serial")
76   private com.google.protobuf.LazyStringList instances_;
77   /**
78    *
79    *
80    * <pre>
81    * The Cloud SQL instance connection names, as can be found in
82    * https://console.cloud.google.com/sql/instances. Visit
83    * https://cloud.google.com/sql/docs/mysql/connect-run for more information on
84    * how to connect Cloud SQL and Cloud Run. Format:
85    * {project}:{location}:{instance}
86    * </pre>
87    *
88    * <code>repeated string instances = 1;</code>
89    *
90    * @return A list containing the instances.
91    */
getInstancesList()92   public com.google.protobuf.ProtocolStringList getInstancesList() {
93     return instances_;
94   }
95   /**
96    *
97    *
98    * <pre>
99    * The Cloud SQL instance connection names, as can be found in
100    * https://console.cloud.google.com/sql/instances. Visit
101    * https://cloud.google.com/sql/docs/mysql/connect-run for more information on
102    * how to connect Cloud SQL and Cloud Run. Format:
103    * {project}:{location}:{instance}
104    * </pre>
105    *
106    * <code>repeated string instances = 1;</code>
107    *
108    * @return The count of instances.
109    */
getInstancesCount()110   public int getInstancesCount() {
111     return instances_.size();
112   }
113   /**
114    *
115    *
116    * <pre>
117    * The Cloud SQL instance connection names, as can be found in
118    * https://console.cloud.google.com/sql/instances. Visit
119    * https://cloud.google.com/sql/docs/mysql/connect-run for more information on
120    * how to connect Cloud SQL and Cloud Run. Format:
121    * {project}:{location}:{instance}
122    * </pre>
123    *
124    * <code>repeated string instances = 1;</code>
125    *
126    * @param index The index of the element to return.
127    * @return The instances at the given index.
128    */
getInstances(int index)129   public java.lang.String getInstances(int index) {
130     return instances_.get(index);
131   }
132   /**
133    *
134    *
135    * <pre>
136    * The Cloud SQL instance connection names, as can be found in
137    * https://console.cloud.google.com/sql/instances. Visit
138    * https://cloud.google.com/sql/docs/mysql/connect-run for more information on
139    * how to connect Cloud SQL and Cloud Run. Format:
140    * {project}:{location}:{instance}
141    * </pre>
142    *
143    * <code>repeated string instances = 1;</code>
144    *
145    * @param index The index of the value to return.
146    * @return The bytes of the instances at the given index.
147    */
getInstancesBytes(int index)148   public com.google.protobuf.ByteString getInstancesBytes(int index) {
149     return instances_.getByteString(index);
150   }
151 
152   private byte memoizedIsInitialized = -1;
153 
154   @java.lang.Override
isInitialized()155   public final boolean isInitialized() {
156     byte isInitialized = memoizedIsInitialized;
157     if (isInitialized == 1) return true;
158     if (isInitialized == 0) return false;
159 
160     memoizedIsInitialized = 1;
161     return true;
162   }
163 
164   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)165   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
166     for (int i = 0; i < instances_.size(); i++) {
167       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, instances_.getRaw(i));
168     }
169     getUnknownFields().writeTo(output);
170   }
171 
172   @java.lang.Override
getSerializedSize()173   public int getSerializedSize() {
174     int size = memoizedSize;
175     if (size != -1) return size;
176 
177     size = 0;
178     {
179       int dataSize = 0;
180       for (int i = 0; i < instances_.size(); i++) {
181         dataSize += computeStringSizeNoTag(instances_.getRaw(i));
182       }
183       size += dataSize;
184       size += 1 * getInstancesList().size();
185     }
186     size += getUnknownFields().getSerializedSize();
187     memoizedSize = size;
188     return size;
189   }
190 
191   @java.lang.Override
equals(final java.lang.Object obj)192   public boolean equals(final java.lang.Object obj) {
193     if (obj == this) {
194       return true;
195     }
196     if (!(obj instanceof com.google.cloud.run.v2.CloudSqlInstance)) {
197       return super.equals(obj);
198     }
199     com.google.cloud.run.v2.CloudSqlInstance other = (com.google.cloud.run.v2.CloudSqlInstance) obj;
200 
201     if (!getInstancesList().equals(other.getInstancesList())) return false;
202     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
203     return true;
204   }
205 
206   @java.lang.Override
hashCode()207   public int hashCode() {
208     if (memoizedHashCode != 0) {
209       return memoizedHashCode;
210     }
211     int hash = 41;
212     hash = (19 * hash) + getDescriptor().hashCode();
213     if (getInstancesCount() > 0) {
214       hash = (37 * hash) + INSTANCES_FIELD_NUMBER;
215       hash = (53 * hash) + getInstancesList().hashCode();
216     }
217     hash = (29 * hash) + getUnknownFields().hashCode();
218     memoizedHashCode = hash;
219     return hash;
220   }
221 
parseFrom(java.nio.ByteBuffer data)222   public static com.google.cloud.run.v2.CloudSqlInstance parseFrom(java.nio.ByteBuffer data)
223       throws com.google.protobuf.InvalidProtocolBufferException {
224     return PARSER.parseFrom(data);
225   }
226 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)227   public static com.google.cloud.run.v2.CloudSqlInstance parseFrom(
228       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
229       throws com.google.protobuf.InvalidProtocolBufferException {
230     return PARSER.parseFrom(data, extensionRegistry);
231   }
232 
parseFrom( com.google.protobuf.ByteString data)233   public static com.google.cloud.run.v2.CloudSqlInstance parseFrom(
234       com.google.protobuf.ByteString data)
235       throws com.google.protobuf.InvalidProtocolBufferException {
236     return PARSER.parseFrom(data);
237   }
238 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)239   public static com.google.cloud.run.v2.CloudSqlInstance parseFrom(
240       com.google.protobuf.ByteString data,
241       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
242       throws com.google.protobuf.InvalidProtocolBufferException {
243     return PARSER.parseFrom(data, extensionRegistry);
244   }
245 
parseFrom(byte[] data)246   public static com.google.cloud.run.v2.CloudSqlInstance parseFrom(byte[] data)
247       throws com.google.protobuf.InvalidProtocolBufferException {
248     return PARSER.parseFrom(data);
249   }
250 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)251   public static com.google.cloud.run.v2.CloudSqlInstance parseFrom(
252       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
253       throws com.google.protobuf.InvalidProtocolBufferException {
254     return PARSER.parseFrom(data, extensionRegistry);
255   }
256 
parseFrom(java.io.InputStream input)257   public static com.google.cloud.run.v2.CloudSqlInstance parseFrom(java.io.InputStream input)
258       throws java.io.IOException {
259     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
260   }
261 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)262   public static com.google.cloud.run.v2.CloudSqlInstance parseFrom(
263       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
264       throws java.io.IOException {
265     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
266         PARSER, input, extensionRegistry);
267   }
268 
parseDelimitedFrom( java.io.InputStream input)269   public static com.google.cloud.run.v2.CloudSqlInstance parseDelimitedFrom(
270       java.io.InputStream input) throws java.io.IOException {
271     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
272   }
273 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)274   public static com.google.cloud.run.v2.CloudSqlInstance parseDelimitedFrom(
275       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
276       throws java.io.IOException {
277     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
278         PARSER, input, extensionRegistry);
279   }
280 
parseFrom( com.google.protobuf.CodedInputStream input)281   public static com.google.cloud.run.v2.CloudSqlInstance parseFrom(
282       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
283     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
284   }
285 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)286   public static com.google.cloud.run.v2.CloudSqlInstance parseFrom(
287       com.google.protobuf.CodedInputStream input,
288       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
289       throws java.io.IOException {
290     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
291         PARSER, input, extensionRegistry);
292   }
293 
294   @java.lang.Override
newBuilderForType()295   public Builder newBuilderForType() {
296     return newBuilder();
297   }
298 
newBuilder()299   public static Builder newBuilder() {
300     return DEFAULT_INSTANCE.toBuilder();
301   }
302 
newBuilder(com.google.cloud.run.v2.CloudSqlInstance prototype)303   public static Builder newBuilder(com.google.cloud.run.v2.CloudSqlInstance prototype) {
304     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
305   }
306 
307   @java.lang.Override
toBuilder()308   public Builder toBuilder() {
309     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
310   }
311 
312   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)313   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
314     Builder builder = new Builder(parent);
315     return builder;
316   }
317   /**
318    *
319    *
320    * <pre>
321    * Represents a set of Cloud SQL instances. Each one will be available under
322    * /cloudsql/[instance]. Visit
323    * https://cloud.google.com/sql/docs/mysql/connect-run for more information on
324    * how to connect Cloud SQL and Cloud Run.
325    * </pre>
326    *
327    * Protobuf type {@code google.cloud.run.v2.CloudSqlInstance}
328    */
329   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
330       implements
331       // @@protoc_insertion_point(builder_implements:google.cloud.run.v2.CloudSqlInstance)
332       com.google.cloud.run.v2.CloudSqlInstanceOrBuilder {
getDescriptor()333     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
334       return com.google.cloud.run.v2.K8sMinProto
335           .internal_static_google_cloud_run_v2_CloudSqlInstance_descriptor;
336     }
337 
338     @java.lang.Override
339     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()340         internalGetFieldAccessorTable() {
341       return com.google.cloud.run.v2.K8sMinProto
342           .internal_static_google_cloud_run_v2_CloudSqlInstance_fieldAccessorTable
343           .ensureFieldAccessorsInitialized(
344               com.google.cloud.run.v2.CloudSqlInstance.class,
345               com.google.cloud.run.v2.CloudSqlInstance.Builder.class);
346     }
347 
348     // Construct using com.google.cloud.run.v2.CloudSqlInstance.newBuilder()
Builder()349     private Builder() {}
350 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)351     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
352       super(parent);
353     }
354 
355     @java.lang.Override
clear()356     public Builder clear() {
357       super.clear();
358       bitField0_ = 0;
359       instances_ = com.google.protobuf.LazyStringArrayList.EMPTY;
360       bitField0_ = (bitField0_ & ~0x00000001);
361       return this;
362     }
363 
364     @java.lang.Override
getDescriptorForType()365     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
366       return com.google.cloud.run.v2.K8sMinProto
367           .internal_static_google_cloud_run_v2_CloudSqlInstance_descriptor;
368     }
369 
370     @java.lang.Override
getDefaultInstanceForType()371     public com.google.cloud.run.v2.CloudSqlInstance getDefaultInstanceForType() {
372       return com.google.cloud.run.v2.CloudSqlInstance.getDefaultInstance();
373     }
374 
375     @java.lang.Override
build()376     public com.google.cloud.run.v2.CloudSqlInstance build() {
377       com.google.cloud.run.v2.CloudSqlInstance result = buildPartial();
378       if (!result.isInitialized()) {
379         throw newUninitializedMessageException(result);
380       }
381       return result;
382     }
383 
384     @java.lang.Override
buildPartial()385     public com.google.cloud.run.v2.CloudSqlInstance buildPartial() {
386       com.google.cloud.run.v2.CloudSqlInstance result =
387           new com.google.cloud.run.v2.CloudSqlInstance(this);
388       buildPartialRepeatedFields(result);
389       if (bitField0_ != 0) {
390         buildPartial0(result);
391       }
392       onBuilt();
393       return result;
394     }
395 
buildPartialRepeatedFields(com.google.cloud.run.v2.CloudSqlInstance result)396     private void buildPartialRepeatedFields(com.google.cloud.run.v2.CloudSqlInstance result) {
397       if (((bitField0_ & 0x00000001) != 0)) {
398         instances_ = instances_.getUnmodifiableView();
399         bitField0_ = (bitField0_ & ~0x00000001);
400       }
401       result.instances_ = instances_;
402     }
403 
buildPartial0(com.google.cloud.run.v2.CloudSqlInstance result)404     private void buildPartial0(com.google.cloud.run.v2.CloudSqlInstance result) {
405       int from_bitField0_ = bitField0_;
406     }
407 
408     @java.lang.Override
clone()409     public Builder clone() {
410       return super.clone();
411     }
412 
413     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)414     public Builder setField(
415         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
416       return super.setField(field, value);
417     }
418 
419     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)420     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
421       return super.clearField(field);
422     }
423 
424     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)425     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
426       return super.clearOneof(oneof);
427     }
428 
429     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)430     public Builder setRepeatedField(
431         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
432       return super.setRepeatedField(field, index, value);
433     }
434 
435     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)436     public Builder addRepeatedField(
437         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
438       return super.addRepeatedField(field, value);
439     }
440 
441     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)442     public Builder mergeFrom(com.google.protobuf.Message other) {
443       if (other instanceof com.google.cloud.run.v2.CloudSqlInstance) {
444         return mergeFrom((com.google.cloud.run.v2.CloudSqlInstance) other);
445       } else {
446         super.mergeFrom(other);
447         return this;
448       }
449     }
450 
mergeFrom(com.google.cloud.run.v2.CloudSqlInstance other)451     public Builder mergeFrom(com.google.cloud.run.v2.CloudSqlInstance other) {
452       if (other == com.google.cloud.run.v2.CloudSqlInstance.getDefaultInstance()) return this;
453       if (!other.instances_.isEmpty()) {
454         if (instances_.isEmpty()) {
455           instances_ = other.instances_;
456           bitField0_ = (bitField0_ & ~0x00000001);
457         } else {
458           ensureInstancesIsMutable();
459           instances_.addAll(other.instances_);
460         }
461         onChanged();
462       }
463       this.mergeUnknownFields(other.getUnknownFields());
464       onChanged();
465       return this;
466     }
467 
468     @java.lang.Override
isInitialized()469     public final boolean isInitialized() {
470       return true;
471     }
472 
473     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)474     public Builder mergeFrom(
475         com.google.protobuf.CodedInputStream input,
476         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
477         throws java.io.IOException {
478       if (extensionRegistry == null) {
479         throw new java.lang.NullPointerException();
480       }
481       try {
482         boolean done = false;
483         while (!done) {
484           int tag = input.readTag();
485           switch (tag) {
486             case 0:
487               done = true;
488               break;
489             case 10:
490               {
491                 java.lang.String s = input.readStringRequireUtf8();
492                 ensureInstancesIsMutable();
493                 instances_.add(s);
494                 break;
495               } // case 10
496             default:
497               {
498                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
499                   done = true; // was an endgroup tag
500                 }
501                 break;
502               } // default:
503           } // switch (tag)
504         } // while (!done)
505       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
506         throw e.unwrapIOException();
507       } finally {
508         onChanged();
509       } // finally
510       return this;
511     }
512 
513     private int bitField0_;
514 
515     private com.google.protobuf.LazyStringList instances_ =
516         com.google.protobuf.LazyStringArrayList.EMPTY;
517 
ensureInstancesIsMutable()518     private void ensureInstancesIsMutable() {
519       if (!((bitField0_ & 0x00000001) != 0)) {
520         instances_ = new com.google.protobuf.LazyStringArrayList(instances_);
521         bitField0_ |= 0x00000001;
522       }
523     }
524     /**
525      *
526      *
527      * <pre>
528      * The Cloud SQL instance connection names, as can be found in
529      * https://console.cloud.google.com/sql/instances. Visit
530      * https://cloud.google.com/sql/docs/mysql/connect-run for more information on
531      * how to connect Cloud SQL and Cloud Run. Format:
532      * {project}:{location}:{instance}
533      * </pre>
534      *
535      * <code>repeated string instances = 1;</code>
536      *
537      * @return A list containing the instances.
538      */
getInstancesList()539     public com.google.protobuf.ProtocolStringList getInstancesList() {
540       return instances_.getUnmodifiableView();
541     }
542     /**
543      *
544      *
545      * <pre>
546      * The Cloud SQL instance connection names, as can be found in
547      * https://console.cloud.google.com/sql/instances. Visit
548      * https://cloud.google.com/sql/docs/mysql/connect-run for more information on
549      * how to connect Cloud SQL and Cloud Run. Format:
550      * {project}:{location}:{instance}
551      * </pre>
552      *
553      * <code>repeated string instances = 1;</code>
554      *
555      * @return The count of instances.
556      */
getInstancesCount()557     public int getInstancesCount() {
558       return instances_.size();
559     }
560     /**
561      *
562      *
563      * <pre>
564      * The Cloud SQL instance connection names, as can be found in
565      * https://console.cloud.google.com/sql/instances. Visit
566      * https://cloud.google.com/sql/docs/mysql/connect-run for more information on
567      * how to connect Cloud SQL and Cloud Run. Format:
568      * {project}:{location}:{instance}
569      * </pre>
570      *
571      * <code>repeated string instances = 1;</code>
572      *
573      * @param index The index of the element to return.
574      * @return The instances at the given index.
575      */
getInstances(int index)576     public java.lang.String getInstances(int index) {
577       return instances_.get(index);
578     }
579     /**
580      *
581      *
582      * <pre>
583      * The Cloud SQL instance connection names, as can be found in
584      * https://console.cloud.google.com/sql/instances. Visit
585      * https://cloud.google.com/sql/docs/mysql/connect-run for more information on
586      * how to connect Cloud SQL and Cloud Run. Format:
587      * {project}:{location}:{instance}
588      * </pre>
589      *
590      * <code>repeated string instances = 1;</code>
591      *
592      * @param index The index of the value to return.
593      * @return The bytes of the instances at the given index.
594      */
getInstancesBytes(int index)595     public com.google.protobuf.ByteString getInstancesBytes(int index) {
596       return instances_.getByteString(index);
597     }
598     /**
599      *
600      *
601      * <pre>
602      * The Cloud SQL instance connection names, as can be found in
603      * https://console.cloud.google.com/sql/instances. Visit
604      * https://cloud.google.com/sql/docs/mysql/connect-run for more information on
605      * how to connect Cloud SQL and Cloud Run. Format:
606      * {project}:{location}:{instance}
607      * </pre>
608      *
609      * <code>repeated string instances = 1;</code>
610      *
611      * @param index The index to set the value at.
612      * @param value The instances to set.
613      * @return This builder for chaining.
614      */
setInstances(int index, java.lang.String value)615     public Builder setInstances(int index, java.lang.String value) {
616       if (value == null) {
617         throw new NullPointerException();
618       }
619       ensureInstancesIsMutable();
620       instances_.set(index, value);
621       onChanged();
622       return this;
623     }
624     /**
625      *
626      *
627      * <pre>
628      * The Cloud SQL instance connection names, as can be found in
629      * https://console.cloud.google.com/sql/instances. Visit
630      * https://cloud.google.com/sql/docs/mysql/connect-run for more information on
631      * how to connect Cloud SQL and Cloud Run. Format:
632      * {project}:{location}:{instance}
633      * </pre>
634      *
635      * <code>repeated string instances = 1;</code>
636      *
637      * @param value The instances to add.
638      * @return This builder for chaining.
639      */
addInstances(java.lang.String value)640     public Builder addInstances(java.lang.String value) {
641       if (value == null) {
642         throw new NullPointerException();
643       }
644       ensureInstancesIsMutable();
645       instances_.add(value);
646       onChanged();
647       return this;
648     }
649     /**
650      *
651      *
652      * <pre>
653      * The Cloud SQL instance connection names, as can be found in
654      * https://console.cloud.google.com/sql/instances. Visit
655      * https://cloud.google.com/sql/docs/mysql/connect-run for more information on
656      * how to connect Cloud SQL and Cloud Run. Format:
657      * {project}:{location}:{instance}
658      * </pre>
659      *
660      * <code>repeated string instances = 1;</code>
661      *
662      * @param values The instances to add.
663      * @return This builder for chaining.
664      */
addAllInstances(java.lang.Iterable<java.lang.String> values)665     public Builder addAllInstances(java.lang.Iterable<java.lang.String> values) {
666       ensureInstancesIsMutable();
667       com.google.protobuf.AbstractMessageLite.Builder.addAll(values, instances_);
668       onChanged();
669       return this;
670     }
671     /**
672      *
673      *
674      * <pre>
675      * The Cloud SQL instance connection names, as can be found in
676      * https://console.cloud.google.com/sql/instances. Visit
677      * https://cloud.google.com/sql/docs/mysql/connect-run for more information on
678      * how to connect Cloud SQL and Cloud Run. Format:
679      * {project}:{location}:{instance}
680      * </pre>
681      *
682      * <code>repeated string instances = 1;</code>
683      *
684      * @return This builder for chaining.
685      */
clearInstances()686     public Builder clearInstances() {
687       instances_ = com.google.protobuf.LazyStringArrayList.EMPTY;
688       bitField0_ = (bitField0_ & ~0x00000001);
689       onChanged();
690       return this;
691     }
692     /**
693      *
694      *
695      * <pre>
696      * The Cloud SQL instance connection names, as can be found in
697      * https://console.cloud.google.com/sql/instances. Visit
698      * https://cloud.google.com/sql/docs/mysql/connect-run for more information on
699      * how to connect Cloud SQL and Cloud Run. Format:
700      * {project}:{location}:{instance}
701      * </pre>
702      *
703      * <code>repeated string instances = 1;</code>
704      *
705      * @param value The bytes of the instances to add.
706      * @return This builder for chaining.
707      */
addInstancesBytes(com.google.protobuf.ByteString value)708     public Builder addInstancesBytes(com.google.protobuf.ByteString value) {
709       if (value == null) {
710         throw new NullPointerException();
711       }
712       checkByteStringIsUtf8(value);
713       ensureInstancesIsMutable();
714       instances_.add(value);
715       onChanged();
716       return this;
717     }
718 
719     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)720     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
721       return super.setUnknownFields(unknownFields);
722     }
723 
724     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)725     public final Builder mergeUnknownFields(
726         final com.google.protobuf.UnknownFieldSet unknownFields) {
727       return super.mergeUnknownFields(unknownFields);
728     }
729 
730     // @@protoc_insertion_point(builder_scope:google.cloud.run.v2.CloudSqlInstance)
731   }
732 
733   // @@protoc_insertion_point(class_scope:google.cloud.run.v2.CloudSqlInstance)
734   private static final com.google.cloud.run.v2.CloudSqlInstance DEFAULT_INSTANCE;
735 
736   static {
737     DEFAULT_INSTANCE = new com.google.cloud.run.v2.CloudSqlInstance();
738   }
739 
getDefaultInstance()740   public static com.google.cloud.run.v2.CloudSqlInstance getDefaultInstance() {
741     return DEFAULT_INSTANCE;
742   }
743 
744   private static final com.google.protobuf.Parser<CloudSqlInstance> PARSER =
745       new com.google.protobuf.AbstractParser<CloudSqlInstance>() {
746         @java.lang.Override
747         public CloudSqlInstance parsePartialFrom(
748             com.google.protobuf.CodedInputStream input,
749             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
750             throws com.google.protobuf.InvalidProtocolBufferException {
751           Builder builder = newBuilder();
752           try {
753             builder.mergeFrom(input, extensionRegistry);
754           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
755             throw e.setUnfinishedMessage(builder.buildPartial());
756           } catch (com.google.protobuf.UninitializedMessageException e) {
757             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
758           } catch (java.io.IOException e) {
759             throw new com.google.protobuf.InvalidProtocolBufferException(e)
760                 .setUnfinishedMessage(builder.buildPartial());
761           }
762           return builder.buildPartial();
763         }
764       };
765 
parser()766   public static com.google.protobuf.Parser<CloudSqlInstance> parser() {
767     return PARSER;
768   }
769 
770   @java.lang.Override
getParserForType()771   public com.google.protobuf.Parser<CloudSqlInstance> getParserForType() {
772     return PARSER;
773   }
774 
775   @java.lang.Override
getDefaultInstanceForType()776   public com.google.cloud.run.v2.CloudSqlInstance getDefaultInstanceForType() {
777     return DEFAULT_INSTANCE;
778   }
779 }
780