1// Copyright 2020 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15// Code generated by protoc-gen-go. DO NOT EDIT.
16// versions:
17// 	protoc-gen-go v1.26.0
18// 	protoc        v3.12.2
19// source: google/cloud/automl/v1/text_sentiment.proto
20
21package automl
22
23import (
24	reflect "reflect"
25	sync "sync"
26
27	_ "google.golang.org/genproto/googleapis/api/annotations"
28	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
29	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
30)
31
32const (
33	// Verify that this generated code is sufficiently up-to-date.
34	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
35	// Verify that runtime/protoimpl is sufficiently up-to-date.
36	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
37)
38
39// Contains annotation details specific to text sentiment.
40type TextSentimentAnnotation struct {
41	state         protoimpl.MessageState
42	sizeCache     protoimpl.SizeCache
43	unknownFields protoimpl.UnknownFields
44
45	// Output only. The sentiment with the semantic, as given to the
46	// [AutoMl.ImportData][google.cloud.automl.v1.AutoMl.ImportData] when populating the dataset from which the model used
47	// for the prediction had been trained.
48	// The sentiment values are between 0 and
49	// Dataset.text_sentiment_dataset_metadata.sentiment_max (inclusive),
50	// with higher value meaning more positive sentiment. They are completely
51	// relative, i.e. 0 means least positive sentiment and sentiment_max means
52	// the most positive from the sentiments present in the train data. Therefore
53	//  e.g. if train data had only negative sentiment, then sentiment_max, would
54	// be still negative (although least negative).
55	// The sentiment shouldn't be confused with "score" or "magnitude"
56	// from the previous Natural Language Sentiment Analysis API.
57	Sentiment int32 `protobuf:"varint,1,opt,name=sentiment,proto3" json:"sentiment,omitempty"`
58}
59
60func (x *TextSentimentAnnotation) Reset() {
61	*x = TextSentimentAnnotation{}
62	if protoimpl.UnsafeEnabled {
63		mi := &file_google_cloud_automl_v1_text_sentiment_proto_msgTypes[0]
64		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
65		ms.StoreMessageInfo(mi)
66	}
67}
68
69func (x *TextSentimentAnnotation) String() string {
70	return protoimpl.X.MessageStringOf(x)
71}
72
73func (*TextSentimentAnnotation) ProtoMessage() {}
74
75func (x *TextSentimentAnnotation) ProtoReflect() protoreflect.Message {
76	mi := &file_google_cloud_automl_v1_text_sentiment_proto_msgTypes[0]
77	if protoimpl.UnsafeEnabled && x != nil {
78		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
79		if ms.LoadMessageInfo() == nil {
80			ms.StoreMessageInfo(mi)
81		}
82		return ms
83	}
84	return mi.MessageOf(x)
85}
86
87// Deprecated: Use TextSentimentAnnotation.ProtoReflect.Descriptor instead.
88func (*TextSentimentAnnotation) Descriptor() ([]byte, []int) {
89	return file_google_cloud_automl_v1_text_sentiment_proto_rawDescGZIP(), []int{0}
90}
91
92func (x *TextSentimentAnnotation) GetSentiment() int32 {
93	if x != nil {
94		return x.Sentiment
95	}
96	return 0
97}
98
99// Model evaluation metrics for text sentiment problems.
100type TextSentimentEvaluationMetrics struct {
101	state         protoimpl.MessageState
102	sizeCache     protoimpl.SizeCache
103	unknownFields protoimpl.UnknownFields
104
105	// Output only. Precision.
106	Precision float32 `protobuf:"fixed32,1,opt,name=precision,proto3" json:"precision,omitempty"`
107	// Output only. Recall.
108	Recall float32 `protobuf:"fixed32,2,opt,name=recall,proto3" json:"recall,omitempty"`
109	// Output only. The harmonic mean of recall and precision.
110	F1Score float32 `protobuf:"fixed32,3,opt,name=f1_score,json=f1Score,proto3" json:"f1_score,omitempty"`
111	// Output only. Mean absolute error. Only set for the overall model
112	// evaluation, not for evaluation of a single annotation spec.
113	MeanAbsoluteError float32 `protobuf:"fixed32,4,opt,name=mean_absolute_error,json=meanAbsoluteError,proto3" json:"mean_absolute_error,omitempty"`
114	// Output only. Mean squared error. Only set for the overall model
115	// evaluation, not for evaluation of a single annotation spec.
116	MeanSquaredError float32 `protobuf:"fixed32,5,opt,name=mean_squared_error,json=meanSquaredError,proto3" json:"mean_squared_error,omitempty"`
117	// Output only. Linear weighted kappa. Only set for the overall model
118	// evaluation, not for evaluation of a single annotation spec.
119	LinearKappa float32 `protobuf:"fixed32,6,opt,name=linear_kappa,json=linearKappa,proto3" json:"linear_kappa,omitempty"`
120	// Output only. Quadratic weighted kappa. Only set for the overall model
121	// evaluation, not for evaluation of a single annotation spec.
122	QuadraticKappa float32 `protobuf:"fixed32,7,opt,name=quadratic_kappa,json=quadraticKappa,proto3" json:"quadratic_kappa,omitempty"`
123	// Output only. Confusion matrix of the evaluation.
124	// Only set for the overall model evaluation, not for evaluation of a single
125	// annotation spec.
126	ConfusionMatrix *ClassificationEvaluationMetrics_ConfusionMatrix `protobuf:"bytes,8,opt,name=confusion_matrix,json=confusionMatrix,proto3" json:"confusion_matrix,omitempty"`
127}
128
129func (x *TextSentimentEvaluationMetrics) Reset() {
130	*x = TextSentimentEvaluationMetrics{}
131	if protoimpl.UnsafeEnabled {
132		mi := &file_google_cloud_automl_v1_text_sentiment_proto_msgTypes[1]
133		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
134		ms.StoreMessageInfo(mi)
135	}
136}
137
138func (x *TextSentimentEvaluationMetrics) String() string {
139	return protoimpl.X.MessageStringOf(x)
140}
141
142func (*TextSentimentEvaluationMetrics) ProtoMessage() {}
143
144func (x *TextSentimentEvaluationMetrics) ProtoReflect() protoreflect.Message {
145	mi := &file_google_cloud_automl_v1_text_sentiment_proto_msgTypes[1]
146	if protoimpl.UnsafeEnabled && x != nil {
147		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
148		if ms.LoadMessageInfo() == nil {
149			ms.StoreMessageInfo(mi)
150		}
151		return ms
152	}
153	return mi.MessageOf(x)
154}
155
156// Deprecated: Use TextSentimentEvaluationMetrics.ProtoReflect.Descriptor instead.
157func (*TextSentimentEvaluationMetrics) Descriptor() ([]byte, []int) {
158	return file_google_cloud_automl_v1_text_sentiment_proto_rawDescGZIP(), []int{1}
159}
160
161func (x *TextSentimentEvaluationMetrics) GetPrecision() float32 {
162	if x != nil {
163		return x.Precision
164	}
165	return 0
166}
167
168func (x *TextSentimentEvaluationMetrics) GetRecall() float32 {
169	if x != nil {
170		return x.Recall
171	}
172	return 0
173}
174
175func (x *TextSentimentEvaluationMetrics) GetF1Score() float32 {
176	if x != nil {
177		return x.F1Score
178	}
179	return 0
180}
181
182func (x *TextSentimentEvaluationMetrics) GetMeanAbsoluteError() float32 {
183	if x != nil {
184		return x.MeanAbsoluteError
185	}
186	return 0
187}
188
189func (x *TextSentimentEvaluationMetrics) GetMeanSquaredError() float32 {
190	if x != nil {
191		return x.MeanSquaredError
192	}
193	return 0
194}
195
196func (x *TextSentimentEvaluationMetrics) GetLinearKappa() float32 {
197	if x != nil {
198		return x.LinearKappa
199	}
200	return 0
201}
202
203func (x *TextSentimentEvaluationMetrics) GetQuadraticKappa() float32 {
204	if x != nil {
205		return x.QuadraticKappa
206	}
207	return 0
208}
209
210func (x *TextSentimentEvaluationMetrics) GetConfusionMatrix() *ClassificationEvaluationMetrics_ConfusionMatrix {
211	if x != nil {
212		return x.ConfusionMatrix
213	}
214	return nil
215}
216
217var File_google_cloud_automl_v1_text_sentiment_proto protoreflect.FileDescriptor
218
219var file_google_cloud_automl_v1_text_sentiment_proto_rawDesc = []byte{
220	0x0a, 0x2b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61,
221	0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x65,
222	0x6e, 0x74, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x67,
223	0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f,
224	0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x1a, 0x2b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c,
225	0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6c,
226	0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f,
227	0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61,
228	0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
229	0x22, 0x37, 0x0a, 0x17, 0x54, 0x65, 0x78, 0x74, 0x53, 0x65, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x6e,
230	0x74, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x73,
231	0x65, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09,
232	0x73, 0x65, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x8f, 0x03, 0x0a, 0x1e, 0x54, 0x65,
233	0x78, 0x74, 0x53, 0x65, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x45, 0x76, 0x61, 0x6c, 0x75,
234	0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x1c, 0x0a, 0x09,
235	0x70, 0x72, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x02, 0x52,
236	0x09, 0x70, 0x72, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65,
237	0x63, 0x61, 0x6c, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, 0x06, 0x72, 0x65, 0x63, 0x61,
238	0x6c, 0x6c, 0x12, 0x19, 0x0a, 0x08, 0x66, 0x31, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x03,
239	0x20, 0x01, 0x28, 0x02, 0x52, 0x07, 0x66, 0x31, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x2e, 0x0a,
240	0x13, 0x6d, 0x65, 0x61, 0x6e, 0x5f, 0x61, 0x62, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x65, 0x5f, 0x65,
241	0x72, 0x72, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x02, 0x52, 0x11, 0x6d, 0x65, 0x61, 0x6e,
242	0x41, 0x62, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x2c, 0x0a,
243	0x12, 0x6d, 0x65, 0x61, 0x6e, 0x5f, 0x73, 0x71, 0x75, 0x61, 0x72, 0x65, 0x64, 0x5f, 0x65, 0x72,
244	0x72, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x02, 0x52, 0x10, 0x6d, 0x65, 0x61, 0x6e, 0x53,
245	0x71, 0x75, 0x61, 0x72, 0x65, 0x64, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x6c,
246	0x69, 0x6e, 0x65, 0x61, 0x72, 0x5f, 0x6b, 0x61, 0x70, 0x70, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28,
247	0x02, 0x52, 0x0b, 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x72, 0x4b, 0x61, 0x70, 0x70, 0x61, 0x12, 0x27,
248	0x0a, 0x0f, 0x71, 0x75, 0x61, 0x64, 0x72, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x6b, 0x61, 0x70, 0x70,
249	0x61, 0x18, 0x07, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0e, 0x71, 0x75, 0x61, 0x64, 0x72, 0x61, 0x74,
250	0x69, 0x63, 0x4b, 0x61, 0x70, 0x70, 0x61, 0x12, 0x72, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x66, 0x75,
251	0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28,
252	0x0b, 0x32, 0x47, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64,
253	0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6c, 0x61, 0x73, 0x73,
254	0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74,
255	0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x75,
256	0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x66,
257	0x75, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x42, 0xbe, 0x01, 0x0a, 0x1a,
258	0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64,
259	0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x42, 0x12, 0x54, 0x65, 0x78, 0x74,
260	0x53, 0x65, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01,
261	0x5a, 0x3c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e,
262	0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f,
263	0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75,
264	0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0xaa, 0x02,
265	0x16, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x41, 0x75,
266	0x74, 0x6f, 0x4d, 0x4c, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x16, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
267	0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x41, 0x75, 0x74, 0x6f, 0x4d, 0x6c, 0x5c, 0x56, 0x31,
268	0xea, 0x02, 0x19, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64,
269	0x3a, 0x3a, 0x41, 0x75, 0x74, 0x6f, 0x4d, 0x4c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72,
270	0x6f, 0x74, 0x6f, 0x33,
271}
272
273var (
274	file_google_cloud_automl_v1_text_sentiment_proto_rawDescOnce sync.Once
275	file_google_cloud_automl_v1_text_sentiment_proto_rawDescData = file_google_cloud_automl_v1_text_sentiment_proto_rawDesc
276)
277
278func file_google_cloud_automl_v1_text_sentiment_proto_rawDescGZIP() []byte {
279	file_google_cloud_automl_v1_text_sentiment_proto_rawDescOnce.Do(func() {
280		file_google_cloud_automl_v1_text_sentiment_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_automl_v1_text_sentiment_proto_rawDescData)
281	})
282	return file_google_cloud_automl_v1_text_sentiment_proto_rawDescData
283}
284
285var file_google_cloud_automl_v1_text_sentiment_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
286var file_google_cloud_automl_v1_text_sentiment_proto_goTypes = []interface{}{
287	(*TextSentimentAnnotation)(nil),                         // 0: google.cloud.automl.v1.TextSentimentAnnotation
288	(*TextSentimentEvaluationMetrics)(nil),                  // 1: google.cloud.automl.v1.TextSentimentEvaluationMetrics
289	(*ClassificationEvaluationMetrics_ConfusionMatrix)(nil), // 2: google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix
290}
291var file_google_cloud_automl_v1_text_sentiment_proto_depIdxs = []int32{
292	2, // 0: google.cloud.automl.v1.TextSentimentEvaluationMetrics.confusion_matrix:type_name -> google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix
293	1, // [1:1] is the sub-list for method output_type
294	1, // [1:1] is the sub-list for method input_type
295	1, // [1:1] is the sub-list for extension type_name
296	1, // [1:1] is the sub-list for extension extendee
297	0, // [0:1] is the sub-list for field type_name
298}
299
300func init() { file_google_cloud_automl_v1_text_sentiment_proto_init() }
301func file_google_cloud_automl_v1_text_sentiment_proto_init() {
302	if File_google_cloud_automl_v1_text_sentiment_proto != nil {
303		return
304	}
305	file_google_cloud_automl_v1_classification_proto_init()
306	if !protoimpl.UnsafeEnabled {
307		file_google_cloud_automl_v1_text_sentiment_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
308			switch v := v.(*TextSentimentAnnotation); i {
309			case 0:
310				return &v.state
311			case 1:
312				return &v.sizeCache
313			case 2:
314				return &v.unknownFields
315			default:
316				return nil
317			}
318		}
319		file_google_cloud_automl_v1_text_sentiment_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
320			switch v := v.(*TextSentimentEvaluationMetrics); i {
321			case 0:
322				return &v.state
323			case 1:
324				return &v.sizeCache
325			case 2:
326				return &v.unknownFields
327			default:
328				return nil
329			}
330		}
331	}
332	type x struct{}
333	out := protoimpl.TypeBuilder{
334		File: protoimpl.DescBuilder{
335			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
336			RawDescriptor: file_google_cloud_automl_v1_text_sentiment_proto_rawDesc,
337			NumEnums:      0,
338			NumMessages:   2,
339			NumExtensions: 0,
340			NumServices:   0,
341		},
342		GoTypes:           file_google_cloud_automl_v1_text_sentiment_proto_goTypes,
343		DependencyIndexes: file_google_cloud_automl_v1_text_sentiment_proto_depIdxs,
344		MessageInfos:      file_google_cloud_automl_v1_text_sentiment_proto_msgTypes,
345	}.Build()
346	File_google_cloud_automl_v1_text_sentiment_proto = out.File
347	file_google_cloud_automl_v1_text_sentiment_proto_rawDesc = nil
348	file_google_cloud_automl_v1_text_sentiment_proto_goTypes = nil
349	file_google_cloud_automl_v1_text_sentiment_proto_depIdxs = nil
350}
351