1 // Copyright 2024 Google LLC. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 // Code generated file. DO NOT EDIT. 6 7 // Package videointelligence provides access to the Cloud Video Intelligence API. 8 // 9 // This package is DEPRECATED. Use package cloud.google.com/go/videointelligence/apiv1 instead. 10 // 11 // For product documentation, see: https://cloud.google.com/video-intelligence/docs/ 12 // 13 // # Library status 14 // 15 // These client libraries are officially supported by Google. However, this 16 // library is considered complete and is in maintenance mode. This means 17 // that we will address critical bugs and security issues but will not add 18 // any new features. 19 // 20 // When possible, we recommend using our newer 21 // [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) 22 // that are still actively being worked and iterated on. 23 // 24 // # Creating a client 25 // 26 // Usage example: 27 // 28 // import "google.golang.org/api/videointelligence/v1beta2" 29 // ... 30 // ctx := context.Background() 31 // videointelligenceService, err := videointelligence.NewService(ctx) 32 // 33 // In this example, Google Application Default Credentials are used for 34 // authentication. For information on how to create and obtain Application 35 // Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. 36 // 37 // # Other authentication options 38 // 39 // To use an API key for authentication (note: some APIs do not support API 40 // keys), use [google.golang.org/api/option.WithAPIKey]: 41 // 42 // videointelligenceService, err := videointelligence.NewService(ctx, option.WithAPIKey("AIza...")) 43 // 44 // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth 45 // flow, use [google.golang.org/api/option.WithTokenSource]: 46 // 47 // config := &oauth2.Config{...} 48 // // ... 49 // token, err := config.Exchange(ctx, ...) 50 // videointelligenceService, err := videointelligence.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) 51 // 52 // See [google.golang.org/api/option.ClientOption] for details on options. 53 package videointelligence // import "google.golang.org/api/videointelligence/v1beta2" 54 55 import ( 56 "bytes" 57 "context" 58 "encoding/json" 59 "errors" 60 "fmt" 61 "io" 62 "net/http" 63 "net/url" 64 "strconv" 65 "strings" 66 67 googleapi "google.golang.org/api/googleapi" 68 internal "google.golang.org/api/internal" 69 gensupport "google.golang.org/api/internal/gensupport" 70 option "google.golang.org/api/option" 71 internaloption "google.golang.org/api/option/internaloption" 72 htransport "google.golang.org/api/transport/http" 73 ) 74 75 // Always reference these packages, just in case the auto-generated code 76 // below doesn't. 77 var _ = bytes.NewBuffer 78 var _ = strconv.Itoa 79 var _ = fmt.Sprintf 80 var _ = json.NewDecoder 81 var _ = io.Copy 82 var _ = url.Parse 83 var _ = gensupport.MarshalJSON 84 var _ = googleapi.Version 85 var _ = errors.New 86 var _ = strings.Replace 87 var _ = context.Canceled 88 var _ = internaloption.WithDefaultEndpoint 89 var _ = internal.Version 90 91 const apiId = "videointelligence:v1beta2" 92 const apiName = "videointelligence" 93 const apiVersion = "v1beta2" 94 const basePath = "https://videointelligence.googleapis.com/" 95 const basePathTemplate = "https://videointelligence.UNIVERSE_DOMAIN/" 96 const mtlsBasePath = "https://videointelligence.mtls.googleapis.com/" 97 98 // OAuth2 scopes used by this API. 99 const ( 100 // See, edit, configure, and delete your Google Cloud data and see the email 101 // address for your Google Account. 102 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" 103 ) 104 105 // NewService creates a new Service. 106 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { 107 scopesOption := internaloption.WithDefaultScopes( 108 "https://www.googleapis.com/auth/cloud-platform", 109 ) 110 // NOTE: prepend, so we don't override user-specified scopes. 111 opts = append([]option.ClientOption{scopesOption}, opts...) 112 opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) 113 opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate)) 114 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) 115 opts = append(opts, internaloption.EnableNewAuthLibrary()) 116 client, endpoint, err := htransport.NewClient(ctx, opts...) 117 if err != nil { 118 return nil, err 119 } 120 s, err := New(client) 121 if err != nil { 122 return nil, err 123 } 124 if endpoint != "" { 125 s.BasePath = endpoint 126 } 127 return s, nil 128 } 129 130 // New creates a new Service. It uses the provided http.Client for requests. 131 // 132 // Deprecated: please use NewService instead. 133 // To provide a custom HTTP client, use option.WithHTTPClient. 134 // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. 135 func New(client *http.Client) (*Service, error) { 136 if client == nil { 137 return nil, errors.New("client is nil") 138 } 139 s := &Service{client: client, BasePath: basePath} 140 s.Videos = NewVideosService(s) 141 return s, nil 142 } 143 144 type Service struct { 145 client *http.Client 146 BasePath string // API endpoint base URL 147 UserAgent string // optional additional User-Agent fragment 148 149 Videos *VideosService 150 } 151 152 func (s *Service) userAgent() string { 153 if s.UserAgent == "" { 154 return googleapi.UserAgent 155 } 156 return googleapi.UserAgent + " " + s.UserAgent 157 } 158 159 func NewVideosService(s *Service) *VideosService { 160 rs := &VideosService{s: s} 161 return rs 162 } 163 164 type VideosService struct { 165 s *Service 166 } 167 168 // GoogleCloudVideointelligenceV1AnnotateVideoProgress: Video annotation 169 // progress. Included in the `metadata` field of the `Operation` returned by 170 // the `GetOperation` call of the `google::longrunning::Operations` service. 171 type GoogleCloudVideointelligenceV1AnnotateVideoProgress struct { 172 // AnnotationProgress: Progress metadata for all videos specified in 173 // `AnnotateVideoRequest`. 174 AnnotationProgress []*GoogleCloudVideointelligenceV1VideoAnnotationProgress `json:"annotationProgress,omitempty"` 175 // ForceSendFields is a list of field names (e.g. "AnnotationProgress") to 176 // unconditionally include in API requests. By default, fields with empty or 177 // default values are omitted from API requests. See 178 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 179 // details. 180 ForceSendFields []string `json:"-"` 181 // NullFields is a list of field names (e.g. "AnnotationProgress") to include 182 // in API requests with the JSON null value. By default, fields with empty 183 // values are omitted from API requests. See 184 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 185 NullFields []string `json:"-"` 186 } 187 188 func (s *GoogleCloudVideointelligenceV1AnnotateVideoProgress) MarshalJSON() ([]byte, error) { 189 type NoMethod GoogleCloudVideointelligenceV1AnnotateVideoProgress 190 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 191 } 192 193 // GoogleCloudVideointelligenceV1AnnotateVideoResponse: Video annotation 194 // response. Included in the `response` field of the `Operation` returned by 195 // the `GetOperation` call of the `google::longrunning::Operations` service. 196 type GoogleCloudVideointelligenceV1AnnotateVideoResponse struct { 197 // AnnotationResults: Annotation results for all videos specified in 198 // `AnnotateVideoRequest`. 199 AnnotationResults []*GoogleCloudVideointelligenceV1VideoAnnotationResults `json:"annotationResults,omitempty"` 200 // ForceSendFields is a list of field names (e.g. "AnnotationResults") to 201 // unconditionally include in API requests. By default, fields with empty or 202 // default values are omitted from API requests. See 203 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 204 // details. 205 ForceSendFields []string `json:"-"` 206 // NullFields is a list of field names (e.g. "AnnotationResults") to include in 207 // API requests with the JSON null value. By default, fields with empty values 208 // are omitted from API requests. See 209 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 210 NullFields []string `json:"-"` 211 } 212 213 func (s *GoogleCloudVideointelligenceV1AnnotateVideoResponse) MarshalJSON() ([]byte, error) { 214 type NoMethod GoogleCloudVideointelligenceV1AnnotateVideoResponse 215 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 216 } 217 218 // GoogleCloudVideointelligenceV1DetectedAttribute: A generic detected 219 // attribute represented by name in string format. 220 type GoogleCloudVideointelligenceV1DetectedAttribute struct { 221 // Confidence: Detected attribute confidence. Range [0, 1]. 222 Confidence float64 `json:"confidence,omitempty"` 223 // Name: The name of the attribute, for example, glasses, dark_glasses, 224 // mouth_open. A full list of supported type names will be provided in the 225 // document. 226 Name string `json:"name,omitempty"` 227 // Value: Text value of the detection result. For example, the value for 228 // "HairColor" can be "black", "blonde", etc. 229 Value string `json:"value,omitempty"` 230 // ForceSendFields is a list of field names (e.g. "Confidence") to 231 // unconditionally include in API requests. By default, fields with empty or 232 // default values are omitted from API requests. See 233 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 234 // details. 235 ForceSendFields []string `json:"-"` 236 // NullFields is a list of field names (e.g. "Confidence") to include in API 237 // requests with the JSON null value. By default, fields with empty values are 238 // omitted from API requests. See 239 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 240 NullFields []string `json:"-"` 241 } 242 243 func (s *GoogleCloudVideointelligenceV1DetectedAttribute) MarshalJSON() ([]byte, error) { 244 type NoMethod GoogleCloudVideointelligenceV1DetectedAttribute 245 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 246 } 247 248 func (s *GoogleCloudVideointelligenceV1DetectedAttribute) UnmarshalJSON(data []byte) error { 249 type NoMethod GoogleCloudVideointelligenceV1DetectedAttribute 250 var s1 struct { 251 Confidence gensupport.JSONFloat64 `json:"confidence"` 252 *NoMethod 253 } 254 s1.NoMethod = (*NoMethod)(s) 255 if err := json.Unmarshal(data, &s1); err != nil { 256 return err 257 } 258 s.Confidence = float64(s1.Confidence) 259 return nil 260 } 261 262 // GoogleCloudVideointelligenceV1DetectedLandmark: A generic detected landmark 263 // represented by name in string format and a 2D location. 264 type GoogleCloudVideointelligenceV1DetectedLandmark struct { 265 // Confidence: The confidence score of the detected landmark. Range [0, 1]. 266 Confidence float64 `json:"confidence,omitempty"` 267 // Name: The name of this landmark, for example, left_hand, right_shoulder. 268 Name string `json:"name,omitempty"` 269 // Point: The 2D point of the detected landmark using the normalized image 270 // coordindate system. The normalized coordinates have the range from 0 to 1. 271 Point *GoogleCloudVideointelligenceV1NormalizedVertex `json:"point,omitempty"` 272 // ForceSendFields is a list of field names (e.g. "Confidence") to 273 // unconditionally include in API requests. By default, fields with empty or 274 // default values are omitted from API requests. See 275 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 276 // details. 277 ForceSendFields []string `json:"-"` 278 // NullFields is a list of field names (e.g. "Confidence") to include in API 279 // requests with the JSON null value. By default, fields with empty values are 280 // omitted from API requests. See 281 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 282 NullFields []string `json:"-"` 283 } 284 285 func (s *GoogleCloudVideointelligenceV1DetectedLandmark) MarshalJSON() ([]byte, error) { 286 type NoMethod GoogleCloudVideointelligenceV1DetectedLandmark 287 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 288 } 289 290 func (s *GoogleCloudVideointelligenceV1DetectedLandmark) UnmarshalJSON(data []byte) error { 291 type NoMethod GoogleCloudVideointelligenceV1DetectedLandmark 292 var s1 struct { 293 Confidence gensupport.JSONFloat64 `json:"confidence"` 294 *NoMethod 295 } 296 s1.NoMethod = (*NoMethod)(s) 297 if err := json.Unmarshal(data, &s1); err != nil { 298 return err 299 } 300 s.Confidence = float64(s1.Confidence) 301 return nil 302 } 303 304 // GoogleCloudVideointelligenceV1Entity: Detected entity from video analysis. 305 type GoogleCloudVideointelligenceV1Entity struct { 306 // Description: Textual description, e.g., `Fixed-gear bicycle`. 307 Description string `json:"description,omitempty"` 308 // EntityId: Opaque entity ID. Some IDs may be available in Google Knowledge 309 // Graph Search API (https://developers.google.com/knowledge-graph/). 310 EntityId string `json:"entityId,omitempty"` 311 // LanguageCode: Language code for `description` in BCP-47 format. 312 LanguageCode string `json:"languageCode,omitempty"` 313 // ForceSendFields is a list of field names (e.g. "Description") to 314 // unconditionally include in API requests. By default, fields with empty or 315 // default values are omitted from API requests. See 316 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 317 // details. 318 ForceSendFields []string `json:"-"` 319 // NullFields is a list of field names (e.g. "Description") to include in API 320 // requests with the JSON null value. By default, fields with empty values are 321 // omitted from API requests. See 322 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 323 NullFields []string `json:"-"` 324 } 325 326 func (s *GoogleCloudVideointelligenceV1Entity) MarshalJSON() ([]byte, error) { 327 type NoMethod GoogleCloudVideointelligenceV1Entity 328 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 329 } 330 331 // GoogleCloudVideointelligenceV1ExplicitContentAnnotation: Explicit content 332 // annotation (based on per-frame visual signals only). If no explicit content 333 // has been detected in a frame, no annotations are present for that frame. 334 type GoogleCloudVideointelligenceV1ExplicitContentAnnotation struct { 335 // Frames: All video frames where explicit content was detected. 336 Frames []*GoogleCloudVideointelligenceV1ExplicitContentFrame `json:"frames,omitempty"` 337 // Version: Feature version. 338 Version string `json:"version,omitempty"` 339 // ForceSendFields is a list of field names (e.g. "Frames") to unconditionally 340 // include in API requests. By default, fields with empty or default values are 341 // omitted from API requests. See 342 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 343 // details. 344 ForceSendFields []string `json:"-"` 345 // NullFields is a list of field names (e.g. "Frames") to include in API 346 // requests with the JSON null value. By default, fields with empty values are 347 // omitted from API requests. See 348 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 349 NullFields []string `json:"-"` 350 } 351 352 func (s *GoogleCloudVideointelligenceV1ExplicitContentAnnotation) MarshalJSON() ([]byte, error) { 353 type NoMethod GoogleCloudVideointelligenceV1ExplicitContentAnnotation 354 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 355 } 356 357 // GoogleCloudVideointelligenceV1ExplicitContentFrame: Video frame level 358 // annotation results for explicit content. 359 type GoogleCloudVideointelligenceV1ExplicitContentFrame struct { 360 // PornographyLikelihood: Likelihood of the pornography content.. 361 // 362 // Possible values: 363 // "LIKELIHOOD_UNSPECIFIED" - Unspecified likelihood. 364 // "VERY_UNLIKELY" - Very unlikely. 365 // "UNLIKELY" - Unlikely. 366 // "POSSIBLE" - Possible. 367 // "LIKELY" - Likely. 368 // "VERY_LIKELY" - Very likely. 369 PornographyLikelihood string `json:"pornographyLikelihood,omitempty"` 370 // TimeOffset: Time-offset, relative to the beginning of the video, 371 // corresponding to the video frame for this location. 372 TimeOffset string `json:"timeOffset,omitempty"` 373 // ForceSendFields is a list of field names (e.g. "PornographyLikelihood") to 374 // unconditionally include in API requests. By default, fields with empty or 375 // default values are omitted from API requests. See 376 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 377 // details. 378 ForceSendFields []string `json:"-"` 379 // NullFields is a list of field names (e.g. "PornographyLikelihood") to 380 // include in API requests with the JSON null value. By default, fields with 381 // empty values are omitted from API requests. See 382 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 383 NullFields []string `json:"-"` 384 } 385 386 func (s *GoogleCloudVideointelligenceV1ExplicitContentFrame) MarshalJSON() ([]byte, error) { 387 type NoMethod GoogleCloudVideointelligenceV1ExplicitContentFrame 388 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 389 } 390 391 // GoogleCloudVideointelligenceV1FaceAnnotation: Deprecated. No effect. 392 type GoogleCloudVideointelligenceV1FaceAnnotation struct { 393 // Frames: All video frames where a face was detected. 394 Frames []*GoogleCloudVideointelligenceV1FaceFrame `json:"frames,omitempty"` 395 // Segments: All video segments where a face was detected. 396 Segments []*GoogleCloudVideointelligenceV1FaceSegment `json:"segments,omitempty"` 397 // Thumbnail: Thumbnail of a representative face view (in JPEG format). 398 Thumbnail string `json:"thumbnail,omitempty"` 399 // ForceSendFields is a list of field names (e.g. "Frames") to unconditionally 400 // include in API requests. By default, fields with empty or default values are 401 // omitted from API requests. See 402 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 403 // details. 404 ForceSendFields []string `json:"-"` 405 // NullFields is a list of field names (e.g. "Frames") to include in API 406 // requests with the JSON null value. By default, fields with empty values are 407 // omitted from API requests. See 408 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 409 NullFields []string `json:"-"` 410 } 411 412 func (s *GoogleCloudVideointelligenceV1FaceAnnotation) MarshalJSON() ([]byte, error) { 413 type NoMethod GoogleCloudVideointelligenceV1FaceAnnotation 414 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 415 } 416 417 // GoogleCloudVideointelligenceV1FaceDetectionAnnotation: Face detection 418 // annotation. 419 type GoogleCloudVideointelligenceV1FaceDetectionAnnotation struct { 420 // Thumbnail: The thumbnail of a person's face. 421 Thumbnail string `json:"thumbnail,omitempty"` 422 // Tracks: The face tracks with attributes. 423 Tracks []*GoogleCloudVideointelligenceV1Track `json:"tracks,omitempty"` 424 // Version: Feature version. 425 Version string `json:"version,omitempty"` 426 // ForceSendFields is a list of field names (e.g. "Thumbnail") to 427 // unconditionally include in API requests. By default, fields with empty or 428 // default values are omitted from API requests. See 429 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 430 // details. 431 ForceSendFields []string `json:"-"` 432 // NullFields is a list of field names (e.g. "Thumbnail") to include in API 433 // requests with the JSON null value. By default, fields with empty values are 434 // omitted from API requests. See 435 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 436 NullFields []string `json:"-"` 437 } 438 439 func (s *GoogleCloudVideointelligenceV1FaceDetectionAnnotation) MarshalJSON() ([]byte, error) { 440 type NoMethod GoogleCloudVideointelligenceV1FaceDetectionAnnotation 441 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 442 } 443 444 // GoogleCloudVideointelligenceV1FaceFrame: Deprecated. No effect. 445 type GoogleCloudVideointelligenceV1FaceFrame struct { 446 // NormalizedBoundingBoxes: Normalized Bounding boxes in a frame. There can be 447 // more than one boxes if the same face is detected in multiple locations 448 // within the current frame. 449 NormalizedBoundingBoxes []*GoogleCloudVideointelligenceV1NormalizedBoundingBox `json:"normalizedBoundingBoxes,omitempty"` 450 // TimeOffset: Time-offset, relative to the beginning of the video, 451 // corresponding to the video frame for this location. 452 TimeOffset string `json:"timeOffset,omitempty"` 453 // ForceSendFields is a list of field names (e.g. "NormalizedBoundingBoxes") to 454 // unconditionally include in API requests. By default, fields with empty or 455 // default values are omitted from API requests. See 456 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 457 // details. 458 ForceSendFields []string `json:"-"` 459 // NullFields is a list of field names (e.g. "NormalizedBoundingBoxes") to 460 // include in API requests with the JSON null value. By default, fields with 461 // empty values are omitted from API requests. See 462 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 463 NullFields []string `json:"-"` 464 } 465 466 func (s *GoogleCloudVideointelligenceV1FaceFrame) MarshalJSON() ([]byte, error) { 467 type NoMethod GoogleCloudVideointelligenceV1FaceFrame 468 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 469 } 470 471 // GoogleCloudVideointelligenceV1FaceSegment: Video segment level annotation 472 // results for face detection. 473 type GoogleCloudVideointelligenceV1FaceSegment struct { 474 // Segment: Video segment where a face was detected. 475 Segment *GoogleCloudVideointelligenceV1VideoSegment `json:"segment,omitempty"` 476 // ForceSendFields is a list of field names (e.g. "Segment") to unconditionally 477 // include in API requests. By default, fields with empty or default values are 478 // omitted from API requests. See 479 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 480 // details. 481 ForceSendFields []string `json:"-"` 482 // NullFields is a list of field names (e.g. "Segment") to include in API 483 // requests with the JSON null value. By default, fields with empty values are 484 // omitted from API requests. See 485 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 486 NullFields []string `json:"-"` 487 } 488 489 func (s *GoogleCloudVideointelligenceV1FaceSegment) MarshalJSON() ([]byte, error) { 490 type NoMethod GoogleCloudVideointelligenceV1FaceSegment 491 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 492 } 493 494 // GoogleCloudVideointelligenceV1LabelAnnotation: Label annotation. 495 type GoogleCloudVideointelligenceV1LabelAnnotation struct { 496 // CategoryEntities: Common categories for the detected entity. For example, 497 // when the label is `Terrier`, the category is likely `dog`. And in some cases 498 // there might be more than one categories e.g., `Terrier` could also be a 499 // `pet`. 500 CategoryEntities []*GoogleCloudVideointelligenceV1Entity `json:"categoryEntities,omitempty"` 501 // Entity: Detected entity. 502 Entity *GoogleCloudVideointelligenceV1Entity `json:"entity,omitempty"` 503 // Frames: All video frames where a label was detected. 504 Frames []*GoogleCloudVideointelligenceV1LabelFrame `json:"frames,omitempty"` 505 // Segments: All video segments where a label was detected. 506 Segments []*GoogleCloudVideointelligenceV1LabelSegment `json:"segments,omitempty"` 507 // Version: Feature version. 508 Version string `json:"version,omitempty"` 509 // ForceSendFields is a list of field names (e.g. "CategoryEntities") to 510 // unconditionally include in API requests. By default, fields with empty or 511 // default values are omitted from API requests. See 512 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 513 // details. 514 ForceSendFields []string `json:"-"` 515 // NullFields is a list of field names (e.g. "CategoryEntities") to include in 516 // API requests with the JSON null value. By default, fields with empty values 517 // are omitted from API requests. See 518 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 519 NullFields []string `json:"-"` 520 } 521 522 func (s *GoogleCloudVideointelligenceV1LabelAnnotation) MarshalJSON() ([]byte, error) { 523 type NoMethod GoogleCloudVideointelligenceV1LabelAnnotation 524 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 525 } 526 527 // GoogleCloudVideointelligenceV1LabelFrame: Video frame level annotation 528 // results for label detection. 529 type GoogleCloudVideointelligenceV1LabelFrame struct { 530 // Confidence: Confidence that the label is accurate. Range: [0, 1]. 531 Confidence float64 `json:"confidence,omitempty"` 532 // TimeOffset: Time-offset, relative to the beginning of the video, 533 // corresponding to the video frame for this location. 534 TimeOffset string `json:"timeOffset,omitempty"` 535 // ForceSendFields is a list of field names (e.g. "Confidence") to 536 // unconditionally include in API requests. By default, fields with empty or 537 // default values are omitted from API requests. See 538 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 539 // details. 540 ForceSendFields []string `json:"-"` 541 // NullFields is a list of field names (e.g. "Confidence") to include in API 542 // requests with the JSON null value. By default, fields with empty values are 543 // omitted from API requests. See 544 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 545 NullFields []string `json:"-"` 546 } 547 548 func (s *GoogleCloudVideointelligenceV1LabelFrame) MarshalJSON() ([]byte, error) { 549 type NoMethod GoogleCloudVideointelligenceV1LabelFrame 550 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 551 } 552 553 func (s *GoogleCloudVideointelligenceV1LabelFrame) UnmarshalJSON(data []byte) error { 554 type NoMethod GoogleCloudVideointelligenceV1LabelFrame 555 var s1 struct { 556 Confidence gensupport.JSONFloat64 `json:"confidence"` 557 *NoMethod 558 } 559 s1.NoMethod = (*NoMethod)(s) 560 if err := json.Unmarshal(data, &s1); err != nil { 561 return err 562 } 563 s.Confidence = float64(s1.Confidence) 564 return nil 565 } 566 567 // GoogleCloudVideointelligenceV1LabelSegment: Video segment level annotation 568 // results for label detection. 569 type GoogleCloudVideointelligenceV1LabelSegment struct { 570 // Confidence: Confidence that the label is accurate. Range: [0, 1]. 571 Confidence float64 `json:"confidence,omitempty"` 572 // Segment: Video segment where a label was detected. 573 Segment *GoogleCloudVideointelligenceV1VideoSegment `json:"segment,omitempty"` 574 // ForceSendFields is a list of field names (e.g. "Confidence") to 575 // unconditionally include in API requests. By default, fields with empty or 576 // default values are omitted from API requests. See 577 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 578 // details. 579 ForceSendFields []string `json:"-"` 580 // NullFields is a list of field names (e.g. "Confidence") to include in API 581 // requests with the JSON null value. By default, fields with empty values are 582 // omitted from API requests. See 583 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 584 NullFields []string `json:"-"` 585 } 586 587 func (s *GoogleCloudVideointelligenceV1LabelSegment) MarshalJSON() ([]byte, error) { 588 type NoMethod GoogleCloudVideointelligenceV1LabelSegment 589 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 590 } 591 592 func (s *GoogleCloudVideointelligenceV1LabelSegment) UnmarshalJSON(data []byte) error { 593 type NoMethod GoogleCloudVideointelligenceV1LabelSegment 594 var s1 struct { 595 Confidence gensupport.JSONFloat64 `json:"confidence"` 596 *NoMethod 597 } 598 s1.NoMethod = (*NoMethod)(s) 599 if err := json.Unmarshal(data, &s1); err != nil { 600 return err 601 } 602 s.Confidence = float64(s1.Confidence) 603 return nil 604 } 605 606 // GoogleCloudVideointelligenceV1LogoRecognitionAnnotation: Annotation 607 // corresponding to one detected, tracked and recognized logo class. 608 type GoogleCloudVideointelligenceV1LogoRecognitionAnnotation struct { 609 // Entity: Entity category information to specify the logo class that all the 610 // logo tracks within this LogoRecognitionAnnotation are recognized as. 611 Entity *GoogleCloudVideointelligenceV1Entity `json:"entity,omitempty"` 612 // Segments: All video segments where the recognized logo appears. There might 613 // be multiple instances of the same logo class appearing in one VideoSegment. 614 Segments []*GoogleCloudVideointelligenceV1VideoSegment `json:"segments,omitempty"` 615 // Tracks: All logo tracks where the recognized logo appears. Each track 616 // corresponds to one logo instance appearing in consecutive frames. 617 Tracks []*GoogleCloudVideointelligenceV1Track `json:"tracks,omitempty"` 618 // ForceSendFields is a list of field names (e.g. "Entity") to unconditionally 619 // include in API requests. By default, fields with empty or default values are 620 // omitted from API requests. See 621 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 622 // details. 623 ForceSendFields []string `json:"-"` 624 // NullFields is a list of field names (e.g. "Entity") to include in API 625 // requests with the JSON null value. By default, fields with empty values are 626 // omitted from API requests. See 627 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 628 NullFields []string `json:"-"` 629 } 630 631 func (s *GoogleCloudVideointelligenceV1LogoRecognitionAnnotation) MarshalJSON() ([]byte, error) { 632 type NoMethod GoogleCloudVideointelligenceV1LogoRecognitionAnnotation 633 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 634 } 635 636 // GoogleCloudVideointelligenceV1NormalizedBoundingBox: Normalized bounding 637 // box. The normalized vertex coordinates are relative to the original image. 638 // Range: [0, 1]. 639 type GoogleCloudVideointelligenceV1NormalizedBoundingBox struct { 640 // Bottom: Bottom Y coordinate. 641 Bottom float64 `json:"bottom,omitempty"` 642 // Left: Left X coordinate. 643 Left float64 `json:"left,omitempty"` 644 // Right: Right X coordinate. 645 Right float64 `json:"right,omitempty"` 646 // Top: Top Y coordinate. 647 Top float64 `json:"top,omitempty"` 648 // ForceSendFields is a list of field names (e.g. "Bottom") to unconditionally 649 // include in API requests. By default, fields with empty or default values are 650 // omitted from API requests. See 651 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 652 // details. 653 ForceSendFields []string `json:"-"` 654 // NullFields is a list of field names (e.g. "Bottom") to include in API 655 // requests with the JSON null value. By default, fields with empty values are 656 // omitted from API requests. See 657 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 658 NullFields []string `json:"-"` 659 } 660 661 func (s *GoogleCloudVideointelligenceV1NormalizedBoundingBox) MarshalJSON() ([]byte, error) { 662 type NoMethod GoogleCloudVideointelligenceV1NormalizedBoundingBox 663 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 664 } 665 666 func (s *GoogleCloudVideointelligenceV1NormalizedBoundingBox) UnmarshalJSON(data []byte) error { 667 type NoMethod GoogleCloudVideointelligenceV1NormalizedBoundingBox 668 var s1 struct { 669 Bottom gensupport.JSONFloat64 `json:"bottom"` 670 Left gensupport.JSONFloat64 `json:"left"` 671 Right gensupport.JSONFloat64 `json:"right"` 672 Top gensupport.JSONFloat64 `json:"top"` 673 *NoMethod 674 } 675 s1.NoMethod = (*NoMethod)(s) 676 if err := json.Unmarshal(data, &s1); err != nil { 677 return err 678 } 679 s.Bottom = float64(s1.Bottom) 680 s.Left = float64(s1.Left) 681 s.Right = float64(s1.Right) 682 s.Top = float64(s1.Top) 683 return nil 684 } 685 686 // GoogleCloudVideointelligenceV1NormalizedBoundingPoly: Normalized bounding 687 // polygon for text (that might not be aligned with axis). Contains list of the 688 // corner points in clockwise order starting from top-left corner. For example, 689 // for a rectangular bounding box: When the text is horizontal it might look 690 // like: 0----1 | | 3----2 When it's clockwise rotated 180 degrees around the 691 // top-left corner it becomes: 2----3 | | 1----0 and the vertex order will 692 // still be (0, 1, 2, 3). Note that values can be less than 0, or greater than 693 // 1 due to trignometric calculations for location of the box. 694 type GoogleCloudVideointelligenceV1NormalizedBoundingPoly struct { 695 // Vertices: Normalized vertices of the bounding polygon. 696 Vertices []*GoogleCloudVideointelligenceV1NormalizedVertex `json:"vertices,omitempty"` 697 // ForceSendFields is a list of field names (e.g. "Vertices") to 698 // unconditionally include in API requests. By default, fields with empty or 699 // default values are omitted from API requests. See 700 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 701 // details. 702 ForceSendFields []string `json:"-"` 703 // NullFields is a list of field names (e.g. "Vertices") to include in API 704 // requests with the JSON null value. By default, fields with empty values are 705 // omitted from API requests. See 706 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 707 NullFields []string `json:"-"` 708 } 709 710 func (s *GoogleCloudVideointelligenceV1NormalizedBoundingPoly) MarshalJSON() ([]byte, error) { 711 type NoMethod GoogleCloudVideointelligenceV1NormalizedBoundingPoly 712 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 713 } 714 715 // GoogleCloudVideointelligenceV1NormalizedVertex: A vertex represents a 2D 716 // point in the image. NOTE: the normalized vertex coordinates are relative to 717 // the original image and range from 0 to 1. 718 type GoogleCloudVideointelligenceV1NormalizedVertex struct { 719 // X: X coordinate. 720 X float64 `json:"x,omitempty"` 721 // Y: Y coordinate. 722 Y float64 `json:"y,omitempty"` 723 // ForceSendFields is a list of field names (e.g. "X") to unconditionally 724 // include in API requests. By default, fields with empty or default values are 725 // omitted from API requests. See 726 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 727 // details. 728 ForceSendFields []string `json:"-"` 729 // NullFields is a list of field names (e.g. "X") to include in API requests 730 // with the JSON null value. By default, fields with empty values are omitted 731 // from API requests. See 732 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 733 NullFields []string `json:"-"` 734 } 735 736 func (s *GoogleCloudVideointelligenceV1NormalizedVertex) MarshalJSON() ([]byte, error) { 737 type NoMethod GoogleCloudVideointelligenceV1NormalizedVertex 738 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 739 } 740 741 func (s *GoogleCloudVideointelligenceV1NormalizedVertex) UnmarshalJSON(data []byte) error { 742 type NoMethod GoogleCloudVideointelligenceV1NormalizedVertex 743 var s1 struct { 744 X gensupport.JSONFloat64 `json:"x"` 745 Y gensupport.JSONFloat64 `json:"y"` 746 *NoMethod 747 } 748 s1.NoMethod = (*NoMethod)(s) 749 if err := json.Unmarshal(data, &s1); err != nil { 750 return err 751 } 752 s.X = float64(s1.X) 753 s.Y = float64(s1.Y) 754 return nil 755 } 756 757 // GoogleCloudVideointelligenceV1ObjectTrackingAnnotation: Annotations 758 // corresponding to one tracked object. 759 type GoogleCloudVideointelligenceV1ObjectTrackingAnnotation struct { 760 // Confidence: Object category's labeling confidence of this track. 761 Confidence float64 `json:"confidence,omitempty"` 762 // Entity: Entity to specify the object category that this track is labeled as. 763 Entity *GoogleCloudVideointelligenceV1Entity `json:"entity,omitempty"` 764 // Frames: Information corresponding to all frames where this object track 765 // appears. Non-streaming batch mode: it may be one or multiple 766 // ObjectTrackingFrame messages in frames. Streaming mode: it can only be one 767 // ObjectTrackingFrame message in frames. 768 Frames []*GoogleCloudVideointelligenceV1ObjectTrackingFrame `json:"frames,omitempty"` 769 // Segment: Non-streaming batch mode ONLY. Each object track corresponds to one 770 // video segment where it appears. 771 Segment *GoogleCloudVideointelligenceV1VideoSegment `json:"segment,omitempty"` 772 // TrackId: Streaming mode ONLY. In streaming mode, we do not know the end time 773 // of a tracked object before it is completed. Hence, there is no VideoSegment 774 // info returned. Instead, we provide a unique identifiable integer track_id so 775 // that the customers can correlate the results of the ongoing 776 // ObjectTrackAnnotation of the same track_id over time. 777 TrackId int64 `json:"trackId,omitempty,string"` 778 // Version: Feature version. 779 Version string `json:"version,omitempty"` 780 // ForceSendFields is a list of field names (e.g. "Confidence") to 781 // unconditionally include in API requests. By default, fields with empty or 782 // default values are omitted from API requests. See 783 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 784 // details. 785 ForceSendFields []string `json:"-"` 786 // NullFields is a list of field names (e.g. "Confidence") to include in API 787 // requests with the JSON null value. By default, fields with empty values are 788 // omitted from API requests. See 789 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 790 NullFields []string `json:"-"` 791 } 792 793 func (s *GoogleCloudVideointelligenceV1ObjectTrackingAnnotation) MarshalJSON() ([]byte, error) { 794 type NoMethod GoogleCloudVideointelligenceV1ObjectTrackingAnnotation 795 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 796 } 797 798 func (s *GoogleCloudVideointelligenceV1ObjectTrackingAnnotation) UnmarshalJSON(data []byte) error { 799 type NoMethod GoogleCloudVideointelligenceV1ObjectTrackingAnnotation 800 var s1 struct { 801 Confidence gensupport.JSONFloat64 `json:"confidence"` 802 *NoMethod 803 } 804 s1.NoMethod = (*NoMethod)(s) 805 if err := json.Unmarshal(data, &s1); err != nil { 806 return err 807 } 808 s.Confidence = float64(s1.Confidence) 809 return nil 810 } 811 812 // GoogleCloudVideointelligenceV1ObjectTrackingFrame: Video frame level 813 // annotations for object detection and tracking. This field stores per frame 814 // location, time offset, and confidence. 815 type GoogleCloudVideointelligenceV1ObjectTrackingFrame struct { 816 // NormalizedBoundingBox: The normalized bounding box location of this object 817 // track for the frame. 818 NormalizedBoundingBox *GoogleCloudVideointelligenceV1NormalizedBoundingBox `json:"normalizedBoundingBox,omitempty"` 819 // TimeOffset: The timestamp of the frame in microseconds. 820 TimeOffset string `json:"timeOffset,omitempty"` 821 // ForceSendFields is a list of field names (e.g. "NormalizedBoundingBox") to 822 // unconditionally include in API requests. By default, fields with empty or 823 // default values are omitted from API requests. See 824 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 825 // details. 826 ForceSendFields []string `json:"-"` 827 // NullFields is a list of field names (e.g. "NormalizedBoundingBox") to 828 // include in API requests with the JSON null value. By default, fields with 829 // empty values are omitted from API requests. See 830 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 831 NullFields []string `json:"-"` 832 } 833 834 func (s *GoogleCloudVideointelligenceV1ObjectTrackingFrame) MarshalJSON() ([]byte, error) { 835 type NoMethod GoogleCloudVideointelligenceV1ObjectTrackingFrame 836 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 837 } 838 839 // GoogleCloudVideointelligenceV1PersonDetectionAnnotation: Person detection 840 // annotation per video. 841 type GoogleCloudVideointelligenceV1PersonDetectionAnnotation struct { 842 // Tracks: The detected tracks of a person. 843 Tracks []*GoogleCloudVideointelligenceV1Track `json:"tracks,omitempty"` 844 // Version: Feature version. 845 Version string `json:"version,omitempty"` 846 // ForceSendFields is a list of field names (e.g. "Tracks") to unconditionally 847 // include in API requests. By default, fields with empty or default values are 848 // omitted from API requests. See 849 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 850 // details. 851 ForceSendFields []string `json:"-"` 852 // NullFields is a list of field names (e.g. "Tracks") to include in API 853 // requests with the JSON null value. By default, fields with empty values are 854 // omitted from API requests. See 855 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 856 NullFields []string `json:"-"` 857 } 858 859 func (s *GoogleCloudVideointelligenceV1PersonDetectionAnnotation) MarshalJSON() ([]byte, error) { 860 type NoMethod GoogleCloudVideointelligenceV1PersonDetectionAnnotation 861 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 862 } 863 864 // GoogleCloudVideointelligenceV1SpeechRecognitionAlternative: Alternative 865 // hypotheses (a.k.a. n-best list). 866 type GoogleCloudVideointelligenceV1SpeechRecognitionAlternative struct { 867 // Confidence: Output only. The confidence estimate between 0.0 and 1.0. A 868 // higher number indicates an estimated greater likelihood that the recognized 869 // words are correct. This field is set only for the top alternative. This 870 // field is not guaranteed to be accurate and users should not rely on it to be 871 // always provided. The default of 0.0 is a sentinel value indicating 872 // `confidence` was not set. 873 Confidence float64 `json:"confidence,omitempty"` 874 // Transcript: Transcript text representing the words that the user spoke. 875 Transcript string `json:"transcript,omitempty"` 876 // Words: Output only. A list of word-specific information for each recognized 877 // word. Note: When `enable_speaker_diarization` is set to true, you will see 878 // all the words from the beginning of the audio. 879 Words []*GoogleCloudVideointelligenceV1WordInfo `json:"words,omitempty"` 880 // ForceSendFields is a list of field names (e.g. "Confidence") to 881 // unconditionally include in API requests. By default, fields with empty or 882 // default values are omitted from API requests. See 883 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 884 // details. 885 ForceSendFields []string `json:"-"` 886 // NullFields is a list of field names (e.g. "Confidence") to include in API 887 // requests with the JSON null value. By default, fields with empty values are 888 // omitted from API requests. See 889 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 890 NullFields []string `json:"-"` 891 } 892 893 func (s *GoogleCloudVideointelligenceV1SpeechRecognitionAlternative) MarshalJSON() ([]byte, error) { 894 type NoMethod GoogleCloudVideointelligenceV1SpeechRecognitionAlternative 895 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 896 } 897 898 func (s *GoogleCloudVideointelligenceV1SpeechRecognitionAlternative) UnmarshalJSON(data []byte) error { 899 type NoMethod GoogleCloudVideointelligenceV1SpeechRecognitionAlternative 900 var s1 struct { 901 Confidence gensupport.JSONFloat64 `json:"confidence"` 902 *NoMethod 903 } 904 s1.NoMethod = (*NoMethod)(s) 905 if err := json.Unmarshal(data, &s1); err != nil { 906 return err 907 } 908 s.Confidence = float64(s1.Confidence) 909 return nil 910 } 911 912 // GoogleCloudVideointelligenceV1SpeechTranscription: A speech recognition 913 // result corresponding to a portion of the audio. 914 type GoogleCloudVideointelligenceV1SpeechTranscription struct { 915 // Alternatives: May contain one or more recognition hypotheses (up to the 916 // maximum specified in `max_alternatives`). These alternatives are ordered in 917 // terms of accuracy, with the top (first) alternative being the most probable, 918 // as ranked by the recognizer. 919 Alternatives []*GoogleCloudVideointelligenceV1SpeechRecognitionAlternative `json:"alternatives,omitempty"` 920 // LanguageCode: Output only. The BCP-47 921 // (https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of the language 922 // in this result. This language code was detected to have the most likelihood 923 // of being spoken in the audio. 924 LanguageCode string `json:"languageCode,omitempty"` 925 // ForceSendFields is a list of field names (e.g. "Alternatives") to 926 // unconditionally include in API requests. By default, fields with empty or 927 // default values are omitted from API requests. See 928 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 929 // details. 930 ForceSendFields []string `json:"-"` 931 // NullFields is a list of field names (e.g. "Alternatives") to include in API 932 // requests with the JSON null value. By default, fields with empty values are 933 // omitted from API requests. See 934 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 935 NullFields []string `json:"-"` 936 } 937 938 func (s *GoogleCloudVideointelligenceV1SpeechTranscription) MarshalJSON() ([]byte, error) { 939 type NoMethod GoogleCloudVideointelligenceV1SpeechTranscription 940 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 941 } 942 943 // GoogleCloudVideointelligenceV1TextAnnotation: Annotations related to one 944 // detected OCR text snippet. This will contain the corresponding text, 945 // confidence value, and frame level information for each detection. 946 type GoogleCloudVideointelligenceV1TextAnnotation struct { 947 // Segments: All video segments where OCR detected text appears. 948 Segments []*GoogleCloudVideointelligenceV1TextSegment `json:"segments,omitempty"` 949 // Text: The detected text. 950 Text string `json:"text,omitempty"` 951 // Version: Feature version. 952 Version string `json:"version,omitempty"` 953 // ForceSendFields is a list of field names (e.g. "Segments") to 954 // unconditionally include in API requests. By default, fields with empty or 955 // default values are omitted from API requests. See 956 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 957 // details. 958 ForceSendFields []string `json:"-"` 959 // NullFields is a list of field names (e.g. "Segments") to include in API 960 // requests with the JSON null value. By default, fields with empty values are 961 // omitted from API requests. See 962 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 963 NullFields []string `json:"-"` 964 } 965 966 func (s *GoogleCloudVideointelligenceV1TextAnnotation) MarshalJSON() ([]byte, error) { 967 type NoMethod GoogleCloudVideointelligenceV1TextAnnotation 968 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 969 } 970 971 // GoogleCloudVideointelligenceV1TextFrame: Video frame level annotation 972 // results for text annotation (OCR). Contains information regarding timestamp 973 // and bounding box locations for the frames containing detected OCR text 974 // snippets. 975 type GoogleCloudVideointelligenceV1TextFrame struct { 976 // RotatedBoundingBox: Bounding polygon of the detected text for this frame. 977 RotatedBoundingBox *GoogleCloudVideointelligenceV1NormalizedBoundingPoly `json:"rotatedBoundingBox,omitempty"` 978 // TimeOffset: Timestamp of this frame. 979 TimeOffset string `json:"timeOffset,omitempty"` 980 // ForceSendFields is a list of field names (e.g. "RotatedBoundingBox") to 981 // unconditionally include in API requests. By default, fields with empty or 982 // default values are omitted from API requests. See 983 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 984 // details. 985 ForceSendFields []string `json:"-"` 986 // NullFields is a list of field names (e.g. "RotatedBoundingBox") to include 987 // in API requests with the JSON null value. By default, fields with empty 988 // values are omitted from API requests. See 989 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 990 NullFields []string `json:"-"` 991 } 992 993 func (s *GoogleCloudVideointelligenceV1TextFrame) MarshalJSON() ([]byte, error) { 994 type NoMethod GoogleCloudVideointelligenceV1TextFrame 995 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 996 } 997 998 // GoogleCloudVideointelligenceV1TextSegment: Video segment level annotation 999 // results for text detection. 1000 type GoogleCloudVideointelligenceV1TextSegment struct { 1001 // Confidence: Confidence for the track of detected text. It is calculated as 1002 // the highest over all frames where OCR detected text appears. 1003 Confidence float64 `json:"confidence,omitempty"` 1004 // Frames: Information related to the frames where OCR detected text appears. 1005 Frames []*GoogleCloudVideointelligenceV1TextFrame `json:"frames,omitempty"` 1006 // Segment: Video segment where a text snippet was detected. 1007 Segment *GoogleCloudVideointelligenceV1VideoSegment `json:"segment,omitempty"` 1008 // ForceSendFields is a list of field names (e.g. "Confidence") to 1009 // unconditionally include in API requests. By default, fields with empty or 1010 // default values are omitted from API requests. See 1011 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1012 // details. 1013 ForceSendFields []string `json:"-"` 1014 // NullFields is a list of field names (e.g. "Confidence") to include in API 1015 // requests with the JSON null value. By default, fields with empty values are 1016 // omitted from API requests. See 1017 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1018 NullFields []string `json:"-"` 1019 } 1020 1021 func (s *GoogleCloudVideointelligenceV1TextSegment) MarshalJSON() ([]byte, error) { 1022 type NoMethod GoogleCloudVideointelligenceV1TextSegment 1023 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1024 } 1025 1026 func (s *GoogleCloudVideointelligenceV1TextSegment) UnmarshalJSON(data []byte) error { 1027 type NoMethod GoogleCloudVideointelligenceV1TextSegment 1028 var s1 struct { 1029 Confidence gensupport.JSONFloat64 `json:"confidence"` 1030 *NoMethod 1031 } 1032 s1.NoMethod = (*NoMethod)(s) 1033 if err := json.Unmarshal(data, &s1); err != nil { 1034 return err 1035 } 1036 s.Confidence = float64(s1.Confidence) 1037 return nil 1038 } 1039 1040 // GoogleCloudVideointelligenceV1TimestampedObject: For tracking related 1041 // features. An object at time_offset with attributes, and located with 1042 // normalized_bounding_box. 1043 type GoogleCloudVideointelligenceV1TimestampedObject struct { 1044 // Attributes: Optional. The attributes of the object in the bounding box. 1045 Attributes []*GoogleCloudVideointelligenceV1DetectedAttribute `json:"attributes,omitempty"` 1046 // Landmarks: Optional. The detected landmarks. 1047 Landmarks []*GoogleCloudVideointelligenceV1DetectedLandmark `json:"landmarks,omitempty"` 1048 // NormalizedBoundingBox: Normalized Bounding box in a frame, where the object 1049 // is located. 1050 NormalizedBoundingBox *GoogleCloudVideointelligenceV1NormalizedBoundingBox `json:"normalizedBoundingBox,omitempty"` 1051 // TimeOffset: Time-offset, relative to the beginning of the video, 1052 // corresponding to the video frame for this object. 1053 TimeOffset string `json:"timeOffset,omitempty"` 1054 // ForceSendFields is a list of field names (e.g. "Attributes") to 1055 // unconditionally include in API requests. By default, fields with empty or 1056 // default values are omitted from API requests. See 1057 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1058 // details. 1059 ForceSendFields []string `json:"-"` 1060 // NullFields is a list of field names (e.g. "Attributes") to include in API 1061 // requests with the JSON null value. By default, fields with empty values are 1062 // omitted from API requests. See 1063 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1064 NullFields []string `json:"-"` 1065 } 1066 1067 func (s *GoogleCloudVideointelligenceV1TimestampedObject) MarshalJSON() ([]byte, error) { 1068 type NoMethod GoogleCloudVideointelligenceV1TimestampedObject 1069 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1070 } 1071 1072 // GoogleCloudVideointelligenceV1Track: A track of an object instance. 1073 type GoogleCloudVideointelligenceV1Track struct { 1074 // Attributes: Optional. Attributes in the track level. 1075 Attributes []*GoogleCloudVideointelligenceV1DetectedAttribute `json:"attributes,omitempty"` 1076 // Confidence: Optional. The confidence score of the tracked object. 1077 Confidence float64 `json:"confidence,omitempty"` 1078 // Segment: Video segment of a track. 1079 Segment *GoogleCloudVideointelligenceV1VideoSegment `json:"segment,omitempty"` 1080 // TimestampedObjects: The object with timestamp and attributes per frame in 1081 // the track. 1082 TimestampedObjects []*GoogleCloudVideointelligenceV1TimestampedObject `json:"timestampedObjects,omitempty"` 1083 // ForceSendFields is a list of field names (e.g. "Attributes") to 1084 // unconditionally include in API requests. By default, fields with empty or 1085 // default values are omitted from API requests. See 1086 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1087 // details. 1088 ForceSendFields []string `json:"-"` 1089 // NullFields is a list of field names (e.g. "Attributes") to include in API 1090 // requests with the JSON null value. By default, fields with empty values are 1091 // omitted from API requests. See 1092 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1093 NullFields []string `json:"-"` 1094 } 1095 1096 func (s *GoogleCloudVideointelligenceV1Track) MarshalJSON() ([]byte, error) { 1097 type NoMethod GoogleCloudVideointelligenceV1Track 1098 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1099 } 1100 1101 func (s *GoogleCloudVideointelligenceV1Track) UnmarshalJSON(data []byte) error { 1102 type NoMethod GoogleCloudVideointelligenceV1Track 1103 var s1 struct { 1104 Confidence gensupport.JSONFloat64 `json:"confidence"` 1105 *NoMethod 1106 } 1107 s1.NoMethod = (*NoMethod)(s) 1108 if err := json.Unmarshal(data, &s1); err != nil { 1109 return err 1110 } 1111 s.Confidence = float64(s1.Confidence) 1112 return nil 1113 } 1114 1115 // GoogleCloudVideointelligenceV1VideoAnnotationProgress: Annotation progress 1116 // for a single video. 1117 type GoogleCloudVideointelligenceV1VideoAnnotationProgress struct { 1118 // Feature: Specifies which feature is being tracked if the request contains 1119 // more than one feature. 1120 // 1121 // Possible values: 1122 // "FEATURE_UNSPECIFIED" - Unspecified. 1123 // "LABEL_DETECTION" - Label detection. Detect objects, such as dog or 1124 // flower. 1125 // "SHOT_CHANGE_DETECTION" - Shot change detection. 1126 // "EXPLICIT_CONTENT_DETECTION" - Explicit content detection. 1127 // "FACE_DETECTION" - Human face detection. 1128 // "SPEECH_TRANSCRIPTION" - Speech transcription. 1129 // "TEXT_DETECTION" - OCR text detection and tracking. 1130 // "OBJECT_TRACKING" - Object detection and tracking. 1131 // "LOGO_RECOGNITION" - Logo detection, tracking, and recognition. 1132 // "PERSON_DETECTION" - Person detection. 1133 Feature string `json:"feature,omitempty"` 1134 // InputUri: Video file location in Cloud Storage 1135 // (https://cloud.google.com/storage/). 1136 InputUri string `json:"inputUri,omitempty"` 1137 // ProgressPercent: Approximate percentage processed thus far. Guaranteed to be 1138 // 100 when fully processed. 1139 ProgressPercent int64 `json:"progressPercent,omitempty"` 1140 // Segment: Specifies which segment is being tracked if the request contains 1141 // more than one segment. 1142 Segment *GoogleCloudVideointelligenceV1VideoSegment `json:"segment,omitempty"` 1143 // StartTime: Time when the request was received. 1144 StartTime string `json:"startTime,omitempty"` 1145 // UpdateTime: Time of the most recent update. 1146 UpdateTime string `json:"updateTime,omitempty"` 1147 // ForceSendFields is a list of field names (e.g. "Feature") to unconditionally 1148 // include in API requests. By default, fields with empty or default values are 1149 // omitted from API requests. See 1150 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1151 // details. 1152 ForceSendFields []string `json:"-"` 1153 // NullFields is a list of field names (e.g. "Feature") to include in API 1154 // requests with the JSON null value. By default, fields with empty values are 1155 // omitted from API requests. See 1156 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1157 NullFields []string `json:"-"` 1158 } 1159 1160 func (s *GoogleCloudVideointelligenceV1VideoAnnotationProgress) MarshalJSON() ([]byte, error) { 1161 type NoMethod GoogleCloudVideointelligenceV1VideoAnnotationProgress 1162 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1163 } 1164 1165 // GoogleCloudVideointelligenceV1VideoAnnotationResults: Annotation results for 1166 // a single video. 1167 type GoogleCloudVideointelligenceV1VideoAnnotationResults struct { 1168 // Error: If set, indicates an error. Note that for a single 1169 // `AnnotateVideoRequest` some videos may succeed and some may fail. 1170 Error *GoogleRpcStatus `json:"error,omitempty"` 1171 // ExplicitAnnotation: Explicit content annotation. 1172 ExplicitAnnotation *GoogleCloudVideointelligenceV1ExplicitContentAnnotation `json:"explicitAnnotation,omitempty"` 1173 // FaceAnnotations: Deprecated. Please use `face_detection_annotations` 1174 // instead. 1175 FaceAnnotations []*GoogleCloudVideointelligenceV1FaceAnnotation `json:"faceAnnotations,omitempty"` 1176 // FaceDetectionAnnotations: Face detection annotations. 1177 FaceDetectionAnnotations []*GoogleCloudVideointelligenceV1FaceDetectionAnnotation `json:"faceDetectionAnnotations,omitempty"` 1178 // FrameLabelAnnotations: Label annotations on frame level. There is exactly 1179 // one element for each unique label. 1180 FrameLabelAnnotations []*GoogleCloudVideointelligenceV1LabelAnnotation `json:"frameLabelAnnotations,omitempty"` 1181 // InputUri: Video file location in Cloud Storage 1182 // (https://cloud.google.com/storage/). 1183 InputUri string `json:"inputUri,omitempty"` 1184 // LogoRecognitionAnnotations: Annotations for list of logos detected, tracked 1185 // and recognized in video. 1186 LogoRecognitionAnnotations []*GoogleCloudVideointelligenceV1LogoRecognitionAnnotation `json:"logoRecognitionAnnotations,omitempty"` 1187 // ObjectAnnotations: Annotations for list of objects detected and tracked in 1188 // video. 1189 ObjectAnnotations []*GoogleCloudVideointelligenceV1ObjectTrackingAnnotation `json:"objectAnnotations,omitempty"` 1190 // PersonDetectionAnnotations: Person detection annotations. 1191 PersonDetectionAnnotations []*GoogleCloudVideointelligenceV1PersonDetectionAnnotation `json:"personDetectionAnnotations,omitempty"` 1192 // Segment: Video segment on which the annotation is run. 1193 Segment *GoogleCloudVideointelligenceV1VideoSegment `json:"segment,omitempty"` 1194 // SegmentLabelAnnotations: Topical label annotations on video level or 1195 // user-specified segment level. There is exactly one element for each unique 1196 // label. 1197 SegmentLabelAnnotations []*GoogleCloudVideointelligenceV1LabelAnnotation `json:"segmentLabelAnnotations,omitempty"` 1198 // SegmentPresenceLabelAnnotations: Presence label annotations on video level 1199 // or user-specified segment level. There is exactly one element for each 1200 // unique label. Compared to the existing topical `segment_label_annotations`, 1201 // this field presents more fine-grained, segment-level labels detected in 1202 // video content and is made available only when the client sets 1203 // `LabelDetectionConfig.model` to "builtin/latest" in the request. 1204 SegmentPresenceLabelAnnotations []*GoogleCloudVideointelligenceV1LabelAnnotation `json:"segmentPresenceLabelAnnotations,omitempty"` 1205 // ShotAnnotations: Shot annotations. Each shot is represented as a video 1206 // segment. 1207 ShotAnnotations []*GoogleCloudVideointelligenceV1VideoSegment `json:"shotAnnotations,omitempty"` 1208 // ShotLabelAnnotations: Topical label annotations on shot level. There is 1209 // exactly one element for each unique label. 1210 ShotLabelAnnotations []*GoogleCloudVideointelligenceV1LabelAnnotation `json:"shotLabelAnnotations,omitempty"` 1211 // ShotPresenceLabelAnnotations: Presence label annotations on shot level. 1212 // There is exactly one element for each unique label. Compared to the existing 1213 // topical `shot_label_annotations`, this field presents more fine-grained, 1214 // shot-level labels detected in video content and is made available only when 1215 // the client sets `LabelDetectionConfig.model` to "builtin/latest" in the 1216 // request. 1217 ShotPresenceLabelAnnotations []*GoogleCloudVideointelligenceV1LabelAnnotation `json:"shotPresenceLabelAnnotations,omitempty"` 1218 // SpeechTranscriptions: Speech transcription. 1219 SpeechTranscriptions []*GoogleCloudVideointelligenceV1SpeechTranscription `json:"speechTranscriptions,omitempty"` 1220 // TextAnnotations: OCR text detection and tracking. Annotations for list of 1221 // detected text snippets. Each will have list of frame information associated 1222 // with it. 1223 TextAnnotations []*GoogleCloudVideointelligenceV1TextAnnotation `json:"textAnnotations,omitempty"` 1224 // ForceSendFields is a list of field names (e.g. "Error") to unconditionally 1225 // include in API requests. By default, fields with empty or default values are 1226 // omitted from API requests. See 1227 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1228 // details. 1229 ForceSendFields []string `json:"-"` 1230 // NullFields is a list of field names (e.g. "Error") to include in API 1231 // requests with the JSON null value. By default, fields with empty values are 1232 // omitted from API requests. See 1233 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1234 NullFields []string `json:"-"` 1235 } 1236 1237 func (s *GoogleCloudVideointelligenceV1VideoAnnotationResults) MarshalJSON() ([]byte, error) { 1238 type NoMethod GoogleCloudVideointelligenceV1VideoAnnotationResults 1239 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1240 } 1241 1242 // GoogleCloudVideointelligenceV1VideoSegment: Video segment. 1243 type GoogleCloudVideointelligenceV1VideoSegment struct { 1244 // EndTimeOffset: Time-offset, relative to the beginning of the video, 1245 // corresponding to the end of the segment (inclusive). 1246 EndTimeOffset string `json:"endTimeOffset,omitempty"` 1247 // StartTimeOffset: Time-offset, relative to the beginning of the video, 1248 // corresponding to the start of the segment (inclusive). 1249 StartTimeOffset string `json:"startTimeOffset,omitempty"` 1250 // ForceSendFields is a list of field names (e.g. "EndTimeOffset") to 1251 // unconditionally include in API requests. By default, fields with empty or 1252 // default values are omitted from API requests. See 1253 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1254 // details. 1255 ForceSendFields []string `json:"-"` 1256 // NullFields is a list of field names (e.g. "EndTimeOffset") to include in API 1257 // requests with the JSON null value. By default, fields with empty values are 1258 // omitted from API requests. See 1259 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1260 NullFields []string `json:"-"` 1261 } 1262 1263 func (s *GoogleCloudVideointelligenceV1VideoSegment) MarshalJSON() ([]byte, error) { 1264 type NoMethod GoogleCloudVideointelligenceV1VideoSegment 1265 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1266 } 1267 1268 // GoogleCloudVideointelligenceV1WordInfo: Word-specific information for 1269 // recognized words. Word information is only included in the response when 1270 // certain request parameters are set, such as `enable_word_time_offsets`. 1271 type GoogleCloudVideointelligenceV1WordInfo struct { 1272 // Confidence: Output only. The confidence estimate between 0.0 and 1.0. A 1273 // higher number indicates an estimated greater likelihood that the recognized 1274 // words are correct. This field is set only for the top alternative. This 1275 // field is not guaranteed to be accurate and users should not rely on it to be 1276 // always provided. The default of 0.0 is a sentinel value indicating 1277 // `confidence` was not set. 1278 Confidence float64 `json:"confidence,omitempty"` 1279 // EndTime: Time offset relative to the beginning of the audio, and 1280 // corresponding to the end of the spoken word. This field is only set if 1281 // `enable_word_time_offsets=true` and only in the top hypothesis. This is an 1282 // experimental feature and the accuracy of the time offset can vary. 1283 EndTime string `json:"endTime,omitempty"` 1284 // SpeakerTag: Output only. A distinct integer value is assigned for every 1285 // speaker within the audio. This field specifies which one of those speakers 1286 // was detected to have spoken this word. Value ranges from 1 up to 1287 // diarization_speaker_count, and is only set if speaker diarization is 1288 // enabled. 1289 SpeakerTag int64 `json:"speakerTag,omitempty"` 1290 // StartTime: Time offset relative to the beginning of the audio, and 1291 // corresponding to the start of the spoken word. This field is only set if 1292 // `enable_word_time_offsets=true` and only in the top hypothesis. This is an 1293 // experimental feature and the accuracy of the time offset can vary. 1294 StartTime string `json:"startTime,omitempty"` 1295 // Word: The word corresponding to this set of information. 1296 Word string `json:"word,omitempty"` 1297 // ForceSendFields is a list of field names (e.g. "Confidence") to 1298 // unconditionally include in API requests. By default, fields with empty or 1299 // default values are omitted from API requests. See 1300 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1301 // details. 1302 ForceSendFields []string `json:"-"` 1303 // NullFields is a list of field names (e.g. "Confidence") to include in API 1304 // requests with the JSON null value. By default, fields with empty values are 1305 // omitted from API requests. See 1306 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1307 NullFields []string `json:"-"` 1308 } 1309 1310 func (s *GoogleCloudVideointelligenceV1WordInfo) MarshalJSON() ([]byte, error) { 1311 type NoMethod GoogleCloudVideointelligenceV1WordInfo 1312 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1313 } 1314 1315 func (s *GoogleCloudVideointelligenceV1WordInfo) UnmarshalJSON(data []byte) error { 1316 type NoMethod GoogleCloudVideointelligenceV1WordInfo 1317 var s1 struct { 1318 Confidence gensupport.JSONFloat64 `json:"confidence"` 1319 *NoMethod 1320 } 1321 s1.NoMethod = (*NoMethod)(s) 1322 if err := json.Unmarshal(data, &s1); err != nil { 1323 return err 1324 } 1325 s.Confidence = float64(s1.Confidence) 1326 return nil 1327 } 1328 1329 // GoogleCloudVideointelligenceV1beta2AnnotateVideoProgress: Video annotation 1330 // progress. Included in the `metadata` field of the `Operation` returned by 1331 // the `GetOperation` call of the `google::longrunning::Operations` service. 1332 type GoogleCloudVideointelligenceV1beta2AnnotateVideoProgress struct { 1333 // AnnotationProgress: Progress metadata for all videos specified in 1334 // `AnnotateVideoRequest`. 1335 AnnotationProgress []*GoogleCloudVideointelligenceV1beta2VideoAnnotationProgress `json:"annotationProgress,omitempty"` 1336 // ForceSendFields is a list of field names (e.g. "AnnotationProgress") to 1337 // unconditionally include in API requests. By default, fields with empty or 1338 // default values are omitted from API requests. See 1339 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1340 // details. 1341 ForceSendFields []string `json:"-"` 1342 // NullFields is a list of field names (e.g. "AnnotationProgress") to include 1343 // in API requests with the JSON null value. By default, fields with empty 1344 // values are omitted from API requests. See 1345 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1346 NullFields []string `json:"-"` 1347 } 1348 1349 func (s *GoogleCloudVideointelligenceV1beta2AnnotateVideoProgress) MarshalJSON() ([]byte, error) { 1350 type NoMethod GoogleCloudVideointelligenceV1beta2AnnotateVideoProgress 1351 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1352 } 1353 1354 // GoogleCloudVideointelligenceV1beta2AnnotateVideoRequest: Video annotation 1355 // request. 1356 type GoogleCloudVideointelligenceV1beta2AnnotateVideoRequest struct { 1357 // Features: Required. Requested video annotation features. 1358 // 1359 // Possible values: 1360 // "FEATURE_UNSPECIFIED" - Unspecified. 1361 // "LABEL_DETECTION" - Label detection. Detect objects, such as dog or 1362 // flower. 1363 // "SHOT_CHANGE_DETECTION" - Shot change detection. 1364 // "EXPLICIT_CONTENT_DETECTION" - Explicit content detection. 1365 // "FACE_DETECTION" - Human face detection. 1366 // "SPEECH_TRANSCRIPTION" - Speech transcription. 1367 // "TEXT_DETECTION" - OCR text detection and tracking. 1368 // "OBJECT_TRACKING" - Object detection and tracking. 1369 // "LOGO_RECOGNITION" - Logo detection, tracking, and recognition. 1370 // "PERSON_DETECTION" - Person detection. 1371 Features []string `json:"features,omitempty"` 1372 // InputContent: The video data bytes. If unset, the input video(s) should be 1373 // specified via the `input_uri`. If set, `input_uri` must be unset. 1374 InputContent string `json:"inputContent,omitempty"` 1375 // InputUri: Input video location. Currently, only Cloud Storage 1376 // (https://cloud.google.com/storage/) URIs are supported. URIs must be 1377 // specified in the following format: `gs://bucket-id/object-id` (other URI 1378 // formats return google.rpc.Code.INVALID_ARGUMENT). For more information, see 1379 // Request URIs (https://cloud.google.com/storage/docs/request-endpoints). To 1380 // identify multiple videos, a video URI may include wildcards in the 1381 // `object-id`. Supported wildcards: '*' to match 0 or more characters; '?' to 1382 // match 1 character. If unset, the input video should be embedded in the 1383 // request as `input_content`. If set, `input_content` must be unset. 1384 InputUri string `json:"inputUri,omitempty"` 1385 // LocationId: Optional. Cloud region where annotation should take place. 1386 // Supported cloud regions are: `us-east1`, `us-west1`, `europe-west1`, 1387 // `asia-east1`. If no region is specified, the region will be determined based 1388 // on video file location. 1389 LocationId string `json:"locationId,omitempty"` 1390 // OutputUri: Optional. Location where the output (in JSON format) should be 1391 // stored. Currently, only Cloud Storage (https://cloud.google.com/storage/) 1392 // URIs are supported. These must be specified in the following format: 1393 // `gs://bucket-id/object-id` (other URI formats return 1394 // google.rpc.Code.INVALID_ARGUMENT). For more information, see Request URIs 1395 // (https://cloud.google.com/storage/docs/request-endpoints). 1396 OutputUri string `json:"outputUri,omitempty"` 1397 // VideoContext: Additional video context and/or feature-specific parameters. 1398 VideoContext *GoogleCloudVideointelligenceV1beta2VideoContext `json:"videoContext,omitempty"` 1399 // ForceSendFields is a list of field names (e.g. "Features") to 1400 // unconditionally include in API requests. By default, fields with empty or 1401 // default values are omitted from API requests. See 1402 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1403 // details. 1404 ForceSendFields []string `json:"-"` 1405 // NullFields is a list of field names (e.g. "Features") to include in API 1406 // requests with the JSON null value. By default, fields with empty values are 1407 // omitted from API requests. See 1408 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1409 NullFields []string `json:"-"` 1410 } 1411 1412 func (s *GoogleCloudVideointelligenceV1beta2AnnotateVideoRequest) MarshalJSON() ([]byte, error) { 1413 type NoMethod GoogleCloudVideointelligenceV1beta2AnnotateVideoRequest 1414 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1415 } 1416 1417 // GoogleCloudVideointelligenceV1beta2AnnotateVideoResponse: Video annotation 1418 // response. Included in the `response` field of the `Operation` returned by 1419 // the `GetOperation` call of the `google::longrunning::Operations` service. 1420 type GoogleCloudVideointelligenceV1beta2AnnotateVideoResponse struct { 1421 // AnnotationResults: Annotation results for all videos specified in 1422 // `AnnotateVideoRequest`. 1423 AnnotationResults []*GoogleCloudVideointelligenceV1beta2VideoAnnotationResults `json:"annotationResults,omitempty"` 1424 // ForceSendFields is a list of field names (e.g. "AnnotationResults") to 1425 // unconditionally include in API requests. By default, fields with empty or 1426 // default values are omitted from API requests. See 1427 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1428 // details. 1429 ForceSendFields []string `json:"-"` 1430 // NullFields is a list of field names (e.g. "AnnotationResults") to include in 1431 // API requests with the JSON null value. By default, fields with empty values 1432 // are omitted from API requests. See 1433 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1434 NullFields []string `json:"-"` 1435 } 1436 1437 func (s *GoogleCloudVideointelligenceV1beta2AnnotateVideoResponse) MarshalJSON() ([]byte, error) { 1438 type NoMethod GoogleCloudVideointelligenceV1beta2AnnotateVideoResponse 1439 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1440 } 1441 1442 // GoogleCloudVideointelligenceV1beta2DetectedAttribute: A generic detected 1443 // attribute represented by name in string format. 1444 type GoogleCloudVideointelligenceV1beta2DetectedAttribute struct { 1445 // Confidence: Detected attribute confidence. Range [0, 1]. 1446 Confidence float64 `json:"confidence,omitempty"` 1447 // Name: The name of the attribute, for example, glasses, dark_glasses, 1448 // mouth_open. A full list of supported type names will be provided in the 1449 // document. 1450 Name string `json:"name,omitempty"` 1451 // Value: Text value of the detection result. For example, the value for 1452 // "HairColor" can be "black", "blonde", etc. 1453 Value string `json:"value,omitempty"` 1454 // ForceSendFields is a list of field names (e.g. "Confidence") to 1455 // unconditionally include in API requests. By default, fields with empty or 1456 // default values are omitted from API requests. See 1457 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1458 // details. 1459 ForceSendFields []string `json:"-"` 1460 // NullFields is a list of field names (e.g. "Confidence") to include in API 1461 // requests with the JSON null value. By default, fields with empty values are 1462 // omitted from API requests. See 1463 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1464 NullFields []string `json:"-"` 1465 } 1466 1467 func (s *GoogleCloudVideointelligenceV1beta2DetectedAttribute) MarshalJSON() ([]byte, error) { 1468 type NoMethod GoogleCloudVideointelligenceV1beta2DetectedAttribute 1469 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1470 } 1471 1472 func (s *GoogleCloudVideointelligenceV1beta2DetectedAttribute) UnmarshalJSON(data []byte) error { 1473 type NoMethod GoogleCloudVideointelligenceV1beta2DetectedAttribute 1474 var s1 struct { 1475 Confidence gensupport.JSONFloat64 `json:"confidence"` 1476 *NoMethod 1477 } 1478 s1.NoMethod = (*NoMethod)(s) 1479 if err := json.Unmarshal(data, &s1); err != nil { 1480 return err 1481 } 1482 s.Confidence = float64(s1.Confidence) 1483 return nil 1484 } 1485 1486 // GoogleCloudVideointelligenceV1beta2DetectedLandmark: A generic detected 1487 // landmark represented by name in string format and a 2D location. 1488 type GoogleCloudVideointelligenceV1beta2DetectedLandmark struct { 1489 // Confidence: The confidence score of the detected landmark. Range [0, 1]. 1490 Confidence float64 `json:"confidence,omitempty"` 1491 // Name: The name of this landmark, for example, left_hand, right_shoulder. 1492 Name string `json:"name,omitempty"` 1493 // Point: The 2D point of the detected landmark using the normalized image 1494 // coordindate system. The normalized coordinates have the range from 0 to 1. 1495 Point *GoogleCloudVideointelligenceV1beta2NormalizedVertex `json:"point,omitempty"` 1496 // ForceSendFields is a list of field names (e.g. "Confidence") to 1497 // unconditionally include in API requests. By default, fields with empty or 1498 // default values are omitted from API requests. See 1499 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1500 // details. 1501 ForceSendFields []string `json:"-"` 1502 // NullFields is a list of field names (e.g. "Confidence") to include in API 1503 // requests with the JSON null value. By default, fields with empty values are 1504 // omitted from API requests. See 1505 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1506 NullFields []string `json:"-"` 1507 } 1508 1509 func (s *GoogleCloudVideointelligenceV1beta2DetectedLandmark) MarshalJSON() ([]byte, error) { 1510 type NoMethod GoogleCloudVideointelligenceV1beta2DetectedLandmark 1511 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1512 } 1513 1514 func (s *GoogleCloudVideointelligenceV1beta2DetectedLandmark) UnmarshalJSON(data []byte) error { 1515 type NoMethod GoogleCloudVideointelligenceV1beta2DetectedLandmark 1516 var s1 struct { 1517 Confidence gensupport.JSONFloat64 `json:"confidence"` 1518 *NoMethod 1519 } 1520 s1.NoMethod = (*NoMethod)(s) 1521 if err := json.Unmarshal(data, &s1); err != nil { 1522 return err 1523 } 1524 s.Confidence = float64(s1.Confidence) 1525 return nil 1526 } 1527 1528 // GoogleCloudVideointelligenceV1beta2Entity: Detected entity from video 1529 // analysis. 1530 type GoogleCloudVideointelligenceV1beta2Entity struct { 1531 // Description: Textual description, e.g., `Fixed-gear bicycle`. 1532 Description string `json:"description,omitempty"` 1533 // EntityId: Opaque entity ID. Some IDs may be available in Google Knowledge 1534 // Graph Search API (https://developers.google.com/knowledge-graph/). 1535 EntityId string `json:"entityId,omitempty"` 1536 // LanguageCode: Language code for `description` in BCP-47 format. 1537 LanguageCode string `json:"languageCode,omitempty"` 1538 // ForceSendFields is a list of field names (e.g. "Description") to 1539 // unconditionally include in API requests. By default, fields with empty or 1540 // default values are omitted from API requests. See 1541 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1542 // details. 1543 ForceSendFields []string `json:"-"` 1544 // NullFields is a list of field names (e.g. "Description") to include in API 1545 // requests with the JSON null value. By default, fields with empty values are 1546 // omitted from API requests. See 1547 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1548 NullFields []string `json:"-"` 1549 } 1550 1551 func (s *GoogleCloudVideointelligenceV1beta2Entity) MarshalJSON() ([]byte, error) { 1552 type NoMethod GoogleCloudVideointelligenceV1beta2Entity 1553 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1554 } 1555 1556 // GoogleCloudVideointelligenceV1beta2ExplicitContentAnnotation: Explicit 1557 // content annotation (based on per-frame visual signals only). If no explicit 1558 // content has been detected in a frame, no annotations are present for that 1559 // frame. 1560 type GoogleCloudVideointelligenceV1beta2ExplicitContentAnnotation struct { 1561 // Frames: All video frames where explicit content was detected. 1562 Frames []*GoogleCloudVideointelligenceV1beta2ExplicitContentFrame `json:"frames,omitempty"` 1563 // Version: Feature version. 1564 Version string `json:"version,omitempty"` 1565 // ForceSendFields is a list of field names (e.g. "Frames") to unconditionally 1566 // include in API requests. By default, fields with empty or default values are 1567 // omitted from API requests. See 1568 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1569 // details. 1570 ForceSendFields []string `json:"-"` 1571 // NullFields is a list of field names (e.g. "Frames") to include in API 1572 // requests with the JSON null value. By default, fields with empty values are 1573 // omitted from API requests. See 1574 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1575 NullFields []string `json:"-"` 1576 } 1577 1578 func (s *GoogleCloudVideointelligenceV1beta2ExplicitContentAnnotation) MarshalJSON() ([]byte, error) { 1579 type NoMethod GoogleCloudVideointelligenceV1beta2ExplicitContentAnnotation 1580 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1581 } 1582 1583 // GoogleCloudVideointelligenceV1beta2ExplicitContentDetectionConfig: Config 1584 // for EXPLICIT_CONTENT_DETECTION. 1585 type GoogleCloudVideointelligenceV1beta2ExplicitContentDetectionConfig struct { 1586 // Model: Model to use for explicit content detection. Supported values: 1587 // "builtin/stable" (the default if unset) and "builtin/latest". 1588 Model string `json:"model,omitempty"` 1589 // ForceSendFields is a list of field names (e.g. "Model") to unconditionally 1590 // include in API requests. By default, fields with empty or default values are 1591 // omitted from API requests. See 1592 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1593 // details. 1594 ForceSendFields []string `json:"-"` 1595 // NullFields is a list of field names (e.g. "Model") to include in API 1596 // requests with the JSON null value. By default, fields with empty values are 1597 // omitted from API requests. See 1598 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1599 NullFields []string `json:"-"` 1600 } 1601 1602 func (s *GoogleCloudVideointelligenceV1beta2ExplicitContentDetectionConfig) MarshalJSON() ([]byte, error) { 1603 type NoMethod GoogleCloudVideointelligenceV1beta2ExplicitContentDetectionConfig 1604 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1605 } 1606 1607 // GoogleCloudVideointelligenceV1beta2ExplicitContentFrame: Video frame level 1608 // annotation results for explicit content. 1609 type GoogleCloudVideointelligenceV1beta2ExplicitContentFrame struct { 1610 // PornographyLikelihood: Likelihood of the pornography content.. 1611 // 1612 // Possible values: 1613 // "LIKELIHOOD_UNSPECIFIED" - Unspecified likelihood. 1614 // "VERY_UNLIKELY" - Very unlikely. 1615 // "UNLIKELY" - Unlikely. 1616 // "POSSIBLE" - Possible. 1617 // "LIKELY" - Likely. 1618 // "VERY_LIKELY" - Very likely. 1619 PornographyLikelihood string `json:"pornographyLikelihood,omitempty"` 1620 // TimeOffset: Time-offset, relative to the beginning of the video, 1621 // corresponding to the video frame for this location. 1622 TimeOffset string `json:"timeOffset,omitempty"` 1623 // ForceSendFields is a list of field names (e.g. "PornographyLikelihood") to 1624 // unconditionally include in API requests. By default, fields with empty or 1625 // default values are omitted from API requests. See 1626 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1627 // details. 1628 ForceSendFields []string `json:"-"` 1629 // NullFields is a list of field names (e.g. "PornographyLikelihood") to 1630 // include in API requests with the JSON null value. By default, fields with 1631 // empty values are omitted from API requests. See 1632 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1633 NullFields []string `json:"-"` 1634 } 1635 1636 func (s *GoogleCloudVideointelligenceV1beta2ExplicitContentFrame) MarshalJSON() ([]byte, error) { 1637 type NoMethod GoogleCloudVideointelligenceV1beta2ExplicitContentFrame 1638 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1639 } 1640 1641 // GoogleCloudVideointelligenceV1beta2FaceAnnotation: Deprecated. No effect. 1642 type GoogleCloudVideointelligenceV1beta2FaceAnnotation struct { 1643 // Frames: All video frames where a face was detected. 1644 Frames []*GoogleCloudVideointelligenceV1beta2FaceFrame `json:"frames,omitempty"` 1645 // Segments: All video segments where a face was detected. 1646 Segments []*GoogleCloudVideointelligenceV1beta2FaceSegment `json:"segments,omitempty"` 1647 // Thumbnail: Thumbnail of a representative face view (in JPEG format). 1648 Thumbnail string `json:"thumbnail,omitempty"` 1649 // ForceSendFields is a list of field names (e.g. "Frames") to unconditionally 1650 // include in API requests. By default, fields with empty or default values are 1651 // omitted from API requests. See 1652 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1653 // details. 1654 ForceSendFields []string `json:"-"` 1655 // NullFields is a list of field names (e.g. "Frames") to include in API 1656 // requests with the JSON null value. By default, fields with empty values are 1657 // omitted from API requests. See 1658 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1659 NullFields []string `json:"-"` 1660 } 1661 1662 func (s *GoogleCloudVideointelligenceV1beta2FaceAnnotation) MarshalJSON() ([]byte, error) { 1663 type NoMethod GoogleCloudVideointelligenceV1beta2FaceAnnotation 1664 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1665 } 1666 1667 // GoogleCloudVideointelligenceV1beta2FaceDetectionAnnotation: Face detection 1668 // annotation. 1669 type GoogleCloudVideointelligenceV1beta2FaceDetectionAnnotation struct { 1670 // Thumbnail: The thumbnail of a person's face. 1671 Thumbnail string `json:"thumbnail,omitempty"` 1672 // Tracks: The face tracks with attributes. 1673 Tracks []*GoogleCloudVideointelligenceV1beta2Track `json:"tracks,omitempty"` 1674 // Version: Feature version. 1675 Version string `json:"version,omitempty"` 1676 // ForceSendFields is a list of field names (e.g. "Thumbnail") to 1677 // unconditionally include in API requests. By default, fields with empty or 1678 // default values are omitted from API requests. See 1679 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1680 // details. 1681 ForceSendFields []string `json:"-"` 1682 // NullFields is a list of field names (e.g. "Thumbnail") to include in API 1683 // requests with the JSON null value. By default, fields with empty values are 1684 // omitted from API requests. See 1685 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1686 NullFields []string `json:"-"` 1687 } 1688 1689 func (s *GoogleCloudVideointelligenceV1beta2FaceDetectionAnnotation) MarshalJSON() ([]byte, error) { 1690 type NoMethod GoogleCloudVideointelligenceV1beta2FaceDetectionAnnotation 1691 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1692 } 1693 1694 // GoogleCloudVideointelligenceV1beta2FaceDetectionConfig: Config for 1695 // FACE_DETECTION. 1696 type GoogleCloudVideointelligenceV1beta2FaceDetectionConfig struct { 1697 // IncludeAttributes: Whether to enable face attributes detection, such as 1698 // glasses, dark_glasses, mouth_open etc. Ignored if 'include_bounding_boxes' 1699 // is set to false. 1700 IncludeAttributes bool `json:"includeAttributes,omitempty"` 1701 // IncludeBoundingBoxes: Whether bounding boxes are included in the face 1702 // annotation output. 1703 IncludeBoundingBoxes bool `json:"includeBoundingBoxes,omitempty"` 1704 // Model: Model to use for face detection. Supported values: "builtin/stable" 1705 // (the default if unset) and "builtin/latest". 1706 Model string `json:"model,omitempty"` 1707 // ForceSendFields is a list of field names (e.g. "IncludeAttributes") to 1708 // unconditionally include in API requests. By default, fields with empty or 1709 // default values are omitted from API requests. See 1710 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1711 // details. 1712 ForceSendFields []string `json:"-"` 1713 // NullFields is a list of field names (e.g. "IncludeAttributes") to include in 1714 // API requests with the JSON null value. By default, fields with empty values 1715 // are omitted from API requests. See 1716 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1717 NullFields []string `json:"-"` 1718 } 1719 1720 func (s *GoogleCloudVideointelligenceV1beta2FaceDetectionConfig) MarshalJSON() ([]byte, error) { 1721 type NoMethod GoogleCloudVideointelligenceV1beta2FaceDetectionConfig 1722 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1723 } 1724 1725 // GoogleCloudVideointelligenceV1beta2FaceFrame: Deprecated. No effect. 1726 type GoogleCloudVideointelligenceV1beta2FaceFrame struct { 1727 // NormalizedBoundingBoxes: Normalized Bounding boxes in a frame. There can be 1728 // more than one boxes if the same face is detected in multiple locations 1729 // within the current frame. 1730 NormalizedBoundingBoxes []*GoogleCloudVideointelligenceV1beta2NormalizedBoundingBox `json:"normalizedBoundingBoxes,omitempty"` 1731 // TimeOffset: Time-offset, relative to the beginning of the video, 1732 // corresponding to the video frame for this location. 1733 TimeOffset string `json:"timeOffset,omitempty"` 1734 // ForceSendFields is a list of field names (e.g. "NormalizedBoundingBoxes") to 1735 // unconditionally include in API requests. By default, fields with empty or 1736 // default values are omitted from API requests. See 1737 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1738 // details. 1739 ForceSendFields []string `json:"-"` 1740 // NullFields is a list of field names (e.g. "NormalizedBoundingBoxes") to 1741 // include in API requests with the JSON null value. By default, fields with 1742 // empty values are omitted from API requests. See 1743 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1744 NullFields []string `json:"-"` 1745 } 1746 1747 func (s *GoogleCloudVideointelligenceV1beta2FaceFrame) MarshalJSON() ([]byte, error) { 1748 type NoMethod GoogleCloudVideointelligenceV1beta2FaceFrame 1749 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1750 } 1751 1752 // GoogleCloudVideointelligenceV1beta2FaceSegment: Video segment level 1753 // annotation results for face detection. 1754 type GoogleCloudVideointelligenceV1beta2FaceSegment struct { 1755 // Segment: Video segment where a face was detected. 1756 Segment *GoogleCloudVideointelligenceV1beta2VideoSegment `json:"segment,omitempty"` 1757 // ForceSendFields is a list of field names (e.g. "Segment") to unconditionally 1758 // include in API requests. By default, fields with empty or default values are 1759 // omitted from API requests. See 1760 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1761 // details. 1762 ForceSendFields []string `json:"-"` 1763 // NullFields is a list of field names (e.g. "Segment") to include in API 1764 // requests with the JSON null value. By default, fields with empty values are 1765 // omitted from API requests. See 1766 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1767 NullFields []string `json:"-"` 1768 } 1769 1770 func (s *GoogleCloudVideointelligenceV1beta2FaceSegment) MarshalJSON() ([]byte, error) { 1771 type NoMethod GoogleCloudVideointelligenceV1beta2FaceSegment 1772 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1773 } 1774 1775 // GoogleCloudVideointelligenceV1beta2LabelAnnotation: Label annotation. 1776 type GoogleCloudVideointelligenceV1beta2LabelAnnotation struct { 1777 // CategoryEntities: Common categories for the detected entity. For example, 1778 // when the label is `Terrier`, the category is likely `dog`. And in some cases 1779 // there might be more than one categories e.g., `Terrier` could also be a 1780 // `pet`. 1781 CategoryEntities []*GoogleCloudVideointelligenceV1beta2Entity `json:"categoryEntities,omitempty"` 1782 // Entity: Detected entity. 1783 Entity *GoogleCloudVideointelligenceV1beta2Entity `json:"entity,omitempty"` 1784 // Frames: All video frames where a label was detected. 1785 Frames []*GoogleCloudVideointelligenceV1beta2LabelFrame `json:"frames,omitempty"` 1786 // Segments: All video segments where a label was detected. 1787 Segments []*GoogleCloudVideointelligenceV1beta2LabelSegment `json:"segments,omitempty"` 1788 // Version: Feature version. 1789 Version string `json:"version,omitempty"` 1790 // ForceSendFields is a list of field names (e.g. "CategoryEntities") to 1791 // unconditionally include in API requests. By default, fields with empty or 1792 // default values are omitted from API requests. See 1793 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1794 // details. 1795 ForceSendFields []string `json:"-"` 1796 // NullFields is a list of field names (e.g. "CategoryEntities") to include in 1797 // API requests with the JSON null value. By default, fields with empty values 1798 // are omitted from API requests. See 1799 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1800 NullFields []string `json:"-"` 1801 } 1802 1803 func (s *GoogleCloudVideointelligenceV1beta2LabelAnnotation) MarshalJSON() ([]byte, error) { 1804 type NoMethod GoogleCloudVideointelligenceV1beta2LabelAnnotation 1805 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1806 } 1807 1808 // GoogleCloudVideointelligenceV1beta2LabelDetectionConfig: Config for 1809 // LABEL_DETECTION. 1810 type GoogleCloudVideointelligenceV1beta2LabelDetectionConfig struct { 1811 // FrameConfidenceThreshold: The confidence threshold we perform filtering on 1812 // the labels from frame-level detection. If not set, it is set to 0.4 by 1813 // default. The valid range for this threshold is [0.1, 0.9]. Any value set 1814 // outside of this range will be clipped. Note: For best results, follow the 1815 // default threshold. We will update the default threshold everytime when we 1816 // release a new model. 1817 FrameConfidenceThreshold float64 `json:"frameConfidenceThreshold,omitempty"` 1818 // LabelDetectionMode: What labels should be detected with LABEL_DETECTION, in 1819 // addition to video-level labels or segment-level labels. If unspecified, 1820 // defaults to `SHOT_MODE`. 1821 // 1822 // Possible values: 1823 // "LABEL_DETECTION_MODE_UNSPECIFIED" - Unspecified. 1824 // "SHOT_MODE" - Detect shot-level labels. 1825 // "FRAME_MODE" - Detect frame-level labels. 1826 // "SHOT_AND_FRAME_MODE" - Detect both shot-level and frame-level labels. 1827 LabelDetectionMode string `json:"labelDetectionMode,omitempty"` 1828 // Model: Model to use for label detection. Supported values: "builtin/stable" 1829 // (the default if unset) and "builtin/latest". 1830 Model string `json:"model,omitempty"` 1831 // StationaryCamera: Whether the video has been shot from a stationary (i.e., 1832 // non-moving) camera. When set to true, might improve detection accuracy for 1833 // moving objects. Should be used with `SHOT_AND_FRAME_MODE` enabled. 1834 StationaryCamera bool `json:"stationaryCamera,omitempty"` 1835 // VideoConfidenceThreshold: The confidence threshold we perform filtering on 1836 // the labels from video-level and shot-level detections. If not set, it's set 1837 // to 0.3 by default. The valid range for this threshold is [0.1, 0.9]. Any 1838 // value set outside of this range will be clipped. Note: For best results, 1839 // follow the default threshold. We will update the default threshold everytime 1840 // when we release a new model. 1841 VideoConfidenceThreshold float64 `json:"videoConfidenceThreshold,omitempty"` 1842 // ForceSendFields is a list of field names (e.g. "FrameConfidenceThreshold") 1843 // to unconditionally include in API requests. By default, fields with empty or 1844 // default values are omitted from API requests. See 1845 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1846 // details. 1847 ForceSendFields []string `json:"-"` 1848 // NullFields is a list of field names (e.g. "FrameConfidenceThreshold") to 1849 // include in API requests with the JSON null value. By default, fields with 1850 // empty values are omitted from API requests. See 1851 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1852 NullFields []string `json:"-"` 1853 } 1854 1855 func (s *GoogleCloudVideointelligenceV1beta2LabelDetectionConfig) MarshalJSON() ([]byte, error) { 1856 type NoMethod GoogleCloudVideointelligenceV1beta2LabelDetectionConfig 1857 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1858 } 1859 1860 func (s *GoogleCloudVideointelligenceV1beta2LabelDetectionConfig) UnmarshalJSON(data []byte) error { 1861 type NoMethod GoogleCloudVideointelligenceV1beta2LabelDetectionConfig 1862 var s1 struct { 1863 FrameConfidenceThreshold gensupport.JSONFloat64 `json:"frameConfidenceThreshold"` 1864 VideoConfidenceThreshold gensupport.JSONFloat64 `json:"videoConfidenceThreshold"` 1865 *NoMethod 1866 } 1867 s1.NoMethod = (*NoMethod)(s) 1868 if err := json.Unmarshal(data, &s1); err != nil { 1869 return err 1870 } 1871 s.FrameConfidenceThreshold = float64(s1.FrameConfidenceThreshold) 1872 s.VideoConfidenceThreshold = float64(s1.VideoConfidenceThreshold) 1873 return nil 1874 } 1875 1876 // GoogleCloudVideointelligenceV1beta2LabelFrame: Video frame level annotation 1877 // results for label detection. 1878 type GoogleCloudVideointelligenceV1beta2LabelFrame struct { 1879 // Confidence: Confidence that the label is accurate. Range: [0, 1]. 1880 Confidence float64 `json:"confidence,omitempty"` 1881 // TimeOffset: Time-offset, relative to the beginning of the video, 1882 // corresponding to the video frame for this location. 1883 TimeOffset string `json:"timeOffset,omitempty"` 1884 // ForceSendFields is a list of field names (e.g. "Confidence") to 1885 // unconditionally include in API requests. By default, fields with empty or 1886 // default values are omitted from API requests. See 1887 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1888 // details. 1889 ForceSendFields []string `json:"-"` 1890 // NullFields is a list of field names (e.g. "Confidence") to include in API 1891 // requests with the JSON null value. By default, fields with empty values are 1892 // omitted from API requests. See 1893 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1894 NullFields []string `json:"-"` 1895 } 1896 1897 func (s *GoogleCloudVideointelligenceV1beta2LabelFrame) MarshalJSON() ([]byte, error) { 1898 type NoMethod GoogleCloudVideointelligenceV1beta2LabelFrame 1899 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1900 } 1901 1902 func (s *GoogleCloudVideointelligenceV1beta2LabelFrame) UnmarshalJSON(data []byte) error { 1903 type NoMethod GoogleCloudVideointelligenceV1beta2LabelFrame 1904 var s1 struct { 1905 Confidence gensupport.JSONFloat64 `json:"confidence"` 1906 *NoMethod 1907 } 1908 s1.NoMethod = (*NoMethod)(s) 1909 if err := json.Unmarshal(data, &s1); err != nil { 1910 return err 1911 } 1912 s.Confidence = float64(s1.Confidence) 1913 return nil 1914 } 1915 1916 // GoogleCloudVideointelligenceV1beta2LabelSegment: Video segment level 1917 // annotation results for label detection. 1918 type GoogleCloudVideointelligenceV1beta2LabelSegment struct { 1919 // Confidence: Confidence that the label is accurate. Range: [0, 1]. 1920 Confidence float64 `json:"confidence,omitempty"` 1921 // Segment: Video segment where a label was detected. 1922 Segment *GoogleCloudVideointelligenceV1beta2VideoSegment `json:"segment,omitempty"` 1923 // ForceSendFields is a list of field names (e.g. "Confidence") to 1924 // unconditionally include in API requests. By default, fields with empty or 1925 // default values are omitted from API requests. See 1926 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1927 // details. 1928 ForceSendFields []string `json:"-"` 1929 // NullFields is a list of field names (e.g. "Confidence") to include in API 1930 // requests with the JSON null value. By default, fields with empty values are 1931 // omitted from API requests. See 1932 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1933 NullFields []string `json:"-"` 1934 } 1935 1936 func (s *GoogleCloudVideointelligenceV1beta2LabelSegment) MarshalJSON() ([]byte, error) { 1937 type NoMethod GoogleCloudVideointelligenceV1beta2LabelSegment 1938 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1939 } 1940 1941 func (s *GoogleCloudVideointelligenceV1beta2LabelSegment) UnmarshalJSON(data []byte) error { 1942 type NoMethod GoogleCloudVideointelligenceV1beta2LabelSegment 1943 var s1 struct { 1944 Confidence gensupport.JSONFloat64 `json:"confidence"` 1945 *NoMethod 1946 } 1947 s1.NoMethod = (*NoMethod)(s) 1948 if err := json.Unmarshal(data, &s1); err != nil { 1949 return err 1950 } 1951 s.Confidence = float64(s1.Confidence) 1952 return nil 1953 } 1954 1955 // GoogleCloudVideointelligenceV1beta2LogoRecognitionAnnotation: Annotation 1956 // corresponding to one detected, tracked and recognized logo class. 1957 type GoogleCloudVideointelligenceV1beta2LogoRecognitionAnnotation struct { 1958 // Entity: Entity category information to specify the logo class that all the 1959 // logo tracks within this LogoRecognitionAnnotation are recognized as. 1960 Entity *GoogleCloudVideointelligenceV1beta2Entity `json:"entity,omitempty"` 1961 // Segments: All video segments where the recognized logo appears. There might 1962 // be multiple instances of the same logo class appearing in one VideoSegment. 1963 Segments []*GoogleCloudVideointelligenceV1beta2VideoSegment `json:"segments,omitempty"` 1964 // Tracks: All logo tracks where the recognized logo appears. Each track 1965 // corresponds to one logo instance appearing in consecutive frames. 1966 Tracks []*GoogleCloudVideointelligenceV1beta2Track `json:"tracks,omitempty"` 1967 // ForceSendFields is a list of field names (e.g. "Entity") to unconditionally 1968 // include in API requests. By default, fields with empty or default values are 1969 // omitted from API requests. See 1970 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1971 // details. 1972 ForceSendFields []string `json:"-"` 1973 // NullFields is a list of field names (e.g. "Entity") to include in API 1974 // requests with the JSON null value. By default, fields with empty values are 1975 // omitted from API requests. See 1976 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1977 NullFields []string `json:"-"` 1978 } 1979 1980 func (s *GoogleCloudVideointelligenceV1beta2LogoRecognitionAnnotation) MarshalJSON() ([]byte, error) { 1981 type NoMethod GoogleCloudVideointelligenceV1beta2LogoRecognitionAnnotation 1982 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1983 } 1984 1985 // GoogleCloudVideointelligenceV1beta2NormalizedBoundingBox: Normalized 1986 // bounding box. The normalized vertex coordinates are relative to the original 1987 // image. Range: [0, 1]. 1988 type GoogleCloudVideointelligenceV1beta2NormalizedBoundingBox struct { 1989 // Bottom: Bottom Y coordinate. 1990 Bottom float64 `json:"bottom,omitempty"` 1991 // Left: Left X coordinate. 1992 Left float64 `json:"left,omitempty"` 1993 // Right: Right X coordinate. 1994 Right float64 `json:"right,omitempty"` 1995 // Top: Top Y coordinate. 1996 Top float64 `json:"top,omitempty"` 1997 // ForceSendFields is a list of field names (e.g. "Bottom") to unconditionally 1998 // include in API requests. By default, fields with empty or default values are 1999 // omitted from API requests. See 2000 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2001 // details. 2002 ForceSendFields []string `json:"-"` 2003 // NullFields is a list of field names (e.g. "Bottom") to include in API 2004 // requests with the JSON null value. By default, fields with empty values are 2005 // omitted from API requests. See 2006 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2007 NullFields []string `json:"-"` 2008 } 2009 2010 func (s *GoogleCloudVideointelligenceV1beta2NormalizedBoundingBox) MarshalJSON() ([]byte, error) { 2011 type NoMethod GoogleCloudVideointelligenceV1beta2NormalizedBoundingBox 2012 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2013 } 2014 2015 func (s *GoogleCloudVideointelligenceV1beta2NormalizedBoundingBox) UnmarshalJSON(data []byte) error { 2016 type NoMethod GoogleCloudVideointelligenceV1beta2NormalizedBoundingBox 2017 var s1 struct { 2018 Bottom gensupport.JSONFloat64 `json:"bottom"` 2019 Left gensupport.JSONFloat64 `json:"left"` 2020 Right gensupport.JSONFloat64 `json:"right"` 2021 Top gensupport.JSONFloat64 `json:"top"` 2022 *NoMethod 2023 } 2024 s1.NoMethod = (*NoMethod)(s) 2025 if err := json.Unmarshal(data, &s1); err != nil { 2026 return err 2027 } 2028 s.Bottom = float64(s1.Bottom) 2029 s.Left = float64(s1.Left) 2030 s.Right = float64(s1.Right) 2031 s.Top = float64(s1.Top) 2032 return nil 2033 } 2034 2035 // GoogleCloudVideointelligenceV1beta2NormalizedBoundingPoly: Normalized 2036 // bounding polygon for text (that might not be aligned with axis). Contains 2037 // list of the corner points in clockwise order starting from top-left corner. 2038 // For example, for a rectangular bounding box: When the text is horizontal it 2039 // might look like: 0----1 | | 3----2 When it's clockwise rotated 180 degrees 2040 // around the top-left corner it becomes: 2----3 | | 1----0 and the vertex 2041 // order will still be (0, 1, 2, 3). Note that values can be less than 0, or 2042 // greater than 1 due to trignometric calculations for location of the box. 2043 type GoogleCloudVideointelligenceV1beta2NormalizedBoundingPoly struct { 2044 // Vertices: Normalized vertices of the bounding polygon. 2045 Vertices []*GoogleCloudVideointelligenceV1beta2NormalizedVertex `json:"vertices,omitempty"` 2046 // ForceSendFields is a list of field names (e.g. "Vertices") to 2047 // unconditionally include in API requests. By default, fields with empty or 2048 // default values are omitted from API requests. See 2049 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2050 // details. 2051 ForceSendFields []string `json:"-"` 2052 // NullFields is a list of field names (e.g. "Vertices") to include in API 2053 // requests with the JSON null value. By default, fields with empty values are 2054 // omitted from API requests. See 2055 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2056 NullFields []string `json:"-"` 2057 } 2058 2059 func (s *GoogleCloudVideointelligenceV1beta2NormalizedBoundingPoly) MarshalJSON() ([]byte, error) { 2060 type NoMethod GoogleCloudVideointelligenceV1beta2NormalizedBoundingPoly 2061 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2062 } 2063 2064 // GoogleCloudVideointelligenceV1beta2NormalizedVertex: A vertex represents a 2065 // 2D point in the image. NOTE: the normalized vertex coordinates are relative 2066 // to the original image and range from 0 to 1. 2067 type GoogleCloudVideointelligenceV1beta2NormalizedVertex struct { 2068 // X: X coordinate. 2069 X float64 `json:"x,omitempty"` 2070 // Y: Y coordinate. 2071 Y float64 `json:"y,omitempty"` 2072 // ForceSendFields is a list of field names (e.g. "X") to unconditionally 2073 // include in API requests. By default, fields with empty or default values are 2074 // omitted from API requests. See 2075 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2076 // details. 2077 ForceSendFields []string `json:"-"` 2078 // NullFields is a list of field names (e.g. "X") to include in API requests 2079 // with the JSON null value. By default, fields with empty values are omitted 2080 // from API requests. See 2081 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2082 NullFields []string `json:"-"` 2083 } 2084 2085 func (s *GoogleCloudVideointelligenceV1beta2NormalizedVertex) MarshalJSON() ([]byte, error) { 2086 type NoMethod GoogleCloudVideointelligenceV1beta2NormalizedVertex 2087 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2088 } 2089 2090 func (s *GoogleCloudVideointelligenceV1beta2NormalizedVertex) UnmarshalJSON(data []byte) error { 2091 type NoMethod GoogleCloudVideointelligenceV1beta2NormalizedVertex 2092 var s1 struct { 2093 X gensupport.JSONFloat64 `json:"x"` 2094 Y gensupport.JSONFloat64 `json:"y"` 2095 *NoMethod 2096 } 2097 s1.NoMethod = (*NoMethod)(s) 2098 if err := json.Unmarshal(data, &s1); err != nil { 2099 return err 2100 } 2101 s.X = float64(s1.X) 2102 s.Y = float64(s1.Y) 2103 return nil 2104 } 2105 2106 // GoogleCloudVideointelligenceV1beta2ObjectTrackingAnnotation: Annotations 2107 // corresponding to one tracked object. 2108 type GoogleCloudVideointelligenceV1beta2ObjectTrackingAnnotation struct { 2109 // Confidence: Object category's labeling confidence of this track. 2110 Confidence float64 `json:"confidence,omitempty"` 2111 // Entity: Entity to specify the object category that this track is labeled as. 2112 Entity *GoogleCloudVideointelligenceV1beta2Entity `json:"entity,omitempty"` 2113 // Frames: Information corresponding to all frames where this object track 2114 // appears. Non-streaming batch mode: it may be one or multiple 2115 // ObjectTrackingFrame messages in frames. Streaming mode: it can only be one 2116 // ObjectTrackingFrame message in frames. 2117 Frames []*GoogleCloudVideointelligenceV1beta2ObjectTrackingFrame `json:"frames,omitempty"` 2118 // Segment: Non-streaming batch mode ONLY. Each object track corresponds to one 2119 // video segment where it appears. 2120 Segment *GoogleCloudVideointelligenceV1beta2VideoSegment `json:"segment,omitempty"` 2121 // TrackId: Streaming mode ONLY. In streaming mode, we do not know the end time 2122 // of a tracked object before it is completed. Hence, there is no VideoSegment 2123 // info returned. Instead, we provide a unique identifiable integer track_id so 2124 // that the customers can correlate the results of the ongoing 2125 // ObjectTrackAnnotation of the same track_id over time. 2126 TrackId int64 `json:"trackId,omitempty,string"` 2127 // Version: Feature version. 2128 Version string `json:"version,omitempty"` 2129 // ForceSendFields is a list of field names (e.g. "Confidence") to 2130 // unconditionally include in API requests. By default, fields with empty or 2131 // default values are omitted from API requests. See 2132 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2133 // details. 2134 ForceSendFields []string `json:"-"` 2135 // NullFields is a list of field names (e.g. "Confidence") to include in API 2136 // requests with the JSON null value. By default, fields with empty values are 2137 // omitted from API requests. See 2138 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2139 NullFields []string `json:"-"` 2140 } 2141 2142 func (s *GoogleCloudVideointelligenceV1beta2ObjectTrackingAnnotation) MarshalJSON() ([]byte, error) { 2143 type NoMethod GoogleCloudVideointelligenceV1beta2ObjectTrackingAnnotation 2144 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2145 } 2146 2147 func (s *GoogleCloudVideointelligenceV1beta2ObjectTrackingAnnotation) UnmarshalJSON(data []byte) error { 2148 type NoMethod GoogleCloudVideointelligenceV1beta2ObjectTrackingAnnotation 2149 var s1 struct { 2150 Confidence gensupport.JSONFloat64 `json:"confidence"` 2151 *NoMethod 2152 } 2153 s1.NoMethod = (*NoMethod)(s) 2154 if err := json.Unmarshal(data, &s1); err != nil { 2155 return err 2156 } 2157 s.Confidence = float64(s1.Confidence) 2158 return nil 2159 } 2160 2161 // GoogleCloudVideointelligenceV1beta2ObjectTrackingConfig: Config for 2162 // OBJECT_TRACKING. 2163 type GoogleCloudVideointelligenceV1beta2ObjectTrackingConfig struct { 2164 // Model: Model to use for object tracking. Supported values: "builtin/stable" 2165 // (the default if unset) and "builtin/latest". 2166 Model string `json:"model,omitempty"` 2167 // ForceSendFields is a list of field names (e.g. "Model") to unconditionally 2168 // include in API requests. By default, fields with empty or default values are 2169 // omitted from API requests. See 2170 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2171 // details. 2172 ForceSendFields []string `json:"-"` 2173 // NullFields is a list of field names (e.g. "Model") to include in API 2174 // requests with the JSON null value. By default, fields with empty values are 2175 // omitted from API requests. See 2176 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2177 NullFields []string `json:"-"` 2178 } 2179 2180 func (s *GoogleCloudVideointelligenceV1beta2ObjectTrackingConfig) MarshalJSON() ([]byte, error) { 2181 type NoMethod GoogleCloudVideointelligenceV1beta2ObjectTrackingConfig 2182 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2183 } 2184 2185 // GoogleCloudVideointelligenceV1beta2ObjectTrackingFrame: Video frame level 2186 // annotations for object detection and tracking. This field stores per frame 2187 // location, time offset, and confidence. 2188 type GoogleCloudVideointelligenceV1beta2ObjectTrackingFrame struct { 2189 // NormalizedBoundingBox: The normalized bounding box location of this object 2190 // track for the frame. 2191 NormalizedBoundingBox *GoogleCloudVideointelligenceV1beta2NormalizedBoundingBox `json:"normalizedBoundingBox,omitempty"` 2192 // TimeOffset: The timestamp of the frame in microseconds. 2193 TimeOffset string `json:"timeOffset,omitempty"` 2194 // ForceSendFields is a list of field names (e.g. "NormalizedBoundingBox") to 2195 // unconditionally include in API requests. By default, fields with empty or 2196 // default values are omitted from API requests. See 2197 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2198 // details. 2199 ForceSendFields []string `json:"-"` 2200 // NullFields is a list of field names (e.g. "NormalizedBoundingBox") to 2201 // include in API requests with the JSON null value. By default, fields with 2202 // empty values are omitted from API requests. See 2203 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2204 NullFields []string `json:"-"` 2205 } 2206 2207 func (s *GoogleCloudVideointelligenceV1beta2ObjectTrackingFrame) MarshalJSON() ([]byte, error) { 2208 type NoMethod GoogleCloudVideointelligenceV1beta2ObjectTrackingFrame 2209 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2210 } 2211 2212 // GoogleCloudVideointelligenceV1beta2PersonDetectionAnnotation: Person 2213 // detection annotation per video. 2214 type GoogleCloudVideointelligenceV1beta2PersonDetectionAnnotation struct { 2215 // Tracks: The detected tracks of a person. 2216 Tracks []*GoogleCloudVideointelligenceV1beta2Track `json:"tracks,omitempty"` 2217 // Version: Feature version. 2218 Version string `json:"version,omitempty"` 2219 // ForceSendFields is a list of field names (e.g. "Tracks") to unconditionally 2220 // include in API requests. By default, fields with empty or default values are 2221 // omitted from API requests. See 2222 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2223 // details. 2224 ForceSendFields []string `json:"-"` 2225 // NullFields is a list of field names (e.g. "Tracks") to include in API 2226 // requests with the JSON null value. By default, fields with empty values are 2227 // omitted from API requests. See 2228 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2229 NullFields []string `json:"-"` 2230 } 2231 2232 func (s *GoogleCloudVideointelligenceV1beta2PersonDetectionAnnotation) MarshalJSON() ([]byte, error) { 2233 type NoMethod GoogleCloudVideointelligenceV1beta2PersonDetectionAnnotation 2234 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2235 } 2236 2237 // GoogleCloudVideointelligenceV1beta2PersonDetectionConfig: Config for 2238 // PERSON_DETECTION. 2239 type GoogleCloudVideointelligenceV1beta2PersonDetectionConfig struct { 2240 // IncludeAttributes: Whether to enable person attributes detection, such as 2241 // cloth color (black, blue, etc), type (coat, dress, etc), pattern (plain, 2242 // floral, etc), hair, etc. Ignored if 'include_bounding_boxes' is set to 2243 // false. 2244 IncludeAttributes bool `json:"includeAttributes,omitempty"` 2245 // IncludeBoundingBoxes: Whether bounding boxes are included in the person 2246 // detection annotation output. 2247 IncludeBoundingBoxes bool `json:"includeBoundingBoxes,omitempty"` 2248 // IncludePoseLandmarks: Whether to enable pose landmarks detection. Ignored if 2249 // 'include_bounding_boxes' is set to false. 2250 IncludePoseLandmarks bool `json:"includePoseLandmarks,omitempty"` 2251 // ForceSendFields is a list of field names (e.g. "IncludeAttributes") to 2252 // unconditionally include in API requests. By default, fields with empty or 2253 // default values are omitted from API requests. See 2254 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2255 // details. 2256 ForceSendFields []string `json:"-"` 2257 // NullFields is a list of field names (e.g. "IncludeAttributes") to include in 2258 // API requests with the JSON null value. By default, fields with empty values 2259 // are omitted from API requests. See 2260 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2261 NullFields []string `json:"-"` 2262 } 2263 2264 func (s *GoogleCloudVideointelligenceV1beta2PersonDetectionConfig) MarshalJSON() ([]byte, error) { 2265 type NoMethod GoogleCloudVideointelligenceV1beta2PersonDetectionConfig 2266 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2267 } 2268 2269 // GoogleCloudVideointelligenceV1beta2ShotChangeDetectionConfig: Config for 2270 // SHOT_CHANGE_DETECTION. 2271 type GoogleCloudVideointelligenceV1beta2ShotChangeDetectionConfig struct { 2272 // Model: Model to use for shot change detection. Supported values: 2273 // "builtin/stable" (the default if unset), "builtin/latest", and 2274 // "builtin/legacy". 2275 Model string `json:"model,omitempty"` 2276 // ForceSendFields is a list of field names (e.g. "Model") to unconditionally 2277 // include in API requests. By default, fields with empty or default values are 2278 // omitted from API requests. See 2279 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2280 // details. 2281 ForceSendFields []string `json:"-"` 2282 // NullFields is a list of field names (e.g. "Model") to include in API 2283 // requests with the JSON null value. By default, fields with empty values are 2284 // omitted from API requests. See 2285 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2286 NullFields []string `json:"-"` 2287 } 2288 2289 func (s *GoogleCloudVideointelligenceV1beta2ShotChangeDetectionConfig) MarshalJSON() ([]byte, error) { 2290 type NoMethod GoogleCloudVideointelligenceV1beta2ShotChangeDetectionConfig 2291 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2292 } 2293 2294 // GoogleCloudVideointelligenceV1beta2SpeechContext: Provides "hints" to the 2295 // speech recognizer to favor specific words and phrases in the results. 2296 type GoogleCloudVideointelligenceV1beta2SpeechContext struct { 2297 // Phrases: Optional. A list of strings containing words and phrases "hints" so 2298 // that the speech recognition is more likely to recognize them. This can be 2299 // used to improve the accuracy for specific words and phrases, for example, if 2300 // specific commands are typically spoken by the user. This can also be used to 2301 // add additional words to the vocabulary of the recognizer. See usage limits 2302 // (https://cloud.google.com/speech/limits#content). 2303 Phrases []string `json:"phrases,omitempty"` 2304 // ForceSendFields is a list of field names (e.g. "Phrases") to unconditionally 2305 // include in API requests. By default, fields with empty or default values are 2306 // omitted from API requests. See 2307 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2308 // details. 2309 ForceSendFields []string `json:"-"` 2310 // NullFields is a list of field names (e.g. "Phrases") to include in API 2311 // requests with the JSON null value. By default, fields with empty values are 2312 // omitted from API requests. See 2313 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2314 NullFields []string `json:"-"` 2315 } 2316 2317 func (s *GoogleCloudVideointelligenceV1beta2SpeechContext) MarshalJSON() ([]byte, error) { 2318 type NoMethod GoogleCloudVideointelligenceV1beta2SpeechContext 2319 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2320 } 2321 2322 // GoogleCloudVideointelligenceV1beta2SpeechRecognitionAlternative: Alternative 2323 // hypotheses (a.k.a. n-best list). 2324 type GoogleCloudVideointelligenceV1beta2SpeechRecognitionAlternative struct { 2325 // Confidence: Output only. The confidence estimate between 0.0 and 1.0. A 2326 // higher number indicates an estimated greater likelihood that the recognized 2327 // words are correct. This field is set only for the top alternative. This 2328 // field is not guaranteed to be accurate and users should not rely on it to be 2329 // always provided. The default of 0.0 is a sentinel value indicating 2330 // `confidence` was not set. 2331 Confidence float64 `json:"confidence,omitempty"` 2332 // Transcript: Transcript text representing the words that the user spoke. 2333 Transcript string `json:"transcript,omitempty"` 2334 // Words: Output only. A list of word-specific information for each recognized 2335 // word. Note: When `enable_speaker_diarization` is set to true, you will see 2336 // all the words from the beginning of the audio. 2337 Words []*GoogleCloudVideointelligenceV1beta2WordInfo `json:"words,omitempty"` 2338 // ForceSendFields is a list of field names (e.g. "Confidence") to 2339 // unconditionally include in API requests. By default, fields with empty or 2340 // default values are omitted from API requests. See 2341 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2342 // details. 2343 ForceSendFields []string `json:"-"` 2344 // NullFields is a list of field names (e.g. "Confidence") to include in API 2345 // requests with the JSON null value. By default, fields with empty values are 2346 // omitted from API requests. See 2347 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2348 NullFields []string `json:"-"` 2349 } 2350 2351 func (s *GoogleCloudVideointelligenceV1beta2SpeechRecognitionAlternative) MarshalJSON() ([]byte, error) { 2352 type NoMethod GoogleCloudVideointelligenceV1beta2SpeechRecognitionAlternative 2353 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2354 } 2355 2356 func (s *GoogleCloudVideointelligenceV1beta2SpeechRecognitionAlternative) UnmarshalJSON(data []byte) error { 2357 type NoMethod GoogleCloudVideointelligenceV1beta2SpeechRecognitionAlternative 2358 var s1 struct { 2359 Confidence gensupport.JSONFloat64 `json:"confidence"` 2360 *NoMethod 2361 } 2362 s1.NoMethod = (*NoMethod)(s) 2363 if err := json.Unmarshal(data, &s1); err != nil { 2364 return err 2365 } 2366 s.Confidence = float64(s1.Confidence) 2367 return nil 2368 } 2369 2370 // GoogleCloudVideointelligenceV1beta2SpeechTranscription: A speech recognition 2371 // result corresponding to a portion of the audio. 2372 type GoogleCloudVideointelligenceV1beta2SpeechTranscription struct { 2373 // Alternatives: May contain one or more recognition hypotheses (up to the 2374 // maximum specified in `max_alternatives`). These alternatives are ordered in 2375 // terms of accuracy, with the top (first) alternative being the most probable, 2376 // as ranked by the recognizer. 2377 Alternatives []*GoogleCloudVideointelligenceV1beta2SpeechRecognitionAlternative `json:"alternatives,omitempty"` 2378 // LanguageCode: Output only. The BCP-47 2379 // (https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of the language 2380 // in this result. This language code was detected to have the most likelihood 2381 // of being spoken in the audio. 2382 LanguageCode string `json:"languageCode,omitempty"` 2383 // ForceSendFields is a list of field names (e.g. "Alternatives") to 2384 // unconditionally include in API requests. By default, fields with empty or 2385 // default values are omitted from API requests. See 2386 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2387 // details. 2388 ForceSendFields []string `json:"-"` 2389 // NullFields is a list of field names (e.g. "Alternatives") to include in API 2390 // requests with the JSON null value. By default, fields with empty values are 2391 // omitted from API requests. See 2392 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2393 NullFields []string `json:"-"` 2394 } 2395 2396 func (s *GoogleCloudVideointelligenceV1beta2SpeechTranscription) MarshalJSON() ([]byte, error) { 2397 type NoMethod GoogleCloudVideointelligenceV1beta2SpeechTranscription 2398 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2399 } 2400 2401 // GoogleCloudVideointelligenceV1beta2SpeechTranscriptionConfig: Config for 2402 // SPEECH_TRANSCRIPTION. 2403 type GoogleCloudVideointelligenceV1beta2SpeechTranscriptionConfig struct { 2404 // AudioTracks: Optional. For file formats, such as MXF or MKV, supporting 2405 // multiple audio tracks, specify up to two tracks. Default: track 0. 2406 AudioTracks []int64 `json:"audioTracks,omitempty"` 2407 // DiarizationSpeakerCount: Optional. If set, specifies the estimated number of 2408 // speakers in the conversation. If not set, defaults to '2'. Ignored unless 2409 // enable_speaker_diarization is set to true. 2410 DiarizationSpeakerCount int64 `json:"diarizationSpeakerCount,omitempty"` 2411 // EnableAutomaticPunctuation: Optional. If 'true', adds punctuation to 2412 // recognition result hypotheses. This feature is only available in select 2413 // languages. Setting this for requests in other languages has no effect at 2414 // all. The default 'false' value does not add punctuation to result 2415 // hypotheses. NOTE: "This is currently offered as an experimental service, 2416 // complimentary to all users. In the future this may be exclusively available 2417 // as a premium feature." 2418 EnableAutomaticPunctuation bool `json:"enableAutomaticPunctuation,omitempty"` 2419 // EnableSpeakerDiarization: Optional. If 'true', enables speaker detection for 2420 // each recognized word in the top alternative of the recognition result using 2421 // a speaker_tag provided in the WordInfo. Note: When this is true, we send all 2422 // the words from the beginning of the audio for the top alternative in every 2423 // consecutive response. This is done in order to improve our speaker tags as 2424 // our models learn to identify the speakers in the conversation over time. 2425 EnableSpeakerDiarization bool `json:"enableSpeakerDiarization,omitempty"` 2426 // EnableWordConfidence: Optional. If `true`, the top result includes a list of 2427 // words and the confidence for those words. If `false`, no word-level 2428 // confidence information is returned. The default is `false`. 2429 EnableWordConfidence bool `json:"enableWordConfidence,omitempty"` 2430 // FilterProfanity: Optional. If set to `true`, the server will attempt to 2431 // filter out profanities, replacing all but the initial character in each 2432 // filtered word with asterisks, e.g. "f***". If set to `false` or omitted, 2433 // profanities won't be filtered out. 2434 FilterProfanity bool `json:"filterProfanity,omitempty"` 2435 // LanguageCode: Required. *Required* The language of the supplied audio as a 2436 // BCP-47 (https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. Example: 2437 // "en-US". See Language Support 2438 // (https://cloud.google.com/speech/docs/languages) for a list of the currently 2439 // supported language codes. 2440 LanguageCode string `json:"languageCode,omitempty"` 2441 // MaxAlternatives: Optional. Maximum number of recognition hypotheses to be 2442 // returned. Specifically, the maximum number of `SpeechRecognitionAlternative` 2443 // messages within each `SpeechTranscription`. The server may return fewer than 2444 // `max_alternatives`. Valid values are `0`-`30`. A value of `0` or `1` will 2445 // return a maximum of one. If omitted, will return a maximum of one. 2446 MaxAlternatives int64 `json:"maxAlternatives,omitempty"` 2447 // SpeechContexts: Optional. A means to provide context to assist the speech 2448 // recognition. 2449 SpeechContexts []*GoogleCloudVideointelligenceV1beta2SpeechContext `json:"speechContexts,omitempty"` 2450 // ForceSendFields is a list of field names (e.g. "AudioTracks") to 2451 // unconditionally include in API requests. By default, fields with empty or 2452 // default values are omitted from API requests. See 2453 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2454 // details. 2455 ForceSendFields []string `json:"-"` 2456 // NullFields is a list of field names (e.g. "AudioTracks") to include in API 2457 // requests with the JSON null value. By default, fields with empty values are 2458 // omitted from API requests. See 2459 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2460 NullFields []string `json:"-"` 2461 } 2462 2463 func (s *GoogleCloudVideointelligenceV1beta2SpeechTranscriptionConfig) MarshalJSON() ([]byte, error) { 2464 type NoMethod GoogleCloudVideointelligenceV1beta2SpeechTranscriptionConfig 2465 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2466 } 2467 2468 // GoogleCloudVideointelligenceV1beta2TextAnnotation: Annotations related to 2469 // one detected OCR text snippet. This will contain the corresponding text, 2470 // confidence value, and frame level information for each detection. 2471 type GoogleCloudVideointelligenceV1beta2TextAnnotation struct { 2472 // Segments: All video segments where OCR detected text appears. 2473 Segments []*GoogleCloudVideointelligenceV1beta2TextSegment `json:"segments,omitempty"` 2474 // Text: The detected text. 2475 Text string `json:"text,omitempty"` 2476 // Version: Feature version. 2477 Version string `json:"version,omitempty"` 2478 // ForceSendFields is a list of field names (e.g. "Segments") to 2479 // unconditionally include in API requests. By default, fields with empty or 2480 // default values are omitted from API requests. See 2481 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2482 // details. 2483 ForceSendFields []string `json:"-"` 2484 // NullFields is a list of field names (e.g. "Segments") to include in API 2485 // requests with the JSON null value. By default, fields with empty values are 2486 // omitted from API requests. See 2487 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2488 NullFields []string `json:"-"` 2489 } 2490 2491 func (s *GoogleCloudVideointelligenceV1beta2TextAnnotation) MarshalJSON() ([]byte, error) { 2492 type NoMethod GoogleCloudVideointelligenceV1beta2TextAnnotation 2493 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2494 } 2495 2496 // GoogleCloudVideointelligenceV1beta2TextDetectionConfig: Config for 2497 // TEXT_DETECTION. 2498 type GoogleCloudVideointelligenceV1beta2TextDetectionConfig struct { 2499 // LanguageHints: Language hint can be specified if the language to be detected 2500 // is known a priori. It can increase the accuracy of the detection. Language 2501 // hint must be language code in BCP-47 format. Automatic language detection is 2502 // performed if no hint is provided. 2503 LanguageHints []string `json:"languageHints,omitempty"` 2504 // Model: Model to use for text detection. Supported values: "builtin/stable" 2505 // (the default if unset) and "builtin/latest". 2506 Model string `json:"model,omitempty"` 2507 // ForceSendFields is a list of field names (e.g. "LanguageHints") to 2508 // unconditionally include in API requests. By default, fields with empty or 2509 // default values are omitted from API requests. See 2510 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2511 // details. 2512 ForceSendFields []string `json:"-"` 2513 // NullFields is a list of field names (e.g. "LanguageHints") to include in API 2514 // requests with the JSON null value. By default, fields with empty values are 2515 // omitted from API requests. See 2516 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2517 NullFields []string `json:"-"` 2518 } 2519 2520 func (s *GoogleCloudVideointelligenceV1beta2TextDetectionConfig) MarshalJSON() ([]byte, error) { 2521 type NoMethod GoogleCloudVideointelligenceV1beta2TextDetectionConfig 2522 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2523 } 2524 2525 // GoogleCloudVideointelligenceV1beta2TextFrame: Video frame level annotation 2526 // results for text annotation (OCR). Contains information regarding timestamp 2527 // and bounding box locations for the frames containing detected OCR text 2528 // snippets. 2529 type GoogleCloudVideointelligenceV1beta2TextFrame struct { 2530 // RotatedBoundingBox: Bounding polygon of the detected text for this frame. 2531 RotatedBoundingBox *GoogleCloudVideointelligenceV1beta2NormalizedBoundingPoly `json:"rotatedBoundingBox,omitempty"` 2532 // TimeOffset: Timestamp of this frame. 2533 TimeOffset string `json:"timeOffset,omitempty"` 2534 // ForceSendFields is a list of field names (e.g. "RotatedBoundingBox") to 2535 // unconditionally include in API requests. By default, fields with empty or 2536 // default values are omitted from API requests. See 2537 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2538 // details. 2539 ForceSendFields []string `json:"-"` 2540 // NullFields is a list of field names (e.g. "RotatedBoundingBox") to include 2541 // in API requests with the JSON null value. By default, fields with empty 2542 // values are omitted from API requests. See 2543 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2544 NullFields []string `json:"-"` 2545 } 2546 2547 func (s *GoogleCloudVideointelligenceV1beta2TextFrame) MarshalJSON() ([]byte, error) { 2548 type NoMethod GoogleCloudVideointelligenceV1beta2TextFrame 2549 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2550 } 2551 2552 // GoogleCloudVideointelligenceV1beta2TextSegment: Video segment level 2553 // annotation results for text detection. 2554 type GoogleCloudVideointelligenceV1beta2TextSegment struct { 2555 // Confidence: Confidence for the track of detected text. It is calculated as 2556 // the highest over all frames where OCR detected text appears. 2557 Confidence float64 `json:"confidence,omitempty"` 2558 // Frames: Information related to the frames where OCR detected text appears. 2559 Frames []*GoogleCloudVideointelligenceV1beta2TextFrame `json:"frames,omitempty"` 2560 // Segment: Video segment where a text snippet was detected. 2561 Segment *GoogleCloudVideointelligenceV1beta2VideoSegment `json:"segment,omitempty"` 2562 // ForceSendFields is a list of field names (e.g. "Confidence") to 2563 // unconditionally include in API requests. By default, fields with empty or 2564 // default values are omitted from API requests. See 2565 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2566 // details. 2567 ForceSendFields []string `json:"-"` 2568 // NullFields is a list of field names (e.g. "Confidence") to include in API 2569 // requests with the JSON null value. By default, fields with empty values are 2570 // omitted from API requests. See 2571 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2572 NullFields []string `json:"-"` 2573 } 2574 2575 func (s *GoogleCloudVideointelligenceV1beta2TextSegment) MarshalJSON() ([]byte, error) { 2576 type NoMethod GoogleCloudVideointelligenceV1beta2TextSegment 2577 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2578 } 2579 2580 func (s *GoogleCloudVideointelligenceV1beta2TextSegment) UnmarshalJSON(data []byte) error { 2581 type NoMethod GoogleCloudVideointelligenceV1beta2TextSegment 2582 var s1 struct { 2583 Confidence gensupport.JSONFloat64 `json:"confidence"` 2584 *NoMethod 2585 } 2586 s1.NoMethod = (*NoMethod)(s) 2587 if err := json.Unmarshal(data, &s1); err != nil { 2588 return err 2589 } 2590 s.Confidence = float64(s1.Confidence) 2591 return nil 2592 } 2593 2594 // GoogleCloudVideointelligenceV1beta2TimestampedObject: For tracking related 2595 // features. An object at time_offset with attributes, and located with 2596 // normalized_bounding_box. 2597 type GoogleCloudVideointelligenceV1beta2TimestampedObject struct { 2598 // Attributes: Optional. The attributes of the object in the bounding box. 2599 Attributes []*GoogleCloudVideointelligenceV1beta2DetectedAttribute `json:"attributes,omitempty"` 2600 // Landmarks: Optional. The detected landmarks. 2601 Landmarks []*GoogleCloudVideointelligenceV1beta2DetectedLandmark `json:"landmarks,omitempty"` 2602 // NormalizedBoundingBox: Normalized Bounding box in a frame, where the object 2603 // is located. 2604 NormalizedBoundingBox *GoogleCloudVideointelligenceV1beta2NormalizedBoundingBox `json:"normalizedBoundingBox,omitempty"` 2605 // TimeOffset: Time-offset, relative to the beginning of the video, 2606 // corresponding to the video frame for this object. 2607 TimeOffset string `json:"timeOffset,omitempty"` 2608 // ForceSendFields is a list of field names (e.g. "Attributes") to 2609 // unconditionally include in API requests. By default, fields with empty or 2610 // default values are omitted from API requests. See 2611 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2612 // details. 2613 ForceSendFields []string `json:"-"` 2614 // NullFields is a list of field names (e.g. "Attributes") to include in API 2615 // requests with the JSON null value. By default, fields with empty values are 2616 // omitted from API requests. See 2617 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2618 NullFields []string `json:"-"` 2619 } 2620 2621 func (s *GoogleCloudVideointelligenceV1beta2TimestampedObject) MarshalJSON() ([]byte, error) { 2622 type NoMethod GoogleCloudVideointelligenceV1beta2TimestampedObject 2623 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2624 } 2625 2626 // GoogleCloudVideointelligenceV1beta2Track: A track of an object instance. 2627 type GoogleCloudVideointelligenceV1beta2Track struct { 2628 // Attributes: Optional. Attributes in the track level. 2629 Attributes []*GoogleCloudVideointelligenceV1beta2DetectedAttribute `json:"attributes,omitempty"` 2630 // Confidence: Optional. The confidence score of the tracked object. 2631 Confidence float64 `json:"confidence,omitempty"` 2632 // Segment: Video segment of a track. 2633 Segment *GoogleCloudVideointelligenceV1beta2VideoSegment `json:"segment,omitempty"` 2634 // TimestampedObjects: The object with timestamp and attributes per frame in 2635 // the track. 2636 TimestampedObjects []*GoogleCloudVideointelligenceV1beta2TimestampedObject `json:"timestampedObjects,omitempty"` 2637 // ForceSendFields is a list of field names (e.g. "Attributes") to 2638 // unconditionally include in API requests. By default, fields with empty or 2639 // default values are omitted from API requests. See 2640 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2641 // details. 2642 ForceSendFields []string `json:"-"` 2643 // NullFields is a list of field names (e.g. "Attributes") to include in API 2644 // requests with the JSON null value. By default, fields with empty values are 2645 // omitted from API requests. See 2646 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2647 NullFields []string `json:"-"` 2648 } 2649 2650 func (s *GoogleCloudVideointelligenceV1beta2Track) MarshalJSON() ([]byte, error) { 2651 type NoMethod GoogleCloudVideointelligenceV1beta2Track 2652 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2653 } 2654 2655 func (s *GoogleCloudVideointelligenceV1beta2Track) UnmarshalJSON(data []byte) error { 2656 type NoMethod GoogleCloudVideointelligenceV1beta2Track 2657 var s1 struct { 2658 Confidence gensupport.JSONFloat64 `json:"confidence"` 2659 *NoMethod 2660 } 2661 s1.NoMethod = (*NoMethod)(s) 2662 if err := json.Unmarshal(data, &s1); err != nil { 2663 return err 2664 } 2665 s.Confidence = float64(s1.Confidence) 2666 return nil 2667 } 2668 2669 // GoogleCloudVideointelligenceV1beta2VideoAnnotationProgress: Annotation 2670 // progress for a single video. 2671 type GoogleCloudVideointelligenceV1beta2VideoAnnotationProgress struct { 2672 // Feature: Specifies which feature is being tracked if the request contains 2673 // more than one feature. 2674 // 2675 // Possible values: 2676 // "FEATURE_UNSPECIFIED" - Unspecified. 2677 // "LABEL_DETECTION" - Label detection. Detect objects, such as dog or 2678 // flower. 2679 // "SHOT_CHANGE_DETECTION" - Shot change detection. 2680 // "EXPLICIT_CONTENT_DETECTION" - Explicit content detection. 2681 // "FACE_DETECTION" - Human face detection. 2682 // "SPEECH_TRANSCRIPTION" - Speech transcription. 2683 // "TEXT_DETECTION" - OCR text detection and tracking. 2684 // "OBJECT_TRACKING" - Object detection and tracking. 2685 // "LOGO_RECOGNITION" - Logo detection, tracking, and recognition. 2686 // "PERSON_DETECTION" - Person detection. 2687 Feature string `json:"feature,omitempty"` 2688 // InputUri: Video file location in Cloud Storage 2689 // (https://cloud.google.com/storage/). 2690 InputUri string `json:"inputUri,omitempty"` 2691 // ProgressPercent: Approximate percentage processed thus far. Guaranteed to be 2692 // 100 when fully processed. 2693 ProgressPercent int64 `json:"progressPercent,omitempty"` 2694 // Segment: Specifies which segment is being tracked if the request contains 2695 // more than one segment. 2696 Segment *GoogleCloudVideointelligenceV1beta2VideoSegment `json:"segment,omitempty"` 2697 // StartTime: Time when the request was received. 2698 StartTime string `json:"startTime,omitempty"` 2699 // UpdateTime: Time of the most recent update. 2700 UpdateTime string `json:"updateTime,omitempty"` 2701 // ForceSendFields is a list of field names (e.g. "Feature") to unconditionally 2702 // include in API requests. By default, fields with empty or default values are 2703 // omitted from API requests. See 2704 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2705 // details. 2706 ForceSendFields []string `json:"-"` 2707 // NullFields is a list of field names (e.g. "Feature") to include in API 2708 // requests with the JSON null value. By default, fields with empty values are 2709 // omitted from API requests. See 2710 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2711 NullFields []string `json:"-"` 2712 } 2713 2714 func (s *GoogleCloudVideointelligenceV1beta2VideoAnnotationProgress) MarshalJSON() ([]byte, error) { 2715 type NoMethod GoogleCloudVideointelligenceV1beta2VideoAnnotationProgress 2716 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2717 } 2718 2719 // GoogleCloudVideointelligenceV1beta2VideoAnnotationResults: Annotation 2720 // results for a single video. 2721 type GoogleCloudVideointelligenceV1beta2VideoAnnotationResults struct { 2722 // Error: If set, indicates an error. Note that for a single 2723 // `AnnotateVideoRequest` some videos may succeed and some may fail. 2724 Error *GoogleRpcStatus `json:"error,omitempty"` 2725 // ExplicitAnnotation: Explicit content annotation. 2726 ExplicitAnnotation *GoogleCloudVideointelligenceV1beta2ExplicitContentAnnotation `json:"explicitAnnotation,omitempty"` 2727 // FaceAnnotations: Deprecated. Please use `face_detection_annotations` 2728 // instead. 2729 FaceAnnotations []*GoogleCloudVideointelligenceV1beta2FaceAnnotation `json:"faceAnnotations,omitempty"` 2730 // FaceDetectionAnnotations: Face detection annotations. 2731 FaceDetectionAnnotations []*GoogleCloudVideointelligenceV1beta2FaceDetectionAnnotation `json:"faceDetectionAnnotations,omitempty"` 2732 // FrameLabelAnnotations: Label annotations on frame level. There is exactly 2733 // one element for each unique label. 2734 FrameLabelAnnotations []*GoogleCloudVideointelligenceV1beta2LabelAnnotation `json:"frameLabelAnnotations,omitempty"` 2735 // InputUri: Video file location in Cloud Storage 2736 // (https://cloud.google.com/storage/). 2737 InputUri string `json:"inputUri,omitempty"` 2738 // LogoRecognitionAnnotations: Annotations for list of logos detected, tracked 2739 // and recognized in video. 2740 LogoRecognitionAnnotations []*GoogleCloudVideointelligenceV1beta2LogoRecognitionAnnotation `json:"logoRecognitionAnnotations,omitempty"` 2741 // ObjectAnnotations: Annotations for list of objects detected and tracked in 2742 // video. 2743 ObjectAnnotations []*GoogleCloudVideointelligenceV1beta2ObjectTrackingAnnotation `json:"objectAnnotations,omitempty"` 2744 // PersonDetectionAnnotations: Person detection annotations. 2745 PersonDetectionAnnotations []*GoogleCloudVideointelligenceV1beta2PersonDetectionAnnotation `json:"personDetectionAnnotations,omitempty"` 2746 // Segment: Video segment on which the annotation is run. 2747 Segment *GoogleCloudVideointelligenceV1beta2VideoSegment `json:"segment,omitempty"` 2748 // SegmentLabelAnnotations: Topical label annotations on video level or 2749 // user-specified segment level. There is exactly one element for each unique 2750 // label. 2751 SegmentLabelAnnotations []*GoogleCloudVideointelligenceV1beta2LabelAnnotation `json:"segmentLabelAnnotations,omitempty"` 2752 // SegmentPresenceLabelAnnotations: Presence label annotations on video level 2753 // or user-specified segment level. There is exactly one element for each 2754 // unique label. Compared to the existing topical `segment_label_annotations`, 2755 // this field presents more fine-grained, segment-level labels detected in 2756 // video content and is made available only when the client sets 2757 // `LabelDetectionConfig.model` to "builtin/latest" in the request. 2758 SegmentPresenceLabelAnnotations []*GoogleCloudVideointelligenceV1beta2LabelAnnotation `json:"segmentPresenceLabelAnnotations,omitempty"` 2759 // ShotAnnotations: Shot annotations. Each shot is represented as a video 2760 // segment. 2761 ShotAnnotations []*GoogleCloudVideointelligenceV1beta2VideoSegment `json:"shotAnnotations,omitempty"` 2762 // ShotLabelAnnotations: Topical label annotations on shot level. There is 2763 // exactly one element for each unique label. 2764 ShotLabelAnnotations []*GoogleCloudVideointelligenceV1beta2LabelAnnotation `json:"shotLabelAnnotations,omitempty"` 2765 // ShotPresenceLabelAnnotations: Presence label annotations on shot level. 2766 // There is exactly one element for each unique label. Compared to the existing 2767 // topical `shot_label_annotations`, this field presents more fine-grained, 2768 // shot-level labels detected in video content and is made available only when 2769 // the client sets `LabelDetectionConfig.model` to "builtin/latest" in the 2770 // request. 2771 ShotPresenceLabelAnnotations []*GoogleCloudVideointelligenceV1beta2LabelAnnotation `json:"shotPresenceLabelAnnotations,omitempty"` 2772 // SpeechTranscriptions: Speech transcription. 2773 SpeechTranscriptions []*GoogleCloudVideointelligenceV1beta2SpeechTranscription `json:"speechTranscriptions,omitempty"` 2774 // TextAnnotations: OCR text detection and tracking. Annotations for list of 2775 // detected text snippets. Each will have list of frame information associated 2776 // with it. 2777 TextAnnotations []*GoogleCloudVideointelligenceV1beta2TextAnnotation `json:"textAnnotations,omitempty"` 2778 // ForceSendFields is a list of field names (e.g. "Error") to unconditionally 2779 // include in API requests. By default, fields with empty or default values are 2780 // omitted from API requests. See 2781 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2782 // details. 2783 ForceSendFields []string `json:"-"` 2784 // NullFields is a list of field names (e.g. "Error") to include in API 2785 // requests with the JSON null value. By default, fields with empty values are 2786 // omitted from API requests. See 2787 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2788 NullFields []string `json:"-"` 2789 } 2790 2791 func (s *GoogleCloudVideointelligenceV1beta2VideoAnnotationResults) MarshalJSON() ([]byte, error) { 2792 type NoMethod GoogleCloudVideointelligenceV1beta2VideoAnnotationResults 2793 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2794 } 2795 2796 // GoogleCloudVideointelligenceV1beta2VideoContext: Video context and/or 2797 // feature-specific parameters. 2798 type GoogleCloudVideointelligenceV1beta2VideoContext struct { 2799 // ExplicitContentDetectionConfig: Config for EXPLICIT_CONTENT_DETECTION. 2800 ExplicitContentDetectionConfig *GoogleCloudVideointelligenceV1beta2ExplicitContentDetectionConfig `json:"explicitContentDetectionConfig,omitempty"` 2801 // FaceDetectionConfig: Config for FACE_DETECTION. 2802 FaceDetectionConfig *GoogleCloudVideointelligenceV1beta2FaceDetectionConfig `json:"faceDetectionConfig,omitempty"` 2803 // LabelDetectionConfig: Config for LABEL_DETECTION. 2804 LabelDetectionConfig *GoogleCloudVideointelligenceV1beta2LabelDetectionConfig `json:"labelDetectionConfig,omitempty"` 2805 // ObjectTrackingConfig: Config for OBJECT_TRACKING. 2806 ObjectTrackingConfig *GoogleCloudVideointelligenceV1beta2ObjectTrackingConfig `json:"objectTrackingConfig,omitempty"` 2807 // PersonDetectionConfig: Config for PERSON_DETECTION. 2808 PersonDetectionConfig *GoogleCloudVideointelligenceV1beta2PersonDetectionConfig `json:"personDetectionConfig,omitempty"` 2809 // Segments: Video segments to annotate. The segments may overlap and are not 2810 // required to be contiguous or span the whole video. If unspecified, each 2811 // video is treated as a single segment. 2812 Segments []*GoogleCloudVideointelligenceV1beta2VideoSegment `json:"segments,omitempty"` 2813 // ShotChangeDetectionConfig: Config for SHOT_CHANGE_DETECTION. 2814 ShotChangeDetectionConfig *GoogleCloudVideointelligenceV1beta2ShotChangeDetectionConfig `json:"shotChangeDetectionConfig,omitempty"` 2815 // SpeechTranscriptionConfig: Config for SPEECH_TRANSCRIPTION. 2816 SpeechTranscriptionConfig *GoogleCloudVideointelligenceV1beta2SpeechTranscriptionConfig `json:"speechTranscriptionConfig,omitempty"` 2817 // TextDetectionConfig: Config for TEXT_DETECTION. 2818 TextDetectionConfig *GoogleCloudVideointelligenceV1beta2TextDetectionConfig `json:"textDetectionConfig,omitempty"` 2819 // ForceSendFields is a list of field names (e.g. 2820 // "ExplicitContentDetectionConfig") to unconditionally include in API 2821 // requests. By default, fields with empty or default values are omitted from 2822 // API requests. See 2823 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2824 // details. 2825 ForceSendFields []string `json:"-"` 2826 // NullFields is a list of field names (e.g. "ExplicitContentDetectionConfig") 2827 // to include in API requests with the JSON null value. By default, fields with 2828 // empty values are omitted from API requests. See 2829 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2830 NullFields []string `json:"-"` 2831 } 2832 2833 func (s *GoogleCloudVideointelligenceV1beta2VideoContext) MarshalJSON() ([]byte, error) { 2834 type NoMethod GoogleCloudVideointelligenceV1beta2VideoContext 2835 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2836 } 2837 2838 // GoogleCloudVideointelligenceV1beta2VideoSegment: Video segment. 2839 type GoogleCloudVideointelligenceV1beta2VideoSegment struct { 2840 // EndTimeOffset: Time-offset, relative to the beginning of the video, 2841 // corresponding to the end of the segment (inclusive). 2842 EndTimeOffset string `json:"endTimeOffset,omitempty"` 2843 // StartTimeOffset: Time-offset, relative to the beginning of the video, 2844 // corresponding to the start of the segment (inclusive). 2845 StartTimeOffset string `json:"startTimeOffset,omitempty"` 2846 // ForceSendFields is a list of field names (e.g. "EndTimeOffset") to 2847 // unconditionally include in API requests. By default, fields with empty or 2848 // default values are omitted from API requests. See 2849 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2850 // details. 2851 ForceSendFields []string `json:"-"` 2852 // NullFields is a list of field names (e.g. "EndTimeOffset") to include in API 2853 // requests with the JSON null value. By default, fields with empty values are 2854 // omitted from API requests. See 2855 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2856 NullFields []string `json:"-"` 2857 } 2858 2859 func (s *GoogleCloudVideointelligenceV1beta2VideoSegment) MarshalJSON() ([]byte, error) { 2860 type NoMethod GoogleCloudVideointelligenceV1beta2VideoSegment 2861 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2862 } 2863 2864 // GoogleCloudVideointelligenceV1beta2WordInfo: Word-specific information for 2865 // recognized words. Word information is only included in the response when 2866 // certain request parameters are set, such as `enable_word_time_offsets`. 2867 type GoogleCloudVideointelligenceV1beta2WordInfo struct { 2868 // Confidence: Output only. The confidence estimate between 0.0 and 1.0. A 2869 // higher number indicates an estimated greater likelihood that the recognized 2870 // words are correct. This field is set only for the top alternative. This 2871 // field is not guaranteed to be accurate and users should not rely on it to be 2872 // always provided. The default of 0.0 is a sentinel value indicating 2873 // `confidence` was not set. 2874 Confidence float64 `json:"confidence,omitempty"` 2875 // EndTime: Time offset relative to the beginning of the audio, and 2876 // corresponding to the end of the spoken word. This field is only set if 2877 // `enable_word_time_offsets=true` and only in the top hypothesis. This is an 2878 // experimental feature and the accuracy of the time offset can vary. 2879 EndTime string `json:"endTime,omitempty"` 2880 // SpeakerTag: Output only. A distinct integer value is assigned for every 2881 // speaker within the audio. This field specifies which one of those speakers 2882 // was detected to have spoken this word. Value ranges from 1 up to 2883 // diarization_speaker_count, and is only set if speaker diarization is 2884 // enabled. 2885 SpeakerTag int64 `json:"speakerTag,omitempty"` 2886 // StartTime: Time offset relative to the beginning of the audio, and 2887 // corresponding to the start of the spoken word. This field is only set if 2888 // `enable_word_time_offsets=true` and only in the top hypothesis. This is an 2889 // experimental feature and the accuracy of the time offset can vary. 2890 StartTime string `json:"startTime,omitempty"` 2891 // Word: The word corresponding to this set of information. 2892 Word string `json:"word,omitempty"` 2893 // ForceSendFields is a list of field names (e.g. "Confidence") to 2894 // unconditionally include in API requests. By default, fields with empty or 2895 // default values are omitted from API requests. See 2896 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2897 // details. 2898 ForceSendFields []string `json:"-"` 2899 // NullFields is a list of field names (e.g. "Confidence") to include in API 2900 // requests with the JSON null value. By default, fields with empty values are 2901 // omitted from API requests. See 2902 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2903 NullFields []string `json:"-"` 2904 } 2905 2906 func (s *GoogleCloudVideointelligenceV1beta2WordInfo) MarshalJSON() ([]byte, error) { 2907 type NoMethod GoogleCloudVideointelligenceV1beta2WordInfo 2908 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2909 } 2910 2911 func (s *GoogleCloudVideointelligenceV1beta2WordInfo) UnmarshalJSON(data []byte) error { 2912 type NoMethod GoogleCloudVideointelligenceV1beta2WordInfo 2913 var s1 struct { 2914 Confidence gensupport.JSONFloat64 `json:"confidence"` 2915 *NoMethod 2916 } 2917 s1.NoMethod = (*NoMethod)(s) 2918 if err := json.Unmarshal(data, &s1); err != nil { 2919 return err 2920 } 2921 s.Confidence = float64(s1.Confidence) 2922 return nil 2923 } 2924 2925 // GoogleCloudVideointelligenceV1p1beta1AnnotateVideoProgress: Video annotation 2926 // progress. Included in the `metadata` field of the `Operation` returned by 2927 // the `GetOperation` call of the `google::longrunning::Operations` service. 2928 type GoogleCloudVideointelligenceV1p1beta1AnnotateVideoProgress struct { 2929 // AnnotationProgress: Progress metadata for all videos specified in 2930 // `AnnotateVideoRequest`. 2931 AnnotationProgress []*GoogleCloudVideointelligenceV1p1beta1VideoAnnotationProgress `json:"annotationProgress,omitempty"` 2932 // ForceSendFields is a list of field names (e.g. "AnnotationProgress") to 2933 // unconditionally include in API requests. By default, fields with empty or 2934 // default values are omitted from API requests. See 2935 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2936 // details. 2937 ForceSendFields []string `json:"-"` 2938 // NullFields is a list of field names (e.g. "AnnotationProgress") to include 2939 // in API requests with the JSON null value. By default, fields with empty 2940 // values are omitted from API requests. See 2941 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2942 NullFields []string `json:"-"` 2943 } 2944 2945 func (s *GoogleCloudVideointelligenceV1p1beta1AnnotateVideoProgress) MarshalJSON() ([]byte, error) { 2946 type NoMethod GoogleCloudVideointelligenceV1p1beta1AnnotateVideoProgress 2947 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2948 } 2949 2950 // GoogleCloudVideointelligenceV1p1beta1AnnotateVideoResponse: Video annotation 2951 // response. Included in the `response` field of the `Operation` returned by 2952 // the `GetOperation` call of the `google::longrunning::Operations` service. 2953 type GoogleCloudVideointelligenceV1p1beta1AnnotateVideoResponse struct { 2954 // AnnotationResults: Annotation results for all videos specified in 2955 // `AnnotateVideoRequest`. 2956 AnnotationResults []*GoogleCloudVideointelligenceV1p1beta1VideoAnnotationResults `json:"annotationResults,omitempty"` 2957 // ForceSendFields is a list of field names (e.g. "AnnotationResults") to 2958 // unconditionally include in API requests. By default, fields with empty or 2959 // default values are omitted from API requests. See 2960 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2961 // details. 2962 ForceSendFields []string `json:"-"` 2963 // NullFields is a list of field names (e.g. "AnnotationResults") to include in 2964 // API requests with the JSON null value. By default, fields with empty values 2965 // are omitted from API requests. See 2966 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2967 NullFields []string `json:"-"` 2968 } 2969 2970 func (s *GoogleCloudVideointelligenceV1p1beta1AnnotateVideoResponse) MarshalJSON() ([]byte, error) { 2971 type NoMethod GoogleCloudVideointelligenceV1p1beta1AnnotateVideoResponse 2972 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2973 } 2974 2975 // GoogleCloudVideointelligenceV1p1beta1DetectedAttribute: A generic detected 2976 // attribute represented by name in string format. 2977 type GoogleCloudVideointelligenceV1p1beta1DetectedAttribute struct { 2978 // Confidence: Detected attribute confidence. Range [0, 1]. 2979 Confidence float64 `json:"confidence,omitempty"` 2980 // Name: The name of the attribute, for example, glasses, dark_glasses, 2981 // mouth_open. A full list of supported type names will be provided in the 2982 // document. 2983 Name string `json:"name,omitempty"` 2984 // Value: Text value of the detection result. For example, the value for 2985 // "HairColor" can be "black", "blonde", etc. 2986 Value string `json:"value,omitempty"` 2987 // ForceSendFields is a list of field names (e.g. "Confidence") to 2988 // unconditionally include in API requests. By default, fields with empty or 2989 // default values are omitted from API requests. See 2990 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2991 // details. 2992 ForceSendFields []string `json:"-"` 2993 // NullFields is a list of field names (e.g. "Confidence") to include in API 2994 // requests with the JSON null value. By default, fields with empty values are 2995 // omitted from API requests. See 2996 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2997 NullFields []string `json:"-"` 2998 } 2999 3000 func (s *GoogleCloudVideointelligenceV1p1beta1DetectedAttribute) MarshalJSON() ([]byte, error) { 3001 type NoMethod GoogleCloudVideointelligenceV1p1beta1DetectedAttribute 3002 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3003 } 3004 3005 func (s *GoogleCloudVideointelligenceV1p1beta1DetectedAttribute) UnmarshalJSON(data []byte) error { 3006 type NoMethod GoogleCloudVideointelligenceV1p1beta1DetectedAttribute 3007 var s1 struct { 3008 Confidence gensupport.JSONFloat64 `json:"confidence"` 3009 *NoMethod 3010 } 3011 s1.NoMethod = (*NoMethod)(s) 3012 if err := json.Unmarshal(data, &s1); err != nil { 3013 return err 3014 } 3015 s.Confidence = float64(s1.Confidence) 3016 return nil 3017 } 3018 3019 // GoogleCloudVideointelligenceV1p1beta1DetectedLandmark: A generic detected 3020 // landmark represented by name in string format and a 2D location. 3021 type GoogleCloudVideointelligenceV1p1beta1DetectedLandmark struct { 3022 // Confidence: The confidence score of the detected landmark. Range [0, 1]. 3023 Confidence float64 `json:"confidence,omitempty"` 3024 // Name: The name of this landmark, for example, left_hand, right_shoulder. 3025 Name string `json:"name,omitempty"` 3026 // Point: The 2D point of the detected landmark using the normalized image 3027 // coordindate system. The normalized coordinates have the range from 0 to 1. 3028 Point *GoogleCloudVideointelligenceV1p1beta1NormalizedVertex `json:"point,omitempty"` 3029 // ForceSendFields is a list of field names (e.g. "Confidence") to 3030 // unconditionally include in API requests. By default, fields with empty or 3031 // default values are omitted from API requests. See 3032 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3033 // details. 3034 ForceSendFields []string `json:"-"` 3035 // NullFields is a list of field names (e.g. "Confidence") to include in API 3036 // requests with the JSON null value. By default, fields with empty values are 3037 // omitted from API requests. See 3038 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3039 NullFields []string `json:"-"` 3040 } 3041 3042 func (s *GoogleCloudVideointelligenceV1p1beta1DetectedLandmark) MarshalJSON() ([]byte, error) { 3043 type NoMethod GoogleCloudVideointelligenceV1p1beta1DetectedLandmark 3044 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3045 } 3046 3047 func (s *GoogleCloudVideointelligenceV1p1beta1DetectedLandmark) UnmarshalJSON(data []byte) error { 3048 type NoMethod GoogleCloudVideointelligenceV1p1beta1DetectedLandmark 3049 var s1 struct { 3050 Confidence gensupport.JSONFloat64 `json:"confidence"` 3051 *NoMethod 3052 } 3053 s1.NoMethod = (*NoMethod)(s) 3054 if err := json.Unmarshal(data, &s1); err != nil { 3055 return err 3056 } 3057 s.Confidence = float64(s1.Confidence) 3058 return nil 3059 } 3060 3061 // GoogleCloudVideointelligenceV1p1beta1Entity: Detected entity from video 3062 // analysis. 3063 type GoogleCloudVideointelligenceV1p1beta1Entity struct { 3064 // Description: Textual description, e.g., `Fixed-gear bicycle`. 3065 Description string `json:"description,omitempty"` 3066 // EntityId: Opaque entity ID. Some IDs may be available in Google Knowledge 3067 // Graph Search API (https://developers.google.com/knowledge-graph/). 3068 EntityId string `json:"entityId,omitempty"` 3069 // LanguageCode: Language code for `description` in BCP-47 format. 3070 LanguageCode string `json:"languageCode,omitempty"` 3071 // ForceSendFields is a list of field names (e.g. "Description") to 3072 // unconditionally include in API requests. By default, fields with empty or 3073 // default values are omitted from API requests. See 3074 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3075 // details. 3076 ForceSendFields []string `json:"-"` 3077 // NullFields is a list of field names (e.g. "Description") to include in API 3078 // requests with the JSON null value. By default, fields with empty values are 3079 // omitted from API requests. See 3080 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3081 NullFields []string `json:"-"` 3082 } 3083 3084 func (s *GoogleCloudVideointelligenceV1p1beta1Entity) MarshalJSON() ([]byte, error) { 3085 type NoMethod GoogleCloudVideointelligenceV1p1beta1Entity 3086 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3087 } 3088 3089 // GoogleCloudVideointelligenceV1p1beta1ExplicitContentAnnotation: Explicit 3090 // content annotation (based on per-frame visual signals only). If no explicit 3091 // content has been detected in a frame, no annotations are present for that 3092 // frame. 3093 type GoogleCloudVideointelligenceV1p1beta1ExplicitContentAnnotation struct { 3094 // Frames: All video frames where explicit content was detected. 3095 Frames []*GoogleCloudVideointelligenceV1p1beta1ExplicitContentFrame `json:"frames,omitempty"` 3096 // Version: Feature version. 3097 Version string `json:"version,omitempty"` 3098 // ForceSendFields is a list of field names (e.g. "Frames") to unconditionally 3099 // include in API requests. By default, fields with empty or default values are 3100 // omitted from API requests. See 3101 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3102 // details. 3103 ForceSendFields []string `json:"-"` 3104 // NullFields is a list of field names (e.g. "Frames") to include in API 3105 // requests with the JSON null value. By default, fields with empty values are 3106 // omitted from API requests. See 3107 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3108 NullFields []string `json:"-"` 3109 } 3110 3111 func (s *GoogleCloudVideointelligenceV1p1beta1ExplicitContentAnnotation) MarshalJSON() ([]byte, error) { 3112 type NoMethod GoogleCloudVideointelligenceV1p1beta1ExplicitContentAnnotation 3113 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3114 } 3115 3116 // GoogleCloudVideointelligenceV1p1beta1ExplicitContentFrame: Video frame level 3117 // annotation results for explicit content. 3118 type GoogleCloudVideointelligenceV1p1beta1ExplicitContentFrame struct { 3119 // PornographyLikelihood: Likelihood of the pornography content.. 3120 // 3121 // Possible values: 3122 // "LIKELIHOOD_UNSPECIFIED" - Unspecified likelihood. 3123 // "VERY_UNLIKELY" - Very unlikely. 3124 // "UNLIKELY" - Unlikely. 3125 // "POSSIBLE" - Possible. 3126 // "LIKELY" - Likely. 3127 // "VERY_LIKELY" - Very likely. 3128 PornographyLikelihood string `json:"pornographyLikelihood,omitempty"` 3129 // TimeOffset: Time-offset, relative to the beginning of the video, 3130 // corresponding to the video frame for this location. 3131 TimeOffset string `json:"timeOffset,omitempty"` 3132 // ForceSendFields is a list of field names (e.g. "PornographyLikelihood") to 3133 // unconditionally include in API requests. By default, fields with empty or 3134 // default values are omitted from API requests. See 3135 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3136 // details. 3137 ForceSendFields []string `json:"-"` 3138 // NullFields is a list of field names (e.g. "PornographyLikelihood") to 3139 // include in API requests with the JSON null value. By default, fields with 3140 // empty values are omitted from API requests. See 3141 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3142 NullFields []string `json:"-"` 3143 } 3144 3145 func (s *GoogleCloudVideointelligenceV1p1beta1ExplicitContentFrame) MarshalJSON() ([]byte, error) { 3146 type NoMethod GoogleCloudVideointelligenceV1p1beta1ExplicitContentFrame 3147 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3148 } 3149 3150 // GoogleCloudVideointelligenceV1p1beta1FaceAnnotation: Deprecated. No effect. 3151 type GoogleCloudVideointelligenceV1p1beta1FaceAnnotation struct { 3152 // Frames: All video frames where a face was detected. 3153 Frames []*GoogleCloudVideointelligenceV1p1beta1FaceFrame `json:"frames,omitempty"` 3154 // Segments: All video segments where a face was detected. 3155 Segments []*GoogleCloudVideointelligenceV1p1beta1FaceSegment `json:"segments,omitempty"` 3156 // Thumbnail: Thumbnail of a representative face view (in JPEG format). 3157 Thumbnail string `json:"thumbnail,omitempty"` 3158 // ForceSendFields is a list of field names (e.g. "Frames") to unconditionally 3159 // include in API requests. By default, fields with empty or default values are 3160 // omitted from API requests. See 3161 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3162 // details. 3163 ForceSendFields []string `json:"-"` 3164 // NullFields is a list of field names (e.g. "Frames") to include in API 3165 // requests with the JSON null value. By default, fields with empty values are 3166 // omitted from API requests. See 3167 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3168 NullFields []string `json:"-"` 3169 } 3170 3171 func (s *GoogleCloudVideointelligenceV1p1beta1FaceAnnotation) MarshalJSON() ([]byte, error) { 3172 type NoMethod GoogleCloudVideointelligenceV1p1beta1FaceAnnotation 3173 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3174 } 3175 3176 // GoogleCloudVideointelligenceV1p1beta1FaceDetectionAnnotation: Face detection 3177 // annotation. 3178 type GoogleCloudVideointelligenceV1p1beta1FaceDetectionAnnotation struct { 3179 // Thumbnail: The thumbnail of a person's face. 3180 Thumbnail string `json:"thumbnail,omitempty"` 3181 // Tracks: The face tracks with attributes. 3182 Tracks []*GoogleCloudVideointelligenceV1p1beta1Track `json:"tracks,omitempty"` 3183 // Version: Feature version. 3184 Version string `json:"version,omitempty"` 3185 // ForceSendFields is a list of field names (e.g. "Thumbnail") to 3186 // unconditionally include in API requests. By default, fields with empty or 3187 // default values are omitted from API requests. See 3188 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3189 // details. 3190 ForceSendFields []string `json:"-"` 3191 // NullFields is a list of field names (e.g. "Thumbnail") to include in API 3192 // requests with the JSON null value. By default, fields with empty values are 3193 // omitted from API requests. See 3194 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3195 NullFields []string `json:"-"` 3196 } 3197 3198 func (s *GoogleCloudVideointelligenceV1p1beta1FaceDetectionAnnotation) MarshalJSON() ([]byte, error) { 3199 type NoMethod GoogleCloudVideointelligenceV1p1beta1FaceDetectionAnnotation 3200 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3201 } 3202 3203 // GoogleCloudVideointelligenceV1p1beta1FaceFrame: Deprecated. No effect. 3204 type GoogleCloudVideointelligenceV1p1beta1FaceFrame struct { 3205 // NormalizedBoundingBoxes: Normalized Bounding boxes in a frame. There can be 3206 // more than one boxes if the same face is detected in multiple locations 3207 // within the current frame. 3208 NormalizedBoundingBoxes []*GoogleCloudVideointelligenceV1p1beta1NormalizedBoundingBox `json:"normalizedBoundingBoxes,omitempty"` 3209 // TimeOffset: Time-offset, relative to the beginning of the video, 3210 // corresponding to the video frame for this location. 3211 TimeOffset string `json:"timeOffset,omitempty"` 3212 // ForceSendFields is a list of field names (e.g. "NormalizedBoundingBoxes") to 3213 // unconditionally include in API requests. By default, fields with empty or 3214 // default values are omitted from API requests. See 3215 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3216 // details. 3217 ForceSendFields []string `json:"-"` 3218 // NullFields is a list of field names (e.g. "NormalizedBoundingBoxes") to 3219 // include in API requests with the JSON null value. By default, fields with 3220 // empty values are omitted from API requests. See 3221 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3222 NullFields []string `json:"-"` 3223 } 3224 3225 func (s *GoogleCloudVideointelligenceV1p1beta1FaceFrame) MarshalJSON() ([]byte, error) { 3226 type NoMethod GoogleCloudVideointelligenceV1p1beta1FaceFrame 3227 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3228 } 3229 3230 // GoogleCloudVideointelligenceV1p1beta1FaceSegment: Video segment level 3231 // annotation results for face detection. 3232 type GoogleCloudVideointelligenceV1p1beta1FaceSegment struct { 3233 // Segment: Video segment where a face was detected. 3234 Segment *GoogleCloudVideointelligenceV1p1beta1VideoSegment `json:"segment,omitempty"` 3235 // ForceSendFields is a list of field names (e.g. "Segment") to unconditionally 3236 // include in API requests. By default, fields with empty or default values are 3237 // omitted from API requests. See 3238 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3239 // details. 3240 ForceSendFields []string `json:"-"` 3241 // NullFields is a list of field names (e.g. "Segment") to include in API 3242 // requests with the JSON null value. By default, fields with empty values are 3243 // omitted from API requests. See 3244 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3245 NullFields []string `json:"-"` 3246 } 3247 3248 func (s *GoogleCloudVideointelligenceV1p1beta1FaceSegment) MarshalJSON() ([]byte, error) { 3249 type NoMethod GoogleCloudVideointelligenceV1p1beta1FaceSegment 3250 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3251 } 3252 3253 // GoogleCloudVideointelligenceV1p1beta1LabelAnnotation: Label annotation. 3254 type GoogleCloudVideointelligenceV1p1beta1LabelAnnotation struct { 3255 // CategoryEntities: Common categories for the detected entity. For example, 3256 // when the label is `Terrier`, the category is likely `dog`. And in some cases 3257 // there might be more than one categories e.g., `Terrier` could also be a 3258 // `pet`. 3259 CategoryEntities []*GoogleCloudVideointelligenceV1p1beta1Entity `json:"categoryEntities,omitempty"` 3260 // Entity: Detected entity. 3261 Entity *GoogleCloudVideointelligenceV1p1beta1Entity `json:"entity,omitempty"` 3262 // Frames: All video frames where a label was detected. 3263 Frames []*GoogleCloudVideointelligenceV1p1beta1LabelFrame `json:"frames,omitempty"` 3264 // Segments: All video segments where a label was detected. 3265 Segments []*GoogleCloudVideointelligenceV1p1beta1LabelSegment `json:"segments,omitempty"` 3266 // Version: Feature version. 3267 Version string `json:"version,omitempty"` 3268 // ForceSendFields is a list of field names (e.g. "CategoryEntities") to 3269 // unconditionally include in API requests. By default, fields with empty or 3270 // default values are omitted from API requests. See 3271 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3272 // details. 3273 ForceSendFields []string `json:"-"` 3274 // NullFields is a list of field names (e.g. "CategoryEntities") to include in 3275 // API requests with the JSON null value. By default, fields with empty values 3276 // are omitted from API requests. See 3277 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3278 NullFields []string `json:"-"` 3279 } 3280 3281 func (s *GoogleCloudVideointelligenceV1p1beta1LabelAnnotation) MarshalJSON() ([]byte, error) { 3282 type NoMethod GoogleCloudVideointelligenceV1p1beta1LabelAnnotation 3283 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3284 } 3285 3286 // GoogleCloudVideointelligenceV1p1beta1LabelFrame: Video frame level 3287 // annotation results for label detection. 3288 type GoogleCloudVideointelligenceV1p1beta1LabelFrame struct { 3289 // Confidence: Confidence that the label is accurate. Range: [0, 1]. 3290 Confidence float64 `json:"confidence,omitempty"` 3291 // TimeOffset: Time-offset, relative to the beginning of the video, 3292 // corresponding to the video frame for this location. 3293 TimeOffset string `json:"timeOffset,omitempty"` 3294 // ForceSendFields is a list of field names (e.g. "Confidence") to 3295 // unconditionally include in API requests. By default, fields with empty or 3296 // default values are omitted from API requests. See 3297 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3298 // details. 3299 ForceSendFields []string `json:"-"` 3300 // NullFields is a list of field names (e.g. "Confidence") to include in API 3301 // requests with the JSON null value. By default, fields with empty values are 3302 // omitted from API requests. See 3303 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3304 NullFields []string `json:"-"` 3305 } 3306 3307 func (s *GoogleCloudVideointelligenceV1p1beta1LabelFrame) MarshalJSON() ([]byte, error) { 3308 type NoMethod GoogleCloudVideointelligenceV1p1beta1LabelFrame 3309 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3310 } 3311 3312 func (s *GoogleCloudVideointelligenceV1p1beta1LabelFrame) UnmarshalJSON(data []byte) error { 3313 type NoMethod GoogleCloudVideointelligenceV1p1beta1LabelFrame 3314 var s1 struct { 3315 Confidence gensupport.JSONFloat64 `json:"confidence"` 3316 *NoMethod 3317 } 3318 s1.NoMethod = (*NoMethod)(s) 3319 if err := json.Unmarshal(data, &s1); err != nil { 3320 return err 3321 } 3322 s.Confidence = float64(s1.Confidence) 3323 return nil 3324 } 3325 3326 // GoogleCloudVideointelligenceV1p1beta1LabelSegment: Video segment level 3327 // annotation results for label detection. 3328 type GoogleCloudVideointelligenceV1p1beta1LabelSegment struct { 3329 // Confidence: Confidence that the label is accurate. Range: [0, 1]. 3330 Confidence float64 `json:"confidence,omitempty"` 3331 // Segment: Video segment where a label was detected. 3332 Segment *GoogleCloudVideointelligenceV1p1beta1VideoSegment `json:"segment,omitempty"` 3333 // ForceSendFields is a list of field names (e.g. "Confidence") to 3334 // unconditionally include in API requests. By default, fields with empty or 3335 // default values are omitted from API requests. See 3336 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3337 // details. 3338 ForceSendFields []string `json:"-"` 3339 // NullFields is a list of field names (e.g. "Confidence") to include in API 3340 // requests with the JSON null value. By default, fields with empty values are 3341 // omitted from API requests. See 3342 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3343 NullFields []string `json:"-"` 3344 } 3345 3346 func (s *GoogleCloudVideointelligenceV1p1beta1LabelSegment) MarshalJSON() ([]byte, error) { 3347 type NoMethod GoogleCloudVideointelligenceV1p1beta1LabelSegment 3348 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3349 } 3350 3351 func (s *GoogleCloudVideointelligenceV1p1beta1LabelSegment) UnmarshalJSON(data []byte) error { 3352 type NoMethod GoogleCloudVideointelligenceV1p1beta1LabelSegment 3353 var s1 struct { 3354 Confidence gensupport.JSONFloat64 `json:"confidence"` 3355 *NoMethod 3356 } 3357 s1.NoMethod = (*NoMethod)(s) 3358 if err := json.Unmarshal(data, &s1); err != nil { 3359 return err 3360 } 3361 s.Confidence = float64(s1.Confidence) 3362 return nil 3363 } 3364 3365 // GoogleCloudVideointelligenceV1p1beta1LogoRecognitionAnnotation: Annotation 3366 // corresponding to one detected, tracked and recognized logo class. 3367 type GoogleCloudVideointelligenceV1p1beta1LogoRecognitionAnnotation struct { 3368 // Entity: Entity category information to specify the logo class that all the 3369 // logo tracks within this LogoRecognitionAnnotation are recognized as. 3370 Entity *GoogleCloudVideointelligenceV1p1beta1Entity `json:"entity,omitempty"` 3371 // Segments: All video segments where the recognized logo appears. There might 3372 // be multiple instances of the same logo class appearing in one VideoSegment. 3373 Segments []*GoogleCloudVideointelligenceV1p1beta1VideoSegment `json:"segments,omitempty"` 3374 // Tracks: All logo tracks where the recognized logo appears. Each track 3375 // corresponds to one logo instance appearing in consecutive frames. 3376 Tracks []*GoogleCloudVideointelligenceV1p1beta1Track `json:"tracks,omitempty"` 3377 // ForceSendFields is a list of field names (e.g. "Entity") to unconditionally 3378 // include in API requests. By default, fields with empty or default values are 3379 // omitted from API requests. See 3380 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3381 // details. 3382 ForceSendFields []string `json:"-"` 3383 // NullFields is a list of field names (e.g. "Entity") to include in API 3384 // requests with the JSON null value. By default, fields with empty values are 3385 // omitted from API requests. See 3386 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3387 NullFields []string `json:"-"` 3388 } 3389 3390 func (s *GoogleCloudVideointelligenceV1p1beta1LogoRecognitionAnnotation) MarshalJSON() ([]byte, error) { 3391 type NoMethod GoogleCloudVideointelligenceV1p1beta1LogoRecognitionAnnotation 3392 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3393 } 3394 3395 // GoogleCloudVideointelligenceV1p1beta1NormalizedBoundingBox: Normalized 3396 // bounding box. The normalized vertex coordinates are relative to the original 3397 // image. Range: [0, 1]. 3398 type GoogleCloudVideointelligenceV1p1beta1NormalizedBoundingBox struct { 3399 // Bottom: Bottom Y coordinate. 3400 Bottom float64 `json:"bottom,omitempty"` 3401 // Left: Left X coordinate. 3402 Left float64 `json:"left,omitempty"` 3403 // Right: Right X coordinate. 3404 Right float64 `json:"right,omitempty"` 3405 // Top: Top Y coordinate. 3406 Top float64 `json:"top,omitempty"` 3407 // ForceSendFields is a list of field names (e.g. "Bottom") to unconditionally 3408 // include in API requests. By default, fields with empty or default values are 3409 // omitted from API requests. See 3410 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3411 // details. 3412 ForceSendFields []string `json:"-"` 3413 // NullFields is a list of field names (e.g. "Bottom") to include in API 3414 // requests with the JSON null value. By default, fields with empty values are 3415 // omitted from API requests. See 3416 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3417 NullFields []string `json:"-"` 3418 } 3419 3420 func (s *GoogleCloudVideointelligenceV1p1beta1NormalizedBoundingBox) MarshalJSON() ([]byte, error) { 3421 type NoMethod GoogleCloudVideointelligenceV1p1beta1NormalizedBoundingBox 3422 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3423 } 3424 3425 func (s *GoogleCloudVideointelligenceV1p1beta1NormalizedBoundingBox) UnmarshalJSON(data []byte) error { 3426 type NoMethod GoogleCloudVideointelligenceV1p1beta1NormalizedBoundingBox 3427 var s1 struct { 3428 Bottom gensupport.JSONFloat64 `json:"bottom"` 3429 Left gensupport.JSONFloat64 `json:"left"` 3430 Right gensupport.JSONFloat64 `json:"right"` 3431 Top gensupport.JSONFloat64 `json:"top"` 3432 *NoMethod 3433 } 3434 s1.NoMethod = (*NoMethod)(s) 3435 if err := json.Unmarshal(data, &s1); err != nil { 3436 return err 3437 } 3438 s.Bottom = float64(s1.Bottom) 3439 s.Left = float64(s1.Left) 3440 s.Right = float64(s1.Right) 3441 s.Top = float64(s1.Top) 3442 return nil 3443 } 3444 3445 // GoogleCloudVideointelligenceV1p1beta1NormalizedBoundingPoly: Normalized 3446 // bounding polygon for text (that might not be aligned with axis). Contains 3447 // list of the corner points in clockwise order starting from top-left corner. 3448 // For example, for a rectangular bounding box: When the text is horizontal it 3449 // might look like: 0----1 | | 3----2 When it's clockwise rotated 180 degrees 3450 // around the top-left corner it becomes: 2----3 | | 1----0 and the vertex 3451 // order will still be (0, 1, 2, 3). Note that values can be less than 0, or 3452 // greater than 1 due to trignometric calculations for location of the box. 3453 type GoogleCloudVideointelligenceV1p1beta1NormalizedBoundingPoly struct { 3454 // Vertices: Normalized vertices of the bounding polygon. 3455 Vertices []*GoogleCloudVideointelligenceV1p1beta1NormalizedVertex `json:"vertices,omitempty"` 3456 // ForceSendFields is a list of field names (e.g. "Vertices") to 3457 // unconditionally include in API requests. By default, fields with empty or 3458 // default values are omitted from API requests. See 3459 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3460 // details. 3461 ForceSendFields []string `json:"-"` 3462 // NullFields is a list of field names (e.g. "Vertices") to include in API 3463 // requests with the JSON null value. By default, fields with empty values are 3464 // omitted from API requests. See 3465 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3466 NullFields []string `json:"-"` 3467 } 3468 3469 func (s *GoogleCloudVideointelligenceV1p1beta1NormalizedBoundingPoly) MarshalJSON() ([]byte, error) { 3470 type NoMethod GoogleCloudVideointelligenceV1p1beta1NormalizedBoundingPoly 3471 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3472 } 3473 3474 // GoogleCloudVideointelligenceV1p1beta1NormalizedVertex: A vertex represents a 3475 // 2D point in the image. NOTE: the normalized vertex coordinates are relative 3476 // to the original image and range from 0 to 1. 3477 type GoogleCloudVideointelligenceV1p1beta1NormalizedVertex struct { 3478 // X: X coordinate. 3479 X float64 `json:"x,omitempty"` 3480 // Y: Y coordinate. 3481 Y float64 `json:"y,omitempty"` 3482 // ForceSendFields is a list of field names (e.g. "X") to unconditionally 3483 // include in API requests. By default, fields with empty or default values are 3484 // omitted from API requests. See 3485 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3486 // details. 3487 ForceSendFields []string `json:"-"` 3488 // NullFields is a list of field names (e.g. "X") to include in API requests 3489 // with the JSON null value. By default, fields with empty values are omitted 3490 // from API requests. See 3491 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3492 NullFields []string `json:"-"` 3493 } 3494 3495 func (s *GoogleCloudVideointelligenceV1p1beta1NormalizedVertex) MarshalJSON() ([]byte, error) { 3496 type NoMethod GoogleCloudVideointelligenceV1p1beta1NormalizedVertex 3497 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3498 } 3499 3500 func (s *GoogleCloudVideointelligenceV1p1beta1NormalizedVertex) UnmarshalJSON(data []byte) error { 3501 type NoMethod GoogleCloudVideointelligenceV1p1beta1NormalizedVertex 3502 var s1 struct { 3503 X gensupport.JSONFloat64 `json:"x"` 3504 Y gensupport.JSONFloat64 `json:"y"` 3505 *NoMethod 3506 } 3507 s1.NoMethod = (*NoMethod)(s) 3508 if err := json.Unmarshal(data, &s1); err != nil { 3509 return err 3510 } 3511 s.X = float64(s1.X) 3512 s.Y = float64(s1.Y) 3513 return nil 3514 } 3515 3516 // GoogleCloudVideointelligenceV1p1beta1ObjectTrackingAnnotation: Annotations 3517 // corresponding to one tracked object. 3518 type GoogleCloudVideointelligenceV1p1beta1ObjectTrackingAnnotation struct { 3519 // Confidence: Object category's labeling confidence of this track. 3520 Confidence float64 `json:"confidence,omitempty"` 3521 // Entity: Entity to specify the object category that this track is labeled as. 3522 Entity *GoogleCloudVideointelligenceV1p1beta1Entity `json:"entity,omitempty"` 3523 // Frames: Information corresponding to all frames where this object track 3524 // appears. Non-streaming batch mode: it may be one or multiple 3525 // ObjectTrackingFrame messages in frames. Streaming mode: it can only be one 3526 // ObjectTrackingFrame message in frames. 3527 Frames []*GoogleCloudVideointelligenceV1p1beta1ObjectTrackingFrame `json:"frames,omitempty"` 3528 // Segment: Non-streaming batch mode ONLY. Each object track corresponds to one 3529 // video segment where it appears. 3530 Segment *GoogleCloudVideointelligenceV1p1beta1VideoSegment `json:"segment,omitempty"` 3531 // TrackId: Streaming mode ONLY. In streaming mode, we do not know the end time 3532 // of a tracked object before it is completed. Hence, there is no VideoSegment 3533 // info returned. Instead, we provide a unique identifiable integer track_id so 3534 // that the customers can correlate the results of the ongoing 3535 // ObjectTrackAnnotation of the same track_id over time. 3536 TrackId int64 `json:"trackId,omitempty,string"` 3537 // Version: Feature version. 3538 Version string `json:"version,omitempty"` 3539 // ForceSendFields is a list of field names (e.g. "Confidence") to 3540 // unconditionally include in API requests. By default, fields with empty or 3541 // default values are omitted from API requests. See 3542 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3543 // details. 3544 ForceSendFields []string `json:"-"` 3545 // NullFields is a list of field names (e.g. "Confidence") to include in API 3546 // requests with the JSON null value. By default, fields with empty values are 3547 // omitted from API requests. See 3548 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3549 NullFields []string `json:"-"` 3550 } 3551 3552 func (s *GoogleCloudVideointelligenceV1p1beta1ObjectTrackingAnnotation) MarshalJSON() ([]byte, error) { 3553 type NoMethod GoogleCloudVideointelligenceV1p1beta1ObjectTrackingAnnotation 3554 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3555 } 3556 3557 func (s *GoogleCloudVideointelligenceV1p1beta1ObjectTrackingAnnotation) UnmarshalJSON(data []byte) error { 3558 type NoMethod GoogleCloudVideointelligenceV1p1beta1ObjectTrackingAnnotation 3559 var s1 struct { 3560 Confidence gensupport.JSONFloat64 `json:"confidence"` 3561 *NoMethod 3562 } 3563 s1.NoMethod = (*NoMethod)(s) 3564 if err := json.Unmarshal(data, &s1); err != nil { 3565 return err 3566 } 3567 s.Confidence = float64(s1.Confidence) 3568 return nil 3569 } 3570 3571 // GoogleCloudVideointelligenceV1p1beta1ObjectTrackingFrame: Video frame level 3572 // annotations for object detection and tracking. This field stores per frame 3573 // location, time offset, and confidence. 3574 type GoogleCloudVideointelligenceV1p1beta1ObjectTrackingFrame struct { 3575 // NormalizedBoundingBox: The normalized bounding box location of this object 3576 // track for the frame. 3577 NormalizedBoundingBox *GoogleCloudVideointelligenceV1p1beta1NormalizedBoundingBox `json:"normalizedBoundingBox,omitempty"` 3578 // TimeOffset: The timestamp of the frame in microseconds. 3579 TimeOffset string `json:"timeOffset,omitempty"` 3580 // ForceSendFields is a list of field names (e.g. "NormalizedBoundingBox") to 3581 // unconditionally include in API requests. By default, fields with empty or 3582 // default values are omitted from API requests. See 3583 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3584 // details. 3585 ForceSendFields []string `json:"-"` 3586 // NullFields is a list of field names (e.g. "NormalizedBoundingBox") to 3587 // include in API requests with the JSON null value. By default, fields with 3588 // empty values are omitted from API requests. See 3589 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3590 NullFields []string `json:"-"` 3591 } 3592 3593 func (s *GoogleCloudVideointelligenceV1p1beta1ObjectTrackingFrame) MarshalJSON() ([]byte, error) { 3594 type NoMethod GoogleCloudVideointelligenceV1p1beta1ObjectTrackingFrame 3595 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3596 } 3597 3598 // GoogleCloudVideointelligenceV1p1beta1PersonDetectionAnnotation: Person 3599 // detection annotation per video. 3600 type GoogleCloudVideointelligenceV1p1beta1PersonDetectionAnnotation struct { 3601 // Tracks: The detected tracks of a person. 3602 Tracks []*GoogleCloudVideointelligenceV1p1beta1Track `json:"tracks,omitempty"` 3603 // Version: Feature version. 3604 Version string `json:"version,omitempty"` 3605 // ForceSendFields is a list of field names (e.g. "Tracks") to unconditionally 3606 // include in API requests. By default, fields with empty or default values are 3607 // omitted from API requests. See 3608 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3609 // details. 3610 ForceSendFields []string `json:"-"` 3611 // NullFields is a list of field names (e.g. "Tracks") to include in API 3612 // requests with the JSON null value. By default, fields with empty values are 3613 // omitted from API requests. See 3614 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3615 NullFields []string `json:"-"` 3616 } 3617 3618 func (s *GoogleCloudVideointelligenceV1p1beta1PersonDetectionAnnotation) MarshalJSON() ([]byte, error) { 3619 type NoMethod GoogleCloudVideointelligenceV1p1beta1PersonDetectionAnnotation 3620 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3621 } 3622 3623 // GoogleCloudVideointelligenceV1p1beta1SpeechRecognitionAlternative: 3624 // Alternative hypotheses (a.k.a. n-best list). 3625 type GoogleCloudVideointelligenceV1p1beta1SpeechRecognitionAlternative struct { 3626 // Confidence: Output only. The confidence estimate between 0.0 and 1.0. A 3627 // higher number indicates an estimated greater likelihood that the recognized 3628 // words are correct. This field is set only for the top alternative. This 3629 // field is not guaranteed to be accurate and users should not rely on it to be 3630 // always provided. The default of 0.0 is a sentinel value indicating 3631 // `confidence` was not set. 3632 Confidence float64 `json:"confidence,omitempty"` 3633 // Transcript: Transcript text representing the words that the user spoke. 3634 Transcript string `json:"transcript,omitempty"` 3635 // Words: Output only. A list of word-specific information for each recognized 3636 // word. Note: When `enable_speaker_diarization` is set to true, you will see 3637 // all the words from the beginning of the audio. 3638 Words []*GoogleCloudVideointelligenceV1p1beta1WordInfo `json:"words,omitempty"` 3639 // ForceSendFields is a list of field names (e.g. "Confidence") to 3640 // unconditionally include in API requests. By default, fields with empty or 3641 // default values are omitted from API requests. See 3642 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3643 // details. 3644 ForceSendFields []string `json:"-"` 3645 // NullFields is a list of field names (e.g. "Confidence") to include in API 3646 // requests with the JSON null value. By default, fields with empty values are 3647 // omitted from API requests. See 3648 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3649 NullFields []string `json:"-"` 3650 } 3651 3652 func (s *GoogleCloudVideointelligenceV1p1beta1SpeechRecognitionAlternative) MarshalJSON() ([]byte, error) { 3653 type NoMethod GoogleCloudVideointelligenceV1p1beta1SpeechRecognitionAlternative 3654 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3655 } 3656 3657 func (s *GoogleCloudVideointelligenceV1p1beta1SpeechRecognitionAlternative) UnmarshalJSON(data []byte) error { 3658 type NoMethod GoogleCloudVideointelligenceV1p1beta1SpeechRecognitionAlternative 3659 var s1 struct { 3660 Confidence gensupport.JSONFloat64 `json:"confidence"` 3661 *NoMethod 3662 } 3663 s1.NoMethod = (*NoMethod)(s) 3664 if err := json.Unmarshal(data, &s1); err != nil { 3665 return err 3666 } 3667 s.Confidence = float64(s1.Confidence) 3668 return nil 3669 } 3670 3671 // GoogleCloudVideointelligenceV1p1beta1SpeechTranscription: A speech 3672 // recognition result corresponding to a portion of the audio. 3673 type GoogleCloudVideointelligenceV1p1beta1SpeechTranscription struct { 3674 // Alternatives: May contain one or more recognition hypotheses (up to the 3675 // maximum specified in `max_alternatives`). These alternatives are ordered in 3676 // terms of accuracy, with the top (first) alternative being the most probable, 3677 // as ranked by the recognizer. 3678 Alternatives []*GoogleCloudVideointelligenceV1p1beta1SpeechRecognitionAlternative `json:"alternatives,omitempty"` 3679 // LanguageCode: Output only. The BCP-47 3680 // (https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of the language 3681 // in this result. This language code was detected to have the most likelihood 3682 // of being spoken in the audio. 3683 LanguageCode string `json:"languageCode,omitempty"` 3684 // ForceSendFields is a list of field names (e.g. "Alternatives") to 3685 // unconditionally include in API requests. By default, fields with empty or 3686 // default values are omitted from API requests. See 3687 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3688 // details. 3689 ForceSendFields []string `json:"-"` 3690 // NullFields is a list of field names (e.g. "Alternatives") to include in API 3691 // requests with the JSON null value. By default, fields with empty values are 3692 // omitted from API requests. See 3693 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3694 NullFields []string `json:"-"` 3695 } 3696 3697 func (s *GoogleCloudVideointelligenceV1p1beta1SpeechTranscription) MarshalJSON() ([]byte, error) { 3698 type NoMethod GoogleCloudVideointelligenceV1p1beta1SpeechTranscription 3699 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3700 } 3701 3702 // GoogleCloudVideointelligenceV1p1beta1TextAnnotation: Annotations related to 3703 // one detected OCR text snippet. This will contain the corresponding text, 3704 // confidence value, and frame level information for each detection. 3705 type GoogleCloudVideointelligenceV1p1beta1TextAnnotation struct { 3706 // Segments: All video segments where OCR detected text appears. 3707 Segments []*GoogleCloudVideointelligenceV1p1beta1TextSegment `json:"segments,omitempty"` 3708 // Text: The detected text. 3709 Text string `json:"text,omitempty"` 3710 // Version: Feature version. 3711 Version string `json:"version,omitempty"` 3712 // ForceSendFields is a list of field names (e.g. "Segments") to 3713 // unconditionally include in API requests. By default, fields with empty or 3714 // default values are omitted from API requests. See 3715 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3716 // details. 3717 ForceSendFields []string `json:"-"` 3718 // NullFields is a list of field names (e.g. "Segments") to include in API 3719 // requests with the JSON null value. By default, fields with empty values are 3720 // omitted from API requests. See 3721 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3722 NullFields []string `json:"-"` 3723 } 3724 3725 func (s *GoogleCloudVideointelligenceV1p1beta1TextAnnotation) MarshalJSON() ([]byte, error) { 3726 type NoMethod GoogleCloudVideointelligenceV1p1beta1TextAnnotation 3727 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3728 } 3729 3730 // GoogleCloudVideointelligenceV1p1beta1TextFrame: Video frame level annotation 3731 // results for text annotation (OCR). Contains information regarding timestamp 3732 // and bounding box locations for the frames containing detected OCR text 3733 // snippets. 3734 type GoogleCloudVideointelligenceV1p1beta1TextFrame struct { 3735 // RotatedBoundingBox: Bounding polygon of the detected text for this frame. 3736 RotatedBoundingBox *GoogleCloudVideointelligenceV1p1beta1NormalizedBoundingPoly `json:"rotatedBoundingBox,omitempty"` 3737 // TimeOffset: Timestamp of this frame. 3738 TimeOffset string `json:"timeOffset,omitempty"` 3739 // ForceSendFields is a list of field names (e.g. "RotatedBoundingBox") to 3740 // unconditionally include in API requests. By default, fields with empty or 3741 // default values are omitted from API requests. See 3742 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3743 // details. 3744 ForceSendFields []string `json:"-"` 3745 // NullFields is a list of field names (e.g. "RotatedBoundingBox") to include 3746 // in API requests with the JSON null value. By default, fields with empty 3747 // values are omitted from API requests. See 3748 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3749 NullFields []string `json:"-"` 3750 } 3751 3752 func (s *GoogleCloudVideointelligenceV1p1beta1TextFrame) MarshalJSON() ([]byte, error) { 3753 type NoMethod GoogleCloudVideointelligenceV1p1beta1TextFrame 3754 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3755 } 3756 3757 // GoogleCloudVideointelligenceV1p1beta1TextSegment: Video segment level 3758 // annotation results for text detection. 3759 type GoogleCloudVideointelligenceV1p1beta1TextSegment struct { 3760 // Confidence: Confidence for the track of detected text. It is calculated as 3761 // the highest over all frames where OCR detected text appears. 3762 Confidence float64 `json:"confidence,omitempty"` 3763 // Frames: Information related to the frames where OCR detected text appears. 3764 Frames []*GoogleCloudVideointelligenceV1p1beta1TextFrame `json:"frames,omitempty"` 3765 // Segment: Video segment where a text snippet was detected. 3766 Segment *GoogleCloudVideointelligenceV1p1beta1VideoSegment `json:"segment,omitempty"` 3767 // ForceSendFields is a list of field names (e.g. "Confidence") to 3768 // unconditionally include in API requests. By default, fields with empty or 3769 // default values are omitted from API requests. See 3770 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3771 // details. 3772 ForceSendFields []string `json:"-"` 3773 // NullFields is a list of field names (e.g. "Confidence") to include in API 3774 // requests with the JSON null value. By default, fields with empty values are 3775 // omitted from API requests. See 3776 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3777 NullFields []string `json:"-"` 3778 } 3779 3780 func (s *GoogleCloudVideointelligenceV1p1beta1TextSegment) MarshalJSON() ([]byte, error) { 3781 type NoMethod GoogleCloudVideointelligenceV1p1beta1TextSegment 3782 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3783 } 3784 3785 func (s *GoogleCloudVideointelligenceV1p1beta1TextSegment) UnmarshalJSON(data []byte) error { 3786 type NoMethod GoogleCloudVideointelligenceV1p1beta1TextSegment 3787 var s1 struct { 3788 Confidence gensupport.JSONFloat64 `json:"confidence"` 3789 *NoMethod 3790 } 3791 s1.NoMethod = (*NoMethod)(s) 3792 if err := json.Unmarshal(data, &s1); err != nil { 3793 return err 3794 } 3795 s.Confidence = float64(s1.Confidence) 3796 return nil 3797 } 3798 3799 // GoogleCloudVideointelligenceV1p1beta1TimestampedObject: For tracking related 3800 // features. An object at time_offset with attributes, and located with 3801 // normalized_bounding_box. 3802 type GoogleCloudVideointelligenceV1p1beta1TimestampedObject struct { 3803 // Attributes: Optional. The attributes of the object in the bounding box. 3804 Attributes []*GoogleCloudVideointelligenceV1p1beta1DetectedAttribute `json:"attributes,omitempty"` 3805 // Landmarks: Optional. The detected landmarks. 3806 Landmarks []*GoogleCloudVideointelligenceV1p1beta1DetectedLandmark `json:"landmarks,omitempty"` 3807 // NormalizedBoundingBox: Normalized Bounding box in a frame, where the object 3808 // is located. 3809 NormalizedBoundingBox *GoogleCloudVideointelligenceV1p1beta1NormalizedBoundingBox `json:"normalizedBoundingBox,omitempty"` 3810 // TimeOffset: Time-offset, relative to the beginning of the video, 3811 // corresponding to the video frame for this object. 3812 TimeOffset string `json:"timeOffset,omitempty"` 3813 // ForceSendFields is a list of field names (e.g. "Attributes") to 3814 // unconditionally include in API requests. By default, fields with empty or 3815 // default values are omitted from API requests. See 3816 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3817 // details. 3818 ForceSendFields []string `json:"-"` 3819 // NullFields is a list of field names (e.g. "Attributes") to include in API 3820 // requests with the JSON null value. By default, fields with empty values are 3821 // omitted from API requests. See 3822 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3823 NullFields []string `json:"-"` 3824 } 3825 3826 func (s *GoogleCloudVideointelligenceV1p1beta1TimestampedObject) MarshalJSON() ([]byte, error) { 3827 type NoMethod GoogleCloudVideointelligenceV1p1beta1TimestampedObject 3828 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3829 } 3830 3831 // GoogleCloudVideointelligenceV1p1beta1Track: A track of an object instance. 3832 type GoogleCloudVideointelligenceV1p1beta1Track struct { 3833 // Attributes: Optional. Attributes in the track level. 3834 Attributes []*GoogleCloudVideointelligenceV1p1beta1DetectedAttribute `json:"attributes,omitempty"` 3835 // Confidence: Optional. The confidence score of the tracked object. 3836 Confidence float64 `json:"confidence,omitempty"` 3837 // Segment: Video segment of a track. 3838 Segment *GoogleCloudVideointelligenceV1p1beta1VideoSegment `json:"segment,omitempty"` 3839 // TimestampedObjects: The object with timestamp and attributes per frame in 3840 // the track. 3841 TimestampedObjects []*GoogleCloudVideointelligenceV1p1beta1TimestampedObject `json:"timestampedObjects,omitempty"` 3842 // ForceSendFields is a list of field names (e.g. "Attributes") to 3843 // unconditionally include in API requests. By default, fields with empty or 3844 // default values are omitted from API requests. See 3845 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3846 // details. 3847 ForceSendFields []string `json:"-"` 3848 // NullFields is a list of field names (e.g. "Attributes") to include in API 3849 // requests with the JSON null value. By default, fields with empty values are 3850 // omitted from API requests. See 3851 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3852 NullFields []string `json:"-"` 3853 } 3854 3855 func (s *GoogleCloudVideointelligenceV1p1beta1Track) MarshalJSON() ([]byte, error) { 3856 type NoMethod GoogleCloudVideointelligenceV1p1beta1Track 3857 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3858 } 3859 3860 func (s *GoogleCloudVideointelligenceV1p1beta1Track) UnmarshalJSON(data []byte) error { 3861 type NoMethod GoogleCloudVideointelligenceV1p1beta1Track 3862 var s1 struct { 3863 Confidence gensupport.JSONFloat64 `json:"confidence"` 3864 *NoMethod 3865 } 3866 s1.NoMethod = (*NoMethod)(s) 3867 if err := json.Unmarshal(data, &s1); err != nil { 3868 return err 3869 } 3870 s.Confidence = float64(s1.Confidence) 3871 return nil 3872 } 3873 3874 // GoogleCloudVideointelligenceV1p1beta1VideoAnnotationProgress: Annotation 3875 // progress for a single video. 3876 type GoogleCloudVideointelligenceV1p1beta1VideoAnnotationProgress struct { 3877 // Feature: Specifies which feature is being tracked if the request contains 3878 // more than one feature. 3879 // 3880 // Possible values: 3881 // "FEATURE_UNSPECIFIED" - Unspecified. 3882 // "LABEL_DETECTION" - Label detection. Detect objects, such as dog or 3883 // flower. 3884 // "SHOT_CHANGE_DETECTION" - Shot change detection. 3885 // "EXPLICIT_CONTENT_DETECTION" - Explicit content detection. 3886 // "FACE_DETECTION" - Human face detection. 3887 // "SPEECH_TRANSCRIPTION" - Speech transcription. 3888 // "TEXT_DETECTION" - OCR text detection and tracking. 3889 // "OBJECT_TRACKING" - Object detection and tracking. 3890 // "LOGO_RECOGNITION" - Logo detection, tracking, and recognition. 3891 // "PERSON_DETECTION" - Person detection. 3892 Feature string `json:"feature,omitempty"` 3893 // InputUri: Video file location in Cloud Storage 3894 // (https://cloud.google.com/storage/). 3895 InputUri string `json:"inputUri,omitempty"` 3896 // ProgressPercent: Approximate percentage processed thus far. Guaranteed to be 3897 // 100 when fully processed. 3898 ProgressPercent int64 `json:"progressPercent,omitempty"` 3899 // Segment: Specifies which segment is being tracked if the request contains 3900 // more than one segment. 3901 Segment *GoogleCloudVideointelligenceV1p1beta1VideoSegment `json:"segment,omitempty"` 3902 // StartTime: Time when the request was received. 3903 StartTime string `json:"startTime,omitempty"` 3904 // UpdateTime: Time of the most recent update. 3905 UpdateTime string `json:"updateTime,omitempty"` 3906 // ForceSendFields is a list of field names (e.g. "Feature") to unconditionally 3907 // include in API requests. By default, fields with empty or default values are 3908 // omitted from API requests. See 3909 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3910 // details. 3911 ForceSendFields []string `json:"-"` 3912 // NullFields is a list of field names (e.g. "Feature") to include in API 3913 // requests with the JSON null value. By default, fields with empty values are 3914 // omitted from API requests. See 3915 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3916 NullFields []string `json:"-"` 3917 } 3918 3919 func (s *GoogleCloudVideointelligenceV1p1beta1VideoAnnotationProgress) MarshalJSON() ([]byte, error) { 3920 type NoMethod GoogleCloudVideointelligenceV1p1beta1VideoAnnotationProgress 3921 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3922 } 3923 3924 // GoogleCloudVideointelligenceV1p1beta1VideoAnnotationResults: Annotation 3925 // results for a single video. 3926 type GoogleCloudVideointelligenceV1p1beta1VideoAnnotationResults struct { 3927 // Error: If set, indicates an error. Note that for a single 3928 // `AnnotateVideoRequest` some videos may succeed and some may fail. 3929 Error *GoogleRpcStatus `json:"error,omitempty"` 3930 // ExplicitAnnotation: Explicit content annotation. 3931 ExplicitAnnotation *GoogleCloudVideointelligenceV1p1beta1ExplicitContentAnnotation `json:"explicitAnnotation,omitempty"` 3932 // FaceAnnotations: Deprecated. Please use `face_detection_annotations` 3933 // instead. 3934 FaceAnnotations []*GoogleCloudVideointelligenceV1p1beta1FaceAnnotation `json:"faceAnnotations,omitempty"` 3935 // FaceDetectionAnnotations: Face detection annotations. 3936 FaceDetectionAnnotations []*GoogleCloudVideointelligenceV1p1beta1FaceDetectionAnnotation `json:"faceDetectionAnnotations,omitempty"` 3937 // FrameLabelAnnotations: Label annotations on frame level. There is exactly 3938 // one element for each unique label. 3939 FrameLabelAnnotations []*GoogleCloudVideointelligenceV1p1beta1LabelAnnotation `json:"frameLabelAnnotations,omitempty"` 3940 // InputUri: Video file location in Cloud Storage 3941 // (https://cloud.google.com/storage/). 3942 InputUri string `json:"inputUri,omitempty"` 3943 // LogoRecognitionAnnotations: Annotations for list of logos detected, tracked 3944 // and recognized in video. 3945 LogoRecognitionAnnotations []*GoogleCloudVideointelligenceV1p1beta1LogoRecognitionAnnotation `json:"logoRecognitionAnnotations,omitempty"` 3946 // ObjectAnnotations: Annotations for list of objects detected and tracked in 3947 // video. 3948 ObjectAnnotations []*GoogleCloudVideointelligenceV1p1beta1ObjectTrackingAnnotation `json:"objectAnnotations,omitempty"` 3949 // PersonDetectionAnnotations: Person detection annotations. 3950 PersonDetectionAnnotations []*GoogleCloudVideointelligenceV1p1beta1PersonDetectionAnnotation `json:"personDetectionAnnotations,omitempty"` 3951 // Segment: Video segment on which the annotation is run. 3952 Segment *GoogleCloudVideointelligenceV1p1beta1VideoSegment `json:"segment,omitempty"` 3953 // SegmentLabelAnnotations: Topical label annotations on video level or 3954 // user-specified segment level. There is exactly one element for each unique 3955 // label. 3956 SegmentLabelAnnotations []*GoogleCloudVideointelligenceV1p1beta1LabelAnnotation `json:"segmentLabelAnnotations,omitempty"` 3957 // SegmentPresenceLabelAnnotations: Presence label annotations on video level 3958 // or user-specified segment level. There is exactly one element for each 3959 // unique label. Compared to the existing topical `segment_label_annotations`, 3960 // this field presents more fine-grained, segment-level labels detected in 3961 // video content and is made available only when the client sets 3962 // `LabelDetectionConfig.model` to "builtin/latest" in the request. 3963 SegmentPresenceLabelAnnotations []*GoogleCloudVideointelligenceV1p1beta1LabelAnnotation `json:"segmentPresenceLabelAnnotations,omitempty"` 3964 // ShotAnnotations: Shot annotations. Each shot is represented as a video 3965 // segment. 3966 ShotAnnotations []*GoogleCloudVideointelligenceV1p1beta1VideoSegment `json:"shotAnnotations,omitempty"` 3967 // ShotLabelAnnotations: Topical label annotations on shot level. There is 3968 // exactly one element for each unique label. 3969 ShotLabelAnnotations []*GoogleCloudVideointelligenceV1p1beta1LabelAnnotation `json:"shotLabelAnnotations,omitempty"` 3970 // ShotPresenceLabelAnnotations: Presence label annotations on shot level. 3971 // There is exactly one element for each unique label. Compared to the existing 3972 // topical `shot_label_annotations`, this field presents more fine-grained, 3973 // shot-level labels detected in video content and is made available only when 3974 // the client sets `LabelDetectionConfig.model` to "builtin/latest" in the 3975 // request. 3976 ShotPresenceLabelAnnotations []*GoogleCloudVideointelligenceV1p1beta1LabelAnnotation `json:"shotPresenceLabelAnnotations,omitempty"` 3977 // SpeechTranscriptions: Speech transcription. 3978 SpeechTranscriptions []*GoogleCloudVideointelligenceV1p1beta1SpeechTranscription `json:"speechTranscriptions,omitempty"` 3979 // TextAnnotations: OCR text detection and tracking. Annotations for list of 3980 // detected text snippets. Each will have list of frame information associated 3981 // with it. 3982 TextAnnotations []*GoogleCloudVideointelligenceV1p1beta1TextAnnotation `json:"textAnnotations,omitempty"` 3983 // ForceSendFields is a list of field names (e.g. "Error") to unconditionally 3984 // include in API requests. By default, fields with empty or default values are 3985 // omitted from API requests. See 3986 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3987 // details. 3988 ForceSendFields []string `json:"-"` 3989 // NullFields is a list of field names (e.g. "Error") to include in API 3990 // requests with the JSON null value. By default, fields with empty values are 3991 // omitted from API requests. See 3992 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3993 NullFields []string `json:"-"` 3994 } 3995 3996 func (s *GoogleCloudVideointelligenceV1p1beta1VideoAnnotationResults) MarshalJSON() ([]byte, error) { 3997 type NoMethod GoogleCloudVideointelligenceV1p1beta1VideoAnnotationResults 3998 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3999 } 4000 4001 // GoogleCloudVideointelligenceV1p1beta1VideoSegment: Video segment. 4002 type GoogleCloudVideointelligenceV1p1beta1VideoSegment struct { 4003 // EndTimeOffset: Time-offset, relative to the beginning of the video, 4004 // corresponding to the end of the segment (inclusive). 4005 EndTimeOffset string `json:"endTimeOffset,omitempty"` 4006 // StartTimeOffset: Time-offset, relative to the beginning of the video, 4007 // corresponding to the start of the segment (inclusive). 4008 StartTimeOffset string `json:"startTimeOffset,omitempty"` 4009 // ForceSendFields is a list of field names (e.g. "EndTimeOffset") to 4010 // unconditionally include in API requests. By default, fields with empty or 4011 // default values are omitted from API requests. See 4012 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4013 // details. 4014 ForceSendFields []string `json:"-"` 4015 // NullFields is a list of field names (e.g. "EndTimeOffset") to include in API 4016 // requests with the JSON null value. By default, fields with empty values are 4017 // omitted from API requests. See 4018 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4019 NullFields []string `json:"-"` 4020 } 4021 4022 func (s *GoogleCloudVideointelligenceV1p1beta1VideoSegment) MarshalJSON() ([]byte, error) { 4023 type NoMethod GoogleCloudVideointelligenceV1p1beta1VideoSegment 4024 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4025 } 4026 4027 // GoogleCloudVideointelligenceV1p1beta1WordInfo: Word-specific information for 4028 // recognized words. Word information is only included in the response when 4029 // certain request parameters are set, such as `enable_word_time_offsets`. 4030 type GoogleCloudVideointelligenceV1p1beta1WordInfo struct { 4031 // Confidence: Output only. The confidence estimate between 0.0 and 1.0. A 4032 // higher number indicates an estimated greater likelihood that the recognized 4033 // words are correct. This field is set only for the top alternative. This 4034 // field is not guaranteed to be accurate and users should not rely on it to be 4035 // always provided. The default of 0.0 is a sentinel value indicating 4036 // `confidence` was not set. 4037 Confidence float64 `json:"confidence,omitempty"` 4038 // EndTime: Time offset relative to the beginning of the audio, and 4039 // corresponding to the end of the spoken word. This field is only set if 4040 // `enable_word_time_offsets=true` and only in the top hypothesis. This is an 4041 // experimental feature and the accuracy of the time offset can vary. 4042 EndTime string `json:"endTime,omitempty"` 4043 // SpeakerTag: Output only. A distinct integer value is assigned for every 4044 // speaker within the audio. This field specifies which one of those speakers 4045 // was detected to have spoken this word. Value ranges from 1 up to 4046 // diarization_speaker_count, and is only set if speaker diarization is 4047 // enabled. 4048 SpeakerTag int64 `json:"speakerTag,omitempty"` 4049 // StartTime: Time offset relative to the beginning of the audio, and 4050 // corresponding to the start of the spoken word. This field is only set if 4051 // `enable_word_time_offsets=true` and only in the top hypothesis. This is an 4052 // experimental feature and the accuracy of the time offset can vary. 4053 StartTime string `json:"startTime,omitempty"` 4054 // Word: The word corresponding to this set of information. 4055 Word string `json:"word,omitempty"` 4056 // ForceSendFields is a list of field names (e.g. "Confidence") to 4057 // unconditionally include in API requests. By default, fields with empty or 4058 // default values are omitted from API requests. See 4059 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4060 // details. 4061 ForceSendFields []string `json:"-"` 4062 // NullFields is a list of field names (e.g. "Confidence") to include in API 4063 // requests with the JSON null value. By default, fields with empty values are 4064 // omitted from API requests. See 4065 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4066 NullFields []string `json:"-"` 4067 } 4068 4069 func (s *GoogleCloudVideointelligenceV1p1beta1WordInfo) MarshalJSON() ([]byte, error) { 4070 type NoMethod GoogleCloudVideointelligenceV1p1beta1WordInfo 4071 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4072 } 4073 4074 func (s *GoogleCloudVideointelligenceV1p1beta1WordInfo) UnmarshalJSON(data []byte) error { 4075 type NoMethod GoogleCloudVideointelligenceV1p1beta1WordInfo 4076 var s1 struct { 4077 Confidence gensupport.JSONFloat64 `json:"confidence"` 4078 *NoMethod 4079 } 4080 s1.NoMethod = (*NoMethod)(s) 4081 if err := json.Unmarshal(data, &s1); err != nil { 4082 return err 4083 } 4084 s.Confidence = float64(s1.Confidence) 4085 return nil 4086 } 4087 4088 // GoogleCloudVideointelligenceV1p2beta1AnnotateVideoProgress: Video annotation 4089 // progress. Included in the `metadata` field of the `Operation` returned by 4090 // the `GetOperation` call of the `google::longrunning::Operations` service. 4091 type GoogleCloudVideointelligenceV1p2beta1AnnotateVideoProgress struct { 4092 // AnnotationProgress: Progress metadata for all videos specified in 4093 // `AnnotateVideoRequest`. 4094 AnnotationProgress []*GoogleCloudVideointelligenceV1p2beta1VideoAnnotationProgress `json:"annotationProgress,omitempty"` 4095 // ForceSendFields is a list of field names (e.g. "AnnotationProgress") to 4096 // unconditionally include in API requests. By default, fields with empty or 4097 // default values are omitted from API requests. See 4098 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4099 // details. 4100 ForceSendFields []string `json:"-"` 4101 // NullFields is a list of field names (e.g. "AnnotationProgress") to include 4102 // in API requests with the JSON null value. By default, fields with empty 4103 // values are omitted from API requests. See 4104 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4105 NullFields []string `json:"-"` 4106 } 4107 4108 func (s *GoogleCloudVideointelligenceV1p2beta1AnnotateVideoProgress) MarshalJSON() ([]byte, error) { 4109 type NoMethod GoogleCloudVideointelligenceV1p2beta1AnnotateVideoProgress 4110 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4111 } 4112 4113 // GoogleCloudVideointelligenceV1p2beta1AnnotateVideoResponse: Video annotation 4114 // response. Included in the `response` field of the `Operation` returned by 4115 // the `GetOperation` call of the `google::longrunning::Operations` service. 4116 type GoogleCloudVideointelligenceV1p2beta1AnnotateVideoResponse struct { 4117 // AnnotationResults: Annotation results for all videos specified in 4118 // `AnnotateVideoRequest`. 4119 AnnotationResults []*GoogleCloudVideointelligenceV1p2beta1VideoAnnotationResults `json:"annotationResults,omitempty"` 4120 // ForceSendFields is a list of field names (e.g. "AnnotationResults") to 4121 // unconditionally include in API requests. By default, fields with empty or 4122 // default values are omitted from API requests. See 4123 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4124 // details. 4125 ForceSendFields []string `json:"-"` 4126 // NullFields is a list of field names (e.g. "AnnotationResults") to include in 4127 // API requests with the JSON null value. By default, fields with empty values 4128 // are omitted from API requests. See 4129 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4130 NullFields []string `json:"-"` 4131 } 4132 4133 func (s *GoogleCloudVideointelligenceV1p2beta1AnnotateVideoResponse) MarshalJSON() ([]byte, error) { 4134 type NoMethod GoogleCloudVideointelligenceV1p2beta1AnnotateVideoResponse 4135 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4136 } 4137 4138 // GoogleCloudVideointelligenceV1p2beta1DetectedAttribute: A generic detected 4139 // attribute represented by name in string format. 4140 type GoogleCloudVideointelligenceV1p2beta1DetectedAttribute struct { 4141 // Confidence: Detected attribute confidence. Range [0, 1]. 4142 Confidence float64 `json:"confidence,omitempty"` 4143 // Name: The name of the attribute, for example, glasses, dark_glasses, 4144 // mouth_open. A full list of supported type names will be provided in the 4145 // document. 4146 Name string `json:"name,omitempty"` 4147 // Value: Text value of the detection result. For example, the value for 4148 // "HairColor" can be "black", "blonde", etc. 4149 Value string `json:"value,omitempty"` 4150 // ForceSendFields is a list of field names (e.g. "Confidence") to 4151 // unconditionally include in API requests. By default, fields with empty or 4152 // default values are omitted from API requests. See 4153 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4154 // details. 4155 ForceSendFields []string `json:"-"` 4156 // NullFields is a list of field names (e.g. "Confidence") to include in API 4157 // requests with the JSON null value. By default, fields with empty values are 4158 // omitted from API requests. See 4159 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4160 NullFields []string `json:"-"` 4161 } 4162 4163 func (s *GoogleCloudVideointelligenceV1p2beta1DetectedAttribute) MarshalJSON() ([]byte, error) { 4164 type NoMethod GoogleCloudVideointelligenceV1p2beta1DetectedAttribute 4165 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4166 } 4167 4168 func (s *GoogleCloudVideointelligenceV1p2beta1DetectedAttribute) UnmarshalJSON(data []byte) error { 4169 type NoMethod GoogleCloudVideointelligenceV1p2beta1DetectedAttribute 4170 var s1 struct { 4171 Confidence gensupport.JSONFloat64 `json:"confidence"` 4172 *NoMethod 4173 } 4174 s1.NoMethod = (*NoMethod)(s) 4175 if err := json.Unmarshal(data, &s1); err != nil { 4176 return err 4177 } 4178 s.Confidence = float64(s1.Confidence) 4179 return nil 4180 } 4181 4182 // GoogleCloudVideointelligenceV1p2beta1DetectedLandmark: A generic detected 4183 // landmark represented by name in string format and a 2D location. 4184 type GoogleCloudVideointelligenceV1p2beta1DetectedLandmark struct { 4185 // Confidence: The confidence score of the detected landmark. Range [0, 1]. 4186 Confidence float64 `json:"confidence,omitempty"` 4187 // Name: The name of this landmark, for example, left_hand, right_shoulder. 4188 Name string `json:"name,omitempty"` 4189 // Point: The 2D point of the detected landmark using the normalized image 4190 // coordindate system. The normalized coordinates have the range from 0 to 1. 4191 Point *GoogleCloudVideointelligenceV1p2beta1NormalizedVertex `json:"point,omitempty"` 4192 // ForceSendFields is a list of field names (e.g. "Confidence") to 4193 // unconditionally include in API requests. By default, fields with empty or 4194 // default values are omitted from API requests. See 4195 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4196 // details. 4197 ForceSendFields []string `json:"-"` 4198 // NullFields is a list of field names (e.g. "Confidence") to include in API 4199 // requests with the JSON null value. By default, fields with empty values are 4200 // omitted from API requests. See 4201 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4202 NullFields []string `json:"-"` 4203 } 4204 4205 func (s *GoogleCloudVideointelligenceV1p2beta1DetectedLandmark) MarshalJSON() ([]byte, error) { 4206 type NoMethod GoogleCloudVideointelligenceV1p2beta1DetectedLandmark 4207 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4208 } 4209 4210 func (s *GoogleCloudVideointelligenceV1p2beta1DetectedLandmark) UnmarshalJSON(data []byte) error { 4211 type NoMethod GoogleCloudVideointelligenceV1p2beta1DetectedLandmark 4212 var s1 struct { 4213 Confidence gensupport.JSONFloat64 `json:"confidence"` 4214 *NoMethod 4215 } 4216 s1.NoMethod = (*NoMethod)(s) 4217 if err := json.Unmarshal(data, &s1); err != nil { 4218 return err 4219 } 4220 s.Confidence = float64(s1.Confidence) 4221 return nil 4222 } 4223 4224 // GoogleCloudVideointelligenceV1p2beta1Entity: Detected entity from video 4225 // analysis. 4226 type GoogleCloudVideointelligenceV1p2beta1Entity struct { 4227 // Description: Textual description, e.g., `Fixed-gear bicycle`. 4228 Description string `json:"description,omitempty"` 4229 // EntityId: Opaque entity ID. Some IDs may be available in Google Knowledge 4230 // Graph Search API (https://developers.google.com/knowledge-graph/). 4231 EntityId string `json:"entityId,omitempty"` 4232 // LanguageCode: Language code for `description` in BCP-47 format. 4233 LanguageCode string `json:"languageCode,omitempty"` 4234 // ForceSendFields is a list of field names (e.g. "Description") to 4235 // unconditionally include in API requests. By default, fields with empty or 4236 // default values are omitted from API requests. See 4237 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4238 // details. 4239 ForceSendFields []string `json:"-"` 4240 // NullFields is a list of field names (e.g. "Description") to include in API 4241 // requests with the JSON null value. By default, fields with empty values are 4242 // omitted from API requests. See 4243 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4244 NullFields []string `json:"-"` 4245 } 4246 4247 func (s *GoogleCloudVideointelligenceV1p2beta1Entity) MarshalJSON() ([]byte, error) { 4248 type NoMethod GoogleCloudVideointelligenceV1p2beta1Entity 4249 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4250 } 4251 4252 // GoogleCloudVideointelligenceV1p2beta1ExplicitContentAnnotation: Explicit 4253 // content annotation (based on per-frame visual signals only). If no explicit 4254 // content has been detected in a frame, no annotations are present for that 4255 // frame. 4256 type GoogleCloudVideointelligenceV1p2beta1ExplicitContentAnnotation struct { 4257 // Frames: All video frames where explicit content was detected. 4258 Frames []*GoogleCloudVideointelligenceV1p2beta1ExplicitContentFrame `json:"frames,omitempty"` 4259 // Version: Feature version. 4260 Version string `json:"version,omitempty"` 4261 // ForceSendFields is a list of field names (e.g. "Frames") to unconditionally 4262 // include in API requests. By default, fields with empty or default values are 4263 // omitted from API requests. See 4264 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4265 // details. 4266 ForceSendFields []string `json:"-"` 4267 // NullFields is a list of field names (e.g. "Frames") to include in API 4268 // requests with the JSON null value. By default, fields with empty values are 4269 // omitted from API requests. See 4270 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4271 NullFields []string `json:"-"` 4272 } 4273 4274 func (s *GoogleCloudVideointelligenceV1p2beta1ExplicitContentAnnotation) MarshalJSON() ([]byte, error) { 4275 type NoMethod GoogleCloudVideointelligenceV1p2beta1ExplicitContentAnnotation 4276 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4277 } 4278 4279 // GoogleCloudVideointelligenceV1p2beta1ExplicitContentFrame: Video frame level 4280 // annotation results for explicit content. 4281 type GoogleCloudVideointelligenceV1p2beta1ExplicitContentFrame struct { 4282 // PornographyLikelihood: Likelihood of the pornography content.. 4283 // 4284 // Possible values: 4285 // "LIKELIHOOD_UNSPECIFIED" - Unspecified likelihood. 4286 // "VERY_UNLIKELY" - Very unlikely. 4287 // "UNLIKELY" - Unlikely. 4288 // "POSSIBLE" - Possible. 4289 // "LIKELY" - Likely. 4290 // "VERY_LIKELY" - Very likely. 4291 PornographyLikelihood string `json:"pornographyLikelihood,omitempty"` 4292 // TimeOffset: Time-offset, relative to the beginning of the video, 4293 // corresponding to the video frame for this location. 4294 TimeOffset string `json:"timeOffset,omitempty"` 4295 // ForceSendFields is a list of field names (e.g. "PornographyLikelihood") to 4296 // unconditionally include in API requests. By default, fields with empty or 4297 // default values are omitted from API requests. See 4298 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4299 // details. 4300 ForceSendFields []string `json:"-"` 4301 // NullFields is a list of field names (e.g. "PornographyLikelihood") to 4302 // include in API requests with the JSON null value. By default, fields with 4303 // empty values are omitted from API requests. See 4304 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4305 NullFields []string `json:"-"` 4306 } 4307 4308 func (s *GoogleCloudVideointelligenceV1p2beta1ExplicitContentFrame) MarshalJSON() ([]byte, error) { 4309 type NoMethod GoogleCloudVideointelligenceV1p2beta1ExplicitContentFrame 4310 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4311 } 4312 4313 // GoogleCloudVideointelligenceV1p2beta1FaceAnnotation: Deprecated. No effect. 4314 type GoogleCloudVideointelligenceV1p2beta1FaceAnnotation struct { 4315 // Frames: All video frames where a face was detected. 4316 Frames []*GoogleCloudVideointelligenceV1p2beta1FaceFrame `json:"frames,omitempty"` 4317 // Segments: All video segments where a face was detected. 4318 Segments []*GoogleCloudVideointelligenceV1p2beta1FaceSegment `json:"segments,omitempty"` 4319 // Thumbnail: Thumbnail of a representative face view (in JPEG format). 4320 Thumbnail string `json:"thumbnail,omitempty"` 4321 // ForceSendFields is a list of field names (e.g. "Frames") to unconditionally 4322 // include in API requests. By default, fields with empty or default values are 4323 // omitted from API requests. See 4324 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4325 // details. 4326 ForceSendFields []string `json:"-"` 4327 // NullFields is a list of field names (e.g. "Frames") to include in API 4328 // requests with the JSON null value. By default, fields with empty values are 4329 // omitted from API requests. See 4330 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4331 NullFields []string `json:"-"` 4332 } 4333 4334 func (s *GoogleCloudVideointelligenceV1p2beta1FaceAnnotation) MarshalJSON() ([]byte, error) { 4335 type NoMethod GoogleCloudVideointelligenceV1p2beta1FaceAnnotation 4336 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4337 } 4338 4339 // GoogleCloudVideointelligenceV1p2beta1FaceDetectionAnnotation: Face detection 4340 // annotation. 4341 type GoogleCloudVideointelligenceV1p2beta1FaceDetectionAnnotation struct { 4342 // Thumbnail: The thumbnail of a person's face. 4343 Thumbnail string `json:"thumbnail,omitempty"` 4344 // Tracks: The face tracks with attributes. 4345 Tracks []*GoogleCloudVideointelligenceV1p2beta1Track `json:"tracks,omitempty"` 4346 // Version: Feature version. 4347 Version string `json:"version,omitempty"` 4348 // ForceSendFields is a list of field names (e.g. "Thumbnail") to 4349 // unconditionally include in API requests. By default, fields with empty or 4350 // default values are omitted from API requests. See 4351 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4352 // details. 4353 ForceSendFields []string `json:"-"` 4354 // NullFields is a list of field names (e.g. "Thumbnail") to include in API 4355 // requests with the JSON null value. By default, fields with empty values are 4356 // omitted from API requests. See 4357 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4358 NullFields []string `json:"-"` 4359 } 4360 4361 func (s *GoogleCloudVideointelligenceV1p2beta1FaceDetectionAnnotation) MarshalJSON() ([]byte, error) { 4362 type NoMethod GoogleCloudVideointelligenceV1p2beta1FaceDetectionAnnotation 4363 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4364 } 4365 4366 // GoogleCloudVideointelligenceV1p2beta1FaceFrame: Deprecated. No effect. 4367 type GoogleCloudVideointelligenceV1p2beta1FaceFrame struct { 4368 // NormalizedBoundingBoxes: Normalized Bounding boxes in a frame. There can be 4369 // more than one boxes if the same face is detected in multiple locations 4370 // within the current frame. 4371 NormalizedBoundingBoxes []*GoogleCloudVideointelligenceV1p2beta1NormalizedBoundingBox `json:"normalizedBoundingBoxes,omitempty"` 4372 // TimeOffset: Time-offset, relative to the beginning of the video, 4373 // corresponding to the video frame for this location. 4374 TimeOffset string `json:"timeOffset,omitempty"` 4375 // ForceSendFields is a list of field names (e.g. "NormalizedBoundingBoxes") to 4376 // unconditionally include in API requests. By default, fields with empty or 4377 // default values are omitted from API requests. See 4378 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4379 // details. 4380 ForceSendFields []string `json:"-"` 4381 // NullFields is a list of field names (e.g. "NormalizedBoundingBoxes") to 4382 // include in API requests with the JSON null value. By default, fields with 4383 // empty values are omitted from API requests. See 4384 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4385 NullFields []string `json:"-"` 4386 } 4387 4388 func (s *GoogleCloudVideointelligenceV1p2beta1FaceFrame) MarshalJSON() ([]byte, error) { 4389 type NoMethod GoogleCloudVideointelligenceV1p2beta1FaceFrame 4390 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4391 } 4392 4393 // GoogleCloudVideointelligenceV1p2beta1FaceSegment: Video segment level 4394 // annotation results for face detection. 4395 type GoogleCloudVideointelligenceV1p2beta1FaceSegment struct { 4396 // Segment: Video segment where a face was detected. 4397 Segment *GoogleCloudVideointelligenceV1p2beta1VideoSegment `json:"segment,omitempty"` 4398 // ForceSendFields is a list of field names (e.g. "Segment") to unconditionally 4399 // include in API requests. By default, fields with empty or default values are 4400 // omitted from API requests. See 4401 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4402 // details. 4403 ForceSendFields []string `json:"-"` 4404 // NullFields is a list of field names (e.g. "Segment") to include in API 4405 // requests with the JSON null value. By default, fields with empty values are 4406 // omitted from API requests. See 4407 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4408 NullFields []string `json:"-"` 4409 } 4410 4411 func (s *GoogleCloudVideointelligenceV1p2beta1FaceSegment) MarshalJSON() ([]byte, error) { 4412 type NoMethod GoogleCloudVideointelligenceV1p2beta1FaceSegment 4413 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4414 } 4415 4416 // GoogleCloudVideointelligenceV1p2beta1LabelAnnotation: Label annotation. 4417 type GoogleCloudVideointelligenceV1p2beta1LabelAnnotation struct { 4418 // CategoryEntities: Common categories for the detected entity. For example, 4419 // when the label is `Terrier`, the category is likely `dog`. And in some cases 4420 // there might be more than one categories e.g., `Terrier` could also be a 4421 // `pet`. 4422 CategoryEntities []*GoogleCloudVideointelligenceV1p2beta1Entity `json:"categoryEntities,omitempty"` 4423 // Entity: Detected entity. 4424 Entity *GoogleCloudVideointelligenceV1p2beta1Entity `json:"entity,omitempty"` 4425 // Frames: All video frames where a label was detected. 4426 Frames []*GoogleCloudVideointelligenceV1p2beta1LabelFrame `json:"frames,omitempty"` 4427 // Segments: All video segments where a label was detected. 4428 Segments []*GoogleCloudVideointelligenceV1p2beta1LabelSegment `json:"segments,omitempty"` 4429 // Version: Feature version. 4430 Version string `json:"version,omitempty"` 4431 // ForceSendFields is a list of field names (e.g. "CategoryEntities") to 4432 // unconditionally include in API requests. By default, fields with empty or 4433 // default values are omitted from API requests. See 4434 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4435 // details. 4436 ForceSendFields []string `json:"-"` 4437 // NullFields is a list of field names (e.g. "CategoryEntities") to include in 4438 // API requests with the JSON null value. By default, fields with empty values 4439 // are omitted from API requests. See 4440 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4441 NullFields []string `json:"-"` 4442 } 4443 4444 func (s *GoogleCloudVideointelligenceV1p2beta1LabelAnnotation) MarshalJSON() ([]byte, error) { 4445 type NoMethod GoogleCloudVideointelligenceV1p2beta1LabelAnnotation 4446 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4447 } 4448 4449 // GoogleCloudVideointelligenceV1p2beta1LabelFrame: Video frame level 4450 // annotation results for label detection. 4451 type GoogleCloudVideointelligenceV1p2beta1LabelFrame struct { 4452 // Confidence: Confidence that the label is accurate. Range: [0, 1]. 4453 Confidence float64 `json:"confidence,omitempty"` 4454 // TimeOffset: Time-offset, relative to the beginning of the video, 4455 // corresponding to the video frame for this location. 4456 TimeOffset string `json:"timeOffset,omitempty"` 4457 // ForceSendFields is a list of field names (e.g. "Confidence") to 4458 // unconditionally include in API requests. By default, fields with empty or 4459 // default values are omitted from API requests. See 4460 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4461 // details. 4462 ForceSendFields []string `json:"-"` 4463 // NullFields is a list of field names (e.g. "Confidence") to include in API 4464 // requests with the JSON null value. By default, fields with empty values are 4465 // omitted from API requests. See 4466 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4467 NullFields []string `json:"-"` 4468 } 4469 4470 func (s *GoogleCloudVideointelligenceV1p2beta1LabelFrame) MarshalJSON() ([]byte, error) { 4471 type NoMethod GoogleCloudVideointelligenceV1p2beta1LabelFrame 4472 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4473 } 4474 4475 func (s *GoogleCloudVideointelligenceV1p2beta1LabelFrame) UnmarshalJSON(data []byte) error { 4476 type NoMethod GoogleCloudVideointelligenceV1p2beta1LabelFrame 4477 var s1 struct { 4478 Confidence gensupport.JSONFloat64 `json:"confidence"` 4479 *NoMethod 4480 } 4481 s1.NoMethod = (*NoMethod)(s) 4482 if err := json.Unmarshal(data, &s1); err != nil { 4483 return err 4484 } 4485 s.Confidence = float64(s1.Confidence) 4486 return nil 4487 } 4488 4489 // GoogleCloudVideointelligenceV1p2beta1LabelSegment: Video segment level 4490 // annotation results for label detection. 4491 type GoogleCloudVideointelligenceV1p2beta1LabelSegment struct { 4492 // Confidence: Confidence that the label is accurate. Range: [0, 1]. 4493 Confidence float64 `json:"confidence,omitempty"` 4494 // Segment: Video segment where a label was detected. 4495 Segment *GoogleCloudVideointelligenceV1p2beta1VideoSegment `json:"segment,omitempty"` 4496 // ForceSendFields is a list of field names (e.g. "Confidence") to 4497 // unconditionally include in API requests. By default, fields with empty or 4498 // default values are omitted from API requests. See 4499 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4500 // details. 4501 ForceSendFields []string `json:"-"` 4502 // NullFields is a list of field names (e.g. "Confidence") to include in API 4503 // requests with the JSON null value. By default, fields with empty values are 4504 // omitted from API requests. See 4505 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4506 NullFields []string `json:"-"` 4507 } 4508 4509 func (s *GoogleCloudVideointelligenceV1p2beta1LabelSegment) MarshalJSON() ([]byte, error) { 4510 type NoMethod GoogleCloudVideointelligenceV1p2beta1LabelSegment 4511 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4512 } 4513 4514 func (s *GoogleCloudVideointelligenceV1p2beta1LabelSegment) UnmarshalJSON(data []byte) error { 4515 type NoMethod GoogleCloudVideointelligenceV1p2beta1LabelSegment 4516 var s1 struct { 4517 Confidence gensupport.JSONFloat64 `json:"confidence"` 4518 *NoMethod 4519 } 4520 s1.NoMethod = (*NoMethod)(s) 4521 if err := json.Unmarshal(data, &s1); err != nil { 4522 return err 4523 } 4524 s.Confidence = float64(s1.Confidence) 4525 return nil 4526 } 4527 4528 // GoogleCloudVideointelligenceV1p2beta1LogoRecognitionAnnotation: Annotation 4529 // corresponding to one detected, tracked and recognized logo class. 4530 type GoogleCloudVideointelligenceV1p2beta1LogoRecognitionAnnotation struct { 4531 // Entity: Entity category information to specify the logo class that all the 4532 // logo tracks within this LogoRecognitionAnnotation are recognized as. 4533 Entity *GoogleCloudVideointelligenceV1p2beta1Entity `json:"entity,omitempty"` 4534 // Segments: All video segments where the recognized logo appears. There might 4535 // be multiple instances of the same logo class appearing in one VideoSegment. 4536 Segments []*GoogleCloudVideointelligenceV1p2beta1VideoSegment `json:"segments,omitempty"` 4537 // Tracks: All logo tracks where the recognized logo appears. Each track 4538 // corresponds to one logo instance appearing in consecutive frames. 4539 Tracks []*GoogleCloudVideointelligenceV1p2beta1Track `json:"tracks,omitempty"` 4540 // ForceSendFields is a list of field names (e.g. "Entity") to unconditionally 4541 // include in API requests. By default, fields with empty or default values are 4542 // omitted from API requests. See 4543 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4544 // details. 4545 ForceSendFields []string `json:"-"` 4546 // NullFields is a list of field names (e.g. "Entity") to include in API 4547 // requests with the JSON null value. By default, fields with empty values are 4548 // omitted from API requests. See 4549 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4550 NullFields []string `json:"-"` 4551 } 4552 4553 func (s *GoogleCloudVideointelligenceV1p2beta1LogoRecognitionAnnotation) MarshalJSON() ([]byte, error) { 4554 type NoMethod GoogleCloudVideointelligenceV1p2beta1LogoRecognitionAnnotation 4555 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4556 } 4557 4558 // GoogleCloudVideointelligenceV1p2beta1NormalizedBoundingBox: Normalized 4559 // bounding box. The normalized vertex coordinates are relative to the original 4560 // image. Range: [0, 1]. 4561 type GoogleCloudVideointelligenceV1p2beta1NormalizedBoundingBox struct { 4562 // Bottom: Bottom Y coordinate. 4563 Bottom float64 `json:"bottom,omitempty"` 4564 // Left: Left X coordinate. 4565 Left float64 `json:"left,omitempty"` 4566 // Right: Right X coordinate. 4567 Right float64 `json:"right,omitempty"` 4568 // Top: Top Y coordinate. 4569 Top float64 `json:"top,omitempty"` 4570 // ForceSendFields is a list of field names (e.g. "Bottom") to unconditionally 4571 // include in API requests. By default, fields with empty or default values are 4572 // omitted from API requests. See 4573 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4574 // details. 4575 ForceSendFields []string `json:"-"` 4576 // NullFields is a list of field names (e.g. "Bottom") to include in API 4577 // requests with the JSON null value. By default, fields with empty values are 4578 // omitted from API requests. See 4579 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4580 NullFields []string `json:"-"` 4581 } 4582 4583 func (s *GoogleCloudVideointelligenceV1p2beta1NormalizedBoundingBox) MarshalJSON() ([]byte, error) { 4584 type NoMethod GoogleCloudVideointelligenceV1p2beta1NormalizedBoundingBox 4585 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4586 } 4587 4588 func (s *GoogleCloudVideointelligenceV1p2beta1NormalizedBoundingBox) UnmarshalJSON(data []byte) error { 4589 type NoMethod GoogleCloudVideointelligenceV1p2beta1NormalizedBoundingBox 4590 var s1 struct { 4591 Bottom gensupport.JSONFloat64 `json:"bottom"` 4592 Left gensupport.JSONFloat64 `json:"left"` 4593 Right gensupport.JSONFloat64 `json:"right"` 4594 Top gensupport.JSONFloat64 `json:"top"` 4595 *NoMethod 4596 } 4597 s1.NoMethod = (*NoMethod)(s) 4598 if err := json.Unmarshal(data, &s1); err != nil { 4599 return err 4600 } 4601 s.Bottom = float64(s1.Bottom) 4602 s.Left = float64(s1.Left) 4603 s.Right = float64(s1.Right) 4604 s.Top = float64(s1.Top) 4605 return nil 4606 } 4607 4608 // GoogleCloudVideointelligenceV1p2beta1NormalizedBoundingPoly: Normalized 4609 // bounding polygon for text (that might not be aligned with axis). Contains 4610 // list of the corner points in clockwise order starting from top-left corner. 4611 // For example, for a rectangular bounding box: When the text is horizontal it 4612 // might look like: 0----1 | | 3----2 When it's clockwise rotated 180 degrees 4613 // around the top-left corner it becomes: 2----3 | | 1----0 and the vertex 4614 // order will still be (0, 1, 2, 3). Note that values can be less than 0, or 4615 // greater than 1 due to trignometric calculations for location of the box. 4616 type GoogleCloudVideointelligenceV1p2beta1NormalizedBoundingPoly struct { 4617 // Vertices: Normalized vertices of the bounding polygon. 4618 Vertices []*GoogleCloudVideointelligenceV1p2beta1NormalizedVertex `json:"vertices,omitempty"` 4619 // ForceSendFields is a list of field names (e.g. "Vertices") to 4620 // unconditionally include in API requests. By default, fields with empty or 4621 // default values are omitted from API requests. See 4622 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4623 // details. 4624 ForceSendFields []string `json:"-"` 4625 // NullFields is a list of field names (e.g. "Vertices") to include in API 4626 // requests with the JSON null value. By default, fields with empty values are 4627 // omitted from API requests. See 4628 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4629 NullFields []string `json:"-"` 4630 } 4631 4632 func (s *GoogleCloudVideointelligenceV1p2beta1NormalizedBoundingPoly) MarshalJSON() ([]byte, error) { 4633 type NoMethod GoogleCloudVideointelligenceV1p2beta1NormalizedBoundingPoly 4634 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4635 } 4636 4637 // GoogleCloudVideointelligenceV1p2beta1NormalizedVertex: A vertex represents a 4638 // 2D point in the image. NOTE: the normalized vertex coordinates are relative 4639 // to the original image and range from 0 to 1. 4640 type GoogleCloudVideointelligenceV1p2beta1NormalizedVertex struct { 4641 // X: X coordinate. 4642 X float64 `json:"x,omitempty"` 4643 // Y: Y coordinate. 4644 Y float64 `json:"y,omitempty"` 4645 // ForceSendFields is a list of field names (e.g. "X") to unconditionally 4646 // include in API requests. By default, fields with empty or default values are 4647 // omitted from API requests. See 4648 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4649 // details. 4650 ForceSendFields []string `json:"-"` 4651 // NullFields is a list of field names (e.g. "X") to include in API requests 4652 // with the JSON null value. By default, fields with empty values are omitted 4653 // from API requests. See 4654 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4655 NullFields []string `json:"-"` 4656 } 4657 4658 func (s *GoogleCloudVideointelligenceV1p2beta1NormalizedVertex) MarshalJSON() ([]byte, error) { 4659 type NoMethod GoogleCloudVideointelligenceV1p2beta1NormalizedVertex 4660 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4661 } 4662 4663 func (s *GoogleCloudVideointelligenceV1p2beta1NormalizedVertex) UnmarshalJSON(data []byte) error { 4664 type NoMethod GoogleCloudVideointelligenceV1p2beta1NormalizedVertex 4665 var s1 struct { 4666 X gensupport.JSONFloat64 `json:"x"` 4667 Y gensupport.JSONFloat64 `json:"y"` 4668 *NoMethod 4669 } 4670 s1.NoMethod = (*NoMethod)(s) 4671 if err := json.Unmarshal(data, &s1); err != nil { 4672 return err 4673 } 4674 s.X = float64(s1.X) 4675 s.Y = float64(s1.Y) 4676 return nil 4677 } 4678 4679 // GoogleCloudVideointelligenceV1p2beta1ObjectTrackingAnnotation: Annotations 4680 // corresponding to one tracked object. 4681 type GoogleCloudVideointelligenceV1p2beta1ObjectTrackingAnnotation struct { 4682 // Confidence: Object category's labeling confidence of this track. 4683 Confidence float64 `json:"confidence,omitempty"` 4684 // Entity: Entity to specify the object category that this track is labeled as. 4685 Entity *GoogleCloudVideointelligenceV1p2beta1Entity `json:"entity,omitempty"` 4686 // Frames: Information corresponding to all frames where this object track 4687 // appears. Non-streaming batch mode: it may be one or multiple 4688 // ObjectTrackingFrame messages in frames. Streaming mode: it can only be one 4689 // ObjectTrackingFrame message in frames. 4690 Frames []*GoogleCloudVideointelligenceV1p2beta1ObjectTrackingFrame `json:"frames,omitempty"` 4691 // Segment: Non-streaming batch mode ONLY. Each object track corresponds to one 4692 // video segment where it appears. 4693 Segment *GoogleCloudVideointelligenceV1p2beta1VideoSegment `json:"segment,omitempty"` 4694 // TrackId: Streaming mode ONLY. In streaming mode, we do not know the end time 4695 // of a tracked object before it is completed. Hence, there is no VideoSegment 4696 // info returned. Instead, we provide a unique identifiable integer track_id so 4697 // that the customers can correlate the results of the ongoing 4698 // ObjectTrackAnnotation of the same track_id over time. 4699 TrackId int64 `json:"trackId,omitempty,string"` 4700 // Version: Feature version. 4701 Version string `json:"version,omitempty"` 4702 // ForceSendFields is a list of field names (e.g. "Confidence") to 4703 // unconditionally include in API requests. By default, fields with empty or 4704 // default values are omitted from API requests. See 4705 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4706 // details. 4707 ForceSendFields []string `json:"-"` 4708 // NullFields is a list of field names (e.g. "Confidence") to include in API 4709 // requests with the JSON null value. By default, fields with empty values are 4710 // omitted from API requests. See 4711 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4712 NullFields []string `json:"-"` 4713 } 4714 4715 func (s *GoogleCloudVideointelligenceV1p2beta1ObjectTrackingAnnotation) MarshalJSON() ([]byte, error) { 4716 type NoMethod GoogleCloudVideointelligenceV1p2beta1ObjectTrackingAnnotation 4717 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4718 } 4719 4720 func (s *GoogleCloudVideointelligenceV1p2beta1ObjectTrackingAnnotation) UnmarshalJSON(data []byte) error { 4721 type NoMethod GoogleCloudVideointelligenceV1p2beta1ObjectTrackingAnnotation 4722 var s1 struct { 4723 Confidence gensupport.JSONFloat64 `json:"confidence"` 4724 *NoMethod 4725 } 4726 s1.NoMethod = (*NoMethod)(s) 4727 if err := json.Unmarshal(data, &s1); err != nil { 4728 return err 4729 } 4730 s.Confidence = float64(s1.Confidence) 4731 return nil 4732 } 4733 4734 // GoogleCloudVideointelligenceV1p2beta1ObjectTrackingFrame: Video frame level 4735 // annotations for object detection and tracking. This field stores per frame 4736 // location, time offset, and confidence. 4737 type GoogleCloudVideointelligenceV1p2beta1ObjectTrackingFrame struct { 4738 // NormalizedBoundingBox: The normalized bounding box location of this object 4739 // track for the frame. 4740 NormalizedBoundingBox *GoogleCloudVideointelligenceV1p2beta1NormalizedBoundingBox `json:"normalizedBoundingBox,omitempty"` 4741 // TimeOffset: The timestamp of the frame in microseconds. 4742 TimeOffset string `json:"timeOffset,omitempty"` 4743 // ForceSendFields is a list of field names (e.g. "NormalizedBoundingBox") to 4744 // unconditionally include in API requests. By default, fields with empty or 4745 // default values are omitted from API requests. See 4746 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4747 // details. 4748 ForceSendFields []string `json:"-"` 4749 // NullFields is a list of field names (e.g. "NormalizedBoundingBox") to 4750 // include in API requests with the JSON null value. By default, fields with 4751 // empty values are omitted from API requests. See 4752 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4753 NullFields []string `json:"-"` 4754 } 4755 4756 func (s *GoogleCloudVideointelligenceV1p2beta1ObjectTrackingFrame) MarshalJSON() ([]byte, error) { 4757 type NoMethod GoogleCloudVideointelligenceV1p2beta1ObjectTrackingFrame 4758 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4759 } 4760 4761 // GoogleCloudVideointelligenceV1p2beta1PersonDetectionAnnotation: Person 4762 // detection annotation per video. 4763 type GoogleCloudVideointelligenceV1p2beta1PersonDetectionAnnotation struct { 4764 // Tracks: The detected tracks of a person. 4765 Tracks []*GoogleCloudVideointelligenceV1p2beta1Track `json:"tracks,omitempty"` 4766 // Version: Feature version. 4767 Version string `json:"version,omitempty"` 4768 // ForceSendFields is a list of field names (e.g. "Tracks") to unconditionally 4769 // include in API requests. By default, fields with empty or default values are 4770 // omitted from API requests. See 4771 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4772 // details. 4773 ForceSendFields []string `json:"-"` 4774 // NullFields is a list of field names (e.g. "Tracks") to include in API 4775 // requests with the JSON null value. By default, fields with empty values are 4776 // omitted from API requests. See 4777 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4778 NullFields []string `json:"-"` 4779 } 4780 4781 func (s *GoogleCloudVideointelligenceV1p2beta1PersonDetectionAnnotation) MarshalJSON() ([]byte, error) { 4782 type NoMethod GoogleCloudVideointelligenceV1p2beta1PersonDetectionAnnotation 4783 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4784 } 4785 4786 // GoogleCloudVideointelligenceV1p2beta1SpeechRecognitionAlternative: 4787 // Alternative hypotheses (a.k.a. n-best list). 4788 type GoogleCloudVideointelligenceV1p2beta1SpeechRecognitionAlternative struct { 4789 // Confidence: Output only. The confidence estimate between 0.0 and 1.0. A 4790 // higher number indicates an estimated greater likelihood that the recognized 4791 // words are correct. This field is set only for the top alternative. This 4792 // field is not guaranteed to be accurate and users should not rely on it to be 4793 // always provided. The default of 0.0 is a sentinel value indicating 4794 // `confidence` was not set. 4795 Confidence float64 `json:"confidence,omitempty"` 4796 // Transcript: Transcript text representing the words that the user spoke. 4797 Transcript string `json:"transcript,omitempty"` 4798 // Words: Output only. A list of word-specific information for each recognized 4799 // word. Note: When `enable_speaker_diarization` is set to true, you will see 4800 // all the words from the beginning of the audio. 4801 Words []*GoogleCloudVideointelligenceV1p2beta1WordInfo `json:"words,omitempty"` 4802 // ForceSendFields is a list of field names (e.g. "Confidence") to 4803 // unconditionally include in API requests. By default, fields with empty or 4804 // default values are omitted from API requests. See 4805 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4806 // details. 4807 ForceSendFields []string `json:"-"` 4808 // NullFields is a list of field names (e.g. "Confidence") to include in API 4809 // requests with the JSON null value. By default, fields with empty values are 4810 // omitted from API requests. See 4811 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4812 NullFields []string `json:"-"` 4813 } 4814 4815 func (s *GoogleCloudVideointelligenceV1p2beta1SpeechRecognitionAlternative) MarshalJSON() ([]byte, error) { 4816 type NoMethod GoogleCloudVideointelligenceV1p2beta1SpeechRecognitionAlternative 4817 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4818 } 4819 4820 func (s *GoogleCloudVideointelligenceV1p2beta1SpeechRecognitionAlternative) UnmarshalJSON(data []byte) error { 4821 type NoMethod GoogleCloudVideointelligenceV1p2beta1SpeechRecognitionAlternative 4822 var s1 struct { 4823 Confidence gensupport.JSONFloat64 `json:"confidence"` 4824 *NoMethod 4825 } 4826 s1.NoMethod = (*NoMethod)(s) 4827 if err := json.Unmarshal(data, &s1); err != nil { 4828 return err 4829 } 4830 s.Confidence = float64(s1.Confidence) 4831 return nil 4832 } 4833 4834 // GoogleCloudVideointelligenceV1p2beta1SpeechTranscription: A speech 4835 // recognition result corresponding to a portion of the audio. 4836 type GoogleCloudVideointelligenceV1p2beta1SpeechTranscription struct { 4837 // Alternatives: May contain one or more recognition hypotheses (up to the 4838 // maximum specified in `max_alternatives`). These alternatives are ordered in 4839 // terms of accuracy, with the top (first) alternative being the most probable, 4840 // as ranked by the recognizer. 4841 Alternatives []*GoogleCloudVideointelligenceV1p2beta1SpeechRecognitionAlternative `json:"alternatives,omitempty"` 4842 // LanguageCode: Output only. The BCP-47 4843 // (https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of the language 4844 // in this result. This language code was detected to have the most likelihood 4845 // of being spoken in the audio. 4846 LanguageCode string `json:"languageCode,omitempty"` 4847 // ForceSendFields is a list of field names (e.g. "Alternatives") to 4848 // unconditionally include in API requests. By default, fields with empty or 4849 // default values are omitted from API requests. See 4850 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4851 // details. 4852 ForceSendFields []string `json:"-"` 4853 // NullFields is a list of field names (e.g. "Alternatives") to include in API 4854 // requests with the JSON null value. By default, fields with empty values are 4855 // omitted from API requests. See 4856 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4857 NullFields []string `json:"-"` 4858 } 4859 4860 func (s *GoogleCloudVideointelligenceV1p2beta1SpeechTranscription) MarshalJSON() ([]byte, error) { 4861 type NoMethod GoogleCloudVideointelligenceV1p2beta1SpeechTranscription 4862 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4863 } 4864 4865 // GoogleCloudVideointelligenceV1p2beta1TextAnnotation: Annotations related to 4866 // one detected OCR text snippet. This will contain the corresponding text, 4867 // confidence value, and frame level information for each detection. 4868 type GoogleCloudVideointelligenceV1p2beta1TextAnnotation struct { 4869 // Segments: All video segments where OCR detected text appears. 4870 Segments []*GoogleCloudVideointelligenceV1p2beta1TextSegment `json:"segments,omitempty"` 4871 // Text: The detected text. 4872 Text string `json:"text,omitempty"` 4873 // Version: Feature version. 4874 Version string `json:"version,omitempty"` 4875 // ForceSendFields is a list of field names (e.g. "Segments") to 4876 // unconditionally include in API requests. By default, fields with empty or 4877 // default values are omitted from API requests. See 4878 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4879 // details. 4880 ForceSendFields []string `json:"-"` 4881 // NullFields is a list of field names (e.g. "Segments") to include in API 4882 // requests with the JSON null value. By default, fields with empty values are 4883 // omitted from API requests. See 4884 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4885 NullFields []string `json:"-"` 4886 } 4887 4888 func (s *GoogleCloudVideointelligenceV1p2beta1TextAnnotation) MarshalJSON() ([]byte, error) { 4889 type NoMethod GoogleCloudVideointelligenceV1p2beta1TextAnnotation 4890 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4891 } 4892 4893 // GoogleCloudVideointelligenceV1p2beta1TextFrame: Video frame level annotation 4894 // results for text annotation (OCR). Contains information regarding timestamp 4895 // and bounding box locations for the frames containing detected OCR text 4896 // snippets. 4897 type GoogleCloudVideointelligenceV1p2beta1TextFrame struct { 4898 // RotatedBoundingBox: Bounding polygon of the detected text for this frame. 4899 RotatedBoundingBox *GoogleCloudVideointelligenceV1p2beta1NormalizedBoundingPoly `json:"rotatedBoundingBox,omitempty"` 4900 // TimeOffset: Timestamp of this frame. 4901 TimeOffset string `json:"timeOffset,omitempty"` 4902 // ForceSendFields is a list of field names (e.g. "RotatedBoundingBox") to 4903 // unconditionally include in API requests. By default, fields with empty or 4904 // default values are omitted from API requests. See 4905 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4906 // details. 4907 ForceSendFields []string `json:"-"` 4908 // NullFields is a list of field names (e.g. "RotatedBoundingBox") to include 4909 // in API requests with the JSON null value. By default, fields with empty 4910 // values are omitted from API requests. See 4911 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4912 NullFields []string `json:"-"` 4913 } 4914 4915 func (s *GoogleCloudVideointelligenceV1p2beta1TextFrame) MarshalJSON() ([]byte, error) { 4916 type NoMethod GoogleCloudVideointelligenceV1p2beta1TextFrame 4917 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4918 } 4919 4920 // GoogleCloudVideointelligenceV1p2beta1TextSegment: Video segment level 4921 // annotation results for text detection. 4922 type GoogleCloudVideointelligenceV1p2beta1TextSegment struct { 4923 // Confidence: Confidence for the track of detected text. It is calculated as 4924 // the highest over all frames where OCR detected text appears. 4925 Confidence float64 `json:"confidence,omitempty"` 4926 // Frames: Information related to the frames where OCR detected text appears. 4927 Frames []*GoogleCloudVideointelligenceV1p2beta1TextFrame `json:"frames,omitempty"` 4928 // Segment: Video segment where a text snippet was detected. 4929 Segment *GoogleCloudVideointelligenceV1p2beta1VideoSegment `json:"segment,omitempty"` 4930 // ForceSendFields is a list of field names (e.g. "Confidence") to 4931 // unconditionally include in API requests. By default, fields with empty or 4932 // default values are omitted from API requests. See 4933 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4934 // details. 4935 ForceSendFields []string `json:"-"` 4936 // NullFields is a list of field names (e.g. "Confidence") to include in API 4937 // requests with the JSON null value. By default, fields with empty values are 4938 // omitted from API requests. See 4939 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4940 NullFields []string `json:"-"` 4941 } 4942 4943 func (s *GoogleCloudVideointelligenceV1p2beta1TextSegment) MarshalJSON() ([]byte, error) { 4944 type NoMethod GoogleCloudVideointelligenceV1p2beta1TextSegment 4945 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4946 } 4947 4948 func (s *GoogleCloudVideointelligenceV1p2beta1TextSegment) UnmarshalJSON(data []byte) error { 4949 type NoMethod GoogleCloudVideointelligenceV1p2beta1TextSegment 4950 var s1 struct { 4951 Confidence gensupport.JSONFloat64 `json:"confidence"` 4952 *NoMethod 4953 } 4954 s1.NoMethod = (*NoMethod)(s) 4955 if err := json.Unmarshal(data, &s1); err != nil { 4956 return err 4957 } 4958 s.Confidence = float64(s1.Confidence) 4959 return nil 4960 } 4961 4962 // GoogleCloudVideointelligenceV1p2beta1TimestampedObject: For tracking related 4963 // features. An object at time_offset with attributes, and located with 4964 // normalized_bounding_box. 4965 type GoogleCloudVideointelligenceV1p2beta1TimestampedObject struct { 4966 // Attributes: Optional. The attributes of the object in the bounding box. 4967 Attributes []*GoogleCloudVideointelligenceV1p2beta1DetectedAttribute `json:"attributes,omitempty"` 4968 // Landmarks: Optional. The detected landmarks. 4969 Landmarks []*GoogleCloudVideointelligenceV1p2beta1DetectedLandmark `json:"landmarks,omitempty"` 4970 // NormalizedBoundingBox: Normalized Bounding box in a frame, where the object 4971 // is located. 4972 NormalizedBoundingBox *GoogleCloudVideointelligenceV1p2beta1NormalizedBoundingBox `json:"normalizedBoundingBox,omitempty"` 4973 // TimeOffset: Time-offset, relative to the beginning of the video, 4974 // corresponding to the video frame for this object. 4975 TimeOffset string `json:"timeOffset,omitempty"` 4976 // ForceSendFields is a list of field names (e.g. "Attributes") to 4977 // unconditionally include in API requests. By default, fields with empty or 4978 // default values are omitted from API requests. See 4979 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4980 // details. 4981 ForceSendFields []string `json:"-"` 4982 // NullFields is a list of field names (e.g. "Attributes") to include in API 4983 // requests with the JSON null value. By default, fields with empty values are 4984 // omitted from API requests. See 4985 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4986 NullFields []string `json:"-"` 4987 } 4988 4989 func (s *GoogleCloudVideointelligenceV1p2beta1TimestampedObject) MarshalJSON() ([]byte, error) { 4990 type NoMethod GoogleCloudVideointelligenceV1p2beta1TimestampedObject 4991 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4992 } 4993 4994 // GoogleCloudVideointelligenceV1p2beta1Track: A track of an object instance. 4995 type GoogleCloudVideointelligenceV1p2beta1Track struct { 4996 // Attributes: Optional. Attributes in the track level. 4997 Attributes []*GoogleCloudVideointelligenceV1p2beta1DetectedAttribute `json:"attributes,omitempty"` 4998 // Confidence: Optional. The confidence score of the tracked object. 4999 Confidence float64 `json:"confidence,omitempty"` 5000 // Segment: Video segment of a track. 5001 Segment *GoogleCloudVideointelligenceV1p2beta1VideoSegment `json:"segment,omitempty"` 5002 // TimestampedObjects: The object with timestamp and attributes per frame in 5003 // the track. 5004 TimestampedObjects []*GoogleCloudVideointelligenceV1p2beta1TimestampedObject `json:"timestampedObjects,omitempty"` 5005 // ForceSendFields is a list of field names (e.g. "Attributes") to 5006 // unconditionally include in API requests. By default, fields with empty or 5007 // default values are omitted from API requests. See 5008 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5009 // details. 5010 ForceSendFields []string `json:"-"` 5011 // NullFields is a list of field names (e.g. "Attributes") to include in API 5012 // requests with the JSON null value. By default, fields with empty values are 5013 // omitted from API requests. See 5014 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5015 NullFields []string `json:"-"` 5016 } 5017 5018 func (s *GoogleCloudVideointelligenceV1p2beta1Track) MarshalJSON() ([]byte, error) { 5019 type NoMethod GoogleCloudVideointelligenceV1p2beta1Track 5020 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5021 } 5022 5023 func (s *GoogleCloudVideointelligenceV1p2beta1Track) UnmarshalJSON(data []byte) error { 5024 type NoMethod GoogleCloudVideointelligenceV1p2beta1Track 5025 var s1 struct { 5026 Confidence gensupport.JSONFloat64 `json:"confidence"` 5027 *NoMethod 5028 } 5029 s1.NoMethod = (*NoMethod)(s) 5030 if err := json.Unmarshal(data, &s1); err != nil { 5031 return err 5032 } 5033 s.Confidence = float64(s1.Confidence) 5034 return nil 5035 } 5036 5037 // GoogleCloudVideointelligenceV1p2beta1VideoAnnotationProgress: Annotation 5038 // progress for a single video. 5039 type GoogleCloudVideointelligenceV1p2beta1VideoAnnotationProgress struct { 5040 // Feature: Specifies which feature is being tracked if the request contains 5041 // more than one feature. 5042 // 5043 // Possible values: 5044 // "FEATURE_UNSPECIFIED" - Unspecified. 5045 // "LABEL_DETECTION" - Label detection. Detect objects, such as dog or 5046 // flower. 5047 // "SHOT_CHANGE_DETECTION" - Shot change detection. 5048 // "EXPLICIT_CONTENT_DETECTION" - Explicit content detection. 5049 // "FACE_DETECTION" - Human face detection. 5050 // "SPEECH_TRANSCRIPTION" - Speech transcription. 5051 // "TEXT_DETECTION" - OCR text detection and tracking. 5052 // "OBJECT_TRACKING" - Object detection and tracking. 5053 // "LOGO_RECOGNITION" - Logo detection, tracking, and recognition. 5054 // "PERSON_DETECTION" - Person detection. 5055 Feature string `json:"feature,omitempty"` 5056 // InputUri: Video file location in Cloud Storage 5057 // (https://cloud.google.com/storage/). 5058 InputUri string `json:"inputUri,omitempty"` 5059 // ProgressPercent: Approximate percentage processed thus far. Guaranteed to be 5060 // 100 when fully processed. 5061 ProgressPercent int64 `json:"progressPercent,omitempty"` 5062 // Segment: Specifies which segment is being tracked if the request contains 5063 // more than one segment. 5064 Segment *GoogleCloudVideointelligenceV1p2beta1VideoSegment `json:"segment,omitempty"` 5065 // StartTime: Time when the request was received. 5066 StartTime string `json:"startTime,omitempty"` 5067 // UpdateTime: Time of the most recent update. 5068 UpdateTime string `json:"updateTime,omitempty"` 5069 // ForceSendFields is a list of field names (e.g. "Feature") to unconditionally 5070 // include in API requests. By default, fields with empty or default values are 5071 // omitted from API requests. See 5072 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5073 // details. 5074 ForceSendFields []string `json:"-"` 5075 // NullFields is a list of field names (e.g. "Feature") to include in API 5076 // requests with the JSON null value. By default, fields with empty values are 5077 // omitted from API requests. See 5078 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5079 NullFields []string `json:"-"` 5080 } 5081 5082 func (s *GoogleCloudVideointelligenceV1p2beta1VideoAnnotationProgress) MarshalJSON() ([]byte, error) { 5083 type NoMethod GoogleCloudVideointelligenceV1p2beta1VideoAnnotationProgress 5084 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5085 } 5086 5087 // GoogleCloudVideointelligenceV1p2beta1VideoAnnotationResults: Annotation 5088 // results for a single video. 5089 type GoogleCloudVideointelligenceV1p2beta1VideoAnnotationResults struct { 5090 // Error: If set, indicates an error. Note that for a single 5091 // `AnnotateVideoRequest` some videos may succeed and some may fail. 5092 Error *GoogleRpcStatus `json:"error,omitempty"` 5093 // ExplicitAnnotation: Explicit content annotation. 5094 ExplicitAnnotation *GoogleCloudVideointelligenceV1p2beta1ExplicitContentAnnotation `json:"explicitAnnotation,omitempty"` 5095 // FaceAnnotations: Deprecated. Please use `face_detection_annotations` 5096 // instead. 5097 FaceAnnotations []*GoogleCloudVideointelligenceV1p2beta1FaceAnnotation `json:"faceAnnotations,omitempty"` 5098 // FaceDetectionAnnotations: Face detection annotations. 5099 FaceDetectionAnnotations []*GoogleCloudVideointelligenceV1p2beta1FaceDetectionAnnotation `json:"faceDetectionAnnotations,omitempty"` 5100 // FrameLabelAnnotations: Label annotations on frame level. There is exactly 5101 // one element for each unique label. 5102 FrameLabelAnnotations []*GoogleCloudVideointelligenceV1p2beta1LabelAnnotation `json:"frameLabelAnnotations,omitempty"` 5103 // InputUri: Video file location in Cloud Storage 5104 // (https://cloud.google.com/storage/). 5105 InputUri string `json:"inputUri,omitempty"` 5106 // LogoRecognitionAnnotations: Annotations for list of logos detected, tracked 5107 // and recognized in video. 5108 LogoRecognitionAnnotations []*GoogleCloudVideointelligenceV1p2beta1LogoRecognitionAnnotation `json:"logoRecognitionAnnotations,omitempty"` 5109 // ObjectAnnotations: Annotations for list of objects detected and tracked in 5110 // video. 5111 ObjectAnnotations []*GoogleCloudVideointelligenceV1p2beta1ObjectTrackingAnnotation `json:"objectAnnotations,omitempty"` 5112 // PersonDetectionAnnotations: Person detection annotations. 5113 PersonDetectionAnnotations []*GoogleCloudVideointelligenceV1p2beta1PersonDetectionAnnotation `json:"personDetectionAnnotations,omitempty"` 5114 // Segment: Video segment on which the annotation is run. 5115 Segment *GoogleCloudVideointelligenceV1p2beta1VideoSegment `json:"segment,omitempty"` 5116 // SegmentLabelAnnotations: Topical label annotations on video level or 5117 // user-specified segment level. There is exactly one element for each unique 5118 // label. 5119 SegmentLabelAnnotations []*GoogleCloudVideointelligenceV1p2beta1LabelAnnotation `json:"segmentLabelAnnotations,omitempty"` 5120 // SegmentPresenceLabelAnnotations: Presence label annotations on video level 5121 // or user-specified segment level. There is exactly one element for each 5122 // unique label. Compared to the existing topical `segment_label_annotations`, 5123 // this field presents more fine-grained, segment-level labels detected in 5124 // video content and is made available only when the client sets 5125 // `LabelDetectionConfig.model` to "builtin/latest" in the request. 5126 SegmentPresenceLabelAnnotations []*GoogleCloudVideointelligenceV1p2beta1LabelAnnotation `json:"segmentPresenceLabelAnnotations,omitempty"` 5127 // ShotAnnotations: Shot annotations. Each shot is represented as a video 5128 // segment. 5129 ShotAnnotations []*GoogleCloudVideointelligenceV1p2beta1VideoSegment `json:"shotAnnotations,omitempty"` 5130 // ShotLabelAnnotations: Topical label annotations on shot level. There is 5131 // exactly one element for each unique label. 5132 ShotLabelAnnotations []*GoogleCloudVideointelligenceV1p2beta1LabelAnnotation `json:"shotLabelAnnotations,omitempty"` 5133 // ShotPresenceLabelAnnotations: Presence label annotations on shot level. 5134 // There is exactly one element for each unique label. Compared to the existing 5135 // topical `shot_label_annotations`, this field presents more fine-grained, 5136 // shot-level labels detected in video content and is made available only when 5137 // the client sets `LabelDetectionConfig.model` to "builtin/latest" in the 5138 // request. 5139 ShotPresenceLabelAnnotations []*GoogleCloudVideointelligenceV1p2beta1LabelAnnotation `json:"shotPresenceLabelAnnotations,omitempty"` 5140 // SpeechTranscriptions: Speech transcription. 5141 SpeechTranscriptions []*GoogleCloudVideointelligenceV1p2beta1SpeechTranscription `json:"speechTranscriptions,omitempty"` 5142 // TextAnnotations: OCR text detection and tracking. Annotations for list of 5143 // detected text snippets. Each will have list of frame information associated 5144 // with it. 5145 TextAnnotations []*GoogleCloudVideointelligenceV1p2beta1TextAnnotation `json:"textAnnotations,omitempty"` 5146 // ForceSendFields is a list of field names (e.g. "Error") to unconditionally 5147 // include in API requests. By default, fields with empty or default values are 5148 // omitted from API requests. See 5149 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5150 // details. 5151 ForceSendFields []string `json:"-"` 5152 // NullFields is a list of field names (e.g. "Error") to include in API 5153 // requests with the JSON null value. By default, fields with empty values are 5154 // omitted from API requests. See 5155 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5156 NullFields []string `json:"-"` 5157 } 5158 5159 func (s *GoogleCloudVideointelligenceV1p2beta1VideoAnnotationResults) MarshalJSON() ([]byte, error) { 5160 type NoMethod GoogleCloudVideointelligenceV1p2beta1VideoAnnotationResults 5161 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5162 } 5163 5164 // GoogleCloudVideointelligenceV1p2beta1VideoSegment: Video segment. 5165 type GoogleCloudVideointelligenceV1p2beta1VideoSegment struct { 5166 // EndTimeOffset: Time-offset, relative to the beginning of the video, 5167 // corresponding to the end of the segment (inclusive). 5168 EndTimeOffset string `json:"endTimeOffset,omitempty"` 5169 // StartTimeOffset: Time-offset, relative to the beginning of the video, 5170 // corresponding to the start of the segment (inclusive). 5171 StartTimeOffset string `json:"startTimeOffset,omitempty"` 5172 // ForceSendFields is a list of field names (e.g. "EndTimeOffset") to 5173 // unconditionally include in API requests. By default, fields with empty or 5174 // default values are omitted from API requests. See 5175 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5176 // details. 5177 ForceSendFields []string `json:"-"` 5178 // NullFields is a list of field names (e.g. "EndTimeOffset") to include in API 5179 // requests with the JSON null value. By default, fields with empty values are 5180 // omitted from API requests. See 5181 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5182 NullFields []string `json:"-"` 5183 } 5184 5185 func (s *GoogleCloudVideointelligenceV1p2beta1VideoSegment) MarshalJSON() ([]byte, error) { 5186 type NoMethod GoogleCloudVideointelligenceV1p2beta1VideoSegment 5187 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5188 } 5189 5190 // GoogleCloudVideointelligenceV1p2beta1WordInfo: Word-specific information for 5191 // recognized words. Word information is only included in the response when 5192 // certain request parameters are set, such as `enable_word_time_offsets`. 5193 type GoogleCloudVideointelligenceV1p2beta1WordInfo struct { 5194 // Confidence: Output only. The confidence estimate between 0.0 and 1.0. A 5195 // higher number indicates an estimated greater likelihood that the recognized 5196 // words are correct. This field is set only for the top alternative. This 5197 // field is not guaranteed to be accurate and users should not rely on it to be 5198 // always provided. The default of 0.0 is a sentinel value indicating 5199 // `confidence` was not set. 5200 Confidence float64 `json:"confidence,omitempty"` 5201 // EndTime: Time offset relative to the beginning of the audio, and 5202 // corresponding to the end of the spoken word. This field is only set if 5203 // `enable_word_time_offsets=true` and only in the top hypothesis. This is an 5204 // experimental feature and the accuracy of the time offset can vary. 5205 EndTime string `json:"endTime,omitempty"` 5206 // SpeakerTag: Output only. A distinct integer value is assigned for every 5207 // speaker within the audio. This field specifies which one of those speakers 5208 // was detected to have spoken this word. Value ranges from 1 up to 5209 // diarization_speaker_count, and is only set if speaker diarization is 5210 // enabled. 5211 SpeakerTag int64 `json:"speakerTag,omitempty"` 5212 // StartTime: Time offset relative to the beginning of the audio, and 5213 // corresponding to the start of the spoken word. This field is only set if 5214 // `enable_word_time_offsets=true` and only in the top hypothesis. This is an 5215 // experimental feature and the accuracy of the time offset can vary. 5216 StartTime string `json:"startTime,omitempty"` 5217 // Word: The word corresponding to this set of information. 5218 Word string `json:"word,omitempty"` 5219 // ForceSendFields is a list of field names (e.g. "Confidence") to 5220 // unconditionally include in API requests. By default, fields with empty or 5221 // default values are omitted from API requests. See 5222 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5223 // details. 5224 ForceSendFields []string `json:"-"` 5225 // NullFields is a list of field names (e.g. "Confidence") to include in API 5226 // requests with the JSON null value. By default, fields with empty values are 5227 // omitted from API requests. See 5228 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5229 NullFields []string `json:"-"` 5230 } 5231 5232 func (s *GoogleCloudVideointelligenceV1p2beta1WordInfo) MarshalJSON() ([]byte, error) { 5233 type NoMethod GoogleCloudVideointelligenceV1p2beta1WordInfo 5234 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5235 } 5236 5237 func (s *GoogleCloudVideointelligenceV1p2beta1WordInfo) UnmarshalJSON(data []byte) error { 5238 type NoMethod GoogleCloudVideointelligenceV1p2beta1WordInfo 5239 var s1 struct { 5240 Confidence gensupport.JSONFloat64 `json:"confidence"` 5241 *NoMethod 5242 } 5243 s1.NoMethod = (*NoMethod)(s) 5244 if err := json.Unmarshal(data, &s1); err != nil { 5245 return err 5246 } 5247 s.Confidence = float64(s1.Confidence) 5248 return nil 5249 } 5250 5251 // GoogleCloudVideointelligenceV1p3beta1AnnotateVideoProgress: Video annotation 5252 // progress. Included in the `metadata` field of the `Operation` returned by 5253 // the `GetOperation` call of the `google::longrunning::Operations` service. 5254 type GoogleCloudVideointelligenceV1p3beta1AnnotateVideoProgress struct { 5255 // AnnotationProgress: Progress metadata for all videos specified in 5256 // `AnnotateVideoRequest`. 5257 AnnotationProgress []*GoogleCloudVideointelligenceV1p3beta1VideoAnnotationProgress `json:"annotationProgress,omitempty"` 5258 // ForceSendFields is a list of field names (e.g. "AnnotationProgress") to 5259 // unconditionally include in API requests. By default, fields with empty or 5260 // default values are omitted from API requests. See 5261 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5262 // details. 5263 ForceSendFields []string `json:"-"` 5264 // NullFields is a list of field names (e.g. "AnnotationProgress") to include 5265 // in API requests with the JSON null value. By default, fields with empty 5266 // values are omitted from API requests. See 5267 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5268 NullFields []string `json:"-"` 5269 } 5270 5271 func (s *GoogleCloudVideointelligenceV1p3beta1AnnotateVideoProgress) MarshalJSON() ([]byte, error) { 5272 type NoMethod GoogleCloudVideointelligenceV1p3beta1AnnotateVideoProgress 5273 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5274 } 5275 5276 // GoogleCloudVideointelligenceV1p3beta1AnnotateVideoResponse: Video annotation 5277 // response. Included in the `response` field of the `Operation` returned by 5278 // the `GetOperation` call of the `google::longrunning::Operations` service. 5279 type GoogleCloudVideointelligenceV1p3beta1AnnotateVideoResponse struct { 5280 // AnnotationResults: Annotation results for all videos specified in 5281 // `AnnotateVideoRequest`. 5282 AnnotationResults []*GoogleCloudVideointelligenceV1p3beta1VideoAnnotationResults `json:"annotationResults,omitempty"` 5283 // ForceSendFields is a list of field names (e.g. "AnnotationResults") to 5284 // unconditionally include in API requests. By default, fields with empty or 5285 // default values are omitted from API requests. See 5286 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5287 // details. 5288 ForceSendFields []string `json:"-"` 5289 // NullFields is a list of field names (e.g. "AnnotationResults") to include in 5290 // API requests with the JSON null value. By default, fields with empty values 5291 // are omitted from API requests. See 5292 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5293 NullFields []string `json:"-"` 5294 } 5295 5296 func (s *GoogleCloudVideointelligenceV1p3beta1AnnotateVideoResponse) MarshalJSON() ([]byte, error) { 5297 type NoMethod GoogleCloudVideointelligenceV1p3beta1AnnotateVideoResponse 5298 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5299 } 5300 5301 // GoogleCloudVideointelligenceV1p3beta1Celebrity: Celebrity definition. 5302 type GoogleCloudVideointelligenceV1p3beta1Celebrity struct { 5303 // Description: Textual description of additional information about the 5304 // celebrity, if applicable. 5305 Description string `json:"description,omitempty"` 5306 // DisplayName: The celebrity name. 5307 DisplayName string `json:"displayName,omitempty"` 5308 // Name: The resource name of the celebrity. Have the format 5309 // `video-intelligence/kg-mid` indicates a celebrity from preloaded gallery. 5310 // kg-mid is the id in Google knowledge graph, which is unique for the 5311 // celebrity. 5312 Name string `json:"name,omitempty"` 5313 // ForceSendFields is a list of field names (e.g. "Description") to 5314 // unconditionally include in API requests. By default, fields with empty or 5315 // default values are omitted from API requests. See 5316 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5317 // details. 5318 ForceSendFields []string `json:"-"` 5319 // NullFields is a list of field names (e.g. "Description") to include in API 5320 // requests with the JSON null value. By default, fields with empty values are 5321 // omitted from API requests. See 5322 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5323 NullFields []string `json:"-"` 5324 } 5325 5326 func (s *GoogleCloudVideointelligenceV1p3beta1Celebrity) MarshalJSON() ([]byte, error) { 5327 type NoMethod GoogleCloudVideointelligenceV1p3beta1Celebrity 5328 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5329 } 5330 5331 // GoogleCloudVideointelligenceV1p3beta1CelebrityRecognitionAnnotation: 5332 // Celebrity recognition annotation per video. 5333 type GoogleCloudVideointelligenceV1p3beta1CelebrityRecognitionAnnotation struct { 5334 // CelebrityTracks: The tracks detected from the input video, including 5335 // recognized celebrities and other detected faces in the video. 5336 CelebrityTracks []*GoogleCloudVideointelligenceV1p3beta1CelebrityTrack `json:"celebrityTracks,omitempty"` 5337 // Version: Feature version. 5338 Version string `json:"version,omitempty"` 5339 // ForceSendFields is a list of field names (e.g. "CelebrityTracks") to 5340 // unconditionally include in API requests. By default, fields with empty or 5341 // default values are omitted from API requests. See 5342 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5343 // details. 5344 ForceSendFields []string `json:"-"` 5345 // NullFields is a list of field names (e.g. "CelebrityTracks") to include in 5346 // API requests with the JSON null value. By default, fields with empty values 5347 // are omitted from API requests. See 5348 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5349 NullFields []string `json:"-"` 5350 } 5351 5352 func (s *GoogleCloudVideointelligenceV1p3beta1CelebrityRecognitionAnnotation) MarshalJSON() ([]byte, error) { 5353 type NoMethod GoogleCloudVideointelligenceV1p3beta1CelebrityRecognitionAnnotation 5354 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5355 } 5356 5357 // GoogleCloudVideointelligenceV1p3beta1CelebrityTrack: The annotation result 5358 // of a celebrity face track. RecognizedCelebrity field could be empty if the 5359 // face track does not have any matched celebrities. 5360 type GoogleCloudVideointelligenceV1p3beta1CelebrityTrack struct { 5361 // Celebrities: Top N match of the celebrities for the face in this track. 5362 Celebrities []*GoogleCloudVideointelligenceV1p3beta1RecognizedCelebrity `json:"celebrities,omitempty"` 5363 // FaceTrack: A track of a person's face. 5364 FaceTrack *GoogleCloudVideointelligenceV1p3beta1Track `json:"faceTrack,omitempty"` 5365 // ForceSendFields is a list of field names (e.g. "Celebrities") to 5366 // unconditionally include in API requests. By default, fields with empty or 5367 // default values are omitted from API requests. See 5368 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5369 // details. 5370 ForceSendFields []string `json:"-"` 5371 // NullFields is a list of field names (e.g. "Celebrities") to include in API 5372 // requests with the JSON null value. By default, fields with empty values are 5373 // omitted from API requests. See 5374 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5375 NullFields []string `json:"-"` 5376 } 5377 5378 func (s *GoogleCloudVideointelligenceV1p3beta1CelebrityTrack) MarshalJSON() ([]byte, error) { 5379 type NoMethod GoogleCloudVideointelligenceV1p3beta1CelebrityTrack 5380 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5381 } 5382 5383 // GoogleCloudVideointelligenceV1p3beta1DetectedAttribute: A generic detected 5384 // attribute represented by name in string format. 5385 type GoogleCloudVideointelligenceV1p3beta1DetectedAttribute struct { 5386 // Confidence: Detected attribute confidence. Range [0, 1]. 5387 Confidence float64 `json:"confidence,omitempty"` 5388 // Name: The name of the attribute, for example, glasses, dark_glasses, 5389 // mouth_open. A full list of supported type names will be provided in the 5390 // document. 5391 Name string `json:"name,omitempty"` 5392 // Value: Text value of the detection result. For example, the value for 5393 // "HairColor" can be "black", "blonde", etc. 5394 Value string `json:"value,omitempty"` 5395 // ForceSendFields is a list of field names (e.g. "Confidence") to 5396 // unconditionally include in API requests. By default, fields with empty or 5397 // default values are omitted from API requests. See 5398 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5399 // details. 5400 ForceSendFields []string `json:"-"` 5401 // NullFields is a list of field names (e.g. "Confidence") to include in API 5402 // requests with the JSON null value. By default, fields with empty values are 5403 // omitted from API requests. See 5404 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5405 NullFields []string `json:"-"` 5406 } 5407 5408 func (s *GoogleCloudVideointelligenceV1p3beta1DetectedAttribute) MarshalJSON() ([]byte, error) { 5409 type NoMethod GoogleCloudVideointelligenceV1p3beta1DetectedAttribute 5410 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5411 } 5412 5413 func (s *GoogleCloudVideointelligenceV1p3beta1DetectedAttribute) UnmarshalJSON(data []byte) error { 5414 type NoMethod GoogleCloudVideointelligenceV1p3beta1DetectedAttribute 5415 var s1 struct { 5416 Confidence gensupport.JSONFloat64 `json:"confidence"` 5417 *NoMethod 5418 } 5419 s1.NoMethod = (*NoMethod)(s) 5420 if err := json.Unmarshal(data, &s1); err != nil { 5421 return err 5422 } 5423 s.Confidence = float64(s1.Confidence) 5424 return nil 5425 } 5426 5427 // GoogleCloudVideointelligenceV1p3beta1DetectedLandmark: A generic detected 5428 // landmark represented by name in string format and a 2D location. 5429 type GoogleCloudVideointelligenceV1p3beta1DetectedLandmark struct { 5430 // Confidence: The confidence score of the detected landmark. Range [0, 1]. 5431 Confidence float64 `json:"confidence,omitempty"` 5432 // Name: The name of this landmark, for example, left_hand, right_shoulder. 5433 Name string `json:"name,omitempty"` 5434 // Point: The 2D point of the detected landmark using the normalized image 5435 // coordindate system. The normalized coordinates have the range from 0 to 1. 5436 Point *GoogleCloudVideointelligenceV1p3beta1NormalizedVertex `json:"point,omitempty"` 5437 // ForceSendFields is a list of field names (e.g. "Confidence") to 5438 // unconditionally include in API requests. By default, fields with empty or 5439 // default values are omitted from API requests. See 5440 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5441 // details. 5442 ForceSendFields []string `json:"-"` 5443 // NullFields is a list of field names (e.g. "Confidence") to include in API 5444 // requests with the JSON null value. By default, fields with empty values are 5445 // omitted from API requests. See 5446 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5447 NullFields []string `json:"-"` 5448 } 5449 5450 func (s *GoogleCloudVideointelligenceV1p3beta1DetectedLandmark) MarshalJSON() ([]byte, error) { 5451 type NoMethod GoogleCloudVideointelligenceV1p3beta1DetectedLandmark 5452 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5453 } 5454 5455 func (s *GoogleCloudVideointelligenceV1p3beta1DetectedLandmark) UnmarshalJSON(data []byte) error { 5456 type NoMethod GoogleCloudVideointelligenceV1p3beta1DetectedLandmark 5457 var s1 struct { 5458 Confidence gensupport.JSONFloat64 `json:"confidence"` 5459 *NoMethod 5460 } 5461 s1.NoMethod = (*NoMethod)(s) 5462 if err := json.Unmarshal(data, &s1); err != nil { 5463 return err 5464 } 5465 s.Confidence = float64(s1.Confidence) 5466 return nil 5467 } 5468 5469 // GoogleCloudVideointelligenceV1p3beta1Entity: Detected entity from video 5470 // analysis. 5471 type GoogleCloudVideointelligenceV1p3beta1Entity struct { 5472 // Description: Textual description, e.g., `Fixed-gear bicycle`. 5473 Description string `json:"description,omitempty"` 5474 // EntityId: Opaque entity ID. Some IDs may be available in Google Knowledge 5475 // Graph Search API (https://developers.google.com/knowledge-graph/). 5476 EntityId string `json:"entityId,omitempty"` 5477 // LanguageCode: Language code for `description` in BCP-47 format. 5478 LanguageCode string `json:"languageCode,omitempty"` 5479 // ForceSendFields is a list of field names (e.g. "Description") to 5480 // unconditionally include in API requests. By default, fields with empty or 5481 // default values are omitted from API requests. See 5482 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5483 // details. 5484 ForceSendFields []string `json:"-"` 5485 // NullFields is a list of field names (e.g. "Description") to include in API 5486 // requests with the JSON null value. By default, fields with empty values are 5487 // omitted from API requests. See 5488 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5489 NullFields []string `json:"-"` 5490 } 5491 5492 func (s *GoogleCloudVideointelligenceV1p3beta1Entity) MarshalJSON() ([]byte, error) { 5493 type NoMethod GoogleCloudVideointelligenceV1p3beta1Entity 5494 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5495 } 5496 5497 // GoogleCloudVideointelligenceV1p3beta1ExplicitContentAnnotation: Explicit 5498 // content annotation (based on per-frame visual signals only). If no explicit 5499 // content has been detected in a frame, no annotations are present for that 5500 // frame. 5501 type GoogleCloudVideointelligenceV1p3beta1ExplicitContentAnnotation struct { 5502 // Frames: All video frames where explicit content was detected. 5503 Frames []*GoogleCloudVideointelligenceV1p3beta1ExplicitContentFrame `json:"frames,omitempty"` 5504 // Version: Feature version. 5505 Version string `json:"version,omitempty"` 5506 // ForceSendFields is a list of field names (e.g. "Frames") to unconditionally 5507 // include in API requests. By default, fields with empty or default values are 5508 // omitted from API requests. See 5509 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5510 // details. 5511 ForceSendFields []string `json:"-"` 5512 // NullFields is a list of field names (e.g. "Frames") to include in API 5513 // requests with the JSON null value. By default, fields with empty values are 5514 // omitted from API requests. See 5515 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5516 NullFields []string `json:"-"` 5517 } 5518 5519 func (s *GoogleCloudVideointelligenceV1p3beta1ExplicitContentAnnotation) MarshalJSON() ([]byte, error) { 5520 type NoMethod GoogleCloudVideointelligenceV1p3beta1ExplicitContentAnnotation 5521 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5522 } 5523 5524 // GoogleCloudVideointelligenceV1p3beta1ExplicitContentFrame: Video frame level 5525 // annotation results for explicit content. 5526 type GoogleCloudVideointelligenceV1p3beta1ExplicitContentFrame struct { 5527 // PornographyLikelihood: Likelihood of the pornography content.. 5528 // 5529 // Possible values: 5530 // "LIKELIHOOD_UNSPECIFIED" - Unspecified likelihood. 5531 // "VERY_UNLIKELY" - Very unlikely. 5532 // "UNLIKELY" - Unlikely. 5533 // "POSSIBLE" - Possible. 5534 // "LIKELY" - Likely. 5535 // "VERY_LIKELY" - Very likely. 5536 PornographyLikelihood string `json:"pornographyLikelihood,omitempty"` 5537 // TimeOffset: Time-offset, relative to the beginning of the video, 5538 // corresponding to the video frame for this location. 5539 TimeOffset string `json:"timeOffset,omitempty"` 5540 // ForceSendFields is a list of field names (e.g. "PornographyLikelihood") to 5541 // unconditionally include in API requests. By default, fields with empty or 5542 // default values are omitted from API requests. See 5543 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5544 // details. 5545 ForceSendFields []string `json:"-"` 5546 // NullFields is a list of field names (e.g. "PornographyLikelihood") to 5547 // include in API requests with the JSON null value. By default, fields with 5548 // empty values are omitted from API requests. See 5549 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5550 NullFields []string `json:"-"` 5551 } 5552 5553 func (s *GoogleCloudVideointelligenceV1p3beta1ExplicitContentFrame) MarshalJSON() ([]byte, error) { 5554 type NoMethod GoogleCloudVideointelligenceV1p3beta1ExplicitContentFrame 5555 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5556 } 5557 5558 // GoogleCloudVideointelligenceV1p3beta1FaceAnnotation: Deprecated. No effect. 5559 type GoogleCloudVideointelligenceV1p3beta1FaceAnnotation struct { 5560 // Frames: All video frames where a face was detected. 5561 Frames []*GoogleCloudVideointelligenceV1p3beta1FaceFrame `json:"frames,omitempty"` 5562 // Segments: All video segments where a face was detected. 5563 Segments []*GoogleCloudVideointelligenceV1p3beta1FaceSegment `json:"segments,omitempty"` 5564 // Thumbnail: Thumbnail of a representative face view (in JPEG format). 5565 Thumbnail string `json:"thumbnail,omitempty"` 5566 // ForceSendFields is a list of field names (e.g. "Frames") to unconditionally 5567 // include in API requests. By default, fields with empty or default values are 5568 // omitted from API requests. See 5569 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5570 // details. 5571 ForceSendFields []string `json:"-"` 5572 // NullFields is a list of field names (e.g. "Frames") to include in API 5573 // requests with the JSON null value. By default, fields with empty values are 5574 // omitted from API requests. See 5575 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5576 NullFields []string `json:"-"` 5577 } 5578 5579 func (s *GoogleCloudVideointelligenceV1p3beta1FaceAnnotation) MarshalJSON() ([]byte, error) { 5580 type NoMethod GoogleCloudVideointelligenceV1p3beta1FaceAnnotation 5581 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5582 } 5583 5584 // GoogleCloudVideointelligenceV1p3beta1FaceDetectionAnnotation: Face detection 5585 // annotation. 5586 type GoogleCloudVideointelligenceV1p3beta1FaceDetectionAnnotation struct { 5587 // Thumbnail: The thumbnail of a person's face. 5588 Thumbnail string `json:"thumbnail,omitempty"` 5589 // Tracks: The face tracks with attributes. 5590 Tracks []*GoogleCloudVideointelligenceV1p3beta1Track `json:"tracks,omitempty"` 5591 // Version: Feature version. 5592 Version string `json:"version,omitempty"` 5593 // ForceSendFields is a list of field names (e.g. "Thumbnail") to 5594 // unconditionally include in API requests. By default, fields with empty or 5595 // default values are omitted from API requests. See 5596 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5597 // details. 5598 ForceSendFields []string `json:"-"` 5599 // NullFields is a list of field names (e.g. "Thumbnail") to include in API 5600 // requests with the JSON null value. By default, fields with empty values are 5601 // omitted from API requests. See 5602 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5603 NullFields []string `json:"-"` 5604 } 5605 5606 func (s *GoogleCloudVideointelligenceV1p3beta1FaceDetectionAnnotation) MarshalJSON() ([]byte, error) { 5607 type NoMethod GoogleCloudVideointelligenceV1p3beta1FaceDetectionAnnotation 5608 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5609 } 5610 5611 // GoogleCloudVideointelligenceV1p3beta1FaceFrame: Deprecated. No effect. 5612 type GoogleCloudVideointelligenceV1p3beta1FaceFrame struct { 5613 // NormalizedBoundingBoxes: Normalized Bounding boxes in a frame. There can be 5614 // more than one boxes if the same face is detected in multiple locations 5615 // within the current frame. 5616 NormalizedBoundingBoxes []*GoogleCloudVideointelligenceV1p3beta1NormalizedBoundingBox `json:"normalizedBoundingBoxes,omitempty"` 5617 // TimeOffset: Time-offset, relative to the beginning of the video, 5618 // corresponding to the video frame for this location. 5619 TimeOffset string `json:"timeOffset,omitempty"` 5620 // ForceSendFields is a list of field names (e.g. "NormalizedBoundingBoxes") to 5621 // unconditionally include in API requests. By default, fields with empty or 5622 // default values are omitted from API requests. See 5623 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5624 // details. 5625 ForceSendFields []string `json:"-"` 5626 // NullFields is a list of field names (e.g. "NormalizedBoundingBoxes") to 5627 // include in API requests with the JSON null value. By default, fields with 5628 // empty values are omitted from API requests. See 5629 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5630 NullFields []string `json:"-"` 5631 } 5632 5633 func (s *GoogleCloudVideointelligenceV1p3beta1FaceFrame) MarshalJSON() ([]byte, error) { 5634 type NoMethod GoogleCloudVideointelligenceV1p3beta1FaceFrame 5635 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5636 } 5637 5638 // GoogleCloudVideointelligenceV1p3beta1FaceSegment: Video segment level 5639 // annotation results for face detection. 5640 type GoogleCloudVideointelligenceV1p3beta1FaceSegment struct { 5641 // Segment: Video segment where a face was detected. 5642 Segment *GoogleCloudVideointelligenceV1p3beta1VideoSegment `json:"segment,omitempty"` 5643 // ForceSendFields is a list of field names (e.g. "Segment") to unconditionally 5644 // include in API requests. By default, fields with empty or default values are 5645 // omitted from API requests. See 5646 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5647 // details. 5648 ForceSendFields []string `json:"-"` 5649 // NullFields is a list of field names (e.g. "Segment") to include in API 5650 // requests with the JSON null value. By default, fields with empty values are 5651 // omitted from API requests. See 5652 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5653 NullFields []string `json:"-"` 5654 } 5655 5656 func (s *GoogleCloudVideointelligenceV1p3beta1FaceSegment) MarshalJSON() ([]byte, error) { 5657 type NoMethod GoogleCloudVideointelligenceV1p3beta1FaceSegment 5658 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5659 } 5660 5661 // GoogleCloudVideointelligenceV1p3beta1LabelAnnotation: Label annotation. 5662 type GoogleCloudVideointelligenceV1p3beta1LabelAnnotation struct { 5663 // CategoryEntities: Common categories for the detected entity. For example, 5664 // when the label is `Terrier`, the category is likely `dog`. And in some cases 5665 // there might be more than one categories e.g., `Terrier` could also be a 5666 // `pet`. 5667 CategoryEntities []*GoogleCloudVideointelligenceV1p3beta1Entity `json:"categoryEntities,omitempty"` 5668 // Entity: Detected entity. 5669 Entity *GoogleCloudVideointelligenceV1p3beta1Entity `json:"entity,omitempty"` 5670 // Frames: All video frames where a label was detected. 5671 Frames []*GoogleCloudVideointelligenceV1p3beta1LabelFrame `json:"frames,omitempty"` 5672 // Segments: All video segments where a label was detected. 5673 Segments []*GoogleCloudVideointelligenceV1p3beta1LabelSegment `json:"segments,omitempty"` 5674 // Version: Feature version. 5675 Version string `json:"version,omitempty"` 5676 // ForceSendFields is a list of field names (e.g. "CategoryEntities") to 5677 // unconditionally include in API requests. By default, fields with empty or 5678 // default values are omitted from API requests. See 5679 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5680 // details. 5681 ForceSendFields []string `json:"-"` 5682 // NullFields is a list of field names (e.g. "CategoryEntities") to include in 5683 // API requests with the JSON null value. By default, fields with empty values 5684 // are omitted from API requests. See 5685 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5686 NullFields []string `json:"-"` 5687 } 5688 5689 func (s *GoogleCloudVideointelligenceV1p3beta1LabelAnnotation) MarshalJSON() ([]byte, error) { 5690 type NoMethod GoogleCloudVideointelligenceV1p3beta1LabelAnnotation 5691 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5692 } 5693 5694 // GoogleCloudVideointelligenceV1p3beta1LabelFrame: Video frame level 5695 // annotation results for label detection. 5696 type GoogleCloudVideointelligenceV1p3beta1LabelFrame struct { 5697 // Confidence: Confidence that the label is accurate. Range: [0, 1]. 5698 Confidence float64 `json:"confidence,omitempty"` 5699 // TimeOffset: Time-offset, relative to the beginning of the video, 5700 // corresponding to the video frame for this location. 5701 TimeOffset string `json:"timeOffset,omitempty"` 5702 // ForceSendFields is a list of field names (e.g. "Confidence") to 5703 // unconditionally include in API requests. By default, fields with empty or 5704 // default values are omitted from API requests. See 5705 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5706 // details. 5707 ForceSendFields []string `json:"-"` 5708 // NullFields is a list of field names (e.g. "Confidence") to include in API 5709 // requests with the JSON null value. By default, fields with empty values are 5710 // omitted from API requests. See 5711 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5712 NullFields []string `json:"-"` 5713 } 5714 5715 func (s *GoogleCloudVideointelligenceV1p3beta1LabelFrame) MarshalJSON() ([]byte, error) { 5716 type NoMethod GoogleCloudVideointelligenceV1p3beta1LabelFrame 5717 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5718 } 5719 5720 func (s *GoogleCloudVideointelligenceV1p3beta1LabelFrame) UnmarshalJSON(data []byte) error { 5721 type NoMethod GoogleCloudVideointelligenceV1p3beta1LabelFrame 5722 var s1 struct { 5723 Confidence gensupport.JSONFloat64 `json:"confidence"` 5724 *NoMethod 5725 } 5726 s1.NoMethod = (*NoMethod)(s) 5727 if err := json.Unmarshal(data, &s1); err != nil { 5728 return err 5729 } 5730 s.Confidence = float64(s1.Confidence) 5731 return nil 5732 } 5733 5734 // GoogleCloudVideointelligenceV1p3beta1LabelSegment: Video segment level 5735 // annotation results for label detection. 5736 type GoogleCloudVideointelligenceV1p3beta1LabelSegment struct { 5737 // Confidence: Confidence that the label is accurate. Range: [0, 1]. 5738 Confidence float64 `json:"confidence,omitempty"` 5739 // Segment: Video segment where a label was detected. 5740 Segment *GoogleCloudVideointelligenceV1p3beta1VideoSegment `json:"segment,omitempty"` 5741 // ForceSendFields is a list of field names (e.g. "Confidence") to 5742 // unconditionally include in API requests. By default, fields with empty or 5743 // default values are omitted from API requests. See 5744 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5745 // details. 5746 ForceSendFields []string `json:"-"` 5747 // NullFields is a list of field names (e.g. "Confidence") to include in API 5748 // requests with the JSON null value. By default, fields with empty values are 5749 // omitted from API requests. See 5750 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5751 NullFields []string `json:"-"` 5752 } 5753 5754 func (s *GoogleCloudVideointelligenceV1p3beta1LabelSegment) MarshalJSON() ([]byte, error) { 5755 type NoMethod GoogleCloudVideointelligenceV1p3beta1LabelSegment 5756 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5757 } 5758 5759 func (s *GoogleCloudVideointelligenceV1p3beta1LabelSegment) UnmarshalJSON(data []byte) error { 5760 type NoMethod GoogleCloudVideointelligenceV1p3beta1LabelSegment 5761 var s1 struct { 5762 Confidence gensupport.JSONFloat64 `json:"confidence"` 5763 *NoMethod 5764 } 5765 s1.NoMethod = (*NoMethod)(s) 5766 if err := json.Unmarshal(data, &s1); err != nil { 5767 return err 5768 } 5769 s.Confidence = float64(s1.Confidence) 5770 return nil 5771 } 5772 5773 // GoogleCloudVideointelligenceV1p3beta1LogoRecognitionAnnotation: Annotation 5774 // corresponding to one detected, tracked and recognized logo class. 5775 type GoogleCloudVideointelligenceV1p3beta1LogoRecognitionAnnotation struct { 5776 // Entity: Entity category information to specify the logo class that all the 5777 // logo tracks within this LogoRecognitionAnnotation are recognized as. 5778 Entity *GoogleCloudVideointelligenceV1p3beta1Entity `json:"entity,omitempty"` 5779 // Segments: All video segments where the recognized logo appears. There might 5780 // be multiple instances of the same logo class appearing in one VideoSegment. 5781 Segments []*GoogleCloudVideointelligenceV1p3beta1VideoSegment `json:"segments,omitempty"` 5782 // Tracks: All logo tracks where the recognized logo appears. Each track 5783 // corresponds to one logo instance appearing in consecutive frames. 5784 Tracks []*GoogleCloudVideointelligenceV1p3beta1Track `json:"tracks,omitempty"` 5785 // ForceSendFields is a list of field names (e.g. "Entity") to unconditionally 5786 // include in API requests. By default, fields with empty or default values are 5787 // omitted from API requests. See 5788 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5789 // details. 5790 ForceSendFields []string `json:"-"` 5791 // NullFields is a list of field names (e.g. "Entity") to include in API 5792 // requests with the JSON null value. By default, fields with empty values are 5793 // omitted from API requests. See 5794 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5795 NullFields []string `json:"-"` 5796 } 5797 5798 func (s *GoogleCloudVideointelligenceV1p3beta1LogoRecognitionAnnotation) MarshalJSON() ([]byte, error) { 5799 type NoMethod GoogleCloudVideointelligenceV1p3beta1LogoRecognitionAnnotation 5800 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5801 } 5802 5803 // GoogleCloudVideointelligenceV1p3beta1NormalizedBoundingBox: Normalized 5804 // bounding box. The normalized vertex coordinates are relative to the original 5805 // image. Range: [0, 1]. 5806 type GoogleCloudVideointelligenceV1p3beta1NormalizedBoundingBox struct { 5807 // Bottom: Bottom Y coordinate. 5808 Bottom float64 `json:"bottom,omitempty"` 5809 // Left: Left X coordinate. 5810 Left float64 `json:"left,omitempty"` 5811 // Right: Right X coordinate. 5812 Right float64 `json:"right,omitempty"` 5813 // Top: Top Y coordinate. 5814 Top float64 `json:"top,omitempty"` 5815 // ForceSendFields is a list of field names (e.g. "Bottom") to unconditionally 5816 // include in API requests. By default, fields with empty or default values are 5817 // omitted from API requests. See 5818 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5819 // details. 5820 ForceSendFields []string `json:"-"` 5821 // NullFields is a list of field names (e.g. "Bottom") to include in API 5822 // requests with the JSON null value. By default, fields with empty values are 5823 // omitted from API requests. See 5824 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5825 NullFields []string `json:"-"` 5826 } 5827 5828 func (s *GoogleCloudVideointelligenceV1p3beta1NormalizedBoundingBox) MarshalJSON() ([]byte, error) { 5829 type NoMethod GoogleCloudVideointelligenceV1p3beta1NormalizedBoundingBox 5830 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5831 } 5832 5833 func (s *GoogleCloudVideointelligenceV1p3beta1NormalizedBoundingBox) UnmarshalJSON(data []byte) error { 5834 type NoMethod GoogleCloudVideointelligenceV1p3beta1NormalizedBoundingBox 5835 var s1 struct { 5836 Bottom gensupport.JSONFloat64 `json:"bottom"` 5837 Left gensupport.JSONFloat64 `json:"left"` 5838 Right gensupport.JSONFloat64 `json:"right"` 5839 Top gensupport.JSONFloat64 `json:"top"` 5840 *NoMethod 5841 } 5842 s1.NoMethod = (*NoMethod)(s) 5843 if err := json.Unmarshal(data, &s1); err != nil { 5844 return err 5845 } 5846 s.Bottom = float64(s1.Bottom) 5847 s.Left = float64(s1.Left) 5848 s.Right = float64(s1.Right) 5849 s.Top = float64(s1.Top) 5850 return nil 5851 } 5852 5853 // GoogleCloudVideointelligenceV1p3beta1NormalizedBoundingPoly: Normalized 5854 // bounding polygon for text (that might not be aligned with axis). Contains 5855 // list of the corner points in clockwise order starting from top-left corner. 5856 // For example, for a rectangular bounding box: When the text is horizontal it 5857 // might look like: 0----1 | | 3----2 When it's clockwise rotated 180 degrees 5858 // around the top-left corner it becomes: 2----3 | | 1----0 and the vertex 5859 // order will still be (0, 1, 2, 3). Note that values can be less than 0, or 5860 // greater than 1 due to trignometric calculations for location of the box. 5861 type GoogleCloudVideointelligenceV1p3beta1NormalizedBoundingPoly struct { 5862 // Vertices: Normalized vertices of the bounding polygon. 5863 Vertices []*GoogleCloudVideointelligenceV1p3beta1NormalizedVertex `json:"vertices,omitempty"` 5864 // ForceSendFields is a list of field names (e.g. "Vertices") to 5865 // unconditionally include in API requests. By default, fields with empty or 5866 // default values are omitted from API requests. See 5867 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5868 // details. 5869 ForceSendFields []string `json:"-"` 5870 // NullFields is a list of field names (e.g. "Vertices") to include in API 5871 // requests with the JSON null value. By default, fields with empty values are 5872 // omitted from API requests. See 5873 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5874 NullFields []string `json:"-"` 5875 } 5876 5877 func (s *GoogleCloudVideointelligenceV1p3beta1NormalizedBoundingPoly) MarshalJSON() ([]byte, error) { 5878 type NoMethod GoogleCloudVideointelligenceV1p3beta1NormalizedBoundingPoly 5879 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5880 } 5881 5882 // GoogleCloudVideointelligenceV1p3beta1NormalizedVertex: A vertex represents a 5883 // 2D point in the image. NOTE: the normalized vertex coordinates are relative 5884 // to the original image and range from 0 to 1. 5885 type GoogleCloudVideointelligenceV1p3beta1NormalizedVertex struct { 5886 // X: X coordinate. 5887 X float64 `json:"x,omitempty"` 5888 // Y: Y coordinate. 5889 Y float64 `json:"y,omitempty"` 5890 // ForceSendFields is a list of field names (e.g. "X") to unconditionally 5891 // include in API requests. By default, fields with empty or default values are 5892 // omitted from API requests. See 5893 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5894 // details. 5895 ForceSendFields []string `json:"-"` 5896 // NullFields is a list of field names (e.g. "X") to include in API requests 5897 // with the JSON null value. By default, fields with empty values are omitted 5898 // from API requests. See 5899 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5900 NullFields []string `json:"-"` 5901 } 5902 5903 func (s *GoogleCloudVideointelligenceV1p3beta1NormalizedVertex) MarshalJSON() ([]byte, error) { 5904 type NoMethod GoogleCloudVideointelligenceV1p3beta1NormalizedVertex 5905 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5906 } 5907 5908 func (s *GoogleCloudVideointelligenceV1p3beta1NormalizedVertex) UnmarshalJSON(data []byte) error { 5909 type NoMethod GoogleCloudVideointelligenceV1p3beta1NormalizedVertex 5910 var s1 struct { 5911 X gensupport.JSONFloat64 `json:"x"` 5912 Y gensupport.JSONFloat64 `json:"y"` 5913 *NoMethod 5914 } 5915 s1.NoMethod = (*NoMethod)(s) 5916 if err := json.Unmarshal(data, &s1); err != nil { 5917 return err 5918 } 5919 s.X = float64(s1.X) 5920 s.Y = float64(s1.Y) 5921 return nil 5922 } 5923 5924 // GoogleCloudVideointelligenceV1p3beta1ObjectTrackingAnnotation: Annotations 5925 // corresponding to one tracked object. 5926 type GoogleCloudVideointelligenceV1p3beta1ObjectTrackingAnnotation struct { 5927 // Confidence: Object category's labeling confidence of this track. 5928 Confidence float64 `json:"confidence,omitempty"` 5929 // Entity: Entity to specify the object category that this track is labeled as. 5930 Entity *GoogleCloudVideointelligenceV1p3beta1Entity `json:"entity,omitempty"` 5931 // Frames: Information corresponding to all frames where this object track 5932 // appears. Non-streaming batch mode: it may be one or multiple 5933 // ObjectTrackingFrame messages in frames. Streaming mode: it can only be one 5934 // ObjectTrackingFrame message in frames. 5935 Frames []*GoogleCloudVideointelligenceV1p3beta1ObjectTrackingFrame `json:"frames,omitempty"` 5936 // Segment: Non-streaming batch mode ONLY. Each object track corresponds to one 5937 // video segment where it appears. 5938 Segment *GoogleCloudVideointelligenceV1p3beta1VideoSegment `json:"segment,omitempty"` 5939 // TrackId: Streaming mode ONLY. In streaming mode, we do not know the end time 5940 // of a tracked object before it is completed. Hence, there is no VideoSegment 5941 // info returned. Instead, we provide a unique identifiable integer track_id so 5942 // that the customers can correlate the results of the ongoing 5943 // ObjectTrackAnnotation of the same track_id over time. 5944 TrackId int64 `json:"trackId,omitempty,string"` 5945 // Version: Feature version. 5946 Version string `json:"version,omitempty"` 5947 // ForceSendFields is a list of field names (e.g. "Confidence") to 5948 // unconditionally include in API requests. By default, fields with empty or 5949 // default values are omitted from API requests. See 5950 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5951 // details. 5952 ForceSendFields []string `json:"-"` 5953 // NullFields is a list of field names (e.g. "Confidence") to include in API 5954 // requests with the JSON null value. By default, fields with empty values are 5955 // omitted from API requests. See 5956 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5957 NullFields []string `json:"-"` 5958 } 5959 5960 func (s *GoogleCloudVideointelligenceV1p3beta1ObjectTrackingAnnotation) MarshalJSON() ([]byte, error) { 5961 type NoMethod GoogleCloudVideointelligenceV1p3beta1ObjectTrackingAnnotation 5962 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5963 } 5964 5965 func (s *GoogleCloudVideointelligenceV1p3beta1ObjectTrackingAnnotation) UnmarshalJSON(data []byte) error { 5966 type NoMethod GoogleCloudVideointelligenceV1p3beta1ObjectTrackingAnnotation 5967 var s1 struct { 5968 Confidence gensupport.JSONFloat64 `json:"confidence"` 5969 *NoMethod 5970 } 5971 s1.NoMethod = (*NoMethod)(s) 5972 if err := json.Unmarshal(data, &s1); err != nil { 5973 return err 5974 } 5975 s.Confidence = float64(s1.Confidence) 5976 return nil 5977 } 5978 5979 // GoogleCloudVideointelligenceV1p3beta1ObjectTrackingFrame: Video frame level 5980 // annotations for object detection and tracking. This field stores per frame 5981 // location, time offset, and confidence. 5982 type GoogleCloudVideointelligenceV1p3beta1ObjectTrackingFrame struct { 5983 // NormalizedBoundingBox: The normalized bounding box location of this object 5984 // track for the frame. 5985 NormalizedBoundingBox *GoogleCloudVideointelligenceV1p3beta1NormalizedBoundingBox `json:"normalizedBoundingBox,omitempty"` 5986 // TimeOffset: The timestamp of the frame in microseconds. 5987 TimeOffset string `json:"timeOffset,omitempty"` 5988 // ForceSendFields is a list of field names (e.g. "NormalizedBoundingBox") to 5989 // unconditionally include in API requests. By default, fields with empty or 5990 // default values are omitted from API requests. See 5991 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5992 // details. 5993 ForceSendFields []string `json:"-"` 5994 // NullFields is a list of field names (e.g. "NormalizedBoundingBox") to 5995 // include in API requests with the JSON null value. By default, fields with 5996 // empty values are omitted from API requests. See 5997 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5998 NullFields []string `json:"-"` 5999 } 6000 6001 func (s *GoogleCloudVideointelligenceV1p3beta1ObjectTrackingFrame) MarshalJSON() ([]byte, error) { 6002 type NoMethod GoogleCloudVideointelligenceV1p3beta1ObjectTrackingFrame 6003 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6004 } 6005 6006 // GoogleCloudVideointelligenceV1p3beta1PersonDetectionAnnotation: Person 6007 // detection annotation per video. 6008 type GoogleCloudVideointelligenceV1p3beta1PersonDetectionAnnotation struct { 6009 // Tracks: The detected tracks of a person. 6010 Tracks []*GoogleCloudVideointelligenceV1p3beta1Track `json:"tracks,omitempty"` 6011 // Version: Feature version. 6012 Version string `json:"version,omitempty"` 6013 // ForceSendFields is a list of field names (e.g. "Tracks") to unconditionally 6014 // include in API requests. By default, fields with empty or default values are 6015 // omitted from API requests. See 6016 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6017 // details. 6018 ForceSendFields []string `json:"-"` 6019 // NullFields is a list of field names (e.g. "Tracks") to include in API 6020 // requests with the JSON null value. By default, fields with empty values are 6021 // omitted from API requests. See 6022 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6023 NullFields []string `json:"-"` 6024 } 6025 6026 func (s *GoogleCloudVideointelligenceV1p3beta1PersonDetectionAnnotation) MarshalJSON() ([]byte, error) { 6027 type NoMethod GoogleCloudVideointelligenceV1p3beta1PersonDetectionAnnotation 6028 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6029 } 6030 6031 // GoogleCloudVideointelligenceV1p3beta1RecognizedCelebrity: The recognized 6032 // celebrity with confidence score. 6033 type GoogleCloudVideointelligenceV1p3beta1RecognizedCelebrity struct { 6034 // Celebrity: The recognized celebrity. 6035 Celebrity *GoogleCloudVideointelligenceV1p3beta1Celebrity `json:"celebrity,omitempty"` 6036 // Confidence: Recognition confidence. Range [0, 1]. 6037 Confidence float64 `json:"confidence,omitempty"` 6038 // ForceSendFields is a list of field names (e.g. "Celebrity") to 6039 // unconditionally include in API requests. By default, fields with empty or 6040 // default values are omitted from API requests. See 6041 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6042 // details. 6043 ForceSendFields []string `json:"-"` 6044 // NullFields is a list of field names (e.g. "Celebrity") to include in API 6045 // requests with the JSON null value. By default, fields with empty values are 6046 // omitted from API requests. See 6047 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6048 NullFields []string `json:"-"` 6049 } 6050 6051 func (s *GoogleCloudVideointelligenceV1p3beta1RecognizedCelebrity) MarshalJSON() ([]byte, error) { 6052 type NoMethod GoogleCloudVideointelligenceV1p3beta1RecognizedCelebrity 6053 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6054 } 6055 6056 func (s *GoogleCloudVideointelligenceV1p3beta1RecognizedCelebrity) UnmarshalJSON(data []byte) error { 6057 type NoMethod GoogleCloudVideointelligenceV1p3beta1RecognizedCelebrity 6058 var s1 struct { 6059 Confidence gensupport.JSONFloat64 `json:"confidence"` 6060 *NoMethod 6061 } 6062 s1.NoMethod = (*NoMethod)(s) 6063 if err := json.Unmarshal(data, &s1); err != nil { 6064 return err 6065 } 6066 s.Confidence = float64(s1.Confidence) 6067 return nil 6068 } 6069 6070 // GoogleCloudVideointelligenceV1p3beta1SpeechRecognitionAlternative: 6071 // Alternative hypotheses (a.k.a. n-best list). 6072 type GoogleCloudVideointelligenceV1p3beta1SpeechRecognitionAlternative struct { 6073 // Confidence: Output only. The confidence estimate between 0.0 and 1.0. A 6074 // higher number indicates an estimated greater likelihood that the recognized 6075 // words are correct. This field is set only for the top alternative. This 6076 // field is not guaranteed to be accurate and users should not rely on it to be 6077 // always provided. The default of 0.0 is a sentinel value indicating 6078 // `confidence` was not set. 6079 Confidence float64 `json:"confidence,omitempty"` 6080 // Transcript: Transcript text representing the words that the user spoke. 6081 Transcript string `json:"transcript,omitempty"` 6082 // Words: Output only. A list of word-specific information for each recognized 6083 // word. Note: When `enable_speaker_diarization` is set to true, you will see 6084 // all the words from the beginning of the audio. 6085 Words []*GoogleCloudVideointelligenceV1p3beta1WordInfo `json:"words,omitempty"` 6086 // ForceSendFields is a list of field names (e.g. "Confidence") to 6087 // unconditionally include in API requests. By default, fields with empty or 6088 // default values are omitted from API requests. See 6089 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6090 // details. 6091 ForceSendFields []string `json:"-"` 6092 // NullFields is a list of field names (e.g. "Confidence") to include in API 6093 // requests with the JSON null value. By default, fields with empty values are 6094 // omitted from API requests. See 6095 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6096 NullFields []string `json:"-"` 6097 } 6098 6099 func (s *GoogleCloudVideointelligenceV1p3beta1SpeechRecognitionAlternative) MarshalJSON() ([]byte, error) { 6100 type NoMethod GoogleCloudVideointelligenceV1p3beta1SpeechRecognitionAlternative 6101 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6102 } 6103 6104 func (s *GoogleCloudVideointelligenceV1p3beta1SpeechRecognitionAlternative) UnmarshalJSON(data []byte) error { 6105 type NoMethod GoogleCloudVideointelligenceV1p3beta1SpeechRecognitionAlternative 6106 var s1 struct { 6107 Confidence gensupport.JSONFloat64 `json:"confidence"` 6108 *NoMethod 6109 } 6110 s1.NoMethod = (*NoMethod)(s) 6111 if err := json.Unmarshal(data, &s1); err != nil { 6112 return err 6113 } 6114 s.Confidence = float64(s1.Confidence) 6115 return nil 6116 } 6117 6118 // GoogleCloudVideointelligenceV1p3beta1SpeechTranscription: A speech 6119 // recognition result corresponding to a portion of the audio. 6120 type GoogleCloudVideointelligenceV1p3beta1SpeechTranscription struct { 6121 // Alternatives: May contain one or more recognition hypotheses (up to the 6122 // maximum specified in `max_alternatives`). These alternatives are ordered in 6123 // terms of accuracy, with the top (first) alternative being the most probable, 6124 // as ranked by the recognizer. 6125 Alternatives []*GoogleCloudVideointelligenceV1p3beta1SpeechRecognitionAlternative `json:"alternatives,omitempty"` 6126 // LanguageCode: Output only. The BCP-47 6127 // (https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of the language 6128 // in this result. This language code was detected to have the most likelihood 6129 // of being spoken in the audio. 6130 LanguageCode string `json:"languageCode,omitempty"` 6131 // ForceSendFields is a list of field names (e.g. "Alternatives") to 6132 // unconditionally include in API requests. By default, fields with empty or 6133 // default values are omitted from API requests. See 6134 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6135 // details. 6136 ForceSendFields []string `json:"-"` 6137 // NullFields is a list of field names (e.g. "Alternatives") to include in API 6138 // requests with the JSON null value. By default, fields with empty values are 6139 // omitted from API requests. See 6140 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6141 NullFields []string `json:"-"` 6142 } 6143 6144 func (s *GoogleCloudVideointelligenceV1p3beta1SpeechTranscription) MarshalJSON() ([]byte, error) { 6145 type NoMethod GoogleCloudVideointelligenceV1p3beta1SpeechTranscription 6146 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6147 } 6148 6149 // GoogleCloudVideointelligenceV1p3beta1StreamingAnnotateVideoResponse: 6150 // `StreamingAnnotateVideoResponse` is the only message returned to the client 6151 // by `StreamingAnnotateVideo`. A series of zero or more 6152 // `StreamingAnnotateVideoResponse` messages are streamed back to the client. 6153 type GoogleCloudVideointelligenceV1p3beta1StreamingAnnotateVideoResponse struct { 6154 // AnnotationResults: Streaming annotation results. 6155 AnnotationResults *GoogleCloudVideointelligenceV1p3beta1StreamingVideoAnnotationResults `json:"annotationResults,omitempty"` 6156 // AnnotationResultsUri: Google Cloud Storage URI that stores annotation 6157 // results of one streaming session in JSON format. It is the 6158 // annotation_result_storage_directory from the request followed by 6159 // '/cloud_project_number-session_id'. 6160 AnnotationResultsUri string `json:"annotationResultsUri,omitempty"` 6161 // Error: If set, returns a google.rpc.Status message that specifies the error 6162 // for the operation. 6163 Error *GoogleRpcStatus `json:"error,omitempty"` 6164 // ForceSendFields is a list of field names (e.g. "AnnotationResults") to 6165 // unconditionally include in API requests. By default, fields with empty or 6166 // default values are omitted from API requests. See 6167 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6168 // details. 6169 ForceSendFields []string `json:"-"` 6170 // NullFields is a list of field names (e.g. "AnnotationResults") to include in 6171 // API requests with the JSON null value. By default, fields with empty values 6172 // are omitted from API requests. See 6173 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6174 NullFields []string `json:"-"` 6175 } 6176 6177 func (s *GoogleCloudVideointelligenceV1p3beta1StreamingAnnotateVideoResponse) MarshalJSON() ([]byte, error) { 6178 type NoMethod GoogleCloudVideointelligenceV1p3beta1StreamingAnnotateVideoResponse 6179 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6180 } 6181 6182 // GoogleCloudVideointelligenceV1p3beta1StreamingVideoAnnotationResults: 6183 // Streaming annotation results corresponding to a portion of the video that is 6184 // currently being processed. Only ONE type of annotation will be specified in 6185 // the response. 6186 type GoogleCloudVideointelligenceV1p3beta1StreamingVideoAnnotationResults struct { 6187 // ExplicitAnnotation: Explicit content annotation results. 6188 ExplicitAnnotation *GoogleCloudVideointelligenceV1p3beta1ExplicitContentAnnotation `json:"explicitAnnotation,omitempty"` 6189 // FrameTimestamp: Timestamp of the processed frame in microseconds. 6190 FrameTimestamp string `json:"frameTimestamp,omitempty"` 6191 // LabelAnnotations: Label annotation results. 6192 LabelAnnotations []*GoogleCloudVideointelligenceV1p3beta1LabelAnnotation `json:"labelAnnotations,omitempty"` 6193 // ObjectAnnotations: Object tracking results. 6194 ObjectAnnotations []*GoogleCloudVideointelligenceV1p3beta1ObjectTrackingAnnotation `json:"objectAnnotations,omitempty"` 6195 // ShotAnnotations: Shot annotation results. Each shot is represented as a 6196 // video segment. 6197 ShotAnnotations []*GoogleCloudVideointelligenceV1p3beta1VideoSegment `json:"shotAnnotations,omitempty"` 6198 // ForceSendFields is a list of field names (e.g. "ExplicitAnnotation") to 6199 // unconditionally include in API requests. By default, fields with empty or 6200 // default values are omitted from API requests. See 6201 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6202 // details. 6203 ForceSendFields []string `json:"-"` 6204 // NullFields is a list of field names (e.g. "ExplicitAnnotation") to include 6205 // in API requests with the JSON null value. By default, fields with empty 6206 // values are omitted from API requests. See 6207 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6208 NullFields []string `json:"-"` 6209 } 6210 6211 func (s *GoogleCloudVideointelligenceV1p3beta1StreamingVideoAnnotationResults) MarshalJSON() ([]byte, error) { 6212 type NoMethod GoogleCloudVideointelligenceV1p3beta1StreamingVideoAnnotationResults 6213 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6214 } 6215 6216 // GoogleCloudVideointelligenceV1p3beta1TextAnnotation: Annotations related to 6217 // one detected OCR text snippet. This will contain the corresponding text, 6218 // confidence value, and frame level information for each detection. 6219 type GoogleCloudVideointelligenceV1p3beta1TextAnnotation struct { 6220 // Segments: All video segments where OCR detected text appears. 6221 Segments []*GoogleCloudVideointelligenceV1p3beta1TextSegment `json:"segments,omitempty"` 6222 // Text: The detected text. 6223 Text string `json:"text,omitempty"` 6224 // Version: Feature version. 6225 Version string `json:"version,omitempty"` 6226 // ForceSendFields is a list of field names (e.g. "Segments") to 6227 // unconditionally include in API requests. By default, fields with empty or 6228 // default values are omitted from API requests. See 6229 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6230 // details. 6231 ForceSendFields []string `json:"-"` 6232 // NullFields is a list of field names (e.g. "Segments") to include in API 6233 // requests with the JSON null value. By default, fields with empty values are 6234 // omitted from API requests. See 6235 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6236 NullFields []string `json:"-"` 6237 } 6238 6239 func (s *GoogleCloudVideointelligenceV1p3beta1TextAnnotation) MarshalJSON() ([]byte, error) { 6240 type NoMethod GoogleCloudVideointelligenceV1p3beta1TextAnnotation 6241 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6242 } 6243 6244 // GoogleCloudVideointelligenceV1p3beta1TextFrame: Video frame level annotation 6245 // results for text annotation (OCR). Contains information regarding timestamp 6246 // and bounding box locations for the frames containing detected OCR text 6247 // snippets. 6248 type GoogleCloudVideointelligenceV1p3beta1TextFrame struct { 6249 // RotatedBoundingBox: Bounding polygon of the detected text for this frame. 6250 RotatedBoundingBox *GoogleCloudVideointelligenceV1p3beta1NormalizedBoundingPoly `json:"rotatedBoundingBox,omitempty"` 6251 // TimeOffset: Timestamp of this frame. 6252 TimeOffset string `json:"timeOffset,omitempty"` 6253 // ForceSendFields is a list of field names (e.g. "RotatedBoundingBox") to 6254 // unconditionally include in API requests. By default, fields with empty or 6255 // default values are omitted from API requests. See 6256 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6257 // details. 6258 ForceSendFields []string `json:"-"` 6259 // NullFields is a list of field names (e.g. "RotatedBoundingBox") to include 6260 // in API requests with the JSON null value. By default, fields with empty 6261 // values are omitted from API requests. See 6262 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6263 NullFields []string `json:"-"` 6264 } 6265 6266 func (s *GoogleCloudVideointelligenceV1p3beta1TextFrame) MarshalJSON() ([]byte, error) { 6267 type NoMethod GoogleCloudVideointelligenceV1p3beta1TextFrame 6268 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6269 } 6270 6271 // GoogleCloudVideointelligenceV1p3beta1TextSegment: Video segment level 6272 // annotation results for text detection. 6273 type GoogleCloudVideointelligenceV1p3beta1TextSegment struct { 6274 // Confidence: Confidence for the track of detected text. It is calculated as 6275 // the highest over all frames where OCR detected text appears. 6276 Confidence float64 `json:"confidence,omitempty"` 6277 // Frames: Information related to the frames where OCR detected text appears. 6278 Frames []*GoogleCloudVideointelligenceV1p3beta1TextFrame `json:"frames,omitempty"` 6279 // Segment: Video segment where a text snippet was detected. 6280 Segment *GoogleCloudVideointelligenceV1p3beta1VideoSegment `json:"segment,omitempty"` 6281 // ForceSendFields is a list of field names (e.g. "Confidence") to 6282 // unconditionally include in API requests. By default, fields with empty or 6283 // default values are omitted from API requests. See 6284 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6285 // details. 6286 ForceSendFields []string `json:"-"` 6287 // NullFields is a list of field names (e.g. "Confidence") to include in API 6288 // requests with the JSON null value. By default, fields with empty values are 6289 // omitted from API requests. See 6290 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6291 NullFields []string `json:"-"` 6292 } 6293 6294 func (s *GoogleCloudVideointelligenceV1p3beta1TextSegment) MarshalJSON() ([]byte, error) { 6295 type NoMethod GoogleCloudVideointelligenceV1p3beta1TextSegment 6296 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6297 } 6298 6299 func (s *GoogleCloudVideointelligenceV1p3beta1TextSegment) UnmarshalJSON(data []byte) error { 6300 type NoMethod GoogleCloudVideointelligenceV1p3beta1TextSegment 6301 var s1 struct { 6302 Confidence gensupport.JSONFloat64 `json:"confidence"` 6303 *NoMethod 6304 } 6305 s1.NoMethod = (*NoMethod)(s) 6306 if err := json.Unmarshal(data, &s1); err != nil { 6307 return err 6308 } 6309 s.Confidence = float64(s1.Confidence) 6310 return nil 6311 } 6312 6313 // GoogleCloudVideointelligenceV1p3beta1TimestampedObject: For tracking related 6314 // features. An object at time_offset with attributes, and located with 6315 // normalized_bounding_box. 6316 type GoogleCloudVideointelligenceV1p3beta1TimestampedObject struct { 6317 // Attributes: Optional. The attributes of the object in the bounding box. 6318 Attributes []*GoogleCloudVideointelligenceV1p3beta1DetectedAttribute `json:"attributes,omitempty"` 6319 // Landmarks: Optional. The detected landmarks. 6320 Landmarks []*GoogleCloudVideointelligenceV1p3beta1DetectedLandmark `json:"landmarks,omitempty"` 6321 // NormalizedBoundingBox: Normalized Bounding box in a frame, where the object 6322 // is located. 6323 NormalizedBoundingBox *GoogleCloudVideointelligenceV1p3beta1NormalizedBoundingBox `json:"normalizedBoundingBox,omitempty"` 6324 // TimeOffset: Time-offset, relative to the beginning of the video, 6325 // corresponding to the video frame for this object. 6326 TimeOffset string `json:"timeOffset,omitempty"` 6327 // ForceSendFields is a list of field names (e.g. "Attributes") to 6328 // unconditionally include in API requests. By default, fields with empty or 6329 // default values are omitted from API requests. See 6330 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6331 // details. 6332 ForceSendFields []string `json:"-"` 6333 // NullFields is a list of field names (e.g. "Attributes") to include in API 6334 // requests with the JSON null value. By default, fields with empty values are 6335 // omitted from API requests. See 6336 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6337 NullFields []string `json:"-"` 6338 } 6339 6340 func (s *GoogleCloudVideointelligenceV1p3beta1TimestampedObject) MarshalJSON() ([]byte, error) { 6341 type NoMethod GoogleCloudVideointelligenceV1p3beta1TimestampedObject 6342 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6343 } 6344 6345 // GoogleCloudVideointelligenceV1p3beta1Track: A track of an object instance. 6346 type GoogleCloudVideointelligenceV1p3beta1Track struct { 6347 // Attributes: Optional. Attributes in the track level. 6348 Attributes []*GoogleCloudVideointelligenceV1p3beta1DetectedAttribute `json:"attributes,omitempty"` 6349 // Confidence: Optional. The confidence score of the tracked object. 6350 Confidence float64 `json:"confidence,omitempty"` 6351 // Segment: Video segment of a track. 6352 Segment *GoogleCloudVideointelligenceV1p3beta1VideoSegment `json:"segment,omitempty"` 6353 // TimestampedObjects: The object with timestamp and attributes per frame in 6354 // the track. 6355 TimestampedObjects []*GoogleCloudVideointelligenceV1p3beta1TimestampedObject `json:"timestampedObjects,omitempty"` 6356 // ForceSendFields is a list of field names (e.g. "Attributes") to 6357 // unconditionally include in API requests. By default, fields with empty or 6358 // default values are omitted from API requests. See 6359 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6360 // details. 6361 ForceSendFields []string `json:"-"` 6362 // NullFields is a list of field names (e.g. "Attributes") to include in API 6363 // requests with the JSON null value. By default, fields with empty values are 6364 // omitted from API requests. See 6365 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6366 NullFields []string `json:"-"` 6367 } 6368 6369 func (s *GoogleCloudVideointelligenceV1p3beta1Track) MarshalJSON() ([]byte, error) { 6370 type NoMethod GoogleCloudVideointelligenceV1p3beta1Track 6371 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6372 } 6373 6374 func (s *GoogleCloudVideointelligenceV1p3beta1Track) UnmarshalJSON(data []byte) error { 6375 type NoMethod GoogleCloudVideointelligenceV1p3beta1Track 6376 var s1 struct { 6377 Confidence gensupport.JSONFloat64 `json:"confidence"` 6378 *NoMethod 6379 } 6380 s1.NoMethod = (*NoMethod)(s) 6381 if err := json.Unmarshal(data, &s1); err != nil { 6382 return err 6383 } 6384 s.Confidence = float64(s1.Confidence) 6385 return nil 6386 } 6387 6388 // GoogleCloudVideointelligenceV1p3beta1VideoAnnotationProgress: Annotation 6389 // progress for a single video. 6390 type GoogleCloudVideointelligenceV1p3beta1VideoAnnotationProgress struct { 6391 // Feature: Specifies which feature is being tracked if the request contains 6392 // more than one feature. 6393 // 6394 // Possible values: 6395 // "FEATURE_UNSPECIFIED" - Unspecified. 6396 // "LABEL_DETECTION" - Label detection. Detect objects, such as dog or 6397 // flower. 6398 // "SHOT_CHANGE_DETECTION" - Shot change detection. 6399 // "EXPLICIT_CONTENT_DETECTION" - Explicit content detection. 6400 // "FACE_DETECTION" - Human face detection. 6401 // "SPEECH_TRANSCRIPTION" - Speech transcription. 6402 // "TEXT_DETECTION" - OCR text detection and tracking. 6403 // "OBJECT_TRACKING" - Object detection and tracking. 6404 // "LOGO_RECOGNITION" - Logo detection, tracking, and recognition. 6405 // "CELEBRITY_RECOGNITION" - Celebrity recognition. 6406 // "PERSON_DETECTION" - Person detection. 6407 Feature string `json:"feature,omitempty"` 6408 // InputUri: Video file location in Cloud Storage 6409 // (https://cloud.google.com/storage/). 6410 InputUri string `json:"inputUri,omitempty"` 6411 // ProgressPercent: Approximate percentage processed thus far. Guaranteed to be 6412 // 100 when fully processed. 6413 ProgressPercent int64 `json:"progressPercent,omitempty"` 6414 // Segment: Specifies which segment is being tracked if the request contains 6415 // more than one segment. 6416 Segment *GoogleCloudVideointelligenceV1p3beta1VideoSegment `json:"segment,omitempty"` 6417 // StartTime: Time when the request was received. 6418 StartTime string `json:"startTime,omitempty"` 6419 // UpdateTime: Time of the most recent update. 6420 UpdateTime string `json:"updateTime,omitempty"` 6421 // ForceSendFields is a list of field names (e.g. "Feature") to unconditionally 6422 // include in API requests. By default, fields with empty or default values are 6423 // omitted from API requests. See 6424 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6425 // details. 6426 ForceSendFields []string `json:"-"` 6427 // NullFields is a list of field names (e.g. "Feature") to include in API 6428 // requests with the JSON null value. By default, fields with empty values are 6429 // omitted from API requests. See 6430 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6431 NullFields []string `json:"-"` 6432 } 6433 6434 func (s *GoogleCloudVideointelligenceV1p3beta1VideoAnnotationProgress) MarshalJSON() ([]byte, error) { 6435 type NoMethod GoogleCloudVideointelligenceV1p3beta1VideoAnnotationProgress 6436 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6437 } 6438 6439 // GoogleCloudVideointelligenceV1p3beta1VideoAnnotationResults: Annotation 6440 // results for a single video. 6441 type GoogleCloudVideointelligenceV1p3beta1VideoAnnotationResults struct { 6442 // CelebrityRecognitionAnnotations: Celebrity recognition annotations. 6443 CelebrityRecognitionAnnotations *GoogleCloudVideointelligenceV1p3beta1CelebrityRecognitionAnnotation `json:"celebrityRecognitionAnnotations,omitempty"` 6444 // Error: If set, indicates an error. Note that for a single 6445 // `AnnotateVideoRequest` some videos may succeed and some may fail. 6446 Error *GoogleRpcStatus `json:"error,omitempty"` 6447 // ExplicitAnnotation: Explicit content annotation. 6448 ExplicitAnnotation *GoogleCloudVideointelligenceV1p3beta1ExplicitContentAnnotation `json:"explicitAnnotation,omitempty"` 6449 // FaceAnnotations: Deprecated. Please use `face_detection_annotations` 6450 // instead. 6451 FaceAnnotations []*GoogleCloudVideointelligenceV1p3beta1FaceAnnotation `json:"faceAnnotations,omitempty"` 6452 // FaceDetectionAnnotations: Face detection annotations. 6453 FaceDetectionAnnotations []*GoogleCloudVideointelligenceV1p3beta1FaceDetectionAnnotation `json:"faceDetectionAnnotations,omitempty"` 6454 // FrameLabelAnnotations: Label annotations on frame level. There is exactly 6455 // one element for each unique label. 6456 FrameLabelAnnotations []*GoogleCloudVideointelligenceV1p3beta1LabelAnnotation `json:"frameLabelAnnotations,omitempty"` 6457 // InputUri: Video file location in Cloud Storage 6458 // (https://cloud.google.com/storage/). 6459 InputUri string `json:"inputUri,omitempty"` 6460 // LogoRecognitionAnnotations: Annotations for list of logos detected, tracked 6461 // and recognized in video. 6462 LogoRecognitionAnnotations []*GoogleCloudVideointelligenceV1p3beta1LogoRecognitionAnnotation `json:"logoRecognitionAnnotations,omitempty"` 6463 // ObjectAnnotations: Annotations for list of objects detected and tracked in 6464 // video. 6465 ObjectAnnotations []*GoogleCloudVideointelligenceV1p3beta1ObjectTrackingAnnotation `json:"objectAnnotations,omitempty"` 6466 // PersonDetectionAnnotations: Person detection annotations. 6467 PersonDetectionAnnotations []*GoogleCloudVideointelligenceV1p3beta1PersonDetectionAnnotation `json:"personDetectionAnnotations,omitempty"` 6468 // Segment: Video segment on which the annotation is run. 6469 Segment *GoogleCloudVideointelligenceV1p3beta1VideoSegment `json:"segment,omitempty"` 6470 // SegmentLabelAnnotations: Topical label annotations on video level or 6471 // user-specified segment level. There is exactly one element for each unique 6472 // label. 6473 SegmentLabelAnnotations []*GoogleCloudVideointelligenceV1p3beta1LabelAnnotation `json:"segmentLabelAnnotations,omitempty"` 6474 // SegmentPresenceLabelAnnotations: Presence label annotations on video level 6475 // or user-specified segment level. There is exactly one element for each 6476 // unique label. Compared to the existing topical `segment_label_annotations`, 6477 // this field presents more fine-grained, segment-level labels detected in 6478 // video content and is made available only when the client sets 6479 // `LabelDetectionConfig.model` to "builtin/latest" in the request. 6480 SegmentPresenceLabelAnnotations []*GoogleCloudVideointelligenceV1p3beta1LabelAnnotation `json:"segmentPresenceLabelAnnotations,omitempty"` 6481 // ShotAnnotations: Shot annotations. Each shot is represented as a video 6482 // segment. 6483 ShotAnnotations []*GoogleCloudVideointelligenceV1p3beta1VideoSegment `json:"shotAnnotations,omitempty"` 6484 // ShotLabelAnnotations: Topical label annotations on shot level. There is 6485 // exactly one element for each unique label. 6486 ShotLabelAnnotations []*GoogleCloudVideointelligenceV1p3beta1LabelAnnotation `json:"shotLabelAnnotations,omitempty"` 6487 // ShotPresenceLabelAnnotations: Presence label annotations on shot level. 6488 // There is exactly one element for each unique label. Compared to the existing 6489 // topical `shot_label_annotations`, this field presents more fine-grained, 6490 // shot-level labels detected in video content and is made available only when 6491 // the client sets `LabelDetectionConfig.model` to "builtin/latest" in the 6492 // request. 6493 ShotPresenceLabelAnnotations []*GoogleCloudVideointelligenceV1p3beta1LabelAnnotation `json:"shotPresenceLabelAnnotations,omitempty"` 6494 // SpeechTranscriptions: Speech transcription. 6495 SpeechTranscriptions []*GoogleCloudVideointelligenceV1p3beta1SpeechTranscription `json:"speechTranscriptions,omitempty"` 6496 // TextAnnotations: OCR text detection and tracking. Annotations for list of 6497 // detected text snippets. Each will have list of frame information associated 6498 // with it. 6499 TextAnnotations []*GoogleCloudVideointelligenceV1p3beta1TextAnnotation `json:"textAnnotations,omitempty"` 6500 // ForceSendFields is a list of field names (e.g. 6501 // "CelebrityRecognitionAnnotations") to unconditionally include in API 6502 // requests. By default, fields with empty or default values are omitted from 6503 // API requests. See 6504 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6505 // details. 6506 ForceSendFields []string `json:"-"` 6507 // NullFields is a list of field names (e.g. "CelebrityRecognitionAnnotations") 6508 // to include in API requests with the JSON null value. By default, fields with 6509 // empty values are omitted from API requests. See 6510 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6511 NullFields []string `json:"-"` 6512 } 6513 6514 func (s *GoogleCloudVideointelligenceV1p3beta1VideoAnnotationResults) MarshalJSON() ([]byte, error) { 6515 type NoMethod GoogleCloudVideointelligenceV1p3beta1VideoAnnotationResults 6516 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6517 } 6518 6519 // GoogleCloudVideointelligenceV1p3beta1VideoSegment: Video segment. 6520 type GoogleCloudVideointelligenceV1p3beta1VideoSegment struct { 6521 // EndTimeOffset: Time-offset, relative to the beginning of the video, 6522 // corresponding to the end of the segment (inclusive). 6523 EndTimeOffset string `json:"endTimeOffset,omitempty"` 6524 // StartTimeOffset: Time-offset, relative to the beginning of the video, 6525 // corresponding to the start of the segment (inclusive). 6526 StartTimeOffset string `json:"startTimeOffset,omitempty"` 6527 // ForceSendFields is a list of field names (e.g. "EndTimeOffset") to 6528 // unconditionally include in API requests. By default, fields with empty or 6529 // default values are omitted from API requests. See 6530 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6531 // details. 6532 ForceSendFields []string `json:"-"` 6533 // NullFields is a list of field names (e.g. "EndTimeOffset") to include in API 6534 // requests with the JSON null value. By default, fields with empty values are 6535 // omitted from API requests. See 6536 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6537 NullFields []string `json:"-"` 6538 } 6539 6540 func (s *GoogleCloudVideointelligenceV1p3beta1VideoSegment) MarshalJSON() ([]byte, error) { 6541 type NoMethod GoogleCloudVideointelligenceV1p3beta1VideoSegment 6542 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6543 } 6544 6545 // GoogleCloudVideointelligenceV1p3beta1WordInfo: Word-specific information for 6546 // recognized words. Word information is only included in the response when 6547 // certain request parameters are set, such as `enable_word_time_offsets`. 6548 type GoogleCloudVideointelligenceV1p3beta1WordInfo struct { 6549 // Confidence: Output only. The confidence estimate between 0.0 and 1.0. A 6550 // higher number indicates an estimated greater likelihood that the recognized 6551 // words are correct. This field is set only for the top alternative. This 6552 // field is not guaranteed to be accurate and users should not rely on it to be 6553 // always provided. The default of 0.0 is a sentinel value indicating 6554 // `confidence` was not set. 6555 Confidence float64 `json:"confidence,omitempty"` 6556 // EndTime: Time offset relative to the beginning of the audio, and 6557 // corresponding to the end of the spoken word. This field is only set if 6558 // `enable_word_time_offsets=true` and only in the top hypothesis. This is an 6559 // experimental feature and the accuracy of the time offset can vary. 6560 EndTime string `json:"endTime,omitempty"` 6561 // SpeakerTag: Output only. A distinct integer value is assigned for every 6562 // speaker within the audio. This field specifies which one of those speakers 6563 // was detected to have spoken this word. Value ranges from 1 up to 6564 // diarization_speaker_count, and is only set if speaker diarization is 6565 // enabled. 6566 SpeakerTag int64 `json:"speakerTag,omitempty"` 6567 // StartTime: Time offset relative to the beginning of the audio, and 6568 // corresponding to the start of the spoken word. This field is only set if 6569 // `enable_word_time_offsets=true` and only in the top hypothesis. This is an 6570 // experimental feature and the accuracy of the time offset can vary. 6571 StartTime string `json:"startTime,omitempty"` 6572 // Word: The word corresponding to this set of information. 6573 Word string `json:"word,omitempty"` 6574 // ForceSendFields is a list of field names (e.g. "Confidence") to 6575 // unconditionally include in API requests. By default, fields with empty or 6576 // default values are omitted from API requests. See 6577 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6578 // details. 6579 ForceSendFields []string `json:"-"` 6580 // NullFields is a list of field names (e.g. "Confidence") to include in API 6581 // requests with the JSON null value. By default, fields with empty values are 6582 // omitted from API requests. See 6583 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6584 NullFields []string `json:"-"` 6585 } 6586 6587 func (s *GoogleCloudVideointelligenceV1p3beta1WordInfo) MarshalJSON() ([]byte, error) { 6588 type NoMethod GoogleCloudVideointelligenceV1p3beta1WordInfo 6589 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6590 } 6591 6592 func (s *GoogleCloudVideointelligenceV1p3beta1WordInfo) UnmarshalJSON(data []byte) error { 6593 type NoMethod GoogleCloudVideointelligenceV1p3beta1WordInfo 6594 var s1 struct { 6595 Confidence gensupport.JSONFloat64 `json:"confidence"` 6596 *NoMethod 6597 } 6598 s1.NoMethod = (*NoMethod)(s) 6599 if err := json.Unmarshal(data, &s1); err != nil { 6600 return err 6601 } 6602 s.Confidence = float64(s1.Confidence) 6603 return nil 6604 } 6605 6606 // GoogleLongrunningOperation: This resource represents a long-running 6607 // operation that is the result of a network API call. 6608 type GoogleLongrunningOperation struct { 6609 // Done: If the value is `false`, it means the operation is still in progress. 6610 // If `true`, the operation is completed, and either `error` or `response` is 6611 // available. 6612 Done bool `json:"done,omitempty"` 6613 // Error: The error result of the operation in case of failure or cancellation. 6614 Error *GoogleRpcStatus `json:"error,omitempty"` 6615 // Metadata: Service-specific metadata associated with the operation. It 6616 // typically contains progress information and common metadata such as create 6617 // time. Some services might not provide such metadata. Any method that returns 6618 // a long-running operation should document the metadata type, if any. 6619 Metadata googleapi.RawMessage `json:"metadata,omitempty"` 6620 // Name: The server-assigned name, which is only unique within the same service 6621 // that originally returns it. If you use the default HTTP mapping, the `name` 6622 // should be a resource name ending with `operations/{unique_id}`. 6623 Name string `json:"name,omitempty"` 6624 // Response: The normal, successful response of the operation. If the original 6625 // method returns no data on success, such as `Delete`, the response is 6626 // `google.protobuf.Empty`. If the original method is standard 6627 // `Get`/`Create`/`Update`, the response should be the resource. For other 6628 // methods, the response should have the type `XxxResponse`, where `Xxx` is the 6629 // original method name. For example, if the original method name is 6630 // `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. 6631 Response googleapi.RawMessage `json:"response,omitempty"` 6632 6633 // ServerResponse contains the HTTP response code and headers from the server. 6634 googleapi.ServerResponse `json:"-"` 6635 // ForceSendFields is a list of field names (e.g. "Done") to unconditionally 6636 // include in API requests. By default, fields with empty or default values are 6637 // omitted from API requests. See 6638 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6639 // details. 6640 ForceSendFields []string `json:"-"` 6641 // NullFields is a list of field names (e.g. "Done") to include in API requests 6642 // with the JSON null value. By default, fields with empty values are omitted 6643 // from API requests. See 6644 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6645 NullFields []string `json:"-"` 6646 } 6647 6648 func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { 6649 type NoMethod GoogleLongrunningOperation 6650 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6651 } 6652 6653 // GoogleRpcStatus: The `Status` type defines a logical error model that is 6654 // suitable for different programming environments, including REST APIs and RPC 6655 // APIs. It is used by gRPC (https://github.com/grpc). Each `Status` message 6656 // contains three pieces of data: error code, error message, and error details. 6657 // You can find out more about this error model and how to work with it in the 6658 // API Design Guide (https://cloud.google.com/apis/design/errors). 6659 type GoogleRpcStatus struct { 6660 // Code: The status code, which should be an enum value of google.rpc.Code. 6661 Code int64 `json:"code,omitempty"` 6662 // Details: A list of messages that carry the error details. There is a common 6663 // set of message types for APIs to use. 6664 Details []googleapi.RawMessage `json:"details,omitempty"` 6665 // Message: A developer-facing error message, which should be in English. Any 6666 // user-facing error message should be localized and sent in the 6667 // google.rpc.Status.details field, or localized by the client. 6668 Message string `json:"message,omitempty"` 6669 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally 6670 // include in API requests. By default, fields with empty or default values are 6671 // omitted from API requests. See 6672 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6673 // details. 6674 ForceSendFields []string `json:"-"` 6675 // NullFields is a list of field names (e.g. "Code") to include in API requests 6676 // with the JSON null value. By default, fields with empty values are omitted 6677 // from API requests. See 6678 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6679 NullFields []string `json:"-"` 6680 } 6681 6682 func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) { 6683 type NoMethod GoogleRpcStatus 6684 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6685 } 6686 6687 type VideosAnnotateCall struct { 6688 s *Service 6689 googlecloudvideointelligencev1beta2Annotatevideorequest *GoogleCloudVideointelligenceV1beta2AnnotateVideoRequest 6690 urlParams_ gensupport.URLParams 6691 ctx_ context.Context 6692 header_ http.Header 6693 } 6694 6695 // Annotate: Performs asynchronous video annotation. Progress and results can 6696 // be retrieved through the `google.longrunning.Operations` interface. 6697 // `Operation.metadata` contains `AnnotateVideoProgress` (progress). 6698 // `Operation.response` contains `AnnotateVideoResponse` (results). 6699 func (r *VideosService) Annotate(googlecloudvideointelligencev1beta2Annotatevideorequest *GoogleCloudVideointelligenceV1beta2AnnotateVideoRequest) *VideosAnnotateCall { 6700 c := &VideosAnnotateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6701 c.googlecloudvideointelligencev1beta2Annotatevideorequest = googlecloudvideointelligencev1beta2Annotatevideorequest 6702 return c 6703 } 6704 6705 // Fields allows partial responses to be retrieved. See 6706 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 6707 // details. 6708 func (c *VideosAnnotateCall) Fields(s ...googleapi.Field) *VideosAnnotateCall { 6709 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6710 return c 6711 } 6712 6713 // Context sets the context to be used in this call's Do method. 6714 func (c *VideosAnnotateCall) Context(ctx context.Context) *VideosAnnotateCall { 6715 c.ctx_ = ctx 6716 return c 6717 } 6718 6719 // Header returns a http.Header that can be modified by the caller to add 6720 // headers to the request. 6721 func (c *VideosAnnotateCall) Header() http.Header { 6722 if c.header_ == nil { 6723 c.header_ = make(http.Header) 6724 } 6725 return c.header_ 6726 } 6727 6728 func (c *VideosAnnotateCall) doRequest(alt string) (*http.Response, error) { 6729 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 6730 var body io.Reader = nil 6731 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudvideointelligencev1beta2Annotatevideorequest) 6732 if err != nil { 6733 return nil, err 6734 } 6735 c.urlParams_.Set("alt", alt) 6736 c.urlParams_.Set("prettyPrint", "false") 6737 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/videos:annotate") 6738 urls += "?" + c.urlParams_.Encode() 6739 req, err := http.NewRequest("POST", urls, body) 6740 if err != nil { 6741 return nil, err 6742 } 6743 req.Header = reqHeaders 6744 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6745 } 6746 6747 // Do executes the "videointelligence.videos.annotate" call. 6748 // Any non-2xx status code is an error. Response headers are in either 6749 // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was 6750 // returned at all) in error.(*googleapi.Error).Header. Use 6751 // googleapi.IsNotModified to check whether the returned error was because 6752 // http.StatusNotModified was returned. 6753 func (c *VideosAnnotateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 6754 gensupport.SetOptions(c.urlParams_, opts...) 6755 res, err := c.doRequest("json") 6756 if res != nil && res.StatusCode == http.StatusNotModified { 6757 if res.Body != nil { 6758 res.Body.Close() 6759 } 6760 return nil, gensupport.WrapError(&googleapi.Error{ 6761 Code: res.StatusCode, 6762 Header: res.Header, 6763 }) 6764 } 6765 if err != nil { 6766 return nil, err 6767 } 6768 defer googleapi.CloseBody(res) 6769 if err := googleapi.CheckResponse(res); err != nil { 6770 return nil, gensupport.WrapError(err) 6771 } 6772 ret := &GoogleLongrunningOperation{ 6773 ServerResponse: googleapi.ServerResponse{ 6774 Header: res.Header, 6775 HTTPStatusCode: res.StatusCode, 6776 }, 6777 } 6778 target := &ret 6779 if err := gensupport.DecodeResponse(target, res); err != nil { 6780 return nil, err 6781 } 6782 return ret, nil 6783 } 6784