Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 

6273 linhas
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/v1p1beta1"
  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/v1p1beta1"
  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:v1p1beta1"
  69. const apiName = "videointelligence"
  70. const apiVersion = "v1p1beta1"
  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. // GoogleCloudVideointelligenceV1p1beta1AnnotateVideoRequest: Video
  1978. // annotation request.
  1979. type GoogleCloudVideointelligenceV1p1beta1AnnotateVideoRequest struct {
  1980. // Features: Requested video annotation features.
  1981. //
  1982. // Possible values:
  1983. // "FEATURE_UNSPECIFIED" - Unspecified.
  1984. // "LABEL_DETECTION" - Label detection. Detect objects, such as dog or
  1985. // flower.
  1986. // "SHOT_CHANGE_DETECTION" - Shot change detection.
  1987. // "EXPLICIT_CONTENT_DETECTION" - Explicit content detection.
  1988. // "SPEECH_TRANSCRIPTION" - Speech transcription.
  1989. // "TEXT_DETECTION" - OCR text detection and tracking.
  1990. // "OBJECT_TRACKING" - Object detection and tracking.
  1991. Features []string `json:"features,omitempty"`
  1992. // InputContent: The video data bytes.
  1993. // If unset, the input video(s) should be specified via `input_uri`.
  1994. // If set, `input_uri` should be unset.
  1995. InputContent string `json:"inputContent,omitempty"`
  1996. // InputUri: Input video location. Currently, only
  1997. // [Google Cloud Storage](https://cloud.google.com/storage/) URIs
  1998. // are
  1999. // supported, which must be specified in the following
  2000. // format:
  2001. // `gs://bucket-id/object-id` (other URI formats
  2002. // return
  2003. // google.rpc.Code.INVALID_ARGUMENT). For more information, see
  2004. // [Request URIs](/storage/docs/reference-uris).
  2005. // A video URI may include wildcards in `object-id`, and thus
  2006. // identify
  2007. // multiple videos. Supported wildcards: '*' to match 0 or more
  2008. // characters;
  2009. // '?' to match 1 character. If unset, the input video should be
  2010. // embedded
  2011. // in the request as `input_content`. If set, `input_content` should be
  2012. // unset.
  2013. InputUri string `json:"inputUri,omitempty"`
  2014. // LocationId: Optional cloud region where annotation should take place.
  2015. // Supported cloud
  2016. // regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no
  2017. // region
  2018. // is specified, a region will be determined based on video file
  2019. // location.
  2020. LocationId string `json:"locationId,omitempty"`
  2021. // OutputUri: Optional location where the output (in JSON format) should
  2022. // be stored.
  2023. // Currently, only [Google Cloud
  2024. // Storage](https://cloud.google.com/storage/)
  2025. // URIs are supported, which must be specified in the following
  2026. // format:
  2027. // `gs://bucket-id/object-id` (other URI formats
  2028. // return
  2029. // google.rpc.Code.INVALID_ARGUMENT). For more information, see
  2030. // [Request URIs](/storage/docs/reference-uris).
  2031. OutputUri string `json:"outputUri,omitempty"`
  2032. // VideoContext: Additional video context and/or feature-specific
  2033. // parameters.
  2034. VideoContext *GoogleCloudVideointelligenceV1p1beta1VideoContext `json:"videoContext,omitempty"`
  2035. // ForceSendFields is a list of field names (e.g. "Features") to
  2036. // unconditionally include in API requests. By default, fields with
  2037. // empty values are omitted from API requests. However, any non-pointer,
  2038. // non-interface field appearing in ForceSendFields will be sent to the
  2039. // server regardless of whether the field is empty or not. This may be
  2040. // used to include empty fields in Patch requests.
  2041. ForceSendFields []string `json:"-"`
  2042. // NullFields is a list of field names (e.g. "Features") to include in
  2043. // API requests with the JSON null value. By default, fields with empty
  2044. // values are omitted from API requests. However, any field with an
  2045. // empty value appearing in NullFields will be sent to the server as
  2046. // null. It is an error if a field in this list has a non-empty value.
  2047. // This may be used to include null fields in Patch requests.
  2048. NullFields []string `json:"-"`
  2049. }
  2050. func (s *GoogleCloudVideointelligenceV1p1beta1AnnotateVideoRequest) MarshalJSON() ([]byte, error) {
  2051. type NoMethod GoogleCloudVideointelligenceV1p1beta1AnnotateVideoRequest
  2052. raw := NoMethod(*s)
  2053. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2054. }
  2055. // GoogleCloudVideointelligenceV1p1beta1AnnotateVideoResponse: Video
  2056. // annotation response. Included in the `response`
  2057. // field of the `Operation` returned by the `GetOperation`
  2058. // call of the `google::longrunning::Operations` service.
  2059. type GoogleCloudVideointelligenceV1p1beta1AnnotateVideoResponse struct {
  2060. // AnnotationResults: Annotation results for all videos specified in
  2061. // `AnnotateVideoRequest`.
  2062. AnnotationResults []*GoogleCloudVideointelligenceV1p1beta1VideoAnnotationResults `json:"annotationResults,omitempty"`
  2063. // ForceSendFields is a list of field names (e.g. "AnnotationResults")
  2064. // to unconditionally include in API requests. By default, fields with
  2065. // empty values are omitted from API requests. However, any non-pointer,
  2066. // non-interface field appearing in ForceSendFields will be sent to the
  2067. // server regardless of whether the field is empty or not. This may be
  2068. // used to include empty fields in Patch requests.
  2069. ForceSendFields []string `json:"-"`
  2070. // NullFields is a list of field names (e.g. "AnnotationResults") to
  2071. // include in API requests with the JSON null value. By default, fields
  2072. // with empty values are omitted from API requests. However, any field
  2073. // with an empty value appearing in NullFields will be sent to the
  2074. // server as null. It is an error if a field in this list has a
  2075. // non-empty value. This may be used to include null fields in Patch
  2076. // requests.
  2077. NullFields []string `json:"-"`
  2078. }
  2079. func (s *GoogleCloudVideointelligenceV1p1beta1AnnotateVideoResponse) MarshalJSON() ([]byte, error) {
  2080. type NoMethod GoogleCloudVideointelligenceV1p1beta1AnnotateVideoResponse
  2081. raw := NoMethod(*s)
  2082. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2083. }
  2084. // GoogleCloudVideointelligenceV1p1beta1Entity: Detected entity from
  2085. // video analysis.
  2086. type GoogleCloudVideointelligenceV1p1beta1Entity struct {
  2087. // Description: Textual description, e.g. `Fixed-gear bicycle`.
  2088. Description string `json:"description,omitempty"`
  2089. // EntityId: Opaque entity ID. Some IDs may be available in
  2090. // [Google Knowledge Graph
  2091. // Search
  2092. // API](https://developers.google.com/knowledge-graph/).
  2093. EntityId string `json:"entityId,omitempty"`
  2094. // LanguageCode: Language code for `description` in BCP-47 format.
  2095. LanguageCode string `json:"languageCode,omitempty"`
  2096. // ForceSendFields is a list of field names (e.g. "Description") to
  2097. // unconditionally include in API requests. By default, fields with
  2098. // empty values are omitted from API requests. However, any non-pointer,
  2099. // non-interface field appearing in ForceSendFields will be sent to the
  2100. // server regardless of whether the field is empty or not. This may be
  2101. // used to include empty fields in Patch requests.
  2102. ForceSendFields []string `json:"-"`
  2103. // NullFields is a list of field names (e.g. "Description") to include
  2104. // in API requests with the JSON null value. By default, fields with
  2105. // empty values are omitted from API requests. However, any field with
  2106. // an empty value appearing in NullFields will be sent to the server as
  2107. // null. It is an error if a field in this list has a non-empty value.
  2108. // This may be used to include null fields in Patch requests.
  2109. NullFields []string `json:"-"`
  2110. }
  2111. func (s *GoogleCloudVideointelligenceV1p1beta1Entity) MarshalJSON() ([]byte, error) {
  2112. type NoMethod GoogleCloudVideointelligenceV1p1beta1Entity
  2113. raw := NoMethod(*s)
  2114. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2115. }
  2116. // GoogleCloudVideointelligenceV1p1beta1ExplicitContentAnnotation:
  2117. // Explicit content annotation (based on per-frame visual signals
  2118. // only).
  2119. // If no explicit content has been detected in a frame, no annotations
  2120. // are
  2121. // present for that frame.
  2122. type GoogleCloudVideointelligenceV1p1beta1ExplicitContentAnnotation struct {
  2123. // Frames: All video frames where explicit content was detected.
  2124. Frames []*GoogleCloudVideointelligenceV1p1beta1ExplicitContentFrame `json:"frames,omitempty"`
  2125. // ForceSendFields is a list of field names (e.g. "Frames") to
  2126. // unconditionally include in API requests. By default, fields with
  2127. // empty values are omitted from API requests. However, any non-pointer,
  2128. // non-interface field appearing in ForceSendFields will be sent to the
  2129. // server regardless of whether the field is empty or not. This may be
  2130. // used to include empty fields in Patch requests.
  2131. ForceSendFields []string `json:"-"`
  2132. // NullFields is a list of field names (e.g. "Frames") to include in API
  2133. // requests with the JSON null value. By default, fields with empty
  2134. // values are omitted from API requests. However, any field with an
  2135. // empty value appearing in NullFields will be sent to the server as
  2136. // null. It is an error if a field in this list has a non-empty value.
  2137. // This may be used to include null fields in Patch requests.
  2138. NullFields []string `json:"-"`
  2139. }
  2140. func (s *GoogleCloudVideointelligenceV1p1beta1ExplicitContentAnnotation) MarshalJSON() ([]byte, error) {
  2141. type NoMethod GoogleCloudVideointelligenceV1p1beta1ExplicitContentAnnotation
  2142. raw := NoMethod(*s)
  2143. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2144. }
  2145. // GoogleCloudVideointelligenceV1p1beta1ExplicitContentDetectionConfig:
  2146. // Config for EXPLICIT_CONTENT_DETECTION.
  2147. type GoogleCloudVideointelligenceV1p1beta1ExplicitContentDetectionConfig struct {
  2148. // Model: Model to use for explicit content detection.
  2149. // Supported values: "builtin/stable" (the default if unset)
  2150. // and
  2151. // "builtin/latest".
  2152. Model string `json:"model,omitempty"`
  2153. // ForceSendFields is a list of field names (e.g. "Model") to
  2154. // unconditionally include in API requests. By default, fields with
  2155. // empty values are omitted from API requests. However, any non-pointer,
  2156. // non-interface field appearing in ForceSendFields will be sent to the
  2157. // server regardless of whether the field is empty or not. This may be
  2158. // used to include empty fields in Patch requests.
  2159. ForceSendFields []string `json:"-"`
  2160. // NullFields is a list of field names (e.g. "Model") to include in API
  2161. // requests with the JSON null value. By default, fields with empty
  2162. // values are omitted from API requests. However, any field with an
  2163. // empty value appearing in NullFields will be sent to the server as
  2164. // null. It is an error if a field in this list has a non-empty value.
  2165. // This may be used to include null fields in Patch requests.
  2166. NullFields []string `json:"-"`
  2167. }
  2168. func (s *GoogleCloudVideointelligenceV1p1beta1ExplicitContentDetectionConfig) MarshalJSON() ([]byte, error) {
  2169. type NoMethod GoogleCloudVideointelligenceV1p1beta1ExplicitContentDetectionConfig
  2170. raw := NoMethod(*s)
  2171. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2172. }
  2173. // GoogleCloudVideointelligenceV1p1beta1ExplicitContentFrame: Video
  2174. // frame level annotation results for explicit content.
  2175. type GoogleCloudVideointelligenceV1p1beta1ExplicitContentFrame struct {
  2176. // PornographyLikelihood: Likelihood of the pornography content..
  2177. //
  2178. // Possible values:
  2179. // "LIKELIHOOD_UNSPECIFIED" - Unspecified likelihood.
  2180. // "VERY_UNLIKELY" - Very unlikely.
  2181. // "UNLIKELY" - Unlikely.
  2182. // "POSSIBLE" - Possible.
  2183. // "LIKELY" - Likely.
  2184. // "VERY_LIKELY" - Very likely.
  2185. PornographyLikelihood string `json:"pornographyLikelihood,omitempty"`
  2186. // TimeOffset: Time-offset, relative to the beginning of the video,
  2187. // corresponding to the
  2188. // video frame for this location.
  2189. TimeOffset string `json:"timeOffset,omitempty"`
  2190. // ForceSendFields is a list of field names (e.g.
  2191. // "PornographyLikelihood") to unconditionally include in API requests.
  2192. // By default, fields with empty values are omitted from API requests.
  2193. // However, any non-pointer, non-interface field appearing in
  2194. // ForceSendFields will be sent to the server regardless of whether the
  2195. // field is empty or not. This may be used to include empty fields in
  2196. // Patch requests.
  2197. ForceSendFields []string `json:"-"`
  2198. // NullFields is a list of field names (e.g. "PornographyLikelihood") to
  2199. // include in API requests with the JSON null value. By default, fields
  2200. // with empty values are omitted from API requests. However, any field
  2201. // with an empty value appearing in NullFields will be sent to the
  2202. // server as null. It is an error if a field in this list has a
  2203. // non-empty value. This may be used to include null fields in Patch
  2204. // requests.
  2205. NullFields []string `json:"-"`
  2206. }
  2207. func (s *GoogleCloudVideointelligenceV1p1beta1ExplicitContentFrame) MarshalJSON() ([]byte, error) {
  2208. type NoMethod GoogleCloudVideointelligenceV1p1beta1ExplicitContentFrame
  2209. raw := NoMethod(*s)
  2210. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2211. }
  2212. // GoogleCloudVideointelligenceV1p1beta1LabelAnnotation: Label
  2213. // annotation.
  2214. type GoogleCloudVideointelligenceV1p1beta1LabelAnnotation struct {
  2215. // CategoryEntities: Common categories for the detected entity.
  2216. // E.g. when the label is `Terrier` the category is likely `dog`. And in
  2217. // some
  2218. // cases there might be more than one categories e.g. `Terrier` could
  2219. // also be
  2220. // a `pet`.
  2221. CategoryEntities []*GoogleCloudVideointelligenceV1p1beta1Entity `json:"categoryEntities,omitempty"`
  2222. // Entity: Detected entity.
  2223. Entity *GoogleCloudVideointelligenceV1p1beta1Entity `json:"entity,omitempty"`
  2224. // Frames: All video frames where a label was detected.
  2225. Frames []*GoogleCloudVideointelligenceV1p1beta1LabelFrame `json:"frames,omitempty"`
  2226. // Segments: All video segments where a label was detected.
  2227. Segments []*GoogleCloudVideointelligenceV1p1beta1LabelSegment `json:"segments,omitempty"`
  2228. // ForceSendFields is a list of field names (e.g. "CategoryEntities") to
  2229. // unconditionally include in API requests. By default, fields with
  2230. // empty values are omitted from API requests. However, any non-pointer,
  2231. // non-interface field appearing in ForceSendFields will be sent to the
  2232. // server regardless of whether the field is empty or not. This may be
  2233. // used to include empty fields in Patch requests.
  2234. ForceSendFields []string `json:"-"`
  2235. // NullFields is a list of field names (e.g. "CategoryEntities") to
  2236. // include in API requests with the JSON null value. By default, fields
  2237. // with empty values are omitted from API requests. However, any field
  2238. // with an empty value appearing in NullFields will be sent to the
  2239. // server as null. It is an error if a field in this list has a
  2240. // non-empty value. This may be used to include null fields in Patch
  2241. // requests.
  2242. NullFields []string `json:"-"`
  2243. }
  2244. func (s *GoogleCloudVideointelligenceV1p1beta1LabelAnnotation) MarshalJSON() ([]byte, error) {
  2245. type NoMethod GoogleCloudVideointelligenceV1p1beta1LabelAnnotation
  2246. raw := NoMethod(*s)
  2247. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2248. }
  2249. // GoogleCloudVideointelligenceV1p1beta1LabelDetectionConfig: Config for
  2250. // LABEL_DETECTION.
  2251. type GoogleCloudVideointelligenceV1p1beta1LabelDetectionConfig struct {
  2252. // FrameConfidenceThreshold: The confidence threshold we perform
  2253. // filtering on the labels from
  2254. // frame-level detection. If not set, it is set to 0.4 by default. The
  2255. // valid
  2256. // range for this threshold is [0.1, 0.9]. Any value set outside of
  2257. // this
  2258. // range will be clipped.
  2259. // Note: for best results please follow the default threshold. We will
  2260. // update
  2261. // the default threshold everytime when we release a new model.
  2262. FrameConfidenceThreshold float64 `json:"frameConfidenceThreshold,omitempty"`
  2263. // LabelDetectionMode: What labels should be detected with
  2264. // LABEL_DETECTION, in addition to
  2265. // video-level labels or segment-level labels.
  2266. // If unspecified, defaults to `SHOT_MODE`.
  2267. //
  2268. // Possible values:
  2269. // "LABEL_DETECTION_MODE_UNSPECIFIED" - Unspecified.
  2270. // "SHOT_MODE" - Detect shot-level labels.
  2271. // "FRAME_MODE" - Detect frame-level labels.
  2272. // "SHOT_AND_FRAME_MODE" - Detect both shot-level and frame-level
  2273. // labels.
  2274. LabelDetectionMode string `json:"labelDetectionMode,omitempty"`
  2275. // Model: Model to use for label detection.
  2276. // Supported values: "builtin/stable" (the default if unset)
  2277. // and
  2278. // "builtin/latest".
  2279. Model string `json:"model,omitempty"`
  2280. // StationaryCamera: Whether the video has been shot from a stationary
  2281. // (i.e. non-moving) camera.
  2282. // When set to true, might improve detection accuracy for moving
  2283. // objects.
  2284. // Should be used with `SHOT_AND_FRAME_MODE` enabled.
  2285. StationaryCamera bool `json:"stationaryCamera,omitempty"`
  2286. // VideoConfidenceThreshold: The confidence threshold we perform
  2287. // filtering on the labels from
  2288. // video-level and shot-level detections. If not set, it is set to 0.3
  2289. // by
  2290. // default. The valid range for this threshold is [0.1, 0.9]. Any value
  2291. // set
  2292. // outside of this range will be clipped.
  2293. // Note: for best results please follow the default threshold. We will
  2294. // update
  2295. // the default threshold everytime when we release a new model.
  2296. VideoConfidenceThreshold float64 `json:"videoConfidenceThreshold,omitempty"`
  2297. // ForceSendFields is a list of field names (e.g.
  2298. // "FrameConfidenceThreshold") to unconditionally include in API
  2299. // requests. By default, fields with empty values are omitted from API
  2300. // requests. However, any non-pointer, non-interface field appearing in
  2301. // ForceSendFields will be sent to the server regardless of whether the
  2302. // field is empty or not. This may be used to include empty fields in
  2303. // Patch requests.
  2304. ForceSendFields []string `json:"-"`
  2305. // NullFields is a list of field names (e.g. "FrameConfidenceThreshold")
  2306. // to include in API requests with the JSON null value. By default,
  2307. // fields with empty values are omitted from API requests. However, any
  2308. // field with an empty value appearing in NullFields will be sent to the
  2309. // server as null. It is an error if a field in this list has a
  2310. // non-empty value. This may be used to include null fields in Patch
  2311. // requests.
  2312. NullFields []string `json:"-"`
  2313. }
  2314. func (s *GoogleCloudVideointelligenceV1p1beta1LabelDetectionConfig) MarshalJSON() ([]byte, error) {
  2315. type NoMethod GoogleCloudVideointelligenceV1p1beta1LabelDetectionConfig
  2316. raw := NoMethod(*s)
  2317. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2318. }
  2319. func (s *GoogleCloudVideointelligenceV1p1beta1LabelDetectionConfig) UnmarshalJSON(data []byte) error {
  2320. type NoMethod GoogleCloudVideointelligenceV1p1beta1LabelDetectionConfig
  2321. var s1 struct {
  2322. FrameConfidenceThreshold gensupport.JSONFloat64 `json:"frameConfidenceThreshold"`
  2323. VideoConfidenceThreshold gensupport.JSONFloat64 `json:"videoConfidenceThreshold"`
  2324. *NoMethod
  2325. }
  2326. s1.NoMethod = (*NoMethod)(s)
  2327. if err := json.Unmarshal(data, &s1); err != nil {
  2328. return err
  2329. }
  2330. s.FrameConfidenceThreshold = float64(s1.FrameConfidenceThreshold)
  2331. s.VideoConfidenceThreshold = float64(s1.VideoConfidenceThreshold)
  2332. return nil
  2333. }
  2334. // GoogleCloudVideointelligenceV1p1beta1LabelFrame: Video frame level
  2335. // annotation results for label detection.
  2336. type GoogleCloudVideointelligenceV1p1beta1LabelFrame struct {
  2337. // Confidence: Confidence that the label is accurate. Range: [0, 1].
  2338. Confidence float64 `json:"confidence,omitempty"`
  2339. // TimeOffset: Time-offset, relative to the beginning of the video,
  2340. // corresponding to the
  2341. // video frame for this location.
  2342. TimeOffset string `json:"timeOffset,omitempty"`
  2343. // ForceSendFields is a list of field names (e.g. "Confidence") to
  2344. // unconditionally include in API requests. By default, fields with
  2345. // empty values are omitted from API requests. However, any non-pointer,
  2346. // non-interface field appearing in ForceSendFields will be sent to the
  2347. // server regardless of whether the field is empty or not. This may be
  2348. // used to include empty fields in Patch requests.
  2349. ForceSendFields []string `json:"-"`
  2350. // NullFields is a list of field names (e.g. "Confidence") to include in
  2351. // API requests with the JSON null value. By default, fields with empty
  2352. // values are omitted from API requests. However, any field with an
  2353. // empty value appearing in NullFields will be sent to the server as
  2354. // null. It is an error if a field in this list has a non-empty value.
  2355. // This may be used to include null fields in Patch requests.
  2356. NullFields []string `json:"-"`
  2357. }
  2358. func (s *GoogleCloudVideointelligenceV1p1beta1LabelFrame) MarshalJSON() ([]byte, error) {
  2359. type NoMethod GoogleCloudVideointelligenceV1p1beta1LabelFrame
  2360. raw := NoMethod(*s)
  2361. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2362. }
  2363. func (s *GoogleCloudVideointelligenceV1p1beta1LabelFrame) UnmarshalJSON(data []byte) error {
  2364. type NoMethod GoogleCloudVideointelligenceV1p1beta1LabelFrame
  2365. var s1 struct {
  2366. Confidence gensupport.JSONFloat64 `json:"confidence"`
  2367. *NoMethod
  2368. }
  2369. s1.NoMethod = (*NoMethod)(s)
  2370. if err := json.Unmarshal(data, &s1); err != nil {
  2371. return err
  2372. }
  2373. s.Confidence = float64(s1.Confidence)
  2374. return nil
  2375. }
  2376. // GoogleCloudVideointelligenceV1p1beta1LabelSegment: Video segment
  2377. // level annotation results for label detection.
  2378. type GoogleCloudVideointelligenceV1p1beta1LabelSegment struct {
  2379. // Confidence: Confidence that the label is accurate. Range: [0, 1].
  2380. Confidence float64 `json:"confidence,omitempty"`
  2381. // Segment: Video segment where a label was detected.
  2382. Segment *GoogleCloudVideointelligenceV1p1beta1VideoSegment `json:"segment,omitempty"`
  2383. // ForceSendFields is a list of field names (e.g. "Confidence") to
  2384. // unconditionally include in API requests. By default, fields with
  2385. // empty values are omitted from API requests. However, any non-pointer,
  2386. // non-interface field appearing in ForceSendFields will be sent to the
  2387. // server regardless of whether the field is empty or not. This may be
  2388. // used to include empty fields in Patch requests.
  2389. ForceSendFields []string `json:"-"`
  2390. // NullFields is a list of field names (e.g. "Confidence") to include in
  2391. // API requests with the JSON null value. By default, fields with empty
  2392. // values are omitted from API requests. However, any field with an
  2393. // empty value appearing in NullFields will be sent to the server as
  2394. // null. It is an error if a field in this list has a non-empty value.
  2395. // This may be used to include null fields in Patch requests.
  2396. NullFields []string `json:"-"`
  2397. }
  2398. func (s *GoogleCloudVideointelligenceV1p1beta1LabelSegment) MarshalJSON() ([]byte, error) {
  2399. type NoMethod GoogleCloudVideointelligenceV1p1beta1LabelSegment
  2400. raw := NoMethod(*s)
  2401. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2402. }
  2403. func (s *GoogleCloudVideointelligenceV1p1beta1LabelSegment) UnmarshalJSON(data []byte) error {
  2404. type NoMethod GoogleCloudVideointelligenceV1p1beta1LabelSegment
  2405. var s1 struct {
  2406. Confidence gensupport.JSONFloat64 `json:"confidence"`
  2407. *NoMethod
  2408. }
  2409. s1.NoMethod = (*NoMethod)(s)
  2410. if err := json.Unmarshal(data, &s1); err != nil {
  2411. return err
  2412. }
  2413. s.Confidence = float64(s1.Confidence)
  2414. return nil
  2415. }
  2416. // GoogleCloudVideointelligenceV1p1beta1NormalizedBoundingBox:
  2417. // Normalized bounding box.
  2418. // The normalized vertex coordinates are relative to the original
  2419. // image.
  2420. // Range: [0, 1].
  2421. type GoogleCloudVideointelligenceV1p1beta1NormalizedBoundingBox struct {
  2422. // Bottom: Bottom Y coordinate.
  2423. Bottom float64 `json:"bottom,omitempty"`
  2424. // Left: Left X coordinate.
  2425. Left float64 `json:"left,omitempty"`
  2426. // Right: Right X coordinate.
  2427. Right float64 `json:"right,omitempty"`
  2428. // Top: Top Y coordinate.
  2429. Top float64 `json:"top,omitempty"`
  2430. // ForceSendFields is a list of field names (e.g. "Bottom") to
  2431. // unconditionally include in API requests. By default, fields with
  2432. // empty values are omitted from API requests. However, any non-pointer,
  2433. // non-interface field appearing in ForceSendFields will be sent to the
  2434. // server regardless of whether the field is empty or not. This may be
  2435. // used to include empty fields in Patch requests.
  2436. ForceSendFields []string `json:"-"`
  2437. // NullFields is a list of field names (e.g. "Bottom") to include in API
  2438. // requests with the JSON null value. By default, fields with empty
  2439. // values are omitted from API requests. However, any field with an
  2440. // empty value appearing in NullFields will be sent to the server as
  2441. // null. It is an error if a field in this list has a non-empty value.
  2442. // This may be used to include null fields in Patch requests.
  2443. NullFields []string `json:"-"`
  2444. }
  2445. func (s *GoogleCloudVideointelligenceV1p1beta1NormalizedBoundingBox) MarshalJSON() ([]byte, error) {
  2446. type NoMethod GoogleCloudVideointelligenceV1p1beta1NormalizedBoundingBox
  2447. raw := NoMethod(*s)
  2448. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2449. }
  2450. func (s *GoogleCloudVideointelligenceV1p1beta1NormalizedBoundingBox) UnmarshalJSON(data []byte) error {
  2451. type NoMethod GoogleCloudVideointelligenceV1p1beta1NormalizedBoundingBox
  2452. var s1 struct {
  2453. Bottom gensupport.JSONFloat64 `json:"bottom"`
  2454. Left gensupport.JSONFloat64 `json:"left"`
  2455. Right gensupport.JSONFloat64 `json:"right"`
  2456. Top gensupport.JSONFloat64 `json:"top"`
  2457. *NoMethod
  2458. }
  2459. s1.NoMethod = (*NoMethod)(s)
  2460. if err := json.Unmarshal(data, &s1); err != nil {
  2461. return err
  2462. }
  2463. s.Bottom = float64(s1.Bottom)
  2464. s.Left = float64(s1.Left)
  2465. s.Right = float64(s1.Right)
  2466. s.Top = float64(s1.Top)
  2467. return nil
  2468. }
  2469. // GoogleCloudVideointelligenceV1p1beta1NormalizedBoundingPoly:
  2470. // Normalized bounding polygon for text (that might not be aligned with
  2471. // axis).
  2472. // Contains list of the corner points in clockwise order starting
  2473. // from
  2474. // top-left corner. For example, for a rectangular bounding box:
  2475. // When the text is horizontal it might look like:
  2476. // 0----1
  2477. // | |
  2478. // 3----2
  2479. //
  2480. // When it's clockwise rotated 180 degrees around the top-left corner
  2481. // it
  2482. // becomes:
  2483. // 2----3
  2484. // | |
  2485. // 1----0
  2486. //
  2487. // and the vertex order will still be (0, 1, 2, 3). Note that values can
  2488. // be less
  2489. // than 0, or greater than 1 due to trignometric calculations for
  2490. // location of
  2491. // the box.
  2492. type GoogleCloudVideointelligenceV1p1beta1NormalizedBoundingPoly struct {
  2493. // Vertices: Normalized vertices of the bounding polygon.
  2494. Vertices []*GoogleCloudVideointelligenceV1p1beta1NormalizedVertex `json:"vertices,omitempty"`
  2495. // ForceSendFields is a list of field names (e.g. "Vertices") to
  2496. // unconditionally include in API requests. By default, fields with
  2497. // empty values are omitted from API requests. However, any non-pointer,
  2498. // non-interface field appearing in ForceSendFields will be sent to the
  2499. // server regardless of whether the field is empty or not. This may be
  2500. // used to include empty fields in Patch requests.
  2501. ForceSendFields []string `json:"-"`
  2502. // NullFields is a list of field names (e.g. "Vertices") to include in
  2503. // API requests with the JSON null value. By default, fields with empty
  2504. // values are omitted from API requests. However, any field with an
  2505. // empty value appearing in NullFields will be sent to the server as
  2506. // null. It is an error if a field in this list has a non-empty value.
  2507. // This may be used to include null fields in Patch requests.
  2508. NullFields []string `json:"-"`
  2509. }
  2510. func (s *GoogleCloudVideointelligenceV1p1beta1NormalizedBoundingPoly) MarshalJSON() ([]byte, error) {
  2511. type NoMethod GoogleCloudVideointelligenceV1p1beta1NormalizedBoundingPoly
  2512. raw := NoMethod(*s)
  2513. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2514. }
  2515. // GoogleCloudVideointelligenceV1p1beta1NormalizedVertex: A vertex
  2516. // represents a 2D point in the image.
  2517. // NOTE: the normalized vertex coordinates are relative to the original
  2518. // image
  2519. // and range from 0 to 1.
  2520. type GoogleCloudVideointelligenceV1p1beta1NormalizedVertex struct {
  2521. // X: X coordinate.
  2522. X float64 `json:"x,omitempty"`
  2523. // Y: Y coordinate.
  2524. Y float64 `json:"y,omitempty"`
  2525. // ForceSendFields is a list of field names (e.g. "X") to
  2526. // unconditionally include in API requests. By default, fields with
  2527. // empty values are omitted from API requests. However, any non-pointer,
  2528. // non-interface field appearing in ForceSendFields will be sent to the
  2529. // server regardless of whether the field is empty or not. This may be
  2530. // used to include empty fields in Patch requests.
  2531. ForceSendFields []string `json:"-"`
  2532. // NullFields is a list of field names (e.g. "X") to include in API
  2533. // requests with the JSON null value. By default, fields with empty
  2534. // values are omitted from API requests. However, any field with an
  2535. // empty value appearing in NullFields will be sent to the server as
  2536. // null. It is an error if a field in this list has a non-empty value.
  2537. // This may be used to include null fields in Patch requests.
  2538. NullFields []string `json:"-"`
  2539. }
  2540. func (s *GoogleCloudVideointelligenceV1p1beta1NormalizedVertex) MarshalJSON() ([]byte, error) {
  2541. type NoMethod GoogleCloudVideointelligenceV1p1beta1NormalizedVertex
  2542. raw := NoMethod(*s)
  2543. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2544. }
  2545. func (s *GoogleCloudVideointelligenceV1p1beta1NormalizedVertex) UnmarshalJSON(data []byte) error {
  2546. type NoMethod GoogleCloudVideointelligenceV1p1beta1NormalizedVertex
  2547. var s1 struct {
  2548. X gensupport.JSONFloat64 `json:"x"`
  2549. Y gensupport.JSONFloat64 `json:"y"`
  2550. *NoMethod
  2551. }
  2552. s1.NoMethod = (*NoMethod)(s)
  2553. if err := json.Unmarshal(data, &s1); err != nil {
  2554. return err
  2555. }
  2556. s.X = float64(s1.X)
  2557. s.Y = float64(s1.Y)
  2558. return nil
  2559. }
  2560. // GoogleCloudVideointelligenceV1p1beta1ObjectTrackingAnnotation:
  2561. // Annotations corresponding to one tracked object.
  2562. type GoogleCloudVideointelligenceV1p1beta1ObjectTrackingAnnotation struct {
  2563. // Confidence: Object category's labeling confidence of this track.
  2564. Confidence float64 `json:"confidence,omitempty"`
  2565. // Entity: Entity to specify the object category that this track is
  2566. // labeled as.
  2567. Entity *GoogleCloudVideointelligenceV1p1beta1Entity `json:"entity,omitempty"`
  2568. // Frames: Information corresponding to all frames where this object
  2569. // track appears.
  2570. // Non-streaming batch mode: it may be one or multiple
  2571. // ObjectTrackingFrame
  2572. // messages in frames.
  2573. // Streaming mode: it can only be one ObjectTrackingFrame message in
  2574. // frames.
  2575. Frames []*GoogleCloudVideointelligenceV1p1beta1ObjectTrackingFrame `json:"frames,omitempty"`
  2576. // Segment: Non-streaming batch mode ONLY.
  2577. // Each object track corresponds to one video segment where it appears.
  2578. Segment *GoogleCloudVideointelligenceV1p1beta1VideoSegment `json:"segment,omitempty"`
  2579. // TrackId: Streaming mode ONLY.
  2580. // In streaming mode, we do not know the end time of a tracked
  2581. // object
  2582. // before it is completed. Hence, there is no VideoSegment info
  2583. // returned.
  2584. // Instead, we provide a unique identifiable integer track_id so
  2585. // that
  2586. // the customers can correlate the results of the
  2587. // ongoing
  2588. // ObjectTrackAnnotation of the same track_id over time.
  2589. TrackId int64 `json:"trackId,omitempty,string"`
  2590. // ForceSendFields is a list of field names (e.g. "Confidence") to
  2591. // unconditionally include in API requests. By default, fields with
  2592. // empty values are omitted from API requests. However, any non-pointer,
  2593. // non-interface field appearing in ForceSendFields will be sent to the
  2594. // server regardless of whether the field is empty or not. This may be
  2595. // used to include empty fields in Patch requests.
  2596. ForceSendFields []string `json:"-"`
  2597. // NullFields is a list of field names (e.g. "Confidence") to include in
  2598. // API requests with the JSON null value. By default, fields with empty
  2599. // values are omitted from API requests. However, any field with an
  2600. // empty value appearing in NullFields will be sent to the server as
  2601. // null. It is an error if a field in this list has a non-empty value.
  2602. // This may be used to include null fields in Patch requests.
  2603. NullFields []string `json:"-"`
  2604. }
  2605. func (s *GoogleCloudVideointelligenceV1p1beta1ObjectTrackingAnnotation) MarshalJSON() ([]byte, error) {
  2606. type NoMethod GoogleCloudVideointelligenceV1p1beta1ObjectTrackingAnnotation
  2607. raw := NoMethod(*s)
  2608. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2609. }
  2610. func (s *GoogleCloudVideointelligenceV1p1beta1ObjectTrackingAnnotation) UnmarshalJSON(data []byte) error {
  2611. type NoMethod GoogleCloudVideointelligenceV1p1beta1ObjectTrackingAnnotation
  2612. var s1 struct {
  2613. Confidence gensupport.JSONFloat64 `json:"confidence"`
  2614. *NoMethod
  2615. }
  2616. s1.NoMethod = (*NoMethod)(s)
  2617. if err := json.Unmarshal(data, &s1); err != nil {
  2618. return err
  2619. }
  2620. s.Confidence = float64(s1.Confidence)
  2621. return nil
  2622. }
  2623. // GoogleCloudVideointelligenceV1p1beta1ObjectTrackingFrame: Video frame
  2624. // level annotations for object detection and tracking. This
  2625. // field
  2626. // stores per frame location, time offset, and confidence.
  2627. type GoogleCloudVideointelligenceV1p1beta1ObjectTrackingFrame struct {
  2628. // NormalizedBoundingBox: The normalized bounding box location of this
  2629. // object track for the frame.
  2630. NormalizedBoundingBox *GoogleCloudVideointelligenceV1p1beta1NormalizedBoundingBox `json:"normalizedBoundingBox,omitempty"`
  2631. // TimeOffset: The timestamp of the frame in microseconds.
  2632. TimeOffset string `json:"timeOffset,omitempty"`
  2633. // ForceSendFields is a list of field names (e.g.
  2634. // "NormalizedBoundingBox") to unconditionally include in API requests.
  2635. // By default, fields with empty values are omitted from API requests.
  2636. // However, any non-pointer, non-interface field appearing in
  2637. // ForceSendFields will be sent to the server regardless of whether the
  2638. // field is empty or not. This may be used to include empty fields in
  2639. // Patch requests.
  2640. ForceSendFields []string `json:"-"`
  2641. // NullFields is a list of field names (e.g. "NormalizedBoundingBox") to
  2642. // include in API requests with the JSON null value. By default, fields
  2643. // with empty values are omitted from API requests. However, any field
  2644. // with an empty value appearing in NullFields will be sent to the
  2645. // server as null. It is an error if a field in this list has a
  2646. // non-empty value. This may be used to include null fields in Patch
  2647. // requests.
  2648. NullFields []string `json:"-"`
  2649. }
  2650. func (s *GoogleCloudVideointelligenceV1p1beta1ObjectTrackingFrame) MarshalJSON() ([]byte, error) {
  2651. type NoMethod GoogleCloudVideointelligenceV1p1beta1ObjectTrackingFrame
  2652. raw := NoMethod(*s)
  2653. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2654. }
  2655. // GoogleCloudVideointelligenceV1p1beta1ShotChangeDetectionConfig:
  2656. // Config for SHOT_CHANGE_DETECTION.
  2657. type GoogleCloudVideointelligenceV1p1beta1ShotChangeDetectionConfig struct {
  2658. // Model: Model to use for shot change detection.
  2659. // Supported values: "builtin/stable" (the default if unset)
  2660. // and
  2661. // "builtin/latest".
  2662. Model string `json:"model,omitempty"`
  2663. // ForceSendFields is a list of field names (e.g. "Model") to
  2664. // unconditionally include in API requests. By default, fields with
  2665. // empty values are omitted from API requests. However, any non-pointer,
  2666. // non-interface field appearing in ForceSendFields will be sent to the
  2667. // server regardless of whether the field is empty or not. This may be
  2668. // used to include empty fields in Patch requests.
  2669. ForceSendFields []string `json:"-"`
  2670. // NullFields is a list of field names (e.g. "Model") to include in API
  2671. // requests with the JSON null value. By default, fields with empty
  2672. // values are omitted from API requests. However, any field with an
  2673. // empty value appearing in NullFields will be sent to the server as
  2674. // null. It is an error if a field in this list has a non-empty value.
  2675. // This may be used to include null fields in Patch requests.
  2676. NullFields []string `json:"-"`
  2677. }
  2678. func (s *GoogleCloudVideointelligenceV1p1beta1ShotChangeDetectionConfig) MarshalJSON() ([]byte, error) {
  2679. type NoMethod GoogleCloudVideointelligenceV1p1beta1ShotChangeDetectionConfig
  2680. raw := NoMethod(*s)
  2681. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2682. }
  2683. // GoogleCloudVideointelligenceV1p1beta1SpeechContext: Provides "hints"
  2684. // to the speech recognizer to favor specific words and phrases
  2685. // in the results.
  2686. type GoogleCloudVideointelligenceV1p1beta1SpeechContext struct {
  2687. // Phrases: *Optional* A list of strings containing words and phrases
  2688. // "hints" so that
  2689. // the speech recognition is more likely to recognize them. This can be
  2690. // used
  2691. // to improve the accuracy for specific words and phrases, for example,
  2692. // if
  2693. // specific commands are typically spoken by the user. This can also be
  2694. // used
  2695. // to add additional words to the vocabulary of the recognizer.
  2696. // See
  2697. // [usage limits](https://cloud.google.com/speech/limits#content).
  2698. Phrases []string `json:"phrases,omitempty"`
  2699. // ForceSendFields is a list of field names (e.g. "Phrases") to
  2700. // unconditionally include in API requests. By default, fields with
  2701. // empty values are omitted from API requests. However, any non-pointer,
  2702. // non-interface field appearing in ForceSendFields will be sent to the
  2703. // server regardless of whether the field is empty or not. This may be
  2704. // used to include empty fields in Patch requests.
  2705. ForceSendFields []string `json:"-"`
  2706. // NullFields is a list of field names (e.g. "Phrases") to include in
  2707. // API requests with the JSON null value. By default, fields with empty
  2708. // values are omitted from API requests. However, any field with an
  2709. // empty value appearing in NullFields will be sent to the server as
  2710. // null. It is an error if a field in this list has a non-empty value.
  2711. // This may be used to include null fields in Patch requests.
  2712. NullFields []string `json:"-"`
  2713. }
  2714. func (s *GoogleCloudVideointelligenceV1p1beta1SpeechContext) MarshalJSON() ([]byte, error) {
  2715. type NoMethod GoogleCloudVideointelligenceV1p1beta1SpeechContext
  2716. raw := NoMethod(*s)
  2717. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2718. }
  2719. // GoogleCloudVideointelligenceV1p1beta1SpeechRecognitionAlternative:
  2720. // Alternative hypotheses (a.k.a. n-best list).
  2721. type GoogleCloudVideointelligenceV1p1beta1SpeechRecognitionAlternative struct {
  2722. // Confidence: The confidence estimate between 0.0 and 1.0. A higher
  2723. // number
  2724. // indicates an estimated greater likelihood that the recognized words
  2725. // are
  2726. // correct. This field is typically provided only for the top
  2727. // hypothesis, and
  2728. // only for `is_final=true` results. Clients should not rely on
  2729. // the
  2730. // `confidence` field as it is not guaranteed to be accurate or
  2731. // consistent.
  2732. // The default of 0.0 is a sentinel value indicating `confidence` was
  2733. // not set.
  2734. Confidence float64 `json:"confidence,omitempty"`
  2735. // Transcript: Transcript text representing the words that the user
  2736. // spoke.
  2737. Transcript string `json:"transcript,omitempty"`
  2738. // Words: A list of word-specific information for each recognized word.
  2739. Words []*GoogleCloudVideointelligenceV1p1beta1WordInfo `json:"words,omitempty"`
  2740. // ForceSendFields is a list of field names (e.g. "Confidence") to
  2741. // unconditionally include in API requests. By default, fields with
  2742. // empty values are omitted from API requests. However, any non-pointer,
  2743. // non-interface field appearing in ForceSendFields will be sent to the
  2744. // server regardless of whether the field is empty or not. This may be
  2745. // used to include empty fields in Patch requests.
  2746. ForceSendFields []string `json:"-"`
  2747. // NullFields is a list of field names (e.g. "Confidence") to include in
  2748. // API requests with the JSON null value. By default, fields with empty
  2749. // values are omitted from API requests. However, any field with an
  2750. // empty value appearing in NullFields will be sent to the server as
  2751. // null. It is an error if a field in this list has a non-empty value.
  2752. // This may be used to include null fields in Patch requests.
  2753. NullFields []string `json:"-"`
  2754. }
  2755. func (s *GoogleCloudVideointelligenceV1p1beta1SpeechRecognitionAlternative) MarshalJSON() ([]byte, error) {
  2756. type NoMethod GoogleCloudVideointelligenceV1p1beta1SpeechRecognitionAlternative
  2757. raw := NoMethod(*s)
  2758. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2759. }
  2760. func (s *GoogleCloudVideointelligenceV1p1beta1SpeechRecognitionAlternative) UnmarshalJSON(data []byte) error {
  2761. type NoMethod GoogleCloudVideointelligenceV1p1beta1SpeechRecognitionAlternative
  2762. var s1 struct {
  2763. Confidence gensupport.JSONFloat64 `json:"confidence"`
  2764. *NoMethod
  2765. }
  2766. s1.NoMethod = (*NoMethod)(s)
  2767. if err := json.Unmarshal(data, &s1); err != nil {
  2768. return err
  2769. }
  2770. s.Confidence = float64(s1.Confidence)
  2771. return nil
  2772. }
  2773. // GoogleCloudVideointelligenceV1p1beta1SpeechTranscription: A speech
  2774. // recognition result corresponding to a portion of the audio.
  2775. type GoogleCloudVideointelligenceV1p1beta1SpeechTranscription struct {
  2776. // Alternatives: May contain one or more recognition hypotheses (up to
  2777. // the maximum specified
  2778. // in `max_alternatives`). These alternatives are ordered in terms
  2779. // of
  2780. // accuracy, with the top (first) alternative being the most probable,
  2781. // as
  2782. // ranked by the recognizer.
  2783. Alternatives []*GoogleCloudVideointelligenceV1p1beta1SpeechRecognitionAlternative `json:"alternatives,omitempty"`
  2784. // LanguageCode: Output only.
  2785. // The
  2786. // [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag
  2787. // of the
  2788. // language in this result. This language code was detected to have the
  2789. // most
  2790. // likelihood of being spoken in the audio.
  2791. LanguageCode string `json:"languageCode,omitempty"`
  2792. // ForceSendFields is a list of field names (e.g. "Alternatives") to
  2793. // unconditionally include in API requests. By default, fields with
  2794. // empty values are omitted from API requests. However, any non-pointer,
  2795. // non-interface field appearing in ForceSendFields will be sent to the
  2796. // server regardless of whether the field is empty or not. This may be
  2797. // used to include empty fields in Patch requests.
  2798. ForceSendFields []string `json:"-"`
  2799. // NullFields is a list of field names (e.g. "Alternatives") to include
  2800. // in API requests with the JSON null value. By default, fields with
  2801. // empty values are omitted from API requests. However, any field with
  2802. // an empty value appearing in NullFields will be sent to the server as
  2803. // null. It is an error if a field in this list has a non-empty value.
  2804. // This may be used to include null fields in Patch requests.
  2805. NullFields []string `json:"-"`
  2806. }
  2807. func (s *GoogleCloudVideointelligenceV1p1beta1SpeechTranscription) MarshalJSON() ([]byte, error) {
  2808. type NoMethod GoogleCloudVideointelligenceV1p1beta1SpeechTranscription
  2809. raw := NoMethod(*s)
  2810. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2811. }
  2812. // GoogleCloudVideointelligenceV1p1beta1SpeechTranscriptionConfig:
  2813. // Config for SPEECH_TRANSCRIPTION.
  2814. type GoogleCloudVideointelligenceV1p1beta1SpeechTranscriptionConfig struct {
  2815. // AudioTracks: *Optional* For file formats, such as MXF or MKV,
  2816. // supporting multiple audio
  2817. // tracks, specify up to two tracks. Default: track 0.
  2818. AudioTracks []int64 `json:"audioTracks,omitempty"`
  2819. // DiarizationSpeakerCount: *Optional*
  2820. // If set, specifies the estimated number of speakers in the
  2821. // conversation.
  2822. // If not set, defaults to '2'.
  2823. // Ignored unless enable_speaker_diarization is set to true.
  2824. DiarizationSpeakerCount int64 `json:"diarizationSpeakerCount,omitempty"`
  2825. // EnableAutomaticPunctuation: *Optional* If 'true', adds punctuation to
  2826. // recognition result hypotheses.
  2827. // This feature is only available in select languages. Setting this
  2828. // for
  2829. // requests in other languages has no effect at all. The default 'false'
  2830. // value
  2831. // does not add punctuation to result hypotheses. NOTE: "This is
  2832. // currently
  2833. // offered as an experimental service, complimentary to all users. In
  2834. // the
  2835. // future this may be exclusively available as a premium feature."
  2836. EnableAutomaticPunctuation bool `json:"enableAutomaticPunctuation,omitempty"`
  2837. // EnableSpeakerDiarization: *Optional* If 'true', enables speaker
  2838. // detection for each recognized word in
  2839. // the top alternative of the recognition result using a speaker_tag
  2840. // provided
  2841. // in the WordInfo.
  2842. // Note: When this is true, we send all the words from the beginning of
  2843. // the
  2844. // audio for the top alternative in every consecutive responses.
  2845. // This is done in order to improve our speaker tags as our models learn
  2846. // to
  2847. // identify the speakers in the conversation over time.
  2848. EnableSpeakerDiarization bool `json:"enableSpeakerDiarization,omitempty"`
  2849. // EnableWordConfidence: *Optional* If `true`, the top result includes a
  2850. // list of words and the
  2851. // confidence for those words. If `false`, no word-level
  2852. // confidence
  2853. // information is returned. The default is `false`.
  2854. EnableWordConfidence bool `json:"enableWordConfidence,omitempty"`
  2855. // FilterProfanity: *Optional* If set to `true`, the server will attempt
  2856. // to filter out
  2857. // profanities, replacing all but the initial character in each filtered
  2858. // word
  2859. // with asterisks, e.g. "f***". If set to `false` or omitted,
  2860. // profanities
  2861. // won't be filtered out.
  2862. FilterProfanity bool `json:"filterProfanity,omitempty"`
  2863. // LanguageCode: *Required* The language of the supplied audio as
  2864. // a
  2865. // [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language
  2866. // tag.
  2867. // Example: "en-US".
  2868. // See [Language
  2869. // Support](https://cloud.google.com/speech/docs/languages)
  2870. // for a list of the currently supported language codes.
  2871. LanguageCode string `json:"languageCode,omitempty"`
  2872. // MaxAlternatives: *Optional* Maximum number of recognition hypotheses
  2873. // to be returned.
  2874. // Specifically, the maximum number of `SpeechRecognitionAlternative`
  2875. // messages
  2876. // within each `SpeechTranscription`. The server may return fewer
  2877. // than
  2878. // `max_alternatives`. Valid values are `0`-`30`. A value of `0` or `1`
  2879. // will
  2880. // return a maximum of one. If omitted, will return a maximum of one.
  2881. MaxAlternatives int64 `json:"maxAlternatives,omitempty"`
  2882. // SpeechContexts: *Optional* A means to provide context to assist the
  2883. // speech recognition.
  2884. SpeechContexts []*GoogleCloudVideointelligenceV1p1beta1SpeechContext `json:"speechContexts,omitempty"`
  2885. // ForceSendFields is a list of field names (e.g. "AudioTracks") to
  2886. // unconditionally include in API requests. By default, fields with
  2887. // empty values are omitted from API requests. However, any non-pointer,
  2888. // non-interface field appearing in ForceSendFields will be sent to the
  2889. // server regardless of whether the field is empty or not. This may be
  2890. // used to include empty fields in Patch requests.
  2891. ForceSendFields []string `json:"-"`
  2892. // NullFields is a list of field names (e.g. "AudioTracks") to include
  2893. // in API requests with the JSON null value. By default, fields with
  2894. // empty values are omitted from API requests. However, any field with
  2895. // an empty value appearing in NullFields will be sent to the server as
  2896. // null. It is an error if a field in this list has a non-empty value.
  2897. // This may be used to include null fields in Patch requests.
  2898. NullFields []string `json:"-"`
  2899. }
  2900. func (s *GoogleCloudVideointelligenceV1p1beta1SpeechTranscriptionConfig) MarshalJSON() ([]byte, error) {
  2901. type NoMethod GoogleCloudVideointelligenceV1p1beta1SpeechTranscriptionConfig
  2902. raw := NoMethod(*s)
  2903. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2904. }
  2905. // GoogleCloudVideointelligenceV1p1beta1TextAnnotation: Annotations
  2906. // related to one detected OCR text snippet. This will contain
  2907. // the
  2908. // corresponding text, confidence value, and frame level information for
  2909. // each
  2910. // detection.
  2911. type GoogleCloudVideointelligenceV1p1beta1TextAnnotation struct {
  2912. // Segments: All video segments where OCR detected text appears.
  2913. Segments []*GoogleCloudVideointelligenceV1p1beta1TextSegment `json:"segments,omitempty"`
  2914. // Text: The detected text.
  2915. Text string `json:"text,omitempty"`
  2916. // ForceSendFields is a list of field names (e.g. "Segments") to
  2917. // unconditionally include in API requests. By default, fields with
  2918. // empty values are omitted from API requests. However, any non-pointer,
  2919. // non-interface field appearing in ForceSendFields will be sent to the
  2920. // server regardless of whether the field is empty or not. This may be
  2921. // used to include empty fields in Patch requests.
  2922. ForceSendFields []string `json:"-"`
  2923. // NullFields is a list of field names (e.g. "Segments") to include in
  2924. // API requests with the JSON null value. By default, fields with empty
  2925. // values are omitted from API requests. However, any field with an
  2926. // empty value appearing in NullFields will be sent to the server as
  2927. // null. It is an error if a field in this list has a non-empty value.
  2928. // This may be used to include null fields in Patch requests.
  2929. NullFields []string `json:"-"`
  2930. }
  2931. func (s *GoogleCloudVideointelligenceV1p1beta1TextAnnotation) MarshalJSON() ([]byte, error) {
  2932. type NoMethod GoogleCloudVideointelligenceV1p1beta1TextAnnotation
  2933. raw := NoMethod(*s)
  2934. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2935. }
  2936. // GoogleCloudVideointelligenceV1p1beta1TextDetectionConfig: Config for
  2937. // TEXT_DETECTION.
  2938. type GoogleCloudVideointelligenceV1p1beta1TextDetectionConfig struct {
  2939. // LanguageHints: Language hint can be specified if the language to be
  2940. // detected is known a
  2941. // priori. It can increase the accuracy of the detection. Language hint
  2942. // must
  2943. // be language code in BCP-47 format.
  2944. //
  2945. // Automatic language detection is performed if no hint is provided.
  2946. LanguageHints []string `json:"languageHints,omitempty"`
  2947. // ForceSendFields is a list of field names (e.g. "LanguageHints") to
  2948. // unconditionally include in API requests. By default, fields with
  2949. // empty values are omitted from API requests. However, any non-pointer,
  2950. // non-interface field appearing in ForceSendFields will be sent to the
  2951. // server regardless of whether the field is empty or not. This may be
  2952. // used to include empty fields in Patch requests.
  2953. ForceSendFields []string `json:"-"`
  2954. // NullFields is a list of field names (e.g. "LanguageHints") to include
  2955. // in API requests with the JSON null value. By default, fields with
  2956. // empty values are omitted from API requests. However, any field with
  2957. // an empty value appearing in NullFields will be sent to the server as
  2958. // null. It is an error if a field in this list has a non-empty value.
  2959. // This may be used to include null fields in Patch requests.
  2960. NullFields []string `json:"-"`
  2961. }
  2962. func (s *GoogleCloudVideointelligenceV1p1beta1TextDetectionConfig) MarshalJSON() ([]byte, error) {
  2963. type NoMethod GoogleCloudVideointelligenceV1p1beta1TextDetectionConfig
  2964. raw := NoMethod(*s)
  2965. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2966. }
  2967. // GoogleCloudVideointelligenceV1p1beta1TextFrame: Video frame level
  2968. // annotation results for text annotation (OCR).
  2969. // Contains information regarding timestamp and bounding box locations
  2970. // for the
  2971. // frames containing detected OCR text snippets.
  2972. type GoogleCloudVideointelligenceV1p1beta1TextFrame struct {
  2973. // RotatedBoundingBox: Bounding polygon of the detected text for this
  2974. // frame.
  2975. RotatedBoundingBox *GoogleCloudVideointelligenceV1p1beta1NormalizedBoundingPoly `json:"rotatedBoundingBox,omitempty"`
  2976. // TimeOffset: Timestamp of this frame.
  2977. TimeOffset string `json:"timeOffset,omitempty"`
  2978. // ForceSendFields is a list of field names (e.g. "RotatedBoundingBox")
  2979. // to unconditionally include in API requests. By default, fields with
  2980. // empty values are omitted from API requests. However, any non-pointer,
  2981. // non-interface field appearing in ForceSendFields will be sent to the
  2982. // server regardless of whether the field is empty or not. This may be
  2983. // used to include empty fields in Patch requests.
  2984. ForceSendFields []string `json:"-"`
  2985. // NullFields is a list of field names (e.g. "RotatedBoundingBox") to
  2986. // include in API requests with the JSON null value. By default, fields
  2987. // with empty values are omitted from API requests. However, any field
  2988. // with an empty value appearing in NullFields will be sent to the
  2989. // server as null. It is an error if a field in this list has a
  2990. // non-empty value. This may be used to include null fields in Patch
  2991. // requests.
  2992. NullFields []string `json:"-"`
  2993. }
  2994. func (s *GoogleCloudVideointelligenceV1p1beta1TextFrame) MarshalJSON() ([]byte, error) {
  2995. type NoMethod GoogleCloudVideointelligenceV1p1beta1TextFrame
  2996. raw := NoMethod(*s)
  2997. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2998. }
  2999. // GoogleCloudVideointelligenceV1p1beta1TextSegment: Video segment level
  3000. // annotation results for text detection.
  3001. type GoogleCloudVideointelligenceV1p1beta1TextSegment struct {
  3002. // Confidence: Confidence for the track of detected text. It is
  3003. // calculated as the highest
  3004. // over all frames where OCR detected text appears.
  3005. Confidence float64 `json:"confidence,omitempty"`
  3006. // Frames: Information related to the frames where OCR detected text
  3007. // appears.
  3008. Frames []*GoogleCloudVideointelligenceV1p1beta1TextFrame `json:"frames,omitempty"`
  3009. // Segment: Video segment where a text snippet was detected.
  3010. Segment *GoogleCloudVideointelligenceV1p1beta1VideoSegment `json:"segment,omitempty"`
  3011. // ForceSendFields is a list of field names (e.g. "Confidence") to
  3012. // unconditionally include in API requests. By default, fields with
  3013. // empty values are omitted from API requests. However, any non-pointer,
  3014. // non-interface field appearing in ForceSendFields will be sent to the
  3015. // server regardless of whether the field is empty or not. This may be
  3016. // used to include empty fields in Patch requests.
  3017. ForceSendFields []string `json:"-"`
  3018. // NullFields is a list of field names (e.g. "Confidence") to include in
  3019. // API requests with the JSON null value. By default, fields with empty
  3020. // values are omitted from API requests. However, any field with an
  3021. // empty value appearing in NullFields will be sent to the server as
  3022. // null. It is an error if a field in this list has a non-empty value.
  3023. // This may be used to include null fields in Patch requests.
  3024. NullFields []string `json:"-"`
  3025. }
  3026. func (s *GoogleCloudVideointelligenceV1p1beta1TextSegment) MarshalJSON() ([]byte, error) {
  3027. type NoMethod GoogleCloudVideointelligenceV1p1beta1TextSegment
  3028. raw := NoMethod(*s)
  3029. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3030. }
  3031. func (s *GoogleCloudVideointelligenceV1p1beta1TextSegment) UnmarshalJSON(data []byte) error {
  3032. type NoMethod GoogleCloudVideointelligenceV1p1beta1TextSegment
  3033. var s1 struct {
  3034. Confidence gensupport.JSONFloat64 `json:"confidence"`
  3035. *NoMethod
  3036. }
  3037. s1.NoMethod = (*NoMethod)(s)
  3038. if err := json.Unmarshal(data, &s1); err != nil {
  3039. return err
  3040. }
  3041. s.Confidence = float64(s1.Confidence)
  3042. return nil
  3043. }
  3044. // GoogleCloudVideointelligenceV1p1beta1VideoAnnotationProgress:
  3045. // Annotation progress for a single video.
  3046. type GoogleCloudVideointelligenceV1p1beta1VideoAnnotationProgress struct {
  3047. // InputUri: Video file location in
  3048. // [Google Cloud Storage](https://cloud.google.com/storage/).
  3049. InputUri string `json:"inputUri,omitempty"`
  3050. // ProgressPercent: Approximate percentage processed thus far.
  3051. // Guaranteed to be
  3052. // 100 when fully processed.
  3053. ProgressPercent int64 `json:"progressPercent,omitempty"`
  3054. // StartTime: Time when the request was received.
  3055. StartTime string `json:"startTime,omitempty"`
  3056. // UpdateTime: Time of the most recent update.
  3057. UpdateTime string `json:"updateTime,omitempty"`
  3058. // ForceSendFields is a list of field names (e.g. "InputUri") to
  3059. // unconditionally include in API requests. By default, fields with
  3060. // empty values are omitted from API requests. However, any non-pointer,
  3061. // non-interface field appearing in ForceSendFields will be sent to the
  3062. // server regardless of whether the field is empty or not. This may be
  3063. // used to include empty fields in Patch requests.
  3064. ForceSendFields []string `json:"-"`
  3065. // NullFields is a list of field names (e.g. "InputUri") to include in
  3066. // API requests with the JSON null value. By default, fields with empty
  3067. // values are omitted from API requests. However, any field with an
  3068. // empty value appearing in NullFields will be sent to the server as
  3069. // null. It is an error if a field in this list has a non-empty value.
  3070. // This may be used to include null fields in Patch requests.
  3071. NullFields []string `json:"-"`
  3072. }
  3073. func (s *GoogleCloudVideointelligenceV1p1beta1VideoAnnotationProgress) MarshalJSON() ([]byte, error) {
  3074. type NoMethod GoogleCloudVideointelligenceV1p1beta1VideoAnnotationProgress
  3075. raw := NoMethod(*s)
  3076. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3077. }
  3078. // GoogleCloudVideointelligenceV1p1beta1VideoAnnotationResults:
  3079. // Annotation results for a single video.
  3080. type GoogleCloudVideointelligenceV1p1beta1VideoAnnotationResults struct {
  3081. // Error: If set, indicates an error. Note that for a single
  3082. // `AnnotateVideoRequest`
  3083. // some videos may succeed and some may fail.
  3084. Error *GoogleRpcStatus `json:"error,omitempty"`
  3085. // ExplicitAnnotation: Explicit content annotation.
  3086. ExplicitAnnotation *GoogleCloudVideointelligenceV1p1beta1ExplicitContentAnnotation `json:"explicitAnnotation,omitempty"`
  3087. // FrameLabelAnnotations: Label annotations on frame level.
  3088. // There is exactly one element for each unique label.
  3089. FrameLabelAnnotations []*GoogleCloudVideointelligenceV1p1beta1LabelAnnotation `json:"frameLabelAnnotations,omitempty"`
  3090. // InputUri: Video file location in
  3091. // [Google Cloud Storage](https://cloud.google.com/storage/).
  3092. InputUri string `json:"inputUri,omitempty"`
  3093. // ObjectAnnotations: Annotations for list of objects detected and
  3094. // tracked in video.
  3095. ObjectAnnotations []*GoogleCloudVideointelligenceV1p1beta1ObjectTrackingAnnotation `json:"objectAnnotations,omitempty"`
  3096. // SegmentLabelAnnotations: Label annotations on video level or user
  3097. // specified segment level.
  3098. // There is exactly one element for each unique label.
  3099. SegmentLabelAnnotations []*GoogleCloudVideointelligenceV1p1beta1LabelAnnotation `json:"segmentLabelAnnotations,omitempty"`
  3100. // ShotAnnotations: Shot annotations. Each shot is represented as a
  3101. // video segment.
  3102. ShotAnnotations []*GoogleCloudVideointelligenceV1p1beta1VideoSegment `json:"shotAnnotations,omitempty"`
  3103. // ShotLabelAnnotations: Label annotations on shot level.
  3104. // There is exactly one element for each unique label.
  3105. ShotLabelAnnotations []*GoogleCloudVideointelligenceV1p1beta1LabelAnnotation `json:"shotLabelAnnotations,omitempty"`
  3106. // SpeechTranscriptions: Speech transcription.
  3107. SpeechTranscriptions []*GoogleCloudVideointelligenceV1p1beta1SpeechTranscription `json:"speechTranscriptions,omitempty"`
  3108. // TextAnnotations: OCR text detection and tracking.
  3109. // Annotations for list of detected text snippets. Each will have list
  3110. // of
  3111. // frame information associated with it.
  3112. TextAnnotations []*GoogleCloudVideointelligenceV1p1beta1TextAnnotation `json:"textAnnotations,omitempty"`
  3113. // ForceSendFields is a list of field names (e.g. "Error") to
  3114. // unconditionally include in API requests. By default, fields with
  3115. // empty values are omitted from API requests. However, any non-pointer,
  3116. // non-interface field appearing in ForceSendFields will be sent to the
  3117. // server regardless of whether the field is empty or not. This may be
  3118. // used to include empty fields in Patch requests.
  3119. ForceSendFields []string `json:"-"`
  3120. // NullFields is a list of field names (e.g. "Error") to include in API
  3121. // requests with the JSON null value. By default, fields with empty
  3122. // values are omitted from API requests. However, any field with an
  3123. // empty value appearing in NullFields will be sent to the server as
  3124. // null. It is an error if a field in this list has a non-empty value.
  3125. // This may be used to include null fields in Patch requests.
  3126. NullFields []string `json:"-"`
  3127. }
  3128. func (s *GoogleCloudVideointelligenceV1p1beta1VideoAnnotationResults) MarshalJSON() ([]byte, error) {
  3129. type NoMethod GoogleCloudVideointelligenceV1p1beta1VideoAnnotationResults
  3130. raw := NoMethod(*s)
  3131. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3132. }
  3133. // GoogleCloudVideointelligenceV1p1beta1VideoContext: Video context
  3134. // and/or feature-specific parameters.
  3135. type GoogleCloudVideointelligenceV1p1beta1VideoContext struct {
  3136. // ExplicitContentDetectionConfig: Config for
  3137. // EXPLICIT_CONTENT_DETECTION.
  3138. ExplicitContentDetectionConfig *GoogleCloudVideointelligenceV1p1beta1ExplicitContentDetectionConfig `json:"explicitContentDetectionConfig,omitempty"`
  3139. // LabelDetectionConfig: Config for LABEL_DETECTION.
  3140. LabelDetectionConfig *GoogleCloudVideointelligenceV1p1beta1LabelDetectionConfig `json:"labelDetectionConfig,omitempty"`
  3141. // Segments: Video segments to annotate. The segments may overlap and
  3142. // are not required
  3143. // to be contiguous or span the whole video. If unspecified, each video
  3144. // is
  3145. // treated as a single segment.
  3146. Segments []*GoogleCloudVideointelligenceV1p1beta1VideoSegment `json:"segments,omitempty"`
  3147. // ShotChangeDetectionConfig: Config for SHOT_CHANGE_DETECTION.
  3148. ShotChangeDetectionConfig *GoogleCloudVideointelligenceV1p1beta1ShotChangeDetectionConfig `json:"shotChangeDetectionConfig,omitempty"`
  3149. // SpeechTranscriptionConfig: Config for SPEECH_TRANSCRIPTION.
  3150. SpeechTranscriptionConfig *GoogleCloudVideointelligenceV1p1beta1SpeechTranscriptionConfig `json:"speechTranscriptionConfig,omitempty"`
  3151. // TextDetectionConfig: Config for TEXT_DETECTION.
  3152. TextDetectionConfig *GoogleCloudVideointelligenceV1p1beta1TextDetectionConfig `json:"textDetectionConfig,omitempty"`
  3153. // ForceSendFields is a list of field names (e.g.
  3154. // "ExplicitContentDetectionConfig") to unconditionally include in API
  3155. // requests. By default, fields with empty values are omitted from API
  3156. // requests. However, any non-pointer, non-interface field appearing in
  3157. // ForceSendFields will be sent to the server regardless of whether the
  3158. // field is empty or not. This may be used to include empty fields in
  3159. // Patch requests.
  3160. ForceSendFields []string `json:"-"`
  3161. // NullFields is a list of field names (e.g.
  3162. // "ExplicitContentDetectionConfig") to include in API requests with the
  3163. // JSON null value. By default, fields with empty values are omitted
  3164. // from API requests. However, any field with an empty value appearing
  3165. // in NullFields will be sent to the server as null. It is an error if a
  3166. // field in this list has a non-empty value. This may be used to include
  3167. // null fields in Patch requests.
  3168. NullFields []string `json:"-"`
  3169. }
  3170. func (s *GoogleCloudVideointelligenceV1p1beta1VideoContext) MarshalJSON() ([]byte, error) {
  3171. type NoMethod GoogleCloudVideointelligenceV1p1beta1VideoContext
  3172. raw := NoMethod(*s)
  3173. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3174. }
  3175. // GoogleCloudVideointelligenceV1p1beta1VideoSegment: Video segment.
  3176. type GoogleCloudVideointelligenceV1p1beta1VideoSegment struct {
  3177. // EndTimeOffset: Time-offset, relative to the beginning of the
  3178. // video,
  3179. // corresponding to the end of the segment (inclusive).
  3180. EndTimeOffset string `json:"endTimeOffset,omitempty"`
  3181. // StartTimeOffset: Time-offset, relative to the beginning of the
  3182. // video,
  3183. // corresponding to the start of the segment (inclusive).
  3184. StartTimeOffset string `json:"startTimeOffset,omitempty"`
  3185. // ForceSendFields is a list of field names (e.g. "EndTimeOffset") to
  3186. // unconditionally include in API requests. By default, fields with
  3187. // empty values are omitted from API requests. However, any non-pointer,
  3188. // non-interface field appearing in ForceSendFields will be sent to the
  3189. // server regardless of whether the field is empty or not. This may be
  3190. // used to include empty fields in Patch requests.
  3191. ForceSendFields []string `json:"-"`
  3192. // NullFields is a list of field names (e.g. "EndTimeOffset") to include
  3193. // in API requests with the JSON null value. By default, fields with
  3194. // empty values are omitted from API requests. However, any field with
  3195. // an empty value appearing in NullFields will be sent to the server as
  3196. // null. It is an error if a field in this list has a non-empty value.
  3197. // This may be used to include null fields in Patch requests.
  3198. NullFields []string `json:"-"`
  3199. }
  3200. func (s *GoogleCloudVideointelligenceV1p1beta1VideoSegment) MarshalJSON() ([]byte, error) {
  3201. type NoMethod GoogleCloudVideointelligenceV1p1beta1VideoSegment
  3202. raw := NoMethod(*s)
  3203. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3204. }
  3205. // GoogleCloudVideointelligenceV1p1beta1WordInfo: Word-specific
  3206. // information for recognized words. Word information is only
  3207. // included in the response when certain request parameters are set,
  3208. // such
  3209. // as `enable_word_time_offsets`.
  3210. type GoogleCloudVideointelligenceV1p1beta1WordInfo struct {
  3211. // Confidence: Output only. The confidence estimate between 0.0 and 1.0.
  3212. // A higher number
  3213. // indicates an estimated greater likelihood that the recognized words
  3214. // are
  3215. // correct. This field is set only for the top alternative.
  3216. // This field is not guaranteed to be accurate and users should not rely
  3217. // on it
  3218. // to be always provided.
  3219. // The default of 0.0 is a sentinel value indicating `confidence` was
  3220. // not set.
  3221. Confidence float64 `json:"confidence,omitempty"`
  3222. // EndTime: Time offset relative to the beginning of the audio,
  3223. // and
  3224. // corresponding to the end of the spoken word. This field is only set
  3225. // if
  3226. // `enable_word_time_offsets=true` and only in the top hypothesis. This
  3227. // is an
  3228. // experimental feature and the accuracy of the time offset can vary.
  3229. EndTime string `json:"endTime,omitempty"`
  3230. // SpeakerTag: Output only. A distinct integer value is assigned for
  3231. // every speaker within
  3232. // the audio. This field specifies which one of those speakers was
  3233. // detected to
  3234. // have spoken this word. Value ranges from 1 up to
  3235. // diarization_speaker_count,
  3236. // and is only set if speaker diarization is enabled.
  3237. SpeakerTag int64 `json:"speakerTag,omitempty"`
  3238. // StartTime: Time offset relative to the beginning of the audio,
  3239. // and
  3240. // corresponding to the start of the spoken word. This field is only set
  3241. // if
  3242. // `enable_word_time_offsets=true` and only in the top hypothesis. This
  3243. // is an
  3244. // experimental feature and the accuracy of the time offset can vary.
  3245. StartTime string `json:"startTime,omitempty"`
  3246. // Word: The word corresponding to this set of information.
  3247. Word string `json:"word,omitempty"`
  3248. // ForceSendFields is a list of field names (e.g. "Confidence") to
  3249. // unconditionally include in API requests. By default, fields with
  3250. // empty values are omitted from API requests. However, any non-pointer,
  3251. // non-interface field appearing in ForceSendFields will be sent to the
  3252. // server regardless of whether the field is empty or not. This may be
  3253. // used to include empty fields in Patch requests.
  3254. ForceSendFields []string `json:"-"`
  3255. // NullFields is a list of field names (e.g. "Confidence") to include in
  3256. // API requests with the JSON null value. By default, fields with empty
  3257. // values are omitted from API requests. However, any field with an
  3258. // empty value appearing in NullFields will be sent to the server as
  3259. // null. It is an error if a field in this list has a non-empty value.
  3260. // This may be used to include null fields in Patch requests.
  3261. NullFields []string `json:"-"`
  3262. }
  3263. func (s *GoogleCloudVideointelligenceV1p1beta1WordInfo) MarshalJSON() ([]byte, error) {
  3264. type NoMethod GoogleCloudVideointelligenceV1p1beta1WordInfo
  3265. raw := NoMethod(*s)
  3266. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3267. }
  3268. func (s *GoogleCloudVideointelligenceV1p1beta1WordInfo) UnmarshalJSON(data []byte) error {
  3269. type NoMethod GoogleCloudVideointelligenceV1p1beta1WordInfo
  3270. var s1 struct {
  3271. Confidence gensupport.JSONFloat64 `json:"confidence"`
  3272. *NoMethod
  3273. }
  3274. s1.NoMethod = (*NoMethod)(s)
  3275. if err := json.Unmarshal(data, &s1); err != nil {
  3276. return err
  3277. }
  3278. s.Confidence = float64(s1.Confidence)
  3279. return nil
  3280. }
  3281. // GoogleCloudVideointelligenceV1p2beta1AnnotateVideoProgress: Video
  3282. // annotation progress. Included in the `metadata`
  3283. // field of the `Operation` returned by the `GetOperation`
  3284. // call of the `google::longrunning::Operations` service.
  3285. type GoogleCloudVideointelligenceV1p2beta1AnnotateVideoProgress struct {
  3286. // AnnotationProgress: Progress metadata for all videos specified in
  3287. // `AnnotateVideoRequest`.
  3288. AnnotationProgress []*GoogleCloudVideointelligenceV1p2beta1VideoAnnotationProgress `json:"annotationProgress,omitempty"`
  3289. // ForceSendFields is a list of field names (e.g. "AnnotationProgress")
  3290. // to unconditionally include in API requests. By default, fields with
  3291. // empty values are omitted from API requests. However, any non-pointer,
  3292. // non-interface field appearing in ForceSendFields will be sent to the
  3293. // server regardless of whether the field is empty or not. This may be
  3294. // used to include empty fields in Patch requests.
  3295. ForceSendFields []string `json:"-"`
  3296. // NullFields is a list of field names (e.g. "AnnotationProgress") to
  3297. // include in API requests with the JSON null value. By default, fields
  3298. // with empty values are omitted from API requests. However, any field
  3299. // with an empty value appearing in NullFields will be sent to the
  3300. // server as null. It is an error if a field in this list has a
  3301. // non-empty value. This may be used to include null fields in Patch
  3302. // requests.
  3303. NullFields []string `json:"-"`
  3304. }
  3305. func (s *GoogleCloudVideointelligenceV1p2beta1AnnotateVideoProgress) MarshalJSON() ([]byte, error) {
  3306. type NoMethod GoogleCloudVideointelligenceV1p2beta1AnnotateVideoProgress
  3307. raw := NoMethod(*s)
  3308. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3309. }
  3310. // GoogleCloudVideointelligenceV1p2beta1AnnotateVideoResponse: Video
  3311. // annotation response. Included in the `response`
  3312. // field of the `Operation` returned by the `GetOperation`
  3313. // call of the `google::longrunning::Operations` service.
  3314. type GoogleCloudVideointelligenceV1p2beta1AnnotateVideoResponse struct {
  3315. // AnnotationResults: Annotation results for all videos specified in
  3316. // `AnnotateVideoRequest`.
  3317. AnnotationResults []*GoogleCloudVideointelligenceV1p2beta1VideoAnnotationResults `json:"annotationResults,omitempty"`
  3318. // ForceSendFields is a list of field names (e.g. "AnnotationResults")
  3319. // to unconditionally include in API requests. By default, fields with
  3320. // empty values are omitted from API requests. However, any non-pointer,
  3321. // non-interface field appearing in ForceSendFields will be sent to the
  3322. // server regardless of whether the field is empty or not. This may be
  3323. // used to include empty fields in Patch requests.
  3324. ForceSendFields []string `json:"-"`
  3325. // NullFields is a list of field names (e.g. "AnnotationResults") to
  3326. // include in API requests with the JSON null value. By default, fields
  3327. // with empty values are omitted from API requests. However, any field
  3328. // with an empty value appearing in NullFields will be sent to the
  3329. // server as null. It is an error if a field in this list has a
  3330. // non-empty value. This may be used to include null fields in Patch
  3331. // requests.
  3332. NullFields []string `json:"-"`
  3333. }
  3334. func (s *GoogleCloudVideointelligenceV1p2beta1AnnotateVideoResponse) MarshalJSON() ([]byte, error) {
  3335. type NoMethod GoogleCloudVideointelligenceV1p2beta1AnnotateVideoResponse
  3336. raw := NoMethod(*s)
  3337. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3338. }
  3339. // GoogleCloudVideointelligenceV1p2beta1Entity: Detected entity from
  3340. // video analysis.
  3341. type GoogleCloudVideointelligenceV1p2beta1Entity struct {
  3342. // Description: Textual description, e.g. `Fixed-gear bicycle`.
  3343. Description string `json:"description,omitempty"`
  3344. // EntityId: Opaque entity ID. Some IDs may be available in
  3345. // [Google Knowledge Graph
  3346. // Search
  3347. // API](https://developers.google.com/knowledge-graph/).
  3348. EntityId string `json:"entityId,omitempty"`
  3349. // LanguageCode: Language code for `description` in BCP-47 format.
  3350. LanguageCode string `json:"languageCode,omitempty"`
  3351. // ForceSendFields is a list of field names (e.g. "Description") to
  3352. // unconditionally include in API requests. By default, fields with
  3353. // empty values are omitted from API requests. However, any non-pointer,
  3354. // non-interface field appearing in ForceSendFields will be sent to the
  3355. // server regardless of whether the field is empty or not. This may be
  3356. // used to include empty fields in Patch requests.
  3357. ForceSendFields []string `json:"-"`
  3358. // NullFields is a list of field names (e.g. "Description") to include
  3359. // in API requests with the JSON null value. By default, fields with
  3360. // empty values are omitted from API requests. However, any field with
  3361. // an empty value appearing in NullFields will be sent to the server as
  3362. // null. It is an error if a field in this list has a non-empty value.
  3363. // This may be used to include null fields in Patch requests.
  3364. NullFields []string `json:"-"`
  3365. }
  3366. func (s *GoogleCloudVideointelligenceV1p2beta1Entity) MarshalJSON() ([]byte, error) {
  3367. type NoMethod GoogleCloudVideointelligenceV1p2beta1Entity
  3368. raw := NoMethod(*s)
  3369. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3370. }
  3371. // GoogleCloudVideointelligenceV1p2beta1ExplicitContentAnnotation:
  3372. // Explicit content annotation (based on per-frame visual signals
  3373. // only).
  3374. // If no explicit content has been detected in a frame, no annotations
  3375. // are
  3376. // present for that frame.
  3377. type GoogleCloudVideointelligenceV1p2beta1ExplicitContentAnnotation struct {
  3378. // Frames: All video frames where explicit content was detected.
  3379. Frames []*GoogleCloudVideointelligenceV1p2beta1ExplicitContentFrame `json:"frames,omitempty"`
  3380. // ForceSendFields is a list of field names (e.g. "Frames") to
  3381. // unconditionally include in API requests. By default, fields with
  3382. // empty values are omitted from API requests. However, any non-pointer,
  3383. // non-interface field appearing in ForceSendFields will be sent to the
  3384. // server regardless of whether the field is empty or not. This may be
  3385. // used to include empty fields in Patch requests.
  3386. ForceSendFields []string `json:"-"`
  3387. // NullFields is a list of field names (e.g. "Frames") to include in API
  3388. // requests with the JSON null value. By default, fields with empty
  3389. // values are omitted from API requests. However, any field with an
  3390. // empty value appearing in NullFields will be sent to the server as
  3391. // null. It is an error if a field in this list has a non-empty value.
  3392. // This may be used to include null fields in Patch requests.
  3393. NullFields []string `json:"-"`
  3394. }
  3395. func (s *GoogleCloudVideointelligenceV1p2beta1ExplicitContentAnnotation) MarshalJSON() ([]byte, error) {
  3396. type NoMethod GoogleCloudVideointelligenceV1p2beta1ExplicitContentAnnotation
  3397. raw := NoMethod(*s)
  3398. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3399. }
  3400. // GoogleCloudVideointelligenceV1p2beta1ExplicitContentFrame: Video
  3401. // frame level annotation results for explicit content.
  3402. type GoogleCloudVideointelligenceV1p2beta1ExplicitContentFrame struct {
  3403. // PornographyLikelihood: Likelihood of the pornography content..
  3404. //
  3405. // Possible values:
  3406. // "LIKELIHOOD_UNSPECIFIED" - Unspecified likelihood.
  3407. // "VERY_UNLIKELY" - Very unlikely.
  3408. // "UNLIKELY" - Unlikely.
  3409. // "POSSIBLE" - Possible.
  3410. // "LIKELY" - Likely.
  3411. // "VERY_LIKELY" - Very likely.
  3412. PornographyLikelihood string `json:"pornographyLikelihood,omitempty"`
  3413. // TimeOffset: Time-offset, relative to the beginning of the video,
  3414. // corresponding to the
  3415. // video frame for this location.
  3416. TimeOffset string `json:"timeOffset,omitempty"`
  3417. // ForceSendFields is a list of field names (e.g.
  3418. // "PornographyLikelihood") to unconditionally include in API requests.
  3419. // By default, fields with empty values are omitted from API requests.
  3420. // However, any non-pointer, non-interface field appearing in
  3421. // ForceSendFields will be sent to the server regardless of whether the
  3422. // field is empty or not. This may be used to include empty fields in
  3423. // Patch requests.
  3424. ForceSendFields []string `json:"-"`
  3425. // NullFields is a list of field names (e.g. "PornographyLikelihood") to
  3426. // include in API requests with the JSON null value. By default, fields
  3427. // with empty values are omitted from API requests. However, any field
  3428. // with an empty value appearing in NullFields will be sent to the
  3429. // server as null. It is an error if a field in this list has a
  3430. // non-empty value. This may be used to include null fields in Patch
  3431. // requests.
  3432. NullFields []string `json:"-"`
  3433. }
  3434. func (s *GoogleCloudVideointelligenceV1p2beta1ExplicitContentFrame) MarshalJSON() ([]byte, error) {
  3435. type NoMethod GoogleCloudVideointelligenceV1p2beta1ExplicitContentFrame
  3436. raw := NoMethod(*s)
  3437. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3438. }
  3439. // GoogleCloudVideointelligenceV1p2beta1LabelAnnotation: Label
  3440. // annotation.
  3441. type GoogleCloudVideointelligenceV1p2beta1LabelAnnotation struct {
  3442. // CategoryEntities: Common categories for the detected entity.
  3443. // E.g. when the label is `Terrier` the category is likely `dog`. And in
  3444. // some
  3445. // cases there might be more than one categories e.g. `Terrier` could
  3446. // also be
  3447. // a `pet`.
  3448. CategoryEntities []*GoogleCloudVideointelligenceV1p2beta1Entity `json:"categoryEntities,omitempty"`
  3449. // Entity: Detected entity.
  3450. Entity *GoogleCloudVideointelligenceV1p2beta1Entity `json:"entity,omitempty"`
  3451. // Frames: All video frames where a label was detected.
  3452. Frames []*GoogleCloudVideointelligenceV1p2beta1LabelFrame `json:"frames,omitempty"`
  3453. // Segments: All video segments where a label was detected.
  3454. Segments []*GoogleCloudVideointelligenceV1p2beta1LabelSegment `json:"segments,omitempty"`
  3455. // ForceSendFields is a list of field names (e.g. "CategoryEntities") to
  3456. // unconditionally include in API requests. By default, fields with
  3457. // empty values are omitted from API requests. However, any non-pointer,
  3458. // non-interface field appearing in ForceSendFields will be sent to the
  3459. // server regardless of whether the field is empty or not. This may be
  3460. // used to include empty fields in Patch requests.
  3461. ForceSendFields []string `json:"-"`
  3462. // NullFields is a list of field names (e.g. "CategoryEntities") to
  3463. // include in API requests with the JSON null value. By default, fields
  3464. // with empty values are omitted from API requests. However, any field
  3465. // with an empty value appearing in NullFields will be sent to the
  3466. // server as null. It is an error if a field in this list has a
  3467. // non-empty value. This may be used to include null fields in Patch
  3468. // requests.
  3469. NullFields []string `json:"-"`
  3470. }
  3471. func (s *GoogleCloudVideointelligenceV1p2beta1LabelAnnotation) MarshalJSON() ([]byte, error) {
  3472. type NoMethod GoogleCloudVideointelligenceV1p2beta1LabelAnnotation
  3473. raw := NoMethod(*s)
  3474. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3475. }
  3476. // GoogleCloudVideointelligenceV1p2beta1LabelFrame: Video frame level
  3477. // annotation results for label detection.
  3478. type GoogleCloudVideointelligenceV1p2beta1LabelFrame struct {
  3479. // Confidence: Confidence that the label is accurate. Range: [0, 1].
  3480. Confidence float64 `json:"confidence,omitempty"`
  3481. // TimeOffset: Time-offset, relative to the beginning of the video,
  3482. // corresponding to the
  3483. // video frame for this location.
  3484. TimeOffset string `json:"timeOffset,omitempty"`
  3485. // ForceSendFields is a list of field names (e.g. "Confidence") to
  3486. // unconditionally include in API requests. By default, fields with
  3487. // empty values are omitted from API requests. However, any non-pointer,
  3488. // non-interface field appearing in ForceSendFields will be sent to the
  3489. // server regardless of whether the field is empty or not. This may be
  3490. // used to include empty fields in Patch requests.
  3491. ForceSendFields []string `json:"-"`
  3492. // NullFields is a list of field names (e.g. "Confidence") to include in
  3493. // API requests with the JSON null value. By default, fields with empty
  3494. // values are omitted from API requests. However, any field with an
  3495. // empty value appearing in NullFields will be sent to the server as
  3496. // null. It is an error if a field in this list has a non-empty value.
  3497. // This may be used to include null fields in Patch requests.
  3498. NullFields []string `json:"-"`
  3499. }
  3500. func (s *GoogleCloudVideointelligenceV1p2beta1LabelFrame) MarshalJSON() ([]byte, error) {
  3501. type NoMethod GoogleCloudVideointelligenceV1p2beta1LabelFrame
  3502. raw := NoMethod(*s)
  3503. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3504. }
  3505. func (s *GoogleCloudVideointelligenceV1p2beta1LabelFrame) UnmarshalJSON(data []byte) error {
  3506. type NoMethod GoogleCloudVideointelligenceV1p2beta1LabelFrame
  3507. var s1 struct {
  3508. Confidence gensupport.JSONFloat64 `json:"confidence"`
  3509. *NoMethod
  3510. }
  3511. s1.NoMethod = (*NoMethod)(s)
  3512. if err := json.Unmarshal(data, &s1); err != nil {
  3513. return err
  3514. }
  3515. s.Confidence = float64(s1.Confidence)
  3516. return nil
  3517. }
  3518. // GoogleCloudVideointelligenceV1p2beta1LabelSegment: Video segment
  3519. // level annotation results for label detection.
  3520. type GoogleCloudVideointelligenceV1p2beta1LabelSegment struct {
  3521. // Confidence: Confidence that the label is accurate. Range: [0, 1].
  3522. Confidence float64 `json:"confidence,omitempty"`
  3523. // Segment: Video segment where a label was detected.
  3524. Segment *GoogleCloudVideointelligenceV1p2beta1VideoSegment `json:"segment,omitempty"`
  3525. // ForceSendFields is a list of field names (e.g. "Confidence") to
  3526. // unconditionally include in API requests. By default, fields with
  3527. // empty values are omitted from API requests. However, any non-pointer,
  3528. // non-interface field appearing in ForceSendFields will be sent to the
  3529. // server regardless of whether the field is empty or not. This may be
  3530. // used to include empty fields in Patch requests.
  3531. ForceSendFields []string `json:"-"`
  3532. // NullFields is a list of field names (e.g. "Confidence") to include in
  3533. // API requests with the JSON null value. By default, fields with empty
  3534. // values are omitted from API requests. However, any field with an
  3535. // empty value appearing in NullFields will be sent to the server as
  3536. // null. It is an error if a field in this list has a non-empty value.
  3537. // This may be used to include null fields in Patch requests.
  3538. NullFields []string `json:"-"`
  3539. }
  3540. func (s *GoogleCloudVideointelligenceV1p2beta1LabelSegment) MarshalJSON() ([]byte, error) {
  3541. type NoMethod GoogleCloudVideointelligenceV1p2beta1LabelSegment
  3542. raw := NoMethod(*s)
  3543. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3544. }
  3545. func (s *GoogleCloudVideointelligenceV1p2beta1LabelSegment) UnmarshalJSON(data []byte) error {
  3546. type NoMethod GoogleCloudVideointelligenceV1p2beta1LabelSegment
  3547. var s1 struct {
  3548. Confidence gensupport.JSONFloat64 `json:"confidence"`
  3549. *NoMethod
  3550. }
  3551. s1.NoMethod = (*NoMethod)(s)
  3552. if err := json.Unmarshal(data, &s1); err != nil {
  3553. return err
  3554. }
  3555. s.Confidence = float64(s1.Confidence)
  3556. return nil
  3557. }
  3558. // GoogleCloudVideointelligenceV1p2beta1NormalizedBoundingBox:
  3559. // Normalized bounding box.
  3560. // The normalized vertex coordinates are relative to the original
  3561. // image.
  3562. // Range: [0, 1].
  3563. type GoogleCloudVideointelligenceV1p2beta1NormalizedBoundingBox struct {
  3564. // Bottom: Bottom Y coordinate.
  3565. Bottom float64 `json:"bottom,omitempty"`
  3566. // Left: Left X coordinate.
  3567. Left float64 `json:"left,omitempty"`
  3568. // Right: Right X coordinate.
  3569. Right float64 `json:"right,omitempty"`
  3570. // Top: Top Y coordinate.
  3571. Top float64 `json:"top,omitempty"`
  3572. // ForceSendFields is a list of field names (e.g. "Bottom") to
  3573. // unconditionally include in API requests. By default, fields with
  3574. // empty values are omitted from API requests. However, any non-pointer,
  3575. // non-interface field appearing in ForceSendFields will be sent to the
  3576. // server regardless of whether the field is empty or not. This may be
  3577. // used to include empty fields in Patch requests.
  3578. ForceSendFields []string `json:"-"`
  3579. // NullFields is a list of field names (e.g. "Bottom") to include in API
  3580. // requests with the JSON null value. By default, fields with empty
  3581. // values are omitted from API requests. However, any field with an
  3582. // empty value appearing in NullFields will be sent to the server as
  3583. // null. It is an error if a field in this list has a non-empty value.
  3584. // This may be used to include null fields in Patch requests.
  3585. NullFields []string `json:"-"`
  3586. }
  3587. func (s *GoogleCloudVideointelligenceV1p2beta1NormalizedBoundingBox) MarshalJSON() ([]byte, error) {
  3588. type NoMethod GoogleCloudVideointelligenceV1p2beta1NormalizedBoundingBox
  3589. raw := NoMethod(*s)
  3590. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3591. }
  3592. func (s *GoogleCloudVideointelligenceV1p2beta1NormalizedBoundingBox) UnmarshalJSON(data []byte) error {
  3593. type NoMethod GoogleCloudVideointelligenceV1p2beta1NormalizedBoundingBox
  3594. var s1 struct {
  3595. Bottom gensupport.JSONFloat64 `json:"bottom"`
  3596. Left gensupport.JSONFloat64 `json:"left"`
  3597. Right gensupport.JSONFloat64 `json:"right"`
  3598. Top gensupport.JSONFloat64 `json:"top"`
  3599. *NoMethod
  3600. }
  3601. s1.NoMethod = (*NoMethod)(s)
  3602. if err := json.Unmarshal(data, &s1); err != nil {
  3603. return err
  3604. }
  3605. s.Bottom = float64(s1.Bottom)
  3606. s.Left = float64(s1.Left)
  3607. s.Right = float64(s1.Right)
  3608. s.Top = float64(s1.Top)
  3609. return nil
  3610. }
  3611. // GoogleCloudVideointelligenceV1p2beta1NormalizedBoundingPoly:
  3612. // Normalized bounding polygon for text (that might not be aligned with
  3613. // axis).
  3614. // Contains list of the corner points in clockwise order starting
  3615. // from
  3616. // top-left corner. For example, for a rectangular bounding box:
  3617. // When the text is horizontal it might look like:
  3618. // 0----1
  3619. // | |
  3620. // 3----2
  3621. //
  3622. // When it's clockwise rotated 180 degrees around the top-left corner
  3623. // it
  3624. // becomes:
  3625. // 2----3
  3626. // | |
  3627. // 1----0
  3628. //
  3629. // and the vertex order will still be (0, 1, 2, 3). Note that values can
  3630. // be less
  3631. // than 0, or greater than 1 due to trignometric calculations for
  3632. // location of
  3633. // the box.
  3634. type GoogleCloudVideointelligenceV1p2beta1NormalizedBoundingPoly struct {
  3635. // Vertices: Normalized vertices of the bounding polygon.
  3636. Vertices []*GoogleCloudVideointelligenceV1p2beta1NormalizedVertex `json:"vertices,omitempty"`
  3637. // ForceSendFields is a list of field names (e.g. "Vertices") to
  3638. // unconditionally include in API requests. By default, fields with
  3639. // empty values are omitted from API requests. However, any non-pointer,
  3640. // non-interface field appearing in ForceSendFields will be sent to the
  3641. // server regardless of whether the field is empty or not. This may be
  3642. // used to include empty fields in Patch requests.
  3643. ForceSendFields []string `json:"-"`
  3644. // NullFields is a list of field names (e.g. "Vertices") to include in
  3645. // API requests with the JSON null value. By default, fields with empty
  3646. // values are omitted from API requests. However, any field with an
  3647. // empty value appearing in NullFields will be sent to the server as
  3648. // null. It is an error if a field in this list has a non-empty value.
  3649. // This may be used to include null fields in Patch requests.
  3650. NullFields []string `json:"-"`
  3651. }
  3652. func (s *GoogleCloudVideointelligenceV1p2beta1NormalizedBoundingPoly) MarshalJSON() ([]byte, error) {
  3653. type NoMethod GoogleCloudVideointelligenceV1p2beta1NormalizedBoundingPoly
  3654. raw := NoMethod(*s)
  3655. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3656. }
  3657. // GoogleCloudVideointelligenceV1p2beta1NormalizedVertex: A vertex
  3658. // represents a 2D point in the image.
  3659. // NOTE: the normalized vertex coordinates are relative to the original
  3660. // image
  3661. // and range from 0 to 1.
  3662. type GoogleCloudVideointelligenceV1p2beta1NormalizedVertex struct {
  3663. // X: X coordinate.
  3664. X float64 `json:"x,omitempty"`
  3665. // Y: Y coordinate.
  3666. Y float64 `json:"y,omitempty"`
  3667. // ForceSendFields is a list of field names (e.g. "X") to
  3668. // unconditionally include in API requests. By default, fields with
  3669. // empty values are omitted from API requests. However, any non-pointer,
  3670. // non-interface field appearing in ForceSendFields will be sent to the
  3671. // server regardless of whether the field is empty or not. This may be
  3672. // used to include empty fields in Patch requests.
  3673. ForceSendFields []string `json:"-"`
  3674. // NullFields is a list of field names (e.g. "X") to include in API
  3675. // requests with the JSON null value. By default, fields with empty
  3676. // values are omitted from API requests. However, any field with an
  3677. // empty value appearing in NullFields will be sent to the server as
  3678. // null. It is an error if a field in this list has a non-empty value.
  3679. // This may be used to include null fields in Patch requests.
  3680. NullFields []string `json:"-"`
  3681. }
  3682. func (s *GoogleCloudVideointelligenceV1p2beta1NormalizedVertex) MarshalJSON() ([]byte, error) {
  3683. type NoMethod GoogleCloudVideointelligenceV1p2beta1NormalizedVertex
  3684. raw := NoMethod(*s)
  3685. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3686. }
  3687. func (s *GoogleCloudVideointelligenceV1p2beta1NormalizedVertex) UnmarshalJSON(data []byte) error {
  3688. type NoMethod GoogleCloudVideointelligenceV1p2beta1NormalizedVertex
  3689. var s1 struct {
  3690. X gensupport.JSONFloat64 `json:"x"`
  3691. Y gensupport.JSONFloat64 `json:"y"`
  3692. *NoMethod
  3693. }
  3694. s1.NoMethod = (*NoMethod)(s)
  3695. if err := json.Unmarshal(data, &s1); err != nil {
  3696. return err
  3697. }
  3698. s.X = float64(s1.X)
  3699. s.Y = float64(s1.Y)
  3700. return nil
  3701. }
  3702. // GoogleCloudVideointelligenceV1p2beta1ObjectTrackingAnnotation:
  3703. // Annotations corresponding to one tracked object.
  3704. type GoogleCloudVideointelligenceV1p2beta1ObjectTrackingAnnotation struct {
  3705. // Confidence: Object category's labeling confidence of this track.
  3706. Confidence float64 `json:"confidence,omitempty"`
  3707. // Entity: Entity to specify the object category that this track is
  3708. // labeled as.
  3709. Entity *GoogleCloudVideointelligenceV1p2beta1Entity `json:"entity,omitempty"`
  3710. // Frames: Information corresponding to all frames where this object
  3711. // track appears.
  3712. // Non-streaming batch mode: it may be one or multiple
  3713. // ObjectTrackingFrame
  3714. // messages in frames.
  3715. // Streaming mode: it can only be one ObjectTrackingFrame message in
  3716. // frames.
  3717. Frames []*GoogleCloudVideointelligenceV1p2beta1ObjectTrackingFrame `json:"frames,omitempty"`
  3718. // Segment: Non-streaming batch mode ONLY.
  3719. // Each object track corresponds to one video segment where it appears.
  3720. Segment *GoogleCloudVideointelligenceV1p2beta1VideoSegment `json:"segment,omitempty"`
  3721. // TrackId: Streaming mode ONLY.
  3722. // In streaming mode, we do not know the end time of a tracked
  3723. // object
  3724. // before it is completed. Hence, there is no VideoSegment info
  3725. // returned.
  3726. // Instead, we provide a unique identifiable integer track_id so
  3727. // that
  3728. // the customers can correlate the results of the
  3729. // ongoing
  3730. // ObjectTrackAnnotation of the same track_id over time.
  3731. TrackId int64 `json:"trackId,omitempty,string"`
  3732. // ForceSendFields is a list of field names (e.g. "Confidence") to
  3733. // unconditionally include in API requests. By default, fields with
  3734. // empty values are omitted from API requests. However, any non-pointer,
  3735. // non-interface field appearing in ForceSendFields will be sent to the
  3736. // server regardless of whether the field is empty or not. This may be
  3737. // used to include empty fields in Patch requests.
  3738. ForceSendFields []string `json:"-"`
  3739. // NullFields is a list of field names (e.g. "Confidence") to include in
  3740. // API requests with the JSON null value. By default, fields with empty
  3741. // values are omitted from API requests. However, any field with an
  3742. // empty value appearing in NullFields will be sent to the server as
  3743. // null. It is an error if a field in this list has a non-empty value.
  3744. // This may be used to include null fields in Patch requests.
  3745. NullFields []string `json:"-"`
  3746. }
  3747. func (s *GoogleCloudVideointelligenceV1p2beta1ObjectTrackingAnnotation) MarshalJSON() ([]byte, error) {
  3748. type NoMethod GoogleCloudVideointelligenceV1p2beta1ObjectTrackingAnnotation
  3749. raw := NoMethod(*s)
  3750. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3751. }
  3752. func (s *GoogleCloudVideointelligenceV1p2beta1ObjectTrackingAnnotation) UnmarshalJSON(data []byte) error {
  3753. type NoMethod GoogleCloudVideointelligenceV1p2beta1ObjectTrackingAnnotation
  3754. var s1 struct {
  3755. Confidence gensupport.JSONFloat64 `json:"confidence"`
  3756. *NoMethod
  3757. }
  3758. s1.NoMethod = (*NoMethod)(s)
  3759. if err := json.Unmarshal(data, &s1); err != nil {
  3760. return err
  3761. }
  3762. s.Confidence = float64(s1.Confidence)
  3763. return nil
  3764. }
  3765. // GoogleCloudVideointelligenceV1p2beta1ObjectTrackingFrame: Video frame
  3766. // level annotations for object detection and tracking. This
  3767. // field
  3768. // stores per frame location, time offset, and confidence.
  3769. type GoogleCloudVideointelligenceV1p2beta1ObjectTrackingFrame struct {
  3770. // NormalizedBoundingBox: The normalized bounding box location of this
  3771. // object track for the frame.
  3772. NormalizedBoundingBox *GoogleCloudVideointelligenceV1p2beta1NormalizedBoundingBox `json:"normalizedBoundingBox,omitempty"`
  3773. // TimeOffset: The timestamp of the frame in microseconds.
  3774. TimeOffset string `json:"timeOffset,omitempty"`
  3775. // ForceSendFields is a list of field names (e.g.
  3776. // "NormalizedBoundingBox") to unconditionally include in API requests.
  3777. // By default, fields with empty values are omitted from API requests.
  3778. // However, any non-pointer, non-interface field appearing in
  3779. // ForceSendFields will be sent to the server regardless of whether the
  3780. // field is empty or not. This may be used to include empty fields in
  3781. // Patch requests.
  3782. ForceSendFields []string `json:"-"`
  3783. // NullFields is a list of field names (e.g. "NormalizedBoundingBox") to
  3784. // include in API requests with the JSON null value. By default, fields
  3785. // with empty values are omitted from API requests. However, any field
  3786. // with an empty value appearing in NullFields will be sent to the
  3787. // server as null. It is an error if a field in this list has a
  3788. // non-empty value. This may be used to include null fields in Patch
  3789. // requests.
  3790. NullFields []string `json:"-"`
  3791. }
  3792. func (s *GoogleCloudVideointelligenceV1p2beta1ObjectTrackingFrame) MarshalJSON() ([]byte, error) {
  3793. type NoMethod GoogleCloudVideointelligenceV1p2beta1ObjectTrackingFrame
  3794. raw := NoMethod(*s)
  3795. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3796. }
  3797. // GoogleCloudVideointelligenceV1p2beta1SpeechRecognitionAlternative:
  3798. // Alternative hypotheses (a.k.a. n-best list).
  3799. type GoogleCloudVideointelligenceV1p2beta1SpeechRecognitionAlternative struct {
  3800. // Confidence: The confidence estimate between 0.0 and 1.0. A higher
  3801. // number
  3802. // indicates an estimated greater likelihood that the recognized words
  3803. // are
  3804. // correct. This field is typically provided only for the top
  3805. // hypothesis, and
  3806. // only for `is_final=true` results. Clients should not rely on
  3807. // the
  3808. // `confidence` field as it is not guaranteed to be accurate or
  3809. // consistent.
  3810. // The default of 0.0 is a sentinel value indicating `confidence` was
  3811. // not set.
  3812. Confidence float64 `json:"confidence,omitempty"`
  3813. // Transcript: Transcript text representing the words that the user
  3814. // spoke.
  3815. Transcript string `json:"transcript,omitempty"`
  3816. // Words: A list of word-specific information for each recognized word.
  3817. Words []*GoogleCloudVideointelligenceV1p2beta1WordInfo `json:"words,omitempty"`
  3818. // ForceSendFields is a list of field names (e.g. "Confidence") to
  3819. // unconditionally include in API requests. By default, fields with
  3820. // empty values are omitted from API requests. However, any non-pointer,
  3821. // non-interface field appearing in ForceSendFields will be sent to the
  3822. // server regardless of whether the field is empty or not. This may be
  3823. // used to include empty fields in Patch requests.
  3824. ForceSendFields []string `json:"-"`
  3825. // NullFields is a list of field names (e.g. "Confidence") to include in
  3826. // API requests with the JSON null value. By default, fields with empty
  3827. // values are omitted from API requests. However, any field with an
  3828. // empty value appearing in NullFields will be sent to the server as
  3829. // null. It is an error if a field in this list has a non-empty value.
  3830. // This may be used to include null fields in Patch requests.
  3831. NullFields []string `json:"-"`
  3832. }
  3833. func (s *GoogleCloudVideointelligenceV1p2beta1SpeechRecognitionAlternative) MarshalJSON() ([]byte, error) {
  3834. type NoMethod GoogleCloudVideointelligenceV1p2beta1SpeechRecognitionAlternative
  3835. raw := NoMethod(*s)
  3836. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3837. }
  3838. func (s *GoogleCloudVideointelligenceV1p2beta1SpeechRecognitionAlternative) UnmarshalJSON(data []byte) error {
  3839. type NoMethod GoogleCloudVideointelligenceV1p2beta1SpeechRecognitionAlternative
  3840. var s1 struct {
  3841. Confidence gensupport.JSONFloat64 `json:"confidence"`
  3842. *NoMethod
  3843. }
  3844. s1.NoMethod = (*NoMethod)(s)
  3845. if err := json.Unmarshal(data, &s1); err != nil {
  3846. return err
  3847. }
  3848. s.Confidence = float64(s1.Confidence)
  3849. return nil
  3850. }
  3851. // GoogleCloudVideointelligenceV1p2beta1SpeechTranscription: A speech
  3852. // recognition result corresponding to a portion of the audio.
  3853. type GoogleCloudVideointelligenceV1p2beta1SpeechTranscription struct {
  3854. // Alternatives: May contain one or more recognition hypotheses (up to
  3855. // the maximum specified
  3856. // in `max_alternatives`). These alternatives are ordered in terms
  3857. // of
  3858. // accuracy, with the top (first) alternative being the most probable,
  3859. // as
  3860. // ranked by the recognizer.
  3861. Alternatives []*GoogleCloudVideointelligenceV1p2beta1SpeechRecognitionAlternative `json:"alternatives,omitempty"`
  3862. // LanguageCode: Output only.
  3863. // The
  3864. // [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag
  3865. // of the
  3866. // language in this result. This language code was detected to have the
  3867. // most
  3868. // likelihood of being spoken in the audio.
  3869. LanguageCode string `json:"languageCode,omitempty"`
  3870. // ForceSendFields is a list of field names (e.g. "Alternatives") to
  3871. // unconditionally include in API requests. By default, fields with
  3872. // empty values are omitted from API requests. However, any non-pointer,
  3873. // non-interface field appearing in ForceSendFields will be sent to the
  3874. // server regardless of whether the field is empty or not. This may be
  3875. // used to include empty fields in Patch requests.
  3876. ForceSendFields []string `json:"-"`
  3877. // NullFields is a list of field names (e.g. "Alternatives") to include
  3878. // in API requests with the JSON null value. By default, fields with
  3879. // empty values are omitted from API requests. However, any field with
  3880. // an empty value appearing in NullFields will be sent to the server as
  3881. // null. It is an error if a field in this list has a non-empty value.
  3882. // This may be used to include null fields in Patch requests.
  3883. NullFields []string `json:"-"`
  3884. }
  3885. func (s *GoogleCloudVideointelligenceV1p2beta1SpeechTranscription) MarshalJSON() ([]byte, error) {
  3886. type NoMethod GoogleCloudVideointelligenceV1p2beta1SpeechTranscription
  3887. raw := NoMethod(*s)
  3888. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3889. }
  3890. // GoogleCloudVideointelligenceV1p2beta1TextAnnotation: Annotations
  3891. // related to one detected OCR text snippet. This will contain
  3892. // the
  3893. // corresponding text, confidence value, and frame level information for
  3894. // each
  3895. // detection.
  3896. type GoogleCloudVideointelligenceV1p2beta1TextAnnotation struct {
  3897. // Segments: All video segments where OCR detected text appears.
  3898. Segments []*GoogleCloudVideointelligenceV1p2beta1TextSegment `json:"segments,omitempty"`
  3899. // Text: The detected text.
  3900. Text string `json:"text,omitempty"`
  3901. // ForceSendFields is a list of field names (e.g. "Segments") to
  3902. // unconditionally include in API requests. By default, fields with
  3903. // empty values are omitted from API requests. However, any non-pointer,
  3904. // non-interface field appearing in ForceSendFields will be sent to the
  3905. // server regardless of whether the field is empty or not. This may be
  3906. // used to include empty fields in Patch requests.
  3907. ForceSendFields []string `json:"-"`
  3908. // NullFields is a list of field names (e.g. "Segments") to include in
  3909. // API requests with the JSON null value. By default, fields with empty
  3910. // values are omitted from API requests. However, any field with an
  3911. // empty value appearing in NullFields will be sent to the server as
  3912. // null. It is an error if a field in this list has a non-empty value.
  3913. // This may be used to include null fields in Patch requests.
  3914. NullFields []string `json:"-"`
  3915. }
  3916. func (s *GoogleCloudVideointelligenceV1p2beta1TextAnnotation) MarshalJSON() ([]byte, error) {
  3917. type NoMethod GoogleCloudVideointelligenceV1p2beta1TextAnnotation
  3918. raw := NoMethod(*s)
  3919. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3920. }
  3921. // GoogleCloudVideointelligenceV1p2beta1TextFrame: Video frame level
  3922. // annotation results for text annotation (OCR).
  3923. // Contains information regarding timestamp and bounding box locations
  3924. // for the
  3925. // frames containing detected OCR text snippets.
  3926. type GoogleCloudVideointelligenceV1p2beta1TextFrame struct {
  3927. // RotatedBoundingBox: Bounding polygon of the detected text for this
  3928. // frame.
  3929. RotatedBoundingBox *GoogleCloudVideointelligenceV1p2beta1NormalizedBoundingPoly `json:"rotatedBoundingBox,omitempty"`
  3930. // TimeOffset: Timestamp of this frame.
  3931. TimeOffset string `json:"timeOffset,omitempty"`
  3932. // ForceSendFields is a list of field names (e.g. "RotatedBoundingBox")
  3933. // to unconditionally include in API requests. By default, fields with
  3934. // empty values are omitted from API requests. However, any non-pointer,
  3935. // non-interface field appearing in ForceSendFields will be sent to the
  3936. // server regardless of whether the field is empty or not. This may be
  3937. // used to include empty fields in Patch requests.
  3938. ForceSendFields []string `json:"-"`
  3939. // NullFields is a list of field names (e.g. "RotatedBoundingBox") to
  3940. // include in API requests with the JSON null value. By default, fields
  3941. // with empty values are omitted from API requests. However, any field
  3942. // with an empty value appearing in NullFields will be sent to the
  3943. // server as null. It is an error if a field in this list has a
  3944. // non-empty value. This may be used to include null fields in Patch
  3945. // requests.
  3946. NullFields []string `json:"-"`
  3947. }
  3948. func (s *GoogleCloudVideointelligenceV1p2beta1TextFrame) MarshalJSON() ([]byte, error) {
  3949. type NoMethod GoogleCloudVideointelligenceV1p2beta1TextFrame
  3950. raw := NoMethod(*s)
  3951. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3952. }
  3953. // GoogleCloudVideointelligenceV1p2beta1TextSegment: Video segment level
  3954. // annotation results for text detection.
  3955. type GoogleCloudVideointelligenceV1p2beta1TextSegment struct {
  3956. // Confidence: Confidence for the track of detected text. It is
  3957. // calculated as the highest
  3958. // over all frames where OCR detected text appears.
  3959. Confidence float64 `json:"confidence,omitempty"`
  3960. // Frames: Information related to the frames where OCR detected text
  3961. // appears.
  3962. Frames []*GoogleCloudVideointelligenceV1p2beta1TextFrame `json:"frames,omitempty"`
  3963. // Segment: Video segment where a text snippet was detected.
  3964. Segment *GoogleCloudVideointelligenceV1p2beta1VideoSegment `json:"segment,omitempty"`
  3965. // ForceSendFields is a list of field names (e.g. "Confidence") to
  3966. // unconditionally include in API requests. By default, fields with
  3967. // empty values are omitted from API requests. However, any non-pointer,
  3968. // non-interface field appearing in ForceSendFields will be sent to the
  3969. // server regardless of whether the field is empty or not. This may be
  3970. // used to include empty fields in Patch requests.
  3971. ForceSendFields []string `json:"-"`
  3972. // NullFields is a list of field names (e.g. "Confidence") to include in
  3973. // API requests with the JSON null value. By default, fields with empty
  3974. // values are omitted from API requests. However, any field with an
  3975. // empty value appearing in NullFields will be sent to the server as
  3976. // null. It is an error if a field in this list has a non-empty value.
  3977. // This may be used to include null fields in Patch requests.
  3978. NullFields []string `json:"-"`
  3979. }
  3980. func (s *GoogleCloudVideointelligenceV1p2beta1TextSegment) MarshalJSON() ([]byte, error) {
  3981. type NoMethod GoogleCloudVideointelligenceV1p2beta1TextSegment
  3982. raw := NoMethod(*s)
  3983. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3984. }
  3985. func (s *GoogleCloudVideointelligenceV1p2beta1TextSegment) UnmarshalJSON(data []byte) error {
  3986. type NoMethod GoogleCloudVideointelligenceV1p2beta1TextSegment
  3987. var s1 struct {
  3988. Confidence gensupport.JSONFloat64 `json:"confidence"`
  3989. *NoMethod
  3990. }
  3991. s1.NoMethod = (*NoMethod)(s)
  3992. if err := json.Unmarshal(data, &s1); err != nil {
  3993. return err
  3994. }
  3995. s.Confidence = float64(s1.Confidence)
  3996. return nil
  3997. }
  3998. // GoogleCloudVideointelligenceV1p2beta1VideoAnnotationProgress:
  3999. // Annotation progress for a single video.
  4000. type GoogleCloudVideointelligenceV1p2beta1VideoAnnotationProgress struct {
  4001. // InputUri: Video file location in
  4002. // [Google Cloud Storage](https://cloud.google.com/storage/).
  4003. InputUri string `json:"inputUri,omitempty"`
  4004. // ProgressPercent: Approximate percentage processed thus far.
  4005. // Guaranteed to be
  4006. // 100 when fully processed.
  4007. ProgressPercent int64 `json:"progressPercent,omitempty"`
  4008. // StartTime: Time when the request was received.
  4009. StartTime string `json:"startTime,omitempty"`
  4010. // UpdateTime: Time of the most recent update.
  4011. UpdateTime string `json:"updateTime,omitempty"`
  4012. // ForceSendFields is a list of field names (e.g. "InputUri") to
  4013. // unconditionally include in API requests. By default, fields with
  4014. // empty values are omitted from API requests. However, any non-pointer,
  4015. // non-interface field appearing in ForceSendFields will be sent to the
  4016. // server regardless of whether the field is empty or not. This may be
  4017. // used to include empty fields in Patch requests.
  4018. ForceSendFields []string `json:"-"`
  4019. // NullFields is a list of field names (e.g. "InputUri") to include in
  4020. // API requests with the JSON null value. By default, fields with empty
  4021. // values are omitted from API requests. However, any field with an
  4022. // empty value appearing in NullFields will be sent to the server as
  4023. // null. It is an error if a field in this list has a non-empty value.
  4024. // This may be used to include null fields in Patch requests.
  4025. NullFields []string `json:"-"`
  4026. }
  4027. func (s *GoogleCloudVideointelligenceV1p2beta1VideoAnnotationProgress) MarshalJSON() ([]byte, error) {
  4028. type NoMethod GoogleCloudVideointelligenceV1p2beta1VideoAnnotationProgress
  4029. raw := NoMethod(*s)
  4030. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4031. }
  4032. // GoogleCloudVideointelligenceV1p2beta1VideoAnnotationResults:
  4033. // Annotation results for a single video.
  4034. type GoogleCloudVideointelligenceV1p2beta1VideoAnnotationResults struct {
  4035. // Error: If set, indicates an error. Note that for a single
  4036. // `AnnotateVideoRequest`
  4037. // some videos may succeed and some may fail.
  4038. Error *GoogleRpcStatus `json:"error,omitempty"`
  4039. // ExplicitAnnotation: Explicit content annotation.
  4040. ExplicitAnnotation *GoogleCloudVideointelligenceV1p2beta1ExplicitContentAnnotation `json:"explicitAnnotation,omitempty"`
  4041. // FrameLabelAnnotations: Label annotations on frame level.
  4042. // There is exactly one element for each unique label.
  4043. FrameLabelAnnotations []*GoogleCloudVideointelligenceV1p2beta1LabelAnnotation `json:"frameLabelAnnotations,omitempty"`
  4044. // InputUri: Video file location in
  4045. // [Google Cloud Storage](https://cloud.google.com/storage/).
  4046. InputUri string `json:"inputUri,omitempty"`
  4047. // ObjectAnnotations: Annotations for list of objects detected and
  4048. // tracked in video.
  4049. ObjectAnnotations []*GoogleCloudVideointelligenceV1p2beta1ObjectTrackingAnnotation `json:"objectAnnotations,omitempty"`
  4050. // SegmentLabelAnnotations: Label annotations on video level or user
  4051. // specified segment level.
  4052. // There is exactly one element for each unique label.
  4053. SegmentLabelAnnotations []*GoogleCloudVideointelligenceV1p2beta1LabelAnnotation `json:"segmentLabelAnnotations,omitempty"`
  4054. // ShotAnnotations: Shot annotations. Each shot is represented as a
  4055. // video segment.
  4056. ShotAnnotations []*GoogleCloudVideointelligenceV1p2beta1VideoSegment `json:"shotAnnotations,omitempty"`
  4057. // ShotLabelAnnotations: Label annotations on shot level.
  4058. // There is exactly one element for each unique label.
  4059. ShotLabelAnnotations []*GoogleCloudVideointelligenceV1p2beta1LabelAnnotation `json:"shotLabelAnnotations,omitempty"`
  4060. // SpeechTranscriptions: Speech transcription.
  4061. SpeechTranscriptions []*GoogleCloudVideointelligenceV1p2beta1SpeechTranscription `json:"speechTranscriptions,omitempty"`
  4062. // TextAnnotations: OCR text detection and tracking.
  4063. // Annotations for list of detected text snippets. Each will have list
  4064. // of
  4065. // frame information associated with it.
  4066. TextAnnotations []*GoogleCloudVideointelligenceV1p2beta1TextAnnotation `json:"textAnnotations,omitempty"`
  4067. // ForceSendFields is a list of field names (e.g. "Error") to
  4068. // unconditionally include in API requests. By default, fields with
  4069. // empty values are omitted from API requests. However, any non-pointer,
  4070. // non-interface field appearing in ForceSendFields will be sent to the
  4071. // server regardless of whether the field is empty or not. This may be
  4072. // used to include empty fields in Patch requests.
  4073. ForceSendFields []string `json:"-"`
  4074. // NullFields is a list of field names (e.g. "Error") to include in API
  4075. // requests with the JSON null value. By default, fields with empty
  4076. // values are omitted from API requests. However, any field with an
  4077. // empty value appearing in NullFields will be sent to the server as
  4078. // null. It is an error if a field in this list has a non-empty value.
  4079. // This may be used to include null fields in Patch requests.
  4080. NullFields []string `json:"-"`
  4081. }
  4082. func (s *GoogleCloudVideointelligenceV1p2beta1VideoAnnotationResults) MarshalJSON() ([]byte, error) {
  4083. type NoMethod GoogleCloudVideointelligenceV1p2beta1VideoAnnotationResults
  4084. raw := NoMethod(*s)
  4085. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4086. }
  4087. // GoogleCloudVideointelligenceV1p2beta1VideoSegment: Video segment.
  4088. type GoogleCloudVideointelligenceV1p2beta1VideoSegment struct {
  4089. // EndTimeOffset: Time-offset, relative to the beginning of the
  4090. // video,
  4091. // corresponding to the end of the segment (inclusive).
  4092. EndTimeOffset string `json:"endTimeOffset,omitempty"`
  4093. // StartTimeOffset: Time-offset, relative to the beginning of the
  4094. // video,
  4095. // corresponding to the start of the segment (inclusive).
  4096. StartTimeOffset string `json:"startTimeOffset,omitempty"`
  4097. // ForceSendFields is a list of field names (e.g. "EndTimeOffset") to
  4098. // unconditionally include in API requests. By default, fields with
  4099. // empty values are omitted from API requests. However, any non-pointer,
  4100. // non-interface field appearing in ForceSendFields will be sent to the
  4101. // server regardless of whether the field is empty or not. This may be
  4102. // used to include empty fields in Patch requests.
  4103. ForceSendFields []string `json:"-"`
  4104. // NullFields is a list of field names (e.g. "EndTimeOffset") to include
  4105. // in API requests with the JSON null value. By default, fields with
  4106. // empty values are omitted from API requests. However, any field with
  4107. // an empty value appearing in NullFields will be sent to the server as
  4108. // null. It is an error if a field in this list has a non-empty value.
  4109. // This may be used to include null fields in Patch requests.
  4110. NullFields []string `json:"-"`
  4111. }
  4112. func (s *GoogleCloudVideointelligenceV1p2beta1VideoSegment) MarshalJSON() ([]byte, error) {
  4113. type NoMethod GoogleCloudVideointelligenceV1p2beta1VideoSegment
  4114. raw := NoMethod(*s)
  4115. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4116. }
  4117. // GoogleCloudVideointelligenceV1p2beta1WordInfo: Word-specific
  4118. // information for recognized words. Word information is only
  4119. // included in the response when certain request parameters are set,
  4120. // such
  4121. // as `enable_word_time_offsets`.
  4122. type GoogleCloudVideointelligenceV1p2beta1WordInfo struct {
  4123. // Confidence: Output only. The confidence estimate between 0.0 and 1.0.
  4124. // A higher number
  4125. // indicates an estimated greater likelihood that the recognized words
  4126. // are
  4127. // correct. This field is set only for the top alternative.
  4128. // This field is not guaranteed to be accurate and users should not rely
  4129. // on it
  4130. // to be always provided.
  4131. // The default of 0.0 is a sentinel value indicating `confidence` was
  4132. // not set.
  4133. Confidence float64 `json:"confidence,omitempty"`
  4134. // EndTime: Time offset relative to the beginning of the audio,
  4135. // and
  4136. // corresponding to the end of the spoken word. This field is only set
  4137. // if
  4138. // `enable_word_time_offsets=true` and only in the top hypothesis. This
  4139. // is an
  4140. // experimental feature and the accuracy of the time offset can vary.
  4141. EndTime string `json:"endTime,omitempty"`
  4142. // SpeakerTag: Output only. A distinct integer value is assigned for
  4143. // every speaker within
  4144. // the audio. This field specifies which one of those speakers was
  4145. // detected to
  4146. // have spoken this word. Value ranges from 1 up to
  4147. // diarization_speaker_count,
  4148. // and is only set if speaker diarization is enabled.
  4149. SpeakerTag int64 `json:"speakerTag,omitempty"`
  4150. // StartTime: Time offset relative to the beginning of the audio,
  4151. // and
  4152. // corresponding to the start of the spoken word. This field is only set
  4153. // if
  4154. // `enable_word_time_offsets=true` and only in the top hypothesis. This
  4155. // is an
  4156. // experimental feature and the accuracy of the time offset can vary.
  4157. StartTime string `json:"startTime,omitempty"`
  4158. // Word: The word corresponding to this set of information.
  4159. Word string `json:"word,omitempty"`
  4160. // ForceSendFields is a list of field names (e.g. "Confidence") to
  4161. // unconditionally include in API requests. By default, fields with
  4162. // empty values are omitted from API requests. However, any non-pointer,
  4163. // non-interface field appearing in ForceSendFields will be sent to the
  4164. // server regardless of whether the field is empty or not. This may be
  4165. // used to include empty fields in Patch requests.
  4166. ForceSendFields []string `json:"-"`
  4167. // NullFields is a list of field names (e.g. "Confidence") to include in
  4168. // API requests with the JSON null value. By default, fields with empty
  4169. // values are omitted from API requests. However, any field with an
  4170. // empty value appearing in NullFields will be sent to the server as
  4171. // null. It is an error if a field in this list has a non-empty value.
  4172. // This may be used to include null fields in Patch requests.
  4173. NullFields []string `json:"-"`
  4174. }
  4175. func (s *GoogleCloudVideointelligenceV1p2beta1WordInfo) MarshalJSON() ([]byte, error) {
  4176. type NoMethod GoogleCloudVideointelligenceV1p2beta1WordInfo
  4177. raw := NoMethod(*s)
  4178. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4179. }
  4180. func (s *GoogleCloudVideointelligenceV1p2beta1WordInfo) UnmarshalJSON(data []byte) error {
  4181. type NoMethod GoogleCloudVideointelligenceV1p2beta1WordInfo
  4182. var s1 struct {
  4183. Confidence gensupport.JSONFloat64 `json:"confidence"`
  4184. *NoMethod
  4185. }
  4186. s1.NoMethod = (*NoMethod)(s)
  4187. if err := json.Unmarshal(data, &s1); err != nil {
  4188. return err
  4189. }
  4190. s.Confidence = float64(s1.Confidence)
  4191. return nil
  4192. }
  4193. // GoogleCloudVideointelligenceV1p3beta1AnnotateVideoProgress: Video
  4194. // annotation progress. Included in the `metadata`
  4195. // field of the `Operation` returned by the `GetOperation`
  4196. // call of the `google::longrunning::Operations` service.
  4197. type GoogleCloudVideointelligenceV1p3beta1AnnotateVideoProgress struct {
  4198. // AnnotationProgress: Progress metadata for all videos specified in
  4199. // `AnnotateVideoRequest`.
  4200. AnnotationProgress []*GoogleCloudVideointelligenceV1p3beta1VideoAnnotationProgress `json:"annotationProgress,omitempty"`
  4201. // ForceSendFields is a list of field names (e.g. "AnnotationProgress")
  4202. // to unconditionally include in API requests. By default, fields with
  4203. // empty values are omitted from API requests. However, any non-pointer,
  4204. // non-interface field appearing in ForceSendFields will be sent to the
  4205. // server regardless of whether the field is empty or not. This may be
  4206. // used to include empty fields in Patch requests.
  4207. ForceSendFields []string `json:"-"`
  4208. // NullFields is a list of field names (e.g. "AnnotationProgress") to
  4209. // include in API requests with the JSON null value. By default, fields
  4210. // with empty values are omitted from API requests. However, any field
  4211. // with an empty value appearing in NullFields will be sent to the
  4212. // server as null. It is an error if a field in this list has a
  4213. // non-empty value. This may be used to include null fields in Patch
  4214. // requests.
  4215. NullFields []string `json:"-"`
  4216. }
  4217. func (s *GoogleCloudVideointelligenceV1p3beta1AnnotateVideoProgress) MarshalJSON() ([]byte, error) {
  4218. type NoMethod GoogleCloudVideointelligenceV1p3beta1AnnotateVideoProgress
  4219. raw := NoMethod(*s)
  4220. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4221. }
  4222. // GoogleCloudVideointelligenceV1p3beta1AnnotateVideoResponse: Video
  4223. // annotation response. Included in the `response`
  4224. // field of the `Operation` returned by the `GetOperation`
  4225. // call of the `google::longrunning::Operations` service.
  4226. type GoogleCloudVideointelligenceV1p3beta1AnnotateVideoResponse struct {
  4227. // AnnotationResults: Annotation results for all videos specified in
  4228. // `AnnotateVideoRequest`.
  4229. AnnotationResults []*GoogleCloudVideointelligenceV1p3beta1VideoAnnotationResults `json:"annotationResults,omitempty"`
  4230. // ForceSendFields is a list of field names (e.g. "AnnotationResults")
  4231. // to unconditionally include in API requests. By default, fields with
  4232. // empty values are omitted from API requests. However, any non-pointer,
  4233. // non-interface field appearing in ForceSendFields will be sent to the
  4234. // server regardless of whether the field is empty or not. This may be
  4235. // used to include empty fields in Patch requests.
  4236. ForceSendFields []string `json:"-"`
  4237. // NullFields is a list of field names (e.g. "AnnotationResults") to
  4238. // include in API requests with the JSON null value. By default, fields
  4239. // with empty values are omitted from API requests. However, any field
  4240. // with an empty value appearing in NullFields will be sent to the
  4241. // server as null. It is an error if a field in this list has a
  4242. // non-empty value. This may be used to include null fields in Patch
  4243. // requests.
  4244. NullFields []string `json:"-"`
  4245. }
  4246. func (s *GoogleCloudVideointelligenceV1p3beta1AnnotateVideoResponse) MarshalJSON() ([]byte, error) {
  4247. type NoMethod GoogleCloudVideointelligenceV1p3beta1AnnotateVideoResponse
  4248. raw := NoMethod(*s)
  4249. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4250. }
  4251. // GoogleCloudVideointelligenceV1p3beta1Entity: Detected entity from
  4252. // video analysis.
  4253. type GoogleCloudVideointelligenceV1p3beta1Entity struct {
  4254. // Description: Textual description, e.g. `Fixed-gear bicycle`.
  4255. Description string `json:"description,omitempty"`
  4256. // EntityId: Opaque entity ID. Some IDs may be available in
  4257. // [Google Knowledge Graph
  4258. // Search
  4259. // API](https://developers.google.com/knowledge-graph/).
  4260. EntityId string `json:"entityId,omitempty"`
  4261. // LanguageCode: Language code for `description` in BCP-47 format.
  4262. LanguageCode string `json:"languageCode,omitempty"`
  4263. // ForceSendFields is a list of field names (e.g. "Description") to
  4264. // unconditionally include in API requests. By default, fields with
  4265. // empty values are omitted from API requests. However, any non-pointer,
  4266. // non-interface field appearing in ForceSendFields will be sent to the
  4267. // server regardless of whether the field is empty or not. This may be
  4268. // used to include empty fields in Patch requests.
  4269. ForceSendFields []string `json:"-"`
  4270. // NullFields is a list of field names (e.g. "Description") to include
  4271. // in API requests with the JSON null value. By default, fields with
  4272. // empty values are omitted from API requests. However, any field with
  4273. // an empty value appearing in NullFields will be sent to the server as
  4274. // null. It is an error if a field in this list has a non-empty value.
  4275. // This may be used to include null fields in Patch requests.
  4276. NullFields []string `json:"-"`
  4277. }
  4278. func (s *GoogleCloudVideointelligenceV1p3beta1Entity) MarshalJSON() ([]byte, error) {
  4279. type NoMethod GoogleCloudVideointelligenceV1p3beta1Entity
  4280. raw := NoMethod(*s)
  4281. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4282. }
  4283. // GoogleCloudVideointelligenceV1p3beta1ExplicitContentAnnotation:
  4284. // Explicit content annotation (based on per-frame visual signals
  4285. // only).
  4286. // If no explicit content has been detected in a frame, no annotations
  4287. // are
  4288. // present for that frame.
  4289. type GoogleCloudVideointelligenceV1p3beta1ExplicitContentAnnotation struct {
  4290. // Frames: All video frames where explicit content was detected.
  4291. Frames []*GoogleCloudVideointelligenceV1p3beta1ExplicitContentFrame `json:"frames,omitempty"`
  4292. // ForceSendFields is a list of field names (e.g. "Frames") to
  4293. // unconditionally include in API requests. By default, fields with
  4294. // empty values are omitted from API requests. However, any non-pointer,
  4295. // non-interface field appearing in ForceSendFields will be sent to the
  4296. // server regardless of whether the field is empty or not. This may be
  4297. // used to include empty fields in Patch requests.
  4298. ForceSendFields []string `json:"-"`
  4299. // NullFields is a list of field names (e.g. "Frames") to include in API
  4300. // requests with the JSON null value. By default, fields with empty
  4301. // values are omitted from API requests. However, any field with an
  4302. // empty value appearing in NullFields will be sent to the server as
  4303. // null. It is an error if a field in this list has a non-empty value.
  4304. // This may be used to include null fields in Patch requests.
  4305. NullFields []string `json:"-"`
  4306. }
  4307. func (s *GoogleCloudVideointelligenceV1p3beta1ExplicitContentAnnotation) MarshalJSON() ([]byte, error) {
  4308. type NoMethod GoogleCloudVideointelligenceV1p3beta1ExplicitContentAnnotation
  4309. raw := NoMethod(*s)
  4310. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4311. }
  4312. // GoogleCloudVideointelligenceV1p3beta1ExplicitContentFrame: Video
  4313. // frame level annotation results for explicit content.
  4314. type GoogleCloudVideointelligenceV1p3beta1ExplicitContentFrame struct {
  4315. // PornographyLikelihood: Likelihood of the pornography content..
  4316. //
  4317. // Possible values:
  4318. // "LIKELIHOOD_UNSPECIFIED" - Unspecified likelihood.
  4319. // "VERY_UNLIKELY" - Very unlikely.
  4320. // "UNLIKELY" - Unlikely.
  4321. // "POSSIBLE" - Possible.
  4322. // "LIKELY" - Likely.
  4323. // "VERY_LIKELY" - Very likely.
  4324. PornographyLikelihood string `json:"pornographyLikelihood,omitempty"`
  4325. // TimeOffset: Time-offset, relative to the beginning of the video,
  4326. // corresponding to the
  4327. // video frame for this location.
  4328. TimeOffset string `json:"timeOffset,omitempty"`
  4329. // ForceSendFields is a list of field names (e.g.
  4330. // "PornographyLikelihood") to unconditionally include in API requests.
  4331. // By default, fields with empty values are omitted from API requests.
  4332. // However, any non-pointer, non-interface field appearing in
  4333. // ForceSendFields will be sent to the server regardless of whether the
  4334. // field is empty or not. This may be used to include empty fields in
  4335. // Patch requests.
  4336. ForceSendFields []string `json:"-"`
  4337. // NullFields is a list of field names (e.g. "PornographyLikelihood") to
  4338. // include in API requests with the JSON null value. By default, fields
  4339. // with empty values are omitted from API requests. However, any field
  4340. // with an empty value appearing in NullFields will be sent to the
  4341. // server as null. It is an error if a field in this list has a
  4342. // non-empty value. This may be used to include null fields in Patch
  4343. // requests.
  4344. NullFields []string `json:"-"`
  4345. }
  4346. func (s *GoogleCloudVideointelligenceV1p3beta1ExplicitContentFrame) MarshalJSON() ([]byte, error) {
  4347. type NoMethod GoogleCloudVideointelligenceV1p3beta1ExplicitContentFrame
  4348. raw := NoMethod(*s)
  4349. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4350. }
  4351. // GoogleCloudVideointelligenceV1p3beta1LabelAnnotation: Label
  4352. // annotation.
  4353. type GoogleCloudVideointelligenceV1p3beta1LabelAnnotation struct {
  4354. // CategoryEntities: Common categories for the detected entity.
  4355. // E.g. when the label is `Terrier` the category is likely `dog`. And in
  4356. // some
  4357. // cases there might be more than one categories e.g. `Terrier` could
  4358. // also be
  4359. // a `pet`.
  4360. CategoryEntities []*GoogleCloudVideointelligenceV1p3beta1Entity `json:"categoryEntities,omitempty"`
  4361. // Entity: Detected entity.
  4362. Entity *GoogleCloudVideointelligenceV1p3beta1Entity `json:"entity,omitempty"`
  4363. // Frames: All video frames where a label was detected.
  4364. Frames []*GoogleCloudVideointelligenceV1p3beta1LabelFrame `json:"frames,omitempty"`
  4365. // Segments: All video segments where a label was detected.
  4366. Segments []*GoogleCloudVideointelligenceV1p3beta1LabelSegment `json:"segments,omitempty"`
  4367. // ForceSendFields is a list of field names (e.g. "CategoryEntities") to
  4368. // unconditionally include in API requests. By default, fields with
  4369. // empty values are omitted from API requests. However, any non-pointer,
  4370. // non-interface field appearing in ForceSendFields will be sent to the
  4371. // server regardless of whether the field is empty or not. This may be
  4372. // used to include empty fields in Patch requests.
  4373. ForceSendFields []string `json:"-"`
  4374. // NullFields is a list of field names (e.g. "CategoryEntities") to
  4375. // include in API requests with the JSON null value. By default, fields
  4376. // with empty values are omitted from API requests. However, any field
  4377. // with an empty value appearing in NullFields will be sent to the
  4378. // server as null. It is an error if a field in this list has a
  4379. // non-empty value. This may be used to include null fields in Patch
  4380. // requests.
  4381. NullFields []string `json:"-"`
  4382. }
  4383. func (s *GoogleCloudVideointelligenceV1p3beta1LabelAnnotation) MarshalJSON() ([]byte, error) {
  4384. type NoMethod GoogleCloudVideointelligenceV1p3beta1LabelAnnotation
  4385. raw := NoMethod(*s)
  4386. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4387. }
  4388. // GoogleCloudVideointelligenceV1p3beta1LabelFrame: Video frame level
  4389. // annotation results for label detection.
  4390. type GoogleCloudVideointelligenceV1p3beta1LabelFrame struct {
  4391. // Confidence: Confidence that the label is accurate. Range: [0, 1].
  4392. Confidence float64 `json:"confidence,omitempty"`
  4393. // TimeOffset: Time-offset, relative to the beginning of the video,
  4394. // corresponding to the
  4395. // video frame for this location.
  4396. TimeOffset string `json:"timeOffset,omitempty"`
  4397. // ForceSendFields is a list of field names (e.g. "Confidence") to
  4398. // unconditionally include in API requests. By default, fields with
  4399. // empty values are omitted from API requests. However, any non-pointer,
  4400. // non-interface field appearing in ForceSendFields will be sent to the
  4401. // server regardless of whether the field is empty or not. This may be
  4402. // used to include empty fields in Patch requests.
  4403. ForceSendFields []string `json:"-"`
  4404. // NullFields is a list of field names (e.g. "Confidence") to include in
  4405. // API requests with the JSON null value. By default, fields with empty
  4406. // values are omitted from API requests. However, any field with an
  4407. // empty value appearing in NullFields will be sent to the server as
  4408. // null. It is an error if a field in this list has a non-empty value.
  4409. // This may be used to include null fields in Patch requests.
  4410. NullFields []string `json:"-"`
  4411. }
  4412. func (s *GoogleCloudVideointelligenceV1p3beta1LabelFrame) MarshalJSON() ([]byte, error) {
  4413. type NoMethod GoogleCloudVideointelligenceV1p3beta1LabelFrame
  4414. raw := NoMethod(*s)
  4415. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4416. }
  4417. func (s *GoogleCloudVideointelligenceV1p3beta1LabelFrame) UnmarshalJSON(data []byte) error {
  4418. type NoMethod GoogleCloudVideointelligenceV1p3beta1LabelFrame
  4419. var s1 struct {
  4420. Confidence gensupport.JSONFloat64 `json:"confidence"`
  4421. *NoMethod
  4422. }
  4423. s1.NoMethod = (*NoMethod)(s)
  4424. if err := json.Unmarshal(data, &s1); err != nil {
  4425. return err
  4426. }
  4427. s.Confidence = float64(s1.Confidence)
  4428. return nil
  4429. }
  4430. // GoogleCloudVideointelligenceV1p3beta1LabelSegment: Video segment
  4431. // level annotation results for label detection.
  4432. type GoogleCloudVideointelligenceV1p3beta1LabelSegment struct {
  4433. // Confidence: Confidence that the label is accurate. Range: [0, 1].
  4434. Confidence float64 `json:"confidence,omitempty"`
  4435. // Segment: Video segment where a label was detected.
  4436. Segment *GoogleCloudVideointelligenceV1p3beta1VideoSegment `json:"segment,omitempty"`
  4437. // ForceSendFields is a list of field names (e.g. "Confidence") to
  4438. // unconditionally include in API requests. By default, fields with
  4439. // empty values are omitted from API requests. However, any non-pointer,
  4440. // non-interface field appearing in ForceSendFields will be sent to the
  4441. // server regardless of whether the field is empty or not. This may be
  4442. // used to include empty fields in Patch requests.
  4443. ForceSendFields []string `json:"-"`
  4444. // NullFields is a list of field names (e.g. "Confidence") to include in
  4445. // API requests with the JSON null value. By default, fields with empty
  4446. // values are omitted from API requests. However, any field with an
  4447. // empty value appearing in NullFields will be sent to the server as
  4448. // null. It is an error if a field in this list has a non-empty value.
  4449. // This may be used to include null fields in Patch requests.
  4450. NullFields []string `json:"-"`
  4451. }
  4452. func (s *GoogleCloudVideointelligenceV1p3beta1LabelSegment) MarshalJSON() ([]byte, error) {
  4453. type NoMethod GoogleCloudVideointelligenceV1p3beta1LabelSegment
  4454. raw := NoMethod(*s)
  4455. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4456. }
  4457. func (s *GoogleCloudVideointelligenceV1p3beta1LabelSegment) UnmarshalJSON(data []byte) error {
  4458. type NoMethod GoogleCloudVideointelligenceV1p3beta1LabelSegment
  4459. var s1 struct {
  4460. Confidence gensupport.JSONFloat64 `json:"confidence"`
  4461. *NoMethod
  4462. }
  4463. s1.NoMethod = (*NoMethod)(s)
  4464. if err := json.Unmarshal(data, &s1); err != nil {
  4465. return err
  4466. }
  4467. s.Confidence = float64(s1.Confidence)
  4468. return nil
  4469. }
  4470. // GoogleCloudVideointelligenceV1p3beta1NormalizedBoundingBox:
  4471. // Normalized bounding box.
  4472. // The normalized vertex coordinates are relative to the original
  4473. // image.
  4474. // Range: [0, 1].
  4475. type GoogleCloudVideointelligenceV1p3beta1NormalizedBoundingBox struct {
  4476. // Bottom: Bottom Y coordinate.
  4477. Bottom float64 `json:"bottom,omitempty"`
  4478. // Left: Left X coordinate.
  4479. Left float64 `json:"left,omitempty"`
  4480. // Right: Right X coordinate.
  4481. Right float64 `json:"right,omitempty"`
  4482. // Top: Top Y coordinate.
  4483. Top float64 `json:"top,omitempty"`
  4484. // ForceSendFields is a list of field names (e.g. "Bottom") to
  4485. // unconditionally include in API requests. By default, fields with
  4486. // empty values are omitted from API requests. However, any non-pointer,
  4487. // non-interface field appearing in ForceSendFields will be sent to the
  4488. // server regardless of whether the field is empty or not. This may be
  4489. // used to include empty fields in Patch requests.
  4490. ForceSendFields []string `json:"-"`
  4491. // NullFields is a list of field names (e.g. "Bottom") to include in API
  4492. // requests with the JSON null value. By default, fields with empty
  4493. // values are omitted from API requests. However, any field with an
  4494. // empty value appearing in NullFields will be sent to the server as
  4495. // null. It is an error if a field in this list has a non-empty value.
  4496. // This may be used to include null fields in Patch requests.
  4497. NullFields []string `json:"-"`
  4498. }
  4499. func (s *GoogleCloudVideointelligenceV1p3beta1NormalizedBoundingBox) MarshalJSON() ([]byte, error) {
  4500. type NoMethod GoogleCloudVideointelligenceV1p3beta1NormalizedBoundingBox
  4501. raw := NoMethod(*s)
  4502. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4503. }
  4504. func (s *GoogleCloudVideointelligenceV1p3beta1NormalizedBoundingBox) UnmarshalJSON(data []byte) error {
  4505. type NoMethod GoogleCloudVideointelligenceV1p3beta1NormalizedBoundingBox
  4506. var s1 struct {
  4507. Bottom gensupport.JSONFloat64 `json:"bottom"`
  4508. Left gensupport.JSONFloat64 `json:"left"`
  4509. Right gensupport.JSONFloat64 `json:"right"`
  4510. Top gensupport.JSONFloat64 `json:"top"`
  4511. *NoMethod
  4512. }
  4513. s1.NoMethod = (*NoMethod)(s)
  4514. if err := json.Unmarshal(data, &s1); err != nil {
  4515. return err
  4516. }
  4517. s.Bottom = float64(s1.Bottom)
  4518. s.Left = float64(s1.Left)
  4519. s.Right = float64(s1.Right)
  4520. s.Top = float64(s1.Top)
  4521. return nil
  4522. }
  4523. // GoogleCloudVideointelligenceV1p3beta1NormalizedBoundingPoly:
  4524. // Normalized bounding polygon for text (that might not be aligned with
  4525. // axis).
  4526. // Contains list of the corner points in clockwise order starting
  4527. // from
  4528. // top-left corner. For example, for a rectangular bounding box:
  4529. // When the text is horizontal it might look like:
  4530. // 0----1
  4531. // | |
  4532. // 3----2
  4533. //
  4534. // When it's clockwise rotated 180 degrees around the top-left corner
  4535. // it
  4536. // becomes:
  4537. // 2----3
  4538. // | |
  4539. // 1----0
  4540. //
  4541. // and the vertex order will still be (0, 1, 2, 3). Note that values can
  4542. // be less
  4543. // than 0, or greater than 1 due to trignometric calculations for
  4544. // location of
  4545. // the box.
  4546. type GoogleCloudVideointelligenceV1p3beta1NormalizedBoundingPoly struct {
  4547. // Vertices: Normalized vertices of the bounding polygon.
  4548. Vertices []*GoogleCloudVideointelligenceV1p3beta1NormalizedVertex `json:"vertices,omitempty"`
  4549. // ForceSendFields is a list of field names (e.g. "Vertices") to
  4550. // unconditionally include in API requests. By default, fields with
  4551. // empty values are omitted from API requests. However, any non-pointer,
  4552. // non-interface field appearing in ForceSendFields will be sent to the
  4553. // server regardless of whether the field is empty or not. This may be
  4554. // used to include empty fields in Patch requests.
  4555. ForceSendFields []string `json:"-"`
  4556. // NullFields is a list of field names (e.g. "Vertices") to include in
  4557. // API requests with the JSON null value. By default, fields with empty
  4558. // values are omitted from API requests. However, any field with an
  4559. // empty value appearing in NullFields will be sent to the server as
  4560. // null. It is an error if a field in this list has a non-empty value.
  4561. // This may be used to include null fields in Patch requests.
  4562. NullFields []string `json:"-"`
  4563. }
  4564. func (s *GoogleCloudVideointelligenceV1p3beta1NormalizedBoundingPoly) MarshalJSON() ([]byte, error) {
  4565. type NoMethod GoogleCloudVideointelligenceV1p3beta1NormalizedBoundingPoly
  4566. raw := NoMethod(*s)
  4567. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4568. }
  4569. // GoogleCloudVideointelligenceV1p3beta1NormalizedVertex: A vertex
  4570. // represents a 2D point in the image.
  4571. // NOTE: the normalized vertex coordinates are relative to the original
  4572. // image
  4573. // and range from 0 to 1.
  4574. type GoogleCloudVideointelligenceV1p3beta1NormalizedVertex struct {
  4575. // X: X coordinate.
  4576. X float64 `json:"x,omitempty"`
  4577. // Y: Y coordinate.
  4578. Y float64 `json:"y,omitempty"`
  4579. // ForceSendFields is a list of field names (e.g. "X") to
  4580. // unconditionally include in API requests. By default, fields with
  4581. // empty values are omitted from API requests. However, any non-pointer,
  4582. // non-interface field appearing in ForceSendFields will be sent to the
  4583. // server regardless of whether the field is empty or not. This may be
  4584. // used to include empty fields in Patch requests.
  4585. ForceSendFields []string `json:"-"`
  4586. // NullFields is a list of field names (e.g. "X") to include in API
  4587. // requests with the JSON null value. By default, fields with empty
  4588. // values are omitted from API requests. However, any field with an
  4589. // empty value appearing in NullFields will be sent to the server as
  4590. // null. It is an error if a field in this list has a non-empty value.
  4591. // This may be used to include null fields in Patch requests.
  4592. NullFields []string `json:"-"`
  4593. }
  4594. func (s *GoogleCloudVideointelligenceV1p3beta1NormalizedVertex) MarshalJSON() ([]byte, error) {
  4595. type NoMethod GoogleCloudVideointelligenceV1p3beta1NormalizedVertex
  4596. raw := NoMethod(*s)
  4597. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4598. }
  4599. func (s *GoogleCloudVideointelligenceV1p3beta1NormalizedVertex) UnmarshalJSON(data []byte) error {
  4600. type NoMethod GoogleCloudVideointelligenceV1p3beta1NormalizedVertex
  4601. var s1 struct {
  4602. X gensupport.JSONFloat64 `json:"x"`
  4603. Y gensupport.JSONFloat64 `json:"y"`
  4604. *NoMethod
  4605. }
  4606. s1.NoMethod = (*NoMethod)(s)
  4607. if err := json.Unmarshal(data, &s1); err != nil {
  4608. return err
  4609. }
  4610. s.X = float64(s1.X)
  4611. s.Y = float64(s1.Y)
  4612. return nil
  4613. }
  4614. // GoogleCloudVideointelligenceV1p3beta1ObjectTrackingAnnotation:
  4615. // Annotations corresponding to one tracked object.
  4616. type GoogleCloudVideointelligenceV1p3beta1ObjectTrackingAnnotation struct {
  4617. // Confidence: Object category's labeling confidence of this track.
  4618. Confidence float64 `json:"confidence,omitempty"`
  4619. // Entity: Entity to specify the object category that this track is
  4620. // labeled as.
  4621. Entity *GoogleCloudVideointelligenceV1p3beta1Entity `json:"entity,omitempty"`
  4622. // Frames: Information corresponding to all frames where this object
  4623. // track appears.
  4624. // Non-streaming batch mode: it may be one or multiple
  4625. // ObjectTrackingFrame
  4626. // messages in frames.
  4627. // Streaming mode: it can only be one ObjectTrackingFrame message in
  4628. // frames.
  4629. Frames []*GoogleCloudVideointelligenceV1p3beta1ObjectTrackingFrame `json:"frames,omitempty"`
  4630. // Segment: Non-streaming batch mode ONLY.
  4631. // Each object track corresponds to one video segment where it appears.
  4632. Segment *GoogleCloudVideointelligenceV1p3beta1VideoSegment `json:"segment,omitempty"`
  4633. // TrackId: Streaming mode ONLY.
  4634. // In streaming mode, we do not know the end time of a tracked
  4635. // object
  4636. // before it is completed. Hence, there is no VideoSegment info
  4637. // returned.
  4638. // Instead, we provide a unique identifiable integer track_id so
  4639. // that
  4640. // the customers can correlate the results of the
  4641. // ongoing
  4642. // ObjectTrackAnnotation of the same track_id over time.
  4643. TrackId int64 `json:"trackId,omitempty,string"`
  4644. // ForceSendFields is a list of field names (e.g. "Confidence") to
  4645. // unconditionally include in API requests. By default, fields with
  4646. // empty values are omitted from API requests. However, any non-pointer,
  4647. // non-interface field appearing in ForceSendFields will be sent to the
  4648. // server regardless of whether the field is empty or not. This may be
  4649. // used to include empty fields in Patch requests.
  4650. ForceSendFields []string `json:"-"`
  4651. // NullFields is a list of field names (e.g. "Confidence") to include in
  4652. // API requests with the JSON null value. By default, fields with empty
  4653. // values are omitted from API requests. However, any field with an
  4654. // empty value appearing in NullFields will be sent to the server as
  4655. // null. It is an error if a field in this list has a non-empty value.
  4656. // This may be used to include null fields in Patch requests.
  4657. NullFields []string `json:"-"`
  4658. }
  4659. func (s *GoogleCloudVideointelligenceV1p3beta1ObjectTrackingAnnotation) MarshalJSON() ([]byte, error) {
  4660. type NoMethod GoogleCloudVideointelligenceV1p3beta1ObjectTrackingAnnotation
  4661. raw := NoMethod(*s)
  4662. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4663. }
  4664. func (s *GoogleCloudVideointelligenceV1p3beta1ObjectTrackingAnnotation) UnmarshalJSON(data []byte) error {
  4665. type NoMethod GoogleCloudVideointelligenceV1p3beta1ObjectTrackingAnnotation
  4666. var s1 struct {
  4667. Confidence gensupport.JSONFloat64 `json:"confidence"`
  4668. *NoMethod
  4669. }
  4670. s1.NoMethod = (*NoMethod)(s)
  4671. if err := json.Unmarshal(data, &s1); err != nil {
  4672. return err
  4673. }
  4674. s.Confidence = float64(s1.Confidence)
  4675. return nil
  4676. }
  4677. // GoogleCloudVideointelligenceV1p3beta1ObjectTrackingFrame: Video frame
  4678. // level annotations for object detection and tracking. This
  4679. // field
  4680. // stores per frame location, time offset, and confidence.
  4681. type GoogleCloudVideointelligenceV1p3beta1ObjectTrackingFrame struct {
  4682. // NormalizedBoundingBox: The normalized bounding box location of this
  4683. // object track for the frame.
  4684. NormalizedBoundingBox *GoogleCloudVideointelligenceV1p3beta1NormalizedBoundingBox `json:"normalizedBoundingBox,omitempty"`
  4685. // TimeOffset: The timestamp of the frame in microseconds.
  4686. TimeOffset string `json:"timeOffset,omitempty"`
  4687. // ForceSendFields is a list of field names (e.g.
  4688. // "NormalizedBoundingBox") to unconditionally include in API requests.
  4689. // By default, fields with empty values are omitted from API requests.
  4690. // However, any non-pointer, non-interface field appearing in
  4691. // ForceSendFields will be sent to the server regardless of whether the
  4692. // field is empty or not. This may be used to include empty fields in
  4693. // Patch requests.
  4694. ForceSendFields []string `json:"-"`
  4695. // NullFields is a list of field names (e.g. "NormalizedBoundingBox") to
  4696. // include in API requests with the JSON null value. By default, fields
  4697. // with empty values are omitted from API requests. However, any field
  4698. // with an empty value appearing in NullFields will be sent to the
  4699. // server as null. It is an error if a field in this list has a
  4700. // non-empty value. This may be used to include null fields in Patch
  4701. // requests.
  4702. NullFields []string `json:"-"`
  4703. }
  4704. func (s *GoogleCloudVideointelligenceV1p3beta1ObjectTrackingFrame) MarshalJSON() ([]byte, error) {
  4705. type NoMethod GoogleCloudVideointelligenceV1p3beta1ObjectTrackingFrame
  4706. raw := NoMethod(*s)
  4707. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4708. }
  4709. // GoogleCloudVideointelligenceV1p3beta1SpeechRecognitionAlternative:
  4710. // Alternative hypotheses (a.k.a. n-best list).
  4711. type GoogleCloudVideointelligenceV1p3beta1SpeechRecognitionAlternative struct {
  4712. // Confidence: The confidence estimate between 0.0 and 1.0. A higher
  4713. // number
  4714. // indicates an estimated greater likelihood that the recognized words
  4715. // are
  4716. // correct. This field is typically provided only for the top
  4717. // hypothesis, and
  4718. // only for `is_final=true` results. Clients should not rely on
  4719. // the
  4720. // `confidence` field as it is not guaranteed to be accurate or
  4721. // consistent.
  4722. // The default of 0.0 is a sentinel value indicating `confidence` was
  4723. // not set.
  4724. Confidence float64 `json:"confidence,omitempty"`
  4725. // Transcript: Transcript text representing the words that the user
  4726. // spoke.
  4727. Transcript string `json:"transcript,omitempty"`
  4728. // Words: A list of word-specific information for each recognized word.
  4729. Words []*GoogleCloudVideointelligenceV1p3beta1WordInfo `json:"words,omitempty"`
  4730. // ForceSendFields is a list of field names (e.g. "Confidence") to
  4731. // unconditionally include in API requests. By default, fields with
  4732. // empty values are omitted from API requests. However, any non-pointer,
  4733. // non-interface field appearing in ForceSendFields will be sent to the
  4734. // server regardless of whether the field is empty or not. This may be
  4735. // used to include empty fields in Patch requests.
  4736. ForceSendFields []string `json:"-"`
  4737. // NullFields is a list of field names (e.g. "Confidence") to include in
  4738. // API requests with the JSON null value. By default, fields with empty
  4739. // values are omitted from API requests. However, any field with an
  4740. // empty value appearing in NullFields will be sent to the server as
  4741. // null. It is an error if a field in this list has a non-empty value.
  4742. // This may be used to include null fields in Patch requests.
  4743. NullFields []string `json:"-"`
  4744. }
  4745. func (s *GoogleCloudVideointelligenceV1p3beta1SpeechRecognitionAlternative) MarshalJSON() ([]byte, error) {
  4746. type NoMethod GoogleCloudVideointelligenceV1p3beta1SpeechRecognitionAlternative
  4747. raw := NoMethod(*s)
  4748. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4749. }
  4750. func (s *GoogleCloudVideointelligenceV1p3beta1SpeechRecognitionAlternative) UnmarshalJSON(data []byte) error {
  4751. type NoMethod GoogleCloudVideointelligenceV1p3beta1SpeechRecognitionAlternative
  4752. var s1 struct {
  4753. Confidence gensupport.JSONFloat64 `json:"confidence"`
  4754. *NoMethod
  4755. }
  4756. s1.NoMethod = (*NoMethod)(s)
  4757. if err := json.Unmarshal(data, &s1); err != nil {
  4758. return err
  4759. }
  4760. s.Confidence = float64(s1.Confidence)
  4761. return nil
  4762. }
  4763. // GoogleCloudVideointelligenceV1p3beta1SpeechTranscription: A speech
  4764. // recognition result corresponding to a portion of the audio.
  4765. type GoogleCloudVideointelligenceV1p3beta1SpeechTranscription struct {
  4766. // Alternatives: May contain one or more recognition hypotheses (up to
  4767. // the maximum specified
  4768. // in `max_alternatives`). These alternatives are ordered in terms
  4769. // of
  4770. // accuracy, with the top (first) alternative being the most probable,
  4771. // as
  4772. // ranked by the recognizer.
  4773. Alternatives []*GoogleCloudVideointelligenceV1p3beta1SpeechRecognitionAlternative `json:"alternatives,omitempty"`
  4774. // LanguageCode: Output only.
  4775. // The
  4776. // [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag
  4777. // of the
  4778. // language in this result. This language code was detected to have the
  4779. // most
  4780. // likelihood of being spoken in the audio.
  4781. LanguageCode string `json:"languageCode,omitempty"`
  4782. // ForceSendFields is a list of field names (e.g. "Alternatives") to
  4783. // unconditionally include in API requests. By default, fields with
  4784. // empty values are omitted from API requests. However, any non-pointer,
  4785. // non-interface field appearing in ForceSendFields will be sent to the
  4786. // server regardless of whether the field is empty or not. This may be
  4787. // used to include empty fields in Patch requests.
  4788. ForceSendFields []string `json:"-"`
  4789. // NullFields is a list of field names (e.g. "Alternatives") to include
  4790. // in API requests with the JSON null value. By default, fields with
  4791. // empty values are omitted from API requests. However, any field with
  4792. // an empty value appearing in NullFields will be sent to the server as
  4793. // null. It is an error if a field in this list has a non-empty value.
  4794. // This may be used to include null fields in Patch requests.
  4795. NullFields []string `json:"-"`
  4796. }
  4797. func (s *GoogleCloudVideointelligenceV1p3beta1SpeechTranscription) MarshalJSON() ([]byte, error) {
  4798. type NoMethod GoogleCloudVideointelligenceV1p3beta1SpeechTranscription
  4799. raw := NoMethod(*s)
  4800. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4801. }
  4802. // GoogleCloudVideointelligenceV1p3beta1StreamingAnnotateVideoResponse:
  4803. // `StreamingAnnotateVideoResponse` is the only message returned to the
  4804. // client
  4805. // by `StreamingAnnotateVideo`. A series of zero or
  4806. // more
  4807. // `StreamingAnnotateVideoResponse` messages are streamed back to the
  4808. // client.
  4809. type GoogleCloudVideointelligenceV1p3beta1StreamingAnnotateVideoResponse struct {
  4810. // AnnotationResults: Streaming annotation results.
  4811. AnnotationResults *GoogleCloudVideointelligenceV1p3beta1StreamingVideoAnnotationResults `json:"annotationResults,omitempty"`
  4812. // AnnotationResultsUri: GCS URI that stores annotation results of one
  4813. // streaming session.
  4814. // It is a directory that can hold multiple files in JSON
  4815. // format.
  4816. // Example uri
  4817. // format:
  4818. // gs://bucket_id/object_id/cloud_project_name-session_id
  4819. AnnotationResultsUri string `json:"annotationResultsUri,omitempty"`
  4820. // Error: If set, returns a google.rpc.Status message that
  4821. // specifies the error for the operation.
  4822. Error *GoogleRpcStatus `json:"error,omitempty"`
  4823. // ForceSendFields is a list of field names (e.g. "AnnotationResults")
  4824. // to unconditionally include in API requests. By default, fields with
  4825. // empty values are omitted from API requests. However, any non-pointer,
  4826. // non-interface field appearing in ForceSendFields will be sent to the
  4827. // server regardless of whether the field is empty or not. This may be
  4828. // used to include empty fields in Patch requests.
  4829. ForceSendFields []string `json:"-"`
  4830. // NullFields is a list of field names (e.g. "AnnotationResults") to
  4831. // include in API requests with the JSON null value. By default, fields
  4832. // with empty values are omitted from API requests. However, any field
  4833. // with an empty value appearing in NullFields will be sent to the
  4834. // server as null. It is an error if a field in this list has a
  4835. // non-empty value. This may be used to include null fields in Patch
  4836. // requests.
  4837. NullFields []string `json:"-"`
  4838. }
  4839. func (s *GoogleCloudVideointelligenceV1p3beta1StreamingAnnotateVideoResponse) MarshalJSON() ([]byte, error) {
  4840. type NoMethod GoogleCloudVideointelligenceV1p3beta1StreamingAnnotateVideoResponse
  4841. raw := NoMethod(*s)
  4842. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4843. }
  4844. // GoogleCloudVideointelligenceV1p3beta1StreamingVideoAnnotationResults:
  4845. // Streaming annotation results corresponding to a portion of the
  4846. // video
  4847. // that is currently being processed.
  4848. type GoogleCloudVideointelligenceV1p3beta1StreamingVideoAnnotationResults struct {
  4849. // ExplicitAnnotation: Explicit content annotation results.
  4850. ExplicitAnnotation *GoogleCloudVideointelligenceV1p3beta1ExplicitContentAnnotation `json:"explicitAnnotation,omitempty"`
  4851. // LabelAnnotations: Label annotation results.
  4852. LabelAnnotations []*GoogleCloudVideointelligenceV1p3beta1LabelAnnotation `json:"labelAnnotations,omitempty"`
  4853. // ObjectAnnotations: Object tracking results.
  4854. ObjectAnnotations []*GoogleCloudVideointelligenceV1p3beta1ObjectTrackingAnnotation `json:"objectAnnotations,omitempty"`
  4855. // ShotAnnotations: Shot annotation results. Each shot is represented as
  4856. // a video segment.
  4857. ShotAnnotations []*GoogleCloudVideointelligenceV1p3beta1VideoSegment `json:"shotAnnotations,omitempty"`
  4858. // ForceSendFields is a list of field names (e.g. "ExplicitAnnotation")
  4859. // to unconditionally include in API requests. By default, fields with
  4860. // empty values are omitted from API requests. However, any non-pointer,
  4861. // non-interface field appearing in ForceSendFields will be sent to the
  4862. // server regardless of whether the field is empty or not. This may be
  4863. // used to include empty fields in Patch requests.
  4864. ForceSendFields []string `json:"-"`
  4865. // NullFields is a list of field names (e.g. "ExplicitAnnotation") to
  4866. // include in API requests with the JSON null value. By default, fields
  4867. // with empty values are omitted from API requests. However, any field
  4868. // with an empty value appearing in NullFields will be sent to the
  4869. // server as null. It is an error if a field in this list has a
  4870. // non-empty value. This may be used to include null fields in Patch
  4871. // requests.
  4872. NullFields []string `json:"-"`
  4873. }
  4874. func (s *GoogleCloudVideointelligenceV1p3beta1StreamingVideoAnnotationResults) MarshalJSON() ([]byte, error) {
  4875. type NoMethod GoogleCloudVideointelligenceV1p3beta1StreamingVideoAnnotationResults
  4876. raw := NoMethod(*s)
  4877. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4878. }
  4879. // GoogleCloudVideointelligenceV1p3beta1TextAnnotation: Annotations
  4880. // related to one detected OCR text snippet. This will contain
  4881. // the
  4882. // corresponding text, confidence value, and frame level information for
  4883. // each
  4884. // detection.
  4885. type GoogleCloudVideointelligenceV1p3beta1TextAnnotation struct {
  4886. // Segments: All video segments where OCR detected text appears.
  4887. Segments []*GoogleCloudVideointelligenceV1p3beta1TextSegment `json:"segments,omitempty"`
  4888. // Text: The detected text.
  4889. Text string `json:"text,omitempty"`
  4890. // ForceSendFields is a list of field names (e.g. "Segments") to
  4891. // unconditionally include in API requests. By default, fields with
  4892. // empty values are omitted from API requests. However, any non-pointer,
  4893. // non-interface field appearing in ForceSendFields will be sent to the
  4894. // server regardless of whether the field is empty or not. This may be
  4895. // used to include empty fields in Patch requests.
  4896. ForceSendFields []string `json:"-"`
  4897. // NullFields is a list of field names (e.g. "Segments") to include in
  4898. // API requests with the JSON null value. By default, fields with empty
  4899. // values are omitted from API requests. However, any field with an
  4900. // empty value appearing in NullFields will be sent to the server as
  4901. // null. It is an error if a field in this list has a non-empty value.
  4902. // This may be used to include null fields in Patch requests.
  4903. NullFields []string `json:"-"`
  4904. }
  4905. func (s *GoogleCloudVideointelligenceV1p3beta1TextAnnotation) MarshalJSON() ([]byte, error) {
  4906. type NoMethod GoogleCloudVideointelligenceV1p3beta1TextAnnotation
  4907. raw := NoMethod(*s)
  4908. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4909. }
  4910. // GoogleCloudVideointelligenceV1p3beta1TextFrame: Video frame level
  4911. // annotation results for text annotation (OCR).
  4912. // Contains information regarding timestamp and bounding box locations
  4913. // for the
  4914. // frames containing detected OCR text snippets.
  4915. type GoogleCloudVideointelligenceV1p3beta1TextFrame struct {
  4916. // RotatedBoundingBox: Bounding polygon of the detected text for this
  4917. // frame.
  4918. RotatedBoundingBox *GoogleCloudVideointelligenceV1p3beta1NormalizedBoundingPoly `json:"rotatedBoundingBox,omitempty"`
  4919. // TimeOffset: Timestamp of this frame.
  4920. TimeOffset string `json:"timeOffset,omitempty"`
  4921. // ForceSendFields is a list of field names (e.g. "RotatedBoundingBox")
  4922. // to unconditionally include in API requests. By default, fields with
  4923. // empty values are omitted from API requests. However, any non-pointer,
  4924. // non-interface field appearing in ForceSendFields will be sent to the
  4925. // server regardless of whether the field is empty or not. This may be
  4926. // used to include empty fields in Patch requests.
  4927. ForceSendFields []string `json:"-"`
  4928. // NullFields is a list of field names (e.g. "RotatedBoundingBox") to
  4929. // include in API requests with the JSON null value. By default, fields
  4930. // with empty values are omitted from API requests. However, any field
  4931. // with an empty value appearing in NullFields will be sent to the
  4932. // server as null. It is an error if a field in this list has a
  4933. // non-empty value. This may be used to include null fields in Patch
  4934. // requests.
  4935. NullFields []string `json:"-"`
  4936. }
  4937. func (s *GoogleCloudVideointelligenceV1p3beta1TextFrame) MarshalJSON() ([]byte, error) {
  4938. type NoMethod GoogleCloudVideointelligenceV1p3beta1TextFrame
  4939. raw := NoMethod(*s)
  4940. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4941. }
  4942. // GoogleCloudVideointelligenceV1p3beta1TextSegment: Video segment level
  4943. // annotation results for text detection.
  4944. type GoogleCloudVideointelligenceV1p3beta1TextSegment struct {
  4945. // Confidence: Confidence for the track of detected text. It is
  4946. // calculated as the highest
  4947. // over all frames where OCR detected text appears.
  4948. Confidence float64 `json:"confidence,omitempty"`
  4949. // Frames: Information related to the frames where OCR detected text
  4950. // appears.
  4951. Frames []*GoogleCloudVideointelligenceV1p3beta1TextFrame `json:"frames,omitempty"`
  4952. // Segment: Video segment where a text snippet was detected.
  4953. Segment *GoogleCloudVideointelligenceV1p3beta1VideoSegment `json:"segment,omitempty"`
  4954. // ForceSendFields is a list of field names (e.g. "Confidence") to
  4955. // unconditionally include in API requests. By default, fields with
  4956. // empty values are omitted from API requests. However, any non-pointer,
  4957. // non-interface field appearing in ForceSendFields will be sent to the
  4958. // server regardless of whether the field is empty or not. This may be
  4959. // used to include empty fields in Patch requests.
  4960. ForceSendFields []string `json:"-"`
  4961. // NullFields is a list of field names (e.g. "Confidence") to include in
  4962. // API requests with the JSON null value. By default, fields with empty
  4963. // values are omitted from API requests. However, any field with an
  4964. // empty value appearing in NullFields will be sent to the server as
  4965. // null. It is an error if a field in this list has a non-empty value.
  4966. // This may be used to include null fields in Patch requests.
  4967. NullFields []string `json:"-"`
  4968. }
  4969. func (s *GoogleCloudVideointelligenceV1p3beta1TextSegment) MarshalJSON() ([]byte, error) {
  4970. type NoMethod GoogleCloudVideointelligenceV1p3beta1TextSegment
  4971. raw := NoMethod(*s)
  4972. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4973. }
  4974. func (s *GoogleCloudVideointelligenceV1p3beta1TextSegment) UnmarshalJSON(data []byte) error {
  4975. type NoMethod GoogleCloudVideointelligenceV1p3beta1TextSegment
  4976. var s1 struct {
  4977. Confidence gensupport.JSONFloat64 `json:"confidence"`
  4978. *NoMethod
  4979. }
  4980. s1.NoMethod = (*NoMethod)(s)
  4981. if err := json.Unmarshal(data, &s1); err != nil {
  4982. return err
  4983. }
  4984. s.Confidence = float64(s1.Confidence)
  4985. return nil
  4986. }
  4987. // GoogleCloudVideointelligenceV1p3beta1VideoAnnotationProgress:
  4988. // Annotation progress for a single video.
  4989. type GoogleCloudVideointelligenceV1p3beta1VideoAnnotationProgress struct {
  4990. // InputUri: Video file location in
  4991. // [Google Cloud Storage](https://cloud.google.com/storage/).
  4992. InputUri string `json:"inputUri,omitempty"`
  4993. // ProgressPercent: Approximate percentage processed thus far.
  4994. // Guaranteed to be
  4995. // 100 when fully processed.
  4996. ProgressPercent int64 `json:"progressPercent,omitempty"`
  4997. // StartTime: Time when the request was received.
  4998. StartTime string `json:"startTime,omitempty"`
  4999. // UpdateTime: Time of the most recent update.
  5000. UpdateTime string `json:"updateTime,omitempty"`
  5001. // ForceSendFields is a list of field names (e.g. "InputUri") to
  5002. // unconditionally include in API requests. By default, fields with
  5003. // empty values are omitted from API requests. However, any non-pointer,
  5004. // non-interface field appearing in ForceSendFields will be sent to the
  5005. // server regardless of whether the field is empty or not. This may be
  5006. // used to include empty fields in Patch requests.
  5007. ForceSendFields []string `json:"-"`
  5008. // NullFields is a list of field names (e.g. "InputUri") to include in
  5009. // API requests with the JSON null value. By default, fields with empty
  5010. // values are omitted from API requests. However, any field with an
  5011. // empty value appearing in NullFields will be sent to the server as
  5012. // null. It is an error if a field in this list has a non-empty value.
  5013. // This may be used to include null fields in Patch requests.
  5014. NullFields []string `json:"-"`
  5015. }
  5016. func (s *GoogleCloudVideointelligenceV1p3beta1VideoAnnotationProgress) MarshalJSON() ([]byte, error) {
  5017. type NoMethod GoogleCloudVideointelligenceV1p3beta1VideoAnnotationProgress
  5018. raw := NoMethod(*s)
  5019. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5020. }
  5021. // GoogleCloudVideointelligenceV1p3beta1VideoAnnotationResults:
  5022. // Annotation results for a single video.
  5023. type GoogleCloudVideointelligenceV1p3beta1VideoAnnotationResults struct {
  5024. // Error: If set, indicates an error. Note that for a single
  5025. // `AnnotateVideoRequest`
  5026. // some videos may succeed and some may fail.
  5027. Error *GoogleRpcStatus `json:"error,omitempty"`
  5028. // ExplicitAnnotation: Explicit content annotation.
  5029. ExplicitAnnotation *GoogleCloudVideointelligenceV1p3beta1ExplicitContentAnnotation `json:"explicitAnnotation,omitempty"`
  5030. // FrameLabelAnnotations: Label annotations on frame level.
  5031. // There is exactly one element for each unique label.
  5032. FrameLabelAnnotations []*GoogleCloudVideointelligenceV1p3beta1LabelAnnotation `json:"frameLabelAnnotations,omitempty"`
  5033. // InputUri: Video file location in
  5034. // [Google Cloud Storage](https://cloud.google.com/storage/).
  5035. InputUri string `json:"inputUri,omitempty"`
  5036. // ObjectAnnotations: Annotations for list of objects detected and
  5037. // tracked in video.
  5038. ObjectAnnotations []*GoogleCloudVideointelligenceV1p3beta1ObjectTrackingAnnotation `json:"objectAnnotations,omitempty"`
  5039. // SegmentLabelAnnotations: Label annotations on video level or user
  5040. // specified segment level.
  5041. // There is exactly one element for each unique label.
  5042. SegmentLabelAnnotations []*GoogleCloudVideointelligenceV1p3beta1LabelAnnotation `json:"segmentLabelAnnotations,omitempty"`
  5043. // ShotAnnotations: Shot annotations. Each shot is represented as a
  5044. // video segment.
  5045. ShotAnnotations []*GoogleCloudVideointelligenceV1p3beta1VideoSegment `json:"shotAnnotations,omitempty"`
  5046. // ShotLabelAnnotations: Label annotations on shot level.
  5047. // There is exactly one element for each unique label.
  5048. ShotLabelAnnotations []*GoogleCloudVideointelligenceV1p3beta1LabelAnnotation `json:"shotLabelAnnotations,omitempty"`
  5049. // SpeechTranscriptions: Speech transcription.
  5050. SpeechTranscriptions []*GoogleCloudVideointelligenceV1p3beta1SpeechTranscription `json:"speechTranscriptions,omitempty"`
  5051. // TextAnnotations: OCR text detection and tracking.
  5052. // Annotations for list of detected text snippets. Each will have list
  5053. // of
  5054. // frame information associated with it.
  5055. TextAnnotations []*GoogleCloudVideointelligenceV1p3beta1TextAnnotation `json:"textAnnotations,omitempty"`
  5056. // ForceSendFields is a list of field names (e.g. "Error") to
  5057. // unconditionally include in API requests. By default, fields with
  5058. // empty values are omitted from API requests. However, any non-pointer,
  5059. // non-interface field appearing in ForceSendFields will be sent to the
  5060. // server regardless of whether the field is empty or not. This may be
  5061. // used to include empty fields in Patch requests.
  5062. ForceSendFields []string `json:"-"`
  5063. // NullFields is a list of field names (e.g. "Error") to include in API
  5064. // requests with the JSON null value. By default, fields with empty
  5065. // values are omitted from API requests. However, any field with an
  5066. // empty value appearing in NullFields will be sent to the server as
  5067. // null. It is an error if a field in this list has a non-empty value.
  5068. // This may be used to include null fields in Patch requests.
  5069. NullFields []string `json:"-"`
  5070. }
  5071. func (s *GoogleCloudVideointelligenceV1p3beta1VideoAnnotationResults) MarshalJSON() ([]byte, error) {
  5072. type NoMethod GoogleCloudVideointelligenceV1p3beta1VideoAnnotationResults
  5073. raw := NoMethod(*s)
  5074. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5075. }
  5076. // GoogleCloudVideointelligenceV1p3beta1VideoSegment: Video segment.
  5077. type GoogleCloudVideointelligenceV1p3beta1VideoSegment struct {
  5078. // EndTimeOffset: Time-offset, relative to the beginning of the
  5079. // video,
  5080. // corresponding to the end of the segment (inclusive).
  5081. EndTimeOffset string `json:"endTimeOffset,omitempty"`
  5082. // StartTimeOffset: Time-offset, relative to the beginning of the
  5083. // video,
  5084. // corresponding to the start of the segment (inclusive).
  5085. StartTimeOffset string `json:"startTimeOffset,omitempty"`
  5086. // ForceSendFields is a list of field names (e.g. "EndTimeOffset") to
  5087. // unconditionally include in API requests. By default, fields with
  5088. // empty values are omitted from API requests. However, any non-pointer,
  5089. // non-interface field appearing in ForceSendFields will be sent to the
  5090. // server regardless of whether the field is empty or not. This may be
  5091. // used to include empty fields in Patch requests.
  5092. ForceSendFields []string `json:"-"`
  5093. // NullFields is a list of field names (e.g. "EndTimeOffset") to include
  5094. // in API requests with the JSON null value. By default, fields with
  5095. // empty values are omitted from API requests. However, any field with
  5096. // an empty value appearing in NullFields will be sent to the server as
  5097. // null. It is an error if a field in this list has a non-empty value.
  5098. // This may be used to include null fields in Patch requests.
  5099. NullFields []string `json:"-"`
  5100. }
  5101. func (s *GoogleCloudVideointelligenceV1p3beta1VideoSegment) MarshalJSON() ([]byte, error) {
  5102. type NoMethod GoogleCloudVideointelligenceV1p3beta1VideoSegment
  5103. raw := NoMethod(*s)
  5104. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5105. }
  5106. // GoogleCloudVideointelligenceV1p3beta1WordInfo: Word-specific
  5107. // information for recognized words. Word information is only
  5108. // included in the response when certain request parameters are set,
  5109. // such
  5110. // as `enable_word_time_offsets`.
  5111. type GoogleCloudVideointelligenceV1p3beta1WordInfo struct {
  5112. // Confidence: Output only. The confidence estimate between 0.0 and 1.0.
  5113. // A higher number
  5114. // indicates an estimated greater likelihood that the recognized words
  5115. // are
  5116. // correct. This field is set only for the top alternative.
  5117. // This field is not guaranteed to be accurate and users should not rely
  5118. // on it
  5119. // to be always provided.
  5120. // The default of 0.0 is a sentinel value indicating `confidence` was
  5121. // not set.
  5122. Confidence float64 `json:"confidence,omitempty"`
  5123. // EndTime: Time offset relative to the beginning of the audio,
  5124. // and
  5125. // corresponding to the end of the spoken word. This field is only set
  5126. // if
  5127. // `enable_word_time_offsets=true` and only in the top hypothesis. This
  5128. // is an
  5129. // experimental feature and the accuracy of the time offset can vary.
  5130. EndTime string `json:"endTime,omitempty"`
  5131. // SpeakerTag: Output only. A distinct integer value is assigned for
  5132. // every speaker within
  5133. // the audio. This field specifies which one of those speakers was
  5134. // detected to
  5135. // have spoken this word. Value ranges from 1 up to
  5136. // diarization_speaker_count,
  5137. // and is only set if speaker diarization is enabled.
  5138. SpeakerTag int64 `json:"speakerTag,omitempty"`
  5139. // StartTime: Time offset relative to the beginning of the audio,
  5140. // and
  5141. // corresponding to the start of the spoken word. This field is only set
  5142. // if
  5143. // `enable_word_time_offsets=true` and only in the top hypothesis. This
  5144. // is an
  5145. // experimental feature and the accuracy of the time offset can vary.
  5146. StartTime string `json:"startTime,omitempty"`
  5147. // Word: The word corresponding to this set of information.
  5148. Word string `json:"word,omitempty"`
  5149. // ForceSendFields is a list of field names (e.g. "Confidence") to
  5150. // unconditionally include in API requests. By default, fields with
  5151. // empty values are omitted from API requests. However, any non-pointer,
  5152. // non-interface field appearing in ForceSendFields will be sent to the
  5153. // server regardless of whether the field is empty or not. This may be
  5154. // used to include empty fields in Patch requests.
  5155. ForceSendFields []string `json:"-"`
  5156. // NullFields is a list of field names (e.g. "Confidence") to include in
  5157. // API requests with the JSON null value. By default, fields with empty
  5158. // values are omitted from API requests. However, any field with an
  5159. // empty value appearing in NullFields will be sent to the server as
  5160. // null. It is an error if a field in this list has a non-empty value.
  5161. // This may be used to include null fields in Patch requests.
  5162. NullFields []string `json:"-"`
  5163. }
  5164. func (s *GoogleCloudVideointelligenceV1p3beta1WordInfo) MarshalJSON() ([]byte, error) {
  5165. type NoMethod GoogleCloudVideointelligenceV1p3beta1WordInfo
  5166. raw := NoMethod(*s)
  5167. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5168. }
  5169. func (s *GoogleCloudVideointelligenceV1p3beta1WordInfo) UnmarshalJSON(data []byte) error {
  5170. type NoMethod GoogleCloudVideointelligenceV1p3beta1WordInfo
  5171. var s1 struct {
  5172. Confidence gensupport.JSONFloat64 `json:"confidence"`
  5173. *NoMethod
  5174. }
  5175. s1.NoMethod = (*NoMethod)(s)
  5176. if err := json.Unmarshal(data, &s1); err != nil {
  5177. return err
  5178. }
  5179. s.Confidence = float64(s1.Confidence)
  5180. return nil
  5181. }
  5182. // GoogleLongrunningOperation: This resource represents a long-running
  5183. // operation that is the result of a
  5184. // network API call.
  5185. type GoogleLongrunningOperation struct {
  5186. // Done: If the value is `false`, it means the operation is still in
  5187. // progress.
  5188. // If `true`, the operation is completed, and either `error` or
  5189. // `response` is
  5190. // available.
  5191. Done bool `json:"done,omitempty"`
  5192. // Error: The error result of the operation in case of failure or
  5193. // cancellation.
  5194. Error *GoogleRpcStatus `json:"error,omitempty"`
  5195. // Metadata: Service-specific metadata associated with the operation.
  5196. // It typically
  5197. // contains progress information and common metadata such as create
  5198. // time.
  5199. // Some services might not provide such metadata. Any method that
  5200. // returns a
  5201. // long-running operation should document the metadata type, if any.
  5202. Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  5203. // Name: The server-assigned name, which is only unique within the same
  5204. // service that
  5205. // originally returns it. If you use the default HTTP mapping,
  5206. // the
  5207. // `name` should have the format of `operations/some/unique/name`.
  5208. Name string `json:"name,omitempty"`
  5209. // Response: The normal response of the operation in case of success.
  5210. // If the original
  5211. // method returns no data on success, such as `Delete`, the response
  5212. // is
  5213. // `google.protobuf.Empty`. If the original method is
  5214. // standard
  5215. // `Get`/`Create`/`Update`, the response should be the resource. For
  5216. // other
  5217. // methods, the response should have the type `XxxResponse`, where
  5218. // `Xxx`
  5219. // is the original method name. For example, if the original method
  5220. // name
  5221. // is `TakeSnapshot()`, the inferred response type
  5222. // is
  5223. // `TakeSnapshotResponse`.
  5224. Response googleapi.RawMessage `json:"response,omitempty"`
  5225. // ServerResponse contains the HTTP response code and headers from the
  5226. // server.
  5227. googleapi.ServerResponse `json:"-"`
  5228. // ForceSendFields is a list of field names (e.g. "Done") to
  5229. // unconditionally include in API requests. By default, fields with
  5230. // empty values are omitted from API requests. However, any non-pointer,
  5231. // non-interface field appearing in ForceSendFields will be sent to the
  5232. // server regardless of whether the field is empty or not. This may be
  5233. // used to include empty fields in Patch requests.
  5234. ForceSendFields []string `json:"-"`
  5235. // NullFields is a list of field names (e.g. "Done") to include in API
  5236. // requests with the JSON null value. By default, fields with empty
  5237. // values are omitted from API requests. However, any field with an
  5238. // empty value appearing in NullFields will be sent to the server as
  5239. // null. It is an error if a field in this list has a non-empty value.
  5240. // This may be used to include null fields in Patch requests.
  5241. NullFields []string `json:"-"`
  5242. }
  5243. func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) {
  5244. type NoMethod GoogleLongrunningOperation
  5245. raw := NoMethod(*s)
  5246. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5247. }
  5248. // GoogleRpcStatus: The `Status` type defines a logical error model that
  5249. // is suitable for
  5250. // different programming environments, including REST APIs and RPC APIs.
  5251. // It is
  5252. // used by [gRPC](https://github.com/grpc). The error model is designed
  5253. // to be:
  5254. //
  5255. // - Simple to use and understand for most users
  5256. // - Flexible enough to meet unexpected needs
  5257. //
  5258. // # Overview
  5259. //
  5260. // The `Status` message contains three pieces of data: error code,
  5261. // error
  5262. // message, and error details. The error code should be an enum value
  5263. // of
  5264. // google.rpc.Code, but it may accept additional error codes if needed.
  5265. // The
  5266. // error message should be a developer-facing English message that
  5267. // helps
  5268. // developers *understand* and *resolve* the error. If a localized
  5269. // user-facing
  5270. // error message is needed, put the localized message in the error
  5271. // details or
  5272. // localize it in the client. The optional error details may contain
  5273. // arbitrary
  5274. // information about the error. There is a predefined set of error
  5275. // detail types
  5276. // in the package `google.rpc` that can be used for common error
  5277. // conditions.
  5278. //
  5279. // # Language mapping
  5280. //
  5281. // The `Status` message is the logical representation of the error
  5282. // model, but it
  5283. // is not necessarily the actual wire format. When the `Status` message
  5284. // is
  5285. // exposed in different client libraries and different wire protocols,
  5286. // it can be
  5287. // mapped differently. For example, it will likely be mapped to some
  5288. // exceptions
  5289. // in Java, but more likely mapped to some error codes in C.
  5290. //
  5291. // # Other uses
  5292. //
  5293. // The error model and the `Status` message can be used in a variety
  5294. // of
  5295. // environments, either with or without APIs, to provide a
  5296. // consistent developer experience across different
  5297. // environments.
  5298. //
  5299. // Example uses of this error model include:
  5300. //
  5301. // - Partial errors. If a service needs to return partial errors to the
  5302. // client,
  5303. // it may embed the `Status` in the normal response to indicate the
  5304. // partial
  5305. // errors.
  5306. //
  5307. // - Workflow errors. A typical workflow has multiple steps. Each step
  5308. // may
  5309. // have a `Status` message for error reporting.
  5310. //
  5311. // - Batch operations. If a client uses batch request and batch
  5312. // response, the
  5313. // `Status` message should be used directly inside batch response,
  5314. // one for
  5315. // each error sub-response.
  5316. //
  5317. // - Asynchronous operations. If an API call embeds asynchronous
  5318. // operation
  5319. // results in its response, the status of those operations should
  5320. // be
  5321. // represented directly using the `Status` message.
  5322. //
  5323. // - Logging. If some API errors are stored in logs, the message
  5324. // `Status` could
  5325. // be used directly after any stripping needed for security/privacy
  5326. // reasons.
  5327. type GoogleRpcStatus struct {
  5328. // Code: The status code, which should be an enum value of
  5329. // google.rpc.Code.
  5330. Code int64 `json:"code,omitempty"`
  5331. // Details: A list of messages that carry the error details. There is a
  5332. // common set of
  5333. // message types for APIs to use.
  5334. Details []googleapi.RawMessage `json:"details,omitempty"`
  5335. // Message: A developer-facing error message, which should be in
  5336. // English. Any
  5337. // user-facing error message should be localized and sent in
  5338. // the
  5339. // google.rpc.Status.details field, or localized by the client.
  5340. Message string `json:"message,omitempty"`
  5341. // ForceSendFields is a list of field names (e.g. "Code") to
  5342. // unconditionally include in API requests. By default, fields with
  5343. // empty values are omitted from API requests. However, any non-pointer,
  5344. // non-interface field appearing in ForceSendFields will be sent to the
  5345. // server regardless of whether the field is empty or not. This may be
  5346. // used to include empty fields in Patch requests.
  5347. ForceSendFields []string `json:"-"`
  5348. // NullFields is a list of field names (e.g. "Code") to include in API
  5349. // requests with the JSON null value. By default, fields with empty
  5350. // values are omitted from API requests. However, any field with an
  5351. // empty value appearing in NullFields will be sent to the server as
  5352. // null. It is an error if a field in this list has a non-empty value.
  5353. // This may be used to include null fields in Patch requests.
  5354. NullFields []string `json:"-"`
  5355. }
  5356. func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) {
  5357. type NoMethod GoogleRpcStatus
  5358. raw := NoMethod(*s)
  5359. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5360. }
  5361. // method id "videointelligence.videos.annotate":
  5362. type VideosAnnotateCall struct {
  5363. s *Service
  5364. googlecloudvideointelligencev1p1beta1Annotatevideorequest *GoogleCloudVideointelligenceV1p1beta1AnnotateVideoRequest
  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(googlecloudvideointelligencev1p1beta1Annotatevideorequest *GoogleCloudVideointelligenceV1p1beta1AnnotateVideoRequest) *VideosAnnotateCall {
  5377. c := &VideosAnnotateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5378. c.googlecloudvideointelligencev1p1beta1Annotatevideorequest = googlecloudvideointelligencev1p1beta1Annotatevideorequest
  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.googlecloudvideointelligencev1p1beta1Annotatevideorequest)
  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, "v1p1beta1/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": "v1p1beta1/videos:annotate",
  5466. // "httpMethod": "POST",
  5467. // "id": "videointelligence.videos.annotate",
  5468. // "parameterOrder": [],
  5469. // "parameters": {},
  5470. // "path": "v1p1beta1/videos:annotate",
  5471. // "request": {
  5472. // "$ref": "GoogleCloudVideointelligenceV1p1beta1_AnnotateVideoRequest"
  5473. // },
  5474. // "response": {
  5475. // "$ref": "GoogleLongrunning_Operation"
  5476. // },
  5477. // "scopes": [
  5478. // "https://www.googleapis.com/auth/cloud-platform"
  5479. // ]
  5480. // }
  5481. }