• 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/shell/v1/cloudshell.proto
18 
19 package com.google.cloud.shell.v1;
20 
21 /**
22  *
23  *
24  * <pre>
25  * A Cloud Shell environment, which is defined as the combination of a Docker
26  * image specifying what is installed on the environment and a home directory
27  * containing the user's data that will remain across sessions. Each user has
28  * at least an environment with the ID "default".
29  * </pre>
30  *
31  * Protobuf type {@code google.cloud.shell.v1.Environment}
32  */
33 public final class Environment extends com.google.protobuf.GeneratedMessageV3
34     implements
35     // @@protoc_insertion_point(message_implements:google.cloud.shell.v1.Environment)
36     EnvironmentOrBuilder {
37   private static final long serialVersionUID = 0L;
38   // Use Environment.newBuilder() to construct.
Environment(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)39   private Environment(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
40     super(builder);
41   }
42 
Environment()43   private Environment() {
44     name_ = "";
45     id_ = "";
46     dockerImage_ = "";
47     state_ = 0;
48     webHost_ = "";
49     sshUsername_ = "";
50     sshHost_ = "";
51     publicKeys_ = com.google.protobuf.LazyStringArrayList.EMPTY;
52   }
53 
54   @java.lang.Override
55   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)56   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
57     return new Environment();
58   }
59 
60   @java.lang.Override
getUnknownFields()61   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
62     return this.unknownFields;
63   }
64 
getDescriptor()65   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
66     return com.google.cloud.shell.v1.CloudShellProto
67         .internal_static_google_cloud_shell_v1_Environment_descriptor;
68   }
69 
70   @java.lang.Override
71   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()72       internalGetFieldAccessorTable() {
73     return com.google.cloud.shell.v1.CloudShellProto
74         .internal_static_google_cloud_shell_v1_Environment_fieldAccessorTable
75         .ensureFieldAccessorsInitialized(
76             com.google.cloud.shell.v1.Environment.class,
77             com.google.cloud.shell.v1.Environment.Builder.class);
78   }
79 
80   /**
81    *
82    *
83    * <pre>
84    * Possible execution states for an environment.
85    * </pre>
86    *
87    * Protobuf enum {@code google.cloud.shell.v1.Environment.State}
88    */
89   public enum State implements com.google.protobuf.ProtocolMessageEnum {
90     /**
91      *
92      *
93      * <pre>
94      * The environment's states is unknown.
95      * </pre>
96      *
97      * <code>STATE_UNSPECIFIED = 0;</code>
98      */
99     STATE_UNSPECIFIED(0),
100     /**
101      *
102      *
103      * <pre>
104      * The environment is not running and can't be connected to. Starting the
105      * environment will transition it to the PENDING state.
106      * </pre>
107      *
108      * <code>SUSPENDED = 1;</code>
109      */
110     SUSPENDED(1),
111     /**
112      *
113      *
114      * <pre>
115      * The environment is being started but is not yet ready to accept
116      * connections.
117      * </pre>
118      *
119      * <code>PENDING = 2;</code>
120      */
121     PENDING(2),
122     /**
123      *
124      *
125      * <pre>
126      * The environment is running and ready to accept connections. It will
127      * automatically transition back to DISABLED after a period of inactivity or
128      * if another environment is started.
129      * </pre>
130      *
131      * <code>RUNNING = 3;</code>
132      */
133     RUNNING(3),
134     /**
135      *
136      *
137      * <pre>
138      * The environment is being deleted and can't be connected to.
139      * </pre>
140      *
141      * <code>DELETING = 4;</code>
142      */
143     DELETING(4),
144     UNRECOGNIZED(-1),
145     ;
146 
147     /**
148      *
149      *
150      * <pre>
151      * The environment's states is unknown.
152      * </pre>
153      *
154      * <code>STATE_UNSPECIFIED = 0;</code>
155      */
156     public static final int STATE_UNSPECIFIED_VALUE = 0;
157     /**
158      *
159      *
160      * <pre>
161      * The environment is not running and can't be connected to. Starting the
162      * environment will transition it to the PENDING state.
163      * </pre>
164      *
165      * <code>SUSPENDED = 1;</code>
166      */
167     public static final int SUSPENDED_VALUE = 1;
168     /**
169      *
170      *
171      * <pre>
172      * The environment is being started but is not yet ready to accept
173      * connections.
174      * </pre>
175      *
176      * <code>PENDING = 2;</code>
177      */
178     public static final int PENDING_VALUE = 2;
179     /**
180      *
181      *
182      * <pre>
183      * The environment is running and ready to accept connections. It will
184      * automatically transition back to DISABLED after a period of inactivity or
185      * if another environment is started.
186      * </pre>
187      *
188      * <code>RUNNING = 3;</code>
189      */
190     public static final int RUNNING_VALUE = 3;
191     /**
192      *
193      *
194      * <pre>
195      * The environment is being deleted and can't be connected to.
196      * </pre>
197      *
198      * <code>DELETING = 4;</code>
199      */
200     public static final int DELETING_VALUE = 4;
201 
getNumber()202     public final int getNumber() {
203       if (this == UNRECOGNIZED) {
204         throw new java.lang.IllegalArgumentException(
205             "Can't get the number of an unknown enum value.");
206       }
207       return value;
208     }
209 
210     /**
211      * @param value The numeric wire value of the corresponding enum entry.
212      * @return The enum associated with the given numeric wire value.
213      * @deprecated Use {@link #forNumber(int)} instead.
214      */
215     @java.lang.Deprecated
valueOf(int value)216     public static State valueOf(int value) {
217       return forNumber(value);
218     }
219 
220     /**
221      * @param value The numeric wire value of the corresponding enum entry.
222      * @return The enum associated with the given numeric wire value.
223      */
forNumber(int value)224     public static State forNumber(int value) {
225       switch (value) {
226         case 0:
227           return STATE_UNSPECIFIED;
228         case 1:
229           return SUSPENDED;
230         case 2:
231           return PENDING;
232         case 3:
233           return RUNNING;
234         case 4:
235           return DELETING;
236         default:
237           return null;
238       }
239     }
240 
internalGetValueMap()241     public static com.google.protobuf.Internal.EnumLiteMap<State> internalGetValueMap() {
242       return internalValueMap;
243     }
244 
245     private static final com.google.protobuf.Internal.EnumLiteMap<State> internalValueMap =
246         new com.google.protobuf.Internal.EnumLiteMap<State>() {
247           public State findValueByNumber(int number) {
248             return State.forNumber(number);
249           }
250         };
251 
getValueDescriptor()252     public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
253       if (this == UNRECOGNIZED) {
254         throw new java.lang.IllegalStateException(
255             "Can't get the descriptor of an unrecognized enum value.");
256       }
257       return getDescriptor().getValues().get(ordinal());
258     }
259 
getDescriptorForType()260     public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
261       return getDescriptor();
262     }
263 
getDescriptor()264     public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
265       return com.google.cloud.shell.v1.Environment.getDescriptor().getEnumTypes().get(0);
266     }
267 
268     private static final State[] VALUES = values();
269 
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)270     public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
271       if (desc.getType() != getDescriptor()) {
272         throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
273       }
274       if (desc.getIndex() == -1) {
275         return UNRECOGNIZED;
276       }
277       return VALUES[desc.getIndex()];
278     }
279 
280     private final int value;
281 
State(int value)282     private State(int value) {
283       this.value = value;
284     }
285 
286     // @@protoc_insertion_point(enum_scope:google.cloud.shell.v1.Environment.State)
287   }
288 
289   public static final int NAME_FIELD_NUMBER = 1;
290 
291   @SuppressWarnings("serial")
292   private volatile java.lang.Object name_ = "";
293   /**
294    *
295    *
296    * <pre>
297    * Immutable. Full name of this resource, in the format
298    * `users/{owner_email}/environments/{environment_id}`. `{owner_email}` is the
299    * email address of the user to whom this environment belongs, and
300    * `{environment_id}` is the identifier of this environment. For example,
301    * `users/someone&#64;example.com/environments/default`.
302    * </pre>
303    *
304    * <code>string name = 1 [(.google.api.field_behavior) = IMMUTABLE];</code>
305    *
306    * @return The name.
307    */
308   @java.lang.Override
getName()309   public java.lang.String getName() {
310     java.lang.Object ref = name_;
311     if (ref instanceof java.lang.String) {
312       return (java.lang.String) ref;
313     } else {
314       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
315       java.lang.String s = bs.toStringUtf8();
316       name_ = s;
317       return s;
318     }
319   }
320   /**
321    *
322    *
323    * <pre>
324    * Immutable. Full name of this resource, in the format
325    * `users/{owner_email}/environments/{environment_id}`. `{owner_email}` is the
326    * email address of the user to whom this environment belongs, and
327    * `{environment_id}` is the identifier of this environment. For example,
328    * `users/someone&#64;example.com/environments/default`.
329    * </pre>
330    *
331    * <code>string name = 1 [(.google.api.field_behavior) = IMMUTABLE];</code>
332    *
333    * @return The bytes for name.
334    */
335   @java.lang.Override
getNameBytes()336   public com.google.protobuf.ByteString getNameBytes() {
337     java.lang.Object ref = name_;
338     if (ref instanceof java.lang.String) {
339       com.google.protobuf.ByteString b =
340           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
341       name_ = b;
342       return b;
343     } else {
344       return (com.google.protobuf.ByteString) ref;
345     }
346   }
347 
348   public static final int ID_FIELD_NUMBER = 2;
349 
350   @SuppressWarnings("serial")
351   private volatile java.lang.Object id_ = "";
352   /**
353    *
354    *
355    * <pre>
356    * Output only. The environment's identifier, unique among the user's
357    * environments.
358    * </pre>
359    *
360    * <code>string id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
361    *
362    * @return The id.
363    */
364   @java.lang.Override
getId()365   public java.lang.String getId() {
366     java.lang.Object ref = id_;
367     if (ref instanceof java.lang.String) {
368       return (java.lang.String) ref;
369     } else {
370       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
371       java.lang.String s = bs.toStringUtf8();
372       id_ = s;
373       return s;
374     }
375   }
376   /**
377    *
378    *
379    * <pre>
380    * Output only. The environment's identifier, unique among the user's
381    * environments.
382    * </pre>
383    *
384    * <code>string id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
385    *
386    * @return The bytes for id.
387    */
388   @java.lang.Override
getIdBytes()389   public com.google.protobuf.ByteString getIdBytes() {
390     java.lang.Object ref = id_;
391     if (ref instanceof java.lang.String) {
392       com.google.protobuf.ByteString b =
393           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
394       id_ = b;
395       return b;
396     } else {
397       return (com.google.protobuf.ByteString) ref;
398     }
399   }
400 
401   public static final int DOCKER_IMAGE_FIELD_NUMBER = 3;
402 
403   @SuppressWarnings("serial")
404   private volatile java.lang.Object dockerImage_ = "";
405   /**
406    *
407    *
408    * <pre>
409    * Required. Immutable. Full path to the Docker image used to run this environment, e.g.
410    * "gcr.io/dev-con/cloud-devshell:latest".
411    * </pre>
412    *
413    * <code>
414    * string docker_image = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
415    * </code>
416    *
417    * @return The dockerImage.
418    */
419   @java.lang.Override
getDockerImage()420   public java.lang.String getDockerImage() {
421     java.lang.Object ref = dockerImage_;
422     if (ref instanceof java.lang.String) {
423       return (java.lang.String) ref;
424     } else {
425       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
426       java.lang.String s = bs.toStringUtf8();
427       dockerImage_ = s;
428       return s;
429     }
430   }
431   /**
432    *
433    *
434    * <pre>
435    * Required. Immutable. Full path to the Docker image used to run this environment, e.g.
436    * "gcr.io/dev-con/cloud-devshell:latest".
437    * </pre>
438    *
439    * <code>
440    * string docker_image = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
441    * </code>
442    *
443    * @return The bytes for dockerImage.
444    */
445   @java.lang.Override
getDockerImageBytes()446   public com.google.protobuf.ByteString getDockerImageBytes() {
447     java.lang.Object ref = dockerImage_;
448     if (ref instanceof java.lang.String) {
449       com.google.protobuf.ByteString b =
450           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
451       dockerImage_ = b;
452       return b;
453     } else {
454       return (com.google.protobuf.ByteString) ref;
455     }
456   }
457 
458   public static final int STATE_FIELD_NUMBER = 4;
459   private int state_ = 0;
460   /**
461    *
462    *
463    * <pre>
464    * Output only. Current execution state of this environment.
465    * </pre>
466    *
467    * <code>
468    * .google.cloud.shell.v1.Environment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
469    * </code>
470    *
471    * @return The enum numeric value on the wire for state.
472    */
473   @java.lang.Override
getStateValue()474   public int getStateValue() {
475     return state_;
476   }
477   /**
478    *
479    *
480    * <pre>
481    * Output only. Current execution state of this environment.
482    * </pre>
483    *
484    * <code>
485    * .google.cloud.shell.v1.Environment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
486    * </code>
487    *
488    * @return The state.
489    */
490   @java.lang.Override
getState()491   public com.google.cloud.shell.v1.Environment.State getState() {
492     com.google.cloud.shell.v1.Environment.State result =
493         com.google.cloud.shell.v1.Environment.State.forNumber(state_);
494     return result == null ? com.google.cloud.shell.v1.Environment.State.UNRECOGNIZED : result;
495   }
496 
497   public static final int WEB_HOST_FIELD_NUMBER = 12;
498 
499   @SuppressWarnings("serial")
500   private volatile java.lang.Object webHost_ = "";
501   /**
502    *
503    *
504    * <pre>
505    * Output only. Host to which clients can connect to initiate HTTPS or WSS
506    * connections with the environment.
507    * </pre>
508    *
509    * <code>string web_host = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
510    *
511    * @return The webHost.
512    */
513   @java.lang.Override
getWebHost()514   public java.lang.String getWebHost() {
515     java.lang.Object ref = webHost_;
516     if (ref instanceof java.lang.String) {
517       return (java.lang.String) ref;
518     } else {
519       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
520       java.lang.String s = bs.toStringUtf8();
521       webHost_ = s;
522       return s;
523     }
524   }
525   /**
526    *
527    *
528    * <pre>
529    * Output only. Host to which clients can connect to initiate HTTPS or WSS
530    * connections with the environment.
531    * </pre>
532    *
533    * <code>string web_host = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
534    *
535    * @return The bytes for webHost.
536    */
537   @java.lang.Override
getWebHostBytes()538   public com.google.protobuf.ByteString getWebHostBytes() {
539     java.lang.Object ref = webHost_;
540     if (ref instanceof java.lang.String) {
541       com.google.protobuf.ByteString b =
542           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
543       webHost_ = b;
544       return b;
545     } else {
546       return (com.google.protobuf.ByteString) ref;
547     }
548   }
549 
550   public static final int SSH_USERNAME_FIELD_NUMBER = 5;
551 
552   @SuppressWarnings("serial")
553   private volatile java.lang.Object sshUsername_ = "";
554   /**
555    *
556    *
557    * <pre>
558    * Output only. Username that clients should use when initiating SSH sessions
559    * with the environment.
560    * </pre>
561    *
562    * <code>string ssh_username = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
563    *
564    * @return The sshUsername.
565    */
566   @java.lang.Override
getSshUsername()567   public java.lang.String getSshUsername() {
568     java.lang.Object ref = sshUsername_;
569     if (ref instanceof java.lang.String) {
570       return (java.lang.String) ref;
571     } else {
572       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
573       java.lang.String s = bs.toStringUtf8();
574       sshUsername_ = s;
575       return s;
576     }
577   }
578   /**
579    *
580    *
581    * <pre>
582    * Output only. Username that clients should use when initiating SSH sessions
583    * with the environment.
584    * </pre>
585    *
586    * <code>string ssh_username = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
587    *
588    * @return The bytes for sshUsername.
589    */
590   @java.lang.Override
getSshUsernameBytes()591   public com.google.protobuf.ByteString getSshUsernameBytes() {
592     java.lang.Object ref = sshUsername_;
593     if (ref instanceof java.lang.String) {
594       com.google.protobuf.ByteString b =
595           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
596       sshUsername_ = b;
597       return b;
598     } else {
599       return (com.google.protobuf.ByteString) ref;
600     }
601   }
602 
603   public static final int SSH_HOST_FIELD_NUMBER = 6;
604 
605   @SuppressWarnings("serial")
606   private volatile java.lang.Object sshHost_ = "";
607   /**
608    *
609    *
610    * <pre>
611    * Output only. Host to which clients can connect to initiate SSH sessions
612    * with the environment.
613    * </pre>
614    *
615    * <code>string ssh_host = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
616    *
617    * @return The sshHost.
618    */
619   @java.lang.Override
getSshHost()620   public java.lang.String getSshHost() {
621     java.lang.Object ref = sshHost_;
622     if (ref instanceof java.lang.String) {
623       return (java.lang.String) ref;
624     } else {
625       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
626       java.lang.String s = bs.toStringUtf8();
627       sshHost_ = s;
628       return s;
629     }
630   }
631   /**
632    *
633    *
634    * <pre>
635    * Output only. Host to which clients can connect to initiate SSH sessions
636    * with the environment.
637    * </pre>
638    *
639    * <code>string ssh_host = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
640    *
641    * @return The bytes for sshHost.
642    */
643   @java.lang.Override
getSshHostBytes()644   public com.google.protobuf.ByteString getSshHostBytes() {
645     java.lang.Object ref = sshHost_;
646     if (ref instanceof java.lang.String) {
647       com.google.protobuf.ByteString b =
648           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
649       sshHost_ = b;
650       return b;
651     } else {
652       return (com.google.protobuf.ByteString) ref;
653     }
654   }
655 
656   public static final int SSH_PORT_FIELD_NUMBER = 7;
657   private int sshPort_ = 0;
658   /**
659    *
660    *
661    * <pre>
662    * Output only. Port to which clients can connect to initiate SSH sessions
663    * with the environment.
664    * </pre>
665    *
666    * <code>int32 ssh_port = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
667    *
668    * @return The sshPort.
669    */
670   @java.lang.Override
getSshPort()671   public int getSshPort() {
672     return sshPort_;
673   }
674 
675   public static final int PUBLIC_KEYS_FIELD_NUMBER = 8;
676 
677   @SuppressWarnings("serial")
678   private com.google.protobuf.LazyStringList publicKeys_;
679   /**
680    *
681    *
682    * <pre>
683    * Output only. Public keys associated with the environment. Clients can
684    * connect to this environment via SSH only if they possess a private key
685    * corresponding to at least one of these public keys. Keys can be added to or
686    * removed from the environment using the AddPublicKey and RemovePublicKey
687    * methods.
688    * </pre>
689    *
690    * <code>repeated string public_keys = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
691    *
692    * @return A list containing the publicKeys.
693    */
getPublicKeysList()694   public com.google.protobuf.ProtocolStringList getPublicKeysList() {
695     return publicKeys_;
696   }
697   /**
698    *
699    *
700    * <pre>
701    * Output only. Public keys associated with the environment. Clients can
702    * connect to this environment via SSH only if they possess a private key
703    * corresponding to at least one of these public keys. Keys can be added to or
704    * removed from the environment using the AddPublicKey and RemovePublicKey
705    * methods.
706    * </pre>
707    *
708    * <code>repeated string public_keys = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
709    *
710    * @return The count of publicKeys.
711    */
getPublicKeysCount()712   public int getPublicKeysCount() {
713     return publicKeys_.size();
714   }
715   /**
716    *
717    *
718    * <pre>
719    * Output only. Public keys associated with the environment. Clients can
720    * connect to this environment via SSH only if they possess a private key
721    * corresponding to at least one of these public keys. Keys can be added to or
722    * removed from the environment using the AddPublicKey and RemovePublicKey
723    * methods.
724    * </pre>
725    *
726    * <code>repeated string public_keys = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
727    *
728    * @param index The index of the element to return.
729    * @return The publicKeys at the given index.
730    */
getPublicKeys(int index)731   public java.lang.String getPublicKeys(int index) {
732     return publicKeys_.get(index);
733   }
734   /**
735    *
736    *
737    * <pre>
738    * Output only. Public keys associated with the environment. Clients can
739    * connect to this environment via SSH only if they possess a private key
740    * corresponding to at least one of these public keys. Keys can be added to or
741    * removed from the environment using the AddPublicKey and RemovePublicKey
742    * methods.
743    * </pre>
744    *
745    * <code>repeated string public_keys = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
746    *
747    * @param index The index of the value to return.
748    * @return The bytes of the publicKeys at the given index.
749    */
getPublicKeysBytes(int index)750   public com.google.protobuf.ByteString getPublicKeysBytes(int index) {
751     return publicKeys_.getByteString(index);
752   }
753 
754   private byte memoizedIsInitialized = -1;
755 
756   @java.lang.Override
isInitialized()757   public final boolean isInitialized() {
758     byte isInitialized = memoizedIsInitialized;
759     if (isInitialized == 1) return true;
760     if (isInitialized == 0) return false;
761 
762     memoizedIsInitialized = 1;
763     return true;
764   }
765 
766   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)767   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
768     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
769       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
770     }
771     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
772       com.google.protobuf.GeneratedMessageV3.writeString(output, 2, id_);
773     }
774     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dockerImage_)) {
775       com.google.protobuf.GeneratedMessageV3.writeString(output, 3, dockerImage_);
776     }
777     if (state_ != com.google.cloud.shell.v1.Environment.State.STATE_UNSPECIFIED.getNumber()) {
778       output.writeEnum(4, state_);
779     }
780     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sshUsername_)) {
781       com.google.protobuf.GeneratedMessageV3.writeString(output, 5, sshUsername_);
782     }
783     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sshHost_)) {
784       com.google.protobuf.GeneratedMessageV3.writeString(output, 6, sshHost_);
785     }
786     if (sshPort_ != 0) {
787       output.writeInt32(7, sshPort_);
788     }
789     for (int i = 0; i < publicKeys_.size(); i++) {
790       com.google.protobuf.GeneratedMessageV3.writeString(output, 8, publicKeys_.getRaw(i));
791     }
792     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(webHost_)) {
793       com.google.protobuf.GeneratedMessageV3.writeString(output, 12, webHost_);
794     }
795     getUnknownFields().writeTo(output);
796   }
797 
798   @java.lang.Override
getSerializedSize()799   public int getSerializedSize() {
800     int size = memoizedSize;
801     if (size != -1) return size;
802 
803     size = 0;
804     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
805       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
806     }
807     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
808       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, id_);
809     }
810     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dockerImage_)) {
811       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, dockerImage_);
812     }
813     if (state_ != com.google.cloud.shell.v1.Environment.State.STATE_UNSPECIFIED.getNumber()) {
814       size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, state_);
815     }
816     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sshUsername_)) {
817       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, sshUsername_);
818     }
819     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sshHost_)) {
820       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, sshHost_);
821     }
822     if (sshPort_ != 0) {
823       size += com.google.protobuf.CodedOutputStream.computeInt32Size(7, sshPort_);
824     }
825     {
826       int dataSize = 0;
827       for (int i = 0; i < publicKeys_.size(); i++) {
828         dataSize += computeStringSizeNoTag(publicKeys_.getRaw(i));
829       }
830       size += dataSize;
831       size += 1 * getPublicKeysList().size();
832     }
833     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(webHost_)) {
834       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, webHost_);
835     }
836     size += getUnknownFields().getSerializedSize();
837     memoizedSize = size;
838     return size;
839   }
840 
841   @java.lang.Override
equals(final java.lang.Object obj)842   public boolean equals(final java.lang.Object obj) {
843     if (obj == this) {
844       return true;
845     }
846     if (!(obj instanceof com.google.cloud.shell.v1.Environment)) {
847       return super.equals(obj);
848     }
849     com.google.cloud.shell.v1.Environment other = (com.google.cloud.shell.v1.Environment) obj;
850 
851     if (!getName().equals(other.getName())) return false;
852     if (!getId().equals(other.getId())) return false;
853     if (!getDockerImage().equals(other.getDockerImage())) return false;
854     if (state_ != other.state_) return false;
855     if (!getWebHost().equals(other.getWebHost())) return false;
856     if (!getSshUsername().equals(other.getSshUsername())) return false;
857     if (!getSshHost().equals(other.getSshHost())) return false;
858     if (getSshPort() != other.getSshPort()) return false;
859     if (!getPublicKeysList().equals(other.getPublicKeysList())) return false;
860     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
861     return true;
862   }
863 
864   @java.lang.Override
hashCode()865   public int hashCode() {
866     if (memoizedHashCode != 0) {
867       return memoizedHashCode;
868     }
869     int hash = 41;
870     hash = (19 * hash) + getDescriptor().hashCode();
871     hash = (37 * hash) + NAME_FIELD_NUMBER;
872     hash = (53 * hash) + getName().hashCode();
873     hash = (37 * hash) + ID_FIELD_NUMBER;
874     hash = (53 * hash) + getId().hashCode();
875     hash = (37 * hash) + DOCKER_IMAGE_FIELD_NUMBER;
876     hash = (53 * hash) + getDockerImage().hashCode();
877     hash = (37 * hash) + STATE_FIELD_NUMBER;
878     hash = (53 * hash) + state_;
879     hash = (37 * hash) + WEB_HOST_FIELD_NUMBER;
880     hash = (53 * hash) + getWebHost().hashCode();
881     hash = (37 * hash) + SSH_USERNAME_FIELD_NUMBER;
882     hash = (53 * hash) + getSshUsername().hashCode();
883     hash = (37 * hash) + SSH_HOST_FIELD_NUMBER;
884     hash = (53 * hash) + getSshHost().hashCode();
885     hash = (37 * hash) + SSH_PORT_FIELD_NUMBER;
886     hash = (53 * hash) + getSshPort();
887     if (getPublicKeysCount() > 0) {
888       hash = (37 * hash) + PUBLIC_KEYS_FIELD_NUMBER;
889       hash = (53 * hash) + getPublicKeysList().hashCode();
890     }
891     hash = (29 * hash) + getUnknownFields().hashCode();
892     memoizedHashCode = hash;
893     return hash;
894   }
895 
parseFrom(java.nio.ByteBuffer data)896   public static com.google.cloud.shell.v1.Environment parseFrom(java.nio.ByteBuffer data)
897       throws com.google.protobuf.InvalidProtocolBufferException {
898     return PARSER.parseFrom(data);
899   }
900 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)901   public static com.google.cloud.shell.v1.Environment parseFrom(
902       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
903       throws com.google.protobuf.InvalidProtocolBufferException {
904     return PARSER.parseFrom(data, extensionRegistry);
905   }
906 
parseFrom(com.google.protobuf.ByteString data)907   public static com.google.cloud.shell.v1.Environment parseFrom(com.google.protobuf.ByteString data)
908       throws com.google.protobuf.InvalidProtocolBufferException {
909     return PARSER.parseFrom(data);
910   }
911 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)912   public static com.google.cloud.shell.v1.Environment parseFrom(
913       com.google.protobuf.ByteString data,
914       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
915       throws com.google.protobuf.InvalidProtocolBufferException {
916     return PARSER.parseFrom(data, extensionRegistry);
917   }
918 
parseFrom(byte[] data)919   public static com.google.cloud.shell.v1.Environment parseFrom(byte[] data)
920       throws com.google.protobuf.InvalidProtocolBufferException {
921     return PARSER.parseFrom(data);
922   }
923 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)924   public static com.google.cloud.shell.v1.Environment parseFrom(
925       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
926       throws com.google.protobuf.InvalidProtocolBufferException {
927     return PARSER.parseFrom(data, extensionRegistry);
928   }
929 
parseFrom(java.io.InputStream input)930   public static com.google.cloud.shell.v1.Environment parseFrom(java.io.InputStream input)
931       throws java.io.IOException {
932     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
933   }
934 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)935   public static com.google.cloud.shell.v1.Environment parseFrom(
936       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
937       throws java.io.IOException {
938     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
939         PARSER, input, extensionRegistry);
940   }
941 
parseDelimitedFrom(java.io.InputStream input)942   public static com.google.cloud.shell.v1.Environment parseDelimitedFrom(java.io.InputStream input)
943       throws java.io.IOException {
944     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
945   }
946 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)947   public static com.google.cloud.shell.v1.Environment parseDelimitedFrom(
948       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
949       throws java.io.IOException {
950     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
951         PARSER, input, extensionRegistry);
952   }
953 
parseFrom( com.google.protobuf.CodedInputStream input)954   public static com.google.cloud.shell.v1.Environment parseFrom(
955       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
956     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
957   }
958 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)959   public static com.google.cloud.shell.v1.Environment parseFrom(
960       com.google.protobuf.CodedInputStream input,
961       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
962       throws java.io.IOException {
963     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
964         PARSER, input, extensionRegistry);
965   }
966 
967   @java.lang.Override
newBuilderForType()968   public Builder newBuilderForType() {
969     return newBuilder();
970   }
971 
newBuilder()972   public static Builder newBuilder() {
973     return DEFAULT_INSTANCE.toBuilder();
974   }
975 
newBuilder(com.google.cloud.shell.v1.Environment prototype)976   public static Builder newBuilder(com.google.cloud.shell.v1.Environment prototype) {
977     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
978   }
979 
980   @java.lang.Override
toBuilder()981   public Builder toBuilder() {
982     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
983   }
984 
985   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)986   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
987     Builder builder = new Builder(parent);
988     return builder;
989   }
990   /**
991    *
992    *
993    * <pre>
994    * A Cloud Shell environment, which is defined as the combination of a Docker
995    * image specifying what is installed on the environment and a home directory
996    * containing the user's data that will remain across sessions. Each user has
997    * at least an environment with the ID "default".
998    * </pre>
999    *
1000    * Protobuf type {@code google.cloud.shell.v1.Environment}
1001    */
1002   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
1003       implements
1004       // @@protoc_insertion_point(builder_implements:google.cloud.shell.v1.Environment)
1005       com.google.cloud.shell.v1.EnvironmentOrBuilder {
getDescriptor()1006     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
1007       return com.google.cloud.shell.v1.CloudShellProto
1008           .internal_static_google_cloud_shell_v1_Environment_descriptor;
1009     }
1010 
1011     @java.lang.Override
1012     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()1013         internalGetFieldAccessorTable() {
1014       return com.google.cloud.shell.v1.CloudShellProto
1015           .internal_static_google_cloud_shell_v1_Environment_fieldAccessorTable
1016           .ensureFieldAccessorsInitialized(
1017               com.google.cloud.shell.v1.Environment.class,
1018               com.google.cloud.shell.v1.Environment.Builder.class);
1019     }
1020 
1021     // Construct using com.google.cloud.shell.v1.Environment.newBuilder()
Builder()1022     private Builder() {}
1023 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1024     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
1025       super(parent);
1026     }
1027 
1028     @java.lang.Override
clear()1029     public Builder clear() {
1030       super.clear();
1031       bitField0_ = 0;
1032       name_ = "";
1033       id_ = "";
1034       dockerImage_ = "";
1035       state_ = 0;
1036       webHost_ = "";
1037       sshUsername_ = "";
1038       sshHost_ = "";
1039       sshPort_ = 0;
1040       publicKeys_ = com.google.protobuf.LazyStringArrayList.EMPTY;
1041       bitField0_ = (bitField0_ & ~0x00000100);
1042       return this;
1043     }
1044 
1045     @java.lang.Override
getDescriptorForType()1046     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
1047       return com.google.cloud.shell.v1.CloudShellProto
1048           .internal_static_google_cloud_shell_v1_Environment_descriptor;
1049     }
1050 
1051     @java.lang.Override
getDefaultInstanceForType()1052     public com.google.cloud.shell.v1.Environment getDefaultInstanceForType() {
1053       return com.google.cloud.shell.v1.Environment.getDefaultInstance();
1054     }
1055 
1056     @java.lang.Override
build()1057     public com.google.cloud.shell.v1.Environment build() {
1058       com.google.cloud.shell.v1.Environment result = buildPartial();
1059       if (!result.isInitialized()) {
1060         throw newUninitializedMessageException(result);
1061       }
1062       return result;
1063     }
1064 
1065     @java.lang.Override
buildPartial()1066     public com.google.cloud.shell.v1.Environment buildPartial() {
1067       com.google.cloud.shell.v1.Environment result =
1068           new com.google.cloud.shell.v1.Environment(this);
1069       buildPartialRepeatedFields(result);
1070       if (bitField0_ != 0) {
1071         buildPartial0(result);
1072       }
1073       onBuilt();
1074       return result;
1075     }
1076 
buildPartialRepeatedFields(com.google.cloud.shell.v1.Environment result)1077     private void buildPartialRepeatedFields(com.google.cloud.shell.v1.Environment result) {
1078       if (((bitField0_ & 0x00000100) != 0)) {
1079         publicKeys_ = publicKeys_.getUnmodifiableView();
1080         bitField0_ = (bitField0_ & ~0x00000100);
1081       }
1082       result.publicKeys_ = publicKeys_;
1083     }
1084 
buildPartial0(com.google.cloud.shell.v1.Environment result)1085     private void buildPartial0(com.google.cloud.shell.v1.Environment result) {
1086       int from_bitField0_ = bitField0_;
1087       if (((from_bitField0_ & 0x00000001) != 0)) {
1088         result.name_ = name_;
1089       }
1090       if (((from_bitField0_ & 0x00000002) != 0)) {
1091         result.id_ = id_;
1092       }
1093       if (((from_bitField0_ & 0x00000004) != 0)) {
1094         result.dockerImage_ = dockerImage_;
1095       }
1096       if (((from_bitField0_ & 0x00000008) != 0)) {
1097         result.state_ = state_;
1098       }
1099       if (((from_bitField0_ & 0x00000010) != 0)) {
1100         result.webHost_ = webHost_;
1101       }
1102       if (((from_bitField0_ & 0x00000020) != 0)) {
1103         result.sshUsername_ = sshUsername_;
1104       }
1105       if (((from_bitField0_ & 0x00000040) != 0)) {
1106         result.sshHost_ = sshHost_;
1107       }
1108       if (((from_bitField0_ & 0x00000080) != 0)) {
1109         result.sshPort_ = sshPort_;
1110       }
1111     }
1112 
1113     @java.lang.Override
clone()1114     public Builder clone() {
1115       return super.clone();
1116     }
1117 
1118     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1119     public Builder setField(
1120         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
1121       return super.setField(field, value);
1122     }
1123 
1124     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)1125     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
1126       return super.clearField(field);
1127     }
1128 
1129     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)1130     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
1131       return super.clearOneof(oneof);
1132     }
1133 
1134     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)1135     public Builder setRepeatedField(
1136         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
1137       return super.setRepeatedField(field, index, value);
1138     }
1139 
1140     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1141     public Builder addRepeatedField(
1142         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
1143       return super.addRepeatedField(field, value);
1144     }
1145 
1146     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)1147     public Builder mergeFrom(com.google.protobuf.Message other) {
1148       if (other instanceof com.google.cloud.shell.v1.Environment) {
1149         return mergeFrom((com.google.cloud.shell.v1.Environment) other);
1150       } else {
1151         super.mergeFrom(other);
1152         return this;
1153       }
1154     }
1155 
mergeFrom(com.google.cloud.shell.v1.Environment other)1156     public Builder mergeFrom(com.google.cloud.shell.v1.Environment other) {
1157       if (other == com.google.cloud.shell.v1.Environment.getDefaultInstance()) return this;
1158       if (!other.getName().isEmpty()) {
1159         name_ = other.name_;
1160         bitField0_ |= 0x00000001;
1161         onChanged();
1162       }
1163       if (!other.getId().isEmpty()) {
1164         id_ = other.id_;
1165         bitField0_ |= 0x00000002;
1166         onChanged();
1167       }
1168       if (!other.getDockerImage().isEmpty()) {
1169         dockerImage_ = other.dockerImage_;
1170         bitField0_ |= 0x00000004;
1171         onChanged();
1172       }
1173       if (other.state_ != 0) {
1174         setStateValue(other.getStateValue());
1175       }
1176       if (!other.getWebHost().isEmpty()) {
1177         webHost_ = other.webHost_;
1178         bitField0_ |= 0x00000010;
1179         onChanged();
1180       }
1181       if (!other.getSshUsername().isEmpty()) {
1182         sshUsername_ = other.sshUsername_;
1183         bitField0_ |= 0x00000020;
1184         onChanged();
1185       }
1186       if (!other.getSshHost().isEmpty()) {
1187         sshHost_ = other.sshHost_;
1188         bitField0_ |= 0x00000040;
1189         onChanged();
1190       }
1191       if (other.getSshPort() != 0) {
1192         setSshPort(other.getSshPort());
1193       }
1194       if (!other.publicKeys_.isEmpty()) {
1195         if (publicKeys_.isEmpty()) {
1196           publicKeys_ = other.publicKeys_;
1197           bitField0_ = (bitField0_ & ~0x00000100);
1198         } else {
1199           ensurePublicKeysIsMutable();
1200           publicKeys_.addAll(other.publicKeys_);
1201         }
1202         onChanged();
1203       }
1204       this.mergeUnknownFields(other.getUnknownFields());
1205       onChanged();
1206       return this;
1207     }
1208 
1209     @java.lang.Override
isInitialized()1210     public final boolean isInitialized() {
1211       return true;
1212     }
1213 
1214     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1215     public Builder mergeFrom(
1216         com.google.protobuf.CodedInputStream input,
1217         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1218         throws java.io.IOException {
1219       if (extensionRegistry == null) {
1220         throw new java.lang.NullPointerException();
1221       }
1222       try {
1223         boolean done = false;
1224         while (!done) {
1225           int tag = input.readTag();
1226           switch (tag) {
1227             case 0:
1228               done = true;
1229               break;
1230             case 10:
1231               {
1232                 name_ = input.readStringRequireUtf8();
1233                 bitField0_ |= 0x00000001;
1234                 break;
1235               } // case 10
1236             case 18:
1237               {
1238                 id_ = input.readStringRequireUtf8();
1239                 bitField0_ |= 0x00000002;
1240                 break;
1241               } // case 18
1242             case 26:
1243               {
1244                 dockerImage_ = input.readStringRequireUtf8();
1245                 bitField0_ |= 0x00000004;
1246                 break;
1247               } // case 26
1248             case 32:
1249               {
1250                 state_ = input.readEnum();
1251                 bitField0_ |= 0x00000008;
1252                 break;
1253               } // case 32
1254             case 42:
1255               {
1256                 sshUsername_ = input.readStringRequireUtf8();
1257                 bitField0_ |= 0x00000020;
1258                 break;
1259               } // case 42
1260             case 50:
1261               {
1262                 sshHost_ = input.readStringRequireUtf8();
1263                 bitField0_ |= 0x00000040;
1264                 break;
1265               } // case 50
1266             case 56:
1267               {
1268                 sshPort_ = input.readInt32();
1269                 bitField0_ |= 0x00000080;
1270                 break;
1271               } // case 56
1272             case 66:
1273               {
1274                 java.lang.String s = input.readStringRequireUtf8();
1275                 ensurePublicKeysIsMutable();
1276                 publicKeys_.add(s);
1277                 break;
1278               } // case 66
1279             case 98:
1280               {
1281                 webHost_ = input.readStringRequireUtf8();
1282                 bitField0_ |= 0x00000010;
1283                 break;
1284               } // case 98
1285             default:
1286               {
1287                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
1288                   done = true; // was an endgroup tag
1289                 }
1290                 break;
1291               } // default:
1292           } // switch (tag)
1293         } // while (!done)
1294       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1295         throw e.unwrapIOException();
1296       } finally {
1297         onChanged();
1298       } // finally
1299       return this;
1300     }
1301 
1302     private int bitField0_;
1303 
1304     private java.lang.Object name_ = "";
1305     /**
1306      *
1307      *
1308      * <pre>
1309      * Immutable. Full name of this resource, in the format
1310      * `users/{owner_email}/environments/{environment_id}`. `{owner_email}` is the
1311      * email address of the user to whom this environment belongs, and
1312      * `{environment_id}` is the identifier of this environment. For example,
1313      * `users/someone&#64;example.com/environments/default`.
1314      * </pre>
1315      *
1316      * <code>string name = 1 [(.google.api.field_behavior) = IMMUTABLE];</code>
1317      *
1318      * @return The name.
1319      */
getName()1320     public java.lang.String getName() {
1321       java.lang.Object ref = name_;
1322       if (!(ref instanceof java.lang.String)) {
1323         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1324         java.lang.String s = bs.toStringUtf8();
1325         name_ = s;
1326         return s;
1327       } else {
1328         return (java.lang.String) ref;
1329       }
1330     }
1331     /**
1332      *
1333      *
1334      * <pre>
1335      * Immutable. Full name of this resource, in the format
1336      * `users/{owner_email}/environments/{environment_id}`. `{owner_email}` is the
1337      * email address of the user to whom this environment belongs, and
1338      * `{environment_id}` is the identifier of this environment. For example,
1339      * `users/someone&#64;example.com/environments/default`.
1340      * </pre>
1341      *
1342      * <code>string name = 1 [(.google.api.field_behavior) = IMMUTABLE];</code>
1343      *
1344      * @return The bytes for name.
1345      */
getNameBytes()1346     public com.google.protobuf.ByteString getNameBytes() {
1347       java.lang.Object ref = name_;
1348       if (ref instanceof String) {
1349         com.google.protobuf.ByteString b =
1350             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1351         name_ = b;
1352         return b;
1353       } else {
1354         return (com.google.protobuf.ByteString) ref;
1355       }
1356     }
1357     /**
1358      *
1359      *
1360      * <pre>
1361      * Immutable. Full name of this resource, in the format
1362      * `users/{owner_email}/environments/{environment_id}`. `{owner_email}` is the
1363      * email address of the user to whom this environment belongs, and
1364      * `{environment_id}` is the identifier of this environment. For example,
1365      * `users/someone&#64;example.com/environments/default`.
1366      * </pre>
1367      *
1368      * <code>string name = 1 [(.google.api.field_behavior) = IMMUTABLE];</code>
1369      *
1370      * @param value The name to set.
1371      * @return This builder for chaining.
1372      */
setName(java.lang.String value)1373     public Builder setName(java.lang.String value) {
1374       if (value == null) {
1375         throw new NullPointerException();
1376       }
1377       name_ = value;
1378       bitField0_ |= 0x00000001;
1379       onChanged();
1380       return this;
1381     }
1382     /**
1383      *
1384      *
1385      * <pre>
1386      * Immutable. Full name of this resource, in the format
1387      * `users/{owner_email}/environments/{environment_id}`. `{owner_email}` is the
1388      * email address of the user to whom this environment belongs, and
1389      * `{environment_id}` is the identifier of this environment. For example,
1390      * `users/someone&#64;example.com/environments/default`.
1391      * </pre>
1392      *
1393      * <code>string name = 1 [(.google.api.field_behavior) = IMMUTABLE];</code>
1394      *
1395      * @return This builder for chaining.
1396      */
clearName()1397     public Builder clearName() {
1398       name_ = getDefaultInstance().getName();
1399       bitField0_ = (bitField0_ & ~0x00000001);
1400       onChanged();
1401       return this;
1402     }
1403     /**
1404      *
1405      *
1406      * <pre>
1407      * Immutable. Full name of this resource, in the format
1408      * `users/{owner_email}/environments/{environment_id}`. `{owner_email}` is the
1409      * email address of the user to whom this environment belongs, and
1410      * `{environment_id}` is the identifier of this environment. For example,
1411      * `users/someone&#64;example.com/environments/default`.
1412      * </pre>
1413      *
1414      * <code>string name = 1 [(.google.api.field_behavior) = IMMUTABLE];</code>
1415      *
1416      * @param value The bytes for name to set.
1417      * @return This builder for chaining.
1418      */
setNameBytes(com.google.protobuf.ByteString value)1419     public Builder setNameBytes(com.google.protobuf.ByteString value) {
1420       if (value == null) {
1421         throw new NullPointerException();
1422       }
1423       checkByteStringIsUtf8(value);
1424       name_ = value;
1425       bitField0_ |= 0x00000001;
1426       onChanged();
1427       return this;
1428     }
1429 
1430     private java.lang.Object id_ = "";
1431     /**
1432      *
1433      *
1434      * <pre>
1435      * Output only. The environment's identifier, unique among the user's
1436      * environments.
1437      * </pre>
1438      *
1439      * <code>string id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1440      *
1441      * @return The id.
1442      */
getId()1443     public java.lang.String getId() {
1444       java.lang.Object ref = id_;
1445       if (!(ref instanceof java.lang.String)) {
1446         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1447         java.lang.String s = bs.toStringUtf8();
1448         id_ = s;
1449         return s;
1450       } else {
1451         return (java.lang.String) ref;
1452       }
1453     }
1454     /**
1455      *
1456      *
1457      * <pre>
1458      * Output only. The environment's identifier, unique among the user's
1459      * environments.
1460      * </pre>
1461      *
1462      * <code>string id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1463      *
1464      * @return The bytes for id.
1465      */
getIdBytes()1466     public com.google.protobuf.ByteString getIdBytes() {
1467       java.lang.Object ref = id_;
1468       if (ref instanceof String) {
1469         com.google.protobuf.ByteString b =
1470             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1471         id_ = b;
1472         return b;
1473       } else {
1474         return (com.google.protobuf.ByteString) ref;
1475       }
1476     }
1477     /**
1478      *
1479      *
1480      * <pre>
1481      * Output only. The environment's identifier, unique among the user's
1482      * environments.
1483      * </pre>
1484      *
1485      * <code>string id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1486      *
1487      * @param value The id to set.
1488      * @return This builder for chaining.
1489      */
setId(java.lang.String value)1490     public Builder setId(java.lang.String value) {
1491       if (value == null) {
1492         throw new NullPointerException();
1493       }
1494       id_ = value;
1495       bitField0_ |= 0x00000002;
1496       onChanged();
1497       return this;
1498     }
1499     /**
1500      *
1501      *
1502      * <pre>
1503      * Output only. The environment's identifier, unique among the user's
1504      * environments.
1505      * </pre>
1506      *
1507      * <code>string id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1508      *
1509      * @return This builder for chaining.
1510      */
clearId()1511     public Builder clearId() {
1512       id_ = getDefaultInstance().getId();
1513       bitField0_ = (bitField0_ & ~0x00000002);
1514       onChanged();
1515       return this;
1516     }
1517     /**
1518      *
1519      *
1520      * <pre>
1521      * Output only. The environment's identifier, unique among the user's
1522      * environments.
1523      * </pre>
1524      *
1525      * <code>string id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1526      *
1527      * @param value The bytes for id to set.
1528      * @return This builder for chaining.
1529      */
setIdBytes(com.google.protobuf.ByteString value)1530     public Builder setIdBytes(com.google.protobuf.ByteString value) {
1531       if (value == null) {
1532         throw new NullPointerException();
1533       }
1534       checkByteStringIsUtf8(value);
1535       id_ = value;
1536       bitField0_ |= 0x00000002;
1537       onChanged();
1538       return this;
1539     }
1540 
1541     private java.lang.Object dockerImage_ = "";
1542     /**
1543      *
1544      *
1545      * <pre>
1546      * Required. Immutable. Full path to the Docker image used to run this environment, e.g.
1547      * "gcr.io/dev-con/cloud-devshell:latest".
1548      * </pre>
1549      *
1550      * <code>
1551      * string docker_image = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
1552      * </code>
1553      *
1554      * @return The dockerImage.
1555      */
getDockerImage()1556     public java.lang.String getDockerImage() {
1557       java.lang.Object ref = dockerImage_;
1558       if (!(ref instanceof java.lang.String)) {
1559         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1560         java.lang.String s = bs.toStringUtf8();
1561         dockerImage_ = s;
1562         return s;
1563       } else {
1564         return (java.lang.String) ref;
1565       }
1566     }
1567     /**
1568      *
1569      *
1570      * <pre>
1571      * Required. Immutable. Full path to the Docker image used to run this environment, e.g.
1572      * "gcr.io/dev-con/cloud-devshell:latest".
1573      * </pre>
1574      *
1575      * <code>
1576      * string docker_image = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
1577      * </code>
1578      *
1579      * @return The bytes for dockerImage.
1580      */
getDockerImageBytes()1581     public com.google.protobuf.ByteString getDockerImageBytes() {
1582       java.lang.Object ref = dockerImage_;
1583       if (ref instanceof String) {
1584         com.google.protobuf.ByteString b =
1585             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1586         dockerImage_ = b;
1587         return b;
1588       } else {
1589         return (com.google.protobuf.ByteString) ref;
1590       }
1591     }
1592     /**
1593      *
1594      *
1595      * <pre>
1596      * Required. Immutable. Full path to the Docker image used to run this environment, e.g.
1597      * "gcr.io/dev-con/cloud-devshell:latest".
1598      * </pre>
1599      *
1600      * <code>
1601      * string docker_image = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
1602      * </code>
1603      *
1604      * @param value The dockerImage to set.
1605      * @return This builder for chaining.
1606      */
setDockerImage(java.lang.String value)1607     public Builder setDockerImage(java.lang.String value) {
1608       if (value == null) {
1609         throw new NullPointerException();
1610       }
1611       dockerImage_ = value;
1612       bitField0_ |= 0x00000004;
1613       onChanged();
1614       return this;
1615     }
1616     /**
1617      *
1618      *
1619      * <pre>
1620      * Required. Immutable. Full path to the Docker image used to run this environment, e.g.
1621      * "gcr.io/dev-con/cloud-devshell:latest".
1622      * </pre>
1623      *
1624      * <code>
1625      * string docker_image = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
1626      * </code>
1627      *
1628      * @return This builder for chaining.
1629      */
clearDockerImage()1630     public Builder clearDockerImage() {
1631       dockerImage_ = getDefaultInstance().getDockerImage();
1632       bitField0_ = (bitField0_ & ~0x00000004);
1633       onChanged();
1634       return this;
1635     }
1636     /**
1637      *
1638      *
1639      * <pre>
1640      * Required. Immutable. Full path to the Docker image used to run this environment, e.g.
1641      * "gcr.io/dev-con/cloud-devshell:latest".
1642      * </pre>
1643      *
1644      * <code>
1645      * string docker_image = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
1646      * </code>
1647      *
1648      * @param value The bytes for dockerImage to set.
1649      * @return This builder for chaining.
1650      */
setDockerImageBytes(com.google.protobuf.ByteString value)1651     public Builder setDockerImageBytes(com.google.protobuf.ByteString value) {
1652       if (value == null) {
1653         throw new NullPointerException();
1654       }
1655       checkByteStringIsUtf8(value);
1656       dockerImage_ = value;
1657       bitField0_ |= 0x00000004;
1658       onChanged();
1659       return this;
1660     }
1661 
1662     private int state_ = 0;
1663     /**
1664      *
1665      *
1666      * <pre>
1667      * Output only. Current execution state of this environment.
1668      * </pre>
1669      *
1670      * <code>
1671      * .google.cloud.shell.v1.Environment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
1672      * </code>
1673      *
1674      * @return The enum numeric value on the wire for state.
1675      */
1676     @java.lang.Override
getStateValue()1677     public int getStateValue() {
1678       return state_;
1679     }
1680     /**
1681      *
1682      *
1683      * <pre>
1684      * Output only. Current execution state of this environment.
1685      * </pre>
1686      *
1687      * <code>
1688      * .google.cloud.shell.v1.Environment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
1689      * </code>
1690      *
1691      * @param value The enum numeric value on the wire for state to set.
1692      * @return This builder for chaining.
1693      */
setStateValue(int value)1694     public Builder setStateValue(int value) {
1695       state_ = value;
1696       bitField0_ |= 0x00000008;
1697       onChanged();
1698       return this;
1699     }
1700     /**
1701      *
1702      *
1703      * <pre>
1704      * Output only. Current execution state of this environment.
1705      * </pre>
1706      *
1707      * <code>
1708      * .google.cloud.shell.v1.Environment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
1709      * </code>
1710      *
1711      * @return The state.
1712      */
1713     @java.lang.Override
getState()1714     public com.google.cloud.shell.v1.Environment.State getState() {
1715       com.google.cloud.shell.v1.Environment.State result =
1716           com.google.cloud.shell.v1.Environment.State.forNumber(state_);
1717       return result == null ? com.google.cloud.shell.v1.Environment.State.UNRECOGNIZED : result;
1718     }
1719     /**
1720      *
1721      *
1722      * <pre>
1723      * Output only. Current execution state of this environment.
1724      * </pre>
1725      *
1726      * <code>
1727      * .google.cloud.shell.v1.Environment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
1728      * </code>
1729      *
1730      * @param value The state to set.
1731      * @return This builder for chaining.
1732      */
setState(com.google.cloud.shell.v1.Environment.State value)1733     public Builder setState(com.google.cloud.shell.v1.Environment.State value) {
1734       if (value == null) {
1735         throw new NullPointerException();
1736       }
1737       bitField0_ |= 0x00000008;
1738       state_ = value.getNumber();
1739       onChanged();
1740       return this;
1741     }
1742     /**
1743      *
1744      *
1745      * <pre>
1746      * Output only. Current execution state of this environment.
1747      * </pre>
1748      *
1749      * <code>
1750      * .google.cloud.shell.v1.Environment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
1751      * </code>
1752      *
1753      * @return This builder for chaining.
1754      */
clearState()1755     public Builder clearState() {
1756       bitField0_ = (bitField0_ & ~0x00000008);
1757       state_ = 0;
1758       onChanged();
1759       return this;
1760     }
1761 
1762     private java.lang.Object webHost_ = "";
1763     /**
1764      *
1765      *
1766      * <pre>
1767      * Output only. Host to which clients can connect to initiate HTTPS or WSS
1768      * connections with the environment.
1769      * </pre>
1770      *
1771      * <code>string web_host = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1772      *
1773      * @return The webHost.
1774      */
getWebHost()1775     public java.lang.String getWebHost() {
1776       java.lang.Object ref = webHost_;
1777       if (!(ref instanceof java.lang.String)) {
1778         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1779         java.lang.String s = bs.toStringUtf8();
1780         webHost_ = s;
1781         return s;
1782       } else {
1783         return (java.lang.String) ref;
1784       }
1785     }
1786     /**
1787      *
1788      *
1789      * <pre>
1790      * Output only. Host to which clients can connect to initiate HTTPS or WSS
1791      * connections with the environment.
1792      * </pre>
1793      *
1794      * <code>string web_host = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1795      *
1796      * @return The bytes for webHost.
1797      */
getWebHostBytes()1798     public com.google.protobuf.ByteString getWebHostBytes() {
1799       java.lang.Object ref = webHost_;
1800       if (ref instanceof String) {
1801         com.google.protobuf.ByteString b =
1802             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1803         webHost_ = b;
1804         return b;
1805       } else {
1806         return (com.google.protobuf.ByteString) ref;
1807       }
1808     }
1809     /**
1810      *
1811      *
1812      * <pre>
1813      * Output only. Host to which clients can connect to initiate HTTPS or WSS
1814      * connections with the environment.
1815      * </pre>
1816      *
1817      * <code>string web_host = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1818      *
1819      * @param value The webHost to set.
1820      * @return This builder for chaining.
1821      */
setWebHost(java.lang.String value)1822     public Builder setWebHost(java.lang.String value) {
1823       if (value == null) {
1824         throw new NullPointerException();
1825       }
1826       webHost_ = value;
1827       bitField0_ |= 0x00000010;
1828       onChanged();
1829       return this;
1830     }
1831     /**
1832      *
1833      *
1834      * <pre>
1835      * Output only. Host to which clients can connect to initiate HTTPS or WSS
1836      * connections with the environment.
1837      * </pre>
1838      *
1839      * <code>string web_host = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1840      *
1841      * @return This builder for chaining.
1842      */
clearWebHost()1843     public Builder clearWebHost() {
1844       webHost_ = getDefaultInstance().getWebHost();
1845       bitField0_ = (bitField0_ & ~0x00000010);
1846       onChanged();
1847       return this;
1848     }
1849     /**
1850      *
1851      *
1852      * <pre>
1853      * Output only. Host to which clients can connect to initiate HTTPS or WSS
1854      * connections with the environment.
1855      * </pre>
1856      *
1857      * <code>string web_host = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1858      *
1859      * @param value The bytes for webHost to set.
1860      * @return This builder for chaining.
1861      */
setWebHostBytes(com.google.protobuf.ByteString value)1862     public Builder setWebHostBytes(com.google.protobuf.ByteString value) {
1863       if (value == null) {
1864         throw new NullPointerException();
1865       }
1866       checkByteStringIsUtf8(value);
1867       webHost_ = value;
1868       bitField0_ |= 0x00000010;
1869       onChanged();
1870       return this;
1871     }
1872 
1873     private java.lang.Object sshUsername_ = "";
1874     /**
1875      *
1876      *
1877      * <pre>
1878      * Output only. Username that clients should use when initiating SSH sessions
1879      * with the environment.
1880      * </pre>
1881      *
1882      * <code>string ssh_username = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1883      *
1884      * @return The sshUsername.
1885      */
getSshUsername()1886     public java.lang.String getSshUsername() {
1887       java.lang.Object ref = sshUsername_;
1888       if (!(ref instanceof java.lang.String)) {
1889         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1890         java.lang.String s = bs.toStringUtf8();
1891         sshUsername_ = s;
1892         return s;
1893       } else {
1894         return (java.lang.String) ref;
1895       }
1896     }
1897     /**
1898      *
1899      *
1900      * <pre>
1901      * Output only. Username that clients should use when initiating SSH sessions
1902      * with the environment.
1903      * </pre>
1904      *
1905      * <code>string ssh_username = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1906      *
1907      * @return The bytes for sshUsername.
1908      */
getSshUsernameBytes()1909     public com.google.protobuf.ByteString getSshUsernameBytes() {
1910       java.lang.Object ref = sshUsername_;
1911       if (ref instanceof String) {
1912         com.google.protobuf.ByteString b =
1913             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1914         sshUsername_ = b;
1915         return b;
1916       } else {
1917         return (com.google.protobuf.ByteString) ref;
1918       }
1919     }
1920     /**
1921      *
1922      *
1923      * <pre>
1924      * Output only. Username that clients should use when initiating SSH sessions
1925      * with the environment.
1926      * </pre>
1927      *
1928      * <code>string ssh_username = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1929      *
1930      * @param value The sshUsername to set.
1931      * @return This builder for chaining.
1932      */
setSshUsername(java.lang.String value)1933     public Builder setSshUsername(java.lang.String value) {
1934       if (value == null) {
1935         throw new NullPointerException();
1936       }
1937       sshUsername_ = value;
1938       bitField0_ |= 0x00000020;
1939       onChanged();
1940       return this;
1941     }
1942     /**
1943      *
1944      *
1945      * <pre>
1946      * Output only. Username that clients should use when initiating SSH sessions
1947      * with the environment.
1948      * </pre>
1949      *
1950      * <code>string ssh_username = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1951      *
1952      * @return This builder for chaining.
1953      */
clearSshUsername()1954     public Builder clearSshUsername() {
1955       sshUsername_ = getDefaultInstance().getSshUsername();
1956       bitField0_ = (bitField0_ & ~0x00000020);
1957       onChanged();
1958       return this;
1959     }
1960     /**
1961      *
1962      *
1963      * <pre>
1964      * Output only. Username that clients should use when initiating SSH sessions
1965      * with the environment.
1966      * </pre>
1967      *
1968      * <code>string ssh_username = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1969      *
1970      * @param value The bytes for sshUsername to set.
1971      * @return This builder for chaining.
1972      */
setSshUsernameBytes(com.google.protobuf.ByteString value)1973     public Builder setSshUsernameBytes(com.google.protobuf.ByteString value) {
1974       if (value == null) {
1975         throw new NullPointerException();
1976       }
1977       checkByteStringIsUtf8(value);
1978       sshUsername_ = value;
1979       bitField0_ |= 0x00000020;
1980       onChanged();
1981       return this;
1982     }
1983 
1984     private java.lang.Object sshHost_ = "";
1985     /**
1986      *
1987      *
1988      * <pre>
1989      * Output only. Host to which clients can connect to initiate SSH sessions
1990      * with the environment.
1991      * </pre>
1992      *
1993      * <code>string ssh_host = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1994      *
1995      * @return The sshHost.
1996      */
getSshHost()1997     public java.lang.String getSshHost() {
1998       java.lang.Object ref = sshHost_;
1999       if (!(ref instanceof java.lang.String)) {
2000         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
2001         java.lang.String s = bs.toStringUtf8();
2002         sshHost_ = s;
2003         return s;
2004       } else {
2005         return (java.lang.String) ref;
2006       }
2007     }
2008     /**
2009      *
2010      *
2011      * <pre>
2012      * Output only. Host to which clients can connect to initiate SSH sessions
2013      * with the environment.
2014      * </pre>
2015      *
2016      * <code>string ssh_host = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
2017      *
2018      * @return The bytes for sshHost.
2019      */
getSshHostBytes()2020     public com.google.protobuf.ByteString getSshHostBytes() {
2021       java.lang.Object ref = sshHost_;
2022       if (ref instanceof String) {
2023         com.google.protobuf.ByteString b =
2024             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
2025         sshHost_ = b;
2026         return b;
2027       } else {
2028         return (com.google.protobuf.ByteString) ref;
2029       }
2030     }
2031     /**
2032      *
2033      *
2034      * <pre>
2035      * Output only. Host to which clients can connect to initiate SSH sessions
2036      * with the environment.
2037      * </pre>
2038      *
2039      * <code>string ssh_host = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
2040      *
2041      * @param value The sshHost to set.
2042      * @return This builder for chaining.
2043      */
setSshHost(java.lang.String value)2044     public Builder setSshHost(java.lang.String value) {
2045       if (value == null) {
2046         throw new NullPointerException();
2047       }
2048       sshHost_ = value;
2049       bitField0_ |= 0x00000040;
2050       onChanged();
2051       return this;
2052     }
2053     /**
2054      *
2055      *
2056      * <pre>
2057      * Output only. Host to which clients can connect to initiate SSH sessions
2058      * with the environment.
2059      * </pre>
2060      *
2061      * <code>string ssh_host = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
2062      *
2063      * @return This builder for chaining.
2064      */
clearSshHost()2065     public Builder clearSshHost() {
2066       sshHost_ = getDefaultInstance().getSshHost();
2067       bitField0_ = (bitField0_ & ~0x00000040);
2068       onChanged();
2069       return this;
2070     }
2071     /**
2072      *
2073      *
2074      * <pre>
2075      * Output only. Host to which clients can connect to initiate SSH sessions
2076      * with the environment.
2077      * </pre>
2078      *
2079      * <code>string ssh_host = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
2080      *
2081      * @param value The bytes for sshHost to set.
2082      * @return This builder for chaining.
2083      */
setSshHostBytes(com.google.protobuf.ByteString value)2084     public Builder setSshHostBytes(com.google.protobuf.ByteString value) {
2085       if (value == null) {
2086         throw new NullPointerException();
2087       }
2088       checkByteStringIsUtf8(value);
2089       sshHost_ = value;
2090       bitField0_ |= 0x00000040;
2091       onChanged();
2092       return this;
2093     }
2094 
2095     private int sshPort_;
2096     /**
2097      *
2098      *
2099      * <pre>
2100      * Output only. Port to which clients can connect to initiate SSH sessions
2101      * with the environment.
2102      * </pre>
2103      *
2104      * <code>int32 ssh_port = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
2105      *
2106      * @return The sshPort.
2107      */
2108     @java.lang.Override
getSshPort()2109     public int getSshPort() {
2110       return sshPort_;
2111     }
2112     /**
2113      *
2114      *
2115      * <pre>
2116      * Output only. Port to which clients can connect to initiate SSH sessions
2117      * with the environment.
2118      * </pre>
2119      *
2120      * <code>int32 ssh_port = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
2121      *
2122      * @param value The sshPort to set.
2123      * @return This builder for chaining.
2124      */
setSshPort(int value)2125     public Builder setSshPort(int value) {
2126 
2127       sshPort_ = value;
2128       bitField0_ |= 0x00000080;
2129       onChanged();
2130       return this;
2131     }
2132     /**
2133      *
2134      *
2135      * <pre>
2136      * Output only. Port to which clients can connect to initiate SSH sessions
2137      * with the environment.
2138      * </pre>
2139      *
2140      * <code>int32 ssh_port = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
2141      *
2142      * @return This builder for chaining.
2143      */
clearSshPort()2144     public Builder clearSshPort() {
2145       bitField0_ = (bitField0_ & ~0x00000080);
2146       sshPort_ = 0;
2147       onChanged();
2148       return this;
2149     }
2150 
2151     private com.google.protobuf.LazyStringList publicKeys_ =
2152         com.google.protobuf.LazyStringArrayList.EMPTY;
2153 
ensurePublicKeysIsMutable()2154     private void ensurePublicKeysIsMutable() {
2155       if (!((bitField0_ & 0x00000100) != 0)) {
2156         publicKeys_ = new com.google.protobuf.LazyStringArrayList(publicKeys_);
2157         bitField0_ |= 0x00000100;
2158       }
2159     }
2160     /**
2161      *
2162      *
2163      * <pre>
2164      * Output only. Public keys associated with the environment. Clients can
2165      * connect to this environment via SSH only if they possess a private key
2166      * corresponding to at least one of these public keys. Keys can be added to or
2167      * removed from the environment using the AddPublicKey and RemovePublicKey
2168      * methods.
2169      * </pre>
2170      *
2171      * <code>repeated string public_keys = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
2172      *
2173      * @return A list containing the publicKeys.
2174      */
getPublicKeysList()2175     public com.google.protobuf.ProtocolStringList getPublicKeysList() {
2176       return publicKeys_.getUnmodifiableView();
2177     }
2178     /**
2179      *
2180      *
2181      * <pre>
2182      * Output only. Public keys associated with the environment. Clients can
2183      * connect to this environment via SSH only if they possess a private key
2184      * corresponding to at least one of these public keys. Keys can be added to or
2185      * removed from the environment using the AddPublicKey and RemovePublicKey
2186      * methods.
2187      * </pre>
2188      *
2189      * <code>repeated string public_keys = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
2190      *
2191      * @return The count of publicKeys.
2192      */
getPublicKeysCount()2193     public int getPublicKeysCount() {
2194       return publicKeys_.size();
2195     }
2196     /**
2197      *
2198      *
2199      * <pre>
2200      * Output only. Public keys associated with the environment. Clients can
2201      * connect to this environment via SSH only if they possess a private key
2202      * corresponding to at least one of these public keys. Keys can be added to or
2203      * removed from the environment using the AddPublicKey and RemovePublicKey
2204      * methods.
2205      * </pre>
2206      *
2207      * <code>repeated string public_keys = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
2208      *
2209      * @param index The index of the element to return.
2210      * @return The publicKeys at the given index.
2211      */
getPublicKeys(int index)2212     public java.lang.String getPublicKeys(int index) {
2213       return publicKeys_.get(index);
2214     }
2215     /**
2216      *
2217      *
2218      * <pre>
2219      * Output only. Public keys associated with the environment. Clients can
2220      * connect to this environment via SSH only if they possess a private key
2221      * corresponding to at least one of these public keys. Keys can be added to or
2222      * removed from the environment using the AddPublicKey and RemovePublicKey
2223      * methods.
2224      * </pre>
2225      *
2226      * <code>repeated string public_keys = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
2227      *
2228      * @param index The index of the value to return.
2229      * @return The bytes of the publicKeys at the given index.
2230      */
getPublicKeysBytes(int index)2231     public com.google.protobuf.ByteString getPublicKeysBytes(int index) {
2232       return publicKeys_.getByteString(index);
2233     }
2234     /**
2235      *
2236      *
2237      * <pre>
2238      * Output only. Public keys associated with the environment. Clients can
2239      * connect to this environment via SSH only if they possess a private key
2240      * corresponding to at least one of these public keys. Keys can be added to or
2241      * removed from the environment using the AddPublicKey and RemovePublicKey
2242      * methods.
2243      * </pre>
2244      *
2245      * <code>repeated string public_keys = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
2246      *
2247      * @param index The index to set the value at.
2248      * @param value The publicKeys to set.
2249      * @return This builder for chaining.
2250      */
setPublicKeys(int index, java.lang.String value)2251     public Builder setPublicKeys(int index, java.lang.String value) {
2252       if (value == null) {
2253         throw new NullPointerException();
2254       }
2255       ensurePublicKeysIsMutable();
2256       publicKeys_.set(index, value);
2257       onChanged();
2258       return this;
2259     }
2260     /**
2261      *
2262      *
2263      * <pre>
2264      * Output only. Public keys associated with the environment. Clients can
2265      * connect to this environment via SSH only if they possess a private key
2266      * corresponding to at least one of these public keys. Keys can be added to or
2267      * removed from the environment using the AddPublicKey and RemovePublicKey
2268      * methods.
2269      * </pre>
2270      *
2271      * <code>repeated string public_keys = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
2272      *
2273      * @param value The publicKeys to add.
2274      * @return This builder for chaining.
2275      */
addPublicKeys(java.lang.String value)2276     public Builder addPublicKeys(java.lang.String value) {
2277       if (value == null) {
2278         throw new NullPointerException();
2279       }
2280       ensurePublicKeysIsMutable();
2281       publicKeys_.add(value);
2282       onChanged();
2283       return this;
2284     }
2285     /**
2286      *
2287      *
2288      * <pre>
2289      * Output only. Public keys associated with the environment. Clients can
2290      * connect to this environment via SSH only if they possess a private key
2291      * corresponding to at least one of these public keys. Keys can be added to or
2292      * removed from the environment using the AddPublicKey and RemovePublicKey
2293      * methods.
2294      * </pre>
2295      *
2296      * <code>repeated string public_keys = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
2297      *
2298      * @param values The publicKeys to add.
2299      * @return This builder for chaining.
2300      */
addAllPublicKeys(java.lang.Iterable<java.lang.String> values)2301     public Builder addAllPublicKeys(java.lang.Iterable<java.lang.String> values) {
2302       ensurePublicKeysIsMutable();
2303       com.google.protobuf.AbstractMessageLite.Builder.addAll(values, publicKeys_);
2304       onChanged();
2305       return this;
2306     }
2307     /**
2308      *
2309      *
2310      * <pre>
2311      * Output only. Public keys associated with the environment. Clients can
2312      * connect to this environment via SSH only if they possess a private key
2313      * corresponding to at least one of these public keys. Keys can be added to or
2314      * removed from the environment using the AddPublicKey and RemovePublicKey
2315      * methods.
2316      * </pre>
2317      *
2318      * <code>repeated string public_keys = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
2319      *
2320      * @return This builder for chaining.
2321      */
clearPublicKeys()2322     public Builder clearPublicKeys() {
2323       publicKeys_ = com.google.protobuf.LazyStringArrayList.EMPTY;
2324       bitField0_ = (bitField0_ & ~0x00000100);
2325       onChanged();
2326       return this;
2327     }
2328     /**
2329      *
2330      *
2331      * <pre>
2332      * Output only. Public keys associated with the environment. Clients can
2333      * connect to this environment via SSH only if they possess a private key
2334      * corresponding to at least one of these public keys. Keys can be added to or
2335      * removed from the environment using the AddPublicKey and RemovePublicKey
2336      * methods.
2337      * </pre>
2338      *
2339      * <code>repeated string public_keys = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
2340      *
2341      * @param value The bytes of the publicKeys to add.
2342      * @return This builder for chaining.
2343      */
addPublicKeysBytes(com.google.protobuf.ByteString value)2344     public Builder addPublicKeysBytes(com.google.protobuf.ByteString value) {
2345       if (value == null) {
2346         throw new NullPointerException();
2347       }
2348       checkByteStringIsUtf8(value);
2349       ensurePublicKeysIsMutable();
2350       publicKeys_.add(value);
2351       onChanged();
2352       return this;
2353     }
2354 
2355     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)2356     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
2357       return super.setUnknownFields(unknownFields);
2358     }
2359 
2360     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)2361     public final Builder mergeUnknownFields(
2362         final com.google.protobuf.UnknownFieldSet unknownFields) {
2363       return super.mergeUnknownFields(unknownFields);
2364     }
2365 
2366     // @@protoc_insertion_point(builder_scope:google.cloud.shell.v1.Environment)
2367   }
2368 
2369   // @@protoc_insertion_point(class_scope:google.cloud.shell.v1.Environment)
2370   private static final com.google.cloud.shell.v1.Environment DEFAULT_INSTANCE;
2371 
2372   static {
2373     DEFAULT_INSTANCE = new com.google.cloud.shell.v1.Environment();
2374   }
2375 
getDefaultInstance()2376   public static com.google.cloud.shell.v1.Environment getDefaultInstance() {
2377     return DEFAULT_INSTANCE;
2378   }
2379 
2380   private static final com.google.protobuf.Parser<Environment> PARSER =
2381       new com.google.protobuf.AbstractParser<Environment>() {
2382         @java.lang.Override
2383         public Environment parsePartialFrom(
2384             com.google.protobuf.CodedInputStream input,
2385             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2386             throws com.google.protobuf.InvalidProtocolBufferException {
2387           Builder builder = newBuilder();
2388           try {
2389             builder.mergeFrom(input, extensionRegistry);
2390           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
2391             throw e.setUnfinishedMessage(builder.buildPartial());
2392           } catch (com.google.protobuf.UninitializedMessageException e) {
2393             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
2394           } catch (java.io.IOException e) {
2395             throw new com.google.protobuf.InvalidProtocolBufferException(e)
2396                 .setUnfinishedMessage(builder.buildPartial());
2397           }
2398           return builder.buildPartial();
2399         }
2400       };
2401 
parser()2402   public static com.google.protobuf.Parser<Environment> parser() {
2403     return PARSER;
2404   }
2405 
2406   @java.lang.Override
getParserForType()2407   public com.google.protobuf.Parser<Environment> getParserForType() {
2408     return PARSER;
2409   }
2410 
2411   @java.lang.Override
getDefaultInstanceForType()2412   public com.google.cloud.shell.v1.Environment getDefaultInstanceForType() {
2413     return DEFAULT_INSTANCE;
2414   }
2415 }
2416