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.
 
 
 

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