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