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