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/v1p3beta1"
  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/v1p3beta1"
  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:v1p3beta1"
  69. const apiName = "videointelligence"
  70. const apiVersion = "v1p3beta1"
  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. // GoogleCloudVideointelligenceV1p2beta1AnnotateVideoResponse: Video
  2890. // annotation response. Included in the `response`
  2891. // field of the `Operation` returned by the `GetOperation`
  2892. // call of the `google::longrunning::Operations` service.
  2893. type GoogleCloudVideointelligenceV1p2beta1AnnotateVideoResponse struct {
  2894. // AnnotationResults: Annotation results for all videos specified in
  2895. // `AnnotateVideoRequest`.
  2896. AnnotationResults []*GoogleCloudVideointelligenceV1p2beta1VideoAnnotationResults `json:"annotationResults,omitempty"`
  2897. // ForceSendFields is a list of field names (e.g. "AnnotationResults")
  2898. // to unconditionally include in API requests. By default, fields with
  2899. // empty values are omitted from API requests. However, any non-pointer,
  2900. // non-interface field appearing in ForceSendFields will be sent to the
  2901. // server regardless of whether the field is empty or not. This may be
  2902. // used to include empty fields in Patch requests.
  2903. ForceSendFields []string `json:"-"`
  2904. // NullFields is a list of field names (e.g. "AnnotationResults") to
  2905. // include in API requests with the JSON null value. By default, fields
  2906. // with empty values are omitted from API requests. However, any field
  2907. // with an empty value appearing in NullFields will be sent to the
  2908. // server as null. It is an error if a field in this list has a
  2909. // non-empty value. This may be used to include null fields in Patch
  2910. // requests.
  2911. NullFields []string `json:"-"`
  2912. }
  2913. func (s *GoogleCloudVideointelligenceV1p2beta1AnnotateVideoResponse) MarshalJSON() ([]byte, error) {
  2914. type NoMethod GoogleCloudVideointelligenceV1p2beta1AnnotateVideoResponse
  2915. raw := NoMethod(*s)
  2916. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2917. }
  2918. // GoogleCloudVideointelligenceV1p2beta1Entity: Detected entity from
  2919. // video analysis.
  2920. type GoogleCloudVideointelligenceV1p2beta1Entity struct {
  2921. // Description: Textual description, e.g. `Fixed-gear bicycle`.
  2922. Description string `json:"description,omitempty"`
  2923. // EntityId: Opaque entity ID. Some IDs may be available in
  2924. // [Google Knowledge Graph
  2925. // Search
  2926. // API](https://developers.google.com/knowledge-graph/).
  2927. EntityId string `json:"entityId,omitempty"`
  2928. // LanguageCode: Language code for `description` in BCP-47 format.
  2929. LanguageCode string `json:"languageCode,omitempty"`
  2930. // ForceSendFields is a list of field names (e.g. "Description") to
  2931. // unconditionally include in API requests. By default, fields with
  2932. // empty values are omitted from API requests. However, any non-pointer,
  2933. // non-interface field appearing in ForceSendFields will be sent to the
  2934. // server regardless of whether the field is empty or not. This may be
  2935. // used to include empty fields in Patch requests.
  2936. ForceSendFields []string `json:"-"`
  2937. // NullFields is a list of field names (e.g. "Description") to include
  2938. // in API requests with the JSON null value. By default, fields with
  2939. // empty values are omitted from API requests. However, any field with
  2940. // an empty value appearing in NullFields will be sent to the server as
  2941. // null. It is an error if a field in this list has a non-empty value.
  2942. // This may be used to include null fields in Patch requests.
  2943. NullFields []string `json:"-"`
  2944. }
  2945. func (s *GoogleCloudVideointelligenceV1p2beta1Entity) MarshalJSON() ([]byte, error) {
  2946. type NoMethod GoogleCloudVideointelligenceV1p2beta1Entity
  2947. raw := NoMethod(*s)
  2948. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2949. }
  2950. // GoogleCloudVideointelligenceV1p2beta1ExplicitContentAnnotation:
  2951. // Explicit content annotation (based on per-frame visual signals
  2952. // only).
  2953. // If no explicit content has been detected in a frame, no annotations
  2954. // are
  2955. // present for that frame.
  2956. type GoogleCloudVideointelligenceV1p2beta1ExplicitContentAnnotation struct {
  2957. // Frames: All video frames where explicit content was detected.
  2958. Frames []*GoogleCloudVideointelligenceV1p2beta1ExplicitContentFrame `json:"frames,omitempty"`
  2959. // ForceSendFields is a list of field names (e.g. "Frames") to
  2960. // unconditionally include in API requests. By default, fields with
  2961. // empty values are omitted from API requests. However, any non-pointer,
  2962. // non-interface field appearing in ForceSendFields will be sent to the
  2963. // server regardless of whether the field is empty or not. This may be
  2964. // used to include empty fields in Patch requests.
  2965. ForceSendFields []string `json:"-"`
  2966. // NullFields is a list of field names (e.g. "Frames") to include in API
  2967. // requests with the JSON null value. By default, fields with empty
  2968. // values are omitted from API requests. However, any field with an
  2969. // empty value appearing in NullFields will be sent to the server as
  2970. // null. It is an error if a field in this list has a non-empty value.
  2971. // This may be used to include null fields in Patch requests.
  2972. NullFields []string `json:"-"`
  2973. }
  2974. func (s *GoogleCloudVideointelligenceV1p2beta1ExplicitContentAnnotation) MarshalJSON() ([]byte, error) {
  2975. type NoMethod GoogleCloudVideointelligenceV1p2beta1ExplicitContentAnnotation
  2976. raw := NoMethod(*s)
  2977. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2978. }
  2979. // GoogleCloudVideointelligenceV1p2beta1ExplicitContentFrame: Video
  2980. // frame level annotation results for explicit content.
  2981. type GoogleCloudVideointelligenceV1p2beta1ExplicitContentFrame struct {
  2982. // PornographyLikelihood: Likelihood of the pornography content..
  2983. //
  2984. // Possible values:
  2985. // "LIKELIHOOD_UNSPECIFIED" - Unspecified likelihood.
  2986. // "VERY_UNLIKELY" - Very unlikely.
  2987. // "UNLIKELY" - Unlikely.
  2988. // "POSSIBLE" - Possible.
  2989. // "LIKELY" - Likely.
  2990. // "VERY_LIKELY" - Very likely.
  2991. PornographyLikelihood string `json:"pornographyLikelihood,omitempty"`
  2992. // TimeOffset: Time-offset, relative to the beginning of the video,
  2993. // corresponding to the
  2994. // video frame for this location.
  2995. TimeOffset string `json:"timeOffset,omitempty"`
  2996. // ForceSendFields is a list of field names (e.g.
  2997. // "PornographyLikelihood") to unconditionally include in API requests.
  2998. // By default, fields with empty values are omitted from API requests.
  2999. // However, any non-pointer, non-interface field appearing in
  3000. // ForceSendFields will be sent to the server regardless of whether the
  3001. // field is empty or not. This may be used to include empty fields in
  3002. // Patch requests.
  3003. ForceSendFields []string `json:"-"`
  3004. // NullFields is a list of field names (e.g. "PornographyLikelihood") to
  3005. // include in API requests with the JSON null value. By default, fields
  3006. // with empty values are omitted from API requests. However, any field
  3007. // with an empty value appearing in NullFields will be sent to the
  3008. // server as null. It is an error if a field in this list has a
  3009. // non-empty value. This may be used to include null fields in Patch
  3010. // requests.
  3011. NullFields []string `json:"-"`
  3012. }
  3013. func (s *GoogleCloudVideointelligenceV1p2beta1ExplicitContentFrame) MarshalJSON() ([]byte, error) {
  3014. type NoMethod GoogleCloudVideointelligenceV1p2beta1ExplicitContentFrame
  3015. raw := NoMethod(*s)
  3016. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3017. }
  3018. // GoogleCloudVideointelligenceV1p2beta1LabelAnnotation: Label
  3019. // annotation.
  3020. type GoogleCloudVideointelligenceV1p2beta1LabelAnnotation struct {
  3021. // CategoryEntities: Common categories for the detected entity.
  3022. // E.g. when the label is `Terrier` the category is likely `dog`. And in
  3023. // some
  3024. // cases there might be more than one categories e.g. `Terrier` could
  3025. // also be
  3026. // a `pet`.
  3027. CategoryEntities []*GoogleCloudVideointelligenceV1p2beta1Entity `json:"categoryEntities,omitempty"`
  3028. // Entity: Detected entity.
  3029. Entity *GoogleCloudVideointelligenceV1p2beta1Entity `json:"entity,omitempty"`
  3030. // Frames: All video frames where a label was detected.
  3031. Frames []*GoogleCloudVideointelligenceV1p2beta1LabelFrame `json:"frames,omitempty"`
  3032. // Segments: All video segments where a label was detected.
  3033. Segments []*GoogleCloudVideointelligenceV1p2beta1LabelSegment `json:"segments,omitempty"`
  3034. // ForceSendFields is a list of field names (e.g. "CategoryEntities") to
  3035. // unconditionally include in API requests. By default, fields with
  3036. // empty values are omitted from API requests. However, any non-pointer,
  3037. // non-interface field appearing in ForceSendFields will be sent to the
  3038. // server regardless of whether the field is empty or not. This may be
  3039. // used to include empty fields in Patch requests.
  3040. ForceSendFields []string `json:"-"`
  3041. // NullFields is a list of field names (e.g. "CategoryEntities") to
  3042. // include in API requests with the JSON null value. By default, fields
  3043. // with empty values are omitted from API requests. However, any field
  3044. // with an empty value appearing in NullFields will be sent to the
  3045. // server as null. It is an error if a field in this list has a
  3046. // non-empty value. This may be used to include null fields in Patch
  3047. // requests.
  3048. NullFields []string `json:"-"`
  3049. }
  3050. func (s *GoogleCloudVideointelligenceV1p2beta1LabelAnnotation) MarshalJSON() ([]byte, error) {
  3051. type NoMethod GoogleCloudVideointelligenceV1p2beta1LabelAnnotation
  3052. raw := NoMethod(*s)
  3053. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3054. }
  3055. // GoogleCloudVideointelligenceV1p2beta1LabelFrame: Video frame level
  3056. // annotation results for label detection.
  3057. type GoogleCloudVideointelligenceV1p2beta1LabelFrame struct {
  3058. // Confidence: Confidence that the label is accurate. Range: [0, 1].
  3059. Confidence float64 `json:"confidence,omitempty"`
  3060. // TimeOffset: Time-offset, relative to the beginning of the video,
  3061. // corresponding to the
  3062. // video frame for this location.
  3063. TimeOffset string `json:"timeOffset,omitempty"`
  3064. // ForceSendFields is a list of field names (e.g. "Confidence") to
  3065. // unconditionally include in API requests. By default, fields with
  3066. // empty values are omitted from API requests. However, any non-pointer,
  3067. // non-interface field appearing in ForceSendFields will be sent to the
  3068. // server regardless of whether the field is empty or not. This may be
  3069. // used to include empty fields in Patch requests.
  3070. ForceSendFields []string `json:"-"`
  3071. // NullFields is a list of field names (e.g. "Confidence") to include in
  3072. // API requests with the JSON null value. By default, fields with empty
  3073. // values are omitted from API requests. However, any field with an
  3074. // empty value appearing in NullFields will be sent to the server as
  3075. // null. It is an error if a field in this list has a non-empty value.
  3076. // This may be used to include null fields in Patch requests.
  3077. NullFields []string `json:"-"`
  3078. }
  3079. func (s *GoogleCloudVideointelligenceV1p2beta1LabelFrame) MarshalJSON() ([]byte, error) {
  3080. type NoMethod GoogleCloudVideointelligenceV1p2beta1LabelFrame
  3081. raw := NoMethod(*s)
  3082. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3083. }
  3084. func (s *GoogleCloudVideointelligenceV1p2beta1LabelFrame) UnmarshalJSON(data []byte) error {
  3085. type NoMethod GoogleCloudVideointelligenceV1p2beta1LabelFrame
  3086. var s1 struct {
  3087. Confidence gensupport.JSONFloat64 `json:"confidence"`
  3088. *NoMethod
  3089. }
  3090. s1.NoMethod = (*NoMethod)(s)
  3091. if err := json.Unmarshal(data, &s1); err != nil {
  3092. return err
  3093. }
  3094. s.Confidence = float64(s1.Confidence)
  3095. return nil
  3096. }
  3097. // GoogleCloudVideointelligenceV1p2beta1LabelSegment: Video segment
  3098. // level annotation results for label detection.
  3099. type GoogleCloudVideointelligenceV1p2beta1LabelSegment struct {
  3100. // Confidence: Confidence that the label is accurate. Range: [0, 1].
  3101. Confidence float64 `json:"confidence,omitempty"`
  3102. // Segment: Video segment where a label was detected.
  3103. Segment *GoogleCloudVideointelligenceV1p2beta1VideoSegment `json:"segment,omitempty"`
  3104. // ForceSendFields is a list of field names (e.g. "Confidence") to
  3105. // unconditionally include in API requests. By default, fields with
  3106. // empty values are omitted from API requests. However, any non-pointer,
  3107. // non-interface field appearing in ForceSendFields will be sent to the
  3108. // server regardless of whether the field is empty or not. This may be
  3109. // used to include empty fields in Patch requests.
  3110. ForceSendFields []string `json:"-"`
  3111. // NullFields is a list of field names (e.g. "Confidence") to include in
  3112. // API requests with the JSON null value. By default, fields with empty
  3113. // values are omitted from API requests. However, any field with an
  3114. // empty value appearing in NullFields will be sent to the server as
  3115. // null. It is an error if a field in this list has a non-empty value.
  3116. // This may be used to include null fields in Patch requests.
  3117. NullFields []string `json:"-"`
  3118. }
  3119. func (s *GoogleCloudVideointelligenceV1p2beta1LabelSegment) MarshalJSON() ([]byte, error) {
  3120. type NoMethod GoogleCloudVideointelligenceV1p2beta1LabelSegment
  3121. raw := NoMethod(*s)
  3122. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3123. }
  3124. func (s *GoogleCloudVideointelligenceV1p2beta1LabelSegment) UnmarshalJSON(data []byte) error {
  3125. type NoMethod GoogleCloudVideointelligenceV1p2beta1LabelSegment
  3126. var s1 struct {
  3127. Confidence gensupport.JSONFloat64 `json:"confidence"`
  3128. *NoMethod
  3129. }
  3130. s1.NoMethod = (*NoMethod)(s)
  3131. if err := json.Unmarshal(data, &s1); err != nil {
  3132. return err
  3133. }
  3134. s.Confidence = float64(s1.Confidence)
  3135. return nil
  3136. }
  3137. // GoogleCloudVideointelligenceV1p2beta1NormalizedBoundingBox:
  3138. // Normalized bounding box.
  3139. // The normalized vertex coordinates are relative to the original
  3140. // image.
  3141. // Range: [0, 1].
  3142. type GoogleCloudVideointelligenceV1p2beta1NormalizedBoundingBox struct {
  3143. // Bottom: Bottom Y coordinate.
  3144. Bottom float64 `json:"bottom,omitempty"`
  3145. // Left: Left X coordinate.
  3146. Left float64 `json:"left,omitempty"`
  3147. // Right: Right X coordinate.
  3148. Right float64 `json:"right,omitempty"`
  3149. // Top: Top Y coordinate.
  3150. Top float64 `json:"top,omitempty"`
  3151. // ForceSendFields is a list of field names (e.g. "Bottom") to
  3152. // unconditionally include in API requests. By default, fields with
  3153. // empty values are omitted from API requests. However, any non-pointer,
  3154. // non-interface field appearing in ForceSendFields will be sent to the
  3155. // server regardless of whether the field is empty or not. This may be
  3156. // used to include empty fields in Patch requests.
  3157. ForceSendFields []string `json:"-"`
  3158. // NullFields is a list of field names (e.g. "Bottom") to include in API
  3159. // requests with the JSON null value. By default, fields with empty
  3160. // values are omitted from API requests. However, any field with an
  3161. // empty value appearing in NullFields will be sent to the server as
  3162. // null. It is an error if a field in this list has a non-empty value.
  3163. // This may be used to include null fields in Patch requests.
  3164. NullFields []string `json:"-"`
  3165. }
  3166. func (s *GoogleCloudVideointelligenceV1p2beta1NormalizedBoundingBox) MarshalJSON() ([]byte, error) {
  3167. type NoMethod GoogleCloudVideointelligenceV1p2beta1NormalizedBoundingBox
  3168. raw := NoMethod(*s)
  3169. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3170. }
  3171. func (s *GoogleCloudVideointelligenceV1p2beta1NormalizedBoundingBox) UnmarshalJSON(data []byte) error {
  3172. type NoMethod GoogleCloudVideointelligenceV1p2beta1NormalizedBoundingBox
  3173. var s1 struct {
  3174. Bottom gensupport.JSONFloat64 `json:"bottom"`
  3175. Left gensupport.JSONFloat64 `json:"left"`
  3176. Right gensupport.JSONFloat64 `json:"right"`
  3177. Top gensupport.JSONFloat64 `json:"top"`
  3178. *NoMethod
  3179. }
  3180. s1.NoMethod = (*NoMethod)(s)
  3181. if err := json.Unmarshal(data, &s1); err != nil {
  3182. return err
  3183. }
  3184. s.Bottom = float64(s1.Bottom)
  3185. s.Left = float64(s1.Left)
  3186. s.Right = float64(s1.Right)
  3187. s.Top = float64(s1.Top)
  3188. return nil
  3189. }
  3190. // GoogleCloudVideointelligenceV1p2beta1NormalizedBoundingPoly:
  3191. // Normalized bounding polygon for text (that might not be aligned with
  3192. // axis).
  3193. // Contains list of the corner points in clockwise order starting
  3194. // from
  3195. // top-left corner. For example, for a rectangular bounding box:
  3196. // When the text is horizontal it might look like:
  3197. // 0----1
  3198. // | |
  3199. // 3----2
  3200. //
  3201. // When it's clockwise rotated 180 degrees around the top-left corner
  3202. // it
  3203. // becomes:
  3204. // 2----3
  3205. // | |
  3206. // 1----0
  3207. //
  3208. // and the vertex order will still be (0, 1, 2, 3). Note that values can
  3209. // be less
  3210. // than 0, or greater than 1 due to trignometric calculations for
  3211. // location of
  3212. // the box.
  3213. type GoogleCloudVideointelligenceV1p2beta1NormalizedBoundingPoly struct {
  3214. // Vertices: Normalized vertices of the bounding polygon.
  3215. Vertices []*GoogleCloudVideointelligenceV1p2beta1NormalizedVertex `json:"vertices,omitempty"`
  3216. // ForceSendFields is a list of field names (e.g. "Vertices") to
  3217. // unconditionally include in API requests. By default, fields with
  3218. // empty values are omitted from API requests. However, any non-pointer,
  3219. // non-interface field appearing in ForceSendFields will be sent to the
  3220. // server regardless of whether the field is empty or not. This may be
  3221. // used to include empty fields in Patch requests.
  3222. ForceSendFields []string `json:"-"`
  3223. // NullFields is a list of field names (e.g. "Vertices") to include in
  3224. // API requests with the JSON null value. By default, fields with empty
  3225. // values are omitted from API requests. However, any field with an
  3226. // empty value appearing in NullFields will be sent to the server as
  3227. // null. It is an error if a field in this list has a non-empty value.
  3228. // This may be used to include null fields in Patch requests.
  3229. NullFields []string `json:"-"`
  3230. }
  3231. func (s *GoogleCloudVideointelligenceV1p2beta1NormalizedBoundingPoly) MarshalJSON() ([]byte, error) {
  3232. type NoMethod GoogleCloudVideointelligenceV1p2beta1NormalizedBoundingPoly
  3233. raw := NoMethod(*s)
  3234. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3235. }
  3236. // GoogleCloudVideointelligenceV1p2beta1NormalizedVertex: A vertex
  3237. // represents a 2D point in the image.
  3238. // NOTE: the normalized vertex coordinates are relative to the original
  3239. // image
  3240. // and range from 0 to 1.
  3241. type GoogleCloudVideointelligenceV1p2beta1NormalizedVertex struct {
  3242. // X: X coordinate.
  3243. X float64 `json:"x,omitempty"`
  3244. // Y: Y coordinate.
  3245. Y float64 `json:"y,omitempty"`
  3246. // ForceSendFields is a list of field names (e.g. "X") to
  3247. // unconditionally include in API requests. By default, fields with
  3248. // empty values are omitted from API requests. However, any non-pointer,
  3249. // non-interface field appearing in ForceSendFields will be sent to the
  3250. // server regardless of whether the field is empty or not. This may be
  3251. // used to include empty fields in Patch requests.
  3252. ForceSendFields []string `json:"-"`
  3253. // NullFields is a list of field names (e.g. "X") to include in API
  3254. // requests with the JSON null value. By default, fields with empty
  3255. // values are omitted from API requests. However, any field with an
  3256. // empty value appearing in NullFields will be sent to the server as
  3257. // null. It is an error if a field in this list has a non-empty value.
  3258. // This may be used to include null fields in Patch requests.
  3259. NullFields []string `json:"-"`
  3260. }
  3261. func (s *GoogleCloudVideointelligenceV1p2beta1NormalizedVertex) MarshalJSON() ([]byte, error) {
  3262. type NoMethod GoogleCloudVideointelligenceV1p2beta1NormalizedVertex
  3263. raw := NoMethod(*s)
  3264. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3265. }
  3266. func (s *GoogleCloudVideointelligenceV1p2beta1NormalizedVertex) UnmarshalJSON(data []byte) error {
  3267. type NoMethod GoogleCloudVideointelligenceV1p2beta1NormalizedVertex
  3268. var s1 struct {
  3269. X gensupport.JSONFloat64 `json:"x"`
  3270. Y gensupport.JSONFloat64 `json:"y"`
  3271. *NoMethod
  3272. }
  3273. s1.NoMethod = (*NoMethod)(s)
  3274. if err := json.Unmarshal(data, &s1); err != nil {
  3275. return err
  3276. }
  3277. s.X = float64(s1.X)
  3278. s.Y = float64(s1.Y)
  3279. return nil
  3280. }
  3281. // GoogleCloudVideointelligenceV1p2beta1ObjectTrackingAnnotation:
  3282. // Annotations corresponding to one tracked object.
  3283. type GoogleCloudVideointelligenceV1p2beta1ObjectTrackingAnnotation struct {
  3284. // Confidence: Object category's labeling confidence of this track.
  3285. Confidence float64 `json:"confidence,omitempty"`
  3286. // Entity: Entity to specify the object category that this track is
  3287. // labeled as.
  3288. Entity *GoogleCloudVideointelligenceV1p2beta1Entity `json:"entity,omitempty"`
  3289. // Frames: Information corresponding to all frames where this object
  3290. // track appears.
  3291. // Non-streaming batch mode: it may be one or multiple
  3292. // ObjectTrackingFrame
  3293. // messages in frames.
  3294. // Streaming mode: it can only be one ObjectTrackingFrame message in
  3295. // frames.
  3296. Frames []*GoogleCloudVideointelligenceV1p2beta1ObjectTrackingFrame `json:"frames,omitempty"`
  3297. // Segment: Non-streaming batch mode ONLY.
  3298. // Each object track corresponds to one video segment where it appears.
  3299. Segment *GoogleCloudVideointelligenceV1p2beta1VideoSegment `json:"segment,omitempty"`
  3300. // TrackId: Streaming mode ONLY.
  3301. // In streaming mode, we do not know the end time of a tracked
  3302. // object
  3303. // before it is completed. Hence, there is no VideoSegment info
  3304. // returned.
  3305. // Instead, we provide a unique identifiable integer track_id so
  3306. // that
  3307. // the customers can correlate the results of the
  3308. // ongoing
  3309. // ObjectTrackAnnotation of the same track_id over time.
  3310. TrackId int64 `json:"trackId,omitempty,string"`
  3311. // ForceSendFields is a list of field names (e.g. "Confidence") to
  3312. // unconditionally include in API requests. By default, fields with
  3313. // empty values are omitted from API requests. However, any non-pointer,
  3314. // non-interface field appearing in ForceSendFields will be sent to the
  3315. // server regardless of whether the field is empty or not. This may be
  3316. // used to include empty fields in Patch requests.
  3317. ForceSendFields []string `json:"-"`
  3318. // NullFields is a list of field names (e.g. "Confidence") to include in
  3319. // API requests with the JSON null value. By default, fields with empty
  3320. // values are omitted from API requests. However, any field with an
  3321. // empty value appearing in NullFields will be sent to the server as
  3322. // null. It is an error if a field in this list has a non-empty value.
  3323. // This may be used to include null fields in Patch requests.
  3324. NullFields []string `json:"-"`
  3325. }
  3326. func (s *GoogleCloudVideointelligenceV1p2beta1ObjectTrackingAnnotation) MarshalJSON() ([]byte, error) {
  3327. type NoMethod GoogleCloudVideointelligenceV1p2beta1ObjectTrackingAnnotation
  3328. raw := NoMethod(*s)
  3329. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3330. }
  3331. func (s *GoogleCloudVideointelligenceV1p2beta1ObjectTrackingAnnotation) UnmarshalJSON(data []byte) error {
  3332. type NoMethod GoogleCloudVideointelligenceV1p2beta1ObjectTrackingAnnotation
  3333. var s1 struct {
  3334. Confidence gensupport.JSONFloat64 `json:"confidence"`
  3335. *NoMethod
  3336. }
  3337. s1.NoMethod = (*NoMethod)(s)
  3338. if err := json.Unmarshal(data, &s1); err != nil {
  3339. return err
  3340. }
  3341. s.Confidence = float64(s1.Confidence)
  3342. return nil
  3343. }
  3344. // GoogleCloudVideointelligenceV1p2beta1ObjectTrackingFrame: Video frame
  3345. // level annotations for object detection and tracking. This
  3346. // field
  3347. // stores per frame location, time offset, and confidence.
  3348. type GoogleCloudVideointelligenceV1p2beta1ObjectTrackingFrame struct {
  3349. // NormalizedBoundingBox: The normalized bounding box location of this
  3350. // object track for the frame.
  3351. NormalizedBoundingBox *GoogleCloudVideointelligenceV1p2beta1NormalizedBoundingBox `json:"normalizedBoundingBox,omitempty"`
  3352. // TimeOffset: The timestamp of the frame in microseconds.
  3353. TimeOffset string `json:"timeOffset,omitempty"`
  3354. // ForceSendFields is a list of field names (e.g.
  3355. // "NormalizedBoundingBox") to unconditionally include in API requests.
  3356. // By default, fields with empty values are omitted from API requests.
  3357. // However, any non-pointer, non-interface field appearing in
  3358. // ForceSendFields will be sent to the server regardless of whether the
  3359. // field is empty or not. This may be used to include empty fields in
  3360. // Patch requests.
  3361. ForceSendFields []string `json:"-"`
  3362. // NullFields is a list of field names (e.g. "NormalizedBoundingBox") to
  3363. // include in API requests with the JSON null value. By default, fields
  3364. // with empty values are omitted from API requests. However, any field
  3365. // with an empty value appearing in NullFields will be sent to the
  3366. // server as null. It is an error if a field in this list has a
  3367. // non-empty value. This may be used to include null fields in Patch
  3368. // requests.
  3369. NullFields []string `json:"-"`
  3370. }
  3371. func (s *GoogleCloudVideointelligenceV1p2beta1ObjectTrackingFrame) MarshalJSON() ([]byte, error) {
  3372. type NoMethod GoogleCloudVideointelligenceV1p2beta1ObjectTrackingFrame
  3373. raw := NoMethod(*s)
  3374. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3375. }
  3376. // GoogleCloudVideointelligenceV1p2beta1SpeechRecognitionAlternative:
  3377. // Alternative hypotheses (a.k.a. n-best list).
  3378. type GoogleCloudVideointelligenceV1p2beta1SpeechRecognitionAlternative struct {
  3379. // Confidence: The confidence estimate between 0.0 and 1.0. A higher
  3380. // number
  3381. // indicates an estimated greater likelihood that the recognized words
  3382. // are
  3383. // correct. This field is typically provided only for the top
  3384. // hypothesis, and
  3385. // only for `is_final=true` results. Clients should not rely on
  3386. // the
  3387. // `confidence` field as it is not guaranteed to be accurate or
  3388. // consistent.
  3389. // The default of 0.0 is a sentinel value indicating `confidence` was
  3390. // not set.
  3391. Confidence float64 `json:"confidence,omitempty"`
  3392. // Transcript: Transcript text representing the words that the user
  3393. // spoke.
  3394. Transcript string `json:"transcript,omitempty"`
  3395. // Words: A list of word-specific information for each recognized word.
  3396. Words []*GoogleCloudVideointelligenceV1p2beta1WordInfo `json:"words,omitempty"`
  3397. // ForceSendFields is a list of field names (e.g. "Confidence") to
  3398. // unconditionally include in API requests. By default, fields with
  3399. // empty values are omitted from API requests. However, any non-pointer,
  3400. // non-interface field appearing in ForceSendFields will be sent to the
  3401. // server regardless of whether the field is empty or not. This may be
  3402. // used to include empty fields in Patch requests.
  3403. ForceSendFields []string `json:"-"`
  3404. // NullFields is a list of field names (e.g. "Confidence") to include in
  3405. // API requests with the JSON null value. By default, fields with empty
  3406. // values are omitted from API requests. However, any field with an
  3407. // empty value appearing in NullFields will be sent to the server as
  3408. // null. It is an error if a field in this list has a non-empty value.
  3409. // This may be used to include null fields in Patch requests.
  3410. NullFields []string `json:"-"`
  3411. }
  3412. func (s *GoogleCloudVideointelligenceV1p2beta1SpeechRecognitionAlternative) MarshalJSON() ([]byte, error) {
  3413. type NoMethod GoogleCloudVideointelligenceV1p2beta1SpeechRecognitionAlternative
  3414. raw := NoMethod(*s)
  3415. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3416. }
  3417. func (s *GoogleCloudVideointelligenceV1p2beta1SpeechRecognitionAlternative) UnmarshalJSON(data []byte) error {
  3418. type NoMethod GoogleCloudVideointelligenceV1p2beta1SpeechRecognitionAlternative
  3419. var s1 struct {
  3420. Confidence gensupport.JSONFloat64 `json:"confidence"`
  3421. *NoMethod
  3422. }
  3423. s1.NoMethod = (*NoMethod)(s)
  3424. if err := json.Unmarshal(data, &s1); err != nil {
  3425. return err
  3426. }
  3427. s.Confidence = float64(s1.Confidence)
  3428. return nil
  3429. }
  3430. // GoogleCloudVideointelligenceV1p2beta1SpeechTranscription: A speech
  3431. // recognition result corresponding to a portion of the audio.
  3432. type GoogleCloudVideointelligenceV1p2beta1SpeechTranscription struct {
  3433. // Alternatives: May contain one or more recognition hypotheses (up to
  3434. // the maximum specified
  3435. // in `max_alternatives`). These alternatives are ordered in terms
  3436. // of
  3437. // accuracy, with the top (first) alternative being the most probable,
  3438. // as
  3439. // ranked by the recognizer.
  3440. Alternatives []*GoogleCloudVideointelligenceV1p2beta1SpeechRecognitionAlternative `json:"alternatives,omitempty"`
  3441. // LanguageCode: Output only.
  3442. // The
  3443. // [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag
  3444. // of the
  3445. // language in this result. This language code was detected to have the
  3446. // most
  3447. // likelihood of being spoken in the audio.
  3448. LanguageCode string `json:"languageCode,omitempty"`
  3449. // ForceSendFields is a list of field names (e.g. "Alternatives") to
  3450. // unconditionally include in API requests. By default, fields with
  3451. // empty values are omitted from API requests. However, any non-pointer,
  3452. // non-interface field appearing in ForceSendFields will be sent to the
  3453. // server regardless of whether the field is empty or not. This may be
  3454. // used to include empty fields in Patch requests.
  3455. ForceSendFields []string `json:"-"`
  3456. // NullFields is a list of field names (e.g. "Alternatives") to include
  3457. // in API requests with the JSON null value. By default, fields with
  3458. // empty values are omitted from API requests. However, any field with
  3459. // an empty value appearing in NullFields will be sent to the server as
  3460. // null. It is an error if a field in this list has a non-empty value.
  3461. // This may be used to include null fields in Patch requests.
  3462. NullFields []string `json:"-"`
  3463. }
  3464. func (s *GoogleCloudVideointelligenceV1p2beta1SpeechTranscription) MarshalJSON() ([]byte, error) {
  3465. type NoMethod GoogleCloudVideointelligenceV1p2beta1SpeechTranscription
  3466. raw := NoMethod(*s)
  3467. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3468. }
  3469. // GoogleCloudVideointelligenceV1p2beta1TextAnnotation: Annotations
  3470. // related to one detected OCR text snippet. This will contain
  3471. // the
  3472. // corresponding text, confidence value, and frame level information for
  3473. // each
  3474. // detection.
  3475. type GoogleCloudVideointelligenceV1p2beta1TextAnnotation struct {
  3476. // Segments: All video segments where OCR detected text appears.
  3477. Segments []*GoogleCloudVideointelligenceV1p2beta1TextSegment `json:"segments,omitempty"`
  3478. // Text: The detected text.
  3479. Text string `json:"text,omitempty"`
  3480. // ForceSendFields is a list of field names (e.g. "Segments") to
  3481. // unconditionally include in API requests. By default, fields with
  3482. // empty values are omitted from API requests. However, any non-pointer,
  3483. // non-interface field appearing in ForceSendFields will be sent to the
  3484. // server regardless of whether the field is empty or not. This may be
  3485. // used to include empty fields in Patch requests.
  3486. ForceSendFields []string `json:"-"`
  3487. // NullFields is a list of field names (e.g. "Segments") to include in
  3488. // API requests with the JSON null value. By default, fields with empty
  3489. // values are omitted from API requests. However, any field with an
  3490. // empty value appearing in NullFields will be sent to the server as
  3491. // null. It is an error if a field in this list has a non-empty value.
  3492. // This may be used to include null fields in Patch requests.
  3493. NullFields []string `json:"-"`
  3494. }
  3495. func (s *GoogleCloudVideointelligenceV1p2beta1TextAnnotation) MarshalJSON() ([]byte, error) {
  3496. type NoMethod GoogleCloudVideointelligenceV1p2beta1TextAnnotation
  3497. raw := NoMethod(*s)
  3498. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3499. }
  3500. // GoogleCloudVideointelligenceV1p2beta1TextFrame: Video frame level
  3501. // annotation results for text annotation (OCR).
  3502. // Contains information regarding timestamp and bounding box locations
  3503. // for the
  3504. // frames containing detected OCR text snippets.
  3505. type GoogleCloudVideointelligenceV1p2beta1TextFrame struct {
  3506. // RotatedBoundingBox: Bounding polygon of the detected text for this
  3507. // frame.
  3508. RotatedBoundingBox *GoogleCloudVideointelligenceV1p2beta1NormalizedBoundingPoly `json:"rotatedBoundingBox,omitempty"`
  3509. // TimeOffset: Timestamp of this frame.
  3510. TimeOffset string `json:"timeOffset,omitempty"`
  3511. // ForceSendFields is a list of field names (e.g. "RotatedBoundingBox")
  3512. // to unconditionally include in API requests. By default, fields with
  3513. // empty values are omitted from API requests. However, any non-pointer,
  3514. // non-interface field appearing in ForceSendFields will be sent to the
  3515. // server regardless of whether the field is empty or not. This may be
  3516. // used to include empty fields in Patch requests.
  3517. ForceSendFields []string `json:"-"`
  3518. // NullFields is a list of field names (e.g. "RotatedBoundingBox") to
  3519. // include in API requests with the JSON null value. By default, fields
  3520. // with empty values are omitted from API requests. However, any field
  3521. // with an empty value appearing in NullFields will be sent to the
  3522. // server as null. It is an error if a field in this list has a
  3523. // non-empty value. This may be used to include null fields in Patch
  3524. // requests.
  3525. NullFields []string `json:"-"`
  3526. }
  3527. func (s *GoogleCloudVideointelligenceV1p2beta1TextFrame) MarshalJSON() ([]byte, error) {
  3528. type NoMethod GoogleCloudVideointelligenceV1p2beta1TextFrame
  3529. raw := NoMethod(*s)
  3530. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3531. }
  3532. // GoogleCloudVideointelligenceV1p2beta1TextSegment: Video segment level
  3533. // annotation results for text detection.
  3534. type GoogleCloudVideointelligenceV1p2beta1TextSegment struct {
  3535. // Confidence: Confidence for the track of detected text. It is
  3536. // calculated as the highest
  3537. // over all frames where OCR detected text appears.
  3538. Confidence float64 `json:"confidence,omitempty"`
  3539. // Frames: Information related to the frames where OCR detected text
  3540. // appears.
  3541. Frames []*GoogleCloudVideointelligenceV1p2beta1TextFrame `json:"frames,omitempty"`
  3542. // Segment: Video segment where a text snippet was detected.
  3543. Segment *GoogleCloudVideointelligenceV1p2beta1VideoSegment `json:"segment,omitempty"`
  3544. // ForceSendFields is a list of field names (e.g. "Confidence") to
  3545. // unconditionally include in API requests. By default, fields with
  3546. // empty values are omitted from API requests. However, any non-pointer,
  3547. // non-interface field appearing in ForceSendFields will be sent to the
  3548. // server regardless of whether the field is empty or not. This may be
  3549. // used to include empty fields in Patch requests.
  3550. ForceSendFields []string `json:"-"`
  3551. // NullFields is a list of field names (e.g. "Confidence") to include in
  3552. // API requests with the JSON null value. By default, fields with empty
  3553. // values are omitted from API requests. However, any field with an
  3554. // empty value appearing in NullFields will be sent to the server as
  3555. // null. It is an error if a field in this list has a non-empty value.
  3556. // This may be used to include null fields in Patch requests.
  3557. NullFields []string `json:"-"`
  3558. }
  3559. func (s *GoogleCloudVideointelligenceV1p2beta1TextSegment) MarshalJSON() ([]byte, error) {
  3560. type NoMethod GoogleCloudVideointelligenceV1p2beta1TextSegment
  3561. raw := NoMethod(*s)
  3562. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3563. }
  3564. func (s *GoogleCloudVideointelligenceV1p2beta1TextSegment) UnmarshalJSON(data []byte) error {
  3565. type NoMethod GoogleCloudVideointelligenceV1p2beta1TextSegment
  3566. var s1 struct {
  3567. Confidence gensupport.JSONFloat64 `json:"confidence"`
  3568. *NoMethod
  3569. }
  3570. s1.NoMethod = (*NoMethod)(s)
  3571. if err := json.Unmarshal(data, &s1); err != nil {
  3572. return err
  3573. }
  3574. s.Confidence = float64(s1.Confidence)
  3575. return nil
  3576. }
  3577. // GoogleCloudVideointelligenceV1p2beta1VideoAnnotationProgress:
  3578. // Annotation progress for a single video.
  3579. type GoogleCloudVideointelligenceV1p2beta1VideoAnnotationProgress struct {
  3580. // InputUri: Video file location in
  3581. // [Google Cloud Storage](https://cloud.google.com/storage/).
  3582. InputUri string `json:"inputUri,omitempty"`
  3583. // ProgressPercent: Approximate percentage processed thus far.
  3584. // Guaranteed to be
  3585. // 100 when fully processed.
  3586. ProgressPercent int64 `json:"progressPercent,omitempty"`
  3587. // StartTime: Time when the request was received.
  3588. StartTime string `json:"startTime,omitempty"`
  3589. // UpdateTime: Time of the most recent update.
  3590. UpdateTime string `json:"updateTime,omitempty"`
  3591. // ForceSendFields is a list of field names (e.g. "InputUri") to
  3592. // unconditionally include in API requests. By default, fields with
  3593. // empty values are omitted from API requests. However, any non-pointer,
  3594. // non-interface field appearing in ForceSendFields will be sent to the
  3595. // server regardless of whether the field is empty or not. This may be
  3596. // used to include empty fields in Patch requests.
  3597. ForceSendFields []string `json:"-"`
  3598. // NullFields is a list of field names (e.g. "InputUri") to include in
  3599. // API requests with the JSON null value. By default, fields with empty
  3600. // values are omitted from API requests. However, any field with an
  3601. // empty value appearing in NullFields will be sent to the server as
  3602. // null. It is an error if a field in this list has a non-empty value.
  3603. // This may be used to include null fields in Patch requests.
  3604. NullFields []string `json:"-"`
  3605. }
  3606. func (s *GoogleCloudVideointelligenceV1p2beta1VideoAnnotationProgress) MarshalJSON() ([]byte, error) {
  3607. type NoMethod GoogleCloudVideointelligenceV1p2beta1VideoAnnotationProgress
  3608. raw := NoMethod(*s)
  3609. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3610. }
  3611. // GoogleCloudVideointelligenceV1p2beta1VideoAnnotationResults:
  3612. // Annotation results for a single video.
  3613. type GoogleCloudVideointelligenceV1p2beta1VideoAnnotationResults struct {
  3614. // Error: If set, indicates an error. Note that for a single
  3615. // `AnnotateVideoRequest`
  3616. // some videos may succeed and some may fail.
  3617. Error *GoogleRpcStatus `json:"error,omitempty"`
  3618. // ExplicitAnnotation: Explicit content annotation.
  3619. ExplicitAnnotation *GoogleCloudVideointelligenceV1p2beta1ExplicitContentAnnotation `json:"explicitAnnotation,omitempty"`
  3620. // FrameLabelAnnotations: Label annotations on frame level.
  3621. // There is exactly one element for each unique label.
  3622. FrameLabelAnnotations []*GoogleCloudVideointelligenceV1p2beta1LabelAnnotation `json:"frameLabelAnnotations,omitempty"`
  3623. // InputUri: Video file location in
  3624. // [Google Cloud Storage](https://cloud.google.com/storage/).
  3625. InputUri string `json:"inputUri,omitempty"`
  3626. // ObjectAnnotations: Annotations for list of objects detected and
  3627. // tracked in video.
  3628. ObjectAnnotations []*GoogleCloudVideointelligenceV1p2beta1ObjectTrackingAnnotation `json:"objectAnnotations,omitempty"`
  3629. // SegmentLabelAnnotations: Label annotations on video level or user
  3630. // specified segment level.
  3631. // There is exactly one element for each unique label.
  3632. SegmentLabelAnnotations []*GoogleCloudVideointelligenceV1p2beta1LabelAnnotation `json:"segmentLabelAnnotations,omitempty"`
  3633. // ShotAnnotations: Shot annotations. Each shot is represented as a
  3634. // video segment.
  3635. ShotAnnotations []*GoogleCloudVideointelligenceV1p2beta1VideoSegment `json:"shotAnnotations,omitempty"`
  3636. // ShotLabelAnnotations: Label annotations on shot level.
  3637. // There is exactly one element for each unique label.
  3638. ShotLabelAnnotations []*GoogleCloudVideointelligenceV1p2beta1LabelAnnotation `json:"shotLabelAnnotations,omitempty"`
  3639. // SpeechTranscriptions: Speech transcription.
  3640. SpeechTranscriptions []*GoogleCloudVideointelligenceV1p2beta1SpeechTranscription `json:"speechTranscriptions,omitempty"`
  3641. // TextAnnotations: OCR text detection and tracking.
  3642. // Annotations for list of detected text snippets. Each will have list
  3643. // of
  3644. // frame information associated with it.
  3645. TextAnnotations []*GoogleCloudVideointelligenceV1p2beta1TextAnnotation `json:"textAnnotations,omitempty"`
  3646. // ForceSendFields is a list of field names (e.g. "Error") to
  3647. // unconditionally include in API requests. By default, fields with
  3648. // empty values are omitted from API requests. However, any non-pointer,
  3649. // non-interface field appearing in ForceSendFields will be sent to the
  3650. // server regardless of whether the field is empty or not. This may be
  3651. // used to include empty fields in Patch requests.
  3652. ForceSendFields []string `json:"-"`
  3653. // NullFields is a list of field names (e.g. "Error") to include in API
  3654. // requests with the JSON null value. By default, fields with empty
  3655. // values are omitted from API requests. However, any field with an
  3656. // empty value appearing in NullFields will be sent to the server as
  3657. // null. It is an error if a field in this list has a non-empty value.
  3658. // This may be used to include null fields in Patch requests.
  3659. NullFields []string `json:"-"`
  3660. }
  3661. func (s *GoogleCloudVideointelligenceV1p2beta1VideoAnnotationResults) MarshalJSON() ([]byte, error) {
  3662. type NoMethod GoogleCloudVideointelligenceV1p2beta1VideoAnnotationResults
  3663. raw := NoMethod(*s)
  3664. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3665. }
  3666. // GoogleCloudVideointelligenceV1p2beta1VideoSegment: Video segment.
  3667. type GoogleCloudVideointelligenceV1p2beta1VideoSegment struct {
  3668. // EndTimeOffset: Time-offset, relative to the beginning of the
  3669. // video,
  3670. // corresponding to the end of the segment (inclusive).
  3671. EndTimeOffset string `json:"endTimeOffset,omitempty"`
  3672. // StartTimeOffset: Time-offset, relative to the beginning of the
  3673. // video,
  3674. // corresponding to the start of the segment (inclusive).
  3675. StartTimeOffset string `json:"startTimeOffset,omitempty"`
  3676. // ForceSendFields is a list of field names (e.g. "EndTimeOffset") to
  3677. // unconditionally include in API requests. By default, fields with
  3678. // empty values are omitted from API requests. However, any non-pointer,
  3679. // non-interface field appearing in ForceSendFields will be sent to the
  3680. // server regardless of whether the field is empty or not. This may be
  3681. // used to include empty fields in Patch requests.
  3682. ForceSendFields []string `json:"-"`
  3683. // NullFields is a list of field names (e.g. "EndTimeOffset") to include
  3684. // in API requests with the JSON null value. By default, fields with
  3685. // empty values are omitted from API requests. However, any field with
  3686. // an empty value appearing in NullFields will be sent to the server as
  3687. // null. It is an error if a field in this list has a non-empty value.
  3688. // This may be used to include null fields in Patch requests.
  3689. NullFields []string `json:"-"`
  3690. }
  3691. func (s *GoogleCloudVideointelligenceV1p2beta1VideoSegment) MarshalJSON() ([]byte, error) {
  3692. type NoMethod GoogleCloudVideointelligenceV1p2beta1VideoSegment
  3693. raw := NoMethod(*s)
  3694. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3695. }
  3696. // GoogleCloudVideointelligenceV1p2beta1WordInfo: Word-specific
  3697. // information for recognized words. Word information is only
  3698. // included in the response when certain request parameters are set,
  3699. // such
  3700. // as `enable_word_time_offsets`.
  3701. type GoogleCloudVideointelligenceV1p2beta1WordInfo struct {
  3702. // Confidence: Output only. The confidence estimate between 0.0 and 1.0.
  3703. // A higher number
  3704. // indicates an estimated greater likelihood that the recognized words
  3705. // are
  3706. // correct. This field is set only for the top alternative.
  3707. // This field is not guaranteed to be accurate and users should not rely
  3708. // on it
  3709. // to be always provided.
  3710. // The default of 0.0 is a sentinel value indicating `confidence` was
  3711. // not set.
  3712. Confidence float64 `json:"confidence,omitempty"`
  3713. // EndTime: Time offset relative to the beginning of the audio,
  3714. // and
  3715. // corresponding to the end of the spoken word. This field is only set
  3716. // if
  3717. // `enable_word_time_offsets=true` and only in the top hypothesis. This
  3718. // is an
  3719. // experimental feature and the accuracy of the time offset can vary.
  3720. EndTime string `json:"endTime,omitempty"`
  3721. // SpeakerTag: Output only. A distinct integer value is assigned for
  3722. // every speaker within
  3723. // the audio. This field specifies which one of those speakers was
  3724. // detected to
  3725. // have spoken this word. Value ranges from 1 up to
  3726. // diarization_speaker_count,
  3727. // and is only set if speaker diarization is enabled.
  3728. SpeakerTag int64 `json:"speakerTag,omitempty"`
  3729. // StartTime: Time offset relative to the beginning of the audio,
  3730. // and
  3731. // corresponding to the start of the spoken word. This field is only set
  3732. // if
  3733. // `enable_word_time_offsets=true` and only in the top hypothesis. This
  3734. // is an
  3735. // experimental feature and the accuracy of the time offset can vary.
  3736. StartTime string `json:"startTime,omitempty"`
  3737. // Word: The word corresponding to this set of information.
  3738. Word string `json:"word,omitempty"`
  3739. // ForceSendFields is a list of field names (e.g. "Confidence") to
  3740. // unconditionally include in API requests. By default, fields with
  3741. // empty values are omitted from API requests. However, any non-pointer,
  3742. // non-interface field appearing in ForceSendFields will be sent to the
  3743. // server regardless of whether the field is empty or not. This may be
  3744. // used to include empty fields in Patch requests.
  3745. ForceSendFields []string `json:"-"`
  3746. // NullFields is a list of field names (e.g. "Confidence") to include in
  3747. // API requests with the JSON null value. By default, fields with empty
  3748. // values are omitted from API requests. However, any field with an
  3749. // empty value appearing in NullFields will be sent to the server as
  3750. // null. It is an error if a field in this list has a non-empty value.
  3751. // This may be used to include null fields in Patch requests.
  3752. NullFields []string `json:"-"`
  3753. }
  3754. func (s *GoogleCloudVideointelligenceV1p2beta1WordInfo) MarshalJSON() ([]byte, error) {
  3755. type NoMethod GoogleCloudVideointelligenceV1p2beta1WordInfo
  3756. raw := NoMethod(*s)
  3757. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3758. }
  3759. func (s *GoogleCloudVideointelligenceV1p2beta1WordInfo) UnmarshalJSON(data []byte) error {
  3760. type NoMethod GoogleCloudVideointelligenceV1p2beta1WordInfo
  3761. var s1 struct {
  3762. Confidence gensupport.JSONFloat64 `json:"confidence"`
  3763. *NoMethod
  3764. }
  3765. s1.NoMethod = (*NoMethod)(s)
  3766. if err := json.Unmarshal(data, &s1); err != nil {
  3767. return err
  3768. }
  3769. s.Confidence = float64(s1.Confidence)
  3770. return nil
  3771. }
  3772. // GoogleCloudVideointelligenceV1p3beta1AnnotateVideoProgress: Video
  3773. // annotation progress. Included in the `metadata`
  3774. // field of the `Operation` returned by the `GetOperation`
  3775. // call of the `google::longrunning::Operations` service.
  3776. type GoogleCloudVideointelligenceV1p3beta1AnnotateVideoProgress struct {
  3777. // AnnotationProgress: Progress metadata for all videos specified in
  3778. // `AnnotateVideoRequest`.
  3779. AnnotationProgress []*GoogleCloudVideointelligenceV1p3beta1VideoAnnotationProgress `json:"annotationProgress,omitempty"`
  3780. // ForceSendFields is a list of field names (e.g. "AnnotationProgress")
  3781. // to unconditionally include in API requests. By default, fields with
  3782. // empty values are omitted from API requests. However, any non-pointer,
  3783. // non-interface field appearing in ForceSendFields will be sent to the
  3784. // server regardless of whether the field is empty or not. This may be
  3785. // used to include empty fields in Patch requests.
  3786. ForceSendFields []string `json:"-"`
  3787. // NullFields is a list of field names (e.g. "AnnotationProgress") to
  3788. // include in API requests with the JSON null value. By default, fields
  3789. // with empty values are omitted from API requests. However, any field
  3790. // with an empty value appearing in NullFields will be sent to the
  3791. // server as null. It is an error if a field in this list has a
  3792. // non-empty value. This may be used to include null fields in Patch
  3793. // requests.
  3794. NullFields []string `json:"-"`
  3795. }
  3796. func (s *GoogleCloudVideointelligenceV1p3beta1AnnotateVideoProgress) MarshalJSON() ([]byte, error) {
  3797. type NoMethod GoogleCloudVideointelligenceV1p3beta1AnnotateVideoProgress
  3798. raw := NoMethod(*s)
  3799. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3800. }
  3801. // GoogleCloudVideointelligenceV1p3beta1AnnotateVideoRequest: Video
  3802. // annotation request.
  3803. type GoogleCloudVideointelligenceV1p3beta1AnnotateVideoRequest struct {
  3804. // Features: Requested video annotation features.
  3805. //
  3806. // Possible values:
  3807. // "FEATURE_UNSPECIFIED" - Unspecified.
  3808. // "LABEL_DETECTION" - Label detection. Detect objects, such as dog or
  3809. // flower.
  3810. // "SHOT_CHANGE_DETECTION" - Shot change detection.
  3811. // "EXPLICIT_CONTENT_DETECTION" - Explicit content detection.
  3812. // "SPEECH_TRANSCRIPTION" - Speech transcription.
  3813. // "TEXT_DETECTION" - OCR text detection and tracking.
  3814. // "OBJECT_TRACKING" - Object detection and tracking.
  3815. Features []string `json:"features,omitempty"`
  3816. // InputContent: The video data bytes.
  3817. // If unset, the input video(s) should be specified via `input_uri`.
  3818. // If set, `input_uri` should be unset.
  3819. InputContent string `json:"inputContent,omitempty"`
  3820. // InputUri: Input video location. Currently, only
  3821. // [Google Cloud Storage](https://cloud.google.com/storage/) URIs
  3822. // are
  3823. // supported, which must be specified in the following
  3824. // format:
  3825. // `gs://bucket-id/object-id` (other URI formats
  3826. // return
  3827. // google.rpc.Code.INVALID_ARGUMENT). For more information, see
  3828. // [Request URIs](/storage/docs/reference-uris).
  3829. // A video URI may include wildcards in `object-id`, and thus
  3830. // identify
  3831. // multiple videos. Supported wildcards: '*' to match 0 or more
  3832. // characters;
  3833. // '?' to match 1 character. If unset, the input video should be
  3834. // embedded
  3835. // in the request as `input_content`. If set, `input_content` should be
  3836. // unset.
  3837. InputUri string `json:"inputUri,omitempty"`
  3838. // LocationId: Optional cloud region where annotation should take place.
  3839. // Supported cloud
  3840. // regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no
  3841. // region
  3842. // is specified, a region will be determined based on video file
  3843. // location.
  3844. LocationId string `json:"locationId,omitempty"`
  3845. // OutputUri: Optional location where the output (in JSON format) should
  3846. // be stored.
  3847. // Currently, only [Google Cloud
  3848. // Storage](https://cloud.google.com/storage/)
  3849. // URIs are supported, which must be specified in the following
  3850. // format:
  3851. // `gs://bucket-id/object-id` (other URI formats
  3852. // return
  3853. // google.rpc.Code.INVALID_ARGUMENT). For more information, see
  3854. // [Request URIs](/storage/docs/reference-uris).
  3855. OutputUri string `json:"outputUri,omitempty"`
  3856. // VideoContext: Additional video context and/or feature-specific
  3857. // parameters.
  3858. VideoContext *GoogleCloudVideointelligenceV1p3beta1VideoContext `json:"videoContext,omitempty"`
  3859. // ForceSendFields is a list of field names (e.g. "Features") 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. "Features") to include in
  3867. // API requests with the JSON null value. By default, fields with empty
  3868. // values are omitted from API requests. However, any field with an
  3869. // 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 *GoogleCloudVideointelligenceV1p3beta1AnnotateVideoRequest) MarshalJSON() ([]byte, error) {
  3875. type NoMethod GoogleCloudVideointelligenceV1p3beta1AnnotateVideoRequest
  3876. raw := NoMethod(*s)
  3877. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3878. }
  3879. // GoogleCloudVideointelligenceV1p3beta1AnnotateVideoResponse: Video
  3880. // annotation response. Included in the `response`
  3881. // field of the `Operation` returned by the `GetOperation`
  3882. // call of the `google::longrunning::Operations` service.
  3883. type GoogleCloudVideointelligenceV1p3beta1AnnotateVideoResponse struct {
  3884. // AnnotationResults: Annotation results for all videos specified in
  3885. // `AnnotateVideoRequest`.
  3886. AnnotationResults []*GoogleCloudVideointelligenceV1p3beta1VideoAnnotationResults `json:"annotationResults,omitempty"`
  3887. // ForceSendFields is a list of field names (e.g. "AnnotationResults")
  3888. // to unconditionally include in API requests. By default, fields with
  3889. // empty values are omitted from API requests. However, any non-pointer,
  3890. // non-interface field appearing in ForceSendFields will be sent to the
  3891. // server regardless of whether the field is empty or not. This may be
  3892. // used to include empty fields in Patch requests.
  3893. ForceSendFields []string `json:"-"`
  3894. // NullFields is a list of field names (e.g. "AnnotationResults") to
  3895. // include in API requests with the JSON null value. By default, fields
  3896. // with empty values are omitted from API requests. However, any field
  3897. // with an empty value appearing in NullFields will be sent to the
  3898. // server as null. It is an error if a field in this list has a
  3899. // non-empty value. This may be used to include null fields in Patch
  3900. // requests.
  3901. NullFields []string `json:"-"`
  3902. }
  3903. func (s *GoogleCloudVideointelligenceV1p3beta1AnnotateVideoResponse) MarshalJSON() ([]byte, error) {
  3904. type NoMethod GoogleCloudVideointelligenceV1p3beta1AnnotateVideoResponse
  3905. raw := NoMethod(*s)
  3906. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3907. }
  3908. // GoogleCloudVideointelligenceV1p3beta1Entity: Detected entity from
  3909. // video analysis.
  3910. type GoogleCloudVideointelligenceV1p3beta1Entity struct {
  3911. // Description: Textual description, e.g. `Fixed-gear bicycle`.
  3912. Description string `json:"description,omitempty"`
  3913. // EntityId: Opaque entity ID. Some IDs may be available in
  3914. // [Google Knowledge Graph
  3915. // Search
  3916. // API](https://developers.google.com/knowledge-graph/).
  3917. EntityId string `json:"entityId,omitempty"`
  3918. // LanguageCode: Language code for `description` in BCP-47 format.
  3919. LanguageCode string `json:"languageCode,omitempty"`
  3920. // ForceSendFields is a list of field names (e.g. "Description") to
  3921. // unconditionally include in API requests. By default, fields with
  3922. // empty values are omitted from API requests. However, any non-pointer,
  3923. // non-interface field appearing in ForceSendFields will be sent to the
  3924. // server regardless of whether the field is empty or not. This may be
  3925. // used to include empty fields in Patch requests.
  3926. ForceSendFields []string `json:"-"`
  3927. // NullFields is a list of field names (e.g. "Description") to include
  3928. // in API requests with the JSON null value. By default, fields with
  3929. // empty values are omitted from API requests. However, any field with
  3930. // an empty value appearing in NullFields will be sent to the server as
  3931. // null. It is an error if a field in this list has a non-empty value.
  3932. // This may be used to include null fields in Patch requests.
  3933. NullFields []string `json:"-"`
  3934. }
  3935. func (s *GoogleCloudVideointelligenceV1p3beta1Entity) MarshalJSON() ([]byte, error) {
  3936. type NoMethod GoogleCloudVideointelligenceV1p3beta1Entity
  3937. raw := NoMethod(*s)
  3938. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3939. }
  3940. // GoogleCloudVideointelligenceV1p3beta1ExplicitContentAnnotation:
  3941. // Explicit content annotation (based on per-frame visual signals
  3942. // only).
  3943. // If no explicit content has been detected in a frame, no annotations
  3944. // are
  3945. // present for that frame.
  3946. type GoogleCloudVideointelligenceV1p3beta1ExplicitContentAnnotation struct {
  3947. // Frames: All video frames where explicit content was detected.
  3948. Frames []*GoogleCloudVideointelligenceV1p3beta1ExplicitContentFrame `json:"frames,omitempty"`
  3949. // ForceSendFields is a list of field names (e.g. "Frames") to
  3950. // unconditionally include in API requests. By default, fields with
  3951. // empty values are omitted from API requests. However, any non-pointer,
  3952. // non-interface field appearing in ForceSendFields will be sent to the
  3953. // server regardless of whether the field is empty or not. This may be
  3954. // used to include empty fields in Patch requests.
  3955. ForceSendFields []string `json:"-"`
  3956. // NullFields is a list of field names (e.g. "Frames") to include in API
  3957. // requests with the JSON null value. By default, fields with empty
  3958. // values are omitted from API requests. However, any field with an
  3959. // empty value appearing in NullFields will be sent to the server as
  3960. // null. It is an error if a field in this list has a non-empty value.
  3961. // This may be used to include null fields in Patch requests.
  3962. NullFields []string `json:"-"`
  3963. }
  3964. func (s *GoogleCloudVideointelligenceV1p3beta1ExplicitContentAnnotation) MarshalJSON() ([]byte, error) {
  3965. type NoMethod GoogleCloudVideointelligenceV1p3beta1ExplicitContentAnnotation
  3966. raw := NoMethod(*s)
  3967. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3968. }
  3969. // GoogleCloudVideointelligenceV1p3beta1ExplicitContentDetectionConfig:
  3970. // Config for EXPLICIT_CONTENT_DETECTION.
  3971. type GoogleCloudVideointelligenceV1p3beta1ExplicitContentDetectionConfig struct {
  3972. // Model: Model to use for explicit content detection.
  3973. // Supported values: "builtin/stable" (the default if unset)
  3974. // and
  3975. // "builtin/latest".
  3976. Model string `json:"model,omitempty"`
  3977. // ForceSendFields is a list of field names (e.g. "Model") to
  3978. // unconditionally include in API requests. By default, fields with
  3979. // empty values are omitted from API requests. However, any non-pointer,
  3980. // non-interface field appearing in ForceSendFields will be sent to the
  3981. // server regardless of whether the field is empty or not. This may be
  3982. // used to include empty fields in Patch requests.
  3983. ForceSendFields []string `json:"-"`
  3984. // NullFields is a list of field names (e.g. "Model") to include in API
  3985. // requests with the JSON null value. By default, fields with empty
  3986. // values are omitted from API requests. However, any field with an
  3987. // empty value appearing in NullFields will be sent to the server as
  3988. // null. It is an error if a field in this list has a non-empty value.
  3989. // This may be used to include null fields in Patch requests.
  3990. NullFields []string `json:"-"`
  3991. }
  3992. func (s *GoogleCloudVideointelligenceV1p3beta1ExplicitContentDetectionConfig) MarshalJSON() ([]byte, error) {
  3993. type NoMethod GoogleCloudVideointelligenceV1p3beta1ExplicitContentDetectionConfig
  3994. raw := NoMethod(*s)
  3995. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3996. }
  3997. // GoogleCloudVideointelligenceV1p3beta1ExplicitContentFrame: Video
  3998. // frame level annotation results for explicit content.
  3999. type GoogleCloudVideointelligenceV1p3beta1ExplicitContentFrame struct {
  4000. // PornographyLikelihood: Likelihood of the pornography content..
  4001. //
  4002. // Possible values:
  4003. // "LIKELIHOOD_UNSPECIFIED" - Unspecified likelihood.
  4004. // "VERY_UNLIKELY" - Very unlikely.
  4005. // "UNLIKELY" - Unlikely.
  4006. // "POSSIBLE" - Possible.
  4007. // "LIKELY" - Likely.
  4008. // "VERY_LIKELY" - Very likely.
  4009. PornographyLikelihood string `json:"pornographyLikelihood,omitempty"`
  4010. // TimeOffset: Time-offset, relative to the beginning of the video,
  4011. // corresponding to the
  4012. // video frame for this location.
  4013. TimeOffset string `json:"timeOffset,omitempty"`
  4014. // ForceSendFields is a list of field names (e.g.
  4015. // "PornographyLikelihood") to unconditionally include in API requests.
  4016. // By default, fields with empty values are omitted from API requests.
  4017. // However, any non-pointer, non-interface field appearing in
  4018. // ForceSendFields will be sent to the server regardless of whether the
  4019. // field is empty or not. This may be used to include empty fields in
  4020. // Patch requests.
  4021. ForceSendFields []string `json:"-"`
  4022. // NullFields is a list of field names (e.g. "PornographyLikelihood") to
  4023. // include in API requests with the JSON null value. By default, fields
  4024. // with empty values are omitted from API requests. However, any field
  4025. // with an empty value appearing in NullFields will be sent to the
  4026. // server as null. It is an error if a field in this list has a
  4027. // non-empty value. This may be used to include null fields in Patch
  4028. // requests.
  4029. NullFields []string `json:"-"`
  4030. }
  4031. func (s *GoogleCloudVideointelligenceV1p3beta1ExplicitContentFrame) MarshalJSON() ([]byte, error) {
  4032. type NoMethod GoogleCloudVideointelligenceV1p3beta1ExplicitContentFrame
  4033. raw := NoMethod(*s)
  4034. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4035. }
  4036. // GoogleCloudVideointelligenceV1p3beta1LabelAnnotation: Label
  4037. // annotation.
  4038. type GoogleCloudVideointelligenceV1p3beta1LabelAnnotation struct {
  4039. // CategoryEntities: Common categories for the detected entity.
  4040. // E.g. when the label is `Terrier` the category is likely `dog`. And in
  4041. // some
  4042. // cases there might be more than one categories e.g. `Terrier` could
  4043. // also be
  4044. // a `pet`.
  4045. CategoryEntities []*GoogleCloudVideointelligenceV1p3beta1Entity `json:"categoryEntities,omitempty"`
  4046. // Entity: Detected entity.
  4047. Entity *GoogleCloudVideointelligenceV1p3beta1Entity `json:"entity,omitempty"`
  4048. // Frames: All video frames where a label was detected.
  4049. Frames []*GoogleCloudVideointelligenceV1p3beta1LabelFrame `json:"frames,omitempty"`
  4050. // Segments: All video segments where a label was detected.
  4051. Segments []*GoogleCloudVideointelligenceV1p3beta1LabelSegment `json:"segments,omitempty"`
  4052. // ForceSendFields is a list of field names (e.g. "CategoryEntities") to
  4053. // unconditionally include in API requests. By default, fields with
  4054. // empty values are omitted from API requests. However, any non-pointer,
  4055. // non-interface field appearing in ForceSendFields will be sent to the
  4056. // server regardless of whether the field is empty or not. This may be
  4057. // used to include empty fields in Patch requests.
  4058. ForceSendFields []string `json:"-"`
  4059. // NullFields is a list of field names (e.g. "CategoryEntities") to
  4060. // include in API requests with the JSON null value. By default, fields
  4061. // with empty values are omitted from API requests. However, any field
  4062. // with an empty value appearing in NullFields will be sent to the
  4063. // server as null. It is an error if a field in this list has a
  4064. // non-empty value. This may be used to include null fields in Patch
  4065. // requests.
  4066. NullFields []string `json:"-"`
  4067. }
  4068. func (s *GoogleCloudVideointelligenceV1p3beta1LabelAnnotation) MarshalJSON() ([]byte, error) {
  4069. type NoMethod GoogleCloudVideointelligenceV1p3beta1LabelAnnotation
  4070. raw := NoMethod(*s)
  4071. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4072. }
  4073. // GoogleCloudVideointelligenceV1p3beta1LabelDetectionConfig: Config for
  4074. // LABEL_DETECTION.
  4075. type GoogleCloudVideointelligenceV1p3beta1LabelDetectionConfig struct {
  4076. // FrameConfidenceThreshold: The confidence threshold we perform
  4077. // filtering on the labels from
  4078. // frame-level detection. If not set, it is set to 0.4 by default. The
  4079. // valid
  4080. // range for this threshold is [0.1, 0.9]. Any value set outside of
  4081. // this
  4082. // range will be clipped.
  4083. // Note: for best results please follow the default threshold. We will
  4084. // update
  4085. // the default threshold everytime when we release a new model.
  4086. FrameConfidenceThreshold float64 `json:"frameConfidenceThreshold,omitempty"`
  4087. // LabelDetectionMode: What labels should be detected with
  4088. // LABEL_DETECTION, in addition to
  4089. // video-level labels or segment-level labels.
  4090. // If unspecified, defaults to `SHOT_MODE`.
  4091. //
  4092. // Possible values:
  4093. // "LABEL_DETECTION_MODE_UNSPECIFIED" - Unspecified.
  4094. // "SHOT_MODE" - Detect shot-level labels.
  4095. // "FRAME_MODE" - Detect frame-level labels.
  4096. // "SHOT_AND_FRAME_MODE" - Detect both shot-level and frame-level
  4097. // labels.
  4098. LabelDetectionMode string `json:"labelDetectionMode,omitempty"`
  4099. // Model: Model to use for label detection.
  4100. // Supported values: "builtin/stable" (the default if unset)
  4101. // and
  4102. // "builtin/latest".
  4103. Model string `json:"model,omitempty"`
  4104. // StationaryCamera: Whether the video has been shot from a stationary
  4105. // (i.e. non-moving) camera.
  4106. // When set to true, might improve detection accuracy for moving
  4107. // objects.
  4108. // Should be used with `SHOT_AND_FRAME_MODE` enabled.
  4109. StationaryCamera bool `json:"stationaryCamera,omitempty"`
  4110. // VideoConfidenceThreshold: The confidence threshold we perform
  4111. // filtering on the labels from
  4112. // video-level and shot-level detections. If not set, it is set to 0.3
  4113. // by
  4114. // default. The valid range for this threshold is [0.1, 0.9]. Any value
  4115. // set
  4116. // outside of this range will be clipped.
  4117. // Note: for best results please follow the default threshold. We will
  4118. // update
  4119. // the default threshold everytime when we release a new model.
  4120. VideoConfidenceThreshold float64 `json:"videoConfidenceThreshold,omitempty"`
  4121. // ForceSendFields is a list of field names (e.g.
  4122. // "FrameConfidenceThreshold") to unconditionally include in API
  4123. // requests. By default, fields with empty values are omitted from API
  4124. // requests. However, any non-pointer, non-interface field appearing in
  4125. // ForceSendFields will be sent to the server regardless of whether the
  4126. // field is empty or not. This may be used to include empty fields in
  4127. // Patch requests.
  4128. ForceSendFields []string `json:"-"`
  4129. // NullFields is a list of field names (e.g. "FrameConfidenceThreshold")
  4130. // to include in API requests with the JSON null value. By default,
  4131. // fields with empty values are omitted from API requests. However, any
  4132. // field with an empty value appearing in NullFields will be sent to the
  4133. // server as null. It is an error if a field in this list has a
  4134. // non-empty value. This may be used to include null fields in Patch
  4135. // requests.
  4136. NullFields []string `json:"-"`
  4137. }
  4138. func (s *GoogleCloudVideointelligenceV1p3beta1LabelDetectionConfig) MarshalJSON() ([]byte, error) {
  4139. type NoMethod GoogleCloudVideointelligenceV1p3beta1LabelDetectionConfig
  4140. raw := NoMethod(*s)
  4141. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4142. }
  4143. func (s *GoogleCloudVideointelligenceV1p3beta1LabelDetectionConfig) UnmarshalJSON(data []byte) error {
  4144. type NoMethod GoogleCloudVideointelligenceV1p3beta1LabelDetectionConfig
  4145. var s1 struct {
  4146. FrameConfidenceThreshold gensupport.JSONFloat64 `json:"frameConfidenceThreshold"`
  4147. VideoConfidenceThreshold gensupport.JSONFloat64 `json:"videoConfidenceThreshold"`
  4148. *NoMethod
  4149. }
  4150. s1.NoMethod = (*NoMethod)(s)
  4151. if err := json.Unmarshal(data, &s1); err != nil {
  4152. return err
  4153. }
  4154. s.FrameConfidenceThreshold = float64(s1.FrameConfidenceThreshold)
  4155. s.VideoConfidenceThreshold = float64(s1.VideoConfidenceThreshold)
  4156. return nil
  4157. }
  4158. // GoogleCloudVideointelligenceV1p3beta1LabelFrame: Video frame level
  4159. // annotation results for label detection.
  4160. type GoogleCloudVideointelligenceV1p3beta1LabelFrame struct {
  4161. // Confidence: Confidence that the label is accurate. Range: [0, 1].
  4162. Confidence float64 `json:"confidence,omitempty"`
  4163. // TimeOffset: Time-offset, relative to the beginning of the video,
  4164. // corresponding to the
  4165. // video frame for this location.
  4166. TimeOffset string `json:"timeOffset,omitempty"`
  4167. // ForceSendFields is a list of field names (e.g. "Confidence") to
  4168. // unconditionally include in API requests. By default, fields with
  4169. // empty values are omitted from API requests. However, any non-pointer,
  4170. // non-interface field appearing in ForceSendFields will be sent to the
  4171. // server regardless of whether the field is empty or not. This may be
  4172. // used to include empty fields in Patch requests.
  4173. ForceSendFields []string `json:"-"`
  4174. // NullFields is a list of field names (e.g. "Confidence") to include in
  4175. // API requests with the JSON null value. By default, fields with empty
  4176. // values are omitted from API requests. However, any field with an
  4177. // empty value appearing in NullFields will be sent to the server as
  4178. // null. It is an error if a field in this list has a non-empty value.
  4179. // This may be used to include null fields in Patch requests.
  4180. NullFields []string `json:"-"`
  4181. }
  4182. func (s *GoogleCloudVideointelligenceV1p3beta1LabelFrame) MarshalJSON() ([]byte, error) {
  4183. type NoMethod GoogleCloudVideointelligenceV1p3beta1LabelFrame
  4184. raw := NoMethod(*s)
  4185. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4186. }
  4187. func (s *GoogleCloudVideointelligenceV1p3beta1LabelFrame) UnmarshalJSON(data []byte) error {
  4188. type NoMethod GoogleCloudVideointelligenceV1p3beta1LabelFrame
  4189. var s1 struct {
  4190. Confidence gensupport.JSONFloat64 `json:"confidence"`
  4191. *NoMethod
  4192. }
  4193. s1.NoMethod = (*NoMethod)(s)
  4194. if err := json.Unmarshal(data, &s1); err != nil {
  4195. return err
  4196. }
  4197. s.Confidence = float64(s1.Confidence)
  4198. return nil
  4199. }
  4200. // GoogleCloudVideointelligenceV1p3beta1LabelSegment: Video segment
  4201. // level annotation results for label detection.
  4202. type GoogleCloudVideointelligenceV1p3beta1LabelSegment struct {
  4203. // Confidence: Confidence that the label is accurate. Range: [0, 1].
  4204. Confidence float64 `json:"confidence,omitempty"`
  4205. // Segment: Video segment where a label was detected.
  4206. Segment *GoogleCloudVideointelligenceV1p3beta1VideoSegment `json:"segment,omitempty"`
  4207. // ForceSendFields is a list of field names (e.g. "Confidence") to
  4208. // unconditionally include in API requests. By default, fields with
  4209. // empty values are omitted from API requests. However, any non-pointer,
  4210. // non-interface field appearing in ForceSendFields will be sent to the
  4211. // server regardless of whether the field is empty or not. This may be
  4212. // used to include empty fields in Patch requests.
  4213. ForceSendFields []string `json:"-"`
  4214. // NullFields is a list of field names (e.g. "Confidence") to include in
  4215. // API requests with the JSON null value. By default, fields with empty
  4216. // values are omitted from API requests. However, any field with an
  4217. // empty value appearing in NullFields will be sent to the server as
  4218. // null. It is an error if a field in this list has a non-empty value.
  4219. // This may be used to include null fields in Patch requests.
  4220. NullFields []string `json:"-"`
  4221. }
  4222. func (s *GoogleCloudVideointelligenceV1p3beta1LabelSegment) MarshalJSON() ([]byte, error) {
  4223. type NoMethod GoogleCloudVideointelligenceV1p3beta1LabelSegment
  4224. raw := NoMethod(*s)
  4225. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4226. }
  4227. func (s *GoogleCloudVideointelligenceV1p3beta1LabelSegment) UnmarshalJSON(data []byte) error {
  4228. type NoMethod GoogleCloudVideointelligenceV1p3beta1LabelSegment
  4229. var s1 struct {
  4230. Confidence gensupport.JSONFloat64 `json:"confidence"`
  4231. *NoMethod
  4232. }
  4233. s1.NoMethod = (*NoMethod)(s)
  4234. if err := json.Unmarshal(data, &s1); err != nil {
  4235. return err
  4236. }
  4237. s.Confidence = float64(s1.Confidence)
  4238. return nil
  4239. }
  4240. // GoogleCloudVideointelligenceV1p3beta1NormalizedBoundingBox:
  4241. // Normalized bounding box.
  4242. // The normalized vertex coordinates are relative to the original
  4243. // image.
  4244. // Range: [0, 1].
  4245. type GoogleCloudVideointelligenceV1p3beta1NormalizedBoundingBox struct {
  4246. // Bottom: Bottom Y coordinate.
  4247. Bottom float64 `json:"bottom,omitempty"`
  4248. // Left: Left X coordinate.
  4249. Left float64 `json:"left,omitempty"`
  4250. // Right: Right X coordinate.
  4251. Right float64 `json:"right,omitempty"`
  4252. // Top: Top Y coordinate.
  4253. Top float64 `json:"top,omitempty"`
  4254. // ForceSendFields is a list of field names (e.g. "Bottom") to
  4255. // unconditionally include in API requests. By default, fields with
  4256. // empty values are omitted from API requests. However, any non-pointer,
  4257. // non-interface field appearing in ForceSendFields will be sent to the
  4258. // server regardless of whether the field is empty or not. This may be
  4259. // used to include empty fields in Patch requests.
  4260. ForceSendFields []string `json:"-"`
  4261. // NullFields is a list of field names (e.g. "Bottom") to include in API
  4262. // requests with the JSON null value. By default, fields with empty
  4263. // values are omitted from API requests. However, any field with an
  4264. // empty value appearing in NullFields will be sent to the server as
  4265. // null. It is an error if a field in this list has a non-empty value.
  4266. // This may be used to include null fields in Patch requests.
  4267. NullFields []string `json:"-"`
  4268. }
  4269. func (s *GoogleCloudVideointelligenceV1p3beta1NormalizedBoundingBox) MarshalJSON() ([]byte, error) {
  4270. type NoMethod GoogleCloudVideointelligenceV1p3beta1NormalizedBoundingBox
  4271. raw := NoMethod(*s)
  4272. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4273. }
  4274. func (s *GoogleCloudVideointelligenceV1p3beta1NormalizedBoundingBox) UnmarshalJSON(data []byte) error {
  4275. type NoMethod GoogleCloudVideointelligenceV1p3beta1NormalizedBoundingBox
  4276. var s1 struct {
  4277. Bottom gensupport.JSONFloat64 `json:"bottom"`
  4278. Left gensupport.JSONFloat64 `json:"left"`
  4279. Right gensupport.JSONFloat64 `json:"right"`
  4280. Top gensupport.JSONFloat64 `json:"top"`
  4281. *NoMethod
  4282. }
  4283. s1.NoMethod = (*NoMethod)(s)
  4284. if err := json.Unmarshal(data, &s1); err != nil {
  4285. return err
  4286. }
  4287. s.Bottom = float64(s1.Bottom)
  4288. s.Left = float64(s1.Left)
  4289. s.Right = float64(s1.Right)
  4290. s.Top = float64(s1.Top)
  4291. return nil
  4292. }
  4293. // GoogleCloudVideointelligenceV1p3beta1NormalizedBoundingPoly:
  4294. // Normalized bounding polygon for text (that might not be aligned with
  4295. // axis).
  4296. // Contains list of the corner points in clockwise order starting
  4297. // from
  4298. // top-left corner. For example, for a rectangular bounding box:
  4299. // When the text is horizontal it might look like:
  4300. // 0----1
  4301. // | |
  4302. // 3----2
  4303. //
  4304. // When it's clockwise rotated 180 degrees around the top-left corner
  4305. // it
  4306. // becomes:
  4307. // 2----3
  4308. // | |
  4309. // 1----0
  4310. //
  4311. // and the vertex order will still be (0, 1, 2, 3). Note that values can
  4312. // be less
  4313. // than 0, or greater than 1 due to trignometric calculations for
  4314. // location of
  4315. // the box.
  4316. type GoogleCloudVideointelligenceV1p3beta1NormalizedBoundingPoly struct {
  4317. // Vertices: Normalized vertices of the bounding polygon.
  4318. Vertices []*GoogleCloudVideointelligenceV1p3beta1NormalizedVertex `json:"vertices,omitempty"`
  4319. // ForceSendFields is a list of field names (e.g. "Vertices") to
  4320. // unconditionally include in API requests. By default, fields with
  4321. // empty values are omitted from API requests. However, any non-pointer,
  4322. // non-interface field appearing in ForceSendFields will be sent to the
  4323. // server regardless of whether the field is empty or not. This may be
  4324. // used to include empty fields in Patch requests.
  4325. ForceSendFields []string `json:"-"`
  4326. // NullFields is a list of field names (e.g. "Vertices") to include in
  4327. // API requests with the JSON null value. By default, fields with empty
  4328. // values are omitted from API requests. However, any field with an
  4329. // empty value appearing in NullFields will be sent to the server as
  4330. // null. It is an error if a field in this list has a non-empty value.
  4331. // This may be used to include null fields in Patch requests.
  4332. NullFields []string `json:"-"`
  4333. }
  4334. func (s *GoogleCloudVideointelligenceV1p3beta1NormalizedBoundingPoly) MarshalJSON() ([]byte, error) {
  4335. type NoMethod GoogleCloudVideointelligenceV1p3beta1NormalizedBoundingPoly
  4336. raw := NoMethod(*s)
  4337. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4338. }
  4339. // GoogleCloudVideointelligenceV1p3beta1NormalizedVertex: A vertex
  4340. // represents a 2D point in the image.
  4341. // NOTE: the normalized vertex coordinates are relative to the original
  4342. // image
  4343. // and range from 0 to 1.
  4344. type GoogleCloudVideointelligenceV1p3beta1NormalizedVertex struct {
  4345. // X: X coordinate.
  4346. X float64 `json:"x,omitempty"`
  4347. // Y: Y coordinate.
  4348. Y float64 `json:"y,omitempty"`
  4349. // ForceSendFields is a list of field names (e.g. "X") to
  4350. // unconditionally include in API requests. By default, fields with
  4351. // empty values are omitted from API requests. However, any non-pointer,
  4352. // non-interface field appearing in ForceSendFields will be sent to the
  4353. // server regardless of whether the field is empty or not. This may be
  4354. // used to include empty fields in Patch requests.
  4355. ForceSendFields []string `json:"-"`
  4356. // NullFields is a list of field names (e.g. "X") to include in API
  4357. // requests with the JSON null value. By default, fields with empty
  4358. // values are omitted from API requests. However, any field with an
  4359. // empty value appearing in NullFields will be sent to the server as
  4360. // null. It is an error if a field in this list has a non-empty value.
  4361. // This may be used to include null fields in Patch requests.
  4362. NullFields []string `json:"-"`
  4363. }
  4364. func (s *GoogleCloudVideointelligenceV1p3beta1NormalizedVertex) MarshalJSON() ([]byte, error) {
  4365. type NoMethod GoogleCloudVideointelligenceV1p3beta1NormalizedVertex
  4366. raw := NoMethod(*s)
  4367. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4368. }
  4369. func (s *GoogleCloudVideointelligenceV1p3beta1NormalizedVertex) UnmarshalJSON(data []byte) error {
  4370. type NoMethod GoogleCloudVideointelligenceV1p3beta1NormalizedVertex
  4371. var s1 struct {
  4372. X gensupport.JSONFloat64 `json:"x"`
  4373. Y gensupport.JSONFloat64 `json:"y"`
  4374. *NoMethod
  4375. }
  4376. s1.NoMethod = (*NoMethod)(s)
  4377. if err := json.Unmarshal(data, &s1); err != nil {
  4378. return err
  4379. }
  4380. s.X = float64(s1.X)
  4381. s.Y = float64(s1.Y)
  4382. return nil
  4383. }
  4384. // GoogleCloudVideointelligenceV1p3beta1ObjectTrackingAnnotation:
  4385. // Annotations corresponding to one tracked object.
  4386. type GoogleCloudVideointelligenceV1p3beta1ObjectTrackingAnnotation struct {
  4387. // Confidence: Object category's labeling confidence of this track.
  4388. Confidence float64 `json:"confidence,omitempty"`
  4389. // Entity: Entity to specify the object category that this track is
  4390. // labeled as.
  4391. Entity *GoogleCloudVideointelligenceV1p3beta1Entity `json:"entity,omitempty"`
  4392. // Frames: Information corresponding to all frames where this object
  4393. // track appears.
  4394. // Non-streaming batch mode: it may be one or multiple
  4395. // ObjectTrackingFrame
  4396. // messages in frames.
  4397. // Streaming mode: it can only be one ObjectTrackingFrame message in
  4398. // frames.
  4399. Frames []*GoogleCloudVideointelligenceV1p3beta1ObjectTrackingFrame `json:"frames,omitempty"`
  4400. // Segment: Non-streaming batch mode ONLY.
  4401. // Each object track corresponds to one video segment where it appears.
  4402. Segment *GoogleCloudVideointelligenceV1p3beta1VideoSegment `json:"segment,omitempty"`
  4403. // TrackId: Streaming mode ONLY.
  4404. // In streaming mode, we do not know the end time of a tracked
  4405. // object
  4406. // before it is completed. Hence, there is no VideoSegment info
  4407. // returned.
  4408. // Instead, we provide a unique identifiable integer track_id so
  4409. // that
  4410. // the customers can correlate the results of the
  4411. // ongoing
  4412. // ObjectTrackAnnotation of the same track_id over time.
  4413. TrackId int64 `json:"trackId,omitempty,string"`
  4414. // ForceSendFields is a list of field names (e.g. "Confidence") to
  4415. // unconditionally include in API requests. By default, fields with
  4416. // empty values are omitted from API requests. However, any non-pointer,
  4417. // non-interface field appearing in ForceSendFields will be sent to the
  4418. // server regardless of whether the field is empty or not. This may be
  4419. // used to include empty fields in Patch requests.
  4420. ForceSendFields []string `json:"-"`
  4421. // NullFields is a list of field names (e.g. "Confidence") to include in
  4422. // API requests with the JSON null value. By default, fields with empty
  4423. // values are omitted from API requests. However, any field with an
  4424. // empty value appearing in NullFields will be sent to the server as
  4425. // null. It is an error if a field in this list has a non-empty value.
  4426. // This may be used to include null fields in Patch requests.
  4427. NullFields []string `json:"-"`
  4428. }
  4429. func (s *GoogleCloudVideointelligenceV1p3beta1ObjectTrackingAnnotation) MarshalJSON() ([]byte, error) {
  4430. type NoMethod GoogleCloudVideointelligenceV1p3beta1ObjectTrackingAnnotation
  4431. raw := NoMethod(*s)
  4432. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4433. }
  4434. func (s *GoogleCloudVideointelligenceV1p3beta1ObjectTrackingAnnotation) UnmarshalJSON(data []byte) error {
  4435. type NoMethod GoogleCloudVideointelligenceV1p3beta1ObjectTrackingAnnotation
  4436. var s1 struct {
  4437. Confidence gensupport.JSONFloat64 `json:"confidence"`
  4438. *NoMethod
  4439. }
  4440. s1.NoMethod = (*NoMethod)(s)
  4441. if err := json.Unmarshal(data, &s1); err != nil {
  4442. return err
  4443. }
  4444. s.Confidence = float64(s1.Confidence)
  4445. return nil
  4446. }
  4447. // GoogleCloudVideointelligenceV1p3beta1ObjectTrackingFrame: Video frame
  4448. // level annotations for object detection and tracking. This
  4449. // field
  4450. // stores per frame location, time offset, and confidence.
  4451. type GoogleCloudVideointelligenceV1p3beta1ObjectTrackingFrame struct {
  4452. // NormalizedBoundingBox: The normalized bounding box location of this
  4453. // object track for the frame.
  4454. NormalizedBoundingBox *GoogleCloudVideointelligenceV1p3beta1NormalizedBoundingBox `json:"normalizedBoundingBox,omitempty"`
  4455. // TimeOffset: The timestamp of the frame in microseconds.
  4456. TimeOffset string `json:"timeOffset,omitempty"`
  4457. // ForceSendFields is a list of field names (e.g.
  4458. // "NormalizedBoundingBox") to unconditionally include in API requests.
  4459. // By default, fields with empty values are omitted from API requests.
  4460. // However, any non-pointer, non-interface field appearing in
  4461. // ForceSendFields will be sent to the server regardless of whether the
  4462. // field is empty or not. This may be used to include empty fields in
  4463. // Patch requests.
  4464. ForceSendFields []string `json:"-"`
  4465. // NullFields is a list of field names (e.g. "NormalizedBoundingBox") to
  4466. // include in API requests with the JSON null value. By default, fields
  4467. // with empty values are omitted from API requests. However, any field
  4468. // with an empty value appearing in NullFields will be sent to the
  4469. // server as null. It is an error if a field in this list has a
  4470. // non-empty value. This may be used to include null fields in Patch
  4471. // requests.
  4472. NullFields []string `json:"-"`
  4473. }
  4474. func (s *GoogleCloudVideointelligenceV1p3beta1ObjectTrackingFrame) MarshalJSON() ([]byte, error) {
  4475. type NoMethod GoogleCloudVideointelligenceV1p3beta1ObjectTrackingFrame
  4476. raw := NoMethod(*s)
  4477. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4478. }
  4479. // GoogleCloudVideointelligenceV1p3beta1ShotChangeDetectionConfig:
  4480. // Config for SHOT_CHANGE_DETECTION.
  4481. type GoogleCloudVideointelligenceV1p3beta1ShotChangeDetectionConfig struct {
  4482. // Model: Model to use for shot change detection.
  4483. // Supported values: "builtin/stable" (the default if unset)
  4484. // and
  4485. // "builtin/latest".
  4486. Model string `json:"model,omitempty"`
  4487. // ForceSendFields is a list of field names (e.g. "Model") to
  4488. // unconditionally include in API requests. By default, fields with
  4489. // empty values are omitted from API requests. However, any non-pointer,
  4490. // non-interface field appearing in ForceSendFields will be sent to the
  4491. // server regardless of whether the field is empty or not. This may be
  4492. // used to include empty fields in Patch requests.
  4493. ForceSendFields []string `json:"-"`
  4494. // NullFields is a list of field names (e.g. "Model") to include in API
  4495. // requests with the JSON null value. By default, fields with empty
  4496. // values are omitted from API requests. However, any field with an
  4497. // empty value appearing in NullFields will be sent to the server as
  4498. // null. It is an error if a field in this list has a non-empty value.
  4499. // This may be used to include null fields in Patch requests.
  4500. NullFields []string `json:"-"`
  4501. }
  4502. func (s *GoogleCloudVideointelligenceV1p3beta1ShotChangeDetectionConfig) MarshalJSON() ([]byte, error) {
  4503. type NoMethod GoogleCloudVideointelligenceV1p3beta1ShotChangeDetectionConfig
  4504. raw := NoMethod(*s)
  4505. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4506. }
  4507. // GoogleCloudVideointelligenceV1p3beta1SpeechContext: Provides "hints"
  4508. // to the speech recognizer to favor specific words and phrases
  4509. // in the results.
  4510. type GoogleCloudVideointelligenceV1p3beta1SpeechContext struct {
  4511. // Phrases: *Optional* A list of strings containing words and phrases
  4512. // "hints" so that
  4513. // the speech recognition is more likely to recognize them. This can be
  4514. // used
  4515. // to improve the accuracy for specific words and phrases, for example,
  4516. // if
  4517. // specific commands are typically spoken by the user. This can also be
  4518. // used
  4519. // to add additional words to the vocabulary of the recognizer.
  4520. // See
  4521. // [usage limits](https://cloud.google.com/speech/limits#content).
  4522. Phrases []string `json:"phrases,omitempty"`
  4523. // ForceSendFields is a list of field names (e.g. "Phrases") to
  4524. // unconditionally include in API requests. By default, fields with
  4525. // empty values are omitted from API requests. However, any non-pointer,
  4526. // non-interface field appearing in ForceSendFields will be sent to the
  4527. // server regardless of whether the field is empty or not. This may be
  4528. // used to include empty fields in Patch requests.
  4529. ForceSendFields []string `json:"-"`
  4530. // NullFields is a list of field names (e.g. "Phrases") to include in
  4531. // API requests with the JSON null value. By default, fields with empty
  4532. // values are omitted from API requests. However, any field with an
  4533. // empty value appearing in NullFields will be sent to the server as
  4534. // null. It is an error if a field in this list has a non-empty value.
  4535. // This may be used to include null fields in Patch requests.
  4536. NullFields []string `json:"-"`
  4537. }
  4538. func (s *GoogleCloudVideointelligenceV1p3beta1SpeechContext) MarshalJSON() ([]byte, error) {
  4539. type NoMethod GoogleCloudVideointelligenceV1p3beta1SpeechContext
  4540. raw := NoMethod(*s)
  4541. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4542. }
  4543. // GoogleCloudVideointelligenceV1p3beta1SpeechRecognitionAlternative:
  4544. // Alternative hypotheses (a.k.a. n-best list).
  4545. type GoogleCloudVideointelligenceV1p3beta1SpeechRecognitionAlternative struct {
  4546. // Confidence: The confidence estimate between 0.0 and 1.0. A higher
  4547. // number
  4548. // indicates an estimated greater likelihood that the recognized words
  4549. // are
  4550. // correct. This field is typically provided only for the top
  4551. // hypothesis, and
  4552. // only for `is_final=true` results. Clients should not rely on
  4553. // the
  4554. // `confidence` field as it is not guaranteed to be accurate or
  4555. // consistent.
  4556. // The default of 0.0 is a sentinel value indicating `confidence` was
  4557. // not set.
  4558. Confidence float64 `json:"confidence,omitempty"`
  4559. // Transcript: Transcript text representing the words that the user
  4560. // spoke.
  4561. Transcript string `json:"transcript,omitempty"`
  4562. // Words: A list of word-specific information for each recognized word.
  4563. Words []*GoogleCloudVideointelligenceV1p3beta1WordInfo `json:"words,omitempty"`
  4564. // ForceSendFields is a list of field names (e.g. "Confidence") to
  4565. // unconditionally include in API requests. By default, fields with
  4566. // empty values are omitted from API requests. However, any non-pointer,
  4567. // non-interface field appearing in ForceSendFields will be sent to the
  4568. // server regardless of whether the field is empty or not. This may be
  4569. // used to include empty fields in Patch requests.
  4570. ForceSendFields []string `json:"-"`
  4571. // NullFields is a list of field names (e.g. "Confidence") to include in
  4572. // API requests with the JSON null value. By default, fields with empty
  4573. // values are omitted from API requests. However, any field with an
  4574. // empty value appearing in NullFields will be sent to the server as
  4575. // null. It is an error if a field in this list has a non-empty value.
  4576. // This may be used to include null fields in Patch requests.
  4577. NullFields []string `json:"-"`
  4578. }
  4579. func (s *GoogleCloudVideointelligenceV1p3beta1SpeechRecognitionAlternative) MarshalJSON() ([]byte, error) {
  4580. type NoMethod GoogleCloudVideointelligenceV1p3beta1SpeechRecognitionAlternative
  4581. raw := NoMethod(*s)
  4582. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4583. }
  4584. func (s *GoogleCloudVideointelligenceV1p3beta1SpeechRecognitionAlternative) UnmarshalJSON(data []byte) error {
  4585. type NoMethod GoogleCloudVideointelligenceV1p3beta1SpeechRecognitionAlternative
  4586. var s1 struct {
  4587. Confidence gensupport.JSONFloat64 `json:"confidence"`
  4588. *NoMethod
  4589. }
  4590. s1.NoMethod = (*NoMethod)(s)
  4591. if err := json.Unmarshal(data, &s1); err != nil {
  4592. return err
  4593. }
  4594. s.Confidence = float64(s1.Confidence)
  4595. return nil
  4596. }
  4597. // GoogleCloudVideointelligenceV1p3beta1SpeechTranscription: A speech
  4598. // recognition result corresponding to a portion of the audio.
  4599. type GoogleCloudVideointelligenceV1p3beta1SpeechTranscription struct {
  4600. // Alternatives: May contain one or more recognition hypotheses (up to
  4601. // the maximum specified
  4602. // in `max_alternatives`). These alternatives are ordered in terms
  4603. // of
  4604. // accuracy, with the top (first) alternative being the most probable,
  4605. // as
  4606. // ranked by the recognizer.
  4607. Alternatives []*GoogleCloudVideointelligenceV1p3beta1SpeechRecognitionAlternative `json:"alternatives,omitempty"`
  4608. // LanguageCode: Output only.
  4609. // The
  4610. // [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag
  4611. // of the
  4612. // language in this result. This language code was detected to have the
  4613. // most
  4614. // likelihood of being spoken in the audio.
  4615. LanguageCode string `json:"languageCode,omitempty"`
  4616. // ForceSendFields is a list of field names (e.g. "Alternatives") to
  4617. // unconditionally include in API requests. By default, fields with
  4618. // empty values are omitted from API requests. However, any non-pointer,
  4619. // non-interface field appearing in ForceSendFields will be sent to the
  4620. // server regardless of whether the field is empty or not. This may be
  4621. // used to include empty fields in Patch requests.
  4622. ForceSendFields []string `json:"-"`
  4623. // NullFields is a list of field names (e.g. "Alternatives") to include
  4624. // in API requests with the JSON null value. By default, fields with
  4625. // empty values are omitted from API requests. However, any field with
  4626. // an empty value appearing in NullFields will be sent to the server as
  4627. // null. It is an error if a field in this list has a non-empty value.
  4628. // This may be used to include null fields in Patch requests.
  4629. NullFields []string `json:"-"`
  4630. }
  4631. func (s *GoogleCloudVideointelligenceV1p3beta1SpeechTranscription) MarshalJSON() ([]byte, error) {
  4632. type NoMethod GoogleCloudVideointelligenceV1p3beta1SpeechTranscription
  4633. raw := NoMethod(*s)
  4634. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4635. }
  4636. // GoogleCloudVideointelligenceV1p3beta1SpeechTranscriptionConfig:
  4637. // Config for SPEECH_TRANSCRIPTION.
  4638. type GoogleCloudVideointelligenceV1p3beta1SpeechTranscriptionConfig struct {
  4639. // AudioTracks: *Optional* For file formats, such as MXF or MKV,
  4640. // supporting multiple audio
  4641. // tracks, specify up to two tracks. Default: track 0.
  4642. AudioTracks []int64 `json:"audioTracks,omitempty"`
  4643. // DiarizationSpeakerCount: *Optional*
  4644. // If set, specifies the estimated number of speakers in the
  4645. // conversation.
  4646. // If not set, defaults to '2'.
  4647. // Ignored unless enable_speaker_diarization is set to true.
  4648. DiarizationSpeakerCount int64 `json:"diarizationSpeakerCount,omitempty"`
  4649. // EnableAutomaticPunctuation: *Optional* If 'true', adds punctuation to
  4650. // recognition result hypotheses.
  4651. // This feature is only available in select languages. Setting this
  4652. // for
  4653. // requests in other languages has no effect at all. The default 'false'
  4654. // value
  4655. // does not add punctuation to result hypotheses. NOTE: "This is
  4656. // currently
  4657. // offered as an experimental service, complimentary to all users. In
  4658. // the
  4659. // future this may be exclusively available as a premium feature."
  4660. EnableAutomaticPunctuation bool `json:"enableAutomaticPunctuation,omitempty"`
  4661. // EnableSpeakerDiarization: *Optional* If 'true', enables speaker
  4662. // detection for each recognized word in
  4663. // the top alternative of the recognition result using a speaker_tag
  4664. // provided
  4665. // in the WordInfo.
  4666. // Note: When this is true, we send all the words from the beginning of
  4667. // the
  4668. // audio for the top alternative in every consecutive responses.
  4669. // This is done in order to improve our speaker tags as our models learn
  4670. // to
  4671. // identify the speakers in the conversation over time.
  4672. EnableSpeakerDiarization bool `json:"enableSpeakerDiarization,omitempty"`
  4673. // EnableWordConfidence: *Optional* If `true`, the top result includes a
  4674. // list of words and the
  4675. // confidence for those words. If `false`, no word-level
  4676. // confidence
  4677. // information is returned. The default is `false`.
  4678. EnableWordConfidence bool `json:"enableWordConfidence,omitempty"`
  4679. // FilterProfanity: *Optional* If set to `true`, the server will attempt
  4680. // to filter out
  4681. // profanities, replacing all but the initial character in each filtered
  4682. // word
  4683. // with asterisks, e.g. "f***". If set to `false` or omitted,
  4684. // profanities
  4685. // won't be filtered out.
  4686. FilterProfanity bool `json:"filterProfanity,omitempty"`
  4687. // LanguageCode: *Required* The language of the supplied audio as
  4688. // a
  4689. // [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language
  4690. // tag.
  4691. // Example: "en-US".
  4692. // See [Language
  4693. // Support](https://cloud.google.com/speech/docs/languages)
  4694. // for a list of the currently supported language codes.
  4695. LanguageCode string `json:"languageCode,omitempty"`
  4696. // MaxAlternatives: *Optional* Maximum number of recognition hypotheses
  4697. // to be returned.
  4698. // Specifically, the maximum number of `SpeechRecognitionAlternative`
  4699. // messages
  4700. // within each `SpeechTranscription`. The server may return fewer
  4701. // than
  4702. // `max_alternatives`. Valid values are `0`-`30`. A value of `0` or `1`
  4703. // will
  4704. // return a maximum of one. If omitted, will return a maximum of one.
  4705. MaxAlternatives int64 `json:"maxAlternatives,omitempty"`
  4706. // SpeechContexts: *Optional* A means to provide context to assist the
  4707. // speech recognition.
  4708. SpeechContexts []*GoogleCloudVideointelligenceV1p3beta1SpeechContext `json:"speechContexts,omitempty"`
  4709. // ForceSendFields is a list of field names (e.g. "AudioTracks") to
  4710. // unconditionally include in API requests. By default, fields with
  4711. // empty values are omitted from API requests. However, any non-pointer,
  4712. // non-interface field appearing in ForceSendFields will be sent to the
  4713. // server regardless of whether the field is empty or not. This may be
  4714. // used to include empty fields in Patch requests.
  4715. ForceSendFields []string `json:"-"`
  4716. // NullFields is a list of field names (e.g. "AudioTracks") to include
  4717. // in API requests with the JSON null value. By default, fields with
  4718. // empty values are omitted from API requests. However, any field with
  4719. // an empty value appearing in NullFields will be sent to the server as
  4720. // null. It is an error if a field in this list has a non-empty value.
  4721. // This may be used to include null fields in Patch requests.
  4722. NullFields []string `json:"-"`
  4723. }
  4724. func (s *GoogleCloudVideointelligenceV1p3beta1SpeechTranscriptionConfig) MarshalJSON() ([]byte, error) {
  4725. type NoMethod GoogleCloudVideointelligenceV1p3beta1SpeechTranscriptionConfig
  4726. raw := NoMethod(*s)
  4727. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4728. }
  4729. // GoogleCloudVideointelligenceV1p3beta1StreamingAnnotateVideoResponse:
  4730. // `StreamingAnnotateVideoResponse` is the only message returned to the
  4731. // client
  4732. // by `StreamingAnnotateVideo`. A series of zero or
  4733. // more
  4734. // `StreamingAnnotateVideoResponse` messages are streamed back to the
  4735. // client.
  4736. type GoogleCloudVideointelligenceV1p3beta1StreamingAnnotateVideoResponse struct {
  4737. // AnnotationResults: Streaming annotation results.
  4738. AnnotationResults *GoogleCloudVideointelligenceV1p3beta1StreamingVideoAnnotationResults `json:"annotationResults,omitempty"`
  4739. // AnnotationResultsUri: GCS URI that stores annotation results of one
  4740. // streaming session.
  4741. // It is a directory that can hold multiple files in JSON
  4742. // format.
  4743. // Example uri
  4744. // format:
  4745. // gs://bucket_id/object_id/cloud_project_name-session_id
  4746. AnnotationResultsUri string `json:"annotationResultsUri,omitempty"`
  4747. // Error: If set, returns a google.rpc.Status message that
  4748. // specifies the error for the operation.
  4749. Error *GoogleRpcStatus `json:"error,omitempty"`
  4750. // ForceSendFields is a list of field names (e.g. "AnnotationResults")
  4751. // to unconditionally include in API requests. By default, fields with
  4752. // empty values are omitted from API requests. However, any non-pointer,
  4753. // non-interface field appearing in ForceSendFields will be sent to the
  4754. // server regardless of whether the field is empty or not. This may be
  4755. // used to include empty fields in Patch requests.
  4756. ForceSendFields []string `json:"-"`
  4757. // NullFields is a list of field names (e.g. "AnnotationResults") to
  4758. // include in API requests with the JSON null value. By default, fields
  4759. // with empty values are omitted from API requests. However, any field
  4760. // with an empty value appearing in NullFields will be sent to the
  4761. // server as null. It is an error if a field in this list has a
  4762. // non-empty value. This may be used to include null fields in Patch
  4763. // requests.
  4764. NullFields []string `json:"-"`
  4765. }
  4766. func (s *GoogleCloudVideointelligenceV1p3beta1StreamingAnnotateVideoResponse) MarshalJSON() ([]byte, error) {
  4767. type NoMethod GoogleCloudVideointelligenceV1p3beta1StreamingAnnotateVideoResponse
  4768. raw := NoMethod(*s)
  4769. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4770. }
  4771. // GoogleCloudVideointelligenceV1p3beta1StreamingVideoAnnotationResults:
  4772. // Streaming annotation results corresponding to a portion of the
  4773. // video
  4774. // that is currently being processed.
  4775. type GoogleCloudVideointelligenceV1p3beta1StreamingVideoAnnotationResults struct {
  4776. // ExplicitAnnotation: Explicit content annotation results.
  4777. ExplicitAnnotation *GoogleCloudVideointelligenceV1p3beta1ExplicitContentAnnotation `json:"explicitAnnotation,omitempty"`
  4778. // LabelAnnotations: Label annotation results.
  4779. LabelAnnotations []*GoogleCloudVideointelligenceV1p3beta1LabelAnnotation `json:"labelAnnotations,omitempty"`
  4780. // ObjectAnnotations: Object tracking results.
  4781. ObjectAnnotations []*GoogleCloudVideointelligenceV1p3beta1ObjectTrackingAnnotation `json:"objectAnnotations,omitempty"`
  4782. // ShotAnnotations: Shot annotation results. Each shot is represented as
  4783. // a video segment.
  4784. ShotAnnotations []*GoogleCloudVideointelligenceV1p3beta1VideoSegment `json:"shotAnnotations,omitempty"`
  4785. // ForceSendFields is a list of field names (e.g. "ExplicitAnnotation")
  4786. // to unconditionally include in API requests. By default, fields with
  4787. // empty values are omitted from API requests. However, any non-pointer,
  4788. // non-interface field appearing in ForceSendFields will be sent to the
  4789. // server regardless of whether the field is empty or not. This may be
  4790. // used to include empty fields in Patch requests.
  4791. ForceSendFields []string `json:"-"`
  4792. // NullFields is a list of field names (e.g. "ExplicitAnnotation") to
  4793. // include in API requests with the JSON null value. By default, fields
  4794. // with empty values are omitted from API requests. However, any field
  4795. // with an empty value appearing in NullFields will be sent to the
  4796. // server as null. It is an error if a field in this list has a
  4797. // non-empty value. This may be used to include null fields in Patch
  4798. // requests.
  4799. NullFields []string `json:"-"`
  4800. }
  4801. func (s *GoogleCloudVideointelligenceV1p3beta1StreamingVideoAnnotationResults) MarshalJSON() ([]byte, error) {
  4802. type NoMethod GoogleCloudVideointelligenceV1p3beta1StreamingVideoAnnotationResults
  4803. raw := NoMethod(*s)
  4804. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4805. }
  4806. // GoogleCloudVideointelligenceV1p3beta1TextAnnotation: Annotations
  4807. // related to one detected OCR text snippet. This will contain
  4808. // the
  4809. // corresponding text, confidence value, and frame level information for
  4810. // each
  4811. // detection.
  4812. type GoogleCloudVideointelligenceV1p3beta1TextAnnotation struct {
  4813. // Segments: All video segments where OCR detected text appears.
  4814. Segments []*GoogleCloudVideointelligenceV1p3beta1TextSegment `json:"segments,omitempty"`
  4815. // Text: The detected text.
  4816. Text string `json:"text,omitempty"`
  4817. // ForceSendFields is a list of field names (e.g. "Segments") to
  4818. // unconditionally include in API requests. By default, fields with
  4819. // empty values are omitted from API requests. However, any non-pointer,
  4820. // non-interface field appearing in ForceSendFields will be sent to the
  4821. // server regardless of whether the field is empty or not. This may be
  4822. // used to include empty fields in Patch requests.
  4823. ForceSendFields []string `json:"-"`
  4824. // NullFields is a list of field names (e.g. "Segments") to include in
  4825. // API requests with the JSON null value. By default, fields with empty
  4826. // values are omitted from API requests. However, any field with an
  4827. // empty value appearing in NullFields will be sent to the server as
  4828. // null. It is an error if a field in this list has a non-empty value.
  4829. // This may be used to include null fields in Patch requests.
  4830. NullFields []string `json:"-"`
  4831. }
  4832. func (s *GoogleCloudVideointelligenceV1p3beta1TextAnnotation) MarshalJSON() ([]byte, error) {
  4833. type NoMethod GoogleCloudVideointelligenceV1p3beta1TextAnnotation
  4834. raw := NoMethod(*s)
  4835. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4836. }
  4837. // GoogleCloudVideointelligenceV1p3beta1TextDetectionConfig: Config for
  4838. // TEXT_DETECTION.
  4839. type GoogleCloudVideointelligenceV1p3beta1TextDetectionConfig struct {
  4840. // LanguageHints: Language hint can be specified if the language to be
  4841. // detected is known a
  4842. // priori. It can increase the accuracy of the detection. Language hint
  4843. // must
  4844. // be language code in BCP-47 format.
  4845. //
  4846. // Automatic language detection is performed if no hint is provided.
  4847. LanguageHints []string `json:"languageHints,omitempty"`
  4848. // ForceSendFields is a list of field names (e.g. "LanguageHints") to
  4849. // unconditionally include in API requests. By default, fields with
  4850. // empty values are omitted from API requests. However, any non-pointer,
  4851. // non-interface field appearing in ForceSendFields will be sent to the
  4852. // server regardless of whether the field is empty or not. This may be
  4853. // used to include empty fields in Patch requests.
  4854. ForceSendFields []string `json:"-"`
  4855. // NullFields is a list of field names (e.g. "LanguageHints") to include
  4856. // in API requests with the JSON null value. By default, fields with
  4857. // empty values are omitted from API requests. However, any field with
  4858. // an empty value appearing in NullFields will be sent to the server as
  4859. // null. It is an error if a field in this list has a non-empty value.
  4860. // This may be used to include null fields in Patch requests.
  4861. NullFields []string `json:"-"`
  4862. }
  4863. func (s *GoogleCloudVideointelligenceV1p3beta1TextDetectionConfig) MarshalJSON() ([]byte, error) {
  4864. type NoMethod GoogleCloudVideointelligenceV1p3beta1TextDetectionConfig
  4865. raw := NoMethod(*s)
  4866. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4867. }
  4868. // GoogleCloudVideointelligenceV1p3beta1TextFrame: Video frame level
  4869. // annotation results for text annotation (OCR).
  4870. // Contains information regarding timestamp and bounding box locations
  4871. // for the
  4872. // frames containing detected OCR text snippets.
  4873. type GoogleCloudVideointelligenceV1p3beta1TextFrame struct {
  4874. // RotatedBoundingBox: Bounding polygon of the detected text for this
  4875. // frame.
  4876. RotatedBoundingBox *GoogleCloudVideointelligenceV1p3beta1NormalizedBoundingPoly `json:"rotatedBoundingBox,omitempty"`
  4877. // TimeOffset: Timestamp of this frame.
  4878. TimeOffset string `json:"timeOffset,omitempty"`
  4879. // ForceSendFields is a list of field names (e.g. "RotatedBoundingBox")
  4880. // to unconditionally include in API requests. By default, fields with
  4881. // empty values are omitted from API requests. However, any non-pointer,
  4882. // non-interface field appearing in ForceSendFields will be sent to the
  4883. // server regardless of whether the field is empty or not. This may be
  4884. // used to include empty fields in Patch requests.
  4885. ForceSendFields []string `json:"-"`
  4886. // NullFields is a list of field names (e.g. "RotatedBoundingBox") to
  4887. // include in API requests with the JSON null value. By default, fields
  4888. // with empty values are omitted from API requests. However, any field
  4889. // with an empty value appearing in NullFields will be sent to the
  4890. // server as null. It is an error if a field in this list has a
  4891. // non-empty value. This may be used to include null fields in Patch
  4892. // requests.
  4893. NullFields []string `json:"-"`
  4894. }
  4895. func (s *GoogleCloudVideointelligenceV1p3beta1TextFrame) MarshalJSON() ([]byte, error) {
  4896. type NoMethod GoogleCloudVideointelligenceV1p3beta1TextFrame
  4897. raw := NoMethod(*s)
  4898. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4899. }
  4900. // GoogleCloudVideointelligenceV1p3beta1TextSegment: Video segment level
  4901. // annotation results for text detection.
  4902. type GoogleCloudVideointelligenceV1p3beta1TextSegment struct {
  4903. // Confidence: Confidence for the track of detected text. It is
  4904. // calculated as the highest
  4905. // over all frames where OCR detected text appears.
  4906. Confidence float64 `json:"confidence,omitempty"`
  4907. // Frames: Information related to the frames where OCR detected text
  4908. // appears.
  4909. Frames []*GoogleCloudVideointelligenceV1p3beta1TextFrame `json:"frames,omitempty"`
  4910. // Segment: Video segment where a text snippet was detected.
  4911. Segment *GoogleCloudVideointelligenceV1p3beta1VideoSegment `json:"segment,omitempty"`
  4912. // ForceSendFields is a list of field names (e.g. "Confidence") to
  4913. // unconditionally include in API requests. By default, fields with
  4914. // empty values are omitted from API requests. However, any non-pointer,
  4915. // non-interface field appearing in ForceSendFields will be sent to the
  4916. // server regardless of whether the field is empty or not. This may be
  4917. // used to include empty fields in Patch requests.
  4918. ForceSendFields []string `json:"-"`
  4919. // NullFields is a list of field names (e.g. "Confidence") to include in
  4920. // API requests with the JSON null value. By default, fields with empty
  4921. // values are omitted from API requests. However, any field with an
  4922. // empty value appearing in NullFields will be sent to the server as
  4923. // null. It is an error if a field in this list has a non-empty value.
  4924. // This may be used to include null fields in Patch requests.
  4925. NullFields []string `json:"-"`
  4926. }
  4927. func (s *GoogleCloudVideointelligenceV1p3beta1TextSegment) MarshalJSON() ([]byte, error) {
  4928. type NoMethod GoogleCloudVideointelligenceV1p3beta1TextSegment
  4929. raw := NoMethod(*s)
  4930. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4931. }
  4932. func (s *GoogleCloudVideointelligenceV1p3beta1TextSegment) UnmarshalJSON(data []byte) error {
  4933. type NoMethod GoogleCloudVideointelligenceV1p3beta1TextSegment
  4934. var s1 struct {
  4935. Confidence gensupport.JSONFloat64 `json:"confidence"`
  4936. *NoMethod
  4937. }
  4938. s1.NoMethod = (*NoMethod)(s)
  4939. if err := json.Unmarshal(data, &s1); err != nil {
  4940. return err
  4941. }
  4942. s.Confidence = float64(s1.Confidence)
  4943. return nil
  4944. }
  4945. // GoogleCloudVideointelligenceV1p3beta1VideoAnnotationProgress:
  4946. // Annotation progress for a single video.
  4947. type GoogleCloudVideointelligenceV1p3beta1VideoAnnotationProgress struct {
  4948. // InputUri: Video file location in
  4949. // [Google Cloud Storage](https://cloud.google.com/storage/).
  4950. InputUri string `json:"inputUri,omitempty"`
  4951. // ProgressPercent: Approximate percentage processed thus far.
  4952. // Guaranteed to be
  4953. // 100 when fully processed.
  4954. ProgressPercent int64 `json:"progressPercent,omitempty"`
  4955. // StartTime: Time when the request was received.
  4956. StartTime string `json:"startTime,omitempty"`
  4957. // UpdateTime: Time of the most recent update.
  4958. UpdateTime string `json:"updateTime,omitempty"`
  4959. // ForceSendFields is a list of field names (e.g. "InputUri") to
  4960. // unconditionally include in API requests. By default, fields with
  4961. // empty values are omitted from API requests. However, any non-pointer,
  4962. // non-interface field appearing in ForceSendFields will be sent to the
  4963. // server regardless of whether the field is empty or not. This may be
  4964. // used to include empty fields in Patch requests.
  4965. ForceSendFields []string `json:"-"`
  4966. // NullFields is a list of field names (e.g. "InputUri") to include in
  4967. // API requests with the JSON null value. By default, fields with empty
  4968. // values are omitted from API requests. However, any field with an
  4969. // empty value appearing in NullFields will be sent to the server as
  4970. // null. It is an error if a field in this list has a non-empty value.
  4971. // This may be used to include null fields in Patch requests.
  4972. NullFields []string `json:"-"`
  4973. }
  4974. func (s *GoogleCloudVideointelligenceV1p3beta1VideoAnnotationProgress) MarshalJSON() ([]byte, error) {
  4975. type NoMethod GoogleCloudVideointelligenceV1p3beta1VideoAnnotationProgress
  4976. raw := NoMethod(*s)
  4977. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4978. }
  4979. // GoogleCloudVideointelligenceV1p3beta1VideoAnnotationResults:
  4980. // Annotation results for a single video.
  4981. type GoogleCloudVideointelligenceV1p3beta1VideoAnnotationResults struct {
  4982. // Error: If set, indicates an error. Note that for a single
  4983. // `AnnotateVideoRequest`
  4984. // some videos may succeed and some may fail.
  4985. Error *GoogleRpcStatus `json:"error,omitempty"`
  4986. // ExplicitAnnotation: Explicit content annotation.
  4987. ExplicitAnnotation *GoogleCloudVideointelligenceV1p3beta1ExplicitContentAnnotation `json:"explicitAnnotation,omitempty"`
  4988. // FrameLabelAnnotations: Label annotations on frame level.
  4989. // There is exactly one element for each unique label.
  4990. FrameLabelAnnotations []*GoogleCloudVideointelligenceV1p3beta1LabelAnnotation `json:"frameLabelAnnotations,omitempty"`
  4991. // InputUri: Video file location in
  4992. // [Google Cloud Storage](https://cloud.google.com/storage/).
  4993. InputUri string `json:"inputUri,omitempty"`
  4994. // ObjectAnnotations: Annotations for list of objects detected and
  4995. // tracked in video.
  4996. ObjectAnnotations []*GoogleCloudVideointelligenceV1p3beta1ObjectTrackingAnnotation `json:"objectAnnotations,omitempty"`
  4997. // SegmentLabelAnnotations: Label annotations on video level or user
  4998. // specified segment level.
  4999. // There is exactly one element for each unique label.
  5000. SegmentLabelAnnotations []*GoogleCloudVideointelligenceV1p3beta1LabelAnnotation `json:"segmentLabelAnnotations,omitempty"`
  5001. // ShotAnnotations: Shot annotations. Each shot is represented as a
  5002. // video segment.
  5003. ShotAnnotations []*GoogleCloudVideointelligenceV1p3beta1VideoSegment `json:"shotAnnotations,omitempty"`
  5004. // ShotLabelAnnotations: Label annotations on shot level.
  5005. // There is exactly one element for each unique label.
  5006. ShotLabelAnnotations []*GoogleCloudVideointelligenceV1p3beta1LabelAnnotation `json:"shotLabelAnnotations,omitempty"`
  5007. // SpeechTranscriptions: Speech transcription.
  5008. SpeechTranscriptions []*GoogleCloudVideointelligenceV1p3beta1SpeechTranscription `json:"speechTranscriptions,omitempty"`
  5009. // TextAnnotations: OCR text detection and tracking.
  5010. // Annotations for list of detected text snippets. Each will have list
  5011. // of
  5012. // frame information associated with it.
  5013. TextAnnotations []*GoogleCloudVideointelligenceV1p3beta1TextAnnotation `json:"textAnnotations,omitempty"`
  5014. // ForceSendFields is a list of field names (e.g. "Error") to
  5015. // unconditionally include in API requests. By default, fields with
  5016. // empty values are omitted from API requests. However, any non-pointer,
  5017. // non-interface field appearing in ForceSendFields will be sent to the
  5018. // server regardless of whether the field is empty or not. This may be
  5019. // used to include empty fields in Patch requests.
  5020. ForceSendFields []string `json:"-"`
  5021. // NullFields is a list of field names (e.g. "Error") to include in API
  5022. // requests with the JSON null value. By default, fields with empty
  5023. // values are omitted from API requests. However, any field with an
  5024. // empty value appearing in NullFields will be sent to the server as
  5025. // null. It is an error if a field in this list has a non-empty value.
  5026. // This may be used to include null fields in Patch requests.
  5027. NullFields []string `json:"-"`
  5028. }
  5029. func (s *GoogleCloudVideointelligenceV1p3beta1VideoAnnotationResults) MarshalJSON() ([]byte, error) {
  5030. type NoMethod GoogleCloudVideointelligenceV1p3beta1VideoAnnotationResults
  5031. raw := NoMethod(*s)
  5032. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5033. }
  5034. // GoogleCloudVideointelligenceV1p3beta1VideoContext: Video context
  5035. // and/or feature-specific parameters.
  5036. type GoogleCloudVideointelligenceV1p3beta1VideoContext struct {
  5037. // ExplicitContentDetectionConfig: Config for
  5038. // EXPLICIT_CONTENT_DETECTION.
  5039. ExplicitContentDetectionConfig *GoogleCloudVideointelligenceV1p3beta1ExplicitContentDetectionConfig `json:"explicitContentDetectionConfig,omitempty"`
  5040. // LabelDetectionConfig: Config for LABEL_DETECTION.
  5041. LabelDetectionConfig *GoogleCloudVideointelligenceV1p3beta1LabelDetectionConfig `json:"labelDetectionConfig,omitempty"`
  5042. // Segments: Video segments to annotate. The segments may overlap and
  5043. // are not required
  5044. // to be contiguous or span the whole video. If unspecified, each video
  5045. // is
  5046. // treated as a single segment.
  5047. Segments []*GoogleCloudVideointelligenceV1p3beta1VideoSegment `json:"segments,omitempty"`
  5048. // ShotChangeDetectionConfig: Config for SHOT_CHANGE_DETECTION.
  5049. ShotChangeDetectionConfig *GoogleCloudVideointelligenceV1p3beta1ShotChangeDetectionConfig `json:"shotChangeDetectionConfig,omitempty"`
  5050. // SpeechTranscriptionConfig: Config for SPEECH_TRANSCRIPTION.
  5051. SpeechTranscriptionConfig *GoogleCloudVideointelligenceV1p3beta1SpeechTranscriptionConfig `json:"speechTranscriptionConfig,omitempty"`
  5052. // TextDetectionConfig: Config for TEXT_DETECTION.
  5053. TextDetectionConfig *GoogleCloudVideointelligenceV1p3beta1TextDetectionConfig `json:"textDetectionConfig,omitempty"`
  5054. // ForceSendFields is a list of field names (e.g.
  5055. // "ExplicitContentDetectionConfig") to unconditionally include in API
  5056. // requests. By default, fields with empty values are omitted from API
  5057. // requests. However, any non-pointer, non-interface field appearing in
  5058. // ForceSendFields will be sent to the server regardless of whether the
  5059. // field is empty or not. This may be used to include empty fields in
  5060. // Patch requests.
  5061. ForceSendFields []string `json:"-"`
  5062. // NullFields is a list of field names (e.g.
  5063. // "ExplicitContentDetectionConfig") to include in API requests with the
  5064. // JSON null value. By default, fields with empty values are omitted
  5065. // from API requests. However, any field with an empty value appearing
  5066. // in NullFields will be sent to the server as null. It is an error if a
  5067. // field in this list has a non-empty value. This may be used to include
  5068. // null fields in Patch requests.
  5069. NullFields []string `json:"-"`
  5070. }
  5071. func (s *GoogleCloudVideointelligenceV1p3beta1VideoContext) MarshalJSON() ([]byte, error) {
  5072. type NoMethod GoogleCloudVideointelligenceV1p3beta1VideoContext
  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. googlecloudvideointelligencev1p3beta1Annotatevideorequest *GoogleCloudVideointelligenceV1p3beta1AnnotateVideoRequest
  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(googlecloudvideointelligencev1p3beta1Annotatevideorequest *GoogleCloudVideointelligenceV1p3beta1AnnotateVideoRequest) *VideosAnnotateCall {
  5377. c := &VideosAnnotateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5378. c.googlecloudvideointelligencev1p3beta1Annotatevideorequest = googlecloudvideointelligencev1p3beta1Annotatevideorequest
  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.googlecloudvideointelligencev1p3beta1Annotatevideorequest)
  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, "v1p3beta1/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": "v1p3beta1/videos:annotate",
  5466. // "httpMethod": "POST",
  5467. // "id": "videointelligence.videos.annotate",
  5468. // "parameterOrder": [],
  5469. // "parameters": {},
  5470. // "path": "v1p3beta1/videos:annotate",
  5471. // "request": {
  5472. // "$ref": "GoogleCloudVideointelligenceV1p3beta1_AnnotateVideoRequest"
  5473. // },
  5474. // "response": {
  5475. // "$ref": "GoogleLongrunning_Operation"
  5476. // },
  5477. // "scopes": [
  5478. // "https://www.googleapis.com/auth/cloud-platform"
  5479. // ]
  5480. // }
  5481. }