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