• 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/dialogflow/cx/v3/intent.proto
18 
19 package com.google.cloud.dialogflow.cx.v3;
20 
21 /**
22  *
23  *
24  * <pre>
25  * Represents the options for views of an intent.
26  * An intent can be a sizable object. Therefore, we provide a resource view that
27  * does not return training phrases in the response.
28  * </pre>
29  *
30  * Protobuf enum {@code google.cloud.dialogflow.cx.v3.IntentView}
31  */
32 public enum IntentView implements com.google.protobuf.ProtocolMessageEnum {
33   /**
34    *
35    *
36    * <pre>
37    * Not specified. Treated as INTENT_VIEW_FULL.
38    * </pre>
39    *
40    * <code>INTENT_VIEW_UNSPECIFIED = 0;</code>
41    */
42   INTENT_VIEW_UNSPECIFIED(0),
43   /**
44    *
45    *
46    * <pre>
47    * Training phrases field is not populated in the response.
48    * </pre>
49    *
50    * <code>INTENT_VIEW_PARTIAL = 1;</code>
51    */
52   INTENT_VIEW_PARTIAL(1),
53   /**
54    *
55    *
56    * <pre>
57    * All fields are populated.
58    * </pre>
59    *
60    * <code>INTENT_VIEW_FULL = 2;</code>
61    */
62   INTENT_VIEW_FULL(2),
63   UNRECOGNIZED(-1),
64   ;
65 
66   /**
67    *
68    *
69    * <pre>
70    * Not specified. Treated as INTENT_VIEW_FULL.
71    * </pre>
72    *
73    * <code>INTENT_VIEW_UNSPECIFIED = 0;</code>
74    */
75   public static final int INTENT_VIEW_UNSPECIFIED_VALUE = 0;
76   /**
77    *
78    *
79    * <pre>
80    * Training phrases field is not populated in the response.
81    * </pre>
82    *
83    * <code>INTENT_VIEW_PARTIAL = 1;</code>
84    */
85   public static final int INTENT_VIEW_PARTIAL_VALUE = 1;
86   /**
87    *
88    *
89    * <pre>
90    * All fields are populated.
91    * </pre>
92    *
93    * <code>INTENT_VIEW_FULL = 2;</code>
94    */
95   public static final int INTENT_VIEW_FULL_VALUE = 2;
96 
getNumber()97   public final int getNumber() {
98     if (this == UNRECOGNIZED) {
99       throw new java.lang.IllegalArgumentException(
100           "Can't get the number of an unknown enum value.");
101     }
102     return value;
103   }
104 
105   /**
106    * @param value The numeric wire value of the corresponding enum entry.
107    * @return The enum associated with the given numeric wire value.
108    * @deprecated Use {@link #forNumber(int)} instead.
109    */
110   @java.lang.Deprecated
valueOf(int value)111   public static IntentView valueOf(int value) {
112     return forNumber(value);
113   }
114 
115   /**
116    * @param value The numeric wire value of the corresponding enum entry.
117    * @return The enum associated with the given numeric wire value.
118    */
forNumber(int value)119   public static IntentView forNumber(int value) {
120     switch (value) {
121       case 0:
122         return INTENT_VIEW_UNSPECIFIED;
123       case 1:
124         return INTENT_VIEW_PARTIAL;
125       case 2:
126         return INTENT_VIEW_FULL;
127       default:
128         return null;
129     }
130   }
131 
internalGetValueMap()132   public static com.google.protobuf.Internal.EnumLiteMap<IntentView> internalGetValueMap() {
133     return internalValueMap;
134   }
135 
136   private static final com.google.protobuf.Internal.EnumLiteMap<IntentView> internalValueMap =
137       new com.google.protobuf.Internal.EnumLiteMap<IntentView>() {
138         public IntentView findValueByNumber(int number) {
139           return IntentView.forNumber(number);
140         }
141       };
142 
getValueDescriptor()143   public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
144     if (this == UNRECOGNIZED) {
145       throw new java.lang.IllegalStateException(
146           "Can't get the descriptor of an unrecognized enum value.");
147     }
148     return getDescriptor().getValues().get(ordinal());
149   }
150 
getDescriptorForType()151   public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
152     return getDescriptor();
153   }
154 
getDescriptor()155   public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
156     return com.google.cloud.dialogflow.cx.v3.IntentProto.getDescriptor().getEnumTypes().get(0);
157   }
158 
159   private static final IntentView[] VALUES = values();
160 
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)161   public static IntentView valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
162     if (desc.getType() != getDescriptor()) {
163       throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
164     }
165     if (desc.getIndex() == -1) {
166       return UNRECOGNIZED;
167     }
168     return VALUES[desc.getIndex()];
169   }
170 
171   private final int value;
172 
IntentView(int value)173   private IntentView(int value) {
174     this.value = value;
175   }
176 
177   // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3.IntentView)
178 }
179