google-cloud-automl-v1beta1 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +169 -0
- data/LICENSE.md +203 -0
- data/README.md +71 -0
- data/lib/google-cloud-automl-v1beta1.rb +21 -0
- data/lib/google/cloud/automl/v1beta1.rb +36 -0
- data/lib/google/cloud/automl/v1beta1/annotation_payload_pb.rb +41 -0
- data/lib/google/cloud/automl/v1beta1/annotation_spec_pb.rb +26 -0
- data/lib/google/cloud/automl/v1beta1/automl.rb +63 -0
- data/lib/google/cloud/automl/v1beta1/automl/client.rb +2368 -0
- data/lib/google/cloud/automl/v1beta1/automl/credentials.rb +51 -0
- data/lib/google/cloud/automl/v1beta1/automl/operations.rb +564 -0
- data/lib/google/cloud/automl/v1beta1/automl/paths.rb +174 -0
- data/lib/google/cloud/automl/v1beta1/classification_pb.rb +73 -0
- data/lib/google/cloud/automl/v1beta1/column_spec_pb.rb +36 -0
- data/lib/google/cloud/automl/v1beta1/data_items_pb.rb +95 -0
- data/lib/google/cloud/automl/v1beta1/data_stats_pb.rb +84 -0
- data/lib/google/cloud/automl/v1beta1/data_types_pb.rb +43 -0
- data/lib/google/cloud/automl/v1beta1/dataset_pb.rb +46 -0
- data/lib/google/cloud/automl/v1beta1/detection_pb.rb +59 -0
- data/lib/google/cloud/automl/v1beta1/geometry_pb.rb +28 -0
- data/lib/google/cloud/automl/v1beta1/image_pb.rb +57 -0
- data/lib/google/cloud/automl/v1beta1/io_pb.rb +87 -0
- data/lib/google/cloud/automl/v1beta1/model_evaluation_pb.rb +45 -0
- data/lib/google/cloud/automl/v1beta1/model_pb.rb +52 -0
- data/lib/google/cloud/automl/v1beta1/operations_pb.rb +97 -0
- data/lib/google/cloud/automl/v1beta1/prediction_service.rb +53 -0
- data/lib/google/cloud/automl/v1beta1/prediction_service/client.rb +586 -0
- data/lib/google/cloud/automl/v1beta1/prediction_service/credentials.rb +51 -0
- data/lib/google/cloud/automl/v1beta1/prediction_service/operations.rb +564 -0
- data/lib/google/cloud/automl/v1beta1/prediction_service/paths.rb +52 -0
- data/lib/google/cloud/automl/v1beta1/prediction_service_pb.rb +50 -0
- data/lib/google/cloud/automl/v1beta1/prediction_service_services_pb.rb +79 -0
- data/lib/google/cloud/automl/v1beta1/ranges_pb.rb +24 -0
- data/lib/google/cloud/automl/v1beta1/regression_pb.rb +27 -0
- data/lib/google/cloud/automl/v1beta1/service_pb.rb +187 -0
- data/lib/google/cloud/automl/v1beta1/service_services_pb.rb +163 -0
- data/lib/google/cloud/automl/v1beta1/table_spec_pb.rb +31 -0
- data/lib/google/cloud/automl/v1beta1/tables_pb.rb +65 -0
- data/lib/google/cloud/automl/v1beta1/temporal_pb.rb +25 -0
- data/lib/google/cloud/automl/v1beta1/text_extraction_pb.rb +39 -0
- data/lib/google/cloud/automl/v1beta1/text_pb.rb +41 -0
- data/lib/google/cloud/automl/v1beta1/text_segment_pb.rb +25 -0
- data/lib/google/cloud/automl/v1beta1/text_sentiment_pb.rb +36 -0
- data/lib/google/cloud/automl/v1beta1/translation_pb.rb +41 -0
- data/lib/google/cloud/automl/v1beta1/version.rb +28 -0
- data/lib/google/cloud/automl/v1beta1/video_pb.rb +32 -0
- data/lib/google/cloud/common_resources_pb.rb +15 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/field_behavior.rb +59 -0
- data/proto_docs/google/api/resource.rb +247 -0
- data/proto_docs/google/cloud/automl/v1beta1/annotation_payload.rb +70 -0
- data/proto_docs/google/cloud/automl/v1beta1/annotation_spec.rb +46 -0
- data/proto_docs/google/cloud/automl/v1beta1/classification.rb +234 -0
- data/proto_docs/google/cloud/automl/v1beta1/column_spec.rb +77 -0
- data/proto_docs/google/cloud/automl/v1beta1/data_items.rb +227 -0
- data/proto_docs/google/cloud/automl/v1beta1/data_stats.rb +227 -0
- data/proto_docs/google/cloud/automl/v1beta1/data_types.rb +118 -0
- data/proto_docs/google/cloud/automl/v1beta1/dataset.rb +84 -0
- data/proto_docs/google/cloud/automl/v1beta1/detection.rb +152 -0
- data/proto_docs/google/cloud/automl/v1beta1/geometry.rb +53 -0
- data/proto_docs/google/cloud/automl/v1beta1/image.rb +205 -0
- data/proto_docs/google/cloud/automl/v1beta1/io.rb +1168 -0
- data/proto_docs/google/cloud/automl/v1beta1/model.rb +95 -0
- data/proto_docs/google/cloud/automl/v1beta1/model_evaluation.rb +103 -0
- data/proto_docs/google/cloud/automl/v1beta1/operations.rb +206 -0
- data/proto_docs/google/cloud/automl/v1beta1/prediction_service.rb +238 -0
- data/proto_docs/google/cloud/automl/v1beta1/ranges.rb +38 -0
- data/proto_docs/google/cloud/automl/v1beta1/regression.rb +48 -0
- data/proto_docs/google/cloud/automl/v1beta1/service.rb +447 -0
- data/proto_docs/google/cloud/automl/v1beta1/table_spec.rb +75 -0
- data/proto_docs/google/cloud/automl/v1beta1/tables.rb +300 -0
- data/proto_docs/google/cloud/automl/v1beta1/temporal.rb +40 -0
- data/proto_docs/google/cloud/automl/v1beta1/text.rb +76 -0
- data/proto_docs/google/cloud/automl/v1beta1/text_extraction.rb +73 -0
- data/proto_docs/google/cloud/automl/v1beta1/text_segment.rb +44 -0
- data/proto_docs/google/cloud/automl/v1beta1/text_sentiment.rb +86 -0
- data/proto_docs/google/cloud/automl/v1beta1/translation.rb +79 -0
- data/proto_docs/google/cloud/automl/v1beta1/video.rb +51 -0
- data/proto_docs/google/longrunning/operations.rb +150 -0
- data/proto_docs/google/protobuf/any.rb +138 -0
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/empty.rb +36 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/struct.rb +96 -0
- data/proto_docs/google/protobuf/timestamp.rb +120 -0
- data/proto_docs/google/rpc/status.rb +46 -0
- metadata +245 -0
@@ -0,0 +1,247 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Api
|
22
|
+
# A simple descriptor of a resource type.
|
23
|
+
#
|
24
|
+
# ResourceDescriptor annotates a resource message (either by means of a
|
25
|
+
# protobuf annotation or use in the service config), and associates the
|
26
|
+
# resource's schema, the resource type, and the pattern of the resource name.
|
27
|
+
#
|
28
|
+
# Example:
|
29
|
+
#
|
30
|
+
# message Topic {
|
31
|
+
# // Indicates this message defines a resource schema.
|
32
|
+
# // Declares the resource type in the format of {service}/{kind}.
|
33
|
+
# // For Kubernetes resources, the format is {api group}/{kind}.
|
34
|
+
# option (google.api.resource) = {
|
35
|
+
# type: "pubsub.googleapis.com/Topic"
|
36
|
+
# name_descriptor: {
|
37
|
+
# pattern: "projects/{project}/topics/{topic}"
|
38
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
39
|
+
# parent_name_extractor: "projects/{project}"
|
40
|
+
# }
|
41
|
+
# };
|
42
|
+
# }
|
43
|
+
#
|
44
|
+
# The ResourceDescriptor Yaml config will look like:
|
45
|
+
#
|
46
|
+
# resources:
|
47
|
+
# - type: "pubsub.googleapis.com/Topic"
|
48
|
+
# name_descriptor:
|
49
|
+
# - pattern: "projects/\\{project}/topics/\\{topic}"
|
50
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
51
|
+
# parent_name_extractor: "projects/\\{project}"
|
52
|
+
#
|
53
|
+
# Sometimes, resources have multiple patterns, typically because they can
|
54
|
+
# live under multiple parents.
|
55
|
+
#
|
56
|
+
# Example:
|
57
|
+
#
|
58
|
+
# message LogEntry {
|
59
|
+
# option (google.api.resource) = {
|
60
|
+
# type: "logging.googleapis.com/LogEntry"
|
61
|
+
# name_descriptor: {
|
62
|
+
# pattern: "projects/{project}/logs/{log}"
|
63
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
64
|
+
# parent_name_extractor: "projects/{project}"
|
65
|
+
# }
|
66
|
+
# name_descriptor: {
|
67
|
+
# pattern: "folders/{folder}/logs/{log}"
|
68
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
69
|
+
# parent_name_extractor: "folders/{folder}"
|
70
|
+
# }
|
71
|
+
# name_descriptor: {
|
72
|
+
# pattern: "organizations/{organization}/logs/{log}"
|
73
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Organization"
|
74
|
+
# parent_name_extractor: "organizations/{organization}"
|
75
|
+
# }
|
76
|
+
# name_descriptor: {
|
77
|
+
# pattern: "billingAccounts/{billing_account}/logs/{log}"
|
78
|
+
# parent_type: "billing.googleapis.com/BillingAccount"
|
79
|
+
# parent_name_extractor: "billingAccounts/{billing_account}"
|
80
|
+
# }
|
81
|
+
# };
|
82
|
+
# }
|
83
|
+
#
|
84
|
+
# The ResourceDescriptor Yaml config will look like:
|
85
|
+
#
|
86
|
+
# resources:
|
87
|
+
# - type: 'logging.googleapis.com/LogEntry'
|
88
|
+
# name_descriptor:
|
89
|
+
# - pattern: "projects/{project}/logs/{log}"
|
90
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
91
|
+
# parent_name_extractor: "projects/{project}"
|
92
|
+
# - pattern: "folders/{folder}/logs/{log}"
|
93
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
94
|
+
# parent_name_extractor: "folders/{folder}"
|
95
|
+
# - pattern: "organizations/{organization}/logs/{log}"
|
96
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Organization"
|
97
|
+
# parent_name_extractor: "organizations/{organization}"
|
98
|
+
# - pattern: "billingAccounts/{billing_account}/logs/{log}"
|
99
|
+
# parent_type: "billing.googleapis.com/BillingAccount"
|
100
|
+
# parent_name_extractor: "billingAccounts/{billing_account}"
|
101
|
+
#
|
102
|
+
# For flexible resources, the resource name doesn't contain parent names, but
|
103
|
+
# the resource itself has parents for policy evaluation.
|
104
|
+
#
|
105
|
+
# Example:
|
106
|
+
#
|
107
|
+
# message Shelf {
|
108
|
+
# option (google.api.resource) = {
|
109
|
+
# type: "library.googleapis.com/Shelf"
|
110
|
+
# name_descriptor: {
|
111
|
+
# pattern: "shelves/{shelf}"
|
112
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
113
|
+
# }
|
114
|
+
# name_descriptor: {
|
115
|
+
# pattern: "shelves/{shelf}"
|
116
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
117
|
+
# }
|
118
|
+
# };
|
119
|
+
# }
|
120
|
+
#
|
121
|
+
# The ResourceDescriptor Yaml config will look like:
|
122
|
+
#
|
123
|
+
# resources:
|
124
|
+
# - type: 'library.googleapis.com/Shelf'
|
125
|
+
# name_descriptor:
|
126
|
+
# - pattern: "shelves/{shelf}"
|
127
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
128
|
+
# - pattern: "shelves/{shelf}"
|
129
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
130
|
+
# @!attribute [rw] type
|
131
|
+
# @return [String]
|
132
|
+
# The resource type. It must be in the format of
|
133
|
+
# \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be
|
134
|
+
# singular and must not include version numbers.
|
135
|
+
#
|
136
|
+
# Example: `storage.googleapis.com/Bucket`
|
137
|
+
#
|
138
|
+
# The value of the resource_type_kind must follow the regular expression
|
139
|
+
# /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and
|
140
|
+
# should use PascalCase (UpperCamelCase). The maximum number of
|
141
|
+
# characters allowed for the `resource_type_kind` is 100.
|
142
|
+
# @!attribute [rw] pattern
|
143
|
+
# @return [Array<String>]
|
144
|
+
# Optional. The relative resource name pattern associated with this resource
|
145
|
+
# type. The DNS prefix of the full resource name shouldn't be specified here.
|
146
|
+
#
|
147
|
+
# The path pattern must follow the syntax, which aligns with HTTP binding
|
148
|
+
# syntax:
|
149
|
+
#
|
150
|
+
# Template = Segment { "/" Segment } ;
|
151
|
+
# Segment = LITERAL | Variable ;
|
152
|
+
# Variable = "{" LITERAL "}" ;
|
153
|
+
#
|
154
|
+
# Examples:
|
155
|
+
#
|
156
|
+
# - "projects/\\{project}/topics/\\{topic}"
|
157
|
+
# - "projects/\\{project}/knowledgeBases/\\{knowledge_base}"
|
158
|
+
#
|
159
|
+
# The components in braces correspond to the IDs for each resource in the
|
160
|
+
# hierarchy. It is expected that, if multiple patterns are provided,
|
161
|
+
# the same component name (e.g. "project") refers to IDs of the same
|
162
|
+
# type of resource.
|
163
|
+
# @!attribute [rw] name_field
|
164
|
+
# @return [String]
|
165
|
+
# Optional. The field on the resource that designates the resource name
|
166
|
+
# field. If omitted, this is assumed to be "name".
|
167
|
+
# @!attribute [rw] history
|
168
|
+
# @return [Google::Api::ResourceDescriptor::History]
|
169
|
+
# Optional. The historical or future-looking state of the resource pattern.
|
170
|
+
#
|
171
|
+
# Example:
|
172
|
+
#
|
173
|
+
# // The InspectTemplate message originally only supported resource
|
174
|
+
# // names with organization, and project was added later.
|
175
|
+
# message InspectTemplate {
|
176
|
+
# option (google.api.resource) = {
|
177
|
+
# type: "dlp.googleapis.com/InspectTemplate"
|
178
|
+
# pattern:
|
179
|
+
# "organizations/{organization}/inspectTemplates/{inspect_template}"
|
180
|
+
# pattern: "projects/{project}/inspectTemplates/{inspect_template}"
|
181
|
+
# history: ORIGINALLY_SINGLE_PATTERN
|
182
|
+
# };
|
183
|
+
# }
|
184
|
+
# @!attribute [rw] plural
|
185
|
+
# @return [String]
|
186
|
+
# The plural name used in the resource name, such as 'projects' for
|
187
|
+
# the name of 'projects/\\{project}'. It is the same concept of the `plural`
|
188
|
+
# field in k8s CRD spec
|
189
|
+
# https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
|
190
|
+
# @!attribute [rw] singular
|
191
|
+
# @return [String]
|
192
|
+
# The same concept of the `singular` field in k8s CRD spec
|
193
|
+
# https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
|
194
|
+
# Such as "project" for the `resourcemanager.googleapis.com/Project` type.
|
195
|
+
class ResourceDescriptor
|
196
|
+
include Google::Protobuf::MessageExts
|
197
|
+
extend Google::Protobuf::MessageExts::ClassMethods
|
198
|
+
|
199
|
+
# A description of the historical or future-looking state of the
|
200
|
+
# resource pattern.
|
201
|
+
module History
|
202
|
+
# The "unset" value.
|
203
|
+
HISTORY_UNSPECIFIED = 0
|
204
|
+
|
205
|
+
# The resource originally had one pattern and launched as such, and
|
206
|
+
# additional patterns were added later.
|
207
|
+
ORIGINALLY_SINGLE_PATTERN = 1
|
208
|
+
|
209
|
+
# The resource has one pattern, but the API owner expects to add more
|
210
|
+
# later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents
|
211
|
+
# that from being necessary once there are multiple patterns.)
|
212
|
+
FUTURE_MULTI_PATTERN = 2
|
213
|
+
end
|
214
|
+
end
|
215
|
+
|
216
|
+
# Defines a proto annotation that describes a string field that refers to
|
217
|
+
# an API resource.
|
218
|
+
# @!attribute [rw] type
|
219
|
+
# @return [String]
|
220
|
+
# The resource type that the annotated field references.
|
221
|
+
#
|
222
|
+
# Example:
|
223
|
+
#
|
224
|
+
# message Subscription {
|
225
|
+
# string topic = 2 [(google.api.resource_reference) = {
|
226
|
+
# type: "pubsub.googleapis.com/Topic"
|
227
|
+
# }];
|
228
|
+
# }
|
229
|
+
# @!attribute [rw] child_type
|
230
|
+
# @return [String]
|
231
|
+
# The resource type of a child collection that the annotated field
|
232
|
+
# references. This is useful for annotating the `parent` field that
|
233
|
+
# doesn't have a fixed resource type.
|
234
|
+
#
|
235
|
+
# Example:
|
236
|
+
#
|
237
|
+
# message ListLogEntriesRequest {
|
238
|
+
# string parent = 1 [(google.api.resource_reference) = {
|
239
|
+
# child_type: "logging.googleapis.com/LogEntry"
|
240
|
+
# };
|
241
|
+
# }
|
242
|
+
class ResourceReference
|
243
|
+
include Google::Protobuf::MessageExts
|
244
|
+
extend Google::Protobuf::MessageExts::ClassMethods
|
245
|
+
end
|
246
|
+
end
|
247
|
+
end
|
@@ -0,0 +1,70 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module AutoML
|
23
|
+
module V1beta1
|
24
|
+
# Contains annotation information that is relevant to AutoML.
|
25
|
+
# @!attribute [rw] translation
|
26
|
+
# @return [Google::Cloud::AutoML::V1beta1::TranslationAnnotation]
|
27
|
+
# Annotation details for translation.
|
28
|
+
# @!attribute [rw] classification
|
29
|
+
# @return [Google::Cloud::AutoML::V1beta1::ClassificationAnnotation]
|
30
|
+
# Annotation details for content or image classification.
|
31
|
+
# @!attribute [rw] image_object_detection
|
32
|
+
# @return [Google::Cloud::AutoML::V1beta1::ImageObjectDetectionAnnotation]
|
33
|
+
# Annotation details for image object detection.
|
34
|
+
# @!attribute [rw] video_classification
|
35
|
+
# @return [Google::Cloud::AutoML::V1beta1::VideoClassificationAnnotation]
|
36
|
+
# Annotation details for video classification.
|
37
|
+
# Returned for Video Classification predictions.
|
38
|
+
# @!attribute [rw] video_object_tracking
|
39
|
+
# @return [Google::Cloud::AutoML::V1beta1::VideoObjectTrackingAnnotation]
|
40
|
+
# Annotation details for video object tracking.
|
41
|
+
# @!attribute [rw] text_extraction
|
42
|
+
# @return [Google::Cloud::AutoML::V1beta1::TextExtractionAnnotation]
|
43
|
+
# Annotation details for text extraction.
|
44
|
+
# @!attribute [rw] text_sentiment
|
45
|
+
# @return [Google::Cloud::AutoML::V1beta1::TextSentimentAnnotation]
|
46
|
+
# Annotation details for text sentiment.
|
47
|
+
# @!attribute [rw] tables
|
48
|
+
# @return [Google::Cloud::AutoML::V1beta1::TablesAnnotation]
|
49
|
+
# Annotation details for Tables.
|
50
|
+
# @!attribute [rw] annotation_spec_id
|
51
|
+
# @return [String]
|
52
|
+
# Output only . The resource ID of the annotation spec that
|
53
|
+
# this annotation pertains to. The annotation spec comes from either an
|
54
|
+
# ancestor dataset, or the dataset that was used to train the model in use.
|
55
|
+
# @!attribute [rw] display_name
|
56
|
+
# @return [String]
|
57
|
+
# Output only. The value of
|
58
|
+
# {Google::Cloud::AutoML::V1beta1::AnnotationSpec#display_name display_name}
|
59
|
+
# when the model was trained. Because this field returns a value at model
|
60
|
+
# training time, for different models trained using the same dataset, the
|
61
|
+
# returned value could be different as model owner could update the
|
62
|
+
# `display_name` between any two model training.
|
63
|
+
class AnnotationPayload
|
64
|
+
include Google::Protobuf::MessageExts
|
65
|
+
extend Google::Protobuf::MessageExts::ClassMethods
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module AutoML
|
23
|
+
module V1beta1
|
24
|
+
# A definition of an annotation spec.
|
25
|
+
# @!attribute [rw] name
|
26
|
+
# @return [String]
|
27
|
+
# Output only. Resource name of the annotation spec.
|
28
|
+
# Form:
|
29
|
+
#
|
30
|
+
# 'projects/\\{project_id}/locations/\\{location_id}/datasets/\\{dataset_id}/annotationSpecs/\\{annotation_spec_id}'
|
31
|
+
# @!attribute [rw] display_name
|
32
|
+
# @return [String]
|
33
|
+
# Required. The name of the annotation spec to show in the interface. The name can be
|
34
|
+
# up to 32 characters long and must match the regexp `[a-zA-Z0-9_]+`.
|
35
|
+
# @!attribute [rw] example_count
|
36
|
+
# @return [Integer]
|
37
|
+
# Output only. The number of examples in the parent dataset
|
38
|
+
# labeled by the annotation spec.
|
39
|
+
class AnnotationSpec
|
40
|
+
include Google::Protobuf::MessageExts
|
41
|
+
extend Google::Protobuf::MessageExts::ClassMethods
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,234 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module AutoML
|
23
|
+
module V1beta1
|
24
|
+
# Contains annotation details specific to classification.
|
25
|
+
# @!attribute [rw] score
|
26
|
+
# @return [Float]
|
27
|
+
# Output only. A confidence estimate between 0.0 and 1.0. A higher value
|
28
|
+
# means greater confidence that the annotation is positive. If a user
|
29
|
+
# approves an annotation as negative or positive, the score value remains
|
30
|
+
# unchanged. If a user creates an annotation, the score is 0 for negative or
|
31
|
+
# 1 for positive.
|
32
|
+
class ClassificationAnnotation
|
33
|
+
include Google::Protobuf::MessageExts
|
34
|
+
extend Google::Protobuf::MessageExts::ClassMethods
|
35
|
+
end
|
36
|
+
|
37
|
+
# Contains annotation details specific to video classification.
|
38
|
+
# @!attribute [rw] type
|
39
|
+
# @return [String]
|
40
|
+
# Output only. Expresses the type of video classification. Possible values:
|
41
|
+
#
|
42
|
+
# * `segment` - Classification done on a specified by user
|
43
|
+
# time segment of a video. AnnotationSpec is answered to be present
|
44
|
+
# in that time segment, if it is present in any part of it. The video
|
45
|
+
# ML model evaluations are done only for this type of classification.
|
46
|
+
#
|
47
|
+
# * `shot`- Shot-level classification.
|
48
|
+
# AutoML Video Intelligence determines the boundaries
|
49
|
+
# for each camera shot in the entire segment of the video that user
|
50
|
+
# specified in the request configuration. AutoML Video Intelligence
|
51
|
+
# then returns labels and their confidence scores for each detected
|
52
|
+
# shot, along with the start and end time of the shot.
|
53
|
+
# WARNING: Model evaluation is not done for this classification type,
|
54
|
+
# the quality of it depends on training data, but there are no
|
55
|
+
# metrics provided to describe that quality.
|
56
|
+
#
|
57
|
+
# * `1s_interval` - AutoML Video Intelligence returns labels and their
|
58
|
+
# confidence scores for each second of the entire segment of the video
|
59
|
+
# that user specified in the request configuration.
|
60
|
+
# WARNING: Model evaluation is not done for this classification type,
|
61
|
+
# the quality of it depends on training data, but there are no
|
62
|
+
# metrics provided to describe that quality.
|
63
|
+
# @!attribute [rw] classification_annotation
|
64
|
+
# @return [Google::Cloud::AutoML::V1beta1::ClassificationAnnotation]
|
65
|
+
# Output only . The classification details of this annotation.
|
66
|
+
# @!attribute [rw] time_segment
|
67
|
+
# @return [Google::Cloud::AutoML::V1beta1::TimeSegment]
|
68
|
+
# Output only . The time segment of the video to which the
|
69
|
+
# annotation applies.
|
70
|
+
class VideoClassificationAnnotation
|
71
|
+
include Google::Protobuf::MessageExts
|
72
|
+
extend Google::Protobuf::MessageExts::ClassMethods
|
73
|
+
end
|
74
|
+
|
75
|
+
# Model evaluation metrics for classification problems.
|
76
|
+
# Note: For Video Classification this metrics only describe quality of the
|
77
|
+
# Video Classification predictions of "segment_classification" type.
|
78
|
+
# @!attribute [rw] au_prc
|
79
|
+
# @return [Float]
|
80
|
+
# Output only. The Area Under Precision-Recall Curve metric. Micro-averaged
|
81
|
+
# for the overall evaluation.
|
82
|
+
# @!attribute [rw] base_au_prc
|
83
|
+
# @return [Float]
|
84
|
+
# Output only. The Area Under Precision-Recall Curve metric based on priors.
|
85
|
+
# Micro-averaged for the overall evaluation.
|
86
|
+
# Deprecated.
|
87
|
+
# @!attribute [rw] au_roc
|
88
|
+
# @return [Float]
|
89
|
+
# Output only. The Area Under Receiver Operating Characteristic curve metric.
|
90
|
+
# Micro-averaged for the overall evaluation.
|
91
|
+
# @!attribute [rw] log_loss
|
92
|
+
# @return [Float]
|
93
|
+
# Output only. The Log Loss metric.
|
94
|
+
# @!attribute [rw] confidence_metrics_entry
|
95
|
+
# @return [Array<Google::Cloud::AutoML::V1beta1::ClassificationEvaluationMetrics::ConfidenceMetricsEntry>]
|
96
|
+
# Output only. Metrics for each confidence_threshold in
|
97
|
+
# 0.00,0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 and
|
98
|
+
# position_threshold = INT32_MAX_VALUE.
|
99
|
+
# ROC and precision-recall curves, and other aggregated metrics are derived
|
100
|
+
# from them. The confidence metrics entries may also be supplied for
|
101
|
+
# additional values of position_threshold, but from these no aggregated
|
102
|
+
# metrics are computed.
|
103
|
+
# @!attribute [rw] confusion_matrix
|
104
|
+
# @return [Google::Cloud::AutoML::V1beta1::ClassificationEvaluationMetrics::ConfusionMatrix]
|
105
|
+
# Output only. Confusion matrix of the evaluation.
|
106
|
+
# Only set for MULTICLASS classification problems where number
|
107
|
+
# of labels is no more than 10.
|
108
|
+
# Only set for model level evaluation, not for evaluation per label.
|
109
|
+
# @!attribute [rw] annotation_spec_id
|
110
|
+
# @return [Array<String>]
|
111
|
+
# Output only. The annotation spec ids used for this evaluation.
|
112
|
+
class ClassificationEvaluationMetrics
|
113
|
+
include Google::Protobuf::MessageExts
|
114
|
+
extend Google::Protobuf::MessageExts::ClassMethods
|
115
|
+
|
116
|
+
# Metrics for a single confidence threshold.
|
117
|
+
# @!attribute [rw] confidence_threshold
|
118
|
+
# @return [Float]
|
119
|
+
# Output only. Metrics are computed with an assumption that the model
|
120
|
+
# never returns predictions with score lower than this value.
|
121
|
+
# @!attribute [rw] position_threshold
|
122
|
+
# @return [Integer]
|
123
|
+
# Output only. Metrics are computed with an assumption that the model
|
124
|
+
# always returns at most this many predictions (ordered by their score,
|
125
|
+
# descendingly), but they all still need to meet the confidence_threshold.
|
126
|
+
# @!attribute [rw] recall
|
127
|
+
# @return [Float]
|
128
|
+
# Output only. Recall (True Positive Rate) for the given confidence
|
129
|
+
# threshold.
|
130
|
+
# @!attribute [rw] precision
|
131
|
+
# @return [Float]
|
132
|
+
# Output only. Precision for the given confidence threshold.
|
133
|
+
# @!attribute [rw] false_positive_rate
|
134
|
+
# @return [Float]
|
135
|
+
# Output only. False Positive Rate for the given confidence threshold.
|
136
|
+
# @!attribute [rw] f1_score
|
137
|
+
# @return [Float]
|
138
|
+
# Output only. The harmonic mean of recall and precision.
|
139
|
+
# @!attribute [rw] recall_at1
|
140
|
+
# @return [Float]
|
141
|
+
# Output only. The Recall (True Positive Rate) when only considering the
|
142
|
+
# label that has the highest prediction score and not below the confidence
|
143
|
+
# threshold for each example.
|
144
|
+
# @!attribute [rw] precision_at1
|
145
|
+
# @return [Float]
|
146
|
+
# Output only. The precision when only considering the label that has the
|
147
|
+
# highest prediction score and not below the confidence threshold for each
|
148
|
+
# example.
|
149
|
+
# @!attribute [rw] false_positive_rate_at1
|
150
|
+
# @return [Float]
|
151
|
+
# Output only. The False Positive Rate when only considering the label that
|
152
|
+
# has the highest prediction score and not below the confidence threshold
|
153
|
+
# for each example.
|
154
|
+
# @!attribute [rw] f1_score_at1
|
155
|
+
# @return [Float]
|
156
|
+
# Output only. The harmonic mean of {Google::Cloud::AutoML::V1beta1::ClassificationEvaluationMetrics::ConfidenceMetricsEntry#recall_at1 recall_at1} and {Google::Cloud::AutoML::V1beta1::ClassificationEvaluationMetrics::ConfidenceMetricsEntry#precision_at1 precision_at1}.
|
157
|
+
# @!attribute [rw] true_positive_count
|
158
|
+
# @return [Integer]
|
159
|
+
# Output only. The number of model created labels that match a ground truth
|
160
|
+
# label.
|
161
|
+
# @!attribute [rw] false_positive_count
|
162
|
+
# @return [Integer]
|
163
|
+
# Output only. The number of model created labels that do not match a
|
164
|
+
# ground truth label.
|
165
|
+
# @!attribute [rw] false_negative_count
|
166
|
+
# @return [Integer]
|
167
|
+
# Output only. The number of ground truth labels that are not matched
|
168
|
+
# by a model created label.
|
169
|
+
# @!attribute [rw] true_negative_count
|
170
|
+
# @return [Integer]
|
171
|
+
# Output only. The number of labels that were not created by the model,
|
172
|
+
# but if they would, they would not match a ground truth label.
|
173
|
+
class ConfidenceMetricsEntry
|
174
|
+
include Google::Protobuf::MessageExts
|
175
|
+
extend Google::Protobuf::MessageExts::ClassMethods
|
176
|
+
end
|
177
|
+
|
178
|
+
# Confusion matrix of the model running the classification.
|
179
|
+
# @!attribute [rw] annotation_spec_id
|
180
|
+
# @return [Array<String>]
|
181
|
+
# Output only. IDs of the annotation specs used in the confusion matrix.
|
182
|
+
# For Tables CLASSIFICATION
|
183
|
+
#
|
184
|
+
# [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]
|
185
|
+
# only list of [annotation_spec_display_name-s][] is populated.
|
186
|
+
# @!attribute [rw] display_name
|
187
|
+
# @return [Array<String>]
|
188
|
+
# Output only. Display name of the annotation specs used in the confusion
|
189
|
+
# matrix, as they were at the moment of the evaluation. For Tables
|
190
|
+
# CLASSIFICATION
|
191
|
+
#
|
192
|
+
# [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type],
|
193
|
+
# distinct values of the target column at the moment of the model
|
194
|
+
# evaluation are populated here.
|
195
|
+
# @!attribute [rw] row
|
196
|
+
# @return [Array<Google::Cloud::AutoML::V1beta1::ClassificationEvaluationMetrics::ConfusionMatrix::Row>]
|
197
|
+
# Output only. Rows in the confusion matrix. The number of rows is equal to
|
198
|
+
# the size of `annotation_spec_id`.
|
199
|
+
# `row[i].example_count[j]` is the number of examples that have ground
|
200
|
+
# truth of the `annotation_spec_id[i]` and are predicted as
|
201
|
+
# `annotation_spec_id[j]` by the model being evaluated.
|
202
|
+
class ConfusionMatrix
|
203
|
+
include Google::Protobuf::MessageExts
|
204
|
+
extend Google::Protobuf::MessageExts::ClassMethods
|
205
|
+
|
206
|
+
# Output only. A row in the confusion matrix.
|
207
|
+
# @!attribute [rw] example_count
|
208
|
+
# @return [Array<Integer>]
|
209
|
+
# Output only. Value of the specific cell in the confusion matrix.
|
210
|
+
# The number of values each row has (i.e. the length of the row) is equal
|
211
|
+
# to the length of the `annotation_spec_id` field or, if that one is not
|
212
|
+
# populated, length of the {Google::Cloud::AutoML::V1beta1::ClassificationEvaluationMetrics::ConfusionMatrix#display_name display_name} field.
|
213
|
+
class Row
|
214
|
+
include Google::Protobuf::MessageExts
|
215
|
+
extend Google::Protobuf::MessageExts::ClassMethods
|
216
|
+
end
|
217
|
+
end
|
218
|
+
end
|
219
|
+
|
220
|
+
# Type of the classification problem.
|
221
|
+
module ClassificationType
|
222
|
+
# An un-set value of this enum.
|
223
|
+
CLASSIFICATION_TYPE_UNSPECIFIED = 0
|
224
|
+
|
225
|
+
# At most one label is allowed per example.
|
226
|
+
MULTICLASS = 1
|
227
|
+
|
228
|
+
# Multiple labels are allowed for one example.
|
229
|
+
MULTILABEL = 2
|
230
|
+
end
|
231
|
+
end
|
232
|
+
end
|
233
|
+
end
|
234
|
+
end
|