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