You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

6999 lines
294 KiB

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