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/v1p2beta1"
  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/v1p2beta1"
  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:v1p2beta1"
  69. const apiName = "videointelligence"
  70. const apiVersion = "v1p2beta1"
  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. // GoogleCloudVideointelligenceV1beta2AnnotateVideoResponse: Video
  1067. // annotation response. Included in the `response`
  1068. // field of the `Operation` returned by the `GetOperation`
  1069. // call of the `google::longrunning::Operations` service.
  1070. type GoogleCloudVideointelligenceV1beta2AnnotateVideoResponse struct {
  1071. // AnnotationResults: Annotation results for all videos specified in
  1072. // `AnnotateVideoRequest`.
  1073. AnnotationResults []*GoogleCloudVideointelligenceV1beta2VideoAnnotationResults `json:"annotationResults,omitempty"`
  1074. // ForceSendFields is a list of field names (e.g. "AnnotationResults")
  1075. // to unconditionally include in API requests. By default, fields with
  1076. // empty values are omitted from API requests. However, any non-pointer,
  1077. // non-interface field appearing in ForceSendFields will be sent to the
  1078. // server regardless of whether the field is empty or not. This may be
  1079. // used to include empty fields in Patch requests.
  1080. ForceSendFields []string `json:"-"`
  1081. // NullFields is a list of field names (e.g. "AnnotationResults") to
  1082. // include in API requests with the JSON null value. By default, fields
  1083. // with empty values are omitted from API requests. However, any field
  1084. // with an empty value appearing in NullFields will be sent to the
  1085. // server as null. It is an error if a field in this list has a
  1086. // non-empty value. This may be used to include null fields in Patch
  1087. // requests.
  1088. NullFields []string `json:"-"`
  1089. }
  1090. func (s *GoogleCloudVideointelligenceV1beta2AnnotateVideoResponse) MarshalJSON() ([]byte, error) {
  1091. type NoMethod GoogleCloudVideointelligenceV1beta2AnnotateVideoResponse
  1092. raw := NoMethod(*s)
  1093. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1094. }
  1095. // GoogleCloudVideointelligenceV1beta2Entity: Detected entity from video
  1096. // analysis.
  1097. type GoogleCloudVideointelligenceV1beta2Entity struct {
  1098. // Description: Textual description, e.g. `Fixed-gear bicycle`.
  1099. Description string `json:"description,omitempty"`
  1100. // EntityId: Opaque entity ID. Some IDs may be available in
  1101. // [Google Knowledge Graph
  1102. // Search
  1103. // API](https://developers.google.com/knowledge-graph/).
  1104. EntityId string `json:"entityId,omitempty"`
  1105. // LanguageCode: Language code for `description` in BCP-47 format.
  1106. LanguageCode string `json:"languageCode,omitempty"`
  1107. // ForceSendFields is a list of field names (e.g. "Description") to
  1108. // unconditionally include in API requests. By default, fields with
  1109. // empty values are omitted from API requests. However, any non-pointer,
  1110. // non-interface field appearing in ForceSendFields will be sent to the
  1111. // server regardless of whether the field is empty or not. This may be
  1112. // used to include empty fields in Patch requests.
  1113. ForceSendFields []string `json:"-"`
  1114. // NullFields is a list of field names (e.g. "Description") to include
  1115. // in API requests with the JSON null value. By default, fields with
  1116. // empty values are omitted from API requests. However, any field with
  1117. // an empty value appearing in NullFields will be sent to the server as
  1118. // null. It is an error if a field in this list has a non-empty value.
  1119. // This may be used to include null fields in Patch requests.
  1120. NullFields []string `json:"-"`
  1121. }
  1122. func (s *GoogleCloudVideointelligenceV1beta2Entity) MarshalJSON() ([]byte, error) {
  1123. type NoMethod GoogleCloudVideointelligenceV1beta2Entity
  1124. raw := NoMethod(*s)
  1125. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1126. }
  1127. // GoogleCloudVideointelligenceV1beta2ExplicitContentAnnotation:
  1128. // Explicit content annotation (based on per-frame visual signals
  1129. // only).
  1130. // If no explicit content has been detected in a frame, no annotations
  1131. // are
  1132. // present for that frame.
  1133. type GoogleCloudVideointelligenceV1beta2ExplicitContentAnnotation struct {
  1134. // Frames: All video frames where explicit content was detected.
  1135. Frames []*GoogleCloudVideointelligenceV1beta2ExplicitContentFrame `json:"frames,omitempty"`
  1136. // ForceSendFields is a list of field names (e.g. "Frames") to
  1137. // unconditionally include in API requests. By default, fields with
  1138. // empty values are omitted from API requests. However, any non-pointer,
  1139. // non-interface field appearing in ForceSendFields will be sent to the
  1140. // server regardless of whether the field is empty or not. This may be
  1141. // used to include empty fields in Patch requests.
  1142. ForceSendFields []string `json:"-"`
  1143. // NullFields is a list of field names (e.g. "Frames") to include in API
  1144. // requests with the JSON null value. By default, fields with empty
  1145. // values are omitted from API requests. However, any field with an
  1146. // empty value appearing in NullFields will be sent to the server as
  1147. // null. It is an error if a field in this list has a non-empty value.
  1148. // This may be used to include null fields in Patch requests.
  1149. NullFields []string `json:"-"`
  1150. }
  1151. func (s *GoogleCloudVideointelligenceV1beta2ExplicitContentAnnotation) MarshalJSON() ([]byte, error) {
  1152. type NoMethod GoogleCloudVideointelligenceV1beta2ExplicitContentAnnotation
  1153. raw := NoMethod(*s)
  1154. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1155. }
  1156. // GoogleCloudVideointelligenceV1beta2ExplicitContentFrame: Video frame
  1157. // level annotation results for explicit content.
  1158. type GoogleCloudVideointelligenceV1beta2ExplicitContentFrame struct {
  1159. // PornographyLikelihood: Likelihood of the pornography content..
  1160. //
  1161. // Possible values:
  1162. // "LIKELIHOOD_UNSPECIFIED" - Unspecified likelihood.
  1163. // "VERY_UNLIKELY" - Very unlikely.
  1164. // "UNLIKELY" - Unlikely.
  1165. // "POSSIBLE" - Possible.
  1166. // "LIKELY" - Likely.
  1167. // "VERY_LIKELY" - Very likely.
  1168. PornographyLikelihood string `json:"pornographyLikelihood,omitempty"`
  1169. // TimeOffset: Time-offset, relative to the beginning of the video,
  1170. // corresponding to the
  1171. // video frame for this location.
  1172. TimeOffset string `json:"timeOffset,omitempty"`
  1173. // ForceSendFields is a list of field names (e.g.
  1174. // "PornographyLikelihood") to unconditionally include in API requests.
  1175. // By default, fields with empty values are omitted from API requests.
  1176. // However, any non-pointer, non-interface field appearing in
  1177. // ForceSendFields will be sent to the server regardless of whether the
  1178. // field is empty or not. This may be used to include empty fields in
  1179. // Patch requests.
  1180. ForceSendFields []string `json:"-"`
  1181. // NullFields is a list of field names (e.g. "PornographyLikelihood") to
  1182. // include in API requests with the JSON null value. By default, fields
  1183. // with empty values are omitted from API requests. However, any field
  1184. // with an empty value appearing in NullFields will be sent to the
  1185. // server as null. It is an error if a field in this list has a
  1186. // non-empty value. This may be used to include null fields in Patch
  1187. // requests.
  1188. NullFields []string `json:"-"`
  1189. }
  1190. func (s *GoogleCloudVideointelligenceV1beta2ExplicitContentFrame) MarshalJSON() ([]byte, error) {
  1191. type NoMethod GoogleCloudVideointelligenceV1beta2ExplicitContentFrame
  1192. raw := NoMethod(*s)
  1193. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1194. }
  1195. // GoogleCloudVideointelligenceV1beta2LabelAnnotation: Label annotation.
  1196. type GoogleCloudVideointelligenceV1beta2LabelAnnotation struct {
  1197. // CategoryEntities: Common categories for the detected entity.
  1198. // E.g. when the label is `Terrier` the category is likely `dog`. And in
  1199. // some
  1200. // cases there might be more than one categories e.g. `Terrier` could
  1201. // also be
  1202. // a `pet`.
  1203. CategoryEntities []*GoogleCloudVideointelligenceV1beta2Entity `json:"categoryEntities,omitempty"`
  1204. // Entity: Detected entity.
  1205. Entity *GoogleCloudVideointelligenceV1beta2Entity `json:"entity,omitempty"`
  1206. // Frames: All video frames where a label was detected.
  1207. Frames []*GoogleCloudVideointelligenceV1beta2LabelFrame `json:"frames,omitempty"`
  1208. // Segments: All video segments where a label was detected.
  1209. Segments []*GoogleCloudVideointelligenceV1beta2LabelSegment `json:"segments,omitempty"`
  1210. // ForceSendFields is a list of field names (e.g. "CategoryEntities") to
  1211. // unconditionally include in API requests. By default, fields with
  1212. // empty values are omitted from API requests. However, any non-pointer,
  1213. // non-interface field appearing in ForceSendFields will be sent to the
  1214. // server regardless of whether the field is empty or not. This may be
  1215. // used to include empty fields in Patch requests.
  1216. ForceSendFields []string `json:"-"`
  1217. // NullFields is a list of field names (e.g. "CategoryEntities") to
  1218. // include in API requests with the JSON null value. By default, fields
  1219. // with empty values are omitted from API requests. However, any field
  1220. // with an empty value appearing in NullFields will be sent to the
  1221. // server as null. It is an error if a field in this list has a
  1222. // non-empty value. This may be used to include null fields in Patch
  1223. // requests.
  1224. NullFields []string `json:"-"`
  1225. }
  1226. func (s *GoogleCloudVideointelligenceV1beta2LabelAnnotation) MarshalJSON() ([]byte, error) {
  1227. type NoMethod GoogleCloudVideointelligenceV1beta2LabelAnnotation
  1228. raw := NoMethod(*s)
  1229. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1230. }
  1231. // GoogleCloudVideointelligenceV1beta2LabelFrame: Video frame level
  1232. // annotation results for label detection.
  1233. type GoogleCloudVideointelligenceV1beta2LabelFrame struct {
  1234. // Confidence: Confidence that the label is accurate. Range: [0, 1].
  1235. Confidence float64 `json:"confidence,omitempty"`
  1236. // TimeOffset: Time-offset, relative to the beginning of the video,
  1237. // corresponding to the
  1238. // video frame for this location.
  1239. TimeOffset string `json:"timeOffset,omitempty"`
  1240. // ForceSendFields is a list of field names (e.g. "Confidence") to
  1241. // unconditionally include in API requests. By default, fields with
  1242. // empty values are omitted from API requests. However, any non-pointer,
  1243. // non-interface field appearing in ForceSendFields will be sent to the
  1244. // server regardless of whether the field is empty or not. This may be
  1245. // used to include empty fields in Patch requests.
  1246. ForceSendFields []string `json:"-"`
  1247. // NullFields is a list of field names (e.g. "Confidence") to include in
  1248. // API requests with the JSON null value. By default, fields with empty
  1249. // values are omitted from API requests. However, any field with an
  1250. // empty value appearing in NullFields will be sent to the server as
  1251. // null. It is an error if a field in this list has a non-empty value.
  1252. // This may be used to include null fields in Patch requests.
  1253. NullFields []string `json:"-"`
  1254. }
  1255. func (s *GoogleCloudVideointelligenceV1beta2LabelFrame) MarshalJSON() ([]byte, error) {
  1256. type NoMethod GoogleCloudVideointelligenceV1beta2LabelFrame
  1257. raw := NoMethod(*s)
  1258. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1259. }
  1260. func (s *GoogleCloudVideointelligenceV1beta2LabelFrame) UnmarshalJSON(data []byte) error {
  1261. type NoMethod GoogleCloudVideointelligenceV1beta2LabelFrame
  1262. var s1 struct {
  1263. Confidence gensupport.JSONFloat64 `json:"confidence"`
  1264. *NoMethod
  1265. }
  1266. s1.NoMethod = (*NoMethod)(s)
  1267. if err := json.Unmarshal(data, &s1); err != nil {
  1268. return err
  1269. }
  1270. s.Confidence = float64(s1.Confidence)
  1271. return nil
  1272. }
  1273. // GoogleCloudVideointelligenceV1beta2LabelSegment: Video segment level
  1274. // annotation results for label detection.
  1275. type GoogleCloudVideointelligenceV1beta2LabelSegment struct {
  1276. // Confidence: Confidence that the label is accurate. Range: [0, 1].
  1277. Confidence float64 `json:"confidence,omitempty"`
  1278. // Segment: Video segment where a label was detected.
  1279. Segment *GoogleCloudVideointelligenceV1beta2VideoSegment `json:"segment,omitempty"`
  1280. // ForceSendFields is a list of field names (e.g. "Confidence") to
  1281. // unconditionally include in API requests. By default, fields with
  1282. // empty values are omitted from API requests. However, any non-pointer,
  1283. // non-interface field appearing in ForceSendFields will be sent to the
  1284. // server regardless of whether the field is empty or not. This may be
  1285. // used to include empty fields in Patch requests.
  1286. ForceSendFields []string `json:"-"`
  1287. // NullFields is a list of field names (e.g. "Confidence") to include in
  1288. // API requests with the JSON null value. By default, fields with empty
  1289. // values are omitted from API requests. However, any field with an
  1290. // empty value appearing in NullFields will be sent to the server as
  1291. // null. It is an error if a field in this list has a non-empty value.
  1292. // This may be used to include null fields in Patch requests.
  1293. NullFields []string `json:"-"`
  1294. }
  1295. func (s *GoogleCloudVideointelligenceV1beta2LabelSegment) MarshalJSON() ([]byte, error) {
  1296. type NoMethod GoogleCloudVideointelligenceV1beta2LabelSegment
  1297. raw := NoMethod(*s)
  1298. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1299. }
  1300. func (s *GoogleCloudVideointelligenceV1beta2LabelSegment) UnmarshalJSON(data []byte) error {
  1301. type NoMethod GoogleCloudVideointelligenceV1beta2LabelSegment
  1302. var s1 struct {
  1303. Confidence gensupport.JSONFloat64 `json:"confidence"`
  1304. *NoMethod
  1305. }
  1306. s1.NoMethod = (*NoMethod)(s)
  1307. if err := json.Unmarshal(data, &s1); err != nil {
  1308. return err
  1309. }
  1310. s.Confidence = float64(s1.Confidence)
  1311. return nil
  1312. }
  1313. // GoogleCloudVideointelligenceV1beta2NormalizedBoundingBox: Normalized
  1314. // bounding box.
  1315. // The normalized vertex coordinates are relative to the original
  1316. // image.
  1317. // Range: [0, 1].
  1318. type GoogleCloudVideointelligenceV1beta2NormalizedBoundingBox struct {
  1319. // Bottom: Bottom Y coordinate.
  1320. Bottom float64 `json:"bottom,omitempty"`
  1321. // Left: Left X coordinate.
  1322. Left float64 `json:"left,omitempty"`
  1323. // Right: Right X coordinate.
  1324. Right float64 `json:"right,omitempty"`
  1325. // Top: Top Y coordinate.
  1326. Top float64 `json:"top,omitempty"`
  1327. // ForceSendFields is a list of field names (e.g. "Bottom") to
  1328. // unconditionally include in API requests. By default, fields with
  1329. // empty values are omitted from API requests. However, any non-pointer,
  1330. // non-interface field appearing in ForceSendFields will be sent to the
  1331. // server regardless of whether the field is empty or not. This may be
  1332. // used to include empty fields in Patch requests.
  1333. ForceSendFields []string `json:"-"`
  1334. // NullFields is a list of field names (e.g. "Bottom") to include in API
  1335. // requests with the JSON null value. By default, fields with empty
  1336. // values are omitted from API requests. However, any field with an
  1337. // empty value appearing in NullFields will be sent to the server as
  1338. // null. It is an error if a field in this list has a non-empty value.
  1339. // This may be used to include null fields in Patch requests.
  1340. NullFields []string `json:"-"`
  1341. }
  1342. func (s *GoogleCloudVideointelligenceV1beta2NormalizedBoundingBox) MarshalJSON() ([]byte, error) {
  1343. type NoMethod GoogleCloudVideointelligenceV1beta2NormalizedBoundingBox
  1344. raw := NoMethod(*s)
  1345. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1346. }
  1347. func (s *GoogleCloudVideointelligenceV1beta2NormalizedBoundingBox) UnmarshalJSON(data []byte) error {
  1348. type NoMethod GoogleCloudVideointelligenceV1beta2NormalizedBoundingBox
  1349. var s1 struct {
  1350. Bottom gensupport.JSONFloat64 `json:"bottom"`
  1351. Left gensupport.JSONFloat64 `json:"left"`
  1352. Right gensupport.JSONFloat64 `json:"right"`
  1353. Top gensupport.JSONFloat64 `json:"top"`
  1354. *NoMethod
  1355. }
  1356. s1.NoMethod = (*NoMethod)(s)
  1357. if err := json.Unmarshal(data, &s1); err != nil {
  1358. return err
  1359. }
  1360. s.Bottom = float64(s1.Bottom)
  1361. s.Left = float64(s1.Left)
  1362. s.Right = float64(s1.Right)
  1363. s.Top = float64(s1.Top)
  1364. return nil
  1365. }
  1366. // GoogleCloudVideointelligenceV1beta2NormalizedBoundingPoly: Normalized
  1367. // bounding polygon for text (that might not be aligned with
  1368. // axis).
  1369. // Contains list of the corner points in clockwise order starting
  1370. // from
  1371. // top-left corner. For example, for a rectangular bounding box:
  1372. // When the text is horizontal it might look like:
  1373. // 0----1
  1374. // | |
  1375. // 3----2
  1376. //
  1377. // When it's clockwise rotated 180 degrees around the top-left corner
  1378. // it
  1379. // becomes:
  1380. // 2----3
  1381. // | |
  1382. // 1----0
  1383. //
  1384. // and the vertex order will still be (0, 1, 2, 3). Note that values can
  1385. // be less
  1386. // than 0, or greater than 1 due to trignometric calculations for
  1387. // location of
  1388. // the box.
  1389. type GoogleCloudVideointelligenceV1beta2NormalizedBoundingPoly struct {
  1390. // Vertices: Normalized vertices of the bounding polygon.
  1391. Vertices []*GoogleCloudVideointelligenceV1beta2NormalizedVertex `json:"vertices,omitempty"`
  1392. // ForceSendFields is a list of field names (e.g. "Vertices") to
  1393. // unconditionally include in API requests. By default, fields with
  1394. // empty values are omitted from API requests. However, any non-pointer,
  1395. // non-interface field appearing in ForceSendFields will be sent to the
  1396. // server regardless of whether the field is empty or not. This may be
  1397. // used to include empty fields in Patch requests.
  1398. ForceSendFields []string `json:"-"`
  1399. // NullFields is a list of field names (e.g. "Vertices") to include in
  1400. // API requests with the JSON null value. By default, fields with empty
  1401. // values are omitted from API requests. However, any field with an
  1402. // empty value appearing in NullFields will be sent to the server as
  1403. // null. It is an error if a field in this list has a non-empty value.
  1404. // This may be used to include null fields in Patch requests.
  1405. NullFields []string `json:"-"`
  1406. }
  1407. func (s *GoogleCloudVideointelligenceV1beta2NormalizedBoundingPoly) MarshalJSON() ([]byte, error) {
  1408. type NoMethod GoogleCloudVideointelligenceV1beta2NormalizedBoundingPoly
  1409. raw := NoMethod(*s)
  1410. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1411. }
  1412. // GoogleCloudVideointelligenceV1beta2NormalizedVertex: A vertex
  1413. // represents a 2D point in the image.
  1414. // NOTE: the normalized vertex coordinates are relative to the original
  1415. // image
  1416. // and range from 0 to 1.
  1417. type GoogleCloudVideointelligenceV1beta2NormalizedVertex struct {
  1418. // X: X coordinate.
  1419. X float64 `json:"x,omitempty"`
  1420. // Y: Y coordinate.
  1421. Y float64 `json:"y,omitempty"`
  1422. // ForceSendFields is a list of field names (e.g. "X") to
  1423. // unconditionally include in API requests. By default, fields with
  1424. // empty values are omitted from API requests. However, any non-pointer,
  1425. // non-interface field appearing in ForceSendFields will be sent to the
  1426. // server regardless of whether the field is empty or not. This may be
  1427. // used to include empty fields in Patch requests.
  1428. ForceSendFields []string `json:"-"`
  1429. // NullFields is a list of field names (e.g. "X") to include in API
  1430. // requests with the JSON null value. By default, fields with empty
  1431. // values are omitted from API requests. However, any field with an
  1432. // empty value appearing in NullFields will be sent to the server as
  1433. // null. It is an error if a field in this list has a non-empty value.
  1434. // This may be used to include null fields in Patch requests.
  1435. NullFields []string `json:"-"`
  1436. }
  1437. func (s *GoogleCloudVideointelligenceV1beta2NormalizedVertex) MarshalJSON() ([]byte, error) {
  1438. type NoMethod GoogleCloudVideointelligenceV1beta2NormalizedVertex
  1439. raw := NoMethod(*s)
  1440. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1441. }
  1442. func (s *GoogleCloudVideointelligenceV1beta2NormalizedVertex) UnmarshalJSON(data []byte) error {
  1443. type NoMethod GoogleCloudVideointelligenceV1beta2NormalizedVertex
  1444. var s1 struct {
  1445. X gensupport.JSONFloat64 `json:"x"`
  1446. Y gensupport.JSONFloat64 `json:"y"`
  1447. *NoMethod
  1448. }
  1449. s1.NoMethod = (*NoMethod)(s)
  1450. if err := json.Unmarshal(data, &s1); err != nil {
  1451. return err
  1452. }
  1453. s.X = float64(s1.X)
  1454. s.Y = float64(s1.Y)
  1455. return nil
  1456. }
  1457. // GoogleCloudVideointelligenceV1beta2ObjectTrackingAnnotation:
  1458. // Annotations corresponding to one tracked object.
  1459. type GoogleCloudVideointelligenceV1beta2ObjectTrackingAnnotation struct {
  1460. // Confidence: Object category's labeling confidence of this track.
  1461. Confidence float64 `json:"confidence,omitempty"`
  1462. // Entity: Entity to specify the object category that this track is
  1463. // labeled as.
  1464. Entity *GoogleCloudVideointelligenceV1beta2Entity `json:"entity,omitempty"`
  1465. // Frames: Information corresponding to all frames where this object
  1466. // track appears.
  1467. // Non-streaming batch mode: it may be one or multiple
  1468. // ObjectTrackingFrame
  1469. // messages in frames.
  1470. // Streaming mode: it can only be one ObjectTrackingFrame message in
  1471. // frames.
  1472. Frames []*GoogleCloudVideointelligenceV1beta2ObjectTrackingFrame `json:"frames,omitempty"`
  1473. // Segment: Non-streaming batch mode ONLY.
  1474. // Each object track corresponds to one video segment where it appears.
  1475. Segment *GoogleCloudVideointelligenceV1beta2VideoSegment `json:"segment,omitempty"`
  1476. // TrackId: Streaming mode ONLY.
  1477. // In streaming mode, we do not know the end time of a tracked
  1478. // object
  1479. // before it is completed. Hence, there is no VideoSegment info
  1480. // returned.
  1481. // Instead, we provide a unique identifiable integer track_id so
  1482. // that
  1483. // the customers can correlate the results of the
  1484. // ongoing
  1485. // ObjectTrackAnnotation of the same track_id over time.
  1486. TrackId int64 `json:"trackId,omitempty,string"`
  1487. // ForceSendFields is a list of field names (e.g. "Confidence") to
  1488. // unconditionally include in API requests. By default, fields with
  1489. // empty values are omitted from API requests. However, any non-pointer,
  1490. // non-interface field appearing in ForceSendFields will be sent to the
  1491. // server regardless of whether the field is empty or not. This may be
  1492. // used to include empty fields in Patch requests.
  1493. ForceSendFields []string `json:"-"`
  1494. // NullFields is a list of field names (e.g. "Confidence") to include in
  1495. // API requests with the JSON null value. By default, fields with empty
  1496. // values are omitted from API requests. However, any field with an
  1497. // empty value appearing in NullFields will be sent to the server as
  1498. // null. It is an error if a field in this list has a non-empty value.
  1499. // This may be used to include null fields in Patch requests.
  1500. NullFields []string `json:"-"`
  1501. }
  1502. func (s *GoogleCloudVideointelligenceV1beta2ObjectTrackingAnnotation) MarshalJSON() ([]byte, error) {
  1503. type NoMethod GoogleCloudVideointelligenceV1beta2ObjectTrackingAnnotation
  1504. raw := NoMethod(*s)
  1505. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1506. }
  1507. func (s *GoogleCloudVideointelligenceV1beta2ObjectTrackingAnnotation) UnmarshalJSON(data []byte) error {
  1508. type NoMethod GoogleCloudVideointelligenceV1beta2ObjectTrackingAnnotation
  1509. var s1 struct {
  1510. Confidence gensupport.JSONFloat64 `json:"confidence"`
  1511. *NoMethod
  1512. }
  1513. s1.NoMethod = (*NoMethod)(s)
  1514. if err := json.Unmarshal(data, &s1); err != nil {
  1515. return err
  1516. }
  1517. s.Confidence = float64(s1.Confidence)
  1518. return nil
  1519. }
  1520. // GoogleCloudVideointelligenceV1beta2ObjectTrackingFrame: Video frame
  1521. // level annotations for object detection and tracking. This
  1522. // field
  1523. // stores per frame location, time offset, and confidence.
  1524. type GoogleCloudVideointelligenceV1beta2ObjectTrackingFrame struct {
  1525. // NormalizedBoundingBox: The normalized bounding box location of this
  1526. // object track for the frame.
  1527. NormalizedBoundingBox *GoogleCloudVideointelligenceV1beta2NormalizedBoundingBox `json:"normalizedBoundingBox,omitempty"`
  1528. // TimeOffset: The timestamp of the frame in microseconds.
  1529. TimeOffset string `json:"timeOffset,omitempty"`
  1530. // ForceSendFields is a list of field names (e.g.
  1531. // "NormalizedBoundingBox") to unconditionally include in API requests.
  1532. // By default, fields with empty values are omitted from API requests.
  1533. // However, any non-pointer, non-interface field appearing in
  1534. // ForceSendFields will be sent to the server regardless of whether the
  1535. // field is empty or not. This may be used to include empty fields in
  1536. // Patch requests.
  1537. ForceSendFields []string `json:"-"`
  1538. // NullFields is a list of field names (e.g. "NormalizedBoundingBox") to
  1539. // include in API requests with the JSON null value. By default, fields
  1540. // with empty values are omitted from API requests. However, any field
  1541. // with an empty value appearing in NullFields will be sent to the
  1542. // server as null. It is an error if a field in this list has a
  1543. // non-empty value. This may be used to include null fields in Patch
  1544. // requests.
  1545. NullFields []string `json:"-"`
  1546. }
  1547. func (s *GoogleCloudVideointelligenceV1beta2ObjectTrackingFrame) MarshalJSON() ([]byte, error) {
  1548. type NoMethod GoogleCloudVideointelligenceV1beta2ObjectTrackingFrame
  1549. raw := NoMethod(*s)
  1550. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1551. }
  1552. // GoogleCloudVideointelligenceV1beta2SpeechRecognitionAlternative:
  1553. // Alternative hypotheses (a.k.a. n-best list).
  1554. type GoogleCloudVideointelligenceV1beta2SpeechRecognitionAlternative struct {
  1555. // Confidence: The confidence estimate between 0.0 and 1.0. A higher
  1556. // number
  1557. // indicates an estimated greater likelihood that the recognized words
  1558. // are
  1559. // correct. This field is typically provided only for the top
  1560. // hypothesis, and
  1561. // only for `is_final=true` results. Clients should not rely on
  1562. // the
  1563. // `confidence` field as it is not guaranteed to be accurate or
  1564. // consistent.
  1565. // The default of 0.0 is a sentinel value indicating `confidence` was
  1566. // not set.
  1567. Confidence float64 `json:"confidence,omitempty"`
  1568. // Transcript: Transcript text representing the words that the user
  1569. // spoke.
  1570. Transcript string `json:"transcript,omitempty"`
  1571. // Words: A list of word-specific information for each recognized word.
  1572. Words []*GoogleCloudVideointelligenceV1beta2WordInfo `json:"words,omitempty"`
  1573. // ForceSendFields is a list of field names (e.g. "Confidence") to
  1574. // unconditionally include in API requests. By default, fields with
  1575. // empty values are omitted from API requests. However, any non-pointer,
  1576. // non-interface field appearing in ForceSendFields will be sent to the
  1577. // server regardless of whether the field is empty or not. This may be
  1578. // used to include empty fields in Patch requests.
  1579. ForceSendFields []string `json:"-"`
  1580. // NullFields is a list of field names (e.g. "Confidence") to include in
  1581. // API requests with the JSON null value. By default, fields with empty
  1582. // values are omitted from API requests. However, any field with an
  1583. // empty value appearing in NullFields will be sent to the server as
  1584. // null. It is an error if a field in this list has a non-empty value.
  1585. // This may be used to include null fields in Patch requests.
  1586. NullFields []string `json:"-"`
  1587. }
  1588. func (s *GoogleCloudVideointelligenceV1beta2SpeechRecognitionAlternative) MarshalJSON() ([]byte, error) {
  1589. type NoMethod GoogleCloudVideointelligenceV1beta2SpeechRecognitionAlternative
  1590. raw := NoMethod(*s)
  1591. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1592. }
  1593. func (s *GoogleCloudVideointelligenceV1beta2SpeechRecognitionAlternative) UnmarshalJSON(data []byte) error {
  1594. type NoMethod GoogleCloudVideointelligenceV1beta2SpeechRecognitionAlternative
  1595. var s1 struct {
  1596. Confidence gensupport.JSONFloat64 `json:"confidence"`
  1597. *NoMethod
  1598. }
  1599. s1.NoMethod = (*NoMethod)(s)
  1600. if err := json.Unmarshal(data, &s1); err != nil {
  1601. return err
  1602. }
  1603. s.Confidence = float64(s1.Confidence)
  1604. return nil
  1605. }
  1606. // GoogleCloudVideointelligenceV1beta2SpeechTranscription: A speech
  1607. // recognition result corresponding to a portion of the audio.
  1608. type GoogleCloudVideointelligenceV1beta2SpeechTranscription struct {
  1609. // Alternatives: May contain one or more recognition hypotheses (up to
  1610. // the maximum specified
  1611. // in `max_alternatives`). These alternatives are ordered in terms
  1612. // of
  1613. // accuracy, with the top (first) alternative being the most probable,
  1614. // as
  1615. // ranked by the recognizer.
  1616. Alternatives []*GoogleCloudVideointelligenceV1beta2SpeechRecognitionAlternative `json:"alternatives,omitempty"`
  1617. // LanguageCode: Output only.
  1618. // The
  1619. // [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag
  1620. // of the
  1621. // language in this result. This language code was detected to have the
  1622. // most
  1623. // likelihood of being spoken in the audio.
  1624. LanguageCode string `json:"languageCode,omitempty"`
  1625. // ForceSendFields is a list of field names (e.g. "Alternatives") to
  1626. // unconditionally include in API requests. By default, fields with
  1627. // empty values are omitted from API requests. However, any non-pointer,
  1628. // non-interface field appearing in ForceSendFields will be sent to the
  1629. // server regardless of whether the field is empty or not. This may be
  1630. // used to include empty fields in Patch requests.
  1631. ForceSendFields []string `json:"-"`
  1632. // NullFields is a list of field names (e.g. "Alternatives") to include
  1633. // in API requests with the JSON null value. By default, fields with
  1634. // empty values are omitted from API requests. However, any field with
  1635. // an empty value appearing in NullFields will be sent to the server as
  1636. // null. It is an error if a field in this list has a non-empty value.
  1637. // This may be used to include null fields in Patch requests.
  1638. NullFields []string `json:"-"`
  1639. }
  1640. func (s *GoogleCloudVideointelligenceV1beta2SpeechTranscription) MarshalJSON() ([]byte, error) {
  1641. type NoMethod GoogleCloudVideointelligenceV1beta2SpeechTranscription
  1642. raw := NoMethod(*s)
  1643. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1644. }
  1645. // GoogleCloudVideointelligenceV1beta2TextAnnotation: Annotations
  1646. // related to one detected OCR text snippet. This will contain
  1647. // the
  1648. // corresponding text, confidence value, and frame level information for
  1649. // each
  1650. // detection.
  1651. type GoogleCloudVideointelligenceV1beta2TextAnnotation struct {
  1652. // Segments: All video segments where OCR detected text appears.
  1653. Segments []*GoogleCloudVideointelligenceV1beta2TextSegment `json:"segments,omitempty"`
  1654. // Text: The detected text.
  1655. Text string `json:"text,omitempty"`
  1656. // ForceSendFields is a list of field names (e.g. "Segments") to
  1657. // unconditionally include in API requests. By default, fields with
  1658. // empty values are omitted from API requests. However, any non-pointer,
  1659. // non-interface field appearing in ForceSendFields will be sent to the
  1660. // server regardless of whether the field is empty or not. This may be
  1661. // used to include empty fields in Patch requests.
  1662. ForceSendFields []string `json:"-"`
  1663. // NullFields is a list of field names (e.g. "Segments") to include in
  1664. // API requests with the JSON null value. By default, fields with empty
  1665. // values are omitted from API requests. However, any field with an
  1666. // empty value appearing in NullFields will be sent to the server as
  1667. // null. It is an error if a field in this list has a non-empty value.
  1668. // This may be used to include null fields in Patch requests.
  1669. NullFields []string `json:"-"`
  1670. }
  1671. func (s *GoogleCloudVideointelligenceV1beta2TextAnnotation) MarshalJSON() ([]byte, error) {
  1672. type NoMethod GoogleCloudVideointelligenceV1beta2TextAnnotation
  1673. raw := NoMethod(*s)
  1674. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1675. }
  1676. // GoogleCloudVideointelligenceV1beta2TextFrame: Video frame level
  1677. // annotation results for text annotation (OCR).
  1678. // Contains information regarding timestamp and bounding box locations
  1679. // for the
  1680. // frames containing detected OCR text snippets.
  1681. type GoogleCloudVideointelligenceV1beta2TextFrame struct {
  1682. // RotatedBoundingBox: Bounding polygon of the detected text for this
  1683. // frame.
  1684. RotatedBoundingBox *GoogleCloudVideointelligenceV1beta2NormalizedBoundingPoly `json:"rotatedBoundingBox,omitempty"`
  1685. // TimeOffset: Timestamp of this frame.
  1686. TimeOffset string `json:"timeOffset,omitempty"`
  1687. // ForceSendFields is a list of field names (e.g. "RotatedBoundingBox")
  1688. // to unconditionally include in API requests. By default, fields with
  1689. // empty values are omitted from API requests. However, any non-pointer,
  1690. // non-interface field appearing in ForceSendFields will be sent to the
  1691. // server regardless of whether the field is empty or not. This may be
  1692. // used to include empty fields in Patch requests.
  1693. ForceSendFields []string `json:"-"`
  1694. // NullFields is a list of field names (e.g. "RotatedBoundingBox") to
  1695. // include in API requests with the JSON null value. By default, fields
  1696. // with empty values are omitted from API requests. However, any field
  1697. // with an empty value appearing in NullFields will be sent to the
  1698. // server as null. It is an error if a field in this list has a
  1699. // non-empty value. This may be used to include null fields in Patch
  1700. // requests.
  1701. NullFields []string `json:"-"`
  1702. }
  1703. func (s *GoogleCloudVideointelligenceV1beta2TextFrame) MarshalJSON() ([]byte, error) {
  1704. type NoMethod GoogleCloudVideointelligenceV1beta2TextFrame
  1705. raw := NoMethod(*s)
  1706. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1707. }
  1708. // GoogleCloudVideointelligenceV1beta2TextSegment: Video segment level
  1709. // annotation results for text detection.
  1710. type GoogleCloudVideointelligenceV1beta2TextSegment struct {
  1711. // Confidence: Confidence for the track of detected text. It is
  1712. // calculated as the highest
  1713. // over all frames where OCR detected text appears.
  1714. Confidence float64 `json:"confidence,omitempty"`
  1715. // Frames: Information related to the frames where OCR detected text
  1716. // appears.
  1717. Frames []*GoogleCloudVideointelligenceV1beta2TextFrame `json:"frames,omitempty"`
  1718. // Segment: Video segment where a text snippet was detected.
  1719. Segment *GoogleCloudVideointelligenceV1beta2VideoSegment `json:"segment,omitempty"`
  1720. // ForceSendFields is a list of field names (e.g. "Confidence") to
  1721. // unconditionally include in API requests. By default, fields with
  1722. // empty values are omitted from API requests. However, any non-pointer,
  1723. // non-interface field appearing in ForceSendFields will be sent to the
  1724. // server regardless of whether the field is empty or not. This may be
  1725. // used to include empty fields in Patch requests.
  1726. ForceSendFields []string `json:"-"`
  1727. // NullFields is a list of field names (e.g. "Confidence") to include in
  1728. // API requests with the JSON null value. By default, fields with empty
  1729. // values are omitted from API requests. However, any field with an
  1730. // empty value appearing in NullFields will be sent to the server as
  1731. // null. It is an error if a field in this list has a non-empty value.
  1732. // This may be used to include null fields in Patch requests.
  1733. NullFields []string `json:"-"`
  1734. }
  1735. func (s *GoogleCloudVideointelligenceV1beta2TextSegment) MarshalJSON() ([]byte, error) {
  1736. type NoMethod GoogleCloudVideointelligenceV1beta2TextSegment
  1737. raw := NoMethod(*s)
  1738. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1739. }
  1740. func (s *GoogleCloudVideointelligenceV1beta2TextSegment) UnmarshalJSON(data []byte) error {
  1741. type NoMethod GoogleCloudVideointelligenceV1beta2TextSegment
  1742. var s1 struct {
  1743. Confidence gensupport.JSONFloat64 `json:"confidence"`
  1744. *NoMethod
  1745. }
  1746. s1.NoMethod = (*NoMethod)(s)
  1747. if err := json.Unmarshal(data, &s1); err != nil {
  1748. return err
  1749. }
  1750. s.Confidence = float64(s1.Confidence)
  1751. return nil
  1752. }
  1753. // GoogleCloudVideointelligenceV1beta2VideoAnnotationProgress:
  1754. // Annotation progress for a single video.
  1755. type GoogleCloudVideointelligenceV1beta2VideoAnnotationProgress struct {
  1756. // InputUri: Video file location in
  1757. // [Google Cloud Storage](https://cloud.google.com/storage/).
  1758. InputUri string `json:"inputUri,omitempty"`
  1759. // ProgressPercent: Approximate percentage processed thus far.
  1760. // Guaranteed to be
  1761. // 100 when fully processed.
  1762. ProgressPercent int64 `json:"progressPercent,omitempty"`
  1763. // StartTime: Time when the request was received.
  1764. StartTime string `json:"startTime,omitempty"`
  1765. // UpdateTime: Time of the most recent update.
  1766. UpdateTime string `json:"updateTime,omitempty"`
  1767. // ForceSendFields is a list of field names (e.g. "InputUri") to
  1768. // unconditionally include in API requests. By default, fields with
  1769. // empty values are omitted from API requests. However, any non-pointer,
  1770. // non-interface field appearing in ForceSendFields will be sent to the
  1771. // server regardless of whether the field is empty or not. This may be
  1772. // used to include empty fields in Patch requests.
  1773. ForceSendFields []string `json:"-"`
  1774. // NullFields is a list of field names (e.g. "InputUri") to include in
  1775. // API requests with the JSON null value. By default, fields with empty
  1776. // values are omitted from API requests. However, any field with an
  1777. // empty value appearing in NullFields will be sent to the server as
  1778. // null. It is an error if a field in this list has a non-empty value.
  1779. // This may be used to include null fields in Patch requests.
  1780. NullFields []string `json:"-"`
  1781. }
  1782. func (s *GoogleCloudVideointelligenceV1beta2VideoAnnotationProgress) MarshalJSON() ([]byte, error) {
  1783. type NoMethod GoogleCloudVideointelligenceV1beta2VideoAnnotationProgress
  1784. raw := NoMethod(*s)
  1785. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1786. }
  1787. // GoogleCloudVideointelligenceV1beta2VideoAnnotationResults: Annotation
  1788. // results for a single video.
  1789. type GoogleCloudVideointelligenceV1beta2VideoAnnotationResults struct {
  1790. // Error: If set, indicates an error. Note that for a single
  1791. // `AnnotateVideoRequest`
  1792. // some videos may succeed and some may fail.
  1793. Error *GoogleRpcStatus `json:"error,omitempty"`
  1794. // ExplicitAnnotation: Explicit content annotation.
  1795. ExplicitAnnotation *GoogleCloudVideointelligenceV1beta2ExplicitContentAnnotation `json:"explicitAnnotation,omitempty"`
  1796. // FrameLabelAnnotations: Label annotations on frame level.
  1797. // There is exactly one element for each unique label.
  1798. FrameLabelAnnotations []*GoogleCloudVideointelligenceV1beta2LabelAnnotation `json:"frameLabelAnnotations,omitempty"`
  1799. // InputUri: Video file location in
  1800. // [Google Cloud Storage](https://cloud.google.com/storage/).
  1801. InputUri string `json:"inputUri,omitempty"`
  1802. // ObjectAnnotations: Annotations for list of objects detected and
  1803. // tracked in video.
  1804. ObjectAnnotations []*GoogleCloudVideointelligenceV1beta2ObjectTrackingAnnotation `json:"objectAnnotations,omitempty"`
  1805. // SegmentLabelAnnotations: Label annotations on video level or user
  1806. // specified segment level.
  1807. // There is exactly one element for each unique label.
  1808. SegmentLabelAnnotations []*GoogleCloudVideointelligenceV1beta2LabelAnnotation `json:"segmentLabelAnnotations,omitempty"`
  1809. // ShotAnnotations: Shot annotations. Each shot is represented as a
  1810. // video segment.
  1811. ShotAnnotations []*GoogleCloudVideointelligenceV1beta2VideoSegment `json:"shotAnnotations,omitempty"`
  1812. // ShotLabelAnnotations: Label annotations on shot level.
  1813. // There is exactly one element for each unique label.
  1814. ShotLabelAnnotations []*GoogleCloudVideointelligenceV1beta2LabelAnnotation `json:"shotLabelAnnotations,omitempty"`
  1815. // SpeechTranscriptions: Speech transcription.
  1816. SpeechTranscriptions []*GoogleCloudVideointelligenceV1beta2SpeechTranscription `json:"speechTranscriptions,omitempty"`
  1817. // TextAnnotations: OCR text detection and tracking.
  1818. // Annotations for list of detected text snippets. Each will have list
  1819. // of
  1820. // frame information associated with it.
  1821. TextAnnotations []*GoogleCloudVideointelligenceV1beta2TextAnnotation `json:"textAnnotations,omitempty"`
  1822. // ForceSendFields is a list of field names (e.g. "Error") to
  1823. // unconditionally include in API requests. By default, fields with
  1824. // empty values are omitted from API requests. However, any non-pointer,
  1825. // non-interface field appearing in ForceSendFields will be sent to the
  1826. // server regardless of whether the field is empty or not. This may be
  1827. // used to include empty fields in Patch requests.
  1828. ForceSendFields []string `json:"-"`
  1829. // NullFields is a list of field names (e.g. "Error") to include in API
  1830. // requests with the JSON null value. By default, fields with empty
  1831. // values are omitted from API requests. However, any field with an
  1832. // empty value appearing in NullFields will be sent to the server as
  1833. // null. It is an error if a field in this list has a non-empty value.
  1834. // This may be used to include null fields in Patch requests.
  1835. NullFields []string `json:"-"`
  1836. }
  1837. func (s *GoogleCloudVideointelligenceV1beta2VideoAnnotationResults) MarshalJSON() ([]byte, error) {
  1838. type NoMethod GoogleCloudVideointelligenceV1beta2VideoAnnotationResults
  1839. raw := NoMethod(*s)
  1840. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1841. }
  1842. // GoogleCloudVideointelligenceV1beta2VideoSegment: Video segment.
  1843. type GoogleCloudVideointelligenceV1beta2VideoSegment struct {
  1844. // EndTimeOffset: Time-offset, relative to the beginning of the
  1845. // video,
  1846. // corresponding to the end of the segment (inclusive).
  1847. EndTimeOffset string `json:"endTimeOffset,omitempty"`
  1848. // StartTimeOffset: Time-offset, relative to the beginning of the
  1849. // video,
  1850. // corresponding to the start of the segment (inclusive).
  1851. StartTimeOffset string `json:"startTimeOffset,omitempty"`
  1852. // ForceSendFields is a list of field names (e.g. "EndTimeOffset") to
  1853. // unconditionally include in API requests. By default, fields with
  1854. // empty values are omitted from API requests. However, any non-pointer,
  1855. // non-interface field appearing in ForceSendFields will be sent to the
  1856. // server regardless of whether the field is empty or not. This may be
  1857. // used to include empty fields in Patch requests.
  1858. ForceSendFields []string `json:"-"`
  1859. // NullFields is a list of field names (e.g. "EndTimeOffset") to include
  1860. // in API requests with the JSON null value. By default, fields with
  1861. // empty values are omitted from API requests. However, any field with
  1862. // an empty value appearing in NullFields will be sent to the server as
  1863. // null. It is an error if a field in this list has a non-empty value.
  1864. // This may be used to include null fields in Patch requests.
  1865. NullFields []string `json:"-"`
  1866. }
  1867. func (s *GoogleCloudVideointelligenceV1beta2VideoSegment) MarshalJSON() ([]byte, error) {
  1868. type NoMethod GoogleCloudVideointelligenceV1beta2VideoSegment
  1869. raw := NoMethod(*s)
  1870. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1871. }
  1872. // GoogleCloudVideointelligenceV1beta2WordInfo: Word-specific
  1873. // information for recognized words. Word information is only
  1874. // included in the response when certain request parameters are set,
  1875. // such
  1876. // as `enable_word_time_offsets`.
  1877. type GoogleCloudVideointelligenceV1beta2WordInfo struct {
  1878. // Confidence: Output only. The confidence estimate between 0.0 and 1.0.
  1879. // A higher number
  1880. // indicates an estimated greater likelihood that the recognized words
  1881. // are
  1882. // correct. This field is set only for the top alternative.
  1883. // This field is not guaranteed to be accurate and users should not rely
  1884. // on it
  1885. // to be always provided.
  1886. // The default of 0.0 is a sentinel value indicating `confidence` was
  1887. // not set.
  1888. Confidence float64 `json:"confidence,omitempty"`
  1889. // EndTime: Time offset relative to the beginning of the audio,
  1890. // and
  1891. // corresponding to the end of the spoken word. This field is only set
  1892. // if
  1893. // `enable_word_time_offsets=true` and only in the top hypothesis. This
  1894. // is an
  1895. // experimental feature and the accuracy of the time offset can vary.
  1896. EndTime string `json:"endTime,omitempty"`
  1897. // SpeakerTag: Output only. A distinct integer value is assigned for
  1898. // every speaker within
  1899. // the audio. This field specifies which one of those speakers was
  1900. // detected to
  1901. // have spoken this word. Value ranges from 1 up to
  1902. // diarization_speaker_count,
  1903. // and is only set if speaker diarization is enabled.
  1904. SpeakerTag int64 `json:"speakerTag,omitempty"`
  1905. // StartTime: Time offset relative to the beginning of the audio,
  1906. // and
  1907. // corresponding to the start of the spoken word. This field is only set
  1908. // if
  1909. // `enable_word_time_offsets=true` and only in the top hypothesis. This
  1910. // is an
  1911. // experimental feature and the accuracy of the time offset can vary.
  1912. StartTime string `json:"startTime,omitempty"`
  1913. // Word: The word corresponding to this set of information.
  1914. Word string `json:"word,omitempty"`
  1915. // ForceSendFields is a list of field names (e.g. "Confidence") to
  1916. // unconditionally include in API requests. By default, fields with
  1917. // empty values are omitted from API requests. However, any non-pointer,
  1918. // non-interface field appearing in ForceSendFields will be sent to the
  1919. // server regardless of whether the field is empty or not. This may be
  1920. // used to include empty fields in Patch requests.
  1921. ForceSendFields []string `json:"-"`
  1922. // NullFields is a list of field names (e.g. "Confidence") to include in
  1923. // API requests with the JSON null value. By default, fields with empty
  1924. // values are omitted from API requests. However, any field with an
  1925. // empty value appearing in NullFields will be sent to the server as
  1926. // null. It is an error if a field in this list has a non-empty value.
  1927. // This may be used to include null fields in Patch requests.
  1928. NullFields []string `json:"-"`
  1929. }
  1930. func (s *GoogleCloudVideointelligenceV1beta2WordInfo) MarshalJSON() ([]byte, error) {
  1931. type NoMethod GoogleCloudVideointelligenceV1beta2WordInfo
  1932. raw := NoMethod(*s)
  1933. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1934. }
  1935. func (s *GoogleCloudVideointelligenceV1beta2WordInfo) UnmarshalJSON(data []byte) error {
  1936. type NoMethod GoogleCloudVideointelligenceV1beta2WordInfo
  1937. var s1 struct {
  1938. Confidence gensupport.JSONFloat64 `json:"confidence"`
  1939. *NoMethod
  1940. }
  1941. s1.NoMethod = (*NoMethod)(s)
  1942. if err := json.Unmarshal(data, &s1); err != nil {
  1943. return err
  1944. }
  1945. s.Confidence = float64(s1.Confidence)
  1946. return nil
  1947. }
  1948. // GoogleCloudVideointelligenceV1p1beta1AnnotateVideoProgress: Video
  1949. // annotation progress. Included in the `metadata`
  1950. // field of the `Operation` returned by the `GetOperation`
  1951. // call of the `google::longrunning::Operations` service.
  1952. type GoogleCloudVideointelligenceV1p1beta1AnnotateVideoProgress struct {
  1953. // AnnotationProgress: Progress metadata for all videos specified in
  1954. // `AnnotateVideoRequest`.
  1955. AnnotationProgress []*GoogleCloudVideointelligenceV1p1beta1VideoAnnotationProgress `json:"annotationProgress,omitempty"`
  1956. // ForceSendFields is a list of field names (e.g. "AnnotationProgress")
  1957. // to unconditionally include in API requests. By default, fields with
  1958. // empty values are omitted from API requests. However, any non-pointer,
  1959. // non-interface field appearing in ForceSendFields will be sent to the
  1960. // server regardless of whether the field is empty or not. This may be
  1961. // used to include empty fields in Patch requests.
  1962. ForceSendFields []string `json:"-"`
  1963. // NullFields is a list of field names (e.g. "AnnotationProgress") to
  1964. // include in API requests with the JSON null value. By default, fields
  1965. // with empty values are omitted from API requests. However, any field
  1966. // with an empty value appearing in NullFields will be sent to the
  1967. // server as null. It is an error if a field in this list has a
  1968. // non-empty value. This may be used to include null fields in Patch
  1969. // requests.
  1970. NullFields []string `json:"-"`
  1971. }
  1972. func (s *GoogleCloudVideointelligenceV1p1beta1AnnotateVideoProgress) MarshalJSON() ([]byte, error) {
  1973. type NoMethod GoogleCloudVideointelligenceV1p1beta1AnnotateVideoProgress
  1974. raw := NoMethod(*s)
  1975. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1976. }
  1977. // GoogleCloudVideointelligenceV1p1beta1AnnotateVideoResponse: Video
  1978. // annotation response. Included in the `response`
  1979. // field of the `Operation` returned by the `GetOperation`
  1980. // call of the `google::longrunning::Operations` service.
  1981. type GoogleCloudVideointelligenceV1p1beta1AnnotateVideoResponse struct {
  1982. // AnnotationResults: Annotation results for all videos specified in
  1983. // `AnnotateVideoRequest`.
  1984. AnnotationResults []*GoogleCloudVideointelligenceV1p1beta1VideoAnnotationResults `json:"annotationResults,omitempty"`
  1985. // ForceSendFields is a list of field names (e.g. "AnnotationResults")
  1986. // to unconditionally include in API requests. By default, fields with
  1987. // empty values are omitted from API requests. However, any non-pointer,
  1988. // non-interface field appearing in ForceSendFields will be sent to the
  1989. // server regardless of whether the field is empty or not. This may be
  1990. // used to include empty fields in Patch requests.
  1991. ForceSendFields []string `json:"-"`
  1992. // NullFields is a list of field names (e.g. "AnnotationResults") to
  1993. // include in API requests with the JSON null value. By default, fields
  1994. // with empty values are omitted from API requests. However, any field
  1995. // with an empty value appearing in NullFields will be sent to the
  1996. // server as null. It is an error if a field in this list has a
  1997. // non-empty value. This may be used to include null fields in Patch
  1998. // requests.
  1999. NullFields []string `json:"-"`
  2000. }
  2001. func (s *GoogleCloudVideointelligenceV1p1beta1AnnotateVideoResponse) MarshalJSON() ([]byte, error) {
  2002. type NoMethod GoogleCloudVideointelligenceV1p1beta1AnnotateVideoResponse
  2003. raw := NoMethod(*s)
  2004. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2005. }
  2006. // GoogleCloudVideointelligenceV1p1beta1Entity: Detected entity from
  2007. // video analysis.
  2008. type GoogleCloudVideointelligenceV1p1beta1Entity struct {
  2009. // Description: Textual description, e.g. `Fixed-gear bicycle`.
  2010. Description string `json:"description,omitempty"`
  2011. // EntityId: Opaque entity ID. Some IDs may be available in
  2012. // [Google Knowledge Graph
  2013. // Search
  2014. // API](https://developers.google.com/knowledge-graph/).
  2015. EntityId string `json:"entityId,omitempty"`
  2016. // LanguageCode: Language code for `description` in BCP-47 format.
  2017. LanguageCode string `json:"languageCode,omitempty"`
  2018. // ForceSendFields is a list of field names (e.g. "Description") to
  2019. // unconditionally include in API requests. By default, fields with
  2020. // empty values are omitted from API requests. However, any non-pointer,
  2021. // non-interface field appearing in ForceSendFields will be sent to the
  2022. // server regardless of whether the field is empty or not. This may be
  2023. // used to include empty fields in Patch requests.
  2024. ForceSendFields []string `json:"-"`
  2025. // NullFields is a list of field names (e.g. "Description") to include
  2026. // in API requests with the JSON null value. By default, fields with
  2027. // empty values are omitted from API requests. However, any field with
  2028. // an empty value appearing in NullFields will be sent to the server as
  2029. // null. It is an error if a field in this list has a non-empty value.
  2030. // This may be used to include null fields in Patch requests.
  2031. NullFields []string `json:"-"`
  2032. }
  2033. func (s *GoogleCloudVideointelligenceV1p1beta1Entity) MarshalJSON() ([]byte, error) {
  2034. type NoMethod GoogleCloudVideointelligenceV1p1beta1Entity
  2035. raw := NoMethod(*s)
  2036. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2037. }
  2038. // GoogleCloudVideointelligenceV1p1beta1ExplicitContentAnnotation:
  2039. // Explicit content annotation (based on per-frame visual signals
  2040. // only).
  2041. // If no explicit content has been detected in a frame, no annotations
  2042. // are
  2043. // present for that frame.
  2044. type GoogleCloudVideointelligenceV1p1beta1ExplicitContentAnnotation struct {
  2045. // Frames: All video frames where explicit content was detected.
  2046. Frames []*GoogleCloudVideointelligenceV1p1beta1ExplicitContentFrame `json:"frames,omitempty"`
  2047. // ForceSendFields is a list of field names (e.g. "Frames") to
  2048. // unconditionally include in API requests. By default, fields with
  2049. // empty values are omitted from API requests. However, any non-pointer,
  2050. // non-interface field appearing in ForceSendFields will be sent to the
  2051. // server regardless of whether the field is empty or not. This may be
  2052. // used to include empty fields in Patch requests.
  2053. ForceSendFields []string `json:"-"`
  2054. // NullFields is a list of field names (e.g. "Frames") to include in API
  2055. // requests with the JSON null value. By default, fields with empty
  2056. // values are omitted from API requests. However, any field with an
  2057. // empty value appearing in NullFields will be sent to the server as
  2058. // null. It is an error if a field in this list has a non-empty value.
  2059. // This may be used to include null fields in Patch requests.
  2060. NullFields []string `json:"-"`
  2061. }
  2062. func (s *GoogleCloudVideointelligenceV1p1beta1ExplicitContentAnnotation) MarshalJSON() ([]byte, error) {
  2063. type NoMethod GoogleCloudVideointelligenceV1p1beta1ExplicitContentAnnotation
  2064. raw := NoMethod(*s)
  2065. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2066. }
  2067. // GoogleCloudVideointelligenceV1p1beta1ExplicitContentFrame: Video
  2068. // frame level annotation results for explicit content.
  2069. type GoogleCloudVideointelligenceV1p1beta1ExplicitContentFrame struct {
  2070. // PornographyLikelihood: Likelihood of the pornography content..
  2071. //
  2072. // Possible values:
  2073. // "LIKELIHOOD_UNSPECIFIED" - Unspecified likelihood.
  2074. // "VERY_UNLIKELY" - Very unlikely.
  2075. // "UNLIKELY" - Unlikely.
  2076. // "POSSIBLE" - Possible.
  2077. // "LIKELY" - Likely.
  2078. // "VERY_LIKELY" - Very likely.
  2079. PornographyLikelihood string `json:"pornographyLikelihood,omitempty"`
  2080. // TimeOffset: Time-offset, relative to the beginning of the video,
  2081. // corresponding to the
  2082. // video frame for this location.
  2083. TimeOffset string `json:"timeOffset,omitempty"`
  2084. // ForceSendFields is a list of field names (e.g.
  2085. // "PornographyLikelihood") to unconditionally include in API requests.
  2086. // By default, fields with empty values are omitted from API requests.
  2087. // However, any non-pointer, non-interface field appearing in
  2088. // ForceSendFields will be sent to the server regardless of whether the
  2089. // field is empty or not. This may be used to include empty fields in
  2090. // Patch requests.
  2091. ForceSendFields []string `json:"-"`
  2092. // NullFields is a list of field names (e.g. "PornographyLikelihood") to
  2093. // include in API requests with the JSON null value. By default, fields
  2094. // with empty values are omitted from API requests. However, any field
  2095. // with an empty value appearing in NullFields will be sent to the
  2096. // server as null. It is an error if a field in this list has a
  2097. // non-empty value. This may be used to include null fields in Patch
  2098. // requests.
  2099. NullFields []string `json:"-"`
  2100. }
  2101. func (s *GoogleCloudVideointelligenceV1p1beta1ExplicitContentFrame) MarshalJSON() ([]byte, error) {
  2102. type NoMethod GoogleCloudVideointelligenceV1p1beta1ExplicitContentFrame
  2103. raw := NoMethod(*s)
  2104. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2105. }
  2106. // GoogleCloudVideointelligenceV1p1beta1LabelAnnotation: Label
  2107. // annotation.
  2108. type GoogleCloudVideointelligenceV1p1beta1LabelAnnotation struct {
  2109. // CategoryEntities: Common categories for the detected entity.
  2110. // E.g. when the label is `Terrier` the category is likely `dog`. And in
  2111. // some
  2112. // cases there might be more than one categories e.g. `Terrier` could
  2113. // also be
  2114. // a `pet`.
  2115. CategoryEntities []*GoogleCloudVideointelligenceV1p1beta1Entity `json:"categoryEntities,omitempty"`
  2116. // Entity: Detected entity.
  2117. Entity *GoogleCloudVideointelligenceV1p1beta1Entity `json:"entity,omitempty"`
  2118. // Frames: All video frames where a label was detected.
  2119. Frames []*GoogleCloudVideointelligenceV1p1beta1LabelFrame `json:"frames,omitempty"`
  2120. // Segments: All video segments where a label was detected.
  2121. Segments []*GoogleCloudVideointelligenceV1p1beta1LabelSegment `json:"segments,omitempty"`
  2122. // ForceSendFields is a list of field names (e.g. "CategoryEntities") to
  2123. // unconditionally include in API requests. By default, fields with
  2124. // empty values are omitted from API requests. However, any non-pointer,
  2125. // non-interface field appearing in ForceSendFields will be sent to the
  2126. // server regardless of whether the field is empty or not. This may be
  2127. // used to include empty fields in Patch requests.
  2128. ForceSendFields []string `json:"-"`
  2129. // NullFields is a list of field names (e.g. "CategoryEntities") to
  2130. // include in API requests with the JSON null value. By default, fields
  2131. // with empty values are omitted from API requests. However, any field
  2132. // with an empty value appearing in NullFields will be sent to the
  2133. // server as null. It is an error if a field in this list has a
  2134. // non-empty value. This may be used to include null fields in Patch
  2135. // requests.
  2136. NullFields []string `json:"-"`
  2137. }
  2138. func (s *GoogleCloudVideointelligenceV1p1beta1LabelAnnotation) MarshalJSON() ([]byte, error) {
  2139. type NoMethod GoogleCloudVideointelligenceV1p1beta1LabelAnnotation
  2140. raw := NoMethod(*s)
  2141. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2142. }
  2143. // GoogleCloudVideointelligenceV1p1beta1LabelFrame: Video frame level
  2144. // annotation results for label detection.
  2145. type GoogleCloudVideointelligenceV1p1beta1LabelFrame struct {
  2146. // Confidence: Confidence that the label is accurate. Range: [0, 1].
  2147. Confidence float64 `json:"confidence,omitempty"`
  2148. // TimeOffset: Time-offset, relative to the beginning of the video,
  2149. // corresponding to the
  2150. // video frame for this location.
  2151. TimeOffset string `json:"timeOffset,omitempty"`
  2152. // ForceSendFields is a list of field names (e.g. "Confidence") to
  2153. // unconditionally include in API requests. By default, fields with
  2154. // empty values are omitted from API requests. However, any non-pointer,
  2155. // non-interface field appearing in ForceSendFields will be sent to the
  2156. // server regardless of whether the field is empty or not. This may be
  2157. // used to include empty fields in Patch requests.
  2158. ForceSendFields []string `json:"-"`
  2159. // NullFields is a list of field names (e.g. "Confidence") to include in
  2160. // API requests with the JSON null value. By default, fields with empty
  2161. // values are omitted from API requests. However, any field with an
  2162. // empty value appearing in NullFields will be sent to the server as
  2163. // null. It is an error if a field in this list has a non-empty value.
  2164. // This may be used to include null fields in Patch requests.
  2165. NullFields []string `json:"-"`
  2166. }
  2167. func (s *GoogleCloudVideointelligenceV1p1beta1LabelFrame) MarshalJSON() ([]byte, error) {
  2168. type NoMethod GoogleCloudVideointelligenceV1p1beta1LabelFrame
  2169. raw := NoMethod(*s)
  2170. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2171. }
  2172. func (s *GoogleCloudVideointelligenceV1p1beta1LabelFrame) UnmarshalJSON(data []byte) error {
  2173. type NoMethod GoogleCloudVideointelligenceV1p1beta1LabelFrame
  2174. var s1 struct {
  2175. Confidence gensupport.JSONFloat64 `json:"confidence"`
  2176. *NoMethod
  2177. }
  2178. s1.NoMethod = (*NoMethod)(s)
  2179. if err := json.Unmarshal(data, &s1); err != nil {
  2180. return err
  2181. }
  2182. s.Confidence = float64(s1.Confidence)
  2183. return nil
  2184. }
  2185. // GoogleCloudVideointelligenceV1p1beta1LabelSegment: Video segment
  2186. // level annotation results for label detection.
  2187. type GoogleCloudVideointelligenceV1p1beta1LabelSegment struct {
  2188. // Confidence: Confidence that the label is accurate. Range: [0, 1].
  2189. Confidence float64 `json:"confidence,omitempty"`
  2190. // Segment: Video segment where a label was detected.
  2191. Segment *GoogleCloudVideointelligenceV1p1beta1VideoSegment `json:"segment,omitempty"`
  2192. // ForceSendFields is a list of field names (e.g. "Confidence") to
  2193. // unconditionally include in API requests. By default, fields with
  2194. // empty values are omitted from API requests. However, any non-pointer,
  2195. // non-interface field appearing in ForceSendFields will be sent to the
  2196. // server regardless of whether the field is empty or not. This may be
  2197. // used to include empty fields in Patch requests.
  2198. ForceSendFields []string `json:"-"`
  2199. // NullFields is a list of field names (e.g. "Confidence") to include in
  2200. // API requests with the JSON null value. By default, fields with empty
  2201. // values are omitted from API requests. However, any field with an
  2202. // empty value appearing in NullFields will be sent to the server as
  2203. // null. It is an error if a field in this list has a non-empty value.
  2204. // This may be used to include null fields in Patch requests.
  2205. NullFields []string `json:"-"`
  2206. }
  2207. func (s *GoogleCloudVideointelligenceV1p1beta1LabelSegment) MarshalJSON() ([]byte, error) {
  2208. type NoMethod GoogleCloudVideointelligenceV1p1beta1LabelSegment
  2209. raw := NoMethod(*s)
  2210. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2211. }
  2212. func (s *GoogleCloudVideointelligenceV1p1beta1LabelSegment) UnmarshalJSON(data []byte) error {
  2213. type NoMethod GoogleCloudVideointelligenceV1p1beta1LabelSegment
  2214. var s1 struct {
  2215. Confidence gensupport.JSONFloat64 `json:"confidence"`
  2216. *NoMethod
  2217. }
  2218. s1.NoMethod = (*NoMethod)(s)
  2219. if err := json.Unmarshal(data, &s1); err != nil {
  2220. return err
  2221. }
  2222. s.Confidence = float64(s1.Confidence)
  2223. return nil
  2224. }
  2225. // GoogleCloudVideointelligenceV1p1beta1NormalizedBoundingBox:
  2226. // Normalized bounding box.
  2227. // The normalized vertex coordinates are relative to the original
  2228. // image.
  2229. // Range: [0, 1].
  2230. type GoogleCloudVideointelligenceV1p1beta1NormalizedBoundingBox struct {
  2231. // Bottom: Bottom Y coordinate.
  2232. Bottom float64 `json:"bottom,omitempty"`
  2233. // Left: Left X coordinate.
  2234. Left float64 `json:"left,omitempty"`
  2235. // Right: Right X coordinate.
  2236. Right float64 `json:"right,omitempty"`
  2237. // Top: Top Y coordinate.
  2238. Top float64 `json:"top,omitempty"`
  2239. // ForceSendFields is a list of field names (e.g. "Bottom") to
  2240. // unconditionally include in API requests. By default, fields with
  2241. // empty values are omitted from API requests. However, any non-pointer,
  2242. // non-interface field appearing in ForceSendFields will be sent to the
  2243. // server regardless of whether the field is empty or not. This may be
  2244. // used to include empty fields in Patch requests.
  2245. ForceSendFields []string `json:"-"`
  2246. // NullFields is a list of field names (e.g. "Bottom") to include in API
  2247. // requests with the JSON null value. By default, fields with empty
  2248. // values are omitted from API requests. However, any field with an
  2249. // empty value appearing in NullFields will be sent to the server as
  2250. // null. It is an error if a field in this list has a non-empty value.
  2251. // This may be used to include null fields in Patch requests.
  2252. NullFields []string `json:"-"`
  2253. }
  2254. func (s *GoogleCloudVideointelligenceV1p1beta1NormalizedBoundingBox) MarshalJSON() ([]byte, error) {
  2255. type NoMethod GoogleCloudVideointelligenceV1p1beta1NormalizedBoundingBox
  2256. raw := NoMethod(*s)
  2257. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2258. }
  2259. func (s *GoogleCloudVideointelligenceV1p1beta1NormalizedBoundingBox) UnmarshalJSON(data []byte) error {
  2260. type NoMethod GoogleCloudVideointelligenceV1p1beta1NormalizedBoundingBox
  2261. var s1 struct {
  2262. Bottom gensupport.JSONFloat64 `json:"bottom"`
  2263. Left gensupport.JSONFloat64 `json:"left"`
  2264. Right gensupport.JSONFloat64 `json:"right"`
  2265. Top gensupport.JSONFloat64 `json:"top"`
  2266. *NoMethod
  2267. }
  2268. s1.NoMethod = (*NoMethod)(s)
  2269. if err := json.Unmarshal(data, &s1); err != nil {
  2270. return err
  2271. }
  2272. s.Bottom = float64(s1.Bottom)
  2273. s.Left = float64(s1.Left)
  2274. s.Right = float64(s1.Right)
  2275. s.Top = float64(s1.Top)
  2276. return nil
  2277. }
  2278. // GoogleCloudVideointelligenceV1p1beta1NormalizedBoundingPoly:
  2279. // Normalized bounding polygon for text (that might not be aligned with
  2280. // axis).
  2281. // Contains list of the corner points in clockwise order starting
  2282. // from
  2283. // top-left corner. For example, for a rectangular bounding box:
  2284. // When the text is horizontal it might look like:
  2285. // 0----1
  2286. // | |
  2287. // 3----2
  2288. //
  2289. // When it's clockwise rotated 180 degrees around the top-left corner
  2290. // it
  2291. // becomes:
  2292. // 2----3
  2293. // | |
  2294. // 1----0
  2295. //
  2296. // and the vertex order will still be (0, 1, 2, 3). Note that values can
  2297. // be less
  2298. // than 0, or greater than 1 due to trignometric calculations for
  2299. // location of
  2300. // the box.
  2301. type GoogleCloudVideointelligenceV1p1beta1NormalizedBoundingPoly struct {
  2302. // Vertices: Normalized vertices of the bounding polygon.
  2303. Vertices []*GoogleCloudVideointelligenceV1p1beta1NormalizedVertex `json:"vertices,omitempty"`
  2304. // ForceSendFields is a list of field names (e.g. "Vertices") to
  2305. // unconditionally include in API requests. By default, fields with
  2306. // empty values are omitted from API requests. However, any non-pointer,
  2307. // non-interface field appearing in ForceSendFields will be sent to the
  2308. // server regardless of whether the field is empty or not. This may be
  2309. // used to include empty fields in Patch requests.
  2310. ForceSendFields []string `json:"-"`
  2311. // NullFields is a list of field names (e.g. "Vertices") to include in
  2312. // API requests with the JSON null value. By default, fields with empty
  2313. // values are omitted from API requests. However, any field with an
  2314. // empty value appearing in NullFields will be sent to the server as
  2315. // null. It is an error if a field in this list has a non-empty value.
  2316. // This may be used to include null fields in Patch requests.
  2317. NullFields []string `json:"-"`
  2318. }
  2319. func (s *GoogleCloudVideointelligenceV1p1beta1NormalizedBoundingPoly) MarshalJSON() ([]byte, error) {
  2320. type NoMethod GoogleCloudVideointelligenceV1p1beta1NormalizedBoundingPoly
  2321. raw := NoMethod(*s)
  2322. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2323. }
  2324. // GoogleCloudVideointelligenceV1p1beta1NormalizedVertex: A vertex
  2325. // represents a 2D point in the image.
  2326. // NOTE: the normalized vertex coordinates are relative to the original
  2327. // image
  2328. // and range from 0 to 1.
  2329. type GoogleCloudVideointelligenceV1p1beta1NormalizedVertex struct {
  2330. // X: X coordinate.
  2331. X float64 `json:"x,omitempty"`
  2332. // Y: Y coordinate.
  2333. Y float64 `json:"y,omitempty"`
  2334. // ForceSendFields is a list of field names (e.g. "X") to
  2335. // unconditionally include in API requests. By default, fields with
  2336. // empty values are omitted from API requests. However, any non-pointer,
  2337. // non-interface field appearing in ForceSendFields will be sent to the
  2338. // server regardless of whether the field is empty or not. This may be
  2339. // used to include empty fields in Patch requests.
  2340. ForceSendFields []string `json:"-"`
  2341. // NullFields is a list of field names (e.g. "X") to include in API
  2342. // requests with the JSON null value. By default, fields with empty
  2343. // values are omitted from API requests. However, any field with an
  2344. // empty value appearing in NullFields will be sent to the server as
  2345. // null. It is an error if a field in this list has a non-empty value.
  2346. // This may be used to include null fields in Patch requests.
  2347. NullFields []string `json:"-"`
  2348. }
  2349. func (s *GoogleCloudVideointelligenceV1p1beta1NormalizedVertex) MarshalJSON() ([]byte, error) {
  2350. type NoMethod GoogleCloudVideointelligenceV1p1beta1NormalizedVertex
  2351. raw := NoMethod(*s)
  2352. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2353. }
  2354. func (s *GoogleCloudVideointelligenceV1p1beta1NormalizedVertex) UnmarshalJSON(data []byte) error {
  2355. type NoMethod GoogleCloudVideointelligenceV1p1beta1NormalizedVertex
  2356. var s1 struct {
  2357. X gensupport.JSONFloat64 `json:"x"`
  2358. Y gensupport.JSONFloat64 `json:"y"`
  2359. *NoMethod
  2360. }
  2361. s1.NoMethod = (*NoMethod)(s)
  2362. if err := json.Unmarshal(data, &s1); err != nil {
  2363. return err
  2364. }
  2365. s.X = float64(s1.X)
  2366. s.Y = float64(s1.Y)
  2367. return nil
  2368. }
  2369. // GoogleCloudVideointelligenceV1p1beta1ObjectTrackingAnnotation:
  2370. // Annotations corresponding to one tracked object.
  2371. type GoogleCloudVideointelligenceV1p1beta1ObjectTrackingAnnotation struct {
  2372. // Confidence: Object category's labeling confidence of this track.
  2373. Confidence float64 `json:"confidence,omitempty"`
  2374. // Entity: Entity to specify the object category that this track is
  2375. // labeled as.
  2376. Entity *GoogleCloudVideointelligenceV1p1beta1Entity `json:"entity,omitempty"`
  2377. // Frames: Information corresponding to all frames where this object
  2378. // track appears.
  2379. // Non-streaming batch mode: it may be one or multiple
  2380. // ObjectTrackingFrame
  2381. // messages in frames.
  2382. // Streaming mode: it can only be one ObjectTrackingFrame message in
  2383. // frames.
  2384. Frames []*GoogleCloudVideointelligenceV1p1beta1ObjectTrackingFrame `json:"frames,omitempty"`
  2385. // Segment: Non-streaming batch mode ONLY.
  2386. // Each object track corresponds to one video segment where it appears.
  2387. Segment *GoogleCloudVideointelligenceV1p1beta1VideoSegment `json:"segment,omitempty"`
  2388. // TrackId: Streaming mode ONLY.
  2389. // In streaming mode, we do not know the end time of a tracked
  2390. // object
  2391. // before it is completed. Hence, there is no VideoSegment info
  2392. // returned.
  2393. // Instead, we provide a unique identifiable integer track_id so
  2394. // that
  2395. // the customers can correlate the results of the
  2396. // ongoing
  2397. // ObjectTrackAnnotation of the same track_id over time.
  2398. TrackId int64 `json:"trackId,omitempty,string"`
  2399. // ForceSendFields is a list of field names (e.g. "Confidence") to
  2400. // unconditionally include in API requests. By default, fields with
  2401. // empty values are omitted from API requests. However, any non-pointer,
  2402. // non-interface field appearing in ForceSendFields will be sent to the
  2403. // server regardless of whether the field is empty or not. This may be
  2404. // used to include empty fields in Patch requests.
  2405. ForceSendFields []string `json:"-"`
  2406. // NullFields is a list of field names (e.g. "Confidence") to include in
  2407. // API requests with the JSON null value. By default, fields with empty
  2408. // values are omitted from API requests. However, any field with an
  2409. // empty value appearing in NullFields will be sent to the server as
  2410. // null. It is an error if a field in this list has a non-empty value.
  2411. // This may be used to include null fields in Patch requests.
  2412. NullFields []string `json:"-"`
  2413. }
  2414. func (s *GoogleCloudVideointelligenceV1p1beta1ObjectTrackingAnnotation) MarshalJSON() ([]byte, error) {
  2415. type NoMethod GoogleCloudVideointelligenceV1p1beta1ObjectTrackingAnnotation
  2416. raw := NoMethod(*s)
  2417. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2418. }
  2419. func (s *GoogleCloudVideointelligenceV1p1beta1ObjectTrackingAnnotation) UnmarshalJSON(data []byte) error {
  2420. type NoMethod GoogleCloudVideointelligenceV1p1beta1ObjectTrackingAnnotation
  2421. var s1 struct {
  2422. Confidence gensupport.JSONFloat64 `json:"confidence"`
  2423. *NoMethod
  2424. }
  2425. s1.NoMethod = (*NoMethod)(s)
  2426. if err := json.Unmarshal(data, &s1); err != nil {
  2427. return err
  2428. }
  2429. s.Confidence = float64(s1.Confidence)
  2430. return nil
  2431. }
  2432. // GoogleCloudVideointelligenceV1p1beta1ObjectTrackingFrame: Video frame
  2433. // level annotations for object detection and tracking. This
  2434. // field
  2435. // stores per frame location, time offset, and confidence.
  2436. type GoogleCloudVideointelligenceV1p1beta1ObjectTrackingFrame struct {
  2437. // NormalizedBoundingBox: The normalized bounding box location of this
  2438. // object track for the frame.
  2439. NormalizedBoundingBox *GoogleCloudVideointelligenceV1p1beta1NormalizedBoundingBox `json:"normalizedBoundingBox,omitempty"`
  2440. // TimeOffset: The timestamp of the frame in microseconds.
  2441. TimeOffset string `json:"timeOffset,omitempty"`
  2442. // ForceSendFields is a list of field names (e.g.
  2443. // "NormalizedBoundingBox") to unconditionally include in API requests.
  2444. // By default, fields with empty values are omitted from API requests.
  2445. // However, any non-pointer, non-interface field appearing in
  2446. // ForceSendFields will be sent to the server regardless of whether the
  2447. // field is empty or not. This may be used to include empty fields in
  2448. // Patch requests.
  2449. ForceSendFields []string `json:"-"`
  2450. // NullFields is a list of field names (e.g. "NormalizedBoundingBox") to
  2451. // include in API requests with the JSON null value. By default, fields
  2452. // with empty values are omitted from API requests. However, any field
  2453. // with an empty value appearing in NullFields will be sent to the
  2454. // server as null. It is an error if a field in this list has a
  2455. // non-empty value. This may be used to include null fields in Patch
  2456. // requests.
  2457. NullFields []string `json:"-"`
  2458. }
  2459. func (s *GoogleCloudVideointelligenceV1p1beta1ObjectTrackingFrame) MarshalJSON() ([]byte, error) {
  2460. type NoMethod GoogleCloudVideointelligenceV1p1beta1ObjectTrackingFrame
  2461. raw := NoMethod(*s)
  2462. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2463. }
  2464. // GoogleCloudVideointelligenceV1p1beta1SpeechRecognitionAlternative:
  2465. // Alternative hypotheses (a.k.a. n-best list).
  2466. type GoogleCloudVideointelligenceV1p1beta1SpeechRecognitionAlternative struct {
  2467. // Confidence: The confidence estimate between 0.0 and 1.0. A higher
  2468. // number
  2469. // indicates an estimated greater likelihood that the recognized words
  2470. // are
  2471. // correct. This field is typically provided only for the top
  2472. // hypothesis, and
  2473. // only for `is_final=true` results. Clients should not rely on
  2474. // the
  2475. // `confidence` field as it is not guaranteed to be accurate or
  2476. // consistent.
  2477. // The default of 0.0 is a sentinel value indicating `confidence` was
  2478. // not set.
  2479. Confidence float64 `json:"confidence,omitempty"`
  2480. // Transcript: Transcript text representing the words that the user
  2481. // spoke.
  2482. Transcript string `json:"transcript,omitempty"`
  2483. // Words: A list of word-specific information for each recognized word.
  2484. Words []*GoogleCloudVideointelligenceV1p1beta1WordInfo `json:"words,omitempty"`
  2485. // ForceSendFields is a list of field names (e.g. "Confidence") to
  2486. // unconditionally include in API requests. By default, fields with
  2487. // empty values are omitted from API requests. However, any non-pointer,
  2488. // non-interface field appearing in ForceSendFields will be sent to the
  2489. // server regardless of whether the field is empty or not. This may be
  2490. // used to include empty fields in Patch requests.
  2491. ForceSendFields []string `json:"-"`
  2492. // NullFields is a list of field names (e.g. "Confidence") to include in
  2493. // API requests with the JSON null value. By default, fields with empty
  2494. // values are omitted from API requests. However, any field with an
  2495. // empty value appearing in NullFields will be sent to the server as
  2496. // null. It is an error if a field in this list has a non-empty value.
  2497. // This may be used to include null fields in Patch requests.
  2498. NullFields []string `json:"-"`
  2499. }
  2500. func (s *GoogleCloudVideointelligenceV1p1beta1SpeechRecognitionAlternative) MarshalJSON() ([]byte, error) {
  2501. type NoMethod GoogleCloudVideointelligenceV1p1beta1SpeechRecognitionAlternative
  2502. raw := NoMethod(*s)
  2503. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2504. }
  2505. func (s *GoogleCloudVideointelligenceV1p1beta1SpeechRecognitionAlternative) UnmarshalJSON(data []byte) error {
  2506. type NoMethod GoogleCloudVideointelligenceV1p1beta1SpeechRecognitionAlternative
  2507. var s1 struct {
  2508. Confidence gensupport.JSONFloat64 `json:"confidence"`
  2509. *NoMethod
  2510. }
  2511. s1.NoMethod = (*NoMethod)(s)
  2512. if err := json.Unmarshal(data, &s1); err != nil {
  2513. return err
  2514. }
  2515. s.Confidence = float64(s1.Confidence)
  2516. return nil
  2517. }
  2518. // GoogleCloudVideointelligenceV1p1beta1SpeechTranscription: A speech
  2519. // recognition result corresponding to a portion of the audio.
  2520. type GoogleCloudVideointelligenceV1p1beta1SpeechTranscription struct {
  2521. // Alternatives: May contain one or more recognition hypotheses (up to
  2522. // the maximum specified
  2523. // in `max_alternatives`). These alternatives are ordered in terms
  2524. // of
  2525. // accuracy, with the top (first) alternative being the most probable,
  2526. // as
  2527. // ranked by the recognizer.
  2528. Alternatives []*GoogleCloudVideointelligenceV1p1beta1SpeechRecognitionAlternative `json:"alternatives,omitempty"`
  2529. // LanguageCode: Output only.
  2530. // The
  2531. // [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag
  2532. // of the
  2533. // language in this result. This language code was detected to have the
  2534. // most
  2535. // likelihood of being spoken in the audio.
  2536. LanguageCode string `json:"languageCode,omitempty"`
  2537. // ForceSendFields is a list of field names (e.g. "Alternatives") to
  2538. // unconditionally include in API requests. By default, fields with
  2539. // empty values are omitted from API requests. However, any non-pointer,
  2540. // non-interface field appearing in ForceSendFields will be sent to the
  2541. // server regardless of whether the field is empty or not. This may be
  2542. // used to include empty fields in Patch requests.
  2543. ForceSendFields []string `json:"-"`
  2544. // NullFields is a list of field names (e.g. "Alternatives") to include
  2545. // in API requests with the JSON null value. By default, fields with
  2546. // empty values are omitted from API requests. However, any field with
  2547. // an empty value appearing in NullFields will be sent to the server as
  2548. // null. It is an error if a field in this list has a non-empty value.
  2549. // This may be used to include null fields in Patch requests.
  2550. NullFields []string `json:"-"`
  2551. }
  2552. func (s *GoogleCloudVideointelligenceV1p1beta1SpeechTranscription) MarshalJSON() ([]byte, error) {
  2553. type NoMethod GoogleCloudVideointelligenceV1p1beta1SpeechTranscription
  2554. raw := NoMethod(*s)
  2555. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2556. }
  2557. // GoogleCloudVideointelligenceV1p1beta1TextAnnotation: Annotations
  2558. // related to one detected OCR text snippet. This will contain
  2559. // the
  2560. // corresponding text, confidence value, and frame level information for
  2561. // each
  2562. // detection.
  2563. type GoogleCloudVideointelligenceV1p1beta1TextAnnotation struct {
  2564. // Segments: All video segments where OCR detected text appears.
  2565. Segments []*GoogleCloudVideointelligenceV1p1beta1TextSegment `json:"segments,omitempty"`
  2566. // Text: The detected text.
  2567. Text string `json:"text,omitempty"`
  2568. // ForceSendFields is a list of field names (e.g. "Segments") to
  2569. // unconditionally include in API requests. By default, fields with
  2570. // empty values are omitted from API requests. However, any non-pointer,
  2571. // non-interface field appearing in ForceSendFields will be sent to the
  2572. // server regardless of whether the field is empty or not. This may be
  2573. // used to include empty fields in Patch requests.
  2574. ForceSendFields []string `json:"-"`
  2575. // NullFields is a list of field names (e.g. "Segments") to include in
  2576. // API requests with the JSON null value. By default, fields with empty
  2577. // values are omitted from API requests. However, any field with an
  2578. // empty value appearing in NullFields will be sent to the server as
  2579. // null. It is an error if a field in this list has a non-empty value.
  2580. // This may be used to include null fields in Patch requests.
  2581. NullFields []string `json:"-"`
  2582. }
  2583. func (s *GoogleCloudVideointelligenceV1p1beta1TextAnnotation) MarshalJSON() ([]byte, error) {
  2584. type NoMethod GoogleCloudVideointelligenceV1p1beta1TextAnnotation
  2585. raw := NoMethod(*s)
  2586. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2587. }
  2588. // GoogleCloudVideointelligenceV1p1beta1TextFrame: Video frame level
  2589. // annotation results for text annotation (OCR).
  2590. // Contains information regarding timestamp and bounding box locations
  2591. // for the
  2592. // frames containing detected OCR text snippets.
  2593. type GoogleCloudVideointelligenceV1p1beta1TextFrame struct {
  2594. // RotatedBoundingBox: Bounding polygon of the detected text for this
  2595. // frame.
  2596. RotatedBoundingBox *GoogleCloudVideointelligenceV1p1beta1NormalizedBoundingPoly `json:"rotatedBoundingBox,omitempty"`
  2597. // TimeOffset: Timestamp of this frame.
  2598. TimeOffset string `json:"timeOffset,omitempty"`
  2599. // ForceSendFields is a list of field names (e.g. "RotatedBoundingBox")
  2600. // to unconditionally include in API requests. By default, fields with
  2601. // empty values are omitted from API requests. However, any non-pointer,
  2602. // non-interface field appearing in ForceSendFields will be sent to the
  2603. // server regardless of whether the field is empty or not. This may be
  2604. // used to include empty fields in Patch requests.
  2605. ForceSendFields []string `json:"-"`
  2606. // NullFields is a list of field names (e.g. "RotatedBoundingBox") to
  2607. // include in API requests with the JSON null value. By default, fields
  2608. // with empty values are omitted from API requests. However, any field
  2609. // with an empty value appearing in NullFields will be sent to the
  2610. // server as null. It is an error if a field in this list has a
  2611. // non-empty value. This may be used to include null fields in Patch
  2612. // requests.
  2613. NullFields []string `json:"-"`
  2614. }
  2615. func (s *GoogleCloudVideointelligenceV1p1beta1TextFrame) MarshalJSON() ([]byte, error) {
  2616. type NoMethod GoogleCloudVideointelligenceV1p1beta1TextFrame
  2617. raw := NoMethod(*s)
  2618. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2619. }
  2620. // GoogleCloudVideointelligenceV1p1beta1TextSegment: Video segment level
  2621. // annotation results for text detection.
  2622. type GoogleCloudVideointelligenceV1p1beta1TextSegment struct {
  2623. // Confidence: Confidence for the track of detected text. It is
  2624. // calculated as the highest
  2625. // over all frames where OCR detected text appears.
  2626. Confidence float64 `json:"confidence,omitempty"`
  2627. // Frames: Information related to the frames where OCR detected text
  2628. // appears.
  2629. Frames []*GoogleCloudVideointelligenceV1p1beta1TextFrame `json:"frames,omitempty"`
  2630. // Segment: Video segment where a text snippet was detected.
  2631. Segment *GoogleCloudVideointelligenceV1p1beta1VideoSegment `json:"segment,omitempty"`
  2632. // ForceSendFields is a list of field names (e.g. "Confidence") to
  2633. // unconditionally include in API requests. By default, fields with
  2634. // empty values are omitted from API requests. However, any non-pointer,
  2635. // non-interface field appearing in ForceSendFields will be sent to the
  2636. // server regardless of whether the field is empty or not. This may be
  2637. // used to include empty fields in Patch requests.
  2638. ForceSendFields []string `json:"-"`
  2639. // NullFields is a list of field names (e.g. "Confidence") to include in
  2640. // API requests with the JSON null value. By default, fields with empty
  2641. // values are omitted from API requests. However, any field with an
  2642. // empty value appearing in NullFields will be sent to the server as
  2643. // null. It is an error if a field in this list has a non-empty value.
  2644. // This may be used to include null fields in Patch requests.
  2645. NullFields []string `json:"-"`
  2646. }
  2647. func (s *GoogleCloudVideointelligenceV1p1beta1TextSegment) MarshalJSON() ([]byte, error) {
  2648. type NoMethod GoogleCloudVideointelligenceV1p1beta1TextSegment
  2649. raw := NoMethod(*s)
  2650. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2651. }
  2652. func (s *GoogleCloudVideointelligenceV1p1beta1TextSegment) UnmarshalJSON(data []byte) error {
  2653. type NoMethod GoogleCloudVideointelligenceV1p1beta1TextSegment
  2654. var s1 struct {
  2655. Confidence gensupport.JSONFloat64 `json:"confidence"`
  2656. *NoMethod
  2657. }
  2658. s1.NoMethod = (*NoMethod)(s)
  2659. if err := json.Unmarshal(data, &s1); err != nil {
  2660. return err
  2661. }
  2662. s.Confidence = float64(s1.Confidence)
  2663. return nil
  2664. }
  2665. // GoogleCloudVideointelligenceV1p1beta1VideoAnnotationProgress:
  2666. // Annotation progress for a single video.
  2667. type GoogleCloudVideointelligenceV1p1beta1VideoAnnotationProgress struct {
  2668. // InputUri: Video file location in
  2669. // [Google Cloud Storage](https://cloud.google.com/storage/).
  2670. InputUri string `json:"inputUri,omitempty"`
  2671. // ProgressPercent: Approximate percentage processed thus far.
  2672. // Guaranteed to be
  2673. // 100 when fully processed.
  2674. ProgressPercent int64 `json:"progressPercent,omitempty"`
  2675. // StartTime: Time when the request was received.
  2676. StartTime string `json:"startTime,omitempty"`
  2677. // UpdateTime: Time of the most recent update.
  2678. UpdateTime string `json:"updateTime,omitempty"`
  2679. // ForceSendFields is a list of field names (e.g. "InputUri") to
  2680. // unconditionally include in API requests. By default, fields with
  2681. // empty values are omitted from API requests. However, any non-pointer,
  2682. // non-interface field appearing in ForceSendFields will be sent to the
  2683. // server regardless of whether the field is empty or not. This may be
  2684. // used to include empty fields in Patch requests.
  2685. ForceSendFields []string `json:"-"`
  2686. // NullFields is a list of field names (e.g. "InputUri") to include in
  2687. // API requests with the JSON null value. By default, fields with empty
  2688. // values are omitted from API requests. However, any field with an
  2689. // empty value appearing in NullFields will be sent to the server as
  2690. // null. It is an error if a field in this list has a non-empty value.
  2691. // This may be used to include null fields in Patch requests.
  2692. NullFields []string `json:"-"`
  2693. }
  2694. func (s *GoogleCloudVideointelligenceV1p1beta1VideoAnnotationProgress) MarshalJSON() ([]byte, error) {
  2695. type NoMethod GoogleCloudVideointelligenceV1p1beta1VideoAnnotationProgress
  2696. raw := NoMethod(*s)
  2697. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2698. }
  2699. // GoogleCloudVideointelligenceV1p1beta1VideoAnnotationResults:
  2700. // Annotation results for a single video.
  2701. type GoogleCloudVideointelligenceV1p1beta1VideoAnnotationResults struct {
  2702. // Error: If set, indicates an error. Note that for a single
  2703. // `AnnotateVideoRequest`
  2704. // some videos may succeed and some may fail.
  2705. Error *GoogleRpcStatus `json:"error,omitempty"`
  2706. // ExplicitAnnotation: Explicit content annotation.
  2707. ExplicitAnnotation *GoogleCloudVideointelligenceV1p1beta1ExplicitContentAnnotation `json:"explicitAnnotation,omitempty"`
  2708. // FrameLabelAnnotations: Label annotations on frame level.
  2709. // There is exactly one element for each unique label.
  2710. FrameLabelAnnotations []*GoogleCloudVideointelligenceV1p1beta1LabelAnnotation `json:"frameLabelAnnotations,omitempty"`
  2711. // InputUri: Video file location in
  2712. // [Google Cloud Storage](https://cloud.google.com/storage/).
  2713. InputUri string `json:"inputUri,omitempty"`
  2714. // ObjectAnnotations: Annotations for list of objects detected and
  2715. // tracked in video.
  2716. ObjectAnnotations []*GoogleCloudVideointelligenceV1p1beta1ObjectTrackingAnnotation `json:"objectAnnotations,omitempty"`
  2717. // SegmentLabelAnnotations: Label annotations on video level or user
  2718. // specified segment level.
  2719. // There is exactly one element for each unique label.
  2720. SegmentLabelAnnotations []*GoogleCloudVideointelligenceV1p1beta1LabelAnnotation `json:"segmentLabelAnnotations,omitempty"`
  2721. // ShotAnnotations: Shot annotations. Each shot is represented as a
  2722. // video segment.
  2723. ShotAnnotations []*GoogleCloudVideointelligenceV1p1beta1VideoSegment `json:"shotAnnotations,omitempty"`
  2724. // ShotLabelAnnotations: Label annotations on shot level.
  2725. // There is exactly one element for each unique label.
  2726. ShotLabelAnnotations []*GoogleCloudVideointelligenceV1p1beta1LabelAnnotation `json:"shotLabelAnnotations,omitempty"`
  2727. // SpeechTranscriptions: Speech transcription.
  2728. SpeechTranscriptions []*GoogleCloudVideointelligenceV1p1beta1SpeechTranscription `json:"speechTranscriptions,omitempty"`
  2729. // TextAnnotations: OCR text detection and tracking.
  2730. // Annotations for list of detected text snippets. Each will have list
  2731. // of
  2732. // frame information associated with it.
  2733. TextAnnotations []*GoogleCloudVideointelligenceV1p1beta1TextAnnotation `json:"textAnnotations,omitempty"`
  2734. // ForceSendFields is a list of field names (e.g. "Error") to
  2735. // unconditionally include in API requests. By default, fields with
  2736. // empty values are omitted from API requests. However, any non-pointer,
  2737. // non-interface field appearing in ForceSendFields will be sent to the
  2738. // server regardless of whether the field is empty or not. This may be
  2739. // used to include empty fields in Patch requests.
  2740. ForceSendFields []string `json:"-"`
  2741. // NullFields is a list of field names (e.g. "Error") to include in API
  2742. // requests with the JSON null value. By default, fields with empty
  2743. // values are omitted from API requests. However, any field with an
  2744. // empty value appearing in NullFields will be sent to the server as
  2745. // null. It is an error if a field in this list has a non-empty value.
  2746. // This may be used to include null fields in Patch requests.
  2747. NullFields []string `json:"-"`
  2748. }
  2749. func (s *GoogleCloudVideointelligenceV1p1beta1VideoAnnotationResults) MarshalJSON() ([]byte, error) {
  2750. type NoMethod GoogleCloudVideointelligenceV1p1beta1VideoAnnotationResults
  2751. raw := NoMethod(*s)
  2752. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2753. }
  2754. // GoogleCloudVideointelligenceV1p1beta1VideoSegment: Video segment.
  2755. type GoogleCloudVideointelligenceV1p1beta1VideoSegment struct {
  2756. // EndTimeOffset: Time-offset, relative to the beginning of the
  2757. // video,
  2758. // corresponding to the end of the segment (inclusive).
  2759. EndTimeOffset string `json:"endTimeOffset,omitempty"`
  2760. // StartTimeOffset: Time-offset, relative to the beginning of the
  2761. // video,
  2762. // corresponding to the start of the segment (inclusive).
  2763. StartTimeOffset string `json:"startTimeOffset,omitempty"`
  2764. // ForceSendFields is a list of field names (e.g. "EndTimeOffset") to
  2765. // unconditionally include in API requests. By default, fields with
  2766. // empty values are omitted from API requests. However, any non-pointer,
  2767. // non-interface field appearing in ForceSendFields will be sent to the
  2768. // server regardless of whether the field is empty or not. This may be
  2769. // used to include empty fields in Patch requests.
  2770. ForceSendFields []string `json:"-"`
  2771. // NullFields is a list of field names (e.g. "EndTimeOffset") to include
  2772. // in API requests with the JSON null value. By default, fields with
  2773. // empty values are omitted from API requests. However, any field with
  2774. // an empty value appearing in NullFields will be sent to the server as
  2775. // null. It is an error if a field in this list has a non-empty value.
  2776. // This may be used to include null fields in Patch requests.
  2777. NullFields []string `json:"-"`
  2778. }
  2779. func (s *GoogleCloudVideointelligenceV1p1beta1VideoSegment) MarshalJSON() ([]byte, error) {
  2780. type NoMethod GoogleCloudVideointelligenceV1p1beta1VideoSegment
  2781. raw := NoMethod(*s)
  2782. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2783. }
  2784. // GoogleCloudVideointelligenceV1p1beta1WordInfo: Word-specific
  2785. // information for recognized words. Word information is only
  2786. // included in the response when certain request parameters are set,
  2787. // such
  2788. // as `enable_word_time_offsets`.
  2789. type GoogleCloudVideointelligenceV1p1beta1WordInfo struct {
  2790. // Confidence: Output only. The confidence estimate between 0.0 and 1.0.
  2791. // A higher number
  2792. // indicates an estimated greater likelihood that the recognized words
  2793. // are
  2794. // correct. This field is set only for the top alternative.
  2795. // This field is not guaranteed to be accurate and users should not rely
  2796. // on it
  2797. // to be always provided.
  2798. // The default of 0.0 is a sentinel value indicating `confidence` was
  2799. // not set.
  2800. Confidence float64 `json:"confidence,omitempty"`
  2801. // EndTime: Time offset relative to the beginning of the audio,
  2802. // and
  2803. // corresponding to the end of the spoken word. This field is only set
  2804. // if
  2805. // `enable_word_time_offsets=true` and only in the top hypothesis. This
  2806. // is an
  2807. // experimental feature and the accuracy of the time offset can vary.
  2808. EndTime string `json:"endTime,omitempty"`
  2809. // SpeakerTag: Output only. A distinct integer value is assigned for
  2810. // every speaker within
  2811. // the audio. This field specifies which one of those speakers was
  2812. // detected to
  2813. // have spoken this word. Value ranges from 1 up to
  2814. // diarization_speaker_count,
  2815. // and is only set if speaker diarization is enabled.
  2816. SpeakerTag int64 `json:"speakerTag,omitempty"`
  2817. // StartTime: Time offset relative to the beginning of the audio,
  2818. // and
  2819. // corresponding to the start of the spoken word. This field is only set
  2820. // if
  2821. // `enable_word_time_offsets=true` and only in the top hypothesis. This
  2822. // is an
  2823. // experimental feature and the accuracy of the time offset can vary.
  2824. StartTime string `json:"startTime,omitempty"`
  2825. // Word: The word corresponding to this set of information.
  2826. Word string `json:"word,omitempty"`
  2827. // ForceSendFields is a list of field names (e.g. "Confidence") to
  2828. // unconditionally include in API requests. By default, fields with
  2829. // empty values are omitted from API requests. However, any non-pointer,
  2830. // non-interface field appearing in ForceSendFields will be sent to the
  2831. // server regardless of whether the field is empty or not. This may be
  2832. // used to include empty fields in Patch requests.
  2833. ForceSendFields []string `json:"-"`
  2834. // NullFields is a list of field names (e.g. "Confidence") to include in
  2835. // API requests with the JSON null value. By default, fields with empty
  2836. // values are omitted from API requests. However, any field with an
  2837. // empty value appearing in NullFields will be sent to the server as
  2838. // null. It is an error if a field in this list has a non-empty value.
  2839. // This may be used to include null fields in Patch requests.
  2840. NullFields []string `json:"-"`
  2841. }
  2842. func (s *GoogleCloudVideointelligenceV1p1beta1WordInfo) MarshalJSON() ([]byte, error) {
  2843. type NoMethod GoogleCloudVideointelligenceV1p1beta1WordInfo
  2844. raw := NoMethod(*s)
  2845. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2846. }
  2847. func (s *GoogleCloudVideointelligenceV1p1beta1WordInfo) UnmarshalJSON(data []byte) error {
  2848. type NoMethod GoogleCloudVideointelligenceV1p1beta1WordInfo
  2849. var s1 struct {
  2850. Confidence gensupport.JSONFloat64 `json:"confidence"`
  2851. *NoMethod
  2852. }
  2853. s1.NoMethod = (*NoMethod)(s)
  2854. if err := json.Unmarshal(data, &s1); err != nil {
  2855. return err
  2856. }
  2857. s.Confidence = float64(s1.Confidence)
  2858. return nil
  2859. }
  2860. // GoogleCloudVideointelligenceV1p2beta1AnnotateVideoProgress: Video
  2861. // annotation progress. Included in the `metadata`
  2862. // field of the `Operation` returned by the `GetOperation`
  2863. // call of the `google::longrunning::Operations` service.
  2864. type GoogleCloudVideointelligenceV1p2beta1AnnotateVideoProgress struct {
  2865. // AnnotationProgress: Progress metadata for all videos specified in
  2866. // `AnnotateVideoRequest`.
  2867. AnnotationProgress []*GoogleCloudVideointelligenceV1p2beta1VideoAnnotationProgress `json:"annotationProgress,omitempty"`
  2868. // ForceSendFields is a list of field names (e.g. "AnnotationProgress")
  2869. // to unconditionally include in API requests. By default, fields with
  2870. // empty values are omitted from API requests. However, any non-pointer,
  2871. // non-interface field appearing in ForceSendFields will be sent to the
  2872. // server regardless of whether the field is empty or not. This may be
  2873. // used to include empty fields in Patch requests.
  2874. ForceSendFields []string `json:"-"`
  2875. // NullFields is a list of field names (e.g. "AnnotationProgress") to
  2876. // include in API requests with the JSON null value. By default, fields
  2877. // with empty values are omitted from API requests. However, any field
  2878. // with an empty value appearing in NullFields will be sent to the
  2879. // server as null. It is an error if a field in this list has a
  2880. // non-empty value. This may be used to include null fields in Patch
  2881. // requests.
  2882. NullFields []string `json:"-"`
  2883. }
  2884. func (s *GoogleCloudVideointelligenceV1p2beta1AnnotateVideoProgress) MarshalJSON() ([]byte, error) {
  2885. type NoMethod GoogleCloudVideointelligenceV1p2beta1AnnotateVideoProgress
  2886. raw := NoMethod(*s)
  2887. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2888. }
  2889. // GoogleCloudVideointelligenceV1p2beta1AnnotateVideoRequest: Video
  2890. // annotation request.
  2891. type GoogleCloudVideointelligenceV1p2beta1AnnotateVideoRequest struct {
  2892. // Features: Requested video annotation features.
  2893. //
  2894. // Possible values:
  2895. // "FEATURE_UNSPECIFIED" - Unspecified.
  2896. // "LABEL_DETECTION" - Label detection. Detect objects, such as dog or
  2897. // flower.
  2898. // "SHOT_CHANGE_DETECTION" - Shot change detection.
  2899. // "EXPLICIT_CONTENT_DETECTION" - Explicit content detection.
  2900. // "SPEECH_TRANSCRIPTION" - Speech transcription.
  2901. // "TEXT_DETECTION" - OCR text detection and tracking.
  2902. // "OBJECT_TRACKING" - Object detection and tracking.
  2903. Features []string `json:"features,omitempty"`
  2904. // InputContent: The video data bytes.
  2905. // If unset, the input video(s) should be specified via `input_uri`.
  2906. // If set, `input_uri` should be unset.
  2907. InputContent string `json:"inputContent,omitempty"`
  2908. // InputUri: Input video location. Currently, only
  2909. // [Google Cloud Storage](https://cloud.google.com/storage/) URIs
  2910. // are
  2911. // supported, which must be specified in the following
  2912. // format:
  2913. // `gs://bucket-id/object-id` (other URI formats
  2914. // return
  2915. // google.rpc.Code.INVALID_ARGUMENT). For more information, see
  2916. // [Request URIs](/storage/docs/reference-uris).
  2917. // A video URI may include wildcards in `object-id`, and thus
  2918. // identify
  2919. // multiple videos. Supported wildcards: '*' to match 0 or more
  2920. // characters;
  2921. // '?' to match 1 character. If unset, the input video should be
  2922. // embedded
  2923. // in the request as `input_content`. If set, `input_content` should be
  2924. // unset.
  2925. InputUri string `json:"inputUri,omitempty"`
  2926. // LocationId: Optional cloud region where annotation should take place.
  2927. // Supported cloud
  2928. // regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no
  2929. // region
  2930. // is specified, a region will be determined based on video file
  2931. // location.
  2932. LocationId string `json:"locationId,omitempty"`
  2933. // OutputUri: Optional location where the output (in JSON format) should
  2934. // be stored.
  2935. // Currently, only [Google Cloud
  2936. // Storage](https://cloud.google.com/storage/)
  2937. // URIs are supported, which must be specified in the following
  2938. // format:
  2939. // `gs://bucket-id/object-id` (other URI formats
  2940. // return
  2941. // google.rpc.Code.INVALID_ARGUMENT). For more information, see
  2942. // [Request URIs](/storage/docs/reference-uris).
  2943. OutputUri string `json:"outputUri,omitempty"`
  2944. // VideoContext: Additional video context and/or feature-specific
  2945. // parameters.
  2946. VideoContext *GoogleCloudVideointelligenceV1p2beta1VideoContext `json:"videoContext,omitempty"`
  2947. // ForceSendFields is a list of field names (e.g. "Features") to
  2948. // unconditionally include in API requests. By default, fields with
  2949. // empty values are omitted from API requests. However, any non-pointer,
  2950. // non-interface field appearing in ForceSendFields will be sent to the
  2951. // server regardless of whether the field is empty or not. This may be
  2952. // used to include empty fields in Patch requests.
  2953. ForceSendFields []string `json:"-"`
  2954. // NullFields is a list of field names (e.g. "Features") to include in
  2955. // API requests with the JSON null value. By default, fields with empty
  2956. // values are omitted from API requests. However, any field with an
  2957. // empty value appearing in NullFields will be sent to the server as
  2958. // null. It is an error if a field in this list has a non-empty value.
  2959. // This may be used to include null fields in Patch requests.
  2960. NullFields []string `json:"-"`
  2961. }
  2962. func (s *GoogleCloudVideointelligenceV1p2beta1AnnotateVideoRequest) MarshalJSON() ([]byte, error) {
  2963. type NoMethod GoogleCloudVideointelligenceV1p2beta1AnnotateVideoRequest
  2964. raw := NoMethod(*s)
  2965. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2966. }
  2967. // GoogleCloudVideointelligenceV1p2beta1AnnotateVideoResponse: Video
  2968. // annotation response. Included in the `response`
  2969. // field of the `Operation` returned by the `GetOperation`
  2970. // call of the `google::longrunning::Operations` service.
  2971. type GoogleCloudVideointelligenceV1p2beta1AnnotateVideoResponse struct {
  2972. // AnnotationResults: Annotation results for all videos specified in
  2973. // `AnnotateVideoRequest`.
  2974. AnnotationResults []*GoogleCloudVideointelligenceV1p2beta1VideoAnnotationResults `json:"annotationResults,omitempty"`
  2975. // ForceSendFields is a list of field names (e.g. "AnnotationResults")
  2976. // to unconditionally include in API requests. By default, fields with
  2977. // empty values are omitted from API requests. However, any non-pointer,
  2978. // non-interface field appearing in ForceSendFields will be sent to the
  2979. // server regardless of whether the field is empty or not. This may be
  2980. // used to include empty fields in Patch requests.
  2981. ForceSendFields []string `json:"-"`
  2982. // NullFields is a list of field names (e.g. "AnnotationResults") to
  2983. // include in API requests with the JSON null value. By default, fields
  2984. // with empty values are omitted from API requests. However, any field
  2985. // with an empty value appearing in NullFields will be sent to the
  2986. // server as null. It is an error if a field in this list has a
  2987. // non-empty value. This may be used to include null fields in Patch
  2988. // requests.
  2989. NullFields []string `json:"-"`
  2990. }
  2991. func (s *GoogleCloudVideointelligenceV1p2beta1AnnotateVideoResponse) MarshalJSON() ([]byte, error) {
  2992. type NoMethod GoogleCloudVideointelligenceV1p2beta1AnnotateVideoResponse
  2993. raw := NoMethod(*s)
  2994. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2995. }
  2996. // GoogleCloudVideointelligenceV1p2beta1Entity: Detected entity from
  2997. // video analysis.
  2998. type GoogleCloudVideointelligenceV1p2beta1Entity struct {
  2999. // Description: Textual description, e.g. `Fixed-gear bicycle`.
  3000. Description string `json:"description,omitempty"`
  3001. // EntityId: Opaque entity ID. Some IDs may be available in
  3002. // [Google Knowledge Graph
  3003. // Search
  3004. // API](https://developers.google.com/knowledge-graph/).
  3005. EntityId string `json:"entityId,omitempty"`
  3006. // LanguageCode: Language code for `description` in BCP-47 format.
  3007. LanguageCode string `json:"languageCode,omitempty"`
  3008. // ForceSendFields is a list of field names (e.g. "Description") to
  3009. // unconditionally include in API requests. By default, fields with
  3010. // empty values are omitted from API requests. However, any non-pointer,
  3011. // non-interface field appearing in ForceSendFields will be sent to the
  3012. // server regardless of whether the field is empty or not. This may be
  3013. // used to include empty fields in Patch requests.
  3014. ForceSendFields []string `json:"-"`
  3015. // NullFields is a list of field names (e.g. "Description") to include
  3016. // in API requests with the JSON null value. By default, fields with
  3017. // empty values are omitted from API requests. However, any field with
  3018. // an empty value appearing in NullFields will be sent to the server as
  3019. // null. It is an error if a field in this list has a non-empty value.
  3020. // This may be used to include null fields in Patch requests.
  3021. NullFields []string `json:"-"`
  3022. }
  3023. func (s *GoogleCloudVideointelligenceV1p2beta1Entity) MarshalJSON() ([]byte, error) {
  3024. type NoMethod GoogleCloudVideointelligenceV1p2beta1Entity
  3025. raw := NoMethod(*s)
  3026. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3027. }
  3028. // GoogleCloudVideointelligenceV1p2beta1ExplicitContentAnnotation:
  3029. // Explicit content annotation (based on per-frame visual signals
  3030. // only).
  3031. // If no explicit content has been detected in a frame, no annotations
  3032. // are
  3033. // present for that frame.
  3034. type GoogleCloudVideointelligenceV1p2beta1ExplicitContentAnnotation struct {
  3035. // Frames: All video frames where explicit content was detected.
  3036. Frames []*GoogleCloudVideointelligenceV1p2beta1ExplicitContentFrame `json:"frames,omitempty"`
  3037. // ForceSendFields is a list of field names (e.g. "Frames") to
  3038. // unconditionally include in API requests. By default, fields with
  3039. // empty values are omitted from API requests. However, any non-pointer,
  3040. // non-interface field appearing in ForceSendFields will be sent to the
  3041. // server regardless of whether the field is empty or not. This may be
  3042. // used to include empty fields in Patch requests.
  3043. ForceSendFields []string `json:"-"`
  3044. // NullFields is a list of field names (e.g. "Frames") to include in API
  3045. // requests with the JSON null value. By default, fields with empty
  3046. // values are omitted from API requests. However, any field with an
  3047. // empty value appearing in NullFields will be sent to the server as
  3048. // null. It is an error if a field in this list has a non-empty value.
  3049. // This may be used to include null fields in Patch requests.
  3050. NullFields []string `json:"-"`
  3051. }
  3052. func (s *GoogleCloudVideointelligenceV1p2beta1ExplicitContentAnnotation) MarshalJSON() ([]byte, error) {
  3053. type NoMethod GoogleCloudVideointelligenceV1p2beta1ExplicitContentAnnotation
  3054. raw := NoMethod(*s)
  3055. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3056. }
  3057. // GoogleCloudVideointelligenceV1p2beta1ExplicitContentDetectionConfig:
  3058. // Config for EXPLICIT_CONTENT_DETECTION.
  3059. type GoogleCloudVideointelligenceV1p2beta1ExplicitContentDetectionConfig struct {
  3060. // Model: Model to use for explicit content detection.
  3061. // Supported values: "builtin/stable" (the default if unset)
  3062. // and
  3063. // "builtin/latest".
  3064. Model string `json:"model,omitempty"`
  3065. // ForceSendFields is a list of field names (e.g. "Model") to
  3066. // unconditionally include in API requests. By default, fields with
  3067. // empty values are omitted from API requests. However, any non-pointer,
  3068. // non-interface field appearing in ForceSendFields will be sent to the
  3069. // server regardless of whether the field is empty or not. This may be
  3070. // used to include empty fields in Patch requests.
  3071. ForceSendFields []string `json:"-"`
  3072. // NullFields is a list of field names (e.g. "Model") to include in API
  3073. // requests with the JSON null value. By default, fields with empty
  3074. // values are omitted from API requests. However, any field with an
  3075. // empty value appearing in NullFields will be sent to the server as
  3076. // null. It is an error if a field in this list has a non-empty value.
  3077. // This may be used to include null fields in Patch requests.
  3078. NullFields []string `json:"-"`
  3079. }
  3080. func (s *GoogleCloudVideointelligenceV1p2beta1ExplicitContentDetectionConfig) MarshalJSON() ([]byte, error) {
  3081. type NoMethod GoogleCloudVideointelligenceV1p2beta1ExplicitContentDetectionConfig
  3082. raw := NoMethod(*s)
  3083. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3084. }
  3085. // GoogleCloudVideointelligenceV1p2beta1ExplicitContentFrame: Video
  3086. // frame level annotation results for explicit content.
  3087. type GoogleCloudVideointelligenceV1p2beta1ExplicitContentFrame struct {
  3088. // PornographyLikelihood: Likelihood of the pornography content..
  3089. //
  3090. // Possible values:
  3091. // "LIKELIHOOD_UNSPECIFIED" - Unspecified likelihood.
  3092. // "VERY_UNLIKELY" - Very unlikely.
  3093. // "UNLIKELY" - Unlikely.
  3094. // "POSSIBLE" - Possible.
  3095. // "LIKELY" - Likely.
  3096. // "VERY_LIKELY" - Very likely.
  3097. PornographyLikelihood string `json:"pornographyLikelihood,omitempty"`
  3098. // TimeOffset: Time-offset, relative to the beginning of the video,
  3099. // corresponding to the
  3100. // video frame for this location.
  3101. TimeOffset string `json:"timeOffset,omitempty"`
  3102. // ForceSendFields is a list of field names (e.g.
  3103. // "PornographyLikelihood") to unconditionally include in API requests.
  3104. // By default, fields with empty values are omitted from API requests.
  3105. // However, any non-pointer, non-interface field appearing in
  3106. // ForceSendFields will be sent to the server regardless of whether the
  3107. // field is empty or not. This may be used to include empty fields in
  3108. // Patch requests.
  3109. ForceSendFields []string `json:"-"`
  3110. // NullFields is a list of field names (e.g. "PornographyLikelihood") to
  3111. // include in API requests with the JSON null value. By default, fields
  3112. // with empty values are omitted from API requests. However, any field
  3113. // with an empty value appearing in NullFields will be sent to the
  3114. // server as null. It is an error if a field in this list has a
  3115. // non-empty value. This may be used to include null fields in Patch
  3116. // requests.
  3117. NullFields []string `json:"-"`
  3118. }
  3119. func (s *GoogleCloudVideointelligenceV1p2beta1ExplicitContentFrame) MarshalJSON() ([]byte, error) {
  3120. type NoMethod GoogleCloudVideointelligenceV1p2beta1ExplicitContentFrame
  3121. raw := NoMethod(*s)
  3122. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3123. }
  3124. // GoogleCloudVideointelligenceV1p2beta1LabelAnnotation: Label
  3125. // annotation.
  3126. type GoogleCloudVideointelligenceV1p2beta1LabelAnnotation struct {
  3127. // CategoryEntities: Common categories for the detected entity.
  3128. // E.g. when the label is `Terrier` the category is likely `dog`. And in
  3129. // some
  3130. // cases there might be more than one categories e.g. `Terrier` could
  3131. // also be
  3132. // a `pet`.
  3133. CategoryEntities []*GoogleCloudVideointelligenceV1p2beta1Entity `json:"categoryEntities,omitempty"`
  3134. // Entity: Detected entity.
  3135. Entity *GoogleCloudVideointelligenceV1p2beta1Entity `json:"entity,omitempty"`
  3136. // Frames: All video frames where a label was detected.
  3137. Frames []*GoogleCloudVideointelligenceV1p2beta1LabelFrame `json:"frames,omitempty"`
  3138. // Segments: All video segments where a label was detected.
  3139. Segments []*GoogleCloudVideointelligenceV1p2beta1LabelSegment `json:"segments,omitempty"`
  3140. // ForceSendFields is a list of field names (e.g. "CategoryEntities") to
  3141. // unconditionally include in API requests. By default, fields with
  3142. // empty values are omitted from API requests. However, any non-pointer,
  3143. // non-interface field appearing in ForceSendFields will be sent to the
  3144. // server regardless of whether the field is empty or not. This may be
  3145. // used to include empty fields in Patch requests.
  3146. ForceSendFields []string `json:"-"`
  3147. // NullFields is a list of field names (e.g. "CategoryEntities") to
  3148. // include in API requests with the JSON null value. By default, fields
  3149. // with empty values are omitted from API requests. However, any field
  3150. // with an empty value appearing in NullFields will be sent to the
  3151. // server as null. It is an error if a field in this list has a
  3152. // non-empty value. This may be used to include null fields in Patch
  3153. // requests.
  3154. NullFields []string `json:"-"`
  3155. }
  3156. func (s *GoogleCloudVideointelligenceV1p2beta1LabelAnnotation) MarshalJSON() ([]byte, error) {
  3157. type NoMethod GoogleCloudVideointelligenceV1p2beta1LabelAnnotation
  3158. raw := NoMethod(*s)
  3159. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3160. }
  3161. // GoogleCloudVideointelligenceV1p2beta1LabelDetectionConfig: Config for
  3162. // LABEL_DETECTION.
  3163. type GoogleCloudVideointelligenceV1p2beta1LabelDetectionConfig struct {
  3164. // FrameConfidenceThreshold: The confidence threshold we perform
  3165. // filtering on the labels from
  3166. // frame-level detection. If not set, it is set to 0.4 by default. The
  3167. // valid
  3168. // range for this threshold is [0.1, 0.9]. Any value set outside of
  3169. // this
  3170. // range will be clipped.
  3171. // Note: for best results please follow the default threshold. We will
  3172. // update
  3173. // the default threshold everytime when we release a new model.
  3174. FrameConfidenceThreshold float64 `json:"frameConfidenceThreshold,omitempty"`
  3175. // LabelDetectionMode: What labels should be detected with
  3176. // LABEL_DETECTION, in addition to
  3177. // video-level labels or segment-level labels.
  3178. // If unspecified, defaults to `SHOT_MODE`.
  3179. //
  3180. // Possible values:
  3181. // "LABEL_DETECTION_MODE_UNSPECIFIED" - Unspecified.
  3182. // "SHOT_MODE" - Detect shot-level labels.
  3183. // "FRAME_MODE" - Detect frame-level labels.
  3184. // "SHOT_AND_FRAME_MODE" - Detect both shot-level and frame-level
  3185. // labels.
  3186. LabelDetectionMode string `json:"labelDetectionMode,omitempty"`
  3187. // Model: Model to use for label detection.
  3188. // Supported values: "builtin/stable" (the default if unset)
  3189. // and
  3190. // "builtin/latest".
  3191. Model string `json:"model,omitempty"`
  3192. // StationaryCamera: Whether the video has been shot from a stationary
  3193. // (i.e. non-moving) camera.
  3194. // When set to true, might improve detection accuracy for moving
  3195. // objects.
  3196. // Should be used with `SHOT_AND_FRAME_MODE` enabled.
  3197. StationaryCamera bool `json:"stationaryCamera,omitempty"`
  3198. // VideoConfidenceThreshold: The confidence threshold we perform
  3199. // filtering on the labels from
  3200. // video-level and shot-level detections. If not set, it is set to 0.3
  3201. // by
  3202. // default. The valid range for this threshold is [0.1, 0.9]. Any value
  3203. // set
  3204. // outside of this range will be clipped.
  3205. // Note: for best results please follow the default threshold. We will
  3206. // update
  3207. // the default threshold everytime when we release a new model.
  3208. VideoConfidenceThreshold float64 `json:"videoConfidenceThreshold,omitempty"`
  3209. // ForceSendFields is a list of field names (e.g.
  3210. // "FrameConfidenceThreshold") to unconditionally include in API
  3211. // requests. By default, fields with empty values are omitted from API
  3212. // requests. However, any non-pointer, non-interface field appearing in
  3213. // ForceSendFields will be sent to the server regardless of whether the
  3214. // field is empty or not. This may be used to include empty fields in
  3215. // Patch requests.
  3216. ForceSendFields []string `json:"-"`
  3217. // NullFields is a list of field names (e.g. "FrameConfidenceThreshold")
  3218. // to include in API requests with the JSON null value. By default,
  3219. // fields with empty values are omitted from API requests. However, any
  3220. // field with an empty value appearing in NullFields will be sent to the
  3221. // server as null. It is an error if a field in this list has a
  3222. // non-empty value. This may be used to include null fields in Patch
  3223. // requests.
  3224. NullFields []string `json:"-"`
  3225. }
  3226. func (s *GoogleCloudVideointelligenceV1p2beta1LabelDetectionConfig) MarshalJSON() ([]byte, error) {
  3227. type NoMethod GoogleCloudVideointelligenceV1p2beta1LabelDetectionConfig
  3228. raw := NoMethod(*s)
  3229. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3230. }
  3231. func (s *GoogleCloudVideointelligenceV1p2beta1LabelDetectionConfig) UnmarshalJSON(data []byte) error {
  3232. type NoMethod GoogleCloudVideointelligenceV1p2beta1LabelDetectionConfig
  3233. var s1 struct {
  3234. FrameConfidenceThreshold gensupport.JSONFloat64 `json:"frameConfidenceThreshold"`
  3235. VideoConfidenceThreshold gensupport.JSONFloat64 `json:"videoConfidenceThreshold"`
  3236. *NoMethod
  3237. }
  3238. s1.NoMethod = (*NoMethod)(s)
  3239. if err := json.Unmarshal(data, &s1); err != nil {
  3240. return err
  3241. }
  3242. s.FrameConfidenceThreshold = float64(s1.FrameConfidenceThreshold)
  3243. s.VideoConfidenceThreshold = float64(s1.VideoConfidenceThreshold)
  3244. return nil
  3245. }
  3246. // GoogleCloudVideointelligenceV1p2beta1LabelFrame: Video frame level
  3247. // annotation results for label detection.
  3248. type GoogleCloudVideointelligenceV1p2beta1LabelFrame struct {
  3249. // Confidence: Confidence that the label is accurate. Range: [0, 1].
  3250. Confidence float64 `json:"confidence,omitempty"`
  3251. // TimeOffset: Time-offset, relative to the beginning of the video,
  3252. // corresponding to the
  3253. // video frame for this location.
  3254. TimeOffset string `json:"timeOffset,omitempty"`
  3255. // ForceSendFields is a list of field names (e.g. "Confidence") to
  3256. // unconditionally include in API requests. By default, fields with
  3257. // empty values are omitted from API requests. However, any non-pointer,
  3258. // non-interface field appearing in ForceSendFields will be sent to the
  3259. // server regardless of whether the field is empty or not. This may be
  3260. // used to include empty fields in Patch requests.
  3261. ForceSendFields []string `json:"-"`
  3262. // NullFields is a list of field names (e.g. "Confidence") to include in
  3263. // API requests with the JSON null value. By default, fields with empty
  3264. // values are omitted from API requests. However, any field with an
  3265. // empty value appearing in NullFields will be sent to the server as
  3266. // null. It is an error if a field in this list has a non-empty value.
  3267. // This may be used to include null fields in Patch requests.
  3268. NullFields []string `json:"-"`
  3269. }
  3270. func (s *GoogleCloudVideointelligenceV1p2beta1LabelFrame) MarshalJSON() ([]byte, error) {
  3271. type NoMethod GoogleCloudVideointelligenceV1p2beta1LabelFrame
  3272. raw := NoMethod(*s)
  3273. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3274. }
  3275. func (s *GoogleCloudVideointelligenceV1p2beta1LabelFrame) UnmarshalJSON(data []byte) error {
  3276. type NoMethod GoogleCloudVideointelligenceV1p2beta1LabelFrame
  3277. var s1 struct {
  3278. Confidence gensupport.JSONFloat64 `json:"confidence"`
  3279. *NoMethod
  3280. }
  3281. s1.NoMethod = (*NoMethod)(s)
  3282. if err := json.Unmarshal(data, &s1); err != nil {
  3283. return err
  3284. }
  3285. s.Confidence = float64(s1.Confidence)
  3286. return nil
  3287. }
  3288. // GoogleCloudVideointelligenceV1p2beta1LabelSegment: Video segment
  3289. // level annotation results for label detection.
  3290. type GoogleCloudVideointelligenceV1p2beta1LabelSegment struct {
  3291. // Confidence: Confidence that the label is accurate. Range: [0, 1].
  3292. Confidence float64 `json:"confidence,omitempty"`
  3293. // Segment: Video segment where a label was detected.
  3294. Segment *GoogleCloudVideointelligenceV1p2beta1VideoSegment `json:"segment,omitempty"`
  3295. // ForceSendFields is a list of field names (e.g. "Confidence") to
  3296. // unconditionally include in API requests. By default, fields with
  3297. // empty values are omitted from API requests. However, any non-pointer,
  3298. // non-interface field appearing in ForceSendFields will be sent to the
  3299. // server regardless of whether the field is empty or not. This may be
  3300. // used to include empty fields in Patch requests.
  3301. ForceSendFields []string `json:"-"`
  3302. // NullFields is a list of field names (e.g. "Confidence") to include in
  3303. // API requests with the JSON null value. By default, fields with empty
  3304. // values are omitted from API requests. However, any field with an
  3305. // empty value appearing in NullFields will be sent to the server as
  3306. // null. It is an error if a field in this list has a non-empty value.
  3307. // This may be used to include null fields in Patch requests.
  3308. NullFields []string `json:"-"`
  3309. }
  3310. func (s *GoogleCloudVideointelligenceV1p2beta1LabelSegment) MarshalJSON() ([]byte, error) {
  3311. type NoMethod GoogleCloudVideointelligenceV1p2beta1LabelSegment
  3312. raw := NoMethod(*s)
  3313. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3314. }
  3315. func (s *GoogleCloudVideointelligenceV1p2beta1LabelSegment) UnmarshalJSON(data []byte) error {
  3316. type NoMethod GoogleCloudVideointelligenceV1p2beta1LabelSegment
  3317. var s1 struct {
  3318. Confidence gensupport.JSONFloat64 `json:"confidence"`
  3319. *NoMethod
  3320. }
  3321. s1.NoMethod = (*NoMethod)(s)
  3322. if err := json.Unmarshal(data, &s1); err != nil {
  3323. return err
  3324. }
  3325. s.Confidence = float64(s1.Confidence)
  3326. return nil
  3327. }
  3328. // GoogleCloudVideointelligenceV1p2beta1NormalizedBoundingBox:
  3329. // Normalized bounding box.
  3330. // The normalized vertex coordinates are relative to the original
  3331. // image.
  3332. // Range: [0, 1].
  3333. type GoogleCloudVideointelligenceV1p2beta1NormalizedBoundingBox struct {
  3334. // Bottom: Bottom Y coordinate.
  3335. Bottom float64 `json:"bottom,omitempty"`
  3336. // Left: Left X coordinate.
  3337. Left float64 `json:"left,omitempty"`
  3338. // Right: Right X coordinate.
  3339. Right float64 `json:"right,omitempty"`
  3340. // Top: Top Y coordinate.
  3341. Top float64 `json:"top,omitempty"`
  3342. // ForceSendFields is a list of field names (e.g. "Bottom") to
  3343. // unconditionally include in API requests. By default, fields with
  3344. // empty values are omitted from API requests. However, any non-pointer,
  3345. // non-interface field appearing in ForceSendFields will be sent to the
  3346. // server regardless of whether the field is empty or not. This may be
  3347. // used to include empty fields in Patch requests.
  3348. ForceSendFields []string `json:"-"`
  3349. // NullFields is a list of field names (e.g. "Bottom") to include in API
  3350. // requests with the JSON null value. By default, fields with empty
  3351. // values are omitted from API requests. However, any field with an
  3352. // empty value appearing in NullFields will be sent to the server as
  3353. // null. It is an error if a field in this list has a non-empty value.
  3354. // This may be used to include null fields in Patch requests.
  3355. NullFields []string `json:"-"`
  3356. }
  3357. func (s *GoogleCloudVideointelligenceV1p2beta1NormalizedBoundingBox) MarshalJSON() ([]byte, error) {
  3358. type NoMethod GoogleCloudVideointelligenceV1p2beta1NormalizedBoundingBox
  3359. raw := NoMethod(*s)
  3360. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3361. }
  3362. func (s *GoogleCloudVideointelligenceV1p2beta1NormalizedBoundingBox) UnmarshalJSON(data []byte) error {
  3363. type NoMethod GoogleCloudVideointelligenceV1p2beta1NormalizedBoundingBox
  3364. var s1 struct {
  3365. Bottom gensupport.JSONFloat64 `json:"bottom"`
  3366. Left gensupport.JSONFloat64 `json:"left"`
  3367. Right gensupport.JSONFloat64 `json:"right"`
  3368. Top gensupport.JSONFloat64 `json:"top"`
  3369. *NoMethod
  3370. }
  3371. s1.NoMethod = (*NoMethod)(s)
  3372. if err := json.Unmarshal(data, &s1); err != nil {
  3373. return err
  3374. }
  3375. s.Bottom = float64(s1.Bottom)
  3376. s.Left = float64(s1.Left)
  3377. s.Right = float64(s1.Right)
  3378. s.Top = float64(s1.Top)
  3379. return nil
  3380. }
  3381. // GoogleCloudVideointelligenceV1p2beta1NormalizedBoundingPoly:
  3382. // Normalized bounding polygon for text (that might not be aligned with
  3383. // axis).
  3384. // Contains list of the corner points in clockwise order starting
  3385. // from
  3386. // top-left corner. For example, for a rectangular bounding box:
  3387. // When the text is horizontal it might look like:
  3388. // 0----1
  3389. // | |
  3390. // 3----2
  3391. //
  3392. // When it's clockwise rotated 180 degrees around the top-left corner
  3393. // it
  3394. // becomes:
  3395. // 2----3
  3396. // | |
  3397. // 1----0
  3398. //
  3399. // and the vertex order will still be (0, 1, 2, 3). Note that values can
  3400. // be less
  3401. // than 0, or greater than 1 due to trignometric calculations for
  3402. // location of
  3403. // the box.
  3404. type GoogleCloudVideointelligenceV1p2beta1NormalizedBoundingPoly struct {
  3405. // Vertices: Normalized vertices of the bounding polygon.
  3406. Vertices []*GoogleCloudVideointelligenceV1p2beta1NormalizedVertex `json:"vertices,omitempty"`
  3407. // ForceSendFields is a list of field names (e.g. "Vertices") to
  3408. // unconditionally include in API requests. By default, fields with
  3409. // empty values are omitted from API requests. However, any non-pointer,
  3410. // non-interface field appearing in ForceSendFields will be sent to the
  3411. // server regardless of whether the field is empty or not. This may be
  3412. // used to include empty fields in Patch requests.
  3413. ForceSendFields []string `json:"-"`
  3414. // NullFields is a list of field names (e.g. "Vertices") to include in
  3415. // API requests with the JSON null value. By default, fields with empty
  3416. // values are omitted from API requests. However, any field with an
  3417. // empty value appearing in NullFields will be sent to the server as
  3418. // null. It is an error if a field in this list has a non-empty value.
  3419. // This may be used to include null fields in Patch requests.
  3420. NullFields []string `json:"-"`
  3421. }
  3422. func (s *GoogleCloudVideointelligenceV1p2beta1NormalizedBoundingPoly) MarshalJSON() ([]byte, error) {
  3423. type NoMethod GoogleCloudVideointelligenceV1p2beta1NormalizedBoundingPoly
  3424. raw := NoMethod(*s)
  3425. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3426. }
  3427. // GoogleCloudVideointelligenceV1p2beta1NormalizedVertex: A vertex
  3428. // represents a 2D point in the image.
  3429. // NOTE: the normalized vertex coordinates are relative to the original
  3430. // image
  3431. // and range from 0 to 1.
  3432. type GoogleCloudVideointelligenceV1p2beta1NormalizedVertex struct {
  3433. // X: X coordinate.
  3434. X float64 `json:"x,omitempty"`
  3435. // Y: Y coordinate.
  3436. Y float64 `json:"y,omitempty"`
  3437. // ForceSendFields is a list of field names (e.g. "X") to
  3438. // unconditionally include in API requests. By default, fields with
  3439. // empty values are omitted from API requests. However, any non-pointer,
  3440. // non-interface field appearing in ForceSendFields will be sent to the
  3441. // server regardless of whether the field is empty or not. This may be
  3442. // used to include empty fields in Patch requests.
  3443. ForceSendFields []string `json:"-"`
  3444. // NullFields is a list of field names (e.g. "X") to include in API
  3445. // requests with the JSON null value. By default, fields with empty
  3446. // values are omitted from API requests. However, any field with an
  3447. // empty value appearing in NullFields will be sent to the server as
  3448. // null. It is an error if a field in this list has a non-empty value.
  3449. // This may be used to include null fields in Patch requests.
  3450. NullFields []string `json:"-"`
  3451. }
  3452. func (s *GoogleCloudVideointelligenceV1p2beta1NormalizedVertex) MarshalJSON() ([]byte, error) {
  3453. type NoMethod GoogleCloudVideointelligenceV1p2beta1NormalizedVertex
  3454. raw := NoMethod(*s)
  3455. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3456. }
  3457. func (s *GoogleCloudVideointelligenceV1p2beta1NormalizedVertex) UnmarshalJSON(data []byte) error {
  3458. type NoMethod GoogleCloudVideointelligenceV1p2beta1NormalizedVertex
  3459. var s1 struct {
  3460. X gensupport.JSONFloat64 `json:"x"`
  3461. Y gensupport.JSONFloat64 `json:"y"`
  3462. *NoMethod
  3463. }
  3464. s1.NoMethod = (*NoMethod)(s)
  3465. if err := json.Unmarshal(data, &s1); err != nil {
  3466. return err
  3467. }
  3468. s.X = float64(s1.X)
  3469. s.Y = float64(s1.Y)
  3470. return nil
  3471. }
  3472. // GoogleCloudVideointelligenceV1p2beta1ObjectTrackingAnnotation:
  3473. // Annotations corresponding to one tracked object.
  3474. type GoogleCloudVideointelligenceV1p2beta1ObjectTrackingAnnotation struct {
  3475. // Confidence: Object category's labeling confidence of this track.
  3476. Confidence float64 `json:"confidence,omitempty"`
  3477. // Entity: Entity to specify the object category that this track is
  3478. // labeled as.
  3479. Entity *GoogleCloudVideointelligenceV1p2beta1Entity `json:"entity,omitempty"`
  3480. // Frames: Information corresponding to all frames where this object
  3481. // track appears.
  3482. // Non-streaming batch mode: it may be one or multiple
  3483. // ObjectTrackingFrame
  3484. // messages in frames.
  3485. // Streaming mode: it can only be one ObjectTrackingFrame message in
  3486. // frames.
  3487. Frames []*GoogleCloudVideointelligenceV1p2beta1ObjectTrackingFrame `json:"frames,omitempty"`
  3488. // Segment: Non-streaming batch mode ONLY.
  3489. // Each object track corresponds to one video segment where it appears.
  3490. Segment *GoogleCloudVideointelligenceV1p2beta1VideoSegment `json:"segment,omitempty"`
  3491. // TrackId: Streaming mode ONLY.
  3492. // In streaming mode, we do not know the end time of a tracked
  3493. // object
  3494. // before it is completed. Hence, there is no VideoSegment info
  3495. // returned.
  3496. // Instead, we provide a unique identifiable integer track_id so
  3497. // that
  3498. // the customers can correlate the results of the
  3499. // ongoing
  3500. // ObjectTrackAnnotation of the same track_id over time.
  3501. TrackId int64 `json:"trackId,omitempty,string"`
  3502. // ForceSendFields is a list of field names (e.g. "Confidence") to
  3503. // unconditionally include in API requests. By default, fields with
  3504. // empty values are omitted from API requests. However, any non-pointer,
  3505. // non-interface field appearing in ForceSendFields will be sent to the
  3506. // server regardless of whether the field is empty or not. This may be
  3507. // used to include empty fields in Patch requests.
  3508. ForceSendFields []string `json:"-"`
  3509. // NullFields is a list of field names (e.g. "Confidence") to include in
  3510. // API requests with the JSON null value. By default, fields with empty
  3511. // values are omitted from API requests. However, any field with an
  3512. // empty value appearing in NullFields will be sent to the server as
  3513. // null. It is an error if a field in this list has a non-empty value.
  3514. // This may be used to include null fields in Patch requests.
  3515. NullFields []string `json:"-"`
  3516. }
  3517. func (s *GoogleCloudVideointelligenceV1p2beta1ObjectTrackingAnnotation) MarshalJSON() ([]byte, error) {
  3518. type NoMethod GoogleCloudVideointelligenceV1p2beta1ObjectTrackingAnnotation
  3519. raw := NoMethod(*s)
  3520. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3521. }
  3522. func (s *GoogleCloudVideointelligenceV1p2beta1ObjectTrackingAnnotation) UnmarshalJSON(data []byte) error {
  3523. type NoMethod GoogleCloudVideointelligenceV1p2beta1ObjectTrackingAnnotation
  3524. var s1 struct {
  3525. Confidence gensupport.JSONFloat64 `json:"confidence"`
  3526. *NoMethod
  3527. }
  3528. s1.NoMethod = (*NoMethod)(s)
  3529. if err := json.Unmarshal(data, &s1); err != nil {
  3530. return err
  3531. }
  3532. s.Confidence = float64(s1.Confidence)
  3533. return nil
  3534. }
  3535. // GoogleCloudVideointelligenceV1p2beta1ObjectTrackingFrame: Video frame
  3536. // level annotations for object detection and tracking. This
  3537. // field
  3538. // stores per frame location, time offset, and confidence.
  3539. type GoogleCloudVideointelligenceV1p2beta1ObjectTrackingFrame struct {
  3540. // NormalizedBoundingBox: The normalized bounding box location of this
  3541. // object track for the frame.
  3542. NormalizedBoundingBox *GoogleCloudVideointelligenceV1p2beta1NormalizedBoundingBox `json:"normalizedBoundingBox,omitempty"`
  3543. // TimeOffset: The timestamp of the frame in microseconds.
  3544. TimeOffset string `json:"timeOffset,omitempty"`
  3545. // ForceSendFields is a list of field names (e.g.
  3546. // "NormalizedBoundingBox") to unconditionally include in API requests.
  3547. // By default, fields with empty values are omitted from API requests.
  3548. // However, any non-pointer, non-interface field appearing in
  3549. // ForceSendFields will be sent to the server regardless of whether the
  3550. // field is empty or not. This may be used to include empty fields in
  3551. // Patch requests.
  3552. ForceSendFields []string `json:"-"`
  3553. // NullFields is a list of field names (e.g. "NormalizedBoundingBox") to
  3554. // include in API requests with the JSON null value. By default, fields
  3555. // with empty values are omitted from API requests. However, any field
  3556. // with an empty value appearing in NullFields will be sent to the
  3557. // server as null. It is an error if a field in this list has a
  3558. // non-empty value. This may be used to include null fields in Patch
  3559. // requests.
  3560. NullFields []string `json:"-"`
  3561. }
  3562. func (s *GoogleCloudVideointelligenceV1p2beta1ObjectTrackingFrame) MarshalJSON() ([]byte, error) {
  3563. type NoMethod GoogleCloudVideointelligenceV1p2beta1ObjectTrackingFrame
  3564. raw := NoMethod(*s)
  3565. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3566. }
  3567. // GoogleCloudVideointelligenceV1p2beta1ShotChangeDetectionConfig:
  3568. // Config for SHOT_CHANGE_DETECTION.
  3569. type GoogleCloudVideointelligenceV1p2beta1ShotChangeDetectionConfig struct {
  3570. // Model: Model to use for shot change detection.
  3571. // Supported values: "builtin/stable" (the default if unset)
  3572. // and
  3573. // "builtin/latest".
  3574. Model string `json:"model,omitempty"`
  3575. // ForceSendFields is a list of field names (e.g. "Model") to
  3576. // unconditionally include in API requests. By default, fields with
  3577. // empty values are omitted from API requests. However, any non-pointer,
  3578. // non-interface field appearing in ForceSendFields will be sent to the
  3579. // server regardless of whether the field is empty or not. This may be
  3580. // used to include empty fields in Patch requests.
  3581. ForceSendFields []string `json:"-"`
  3582. // NullFields is a list of field names (e.g. "Model") to include in API
  3583. // requests with the JSON null value. By default, fields with empty
  3584. // values are omitted from API requests. However, any field with an
  3585. // empty value appearing in NullFields will be sent to the server as
  3586. // null. It is an error if a field in this list has a non-empty value.
  3587. // This may be used to include null fields in Patch requests.
  3588. NullFields []string `json:"-"`
  3589. }
  3590. func (s *GoogleCloudVideointelligenceV1p2beta1ShotChangeDetectionConfig) MarshalJSON() ([]byte, error) {
  3591. type NoMethod GoogleCloudVideointelligenceV1p2beta1ShotChangeDetectionConfig
  3592. raw := NoMethod(*s)
  3593. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3594. }
  3595. // GoogleCloudVideointelligenceV1p2beta1SpeechContext: Provides "hints"
  3596. // to the speech recognizer to favor specific words and phrases
  3597. // in the results.
  3598. type GoogleCloudVideointelligenceV1p2beta1SpeechContext struct {
  3599. // Phrases: *Optional* A list of strings containing words and phrases
  3600. // "hints" so that
  3601. // the speech recognition is more likely to recognize them. This can be
  3602. // used
  3603. // to improve the accuracy for specific words and phrases, for example,
  3604. // if
  3605. // specific commands are typically spoken by the user. This can also be
  3606. // used
  3607. // to add additional words to the vocabulary of the recognizer.
  3608. // See
  3609. // [usage limits](https://cloud.google.com/speech/limits#content).
  3610. Phrases []string `json:"phrases,omitempty"`
  3611. // ForceSendFields is a list of field names (e.g. "Phrases") to
  3612. // unconditionally include in API requests. By default, fields with
  3613. // empty values are omitted from API requests. However, any non-pointer,
  3614. // non-interface field appearing in ForceSendFields will be sent to the
  3615. // server regardless of whether the field is empty or not. This may be
  3616. // used to include empty fields in Patch requests.
  3617. ForceSendFields []string `json:"-"`
  3618. // NullFields is a list of field names (e.g. "Phrases") to include in
  3619. // API requests with the JSON null value. By default, fields with empty
  3620. // values are omitted from API requests. However, any field with an
  3621. // empty value appearing in NullFields will be sent to the server as
  3622. // null. It is an error if a field in this list has a non-empty value.
  3623. // This may be used to include null fields in Patch requests.
  3624. NullFields []string `json:"-"`
  3625. }
  3626. func (s *GoogleCloudVideointelligenceV1p2beta1SpeechContext) MarshalJSON() ([]byte, error) {
  3627. type NoMethod GoogleCloudVideointelligenceV1p2beta1SpeechContext
  3628. raw := NoMethod(*s)
  3629. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3630. }
  3631. // GoogleCloudVideointelligenceV1p2beta1SpeechRecognitionAlternative:
  3632. // Alternative hypotheses (a.k.a. n-best list).
  3633. type GoogleCloudVideointelligenceV1p2beta1SpeechRecognitionAlternative struct {
  3634. // Confidence: The confidence estimate between 0.0 and 1.0. A higher
  3635. // number
  3636. // indicates an estimated greater likelihood that the recognized words
  3637. // are
  3638. // correct. This field is typically provided only for the top
  3639. // hypothesis, and
  3640. // only for `is_final=true` results. Clients should not rely on
  3641. // the
  3642. // `confidence` field as it is not guaranteed to be accurate or
  3643. // consistent.
  3644. // The default of 0.0 is a sentinel value indicating `confidence` was
  3645. // not set.
  3646. Confidence float64 `json:"confidence,omitempty"`
  3647. // Transcript: Transcript text representing the words that the user
  3648. // spoke.
  3649. Transcript string `json:"transcript,omitempty"`
  3650. // Words: A list of word-specific information for each recognized word.
  3651. Words []*GoogleCloudVideointelligenceV1p2beta1WordInfo `json:"words,omitempty"`
  3652. // ForceSendFields is a list of field names (e.g. "Confidence") to
  3653. // unconditionally include in API requests. By default, fields with
  3654. // empty values are omitted from API requests. However, any non-pointer,
  3655. // non-interface field appearing in ForceSendFields will be sent to the
  3656. // server regardless of whether the field is empty or not. This may be
  3657. // used to include empty fields in Patch requests.
  3658. ForceSendFields []string `json:"-"`
  3659. // NullFields is a list of field names (e.g. "Confidence") to include in
  3660. // API requests with the JSON null value. By default, fields with empty
  3661. // values are omitted from API requests. However, any field with an
  3662. // empty value appearing in NullFields will be sent to the server as
  3663. // null. It is an error if a field in this list has a non-empty value.
  3664. // This may be used to include null fields in Patch requests.
  3665. NullFields []string `json:"-"`
  3666. }
  3667. func (s *GoogleCloudVideointelligenceV1p2beta1SpeechRecognitionAlternative) MarshalJSON() ([]byte, error) {
  3668. type NoMethod GoogleCloudVideointelligenceV1p2beta1SpeechRecognitionAlternative
  3669. raw := NoMethod(*s)
  3670. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3671. }
  3672. func (s *GoogleCloudVideointelligenceV1p2beta1SpeechRecognitionAlternative) UnmarshalJSON(data []byte) error {
  3673. type NoMethod GoogleCloudVideointelligenceV1p2beta1SpeechRecognitionAlternative
  3674. var s1 struct {
  3675. Confidence gensupport.JSONFloat64 `json:"confidence"`
  3676. *NoMethod
  3677. }
  3678. s1.NoMethod = (*NoMethod)(s)
  3679. if err := json.Unmarshal(data, &s1); err != nil {
  3680. return err
  3681. }
  3682. s.Confidence = float64(s1.Confidence)
  3683. return nil
  3684. }
  3685. // GoogleCloudVideointelligenceV1p2beta1SpeechTranscription: A speech
  3686. // recognition result corresponding to a portion of the audio.
  3687. type GoogleCloudVideointelligenceV1p2beta1SpeechTranscription struct {
  3688. // Alternatives: May contain one or more recognition hypotheses (up to
  3689. // the maximum specified
  3690. // in `max_alternatives`). These alternatives are ordered in terms
  3691. // of
  3692. // accuracy, with the top (first) alternative being the most probable,
  3693. // as
  3694. // ranked by the recognizer.
  3695. Alternatives []*GoogleCloudVideointelligenceV1p2beta1SpeechRecognitionAlternative `json:"alternatives,omitempty"`
  3696. // LanguageCode: Output only.
  3697. // The
  3698. // [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag
  3699. // of the
  3700. // language in this result. This language code was detected to have the
  3701. // most
  3702. // likelihood of being spoken in the audio.
  3703. LanguageCode string `json:"languageCode,omitempty"`
  3704. // ForceSendFields is a list of field names (e.g. "Alternatives") to
  3705. // unconditionally include in API requests. By default, fields with
  3706. // empty values are omitted from API requests. However, any non-pointer,
  3707. // non-interface field appearing in ForceSendFields will be sent to the
  3708. // server regardless of whether the field is empty or not. This may be
  3709. // used to include empty fields in Patch requests.
  3710. ForceSendFields []string `json:"-"`
  3711. // NullFields is a list of field names (e.g. "Alternatives") to include
  3712. // in API requests with the JSON null value. By default, fields with
  3713. // empty values are omitted from API requests. However, any field with
  3714. // an empty value appearing in NullFields will be sent to the server as
  3715. // null. It is an error if a field in this list has a non-empty value.
  3716. // This may be used to include null fields in Patch requests.
  3717. NullFields []string `json:"-"`
  3718. }
  3719. func (s *GoogleCloudVideointelligenceV1p2beta1SpeechTranscription) MarshalJSON() ([]byte, error) {
  3720. type NoMethod GoogleCloudVideointelligenceV1p2beta1SpeechTranscription
  3721. raw := NoMethod(*s)
  3722. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3723. }
  3724. // GoogleCloudVideointelligenceV1p2beta1SpeechTranscriptionConfig:
  3725. // Config for SPEECH_TRANSCRIPTION.
  3726. type GoogleCloudVideointelligenceV1p2beta1SpeechTranscriptionConfig struct {
  3727. // AudioTracks: *Optional* For file formats, such as MXF or MKV,
  3728. // supporting multiple audio
  3729. // tracks, specify up to two tracks. Default: track 0.
  3730. AudioTracks []int64 `json:"audioTracks,omitempty"`
  3731. // DiarizationSpeakerCount: *Optional*
  3732. // If set, specifies the estimated number of speakers in the
  3733. // conversation.
  3734. // If not set, defaults to '2'.
  3735. // Ignored unless enable_speaker_diarization is set to true.
  3736. DiarizationSpeakerCount int64 `json:"diarizationSpeakerCount,omitempty"`
  3737. // EnableAutomaticPunctuation: *Optional* If 'true', adds punctuation to
  3738. // recognition result hypotheses.
  3739. // This feature is only available in select languages. Setting this
  3740. // for
  3741. // requests in other languages has no effect at all. The default 'false'
  3742. // value
  3743. // does not add punctuation to result hypotheses. NOTE: "This is
  3744. // currently
  3745. // offered as an experimental service, complimentary to all users. In
  3746. // the
  3747. // future this may be exclusively available as a premium feature."
  3748. EnableAutomaticPunctuation bool `json:"enableAutomaticPunctuation,omitempty"`
  3749. // EnableSpeakerDiarization: *Optional* If 'true', enables speaker
  3750. // detection for each recognized word in
  3751. // the top alternative of the recognition result using a speaker_tag
  3752. // provided
  3753. // in the WordInfo.
  3754. // Note: When this is true, we send all the words from the beginning of
  3755. // the
  3756. // audio for the top alternative in every consecutive responses.
  3757. // This is done in order to improve our speaker tags as our models learn
  3758. // to
  3759. // identify the speakers in the conversation over time.
  3760. EnableSpeakerDiarization bool `json:"enableSpeakerDiarization,omitempty"`
  3761. // EnableWordConfidence: *Optional* If `true`, the top result includes a
  3762. // list of words and the
  3763. // confidence for those words. If `false`, no word-level
  3764. // confidence
  3765. // information is returned. The default is `false`.
  3766. EnableWordConfidence bool `json:"enableWordConfidence,omitempty"`
  3767. // FilterProfanity: *Optional* If set to `true`, the server will attempt
  3768. // to filter out
  3769. // profanities, replacing all but the initial character in each filtered
  3770. // word
  3771. // with asterisks, e.g. "f***". If set to `false` or omitted,
  3772. // profanities
  3773. // won't be filtered out.
  3774. FilterProfanity bool `json:"filterProfanity,omitempty"`
  3775. // LanguageCode: *Required* The language of the supplied audio as
  3776. // a
  3777. // [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language
  3778. // tag.
  3779. // Example: "en-US".
  3780. // See [Language
  3781. // Support](https://cloud.google.com/speech/docs/languages)
  3782. // for a list of the currently supported language codes.
  3783. LanguageCode string `json:"languageCode,omitempty"`
  3784. // MaxAlternatives: *Optional* Maximum number of recognition hypotheses
  3785. // to be returned.
  3786. // Specifically, the maximum number of `SpeechRecognitionAlternative`
  3787. // messages
  3788. // within each `SpeechTranscription`. The server may return fewer
  3789. // than
  3790. // `max_alternatives`. Valid values are `0`-`30`. A value of `0` or `1`
  3791. // will
  3792. // return a maximum of one. If omitted, will return a maximum of one.
  3793. MaxAlternatives int64 `json:"maxAlternatives,omitempty"`
  3794. // SpeechContexts: *Optional* A means to provide context to assist the
  3795. // speech recognition.
  3796. SpeechContexts []*GoogleCloudVideointelligenceV1p2beta1SpeechContext `json:"speechContexts,omitempty"`
  3797. // ForceSendFields is a list of field names (e.g. "AudioTracks") to
  3798. // unconditionally include in API requests. By default, fields with
  3799. // empty values are omitted from API requests. However, any non-pointer,
  3800. // non-interface field appearing in ForceSendFields will be sent to the
  3801. // server regardless of whether the field is empty or not. This may be
  3802. // used to include empty fields in Patch requests.
  3803. ForceSendFields []string `json:"-"`
  3804. // NullFields is a list of field names (e.g. "AudioTracks") to include
  3805. // in API requests with the JSON null value. By default, fields with
  3806. // empty values are omitted from API requests. However, any field with
  3807. // an empty value appearing in NullFields will be sent to the server as
  3808. // null. It is an error if a field in this list has a non-empty value.
  3809. // This may be used to include null fields in Patch requests.
  3810. NullFields []string `json:"-"`
  3811. }
  3812. func (s *GoogleCloudVideointelligenceV1p2beta1SpeechTranscriptionConfig) MarshalJSON() ([]byte, error) {
  3813. type NoMethod GoogleCloudVideointelligenceV1p2beta1SpeechTranscriptionConfig
  3814. raw := NoMethod(*s)
  3815. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3816. }
  3817. // GoogleCloudVideointelligenceV1p2beta1TextAnnotation: Annotations
  3818. // related to one detected OCR text snippet. This will contain
  3819. // the
  3820. // corresponding text, confidence value, and frame level information for
  3821. // each
  3822. // detection.
  3823. type GoogleCloudVideointelligenceV1p2beta1TextAnnotation struct {
  3824. // Segments: All video segments where OCR detected text appears.
  3825. Segments []*GoogleCloudVideointelligenceV1p2beta1TextSegment `json:"segments,omitempty"`
  3826. // Text: The detected text.
  3827. Text string `json:"text,omitempty"`
  3828. // ForceSendFields is a list of field names (e.g. "Segments") to
  3829. // unconditionally include in API requests. By default, fields with
  3830. // empty values are omitted from API requests. However, any non-pointer,
  3831. // non-interface field appearing in ForceSendFields will be sent to the
  3832. // server regardless of whether the field is empty or not. This may be
  3833. // used to include empty fields in Patch requests.
  3834. ForceSendFields []string `json:"-"`
  3835. // NullFields is a list of field names (e.g. "Segments") to include in
  3836. // API requests with the JSON null value. By default, fields with empty
  3837. // values are omitted from API requests. However, any field with an
  3838. // empty value appearing in NullFields will be sent to the server as
  3839. // null. It is an error if a field in this list has a non-empty value.
  3840. // This may be used to include null fields in Patch requests.
  3841. NullFields []string `json:"-"`
  3842. }
  3843. func (s *GoogleCloudVideointelligenceV1p2beta1TextAnnotation) MarshalJSON() ([]byte, error) {
  3844. type NoMethod GoogleCloudVideointelligenceV1p2beta1TextAnnotation
  3845. raw := NoMethod(*s)
  3846. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3847. }
  3848. // GoogleCloudVideointelligenceV1p2beta1TextDetectionConfig: Config for
  3849. // TEXT_DETECTION.
  3850. type GoogleCloudVideointelligenceV1p2beta1TextDetectionConfig struct {
  3851. // LanguageHints: Language hint can be specified if the language to be
  3852. // detected is known a
  3853. // priori. It can increase the accuracy of the detection. Language hint
  3854. // must
  3855. // be language code in BCP-47 format.
  3856. //
  3857. // Automatic language detection is performed if no hint is provided.
  3858. LanguageHints []string `json:"languageHints,omitempty"`
  3859. // ForceSendFields is a list of field names (e.g. "LanguageHints") to
  3860. // unconditionally include in API requests. By default, fields with
  3861. // empty values are omitted from API requests. However, any non-pointer,
  3862. // non-interface field appearing in ForceSendFields will be sent to the
  3863. // server regardless of whether the field is empty or not. This may be
  3864. // used to include empty fields in Patch requests.
  3865. ForceSendFields []string `json:"-"`
  3866. // NullFields is a list of field names (e.g. "LanguageHints") to include
  3867. // in API requests with the JSON null value. By default, fields with
  3868. // empty values are omitted from API requests. However, any field with
  3869. // an empty value appearing in NullFields will be sent to the server as
  3870. // null. It is an error if a field in this list has a non-empty value.
  3871. // This may be used to include null fields in Patch requests.
  3872. NullFields []string `json:"-"`
  3873. }
  3874. func (s *GoogleCloudVideointelligenceV1p2beta1TextDetectionConfig) MarshalJSON() ([]byte, error) {
  3875. type NoMethod GoogleCloudVideointelligenceV1p2beta1TextDetectionConfig
  3876. raw := NoMethod(*s)
  3877. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3878. }
  3879. // GoogleCloudVideointelligenceV1p2beta1TextFrame: Video frame level
  3880. // annotation results for text annotation (OCR).
  3881. // Contains information regarding timestamp and bounding box locations
  3882. // for the
  3883. // frames containing detected OCR text snippets.
  3884. type GoogleCloudVideointelligenceV1p2beta1TextFrame struct {
  3885. // RotatedBoundingBox: Bounding polygon of the detected text for this
  3886. // frame.
  3887. RotatedBoundingBox *GoogleCloudVideointelligenceV1p2beta1NormalizedBoundingPoly `json:"rotatedBoundingBox,omitempty"`
  3888. // TimeOffset: Timestamp of this frame.
  3889. TimeOffset string `json:"timeOffset,omitempty"`
  3890. // ForceSendFields is a list of field names (e.g. "RotatedBoundingBox")
  3891. // to unconditionally include in API requests. By default, fields with
  3892. // empty values are omitted from API requests. However, any non-pointer,
  3893. // non-interface field appearing in ForceSendFields will be sent to the
  3894. // server regardless of whether the field is empty or not. This may be
  3895. // used to include empty fields in Patch requests.
  3896. ForceSendFields []string `json:"-"`
  3897. // NullFields is a list of field names (e.g. "RotatedBoundingBox") to
  3898. // include in API requests with the JSON null value. By default, fields
  3899. // with empty values are omitted from API requests. However, any field
  3900. // with an empty value appearing in NullFields will be sent to the
  3901. // server as null. It is an error if a field in this list has a
  3902. // non-empty value. This may be used to include null fields in Patch
  3903. // requests.
  3904. NullFields []string `json:"-"`
  3905. }
  3906. func (s *GoogleCloudVideointelligenceV1p2beta1TextFrame) MarshalJSON() ([]byte, error) {
  3907. type NoMethod GoogleCloudVideointelligenceV1p2beta1TextFrame
  3908. raw := NoMethod(*s)
  3909. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3910. }
  3911. // GoogleCloudVideointelligenceV1p2beta1TextSegment: Video segment level
  3912. // annotation results for text detection.
  3913. type GoogleCloudVideointelligenceV1p2beta1TextSegment struct {
  3914. // Confidence: Confidence for the track of detected text. It is
  3915. // calculated as the highest
  3916. // over all frames where OCR detected text appears.
  3917. Confidence float64 `json:"confidence,omitempty"`
  3918. // Frames: Information related to the frames where OCR detected text
  3919. // appears.
  3920. Frames []*GoogleCloudVideointelligenceV1p2beta1TextFrame `json:"frames,omitempty"`
  3921. // Segment: Video segment where a text snippet was detected.
  3922. Segment *GoogleCloudVideointelligenceV1p2beta1VideoSegment `json:"segment,omitempty"`
  3923. // ForceSendFields is a list of field names (e.g. "Confidence") to
  3924. // unconditionally include in API requests. By default, fields with
  3925. // empty values are omitted from API requests. However, any non-pointer,
  3926. // non-interface field appearing in ForceSendFields will be sent to the
  3927. // server regardless of whether the field is empty or not. This may be
  3928. // used to include empty fields in Patch requests.
  3929. ForceSendFields []string `json:"-"`
  3930. // NullFields is a list of field names (e.g. "Confidence") to include in
  3931. // API requests with the JSON null value. By default, fields with empty
  3932. // values are omitted from API requests. However, any field with an
  3933. // empty value appearing in NullFields will be sent to the server as
  3934. // null. It is an error if a field in this list has a non-empty value.
  3935. // This may be used to include null fields in Patch requests.
  3936. NullFields []string `json:"-"`
  3937. }
  3938. func (s *GoogleCloudVideointelligenceV1p2beta1TextSegment) MarshalJSON() ([]byte, error) {
  3939. type NoMethod GoogleCloudVideointelligenceV1p2beta1TextSegment
  3940. raw := NoMethod(*s)
  3941. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3942. }
  3943. func (s *GoogleCloudVideointelligenceV1p2beta1TextSegment) UnmarshalJSON(data []byte) error {
  3944. type NoMethod GoogleCloudVideointelligenceV1p2beta1TextSegment
  3945. var s1 struct {
  3946. Confidence gensupport.JSONFloat64 `json:"confidence"`
  3947. *NoMethod
  3948. }
  3949. s1.NoMethod = (*NoMethod)(s)
  3950. if err := json.Unmarshal(data, &s1); err != nil {
  3951. return err
  3952. }
  3953. s.Confidence = float64(s1.Confidence)
  3954. return nil
  3955. }
  3956. // GoogleCloudVideointelligenceV1p2beta1VideoAnnotationProgress:
  3957. // Annotation progress for a single video.
  3958. type GoogleCloudVideointelligenceV1p2beta1VideoAnnotationProgress struct {
  3959. // InputUri: Video file location in
  3960. // [Google Cloud Storage](https://cloud.google.com/storage/).
  3961. InputUri string `json:"inputUri,omitempty"`
  3962. // ProgressPercent: Approximate percentage processed thus far.
  3963. // Guaranteed to be
  3964. // 100 when fully processed.
  3965. ProgressPercent int64 `json:"progressPercent,omitempty"`
  3966. // StartTime: Time when the request was received.
  3967. StartTime string `json:"startTime,omitempty"`
  3968. // UpdateTime: Time of the most recent update.
  3969. UpdateTime string `json:"updateTime,omitempty"`
  3970. // ForceSendFields is a list of field names (e.g. "InputUri") to
  3971. // unconditionally include in API requests. By default, fields with
  3972. // empty values are omitted from API requests. However, any non-pointer,
  3973. // non-interface field appearing in ForceSendFields will be sent to the
  3974. // server regardless of whether the field is empty or not. This may be
  3975. // used to include empty fields in Patch requests.
  3976. ForceSendFields []string `json:"-"`
  3977. // NullFields is a list of field names (e.g. "InputUri") to include in
  3978. // API requests with the JSON null value. By default, fields with empty
  3979. // values are omitted from API requests. However, any field with an
  3980. // empty value appearing in NullFields will be sent to the server as
  3981. // null. It is an error if a field in this list has a non-empty value.
  3982. // This may be used to include null fields in Patch requests.
  3983. NullFields []string `json:"-"`
  3984. }
  3985. func (s *GoogleCloudVideointelligenceV1p2beta1VideoAnnotationProgress) MarshalJSON() ([]byte, error) {
  3986. type NoMethod GoogleCloudVideointelligenceV1p2beta1VideoAnnotationProgress
  3987. raw := NoMethod(*s)
  3988. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3989. }
  3990. // GoogleCloudVideointelligenceV1p2beta1VideoAnnotationResults:
  3991. // Annotation results for a single video.
  3992. type GoogleCloudVideointelligenceV1p2beta1VideoAnnotationResults struct {
  3993. // Error: If set, indicates an error. Note that for a single
  3994. // `AnnotateVideoRequest`
  3995. // some videos may succeed and some may fail.
  3996. Error *GoogleRpcStatus `json:"error,omitempty"`
  3997. // ExplicitAnnotation: Explicit content annotation.
  3998. ExplicitAnnotation *GoogleCloudVideointelligenceV1p2beta1ExplicitContentAnnotation `json:"explicitAnnotation,omitempty"`
  3999. // FrameLabelAnnotations: Label annotations on frame level.
  4000. // There is exactly one element for each unique label.
  4001. FrameLabelAnnotations []*GoogleCloudVideointelligenceV1p2beta1LabelAnnotation `json:"frameLabelAnnotations,omitempty"`
  4002. // InputUri: Video file location in
  4003. // [Google Cloud Storage](https://cloud.google.com/storage/).
  4004. InputUri string `json:"inputUri,omitempty"`
  4005. // ObjectAnnotations: Annotations for list of objects detected and
  4006. // tracked in video.
  4007. ObjectAnnotations []*GoogleCloudVideointelligenceV1p2beta1ObjectTrackingAnnotation `json:"objectAnnotations,omitempty"`
  4008. // SegmentLabelAnnotations: Label annotations on video level or user
  4009. // specified segment level.
  4010. // There is exactly one element for each unique label.
  4011. SegmentLabelAnnotations []*GoogleCloudVideointelligenceV1p2beta1LabelAnnotation `json:"segmentLabelAnnotations,omitempty"`
  4012. // ShotAnnotations: Shot annotations. Each shot is represented as a
  4013. // video segment.
  4014. ShotAnnotations []*GoogleCloudVideointelligenceV1p2beta1VideoSegment `json:"shotAnnotations,omitempty"`
  4015. // ShotLabelAnnotations: Label annotations on shot level.
  4016. // There is exactly one element for each unique label.
  4017. ShotLabelAnnotations []*GoogleCloudVideointelligenceV1p2beta1LabelAnnotation `json:"shotLabelAnnotations,omitempty"`
  4018. // SpeechTranscriptions: Speech transcription.
  4019. SpeechTranscriptions []*GoogleCloudVideointelligenceV1p2beta1SpeechTranscription `json:"speechTranscriptions,omitempty"`
  4020. // TextAnnotations: OCR text detection and tracking.
  4021. // Annotations for list of detected text snippets. Each will have list
  4022. // of
  4023. // frame information associated with it.
  4024. TextAnnotations []*GoogleCloudVideointelligenceV1p2beta1TextAnnotation `json:"textAnnotations,omitempty"`
  4025. // ForceSendFields is a list of field names (e.g. "Error") to
  4026. // unconditionally include in API requests. By default, fields with
  4027. // empty values are omitted from API requests. However, any non-pointer,
  4028. // non-interface field appearing in ForceSendFields will be sent to the
  4029. // server regardless of whether the field is empty or not. This may be
  4030. // used to include empty fields in Patch requests.
  4031. ForceSendFields []string `json:"-"`
  4032. // NullFields is a list of field names (e.g. "Error") to include in API
  4033. // requests with the JSON null value. By default, fields with empty
  4034. // values are omitted from API requests. However, any field with an
  4035. // empty value appearing in NullFields will be sent to the server as
  4036. // null. It is an error if a field in this list has a non-empty value.
  4037. // This may be used to include null fields in Patch requests.
  4038. NullFields []string `json:"-"`
  4039. }
  4040. func (s *GoogleCloudVideointelligenceV1p2beta1VideoAnnotationResults) MarshalJSON() ([]byte, error) {
  4041. type NoMethod GoogleCloudVideointelligenceV1p2beta1VideoAnnotationResults
  4042. raw := NoMethod(*s)
  4043. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4044. }
  4045. // GoogleCloudVideointelligenceV1p2beta1VideoContext: Video context
  4046. // and/or feature-specific parameters.
  4047. type GoogleCloudVideointelligenceV1p2beta1VideoContext struct {
  4048. // ExplicitContentDetectionConfig: Config for
  4049. // EXPLICIT_CONTENT_DETECTION.
  4050. ExplicitContentDetectionConfig *GoogleCloudVideointelligenceV1p2beta1ExplicitContentDetectionConfig `json:"explicitContentDetectionConfig,omitempty"`
  4051. // LabelDetectionConfig: Config for LABEL_DETECTION.
  4052. LabelDetectionConfig *GoogleCloudVideointelligenceV1p2beta1LabelDetectionConfig `json:"labelDetectionConfig,omitempty"`
  4053. // Segments: Video segments to annotate. The segments may overlap and
  4054. // are not required
  4055. // to be contiguous or span the whole video. If unspecified, each video
  4056. // is
  4057. // treated as a single segment.
  4058. Segments []*GoogleCloudVideointelligenceV1p2beta1VideoSegment `json:"segments,omitempty"`
  4059. // ShotChangeDetectionConfig: Config for SHOT_CHANGE_DETECTION.
  4060. ShotChangeDetectionConfig *GoogleCloudVideointelligenceV1p2beta1ShotChangeDetectionConfig `json:"shotChangeDetectionConfig,omitempty"`
  4061. // SpeechTranscriptionConfig: Config for SPEECH_TRANSCRIPTION.
  4062. SpeechTranscriptionConfig *GoogleCloudVideointelligenceV1p2beta1SpeechTranscriptionConfig `json:"speechTranscriptionConfig,omitempty"`
  4063. // TextDetectionConfig: Config for TEXT_DETECTION.
  4064. TextDetectionConfig *GoogleCloudVideointelligenceV1p2beta1TextDetectionConfig `json:"textDetectionConfig,omitempty"`
  4065. // ForceSendFields is a list of field names (e.g.
  4066. // "ExplicitContentDetectionConfig") to unconditionally include in API
  4067. // requests. By default, fields with empty values are omitted from API
  4068. // requests. However, any non-pointer, non-interface field appearing in
  4069. // ForceSendFields will be sent to the server regardless of whether the
  4070. // field is empty or not. This may be used to include empty fields in
  4071. // Patch requests.
  4072. ForceSendFields []string `json:"-"`
  4073. // NullFields is a list of field names (e.g.
  4074. // "ExplicitContentDetectionConfig") to include in API requests with the
  4075. // JSON null value. By default, fields with empty values are omitted
  4076. // from API requests. However, any field with an empty value appearing
  4077. // in NullFields will be sent to the server as null. It is an error if a
  4078. // field in this list has a non-empty value. This may be used to include
  4079. // null fields in Patch requests.
  4080. NullFields []string `json:"-"`
  4081. }
  4082. func (s *GoogleCloudVideointelligenceV1p2beta1VideoContext) MarshalJSON() ([]byte, error) {
  4083. type NoMethod GoogleCloudVideointelligenceV1p2beta1VideoContext
  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. googlecloudvideointelligencev1p2beta1Annotatevideorequest *GoogleCloudVideointelligenceV1p2beta1AnnotateVideoRequest
  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(googlecloudvideointelligencev1p2beta1Annotatevideorequest *GoogleCloudVideointelligenceV1p2beta1AnnotateVideoRequest) *VideosAnnotateCall {
  5377. c := &VideosAnnotateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5378. c.googlecloudvideointelligencev1p2beta1Annotatevideorequest = googlecloudvideointelligencev1p2beta1Annotatevideorequest
  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.googlecloudvideointelligencev1p2beta1Annotatevideorequest)
  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, "v1p2beta1/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": "v1p2beta1/videos:annotate",
  5466. // "httpMethod": "POST",
  5467. // "id": "videointelligence.videos.annotate",
  5468. // "parameterOrder": [],
  5469. // "parameters": {},
  5470. // "path": "v1p2beta1/videos:annotate",
  5471. // "request": {
  5472. // "$ref": "GoogleCloudVideointelligenceV1p2beta1_AnnotateVideoRequest"
  5473. // },
  5474. // "response": {
  5475. // "$ref": "GoogleLongrunning_Operation"
  5476. // },
  5477. // "scopes": [
  5478. // "https://www.googleapis.com/auth/cloud-platform"
  5479. // ]
  5480. // }
  5481. }