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/prediction_service.proto 18 19 package com.google.cloud.automl.v1; 20 21 public interface PredictResponseOrBuilder 22 extends 23 // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1.PredictResponse) 24 com.google.protobuf.MessageOrBuilder { 25 26 /** 27 * 28 * 29 * <pre> 30 * Prediction result. 31 * AutoML Translation and AutoML Natural Language Sentiment Analysis 32 * return precisely one payload. 33 * </pre> 34 * 35 * <code>repeated .google.cloud.automl.v1.AnnotationPayload payload = 1;</code> 36 */ getPayloadList()37 java.util.List<com.google.cloud.automl.v1.AnnotationPayload> getPayloadList(); 38 /** 39 * 40 * 41 * <pre> 42 * Prediction result. 43 * AutoML Translation and AutoML Natural Language Sentiment Analysis 44 * return precisely one payload. 45 * </pre> 46 * 47 * <code>repeated .google.cloud.automl.v1.AnnotationPayload payload = 1;</code> 48 */ getPayload(int index)49 com.google.cloud.automl.v1.AnnotationPayload getPayload(int index); 50 /** 51 * 52 * 53 * <pre> 54 * Prediction result. 55 * AutoML Translation and AutoML Natural Language Sentiment Analysis 56 * return precisely one payload. 57 * </pre> 58 * 59 * <code>repeated .google.cloud.automl.v1.AnnotationPayload payload = 1;</code> 60 */ getPayloadCount()61 int getPayloadCount(); 62 /** 63 * 64 * 65 * <pre> 66 * Prediction result. 67 * AutoML Translation and AutoML Natural Language Sentiment Analysis 68 * return precisely one payload. 69 * </pre> 70 * 71 * <code>repeated .google.cloud.automl.v1.AnnotationPayload payload = 1;</code> 72 */ 73 java.util.List<? extends com.google.cloud.automl.v1.AnnotationPayloadOrBuilder> getPayloadOrBuilderList()74 getPayloadOrBuilderList(); 75 /** 76 * 77 * 78 * <pre> 79 * Prediction result. 80 * AutoML Translation and AutoML Natural Language Sentiment Analysis 81 * return precisely one payload. 82 * </pre> 83 * 84 * <code>repeated .google.cloud.automl.v1.AnnotationPayload payload = 1;</code> 85 */ getPayloadOrBuilder(int index)86 com.google.cloud.automl.v1.AnnotationPayloadOrBuilder getPayloadOrBuilder(int index); 87 88 /** 89 * 90 * 91 * <pre> 92 * The preprocessed example that AutoML actually makes prediction on. 93 * Empty if AutoML does not preprocess the input example. 94 * For AutoML Natural Language (Classification, Entity Extraction, and 95 * Sentiment Analysis), if the input is a document, the recognized text is 96 * returned in the 97 * [document_text][google.cloud.automl.v1.Document.document_text] 98 * property. 99 * </pre> 100 * 101 * <code>.google.cloud.automl.v1.ExamplePayload preprocessed_input = 3;</code> 102 * 103 * @return Whether the preprocessedInput field is set. 104 */ hasPreprocessedInput()105 boolean hasPreprocessedInput(); 106 /** 107 * 108 * 109 * <pre> 110 * The preprocessed example that AutoML actually makes prediction on. 111 * Empty if AutoML does not preprocess the input example. 112 * For AutoML Natural Language (Classification, Entity Extraction, and 113 * Sentiment Analysis), if the input is a document, the recognized text is 114 * returned in the 115 * [document_text][google.cloud.automl.v1.Document.document_text] 116 * property. 117 * </pre> 118 * 119 * <code>.google.cloud.automl.v1.ExamplePayload preprocessed_input = 3;</code> 120 * 121 * @return The preprocessedInput. 122 */ getPreprocessedInput()123 com.google.cloud.automl.v1.ExamplePayload getPreprocessedInput(); 124 /** 125 * 126 * 127 * <pre> 128 * The preprocessed example that AutoML actually makes prediction on. 129 * Empty if AutoML does not preprocess the input example. 130 * For AutoML Natural Language (Classification, Entity Extraction, and 131 * Sentiment Analysis), if the input is a document, the recognized text is 132 * returned in the 133 * [document_text][google.cloud.automl.v1.Document.document_text] 134 * property. 135 * </pre> 136 * 137 * <code>.google.cloud.automl.v1.ExamplePayload preprocessed_input = 3;</code> 138 */ getPreprocessedInputOrBuilder()139 com.google.cloud.automl.v1.ExamplePayloadOrBuilder getPreprocessedInputOrBuilder(); 140 141 /** 142 * 143 * 144 * <pre> 145 * Additional domain-specific prediction response metadata. 146 * AutoML Vision Object Detection 147 * `max_bounding_box_count` 148 * : (int64) The maximum number of bounding boxes to return per image. 149 * AutoML Natural Language Sentiment Analysis 150 * `sentiment_score` 151 * : (float, deprecated) A value between -1 and 1, 152 * -1 maps to least positive sentiment, while 1 maps to the most positive 153 * one and the higher the score, the more positive the sentiment in the 154 * document is. Yet these values are relative to the training data, so 155 * e.g. if all data was positive then -1 is also positive (though 156 * the least). 157 * `sentiment_score` is not the same as "score" and "magnitude" 158 * from Sentiment Analysis in the Natural Language API. 159 * </pre> 160 * 161 * <code>map<string, string> metadata = 2;</code> 162 */ getMetadataCount()163 int getMetadataCount(); 164 /** 165 * 166 * 167 * <pre> 168 * Additional domain-specific prediction response metadata. 169 * AutoML Vision Object Detection 170 * `max_bounding_box_count` 171 * : (int64) The maximum number of bounding boxes to return per image. 172 * AutoML Natural Language Sentiment Analysis 173 * `sentiment_score` 174 * : (float, deprecated) A value between -1 and 1, 175 * -1 maps to least positive sentiment, while 1 maps to the most positive 176 * one and the higher the score, the more positive the sentiment in the 177 * document is. Yet these values are relative to the training data, so 178 * e.g. if all data was positive then -1 is also positive (though 179 * the least). 180 * `sentiment_score` is not the same as "score" and "magnitude" 181 * from Sentiment Analysis in the Natural Language API. 182 * </pre> 183 * 184 * <code>map<string, string> metadata = 2;</code> 185 */ containsMetadata(java.lang.String key)186 boolean containsMetadata(java.lang.String key); 187 /** Use {@link #getMetadataMap()} instead. */ 188 @java.lang.Deprecated getMetadata()189 java.util.Map<java.lang.String, java.lang.String> getMetadata(); 190 /** 191 * 192 * 193 * <pre> 194 * Additional domain-specific prediction response metadata. 195 * AutoML Vision Object Detection 196 * `max_bounding_box_count` 197 * : (int64) The maximum number of bounding boxes to return per image. 198 * AutoML Natural Language Sentiment Analysis 199 * `sentiment_score` 200 * : (float, deprecated) A value between -1 and 1, 201 * -1 maps to least positive sentiment, while 1 maps to the most positive 202 * one and the higher the score, the more positive the sentiment in the 203 * document is. Yet these values are relative to the training data, so 204 * e.g. if all data was positive then -1 is also positive (though 205 * the least). 206 * `sentiment_score` is not the same as "score" and "magnitude" 207 * from Sentiment Analysis in the Natural Language API. 208 * </pre> 209 * 210 * <code>map<string, string> metadata = 2;</code> 211 */ getMetadataMap()212 java.util.Map<java.lang.String, java.lang.String> getMetadataMap(); 213 /** 214 * 215 * 216 * <pre> 217 * Additional domain-specific prediction response metadata. 218 * AutoML Vision Object Detection 219 * `max_bounding_box_count` 220 * : (int64) The maximum number of bounding boxes to return per image. 221 * AutoML Natural Language Sentiment Analysis 222 * `sentiment_score` 223 * : (float, deprecated) A value between -1 and 1, 224 * -1 maps to least positive sentiment, while 1 maps to the most positive 225 * one and the higher the score, the more positive the sentiment in the 226 * document is. Yet these values are relative to the training data, so 227 * e.g. if all data was positive then -1 is also positive (though 228 * the least). 229 * `sentiment_score` is not the same as "score" and "magnitude" 230 * from Sentiment Analysis in the Natural Language API. 231 * </pre> 232 * 233 * <code>map<string, string> metadata = 2;</code> 234 */ 235 /* nullable */ getMetadataOrDefault( java.lang.String key, java.lang.String defaultValue)236 java.lang.String getMetadataOrDefault( 237 java.lang.String key, 238 /* nullable */ 239 java.lang.String defaultValue); 240 /** 241 * 242 * 243 * <pre> 244 * Additional domain-specific prediction response metadata. 245 * AutoML Vision Object Detection 246 * `max_bounding_box_count` 247 * : (int64) The maximum number of bounding boxes to return per image. 248 * AutoML Natural Language Sentiment Analysis 249 * `sentiment_score` 250 * : (float, deprecated) A value between -1 and 1, 251 * -1 maps to least positive sentiment, while 1 maps to the most positive 252 * one and the higher the score, the more positive the sentiment in the 253 * document is. Yet these values are relative to the training data, so 254 * e.g. if all data was positive then -1 is also positive (though 255 * the least). 256 * `sentiment_score` is not the same as "score" and "magnitude" 257 * from Sentiment Analysis in the Natural Language API. 258 * </pre> 259 * 260 * <code>map<string, string> metadata = 2;</code> 261 */ getMetadataOrThrow(java.lang.String key)262 java.lang.String getMetadataOrThrow(java.lang.String key); 263 } 264