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