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

2687 lines
116 KiB

  1. // Package videointelligence provides access to the Cloud Video Intelligence API.
  2. //
  3. // See https://cloud.google.com/video-intelligence/docs/
  4. //
  5. // Usage example:
  6. //
  7. // import "google.golang.org/api/videointelligence/v1beta1"
  8. // ...
  9. // videointelligenceService, err := videointelligence.New(oauthHttpClient)
  10. package videointelligence // import "google.golang.org/api/videointelligence/v1beta1"
  11. import (
  12. "bytes"
  13. "encoding/json"
  14. "errors"
  15. "fmt"
  16. context "golang.org/x/net/context"
  17. ctxhttp "golang.org/x/net/context/ctxhttp"
  18. gensupport "google.golang.org/api/gensupport"
  19. googleapi "google.golang.org/api/googleapi"
  20. "io"
  21. "net/http"
  22. "net/url"
  23. "strconv"
  24. "strings"
  25. )
  26. // Always reference these packages, just in case the auto-generated code
  27. // below doesn't.
  28. var _ = bytes.NewBuffer
  29. var _ = strconv.Itoa
  30. var _ = fmt.Sprintf
  31. var _ = json.NewDecoder
  32. var _ = io.Copy
  33. var _ = url.Parse
  34. var _ = gensupport.MarshalJSON
  35. var _ = googleapi.Version
  36. var _ = errors.New
  37. var _ = strings.Replace
  38. var _ = context.Canceled
  39. var _ = ctxhttp.Do
  40. const apiId = "videointelligence:v1beta1"
  41. const apiName = "videointelligence"
  42. const apiVersion = "v1beta1"
  43. const basePath = "https://videointelligence.googleapis.com/"
  44. // OAuth2 scopes used by this API.
  45. const (
  46. // View and manage your data across Google Cloud Platform services
  47. CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
  48. )
  49. func New(client *http.Client) (*Service, error) {
  50. if client == nil {
  51. return nil, errors.New("client is nil")
  52. }
  53. s := &Service{client: client, BasePath: basePath}
  54. s.Videos = NewVideosService(s)
  55. return s, nil
  56. }
  57. type Service struct {
  58. client *http.Client
  59. BasePath string // API endpoint base URL
  60. UserAgent string // optional additional User-Agent fragment
  61. Videos *VideosService
  62. }
  63. func (s *Service) userAgent() string {
  64. if s.UserAgent == "" {
  65. return googleapi.UserAgent
  66. }
  67. return googleapi.UserAgent + " " + s.UserAgent
  68. }
  69. func NewVideosService(s *Service) *VideosService {
  70. rs := &VideosService{s: s}
  71. return rs
  72. }
  73. type VideosService struct {
  74. s *Service
  75. }
  76. // GoogleCloudVideointelligenceV1AnnotateVideoProgress: Video annotation
  77. // progress. Included in the `metadata`
  78. // field of the `Operation` returned by the `GetOperation`
  79. // call of the `google::longrunning::Operations` service.
  80. type GoogleCloudVideointelligenceV1AnnotateVideoProgress struct {
  81. // AnnotationProgress: Progress metadata for all videos specified in
  82. // `AnnotateVideoRequest`.
  83. AnnotationProgress []*GoogleCloudVideointelligenceV1VideoAnnotationProgress `json:"annotationProgress,omitempty"`
  84. // ForceSendFields is a list of field names (e.g. "AnnotationProgress")
  85. // to unconditionally include in API requests. By default, fields with
  86. // empty values are omitted from API requests. However, any non-pointer,
  87. // non-interface field appearing in ForceSendFields will be sent to the
  88. // server regardless of whether the field is empty or not. This may be
  89. // used to include empty fields in Patch requests.
  90. ForceSendFields []string `json:"-"`
  91. // NullFields is a list of field names (e.g. "AnnotationProgress") to
  92. // include in API requests with the JSON null value. By default, fields
  93. // with empty values are omitted from API requests. However, any field
  94. // with an empty value appearing in NullFields will be sent to the
  95. // server as null. It is an error if a field in this list has a
  96. // non-empty value. This may be used to include null fields in Patch
  97. // requests.
  98. NullFields []string `json:"-"`
  99. }
  100. func (s *GoogleCloudVideointelligenceV1AnnotateVideoProgress) MarshalJSON() ([]byte, error) {
  101. type NoMethod GoogleCloudVideointelligenceV1AnnotateVideoProgress
  102. raw := NoMethod(*s)
  103. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  104. }
  105. // GoogleCloudVideointelligenceV1AnnotateVideoResponse: Video annotation
  106. // response. Included in the `response`
  107. // field of the `Operation` returned by the `GetOperation`
  108. // call of the `google::longrunning::Operations` service.
  109. type GoogleCloudVideointelligenceV1AnnotateVideoResponse struct {
  110. // AnnotationResults: Annotation results for all videos specified in
  111. // `AnnotateVideoRequest`.
  112. AnnotationResults []*GoogleCloudVideointelligenceV1VideoAnnotationResults `json:"annotationResults,omitempty"`
  113. // ForceSendFields is a list of field names (e.g. "AnnotationResults")
  114. // to unconditionally include in API requests. By default, fields with
  115. // empty values are omitted from API requests. However, any non-pointer,
  116. // non-interface field appearing in ForceSendFields will be sent to the
  117. // server regardless of whether the field is empty or not. This may be
  118. // used to include empty fields in Patch requests.
  119. ForceSendFields []string `json:"-"`
  120. // NullFields is a list of field names (e.g. "AnnotationResults") to
  121. // include in API requests with the JSON null value. By default, fields
  122. // with empty values are omitted from API requests. However, any field
  123. // with an empty value appearing in NullFields will be sent to the
  124. // server as null. It is an error if a field in this list has a
  125. // non-empty value. This may be used to include null fields in Patch
  126. // requests.
  127. NullFields []string `json:"-"`
  128. }
  129. func (s *GoogleCloudVideointelligenceV1AnnotateVideoResponse) MarshalJSON() ([]byte, error) {
  130. type NoMethod GoogleCloudVideointelligenceV1AnnotateVideoResponse
  131. raw := NoMethod(*s)
  132. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  133. }
  134. // GoogleCloudVideointelligenceV1Entity: Detected entity from video
  135. // analysis.
  136. type GoogleCloudVideointelligenceV1Entity struct {
  137. // Description: Textual description, e.g. `Fixed-gear bicycle`.
  138. Description string `json:"description,omitempty"`
  139. // EntityId: Opaque entity ID. Some IDs may be available in
  140. // [Google Knowledge Graph
  141. // Search
  142. // API](https://developers.google.com/knowledge-graph/).
  143. EntityId string `json:"entityId,omitempty"`
  144. // LanguageCode: Language code for `description` in BCP-47 format.
  145. LanguageCode string `json:"languageCode,omitempty"`
  146. // ForceSendFields is a list of field names (e.g. "Description") to
  147. // unconditionally include in API requests. By default, fields with
  148. // empty values are omitted from API requests. However, any non-pointer,
  149. // non-interface field appearing in ForceSendFields will be sent to the
  150. // server regardless of whether the field is empty or not. This may be
  151. // used to include empty fields in Patch requests.
  152. ForceSendFields []string `json:"-"`
  153. // NullFields is a list of field names (e.g. "Description") to include
  154. // in API requests with the JSON null value. By default, fields with
  155. // empty values are omitted from API requests. However, any field with
  156. // an empty value appearing in NullFields will be sent to the server as
  157. // null. It is an error if a field in this list has a non-empty value.
  158. // This may be used to include null fields in Patch requests.
  159. NullFields []string `json:"-"`
  160. }
  161. func (s *GoogleCloudVideointelligenceV1Entity) MarshalJSON() ([]byte, error) {
  162. type NoMethod GoogleCloudVideointelligenceV1Entity
  163. raw := NoMethod(*s)
  164. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  165. }
  166. // GoogleCloudVideointelligenceV1ExplicitContentAnnotation: Explicit
  167. // content annotation (based on per-frame visual signals only).
  168. // If no explicit content has been detected in a frame, no annotations
  169. // are
  170. // present for that frame.
  171. type GoogleCloudVideointelligenceV1ExplicitContentAnnotation struct {
  172. // Frames: All video frames where explicit content was detected.
  173. Frames []*GoogleCloudVideointelligenceV1ExplicitContentFrame `json:"frames,omitempty"`
  174. // ForceSendFields is a list of field names (e.g. "Frames") to
  175. // unconditionally include in API requests. By default, fields with
  176. // empty values are omitted from API requests. However, any non-pointer,
  177. // non-interface field appearing in ForceSendFields will be sent to the
  178. // server regardless of whether the field is empty or not. This may be
  179. // used to include empty fields in Patch requests.
  180. ForceSendFields []string `json:"-"`
  181. // NullFields is a list of field names (e.g. "Frames") to include in API
  182. // requests with the JSON null value. By default, fields with empty
  183. // values are omitted from API requests. However, any field with an
  184. // empty value appearing in NullFields will be sent to the server as
  185. // null. It is an error if a field in this list has a non-empty value.
  186. // This may be used to include null fields in Patch requests.
  187. NullFields []string `json:"-"`
  188. }
  189. func (s *GoogleCloudVideointelligenceV1ExplicitContentAnnotation) MarshalJSON() ([]byte, error) {
  190. type NoMethod GoogleCloudVideointelligenceV1ExplicitContentAnnotation
  191. raw := NoMethod(*s)
  192. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  193. }
  194. // GoogleCloudVideointelligenceV1ExplicitContentFrame: Video frame level
  195. // annotation results for explicit content.
  196. type GoogleCloudVideointelligenceV1ExplicitContentFrame struct {
  197. // PornographyLikelihood: Likelihood of the pornography content..
  198. //
  199. // Possible values:
  200. // "LIKELIHOOD_UNSPECIFIED" - Unspecified likelihood.
  201. // "VERY_UNLIKELY" - Very unlikely.
  202. // "UNLIKELY" - Unlikely.
  203. // "POSSIBLE" - Possible.
  204. // "LIKELY" - Likely.
  205. // "VERY_LIKELY" - Very likely.
  206. PornographyLikelihood string `json:"pornographyLikelihood,omitempty"`
  207. // TimeOffset: Time-offset, relative to the beginning of the video,
  208. // corresponding to the
  209. // video frame for this location.
  210. TimeOffset string `json:"timeOffset,omitempty"`
  211. // ForceSendFields is a list of field names (e.g.
  212. // "PornographyLikelihood") to unconditionally include in API requests.
  213. // By default, fields with empty values are omitted from API requests.
  214. // However, any non-pointer, non-interface field appearing in
  215. // ForceSendFields will be sent to the server regardless of whether the
  216. // field is empty or not. This may be used to include empty fields in
  217. // Patch requests.
  218. ForceSendFields []string `json:"-"`
  219. // NullFields is a list of field names (e.g. "PornographyLikelihood") to
  220. // include in API requests with the JSON null value. By default, fields
  221. // with empty values are omitted from API requests. However, any field
  222. // with an empty value appearing in NullFields will be sent to the
  223. // server as null. It is an error if a field in this list has a
  224. // non-empty value. This may be used to include null fields in Patch
  225. // requests.
  226. NullFields []string `json:"-"`
  227. }
  228. func (s *GoogleCloudVideointelligenceV1ExplicitContentFrame) MarshalJSON() ([]byte, error) {
  229. type NoMethod GoogleCloudVideointelligenceV1ExplicitContentFrame
  230. raw := NoMethod(*s)
  231. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  232. }
  233. // GoogleCloudVideointelligenceV1LabelAnnotation: Label annotation.
  234. type GoogleCloudVideointelligenceV1LabelAnnotation struct {
  235. // CategoryEntities: Common categories for the detected entity.
  236. // E.g. when the label is `Terrier` the category is likely `dog`. And in
  237. // some
  238. // cases there might be more than one categories e.g. `Terrier` could
  239. // also be
  240. // a `pet`.
  241. CategoryEntities []*GoogleCloudVideointelligenceV1Entity `json:"categoryEntities,omitempty"`
  242. // Entity: Detected entity.
  243. Entity *GoogleCloudVideointelligenceV1Entity `json:"entity,omitempty"`
  244. // Frames: All video frames where a label was detected.
  245. Frames []*GoogleCloudVideointelligenceV1LabelFrame `json:"frames,omitempty"`
  246. // Segments: All video segments where a label was detected.
  247. Segments []*GoogleCloudVideointelligenceV1LabelSegment `json:"segments,omitempty"`
  248. // ForceSendFields is a list of field names (e.g. "CategoryEntities") to
  249. // unconditionally include in API requests. By default, fields with
  250. // empty values are omitted from API requests. However, any non-pointer,
  251. // non-interface field appearing in ForceSendFields will be sent to the
  252. // server regardless of whether the field is empty or not. This may be
  253. // used to include empty fields in Patch requests.
  254. ForceSendFields []string `json:"-"`
  255. // NullFields is a list of field names (e.g. "CategoryEntities") to
  256. // include in API requests with the JSON null value. By default, fields
  257. // with empty values are omitted from API requests. However, any field
  258. // with an empty value appearing in NullFields will be sent to the
  259. // server as null. It is an error if a field in this list has a
  260. // non-empty value. This may be used to include null fields in Patch
  261. // requests.
  262. NullFields []string `json:"-"`
  263. }
  264. func (s *GoogleCloudVideointelligenceV1LabelAnnotation) MarshalJSON() ([]byte, error) {
  265. type NoMethod GoogleCloudVideointelligenceV1LabelAnnotation
  266. raw := NoMethod(*s)
  267. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  268. }
  269. // GoogleCloudVideointelligenceV1LabelFrame: Video frame level
  270. // annotation results for label detection.
  271. type GoogleCloudVideointelligenceV1LabelFrame struct {
  272. // Confidence: Confidence that the label is accurate. Range: [0, 1].
  273. Confidence float64 `json:"confidence,omitempty"`
  274. // TimeOffset: Time-offset, relative to the beginning of the video,
  275. // corresponding to the
  276. // video frame for this location.
  277. TimeOffset string `json:"timeOffset,omitempty"`
  278. // ForceSendFields is a list of field names (e.g. "Confidence") to
  279. // unconditionally include in API requests. By default, fields with
  280. // empty values are omitted from API requests. However, any non-pointer,
  281. // non-interface field appearing in ForceSendFields will be sent to the
  282. // server regardless of whether the field is empty or not. This may be
  283. // used to include empty fields in Patch requests.
  284. ForceSendFields []string `json:"-"`
  285. // NullFields is a list of field names (e.g. "Confidence") to include in
  286. // API requests with the JSON null value. By default, fields with empty
  287. // values are omitted from API requests. However, any field with an
  288. // empty value appearing in NullFields will be sent to the server as
  289. // null. It is an error if a field in this list has a non-empty value.
  290. // This may be used to include null fields in Patch requests.
  291. NullFields []string `json:"-"`
  292. }
  293. func (s *GoogleCloudVideointelligenceV1LabelFrame) MarshalJSON() ([]byte, error) {
  294. type NoMethod GoogleCloudVideointelligenceV1LabelFrame
  295. raw := NoMethod(*s)
  296. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  297. }
  298. func (s *GoogleCloudVideointelligenceV1LabelFrame) UnmarshalJSON(data []byte) error {
  299. type NoMethod GoogleCloudVideointelligenceV1LabelFrame
  300. var s1 struct {
  301. Confidence gensupport.JSONFloat64 `json:"confidence"`
  302. *NoMethod
  303. }
  304. s1.NoMethod = (*NoMethod)(s)
  305. if err := json.Unmarshal(data, &s1); err != nil {
  306. return err
  307. }
  308. s.Confidence = float64(s1.Confidence)
  309. return nil
  310. }
  311. // GoogleCloudVideointelligenceV1LabelSegment: Video segment level
  312. // annotation results for label detection.
  313. type GoogleCloudVideointelligenceV1LabelSegment struct {
  314. // Confidence: Confidence that the label is accurate. Range: [0, 1].
  315. Confidence float64 `json:"confidence,omitempty"`
  316. // Segment: Video segment where a label was detected.
  317. Segment *GoogleCloudVideointelligenceV1VideoSegment `json:"segment,omitempty"`
  318. // ForceSendFields is a list of field names (e.g. "Confidence") to
  319. // unconditionally include in API requests. By default, fields with
  320. // empty values are omitted from API requests. However, any non-pointer,
  321. // non-interface field appearing in ForceSendFields will be sent to the
  322. // server regardless of whether the field is empty or not. This may be
  323. // used to include empty fields in Patch requests.
  324. ForceSendFields []string `json:"-"`
  325. // NullFields is a list of field names (e.g. "Confidence") to include in
  326. // API requests with the JSON null value. By default, fields with empty
  327. // values are omitted from API requests. However, any field with an
  328. // empty value appearing in NullFields will be sent to the server as
  329. // null. It is an error if a field in this list has a non-empty value.
  330. // This may be used to include null fields in Patch requests.
  331. NullFields []string `json:"-"`
  332. }
  333. func (s *GoogleCloudVideointelligenceV1LabelSegment) MarshalJSON() ([]byte, error) {
  334. type NoMethod GoogleCloudVideointelligenceV1LabelSegment
  335. raw := NoMethod(*s)
  336. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  337. }
  338. func (s *GoogleCloudVideointelligenceV1LabelSegment) UnmarshalJSON(data []byte) error {
  339. type NoMethod GoogleCloudVideointelligenceV1LabelSegment
  340. var s1 struct {
  341. Confidence gensupport.JSONFloat64 `json:"confidence"`
  342. *NoMethod
  343. }
  344. s1.NoMethod = (*NoMethod)(s)
  345. if err := json.Unmarshal(data, &s1); err != nil {
  346. return err
  347. }
  348. s.Confidence = float64(s1.Confidence)
  349. return nil
  350. }
  351. // GoogleCloudVideointelligenceV1VideoAnnotationProgress: Annotation
  352. // progress for a single video.
  353. type GoogleCloudVideointelligenceV1VideoAnnotationProgress struct {
  354. // InputUri: Output only. Video file location in
  355. // [Google Cloud Storage](https://cloud.google.com/storage/).
  356. InputUri string `json:"inputUri,omitempty"`
  357. // ProgressPercent: Output only. Approximate percentage processed thus
  358. // far. Guaranteed to be
  359. // 100 when fully processed.
  360. ProgressPercent int64 `json:"progressPercent,omitempty"`
  361. // StartTime: Output only. Time when the request was received.
  362. StartTime string `json:"startTime,omitempty"`
  363. // UpdateTime: Output only. Time of the most recent update.
  364. UpdateTime string `json:"updateTime,omitempty"`
  365. // ForceSendFields is a list of field names (e.g. "InputUri") to
  366. // unconditionally include in API requests. By default, fields with
  367. // empty values are omitted from API requests. However, any non-pointer,
  368. // non-interface field appearing in ForceSendFields will be sent to the
  369. // server regardless of whether the field is empty or not. This may be
  370. // used to include empty fields in Patch requests.
  371. ForceSendFields []string `json:"-"`
  372. // NullFields is a list of field names (e.g. "InputUri") to include in
  373. // API requests with the JSON null value. By default, fields with empty
  374. // values are omitted from API requests. However, any field with an
  375. // empty value appearing in NullFields will be sent to the server as
  376. // null. It is an error if a field in this list has a non-empty value.
  377. // This may be used to include null fields in Patch requests.
  378. NullFields []string `json:"-"`
  379. }
  380. func (s *GoogleCloudVideointelligenceV1VideoAnnotationProgress) MarshalJSON() ([]byte, error) {
  381. type NoMethod GoogleCloudVideointelligenceV1VideoAnnotationProgress
  382. raw := NoMethod(*s)
  383. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  384. }
  385. // GoogleCloudVideointelligenceV1VideoAnnotationResults: Annotation
  386. // results for a single video.
  387. type GoogleCloudVideointelligenceV1VideoAnnotationResults struct {
  388. // Error: Output only. Non-streaming error only. If set, indicates an
  389. // error. Note
  390. // that for a single `AnnotateVideoRequest` some videos may succeed and
  391. // some
  392. // may fail.
  393. Error *GoogleRpcStatus `json:"error,omitempty"`
  394. // ExplicitAnnotation: Explicit content annotation.
  395. ExplicitAnnotation *GoogleCloudVideointelligenceV1ExplicitContentAnnotation `json:"explicitAnnotation,omitempty"`
  396. // FrameLabelAnnotations: Label annotations on frame level.
  397. // There is exactly one element for each unique label.
  398. FrameLabelAnnotations []*GoogleCloudVideointelligenceV1LabelAnnotation `json:"frameLabelAnnotations,omitempty"`
  399. // InputUri: Output only. Video file location in
  400. // [Google Cloud Storage](https://cloud.google.com/storage/).
  401. InputUri string `json:"inputUri,omitempty"`
  402. // SegmentLabelAnnotations: Label annotations on video level or user
  403. // specified segment level.
  404. // There is exactly one element for each unique label.
  405. SegmentLabelAnnotations []*GoogleCloudVideointelligenceV1LabelAnnotation `json:"segmentLabelAnnotations,omitempty"`
  406. // ShotAnnotations: Shot annotations. Each shot is represented as a
  407. // video segment.
  408. ShotAnnotations []*GoogleCloudVideointelligenceV1VideoSegment `json:"shotAnnotations,omitempty"`
  409. // ShotLabelAnnotations: Label annotations on shot level.
  410. // There is exactly one element for each unique label.
  411. ShotLabelAnnotations []*GoogleCloudVideointelligenceV1LabelAnnotation `json:"shotLabelAnnotations,omitempty"`
  412. // ForceSendFields is a list of field names (e.g. "Error") to
  413. // unconditionally include in API requests. By default, fields with
  414. // empty values are omitted from API requests. However, any non-pointer,
  415. // non-interface field appearing in ForceSendFields will be sent to the
  416. // server regardless of whether the field is empty or not. This may be
  417. // used to include empty fields in Patch requests.
  418. ForceSendFields []string `json:"-"`
  419. // NullFields is a list of field names (e.g. "Error") to include in API
  420. // requests with the JSON null value. By default, fields with empty
  421. // values are omitted from API requests. However, any field with an
  422. // empty value appearing in NullFields will be sent to the server as
  423. // null. It is an error if a field in this list has a non-empty value.
  424. // This may be used to include null fields in Patch requests.
  425. NullFields []string `json:"-"`
  426. }
  427. func (s *GoogleCloudVideointelligenceV1VideoAnnotationResults) MarshalJSON() ([]byte, error) {
  428. type NoMethod GoogleCloudVideointelligenceV1VideoAnnotationResults
  429. raw := NoMethod(*s)
  430. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  431. }
  432. // GoogleCloudVideointelligenceV1VideoSegment: Video segment.
  433. type GoogleCloudVideointelligenceV1VideoSegment struct {
  434. // EndTimeOffset: Time-offset, relative to the beginning of the
  435. // video,
  436. // corresponding to the end of the segment (inclusive).
  437. EndTimeOffset string `json:"endTimeOffset,omitempty"`
  438. // StartTimeOffset: Time-offset, relative to the beginning of the
  439. // video,
  440. // corresponding to the start of the segment (inclusive).
  441. StartTimeOffset string `json:"startTimeOffset,omitempty"`
  442. // ForceSendFields is a list of field names (e.g. "EndTimeOffset") to
  443. // unconditionally include in API requests. By default, fields with
  444. // empty values are omitted from API requests. However, any non-pointer,
  445. // non-interface field appearing in ForceSendFields will be sent to the
  446. // server regardless of whether the field is empty or not. This may be
  447. // used to include empty fields in Patch requests.
  448. ForceSendFields []string `json:"-"`
  449. // NullFields is a list of field names (e.g. "EndTimeOffset") to include
  450. // in API requests with the JSON null value. By default, fields with
  451. // empty values are omitted from API requests. However, any field with
  452. // an empty value appearing in NullFields will be sent to the server as
  453. // null. It is an error if a field in this list has a non-empty value.
  454. // This may be used to include null fields in Patch requests.
  455. NullFields []string `json:"-"`
  456. }
  457. func (s *GoogleCloudVideointelligenceV1VideoSegment) MarshalJSON() ([]byte, error) {
  458. type NoMethod GoogleCloudVideointelligenceV1VideoSegment
  459. raw := NoMethod(*s)
  460. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  461. }
  462. // GoogleCloudVideointelligenceV1beta1AnnotateVideoProgress: Video
  463. // annotation progress. Included in the `metadata`
  464. // field of the `Operation` returned by the `GetOperation`
  465. // call of the `google::longrunning::Operations` service.
  466. type GoogleCloudVideointelligenceV1beta1AnnotateVideoProgress struct {
  467. // AnnotationProgress: Progress metadata for all videos specified in
  468. // `AnnotateVideoRequest`.
  469. AnnotationProgress []*GoogleCloudVideointelligenceV1beta1VideoAnnotationProgress `json:"annotationProgress,omitempty"`
  470. // ForceSendFields is a list of field names (e.g. "AnnotationProgress")
  471. // to unconditionally include in API requests. By default, fields with
  472. // empty values are omitted from API requests. However, any non-pointer,
  473. // non-interface field appearing in ForceSendFields will be sent to the
  474. // server regardless of whether the field is empty or not. This may be
  475. // used to include empty fields in Patch requests.
  476. ForceSendFields []string `json:"-"`
  477. // NullFields is a list of field names (e.g. "AnnotationProgress") to
  478. // include in API requests with the JSON null value. By default, fields
  479. // with empty values are omitted from API requests. However, any field
  480. // with an empty value appearing in NullFields will be sent to the
  481. // server as null. It is an error if a field in this list has a
  482. // non-empty value. This may be used to include null fields in Patch
  483. // requests.
  484. NullFields []string `json:"-"`
  485. }
  486. func (s *GoogleCloudVideointelligenceV1beta1AnnotateVideoProgress) MarshalJSON() ([]byte, error) {
  487. type NoMethod GoogleCloudVideointelligenceV1beta1AnnotateVideoProgress
  488. raw := NoMethod(*s)
  489. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  490. }
  491. // GoogleCloudVideointelligenceV1beta1AnnotateVideoRequest: Video
  492. // annotation request.
  493. type GoogleCloudVideointelligenceV1beta1AnnotateVideoRequest struct {
  494. // Features: Requested video annotation features.
  495. //
  496. // Possible values:
  497. // "FEATURE_UNSPECIFIED" - Unspecified.
  498. // "LABEL_DETECTION" - Label detection. Detect objects, such as dog or
  499. // flower.
  500. // "SHOT_CHANGE_DETECTION" - Shot change detection.
  501. // "SAFE_SEARCH_DETECTION" - Safe search detection.
  502. Features []string `json:"features,omitempty"`
  503. // InputContent: The video data bytes. Encoding: base64. If unset, the
  504. // input video(s)
  505. // should be specified via `input_uri`. If set, `input_uri` should be
  506. // unset.
  507. InputContent string `json:"inputContent,omitempty"`
  508. // InputUri: Input video location. Currently, only
  509. // [Google Cloud Storage](https://cloud.google.com/storage/) URIs
  510. // are
  511. // supported, which must be specified in the following
  512. // format:
  513. // `gs://bucket-id/object-id` (other URI formats
  514. // return
  515. // google.rpc.Code.INVALID_ARGUMENT). For more information, see
  516. // [Request URIs](/storage/docs/reference-uris).
  517. // A video URI may include wildcards in `object-id`, and thus
  518. // identify
  519. // multiple videos. Supported wildcards: '*' to match 0 or more
  520. // characters;
  521. // '?' to match 1 character. If unset, the input video should be
  522. // embedded
  523. // in the request as `input_content`. If set, `input_content` should be
  524. // unset.
  525. InputUri string `json:"inputUri,omitempty"`
  526. // LocationId: Optional cloud region where annotation should take place.
  527. // Supported cloud
  528. // regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no
  529. // region
  530. // is specified, a region will be determined based on video file
  531. // location.
  532. LocationId string `json:"locationId,omitempty"`
  533. // OutputUri: Optional location where the output (in JSON format) should
  534. // be stored.
  535. // Currently, only [Google Cloud
  536. // Storage](https://cloud.google.com/storage/)
  537. // URIs are supported, which must be specified in the following
  538. // format:
  539. // `gs://bucket-id/object-id` (other URI formats
  540. // return
  541. // google.rpc.Code.INVALID_ARGUMENT). For more information, see
  542. // [Request URIs](/storage/docs/reference-uris).
  543. OutputUri string `json:"outputUri,omitempty"`
  544. // VideoContext: Additional video context and/or feature-specific
  545. // parameters.
  546. VideoContext *GoogleCloudVideointelligenceV1beta1VideoContext `json:"videoContext,omitempty"`
  547. // ForceSendFields is a list of field names (e.g. "Features") to
  548. // unconditionally include in API requests. By default, fields with
  549. // empty values are omitted from API requests. However, any non-pointer,
  550. // non-interface field appearing in ForceSendFields will be sent to the
  551. // server regardless of whether the field is empty or not. This may be
  552. // used to include empty fields in Patch requests.
  553. ForceSendFields []string `json:"-"`
  554. // NullFields is a list of field names (e.g. "Features") to include in
  555. // API requests with the JSON null value. By default, fields with empty
  556. // values are omitted from API requests. However, any field with an
  557. // empty value appearing in NullFields will be sent to the server as
  558. // null. It is an error if a field in this list has a non-empty value.
  559. // This may be used to include null fields in Patch requests.
  560. NullFields []string `json:"-"`
  561. }
  562. func (s *GoogleCloudVideointelligenceV1beta1AnnotateVideoRequest) MarshalJSON() ([]byte, error) {
  563. type NoMethod GoogleCloudVideointelligenceV1beta1AnnotateVideoRequest
  564. raw := NoMethod(*s)
  565. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  566. }
  567. // GoogleCloudVideointelligenceV1beta1AnnotateVideoResponse: Video
  568. // annotation response. Included in the `response`
  569. // field of the `Operation` returned by the `GetOperation`
  570. // call of the `google::longrunning::Operations` service.
  571. type GoogleCloudVideointelligenceV1beta1AnnotateVideoResponse struct {
  572. // AnnotationResults: Annotation results for all videos specified in
  573. // `AnnotateVideoRequest`.
  574. AnnotationResults []*GoogleCloudVideointelligenceV1beta1VideoAnnotationResults `json:"annotationResults,omitempty"`
  575. // ForceSendFields is a list of field names (e.g. "AnnotationResults")
  576. // to unconditionally include in API requests. By default, fields with
  577. // empty values are omitted from API requests. However, any non-pointer,
  578. // non-interface field appearing in ForceSendFields will be sent to the
  579. // server regardless of whether the field is empty or not. This may be
  580. // used to include empty fields in Patch requests.
  581. ForceSendFields []string `json:"-"`
  582. // NullFields is a list of field names (e.g. "AnnotationResults") to
  583. // include in API requests with the JSON null value. By default, fields
  584. // with empty values are omitted from API requests. However, any field
  585. // with an empty value appearing in NullFields will be sent to the
  586. // server as null. It is an error if a field in this list has a
  587. // non-empty value. This may be used to include null fields in Patch
  588. // requests.
  589. NullFields []string `json:"-"`
  590. }
  591. func (s *GoogleCloudVideointelligenceV1beta1AnnotateVideoResponse) MarshalJSON() ([]byte, error) {
  592. type NoMethod GoogleCloudVideointelligenceV1beta1AnnotateVideoResponse
  593. raw := NoMethod(*s)
  594. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  595. }
  596. // GoogleCloudVideointelligenceV1beta1LabelAnnotation: Label annotation.
  597. type GoogleCloudVideointelligenceV1beta1LabelAnnotation struct {
  598. // Description: Textual description, e.g. `Fixed-gear bicycle`.
  599. Description string `json:"description,omitempty"`
  600. // LanguageCode: Language code for `description` in BCP-47 format.
  601. LanguageCode string `json:"languageCode,omitempty"`
  602. // Locations: Where the label was detected and with what confidence.
  603. Locations []*GoogleCloudVideointelligenceV1beta1LabelLocation `json:"locations,omitempty"`
  604. // ForceSendFields is a list of field names (e.g. "Description") to
  605. // unconditionally include in API requests. By default, fields with
  606. // empty values are omitted from API requests. However, any non-pointer,
  607. // non-interface field appearing in ForceSendFields will be sent to the
  608. // server regardless of whether the field is empty or not. This may be
  609. // used to include empty fields in Patch requests.
  610. ForceSendFields []string `json:"-"`
  611. // NullFields is a list of field names (e.g. "Description") to include
  612. // in API requests with the JSON null value. By default, fields with
  613. // empty values are omitted from API requests. However, any field with
  614. // an empty value appearing in NullFields will be sent to the server as
  615. // null. It is an error if a field in this list has a non-empty value.
  616. // This may be used to include null fields in Patch requests.
  617. NullFields []string `json:"-"`
  618. }
  619. func (s *GoogleCloudVideointelligenceV1beta1LabelAnnotation) MarshalJSON() ([]byte, error) {
  620. type NoMethod GoogleCloudVideointelligenceV1beta1LabelAnnotation
  621. raw := NoMethod(*s)
  622. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  623. }
  624. // GoogleCloudVideointelligenceV1beta1LabelLocation: Label location.
  625. type GoogleCloudVideointelligenceV1beta1LabelLocation struct {
  626. // Confidence: Confidence that the label is accurate. Range: [0, 1].
  627. Confidence float64 `json:"confidence,omitempty"`
  628. // Level: Label level.
  629. //
  630. // Possible values:
  631. // "LABEL_LEVEL_UNSPECIFIED" - Unspecified.
  632. // "VIDEO_LEVEL" - Video-level. Corresponds to the whole video.
  633. // "SEGMENT_LEVEL" - Segment-level. Corresponds to one of
  634. // `AnnotateSpec.segments`.
  635. // "SHOT_LEVEL" - Shot-level. Corresponds to a single shot (i.e. a
  636. // series of frames
  637. // without a major camera position or background change).
  638. // "FRAME_LEVEL" - Frame-level. Corresponds to a single video frame.
  639. Level string `json:"level,omitempty"`
  640. // Segment: Video segment. Set to [-1, -1] for video-level labels.
  641. // Set to [timestamp, timestamp] for frame-level labels.
  642. // Otherwise, corresponds to one of `AnnotateSpec.segments`
  643. // (if specified) or to shot boundaries (if requested).
  644. Segment *GoogleCloudVideointelligenceV1beta1VideoSegment `json:"segment,omitempty"`
  645. // ForceSendFields is a list of field names (e.g. "Confidence") to
  646. // unconditionally include in API requests. By default, fields with
  647. // empty values are omitted from API requests. However, any non-pointer,
  648. // non-interface field appearing in ForceSendFields will be sent to the
  649. // server regardless of whether the field is empty or not. This may be
  650. // used to include empty fields in Patch requests.
  651. ForceSendFields []string `json:"-"`
  652. // NullFields is a list of field names (e.g. "Confidence") to include in
  653. // API requests with the JSON null value. By default, fields with empty
  654. // values are omitted from API requests. However, any field with an
  655. // empty value appearing in NullFields will be sent to the server as
  656. // null. It is an error if a field in this list has a non-empty value.
  657. // This may be used to include null fields in Patch requests.
  658. NullFields []string `json:"-"`
  659. }
  660. func (s *GoogleCloudVideointelligenceV1beta1LabelLocation) MarshalJSON() ([]byte, error) {
  661. type NoMethod GoogleCloudVideointelligenceV1beta1LabelLocation
  662. raw := NoMethod(*s)
  663. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  664. }
  665. func (s *GoogleCloudVideointelligenceV1beta1LabelLocation) UnmarshalJSON(data []byte) error {
  666. type NoMethod GoogleCloudVideointelligenceV1beta1LabelLocation
  667. var s1 struct {
  668. Confidence gensupport.JSONFloat64 `json:"confidence"`
  669. *NoMethod
  670. }
  671. s1.NoMethod = (*NoMethod)(s)
  672. if err := json.Unmarshal(data, &s1); err != nil {
  673. return err
  674. }
  675. s.Confidence = float64(s1.Confidence)
  676. return nil
  677. }
  678. // GoogleCloudVideointelligenceV1beta1SafeSearchAnnotation: Safe search
  679. // annotation (based on per-frame visual signals only).
  680. // If no unsafe content has been detected in a frame, no annotations
  681. // are present for that frame. If only some types of unsafe content
  682. // have been detected in a frame, the likelihood is set to `UNKNOWN`
  683. // for all other types of unsafe content.
  684. type GoogleCloudVideointelligenceV1beta1SafeSearchAnnotation struct {
  685. // Adult: Likelihood of adult content.
  686. //
  687. // Possible values:
  688. // "UNKNOWN" - Unknown likelihood.
  689. // "VERY_UNLIKELY" - Very unlikely.
  690. // "UNLIKELY" - Unlikely.
  691. // "POSSIBLE" - Possible.
  692. // "LIKELY" - Likely.
  693. // "VERY_LIKELY" - Very likely.
  694. Adult string `json:"adult,omitempty"`
  695. // Medical: Likelihood of medical content.
  696. //
  697. // Possible values:
  698. // "UNKNOWN" - Unknown likelihood.
  699. // "VERY_UNLIKELY" - Very unlikely.
  700. // "UNLIKELY" - Unlikely.
  701. // "POSSIBLE" - Possible.
  702. // "LIKELY" - Likely.
  703. // "VERY_LIKELY" - Very likely.
  704. Medical string `json:"medical,omitempty"`
  705. // Racy: Likelihood of racy content.
  706. //
  707. // Possible values:
  708. // "UNKNOWN" - Unknown likelihood.
  709. // "VERY_UNLIKELY" - Very unlikely.
  710. // "UNLIKELY" - Unlikely.
  711. // "POSSIBLE" - Possible.
  712. // "LIKELY" - Likely.
  713. // "VERY_LIKELY" - Very likely.
  714. Racy string `json:"racy,omitempty"`
  715. // Spoof: Likelihood that an obvious modification was made to the
  716. // original
  717. // version to make it appear funny or offensive.
  718. //
  719. // Possible values:
  720. // "UNKNOWN" - Unknown likelihood.
  721. // "VERY_UNLIKELY" - Very unlikely.
  722. // "UNLIKELY" - Unlikely.
  723. // "POSSIBLE" - Possible.
  724. // "LIKELY" - Likely.
  725. // "VERY_LIKELY" - Very likely.
  726. Spoof string `json:"spoof,omitempty"`
  727. // TimeOffset: Video time offset in microseconds.
  728. TimeOffset int64 `json:"timeOffset,omitempty,string"`
  729. // Violent: Likelihood of violent content.
  730. //
  731. // Possible values:
  732. // "UNKNOWN" - Unknown likelihood.
  733. // "VERY_UNLIKELY" - Very unlikely.
  734. // "UNLIKELY" - Unlikely.
  735. // "POSSIBLE" - Possible.
  736. // "LIKELY" - Likely.
  737. // "VERY_LIKELY" - Very likely.
  738. Violent string `json:"violent,omitempty"`
  739. // ForceSendFields is a list of field names (e.g. "Adult") to
  740. // unconditionally include in API requests. By default, fields with
  741. // empty values are omitted from API requests. However, any non-pointer,
  742. // non-interface field appearing in ForceSendFields will be sent to the
  743. // server regardless of whether the field is empty or not. This may be
  744. // used to include empty fields in Patch requests.
  745. ForceSendFields []string `json:"-"`
  746. // NullFields is a list of field names (e.g. "Adult") to include in API
  747. // requests with the JSON null value. By default, fields with empty
  748. // values are omitted from API requests. However, any field with an
  749. // empty value appearing in NullFields will be sent to the server as
  750. // null. It is an error if a field in this list has a non-empty value.
  751. // This may be used to include null fields in Patch requests.
  752. NullFields []string `json:"-"`
  753. }
  754. func (s *GoogleCloudVideointelligenceV1beta1SafeSearchAnnotation) MarshalJSON() ([]byte, error) {
  755. type NoMethod GoogleCloudVideointelligenceV1beta1SafeSearchAnnotation
  756. raw := NoMethod(*s)
  757. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  758. }
  759. // GoogleCloudVideointelligenceV1beta1VideoAnnotationProgress:
  760. // Annotation progress for a single video.
  761. type GoogleCloudVideointelligenceV1beta1VideoAnnotationProgress struct {
  762. // InputUri: Video file location in
  763. // [Google Cloud Storage](https://cloud.google.com/storage/).
  764. InputUri string `json:"inputUri,omitempty"`
  765. // ProgressPercent: Approximate percentage processed thus
  766. // far.
  767. // Guaranteed to be 100 when fully processed.
  768. ProgressPercent int64 `json:"progressPercent,omitempty"`
  769. // StartTime: Time when the request was received.
  770. StartTime string `json:"startTime,omitempty"`
  771. // UpdateTime: Time of the most recent update.
  772. UpdateTime string `json:"updateTime,omitempty"`
  773. // ForceSendFields is a list of field names (e.g. "InputUri") to
  774. // unconditionally include in API requests. By default, fields with
  775. // empty values are omitted from API requests. However, any non-pointer,
  776. // non-interface field appearing in ForceSendFields will be sent to the
  777. // server regardless of whether the field is empty or not. This may be
  778. // used to include empty fields in Patch requests.
  779. ForceSendFields []string `json:"-"`
  780. // NullFields is a list of field names (e.g. "InputUri") to include in
  781. // API requests with the JSON null value. By default, fields with empty
  782. // values are omitted from API requests. However, any field with an
  783. // empty value appearing in NullFields will be sent to the server as
  784. // null. It is an error if a field in this list has a non-empty value.
  785. // This may be used to include null fields in Patch requests.
  786. NullFields []string `json:"-"`
  787. }
  788. func (s *GoogleCloudVideointelligenceV1beta1VideoAnnotationProgress) MarshalJSON() ([]byte, error) {
  789. type NoMethod GoogleCloudVideointelligenceV1beta1VideoAnnotationProgress
  790. raw := NoMethod(*s)
  791. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  792. }
  793. // GoogleCloudVideointelligenceV1beta1VideoAnnotationResults: Annotation
  794. // results for a single video.
  795. type GoogleCloudVideointelligenceV1beta1VideoAnnotationResults struct {
  796. // Error: If set, indicates an error. Note that for a single
  797. // `AnnotateVideoRequest`
  798. // some videos may succeed and some may fail.
  799. Error *GoogleRpcStatus `json:"error,omitempty"`
  800. // InputUri: Video file location in
  801. // [Google Cloud Storage](https://cloud.google.com/storage/).
  802. InputUri string `json:"inputUri,omitempty"`
  803. // LabelAnnotations: Label annotations. There is exactly one element for
  804. // each unique label.
  805. LabelAnnotations []*GoogleCloudVideointelligenceV1beta1LabelAnnotation `json:"labelAnnotations,omitempty"`
  806. // SafeSearchAnnotations: Safe search annotations.
  807. SafeSearchAnnotations []*GoogleCloudVideointelligenceV1beta1SafeSearchAnnotation `json:"safeSearchAnnotations,omitempty"`
  808. // ShotAnnotations: Shot annotations. Each shot is represented as a
  809. // video segment.
  810. ShotAnnotations []*GoogleCloudVideointelligenceV1beta1VideoSegment `json:"shotAnnotations,omitempty"`
  811. // ForceSendFields is a list of field names (e.g. "Error") to
  812. // unconditionally include in API requests. By default, fields with
  813. // empty values are omitted from API requests. However, any non-pointer,
  814. // non-interface field appearing in ForceSendFields will be sent to the
  815. // server regardless of whether the field is empty or not. This may be
  816. // used to include empty fields in Patch requests.
  817. ForceSendFields []string `json:"-"`
  818. // NullFields is a list of field names (e.g. "Error") to include in API
  819. // requests with the JSON null value. By default, fields with empty
  820. // values are omitted from API requests. However, any field with an
  821. // empty value appearing in NullFields will be sent to the server as
  822. // null. It is an error if a field in this list has a non-empty value.
  823. // This may be used to include null fields in Patch requests.
  824. NullFields []string `json:"-"`
  825. }
  826. func (s *GoogleCloudVideointelligenceV1beta1VideoAnnotationResults) MarshalJSON() ([]byte, error) {
  827. type NoMethod GoogleCloudVideointelligenceV1beta1VideoAnnotationResults
  828. raw := NoMethod(*s)
  829. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  830. }
  831. // GoogleCloudVideointelligenceV1beta1VideoContext: Video context and/or
  832. // feature-specific parameters.
  833. type GoogleCloudVideointelligenceV1beta1VideoContext struct {
  834. // LabelDetectionMode: If label detection has been requested, what
  835. // labels should be detected
  836. // in addition to video-level labels or segment-level labels. If
  837. // unspecified,
  838. // defaults to `SHOT_MODE`.
  839. //
  840. // Possible values:
  841. // "LABEL_DETECTION_MODE_UNSPECIFIED" - Unspecified.
  842. // "SHOT_MODE" - Detect shot-level labels.
  843. // "FRAME_MODE" - Detect frame-level labels.
  844. // "SHOT_AND_FRAME_MODE" - Detect both shot-level and frame-level
  845. // labels.
  846. LabelDetectionMode string `json:"labelDetectionMode,omitempty"`
  847. // LabelDetectionModel: Model to use for label detection.
  848. // Supported values: "latest" and "stable" (the default).
  849. LabelDetectionModel string `json:"labelDetectionModel,omitempty"`
  850. // SafeSearchDetectionModel: Model to use for safe search
  851. // detection.
  852. // Supported values: "latest" and "stable" (the default).
  853. SafeSearchDetectionModel string `json:"safeSearchDetectionModel,omitempty"`
  854. // Segments: Video segments to annotate. The segments may overlap and
  855. // are not required
  856. // to be contiguous or span the whole video. If unspecified, each
  857. // video
  858. // is treated as a single segment.
  859. Segments []*GoogleCloudVideointelligenceV1beta1VideoSegment `json:"segments,omitempty"`
  860. // ShotChangeDetectionModel: Model to use for shot change
  861. // detection.
  862. // Supported values: "latest" and "stable" (the default).
  863. ShotChangeDetectionModel string `json:"shotChangeDetectionModel,omitempty"`
  864. // StationaryCamera: Whether the video has been shot from a stationary
  865. // (i.e. non-moving) camera.
  866. // When set to true, might improve detection accuracy for moving
  867. // objects.
  868. StationaryCamera bool `json:"stationaryCamera,omitempty"`
  869. // ForceSendFields is a list of field names (e.g. "LabelDetectionMode")
  870. // to unconditionally include in API requests. By default, fields with
  871. // empty values are omitted from API requests. However, any non-pointer,
  872. // non-interface field appearing in ForceSendFields will be sent to the
  873. // server regardless of whether the field is empty or not. This may be
  874. // used to include empty fields in Patch requests.
  875. ForceSendFields []string `json:"-"`
  876. // NullFields is a list of field names (e.g. "LabelDetectionMode") to
  877. // include in API requests with the JSON null value. By default, fields
  878. // with empty values are omitted from API requests. However, any field
  879. // with an empty value appearing in NullFields will be sent to the
  880. // server as null. It is an error if a field in this list has a
  881. // non-empty value. This may be used to include null fields in Patch
  882. // requests.
  883. NullFields []string `json:"-"`
  884. }
  885. func (s *GoogleCloudVideointelligenceV1beta1VideoContext) MarshalJSON() ([]byte, error) {
  886. type NoMethod GoogleCloudVideointelligenceV1beta1VideoContext
  887. raw := NoMethod(*s)
  888. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  889. }
  890. // GoogleCloudVideointelligenceV1beta1VideoSegment: Video segment.
  891. type GoogleCloudVideointelligenceV1beta1VideoSegment struct {
  892. // EndTimeOffset: End offset in microseconds (inclusive). Unset means 0.
  893. EndTimeOffset int64 `json:"endTimeOffset,omitempty,string"`
  894. // StartTimeOffset: Start offset in microseconds (inclusive). Unset
  895. // means 0.
  896. StartTimeOffset int64 `json:"startTimeOffset,omitempty,string"`
  897. // ForceSendFields is a list of field names (e.g. "EndTimeOffset") to
  898. // unconditionally include in API requests. By default, fields with
  899. // empty values are omitted from API requests. However, any non-pointer,
  900. // non-interface field appearing in ForceSendFields will be sent to the
  901. // server regardless of whether the field is empty or not. This may be
  902. // used to include empty fields in Patch requests.
  903. ForceSendFields []string `json:"-"`
  904. // NullFields is a list of field names (e.g. "EndTimeOffset") to include
  905. // in API requests with the JSON null value. By default, fields with
  906. // empty values are omitted from API requests. However, any field with
  907. // an empty value appearing in NullFields will be sent to the server as
  908. // null. It is an error if a field in this list has a non-empty value.
  909. // This may be used to include null fields in Patch requests.
  910. NullFields []string `json:"-"`
  911. }
  912. func (s *GoogleCloudVideointelligenceV1beta1VideoSegment) MarshalJSON() ([]byte, error) {
  913. type NoMethod GoogleCloudVideointelligenceV1beta1VideoSegment
  914. raw := NoMethod(*s)
  915. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  916. }
  917. // GoogleCloudVideointelligenceV1beta2AnnotateVideoProgress: Video
  918. // annotation progress. Included in the `metadata`
  919. // field of the `Operation` returned by the `GetOperation`
  920. // call of the `google::longrunning::Operations` service.
  921. type GoogleCloudVideointelligenceV1beta2AnnotateVideoProgress struct {
  922. // AnnotationProgress: Progress metadata for all videos specified in
  923. // `AnnotateVideoRequest`.
  924. AnnotationProgress []*GoogleCloudVideointelligenceV1beta2VideoAnnotationProgress `json:"annotationProgress,omitempty"`
  925. // ForceSendFields is a list of field names (e.g. "AnnotationProgress")
  926. // to unconditionally include in API requests. By default, fields with
  927. // empty values are omitted from API requests. However, any non-pointer,
  928. // non-interface field appearing in ForceSendFields will be sent to the
  929. // server regardless of whether the field is empty or not. This may be
  930. // used to include empty fields in Patch requests.
  931. ForceSendFields []string `json:"-"`
  932. // NullFields is a list of field names (e.g. "AnnotationProgress") to
  933. // include in API requests with the JSON null value. By default, fields
  934. // with empty values are omitted from API requests. However, any field
  935. // with an empty value appearing in NullFields will be sent to the
  936. // server as null. It is an error if a field in this list has a
  937. // non-empty value. This may be used to include null fields in Patch
  938. // requests.
  939. NullFields []string `json:"-"`
  940. }
  941. func (s *GoogleCloudVideointelligenceV1beta2AnnotateVideoProgress) MarshalJSON() ([]byte, error) {
  942. type NoMethod GoogleCloudVideointelligenceV1beta2AnnotateVideoProgress
  943. raw := NoMethod(*s)
  944. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  945. }
  946. // GoogleCloudVideointelligenceV1beta2AnnotateVideoResponse: Video
  947. // annotation response. Included in the `response`
  948. // field of the `Operation` returned by the `GetOperation`
  949. // call of the `google::longrunning::Operations` service.
  950. type GoogleCloudVideointelligenceV1beta2AnnotateVideoResponse struct {
  951. // AnnotationResults: Annotation results for all videos specified in
  952. // `AnnotateVideoRequest`.
  953. AnnotationResults []*GoogleCloudVideointelligenceV1beta2VideoAnnotationResults `json:"annotationResults,omitempty"`
  954. // ForceSendFields is a list of field names (e.g. "AnnotationResults")
  955. // to unconditionally include in API requests. By default, fields with
  956. // empty values are omitted from API requests. However, any non-pointer,
  957. // non-interface field appearing in ForceSendFields will be sent to the
  958. // server regardless of whether the field is empty or not. This may be
  959. // used to include empty fields in Patch requests.
  960. ForceSendFields []string `json:"-"`
  961. // NullFields is a list of field names (e.g. "AnnotationResults") to
  962. // include in API requests with the JSON null value. By default, fields
  963. // with empty values are omitted from API requests. However, any field
  964. // with an empty value appearing in NullFields will be sent to the
  965. // server as null. It is an error if a field in this list has a
  966. // non-empty value. This may be used to include null fields in Patch
  967. // requests.
  968. NullFields []string `json:"-"`
  969. }
  970. func (s *GoogleCloudVideointelligenceV1beta2AnnotateVideoResponse) MarshalJSON() ([]byte, error) {
  971. type NoMethod GoogleCloudVideointelligenceV1beta2AnnotateVideoResponse
  972. raw := NoMethod(*s)
  973. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  974. }
  975. // GoogleCloudVideointelligenceV1beta2Entity: Detected entity from video
  976. // analysis.
  977. type GoogleCloudVideointelligenceV1beta2Entity struct {
  978. // Description: Textual description, e.g. `Fixed-gear bicycle`.
  979. Description string `json:"description,omitempty"`
  980. // EntityId: Opaque entity ID. Some IDs may be available in
  981. // [Google Knowledge Graph
  982. // Search
  983. // API](https://developers.google.com/knowledge-graph/).
  984. EntityId string `json:"entityId,omitempty"`
  985. // LanguageCode: Language code for `description` in BCP-47 format.
  986. LanguageCode string `json:"languageCode,omitempty"`
  987. // ForceSendFields is a list of field names (e.g. "Description") to
  988. // unconditionally include in API requests. By default, fields with
  989. // empty values are omitted from API requests. However, any non-pointer,
  990. // non-interface field appearing in ForceSendFields will be sent to the
  991. // server regardless of whether the field is empty or not. This may be
  992. // used to include empty fields in Patch requests.
  993. ForceSendFields []string `json:"-"`
  994. // NullFields is a list of field names (e.g. "Description") to include
  995. // in API requests with the JSON null value. By default, fields with
  996. // empty values are omitted from API requests. However, any field with
  997. // an empty value appearing in NullFields will be sent to the server as
  998. // null. It is an error if a field in this list has a non-empty value.
  999. // This may be used to include null fields in Patch requests.
  1000. NullFields []string `json:"-"`
  1001. }
  1002. func (s *GoogleCloudVideointelligenceV1beta2Entity) MarshalJSON() ([]byte, error) {
  1003. type NoMethod GoogleCloudVideointelligenceV1beta2Entity
  1004. raw := NoMethod(*s)
  1005. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1006. }
  1007. // GoogleCloudVideointelligenceV1beta2ExplicitContentAnnotation:
  1008. // Explicit content annotation (based on per-frame visual signals
  1009. // only).
  1010. // If no explicit content has been detected in a frame, no annotations
  1011. // are
  1012. // present for that frame.
  1013. type GoogleCloudVideointelligenceV1beta2ExplicitContentAnnotation struct {
  1014. // Frames: All video frames where explicit content was detected.
  1015. Frames []*GoogleCloudVideointelligenceV1beta2ExplicitContentFrame `json:"frames,omitempty"`
  1016. // ForceSendFields is a list of field names (e.g. "Frames") to
  1017. // unconditionally include in API requests. By default, fields with
  1018. // empty values are omitted from API requests. However, any non-pointer,
  1019. // non-interface field appearing in ForceSendFields will be sent to the
  1020. // server regardless of whether the field is empty or not. This may be
  1021. // used to include empty fields in Patch requests.
  1022. ForceSendFields []string `json:"-"`
  1023. // NullFields is a list of field names (e.g. "Frames") to include in API
  1024. // requests with the JSON null value. By default, fields with empty
  1025. // values are omitted from API requests. However, any field with an
  1026. // empty value appearing in NullFields will be sent to the server as
  1027. // null. It is an error if a field in this list has a non-empty value.
  1028. // This may be used to include null fields in Patch requests.
  1029. NullFields []string `json:"-"`
  1030. }
  1031. func (s *GoogleCloudVideointelligenceV1beta2ExplicitContentAnnotation) MarshalJSON() ([]byte, error) {
  1032. type NoMethod GoogleCloudVideointelligenceV1beta2ExplicitContentAnnotation
  1033. raw := NoMethod(*s)
  1034. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1035. }
  1036. // GoogleCloudVideointelligenceV1beta2ExplicitContentFrame: Video frame
  1037. // level annotation results for explicit content.
  1038. type GoogleCloudVideointelligenceV1beta2ExplicitContentFrame struct {
  1039. // PornographyLikelihood: Likelihood of the pornography content..
  1040. //
  1041. // Possible values:
  1042. // "LIKELIHOOD_UNSPECIFIED" - Unspecified likelihood.
  1043. // "VERY_UNLIKELY" - Very unlikely.
  1044. // "UNLIKELY" - Unlikely.
  1045. // "POSSIBLE" - Possible.
  1046. // "LIKELY" - Likely.
  1047. // "VERY_LIKELY" - Very likely.
  1048. PornographyLikelihood string `json:"pornographyLikelihood,omitempty"`
  1049. // TimeOffset: Time-offset, relative to the beginning of the video,
  1050. // corresponding to the
  1051. // video frame for this location.
  1052. TimeOffset string `json:"timeOffset,omitempty"`
  1053. // ForceSendFields is a list of field names (e.g.
  1054. // "PornographyLikelihood") to unconditionally include in API requests.
  1055. // By default, fields with empty values are omitted from API requests.
  1056. // However, any non-pointer, non-interface field appearing in
  1057. // ForceSendFields will be sent to the server regardless of whether the
  1058. // field is empty or not. This may be used to include empty fields in
  1059. // Patch requests.
  1060. ForceSendFields []string `json:"-"`
  1061. // NullFields is a list of field names (e.g. "PornographyLikelihood") to
  1062. // include in API requests with the JSON null value. By default, fields
  1063. // with empty values are omitted from API requests. However, any field
  1064. // with an empty value appearing in NullFields will be sent to the
  1065. // server as null. It is an error if a field in this list has a
  1066. // non-empty value. This may be used to include null fields in Patch
  1067. // requests.
  1068. NullFields []string `json:"-"`
  1069. }
  1070. func (s *GoogleCloudVideointelligenceV1beta2ExplicitContentFrame) MarshalJSON() ([]byte, error) {
  1071. type NoMethod GoogleCloudVideointelligenceV1beta2ExplicitContentFrame
  1072. raw := NoMethod(*s)
  1073. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1074. }
  1075. // GoogleCloudVideointelligenceV1beta2LabelAnnotation: Label annotation.
  1076. type GoogleCloudVideointelligenceV1beta2LabelAnnotation struct {
  1077. // CategoryEntities: Common categories for the detected entity.
  1078. // E.g. when the label is `Terrier` the category is likely `dog`. And in
  1079. // some
  1080. // cases there might be more than one categories e.g. `Terrier` could
  1081. // also be
  1082. // a `pet`.
  1083. CategoryEntities []*GoogleCloudVideointelligenceV1beta2Entity `json:"categoryEntities,omitempty"`
  1084. // Entity: Detected entity.
  1085. Entity *GoogleCloudVideointelligenceV1beta2Entity `json:"entity,omitempty"`
  1086. // Frames: All video frames where a label was detected.
  1087. Frames []*GoogleCloudVideointelligenceV1beta2LabelFrame `json:"frames,omitempty"`
  1088. // Segments: All video segments where a label was detected.
  1089. Segments []*GoogleCloudVideointelligenceV1beta2LabelSegment `json:"segments,omitempty"`
  1090. // ForceSendFields is a list of field names (e.g. "CategoryEntities") to
  1091. // unconditionally include in API requests. By default, fields with
  1092. // empty values are omitted from API requests. However, any non-pointer,
  1093. // non-interface field appearing in ForceSendFields will be sent to the
  1094. // server regardless of whether the field is empty or not. This may be
  1095. // used to include empty fields in Patch requests.
  1096. ForceSendFields []string `json:"-"`
  1097. // NullFields is a list of field names (e.g. "CategoryEntities") to
  1098. // include in API requests with the JSON null value. By default, fields
  1099. // with empty values are omitted from API requests. However, any field
  1100. // with an empty value appearing in NullFields will be sent to the
  1101. // server as null. It is an error if a field in this list has a
  1102. // non-empty value. This may be used to include null fields in Patch
  1103. // requests.
  1104. NullFields []string `json:"-"`
  1105. }
  1106. func (s *GoogleCloudVideointelligenceV1beta2LabelAnnotation) MarshalJSON() ([]byte, error) {
  1107. type NoMethod GoogleCloudVideointelligenceV1beta2LabelAnnotation
  1108. raw := NoMethod(*s)
  1109. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1110. }
  1111. // GoogleCloudVideointelligenceV1beta2LabelFrame: Video frame level
  1112. // annotation results for label detection.
  1113. type GoogleCloudVideointelligenceV1beta2LabelFrame struct {
  1114. // Confidence: Confidence that the label is accurate. Range: [0, 1].
  1115. Confidence float64 `json:"confidence,omitempty"`
  1116. // TimeOffset: Time-offset, relative to the beginning of the video,
  1117. // corresponding to the
  1118. // video frame for this location.
  1119. TimeOffset string `json:"timeOffset,omitempty"`
  1120. // ForceSendFields is a list of field names (e.g. "Confidence") to
  1121. // unconditionally include in API requests. By default, fields with
  1122. // empty values are omitted from API requests. However, any non-pointer,
  1123. // non-interface field appearing in ForceSendFields will be sent to the
  1124. // server regardless of whether the field is empty or not. This may be
  1125. // used to include empty fields in Patch requests.
  1126. ForceSendFields []string `json:"-"`
  1127. // NullFields is a list of field names (e.g. "Confidence") to include in
  1128. // API requests with the JSON null value. By default, fields with empty
  1129. // values are omitted from API requests. However, any field with an
  1130. // empty value appearing in NullFields will be sent to the server as
  1131. // null. It is an error if a field in this list has a non-empty value.
  1132. // This may be used to include null fields in Patch requests.
  1133. NullFields []string `json:"-"`
  1134. }
  1135. func (s *GoogleCloudVideointelligenceV1beta2LabelFrame) MarshalJSON() ([]byte, error) {
  1136. type NoMethod GoogleCloudVideointelligenceV1beta2LabelFrame
  1137. raw := NoMethod(*s)
  1138. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1139. }
  1140. func (s *GoogleCloudVideointelligenceV1beta2LabelFrame) UnmarshalJSON(data []byte) error {
  1141. type NoMethod GoogleCloudVideointelligenceV1beta2LabelFrame
  1142. var s1 struct {
  1143. Confidence gensupport.JSONFloat64 `json:"confidence"`
  1144. *NoMethod
  1145. }
  1146. s1.NoMethod = (*NoMethod)(s)
  1147. if err := json.Unmarshal(data, &s1); err != nil {
  1148. return err
  1149. }
  1150. s.Confidence = float64(s1.Confidence)
  1151. return nil
  1152. }
  1153. // GoogleCloudVideointelligenceV1beta2LabelSegment: Video segment level
  1154. // annotation results for label detection.
  1155. type GoogleCloudVideointelligenceV1beta2LabelSegment struct {
  1156. // Confidence: Confidence that the label is accurate. Range: [0, 1].
  1157. Confidence float64 `json:"confidence,omitempty"`
  1158. // Segment: Video segment where a label was detected.
  1159. Segment *GoogleCloudVideointelligenceV1beta2VideoSegment `json:"segment,omitempty"`
  1160. // ForceSendFields is a list of field names (e.g. "Confidence") to
  1161. // unconditionally include in API requests. By default, fields with
  1162. // empty values are omitted from API requests. However, any non-pointer,
  1163. // non-interface field appearing in ForceSendFields will be sent to the
  1164. // server regardless of whether the field is empty or not. This may be
  1165. // used to include empty fields in Patch requests.
  1166. ForceSendFields []string `json:"-"`
  1167. // NullFields is a list of field names (e.g. "Confidence") to include in
  1168. // API requests with the JSON null value. By default, fields with empty
  1169. // values are omitted from API requests. However, any field with an
  1170. // empty value appearing in NullFields will be sent to the server as
  1171. // null. It is an error if a field in this list has a non-empty value.
  1172. // This may be used to include null fields in Patch requests.
  1173. NullFields []string `json:"-"`
  1174. }
  1175. func (s *GoogleCloudVideointelligenceV1beta2LabelSegment) MarshalJSON() ([]byte, error) {
  1176. type NoMethod GoogleCloudVideointelligenceV1beta2LabelSegment
  1177. raw := NoMethod(*s)
  1178. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1179. }
  1180. func (s *GoogleCloudVideointelligenceV1beta2LabelSegment) UnmarshalJSON(data []byte) error {
  1181. type NoMethod GoogleCloudVideointelligenceV1beta2LabelSegment
  1182. var s1 struct {
  1183. Confidence gensupport.JSONFloat64 `json:"confidence"`
  1184. *NoMethod
  1185. }
  1186. s1.NoMethod = (*NoMethod)(s)
  1187. if err := json.Unmarshal(data, &s1); err != nil {
  1188. return err
  1189. }
  1190. s.Confidence = float64(s1.Confidence)
  1191. return nil
  1192. }
  1193. // GoogleCloudVideointelligenceV1beta2VideoAnnotationProgress:
  1194. // Annotation progress for a single video.
  1195. type GoogleCloudVideointelligenceV1beta2VideoAnnotationProgress struct {
  1196. // InputUri: Output only. Video file location in
  1197. // [Google Cloud Storage](https://cloud.google.com/storage/).
  1198. InputUri string `json:"inputUri,omitempty"`
  1199. // ProgressPercent: Output only. Approximate percentage processed thus
  1200. // far. Guaranteed to be
  1201. // 100 when fully processed.
  1202. ProgressPercent int64 `json:"progressPercent,omitempty"`
  1203. // StartTime: Output only. Time when the request was received.
  1204. StartTime string `json:"startTime,omitempty"`
  1205. // UpdateTime: Output only. Time of the most recent update.
  1206. UpdateTime string `json:"updateTime,omitempty"`
  1207. // ForceSendFields is a list of field names (e.g. "InputUri") to
  1208. // unconditionally include in API requests. By default, fields with
  1209. // empty values are omitted from API requests. However, any non-pointer,
  1210. // non-interface field appearing in ForceSendFields will be sent to the
  1211. // server regardless of whether the field is empty or not. This may be
  1212. // used to include empty fields in Patch requests.
  1213. ForceSendFields []string `json:"-"`
  1214. // NullFields is a list of field names (e.g. "InputUri") to include in
  1215. // API requests with the JSON null value. By default, fields with empty
  1216. // values are omitted from API requests. However, any field with an
  1217. // empty value appearing in NullFields will be sent to the server as
  1218. // null. It is an error if a field in this list has a non-empty value.
  1219. // This may be used to include null fields in Patch requests.
  1220. NullFields []string `json:"-"`
  1221. }
  1222. func (s *GoogleCloudVideointelligenceV1beta2VideoAnnotationProgress) MarshalJSON() ([]byte, error) {
  1223. type NoMethod GoogleCloudVideointelligenceV1beta2VideoAnnotationProgress
  1224. raw := NoMethod(*s)
  1225. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1226. }
  1227. // GoogleCloudVideointelligenceV1beta2VideoAnnotationResults: Annotation
  1228. // results for a single video.
  1229. type GoogleCloudVideointelligenceV1beta2VideoAnnotationResults struct {
  1230. // Error: Output only. Non-streaming error only. If set, indicates an
  1231. // error. Note
  1232. // that for a single `AnnotateVideoRequest` some videos may succeed and
  1233. // some
  1234. // may fail.
  1235. Error *GoogleRpcStatus `json:"error,omitempty"`
  1236. // ExplicitAnnotation: Explicit content annotation.
  1237. ExplicitAnnotation *GoogleCloudVideointelligenceV1beta2ExplicitContentAnnotation `json:"explicitAnnotation,omitempty"`
  1238. // FrameLabelAnnotations: Label annotations on frame level.
  1239. // There is exactly one element for each unique label.
  1240. FrameLabelAnnotations []*GoogleCloudVideointelligenceV1beta2LabelAnnotation `json:"frameLabelAnnotations,omitempty"`
  1241. // InputUri: Output only. Video file location in
  1242. // [Google Cloud Storage](https://cloud.google.com/storage/).
  1243. InputUri string `json:"inputUri,omitempty"`
  1244. // SegmentLabelAnnotations: Label annotations on video level or user
  1245. // specified segment level.
  1246. // There is exactly one element for each unique label.
  1247. SegmentLabelAnnotations []*GoogleCloudVideointelligenceV1beta2LabelAnnotation `json:"segmentLabelAnnotations,omitempty"`
  1248. // ShotAnnotations: Shot annotations. Each shot is represented as a
  1249. // video segment.
  1250. ShotAnnotations []*GoogleCloudVideointelligenceV1beta2VideoSegment `json:"shotAnnotations,omitempty"`
  1251. // ShotLabelAnnotations: Label annotations on shot level.
  1252. // There is exactly one element for each unique label.
  1253. ShotLabelAnnotations []*GoogleCloudVideointelligenceV1beta2LabelAnnotation `json:"shotLabelAnnotations,omitempty"`
  1254. // ForceSendFields is a list of field names (e.g. "Error") to
  1255. // unconditionally include in API requests. By default, fields with
  1256. // empty values are omitted from API requests. However, any non-pointer,
  1257. // non-interface field appearing in ForceSendFields will be sent to the
  1258. // server regardless of whether the field is empty or not. This may be
  1259. // used to include empty fields in Patch requests.
  1260. ForceSendFields []string `json:"-"`
  1261. // NullFields is a list of field names (e.g. "Error") to include in API
  1262. // requests with the JSON null value. By default, fields with empty
  1263. // values are omitted from API requests. However, any field with an
  1264. // empty value appearing in NullFields will be sent to the server as
  1265. // null. It is an error if a field in this list has a non-empty value.
  1266. // This may be used to include null fields in Patch requests.
  1267. NullFields []string `json:"-"`
  1268. }
  1269. func (s *GoogleCloudVideointelligenceV1beta2VideoAnnotationResults) MarshalJSON() ([]byte, error) {
  1270. type NoMethod GoogleCloudVideointelligenceV1beta2VideoAnnotationResults
  1271. raw := NoMethod(*s)
  1272. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1273. }
  1274. // GoogleCloudVideointelligenceV1beta2VideoSegment: Video segment.
  1275. type GoogleCloudVideointelligenceV1beta2VideoSegment struct {
  1276. // EndTimeOffset: Time-offset, relative to the beginning of the
  1277. // video,
  1278. // corresponding to the end of the segment (inclusive).
  1279. EndTimeOffset string `json:"endTimeOffset,omitempty"`
  1280. // StartTimeOffset: Time-offset, relative to the beginning of the
  1281. // video,
  1282. // corresponding to the start of the segment (inclusive).
  1283. StartTimeOffset string `json:"startTimeOffset,omitempty"`
  1284. // ForceSendFields is a list of field names (e.g. "EndTimeOffset") to
  1285. // unconditionally include in API requests. By default, fields with
  1286. // empty values are omitted from API requests. However, any non-pointer,
  1287. // non-interface field appearing in ForceSendFields will be sent to the
  1288. // server regardless of whether the field is empty or not. This may be
  1289. // used to include empty fields in Patch requests.
  1290. ForceSendFields []string `json:"-"`
  1291. // NullFields is a list of field names (e.g. "EndTimeOffset") to include
  1292. // in API requests with the JSON null value. By default, fields with
  1293. // empty values are omitted from API requests. However, any field with
  1294. // an empty value appearing in NullFields will be sent to the server as
  1295. // null. It is an error if a field in this list has a non-empty value.
  1296. // This may be used to include null fields in Patch requests.
  1297. NullFields []string `json:"-"`
  1298. }
  1299. func (s *GoogleCloudVideointelligenceV1beta2VideoSegment) MarshalJSON() ([]byte, error) {
  1300. type NoMethod GoogleCloudVideointelligenceV1beta2VideoSegment
  1301. raw := NoMethod(*s)
  1302. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1303. }
  1304. // GoogleCloudVideointelligenceV1p1beta1AnnotateVideoProgress: Video
  1305. // annotation progress. Included in the `metadata`
  1306. // field of the `Operation` returned by the `GetOperation`
  1307. // call of the `google::longrunning::Operations` service.
  1308. type GoogleCloudVideointelligenceV1p1beta1AnnotateVideoProgress struct {
  1309. // AnnotationProgress: Progress metadata for all videos specified in
  1310. // `AnnotateVideoRequest`.
  1311. AnnotationProgress []*GoogleCloudVideointelligenceV1p1beta1VideoAnnotationProgress `json:"annotationProgress,omitempty"`
  1312. // ForceSendFields is a list of field names (e.g. "AnnotationProgress")
  1313. // to unconditionally include in API requests. By default, fields with
  1314. // empty values are omitted from API requests. However, any non-pointer,
  1315. // non-interface field appearing in ForceSendFields will be sent to the
  1316. // server regardless of whether the field is empty or not. This may be
  1317. // used to include empty fields in Patch requests.
  1318. ForceSendFields []string `json:"-"`
  1319. // NullFields is a list of field names (e.g. "AnnotationProgress") to
  1320. // include in API requests with the JSON null value. By default, fields
  1321. // with empty values are omitted from API requests. However, any field
  1322. // with an empty value appearing in NullFields will be sent to the
  1323. // server as null. It is an error if a field in this list has a
  1324. // non-empty value. This may be used to include null fields in Patch
  1325. // requests.
  1326. NullFields []string `json:"-"`
  1327. }
  1328. func (s *GoogleCloudVideointelligenceV1p1beta1AnnotateVideoProgress) MarshalJSON() ([]byte, error) {
  1329. type NoMethod GoogleCloudVideointelligenceV1p1beta1AnnotateVideoProgress
  1330. raw := NoMethod(*s)
  1331. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1332. }
  1333. // GoogleCloudVideointelligenceV1p1beta1AnnotateVideoResponse: Video
  1334. // annotation response. Included in the `response`
  1335. // field of the `Operation` returned by the `GetOperation`
  1336. // call of the `google::longrunning::Operations` service.
  1337. type GoogleCloudVideointelligenceV1p1beta1AnnotateVideoResponse struct {
  1338. // AnnotationResults: Annotation results for all videos specified in
  1339. // `AnnotateVideoRequest`.
  1340. AnnotationResults []*GoogleCloudVideointelligenceV1p1beta1VideoAnnotationResults `json:"annotationResults,omitempty"`
  1341. // ForceSendFields is a list of field names (e.g. "AnnotationResults")
  1342. // to unconditionally include in API requests. By default, fields with
  1343. // empty values are omitted from API requests. However, any non-pointer,
  1344. // non-interface field appearing in ForceSendFields will be sent to the
  1345. // server regardless of whether the field is empty or not. This may be
  1346. // used to include empty fields in Patch requests.
  1347. ForceSendFields []string `json:"-"`
  1348. // NullFields is a list of field names (e.g. "AnnotationResults") to
  1349. // include in API requests with the JSON null value. By default, fields
  1350. // with empty values are omitted from API requests. However, any field
  1351. // with an empty value appearing in NullFields will be sent to the
  1352. // server as null. It is an error if a field in this list has a
  1353. // non-empty value. This may be used to include null fields in Patch
  1354. // requests.
  1355. NullFields []string `json:"-"`
  1356. }
  1357. func (s *GoogleCloudVideointelligenceV1p1beta1AnnotateVideoResponse) MarshalJSON() ([]byte, error) {
  1358. type NoMethod GoogleCloudVideointelligenceV1p1beta1AnnotateVideoResponse
  1359. raw := NoMethod(*s)
  1360. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1361. }
  1362. // GoogleCloudVideointelligenceV1p1beta1EmotionAttribute: Emotion
  1363. // attribute.
  1364. type GoogleCloudVideointelligenceV1p1beta1EmotionAttribute struct {
  1365. // Emotion: Emotion entry.
  1366. //
  1367. // Possible values:
  1368. // "EMOTION_UNSPECIFIED" - Unspecified emotion.
  1369. // "AMUSEMENT" - Amusement.
  1370. // "ANGER" - Anger.
  1371. // "CONCENTRATION" - Concentration.
  1372. // "CONTENTMENT" - Contentment.
  1373. // "DESIRE" - Desire.
  1374. // "DISAPPOINTMENT" - Disappointment.
  1375. // "DISGUST" - Disgust.
  1376. // "ELATION" - Elation.
  1377. // "EMBARRASSMENT" - Embarrassment.
  1378. // "INTEREST" - Interest.
  1379. // "PRIDE" - Pride.
  1380. // "SADNESS" - Sadness.
  1381. // "SURPRISE" - Surprise.
  1382. Emotion string `json:"emotion,omitempty"`
  1383. // Score: Confidence score.
  1384. Score float64 `json:"score,omitempty"`
  1385. // ForceSendFields is a list of field names (e.g. "Emotion") to
  1386. // unconditionally include in API requests. By default, fields with
  1387. // empty values are omitted from API requests. However, any non-pointer,
  1388. // non-interface field appearing in ForceSendFields will be sent to the
  1389. // server regardless of whether the field is empty or not. This may be
  1390. // used to include empty fields in Patch requests.
  1391. ForceSendFields []string `json:"-"`
  1392. // NullFields is a list of field names (e.g. "Emotion") to include in
  1393. // API requests with the JSON null value. By default, fields with empty
  1394. // values are omitted from API requests. However, any field with an
  1395. // empty value appearing in NullFields will be sent to the server as
  1396. // null. It is an error if a field in this list has a non-empty value.
  1397. // This may be used to include null fields in Patch requests.
  1398. NullFields []string `json:"-"`
  1399. }
  1400. func (s *GoogleCloudVideointelligenceV1p1beta1EmotionAttribute) MarshalJSON() ([]byte, error) {
  1401. type NoMethod GoogleCloudVideointelligenceV1p1beta1EmotionAttribute
  1402. raw := NoMethod(*s)
  1403. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1404. }
  1405. func (s *GoogleCloudVideointelligenceV1p1beta1EmotionAttribute) UnmarshalJSON(data []byte) error {
  1406. type NoMethod GoogleCloudVideointelligenceV1p1beta1EmotionAttribute
  1407. var s1 struct {
  1408. Score gensupport.JSONFloat64 `json:"score"`
  1409. *NoMethod
  1410. }
  1411. s1.NoMethod = (*NoMethod)(s)
  1412. if err := json.Unmarshal(data, &s1); err != nil {
  1413. return err
  1414. }
  1415. s.Score = float64(s1.Score)
  1416. return nil
  1417. }
  1418. // GoogleCloudVideointelligenceV1p1beta1Entity: Detected entity from
  1419. // video analysis.
  1420. type GoogleCloudVideointelligenceV1p1beta1Entity struct {
  1421. // Description: Textual description, e.g. `Fixed-gear bicycle`.
  1422. Description string `json:"description,omitempty"`
  1423. // EntityId: Opaque entity ID. Some IDs may be available in
  1424. // [Google Knowledge Graph
  1425. // Search
  1426. // API](https://developers.google.com/knowledge-graph/).
  1427. EntityId string `json:"entityId,omitempty"`
  1428. // LanguageCode: Language code for `description` in BCP-47 format.
  1429. LanguageCode string `json:"languageCode,omitempty"`
  1430. // ForceSendFields is a list of field names (e.g. "Description") to
  1431. // unconditionally include in API requests. By default, fields with
  1432. // empty values are omitted from API requests. However, any non-pointer,
  1433. // non-interface field appearing in ForceSendFields will be sent to the
  1434. // server regardless of whether the field is empty or not. This may be
  1435. // used to include empty fields in Patch requests.
  1436. ForceSendFields []string `json:"-"`
  1437. // NullFields is a list of field names (e.g. "Description") to include
  1438. // in API requests with the JSON null value. By default, fields with
  1439. // empty values are omitted from API requests. However, any field with
  1440. // an empty value appearing in NullFields will be sent to the server as
  1441. // null. It is an error if a field in this list has a non-empty value.
  1442. // This may be used to include null fields in Patch requests.
  1443. NullFields []string `json:"-"`
  1444. }
  1445. func (s *GoogleCloudVideointelligenceV1p1beta1Entity) MarshalJSON() ([]byte, error) {
  1446. type NoMethod GoogleCloudVideointelligenceV1p1beta1Entity
  1447. raw := NoMethod(*s)
  1448. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1449. }
  1450. // GoogleCloudVideointelligenceV1p1beta1ExplicitContentAnnotation:
  1451. // Explicit content annotation (based on per-frame visual signals
  1452. // only).
  1453. // If no explicit content has been detected in a frame, no annotations
  1454. // are
  1455. // present for that frame.
  1456. type GoogleCloudVideointelligenceV1p1beta1ExplicitContentAnnotation struct {
  1457. // Frames: All video frames where explicit content was detected.
  1458. Frames []*GoogleCloudVideointelligenceV1p1beta1ExplicitContentFrame `json:"frames,omitempty"`
  1459. // ForceSendFields is a list of field names (e.g. "Frames") to
  1460. // unconditionally include in API requests. By default, fields with
  1461. // empty values are omitted from API requests. However, any non-pointer,
  1462. // non-interface field appearing in ForceSendFields will be sent to the
  1463. // server regardless of whether the field is empty or not. This may be
  1464. // used to include empty fields in Patch requests.
  1465. ForceSendFields []string `json:"-"`
  1466. // NullFields is a list of field names (e.g. "Frames") to include in API
  1467. // requests with the JSON null value. By default, fields with empty
  1468. // values are omitted from API requests. However, any field with an
  1469. // empty value appearing in NullFields will be sent to the server as
  1470. // null. It is an error if a field in this list has a non-empty value.
  1471. // This may be used to include null fields in Patch requests.
  1472. NullFields []string `json:"-"`
  1473. }
  1474. func (s *GoogleCloudVideointelligenceV1p1beta1ExplicitContentAnnotation) MarshalJSON() ([]byte, error) {
  1475. type NoMethod GoogleCloudVideointelligenceV1p1beta1ExplicitContentAnnotation
  1476. raw := NoMethod(*s)
  1477. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1478. }
  1479. // GoogleCloudVideointelligenceV1p1beta1ExplicitContentFrame: Video
  1480. // frame level annotation results for explicit content.
  1481. type GoogleCloudVideointelligenceV1p1beta1ExplicitContentFrame struct {
  1482. // PornographyLikelihood: Likelihood of the pornography content..
  1483. //
  1484. // Possible values:
  1485. // "LIKELIHOOD_UNSPECIFIED" - Unspecified likelihood.
  1486. // "VERY_UNLIKELY" - Very unlikely.
  1487. // "UNLIKELY" - Unlikely.
  1488. // "POSSIBLE" - Possible.
  1489. // "LIKELY" - Likely.
  1490. // "VERY_LIKELY" - Very likely.
  1491. PornographyLikelihood string `json:"pornographyLikelihood,omitempty"`
  1492. // TimeOffset: Time-offset, relative to the beginning of the video,
  1493. // corresponding to the
  1494. // video frame for this location.
  1495. TimeOffset string `json:"timeOffset,omitempty"`
  1496. // ForceSendFields is a list of field names (e.g.
  1497. // "PornographyLikelihood") to unconditionally include in API requests.
  1498. // By default, fields with empty values are omitted from API requests.
  1499. // However, any non-pointer, non-interface field appearing in
  1500. // ForceSendFields will be sent to the server regardless of whether the
  1501. // field is empty or not. This may be used to include empty fields in
  1502. // Patch requests.
  1503. ForceSendFields []string `json:"-"`
  1504. // NullFields is a list of field names (e.g. "PornographyLikelihood") to
  1505. // include in API requests with the JSON null value. By default, fields
  1506. // with empty values are omitted from API requests. However, any field
  1507. // with an empty value appearing in NullFields will be sent to the
  1508. // server as null. It is an error if a field in this list has a
  1509. // non-empty value. This may be used to include null fields in Patch
  1510. // requests.
  1511. NullFields []string `json:"-"`
  1512. }
  1513. func (s *GoogleCloudVideointelligenceV1p1beta1ExplicitContentFrame) MarshalJSON() ([]byte, error) {
  1514. type NoMethod GoogleCloudVideointelligenceV1p1beta1ExplicitContentFrame
  1515. raw := NoMethod(*s)
  1516. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1517. }
  1518. // GoogleCloudVideointelligenceV1p1beta1FaceDetectionAnnotation: Face
  1519. // detection annotation.
  1520. type GoogleCloudVideointelligenceV1p1beta1FaceDetectionAnnotation struct {
  1521. // Frames: All video frames where a face was detected.
  1522. Frames []*GoogleCloudVideointelligenceV1p1beta1FaceDetectionFrame `json:"frames,omitempty"`
  1523. // Segments: All video segments where a face was detected.
  1524. Segments []*GoogleCloudVideointelligenceV1p1beta1FaceSegment `json:"segments,omitempty"`
  1525. // ForceSendFields is a list of field names (e.g. "Frames") to
  1526. // unconditionally include in API requests. By default, fields with
  1527. // empty values are omitted from API requests. However, any non-pointer,
  1528. // non-interface field appearing in ForceSendFields will be sent to the
  1529. // server regardless of whether the field is empty or not. This may be
  1530. // used to include empty fields in Patch requests.
  1531. ForceSendFields []string `json:"-"`
  1532. // NullFields is a list of field names (e.g. "Frames") to include in API
  1533. // requests with the JSON null value. By default, fields with empty
  1534. // values are omitted from API requests. However, any field with an
  1535. // empty value appearing in NullFields will be sent to the server as
  1536. // null. It is an error if a field in this list has a non-empty value.
  1537. // This may be used to include null fields in Patch requests.
  1538. NullFields []string `json:"-"`
  1539. }
  1540. func (s *GoogleCloudVideointelligenceV1p1beta1FaceDetectionAnnotation) MarshalJSON() ([]byte, error) {
  1541. type NoMethod GoogleCloudVideointelligenceV1p1beta1FaceDetectionAnnotation
  1542. raw := NoMethod(*s)
  1543. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1544. }
  1545. // GoogleCloudVideointelligenceV1p1beta1FaceDetectionAttribute: Face
  1546. // detection attribute.
  1547. type GoogleCloudVideointelligenceV1p1beta1FaceDetectionAttribute struct {
  1548. // Emotions: Emotion attributes.
  1549. Emotions []*GoogleCloudVideointelligenceV1p1beta1EmotionAttribute `json:"emotions,omitempty"`
  1550. // NormalizedBoundingBox: Normalized Bounding box.
  1551. NormalizedBoundingBox *GoogleCloudVideointelligenceV1p1beta1NormalizedBoundingBox `json:"normalizedBoundingBox,omitempty"`
  1552. // ForceSendFields is a list of field names (e.g. "Emotions") to
  1553. // unconditionally include in API requests. By default, fields with
  1554. // empty values are omitted from API requests. However, any non-pointer,
  1555. // non-interface field appearing in ForceSendFields will be sent to the
  1556. // server regardless of whether the field is empty or not. This may be
  1557. // used to include empty fields in Patch requests.
  1558. ForceSendFields []string `json:"-"`
  1559. // NullFields is a list of field names (e.g. "Emotions") to include in
  1560. // API requests with the JSON null value. By default, fields with empty
  1561. // values are omitted from API requests. However, any field with an
  1562. // empty value appearing in NullFields will be sent to the server as
  1563. // null. It is an error if a field in this list has a non-empty value.
  1564. // This may be used to include null fields in Patch requests.
  1565. NullFields []string `json:"-"`
  1566. }
  1567. func (s *GoogleCloudVideointelligenceV1p1beta1FaceDetectionAttribute) MarshalJSON() ([]byte, error) {
  1568. type NoMethod GoogleCloudVideointelligenceV1p1beta1FaceDetectionAttribute
  1569. raw := NoMethod(*s)
  1570. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1571. }
  1572. // GoogleCloudVideointelligenceV1p1beta1FaceDetectionFrame: Video frame
  1573. // level annotation results for face detection.
  1574. type GoogleCloudVideointelligenceV1p1beta1FaceDetectionFrame struct {
  1575. // Attributes: Face attributes in a frame.
  1576. // There can be more than one attributes if the same face is detected
  1577. // in
  1578. // multiple locations within the current frame.
  1579. Attributes []*GoogleCloudVideointelligenceV1p1beta1FaceDetectionAttribute `json:"attributes,omitempty"`
  1580. // TimeOffset: Time-offset, relative to the beginning of the
  1581. // video,
  1582. // corresponding to the video frame for this location.
  1583. TimeOffset string `json:"timeOffset,omitempty"`
  1584. // ForceSendFields is a list of field names (e.g. "Attributes") to
  1585. // unconditionally include in API requests. By default, fields with
  1586. // empty values are omitted from API requests. However, any non-pointer,
  1587. // non-interface field appearing in ForceSendFields will be sent to the
  1588. // server regardless of whether the field is empty or not. This may be
  1589. // used to include empty fields in Patch requests.
  1590. ForceSendFields []string `json:"-"`
  1591. // NullFields is a list of field names (e.g. "Attributes") to include in
  1592. // API requests with the JSON null value. By default, fields with empty
  1593. // values are omitted from API requests. However, any field with an
  1594. // empty value appearing in NullFields will be sent to the server as
  1595. // null. It is an error if a field in this list has a non-empty value.
  1596. // This may be used to include null fields in Patch requests.
  1597. NullFields []string `json:"-"`
  1598. }
  1599. func (s *GoogleCloudVideointelligenceV1p1beta1FaceDetectionFrame) MarshalJSON() ([]byte, error) {
  1600. type NoMethod GoogleCloudVideointelligenceV1p1beta1FaceDetectionFrame
  1601. raw := NoMethod(*s)
  1602. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1603. }
  1604. // GoogleCloudVideointelligenceV1p1beta1FaceSegment: Video segment level
  1605. // annotation results for face detection.
  1606. type GoogleCloudVideointelligenceV1p1beta1FaceSegment struct {
  1607. // Segment: Video segment where a face was detected.
  1608. Segment *GoogleCloudVideointelligenceV1p1beta1VideoSegment `json:"segment,omitempty"`
  1609. // ForceSendFields is a list of field names (e.g. "Segment") to
  1610. // unconditionally include in API requests. By default, fields with
  1611. // empty values are omitted from API requests. However, any non-pointer,
  1612. // non-interface field appearing in ForceSendFields will be sent to the
  1613. // server regardless of whether the field is empty or not. This may be
  1614. // used to include empty fields in Patch requests.
  1615. ForceSendFields []string `json:"-"`
  1616. // NullFields is a list of field names (e.g. "Segment") to include in
  1617. // API requests with the JSON null value. By default, fields with empty
  1618. // values are omitted from API requests. However, any field with an
  1619. // empty value appearing in NullFields will be sent to the server as
  1620. // null. It is an error if a field in this list has a non-empty value.
  1621. // This may be used to include null fields in Patch requests.
  1622. NullFields []string `json:"-"`
  1623. }
  1624. func (s *GoogleCloudVideointelligenceV1p1beta1FaceSegment) MarshalJSON() ([]byte, error) {
  1625. type NoMethod GoogleCloudVideointelligenceV1p1beta1FaceSegment
  1626. raw := NoMethod(*s)
  1627. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1628. }
  1629. // GoogleCloudVideointelligenceV1p1beta1LabelAnnotation: Label
  1630. // annotation.
  1631. type GoogleCloudVideointelligenceV1p1beta1LabelAnnotation struct {
  1632. // CategoryEntities: Common categories for the detected entity.
  1633. // E.g. when the label is `Terrier` the category is likely `dog`. And in
  1634. // some
  1635. // cases there might be more than one categories e.g. `Terrier` could
  1636. // also be
  1637. // a `pet`.
  1638. CategoryEntities []*GoogleCloudVideointelligenceV1p1beta1Entity `json:"categoryEntities,omitempty"`
  1639. // Entity: Detected entity.
  1640. Entity *GoogleCloudVideointelligenceV1p1beta1Entity `json:"entity,omitempty"`
  1641. // Frames: All video frames where a label was detected.
  1642. Frames []*GoogleCloudVideointelligenceV1p1beta1LabelFrame `json:"frames,omitempty"`
  1643. // Segments: All video segments where a label was detected.
  1644. Segments []*GoogleCloudVideointelligenceV1p1beta1LabelSegment `json:"segments,omitempty"`
  1645. // ForceSendFields is a list of field names (e.g. "CategoryEntities") to
  1646. // unconditionally include in API requests. By default, fields with
  1647. // empty values are omitted from API requests. However, any non-pointer,
  1648. // non-interface field appearing in ForceSendFields will be sent to the
  1649. // server regardless of whether the field is empty or not. This may be
  1650. // used to include empty fields in Patch requests.
  1651. ForceSendFields []string `json:"-"`
  1652. // NullFields is a list of field names (e.g. "CategoryEntities") to
  1653. // include in API requests with the JSON null value. By default, fields
  1654. // with empty values are omitted from API requests. However, any field
  1655. // with an empty value appearing in NullFields will be sent to the
  1656. // server as null. It is an error if a field in this list has a
  1657. // non-empty value. This may be used to include null fields in Patch
  1658. // requests.
  1659. NullFields []string `json:"-"`
  1660. }
  1661. func (s *GoogleCloudVideointelligenceV1p1beta1LabelAnnotation) MarshalJSON() ([]byte, error) {
  1662. type NoMethod GoogleCloudVideointelligenceV1p1beta1LabelAnnotation
  1663. raw := NoMethod(*s)
  1664. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1665. }
  1666. // GoogleCloudVideointelligenceV1p1beta1LabelFrame: Video frame level
  1667. // annotation results for label detection.
  1668. type GoogleCloudVideointelligenceV1p1beta1LabelFrame struct {
  1669. // Confidence: Confidence that the label is accurate. Range: [0, 1].
  1670. Confidence float64 `json:"confidence,omitempty"`
  1671. // TimeOffset: Time-offset, relative to the beginning of the video,
  1672. // corresponding to the
  1673. // video frame for this location.
  1674. TimeOffset string `json:"timeOffset,omitempty"`
  1675. // ForceSendFields is a list of field names (e.g. "Confidence") to
  1676. // unconditionally include in API requests. By default, fields with
  1677. // empty values are omitted from API requests. However, any non-pointer,
  1678. // non-interface field appearing in ForceSendFields will be sent to the
  1679. // server regardless of whether the field is empty or not. This may be
  1680. // used to include empty fields in Patch requests.
  1681. ForceSendFields []string `json:"-"`
  1682. // NullFields is a list of field names (e.g. "Confidence") to include in
  1683. // API requests with the JSON null value. By default, fields with empty
  1684. // values are omitted from API requests. However, any field with an
  1685. // empty value appearing in NullFields will be sent to the server as
  1686. // null. It is an error if a field in this list has a non-empty value.
  1687. // This may be used to include null fields in Patch requests.
  1688. NullFields []string `json:"-"`
  1689. }
  1690. func (s *GoogleCloudVideointelligenceV1p1beta1LabelFrame) MarshalJSON() ([]byte, error) {
  1691. type NoMethod GoogleCloudVideointelligenceV1p1beta1LabelFrame
  1692. raw := NoMethod(*s)
  1693. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1694. }
  1695. func (s *GoogleCloudVideointelligenceV1p1beta1LabelFrame) UnmarshalJSON(data []byte) error {
  1696. type NoMethod GoogleCloudVideointelligenceV1p1beta1LabelFrame
  1697. var s1 struct {
  1698. Confidence gensupport.JSONFloat64 `json:"confidence"`
  1699. *NoMethod
  1700. }
  1701. s1.NoMethod = (*NoMethod)(s)
  1702. if err := json.Unmarshal(data, &s1); err != nil {
  1703. return err
  1704. }
  1705. s.Confidence = float64(s1.Confidence)
  1706. return nil
  1707. }
  1708. // GoogleCloudVideointelligenceV1p1beta1LabelSegment: Video segment
  1709. // level annotation results for label detection.
  1710. type GoogleCloudVideointelligenceV1p1beta1LabelSegment struct {
  1711. // Confidence: Confidence that the label is accurate. Range: [0, 1].
  1712. Confidence float64 `json:"confidence,omitempty"`
  1713. // Segment: Video segment where a label was detected.
  1714. Segment *GoogleCloudVideointelligenceV1p1beta1VideoSegment `json:"segment,omitempty"`
  1715. // ForceSendFields is a list of field names (e.g. "Confidence") to
  1716. // unconditionally include in API requests. By default, fields with
  1717. // empty values are omitted from API requests. However, any non-pointer,
  1718. // non-interface field appearing in ForceSendFields will be sent to the
  1719. // server regardless of whether the field is empty or not. This may be
  1720. // used to include empty fields in Patch requests.
  1721. ForceSendFields []string `json:"-"`
  1722. // NullFields is a list of field names (e.g. "Confidence") to include in
  1723. // API requests with the JSON null value. By default, fields with empty
  1724. // values are omitted from API requests. However, any field with an
  1725. // empty value appearing in NullFields will be sent to the server as
  1726. // null. It is an error if a field in this list has a non-empty value.
  1727. // This may be used to include null fields in Patch requests.
  1728. NullFields []string `json:"-"`
  1729. }
  1730. func (s *GoogleCloudVideointelligenceV1p1beta1LabelSegment) MarshalJSON() ([]byte, error) {
  1731. type NoMethod GoogleCloudVideointelligenceV1p1beta1LabelSegment
  1732. raw := NoMethod(*s)
  1733. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1734. }
  1735. func (s *GoogleCloudVideointelligenceV1p1beta1LabelSegment) UnmarshalJSON(data []byte) error {
  1736. type NoMethod GoogleCloudVideointelligenceV1p1beta1LabelSegment
  1737. var s1 struct {
  1738. Confidence gensupport.JSONFloat64 `json:"confidence"`
  1739. *NoMethod
  1740. }
  1741. s1.NoMethod = (*NoMethod)(s)
  1742. if err := json.Unmarshal(data, &s1); err != nil {
  1743. return err
  1744. }
  1745. s.Confidence = float64(s1.Confidence)
  1746. return nil
  1747. }
  1748. // GoogleCloudVideointelligenceV1p1beta1NormalizedBoundingBox:
  1749. // Normalized bounding box.
  1750. // The normalized vertex coordinates are relative to the original
  1751. // image.
  1752. // Range: [0, 1].
  1753. type GoogleCloudVideointelligenceV1p1beta1NormalizedBoundingBox struct {
  1754. // Bottom: Bottom Y coordinate.
  1755. Bottom float64 `json:"bottom,omitempty"`
  1756. // Left: Left X coordinate.
  1757. Left float64 `json:"left,omitempty"`
  1758. // Right: Right X coordinate.
  1759. Right float64 `json:"right,omitempty"`
  1760. // Top: Top Y coordinate.
  1761. Top float64 `json:"top,omitempty"`
  1762. // ForceSendFields is a list of field names (e.g. "Bottom") to
  1763. // unconditionally include in API requests. By default, fields with
  1764. // empty values are omitted from API requests. However, any non-pointer,
  1765. // non-interface field appearing in ForceSendFields will be sent to the
  1766. // server regardless of whether the field is empty or not. This may be
  1767. // used to include empty fields in Patch requests.
  1768. ForceSendFields []string `json:"-"`
  1769. // NullFields is a list of field names (e.g. "Bottom") to include in API
  1770. // requests with the JSON null value. By default, fields with empty
  1771. // values are omitted from API requests. However, any field with an
  1772. // empty value appearing in NullFields will be sent to the server as
  1773. // null. It is an error if a field in this list has a non-empty value.
  1774. // This may be used to include null fields in Patch requests.
  1775. NullFields []string `json:"-"`
  1776. }
  1777. func (s *GoogleCloudVideointelligenceV1p1beta1NormalizedBoundingBox) MarshalJSON() ([]byte, error) {
  1778. type NoMethod GoogleCloudVideointelligenceV1p1beta1NormalizedBoundingBox
  1779. raw := NoMethod(*s)
  1780. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1781. }
  1782. func (s *GoogleCloudVideointelligenceV1p1beta1NormalizedBoundingBox) UnmarshalJSON(data []byte) error {
  1783. type NoMethod GoogleCloudVideointelligenceV1p1beta1NormalizedBoundingBox
  1784. var s1 struct {
  1785. Bottom gensupport.JSONFloat64 `json:"bottom"`
  1786. Left gensupport.JSONFloat64 `json:"left"`
  1787. Right gensupport.JSONFloat64 `json:"right"`
  1788. Top gensupport.JSONFloat64 `json:"top"`
  1789. *NoMethod
  1790. }
  1791. s1.NoMethod = (*NoMethod)(s)
  1792. if err := json.Unmarshal(data, &s1); err != nil {
  1793. return err
  1794. }
  1795. s.Bottom = float64(s1.Bottom)
  1796. s.Left = float64(s1.Left)
  1797. s.Right = float64(s1.Right)
  1798. s.Top = float64(s1.Top)
  1799. return nil
  1800. }
  1801. // GoogleCloudVideointelligenceV1p1beta1SpeechRecognitionAlternative:
  1802. // Alternative hypotheses (a.k.a. n-best list).
  1803. type GoogleCloudVideointelligenceV1p1beta1SpeechRecognitionAlternative struct {
  1804. // Confidence: Output only. The confidence estimate between 0.0 and 1.0.
  1805. // A higher number
  1806. // indicates an estimated greater likelihood that the recognized words
  1807. // are
  1808. // correct. This field is typically provided only for the top
  1809. // hypothesis, and
  1810. // only for `is_final=true` results. Clients should not rely on
  1811. // the
  1812. // `confidence` field as it is not guaranteed to be accurate or
  1813. // consistent.
  1814. // The default of 0.0 is a sentinel value indicating `confidence` was
  1815. // not set.
  1816. Confidence float64 `json:"confidence,omitempty"`
  1817. // Transcript: Output only. Transcript text representing the words that
  1818. // the user spoke.
  1819. Transcript string `json:"transcript,omitempty"`
  1820. // Words: Output only. A list of word-specific information for each
  1821. // recognized word.
  1822. Words []*GoogleCloudVideointelligenceV1p1beta1WordInfo `json:"words,omitempty"`
  1823. // ForceSendFields is a list of field names (e.g. "Confidence") to
  1824. // unconditionally include in API requests. By default, fields with
  1825. // empty values are omitted from API requests. However, any non-pointer,
  1826. // non-interface field appearing in ForceSendFields will be sent to the
  1827. // server regardless of whether the field is empty or not. This may be
  1828. // used to include empty fields in Patch requests.
  1829. ForceSendFields []string `json:"-"`
  1830. // NullFields is a list of field names (e.g. "Confidence") to include in
  1831. // API requests with the JSON null value. By default, fields with empty
  1832. // values are omitted from API requests. However, any field with an
  1833. // empty value appearing in NullFields will be sent to the server as
  1834. // null. It is an error if a field in this list has a non-empty value.
  1835. // This may be used to include null fields in Patch requests.
  1836. NullFields []string `json:"-"`
  1837. }
  1838. func (s *GoogleCloudVideointelligenceV1p1beta1SpeechRecognitionAlternative) MarshalJSON() ([]byte, error) {
  1839. type NoMethod GoogleCloudVideointelligenceV1p1beta1SpeechRecognitionAlternative
  1840. raw := NoMethod(*s)
  1841. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1842. }
  1843. func (s *GoogleCloudVideointelligenceV1p1beta1SpeechRecognitionAlternative) UnmarshalJSON(data []byte) error {
  1844. type NoMethod GoogleCloudVideointelligenceV1p1beta1SpeechRecognitionAlternative
  1845. var s1 struct {
  1846. Confidence gensupport.JSONFloat64 `json:"confidence"`
  1847. *NoMethod
  1848. }
  1849. s1.NoMethod = (*NoMethod)(s)
  1850. if err := json.Unmarshal(data, &s1); err != nil {
  1851. return err
  1852. }
  1853. s.Confidence = float64(s1.Confidence)
  1854. return nil
  1855. }
  1856. // GoogleCloudVideointelligenceV1p1beta1SpeechTranscription: A speech
  1857. // recognition result corresponding to a portion of the audio.
  1858. type GoogleCloudVideointelligenceV1p1beta1SpeechTranscription struct {
  1859. // Alternatives: Output only. May contain one or more recognition
  1860. // hypotheses (up to the
  1861. // maximum specified in `max_alternatives`).
  1862. // These alternatives are ordered in terms of accuracy, with the top
  1863. // (first)
  1864. // alternative being the most probable, as ranked by the recognizer.
  1865. Alternatives []*GoogleCloudVideointelligenceV1p1beta1SpeechRecognitionAlternative `json:"alternatives,omitempty"`
  1866. // ForceSendFields is a list of field names (e.g. "Alternatives") to
  1867. // unconditionally include in API requests. By default, fields with
  1868. // empty values are omitted from API requests. However, any non-pointer,
  1869. // non-interface field appearing in ForceSendFields will be sent to the
  1870. // server regardless of whether the field is empty or not. This may be
  1871. // used to include empty fields in Patch requests.
  1872. ForceSendFields []string `json:"-"`
  1873. // NullFields is a list of field names (e.g. "Alternatives") to include
  1874. // in API requests with the JSON null value. By default, fields with
  1875. // empty values are omitted from API requests. However, any field with
  1876. // an empty value appearing in NullFields will be sent to the server as
  1877. // null. It is an error if a field in this list has a non-empty value.
  1878. // This may be used to include null fields in Patch requests.
  1879. NullFields []string `json:"-"`
  1880. }
  1881. func (s *GoogleCloudVideointelligenceV1p1beta1SpeechTranscription) MarshalJSON() ([]byte, error) {
  1882. type NoMethod GoogleCloudVideointelligenceV1p1beta1SpeechTranscription
  1883. raw := NoMethod(*s)
  1884. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1885. }
  1886. // GoogleCloudVideointelligenceV1p1beta1VideoAnnotationProgress:
  1887. // Annotation progress for a single video.
  1888. type GoogleCloudVideointelligenceV1p1beta1VideoAnnotationProgress struct {
  1889. // InputUri: Output only. Video file location in
  1890. // [Google Cloud Storage](https://cloud.google.com/storage/).
  1891. InputUri string `json:"inputUri,omitempty"`
  1892. // ProgressPercent: Output only. Approximate percentage processed thus
  1893. // far. Guaranteed to be
  1894. // 100 when fully processed.
  1895. ProgressPercent int64 `json:"progressPercent,omitempty"`
  1896. // StartTime: Output only. Time when the request was received.
  1897. StartTime string `json:"startTime,omitempty"`
  1898. // UpdateTime: Output only. Time of the most recent update.
  1899. UpdateTime string `json:"updateTime,omitempty"`
  1900. // ForceSendFields is a list of field names (e.g. "InputUri") to
  1901. // unconditionally include in API requests. By default, fields with
  1902. // empty values are omitted from API requests. However, any non-pointer,
  1903. // non-interface field appearing in ForceSendFields will be sent to the
  1904. // server regardless of whether the field is empty or not. This may be
  1905. // used to include empty fields in Patch requests.
  1906. ForceSendFields []string `json:"-"`
  1907. // NullFields is a list of field names (e.g. "InputUri") to include in
  1908. // API requests with the JSON null value. By default, fields with empty
  1909. // values are omitted from API requests. However, any field with an
  1910. // empty value appearing in NullFields will be sent to the server as
  1911. // null. It is an error if a field in this list has a non-empty value.
  1912. // This may be used to include null fields in Patch requests.
  1913. NullFields []string `json:"-"`
  1914. }
  1915. func (s *GoogleCloudVideointelligenceV1p1beta1VideoAnnotationProgress) MarshalJSON() ([]byte, error) {
  1916. type NoMethod GoogleCloudVideointelligenceV1p1beta1VideoAnnotationProgress
  1917. raw := NoMethod(*s)
  1918. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1919. }
  1920. // GoogleCloudVideointelligenceV1p1beta1VideoAnnotationResults:
  1921. // Annotation results for a single video.
  1922. type GoogleCloudVideointelligenceV1p1beta1VideoAnnotationResults struct {
  1923. // Error: Output only. Non-streaming error only. If set, indicates an
  1924. // error. Note
  1925. // that for a single `AnnotateVideoRequest` some videos may succeed and
  1926. // some
  1927. // may fail.
  1928. Error *GoogleRpcStatus `json:"error,omitempty"`
  1929. // ExplicitAnnotation: Explicit content annotation.
  1930. ExplicitAnnotation *GoogleCloudVideointelligenceV1p1beta1ExplicitContentAnnotation `json:"explicitAnnotation,omitempty"`
  1931. // FaceDetectionAnnotations: Face detection annotations.
  1932. FaceDetectionAnnotations []*GoogleCloudVideointelligenceV1p1beta1FaceDetectionAnnotation `json:"faceDetectionAnnotations,omitempty"`
  1933. // FrameLabelAnnotations: Label annotations on frame level.
  1934. // There is exactly one element for each unique label.
  1935. FrameLabelAnnotations []*GoogleCloudVideointelligenceV1p1beta1LabelAnnotation `json:"frameLabelAnnotations,omitempty"`
  1936. // InputUri: Output only. Video file location in
  1937. // [Google Cloud Storage](https://cloud.google.com/storage/).
  1938. InputUri string `json:"inputUri,omitempty"`
  1939. // SegmentLabelAnnotations: Label annotations on video level or user
  1940. // specified segment level.
  1941. // There is exactly one element for each unique label.
  1942. SegmentLabelAnnotations []*GoogleCloudVideointelligenceV1p1beta1LabelAnnotation `json:"segmentLabelAnnotations,omitempty"`
  1943. // ShotAnnotations: Shot annotations. Each shot is represented as a
  1944. // video segment.
  1945. ShotAnnotations []*GoogleCloudVideointelligenceV1p1beta1VideoSegment `json:"shotAnnotations,omitempty"`
  1946. // ShotLabelAnnotations: Label annotations on shot level.
  1947. // There is exactly one element for each unique label.
  1948. ShotLabelAnnotations []*GoogleCloudVideointelligenceV1p1beta1LabelAnnotation `json:"shotLabelAnnotations,omitempty"`
  1949. // SpeechTranscriptions: Speech transcription.
  1950. SpeechTranscriptions []*GoogleCloudVideointelligenceV1p1beta1SpeechTranscription `json:"speechTranscriptions,omitempty"`
  1951. // ForceSendFields is a list of field names (e.g. "Error") to
  1952. // unconditionally include in API requests. By default, fields with
  1953. // empty values are omitted from API requests. However, any non-pointer,
  1954. // non-interface field appearing in ForceSendFields will be sent to the
  1955. // server regardless of whether the field is empty or not. This may be
  1956. // used to include empty fields in Patch requests.
  1957. ForceSendFields []string `json:"-"`
  1958. // NullFields is a list of field names (e.g. "Error") to include in API
  1959. // requests with the JSON null value. By default, fields with empty
  1960. // values are omitted from API requests. However, any field with an
  1961. // empty value appearing in NullFields will be sent to the server as
  1962. // null. It is an error if a field in this list has a non-empty value.
  1963. // This may be used to include null fields in Patch requests.
  1964. NullFields []string `json:"-"`
  1965. }
  1966. func (s *GoogleCloudVideointelligenceV1p1beta1VideoAnnotationResults) MarshalJSON() ([]byte, error) {
  1967. type NoMethod GoogleCloudVideointelligenceV1p1beta1VideoAnnotationResults
  1968. raw := NoMethod(*s)
  1969. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1970. }
  1971. // GoogleCloudVideointelligenceV1p1beta1VideoSegment: Video segment.
  1972. type GoogleCloudVideointelligenceV1p1beta1VideoSegment struct {
  1973. // EndTimeOffset: Time-offset, relative to the beginning of the
  1974. // video,
  1975. // corresponding to the end of the segment (inclusive).
  1976. EndTimeOffset string `json:"endTimeOffset,omitempty"`
  1977. // StartTimeOffset: Time-offset, relative to the beginning of the
  1978. // video,
  1979. // corresponding to the start of the segment (inclusive).
  1980. StartTimeOffset string `json:"startTimeOffset,omitempty"`
  1981. // ForceSendFields is a list of field names (e.g. "EndTimeOffset") to
  1982. // unconditionally include in API requests. By default, fields with
  1983. // empty values are omitted from API requests. However, any non-pointer,
  1984. // non-interface field appearing in ForceSendFields will be sent to the
  1985. // server regardless of whether the field is empty or not. This may be
  1986. // used to include empty fields in Patch requests.
  1987. ForceSendFields []string `json:"-"`
  1988. // NullFields is a list of field names (e.g. "EndTimeOffset") to include
  1989. // in API requests with the JSON null value. By default, fields with
  1990. // empty values are omitted from API requests. However, any field with
  1991. // an empty value appearing in NullFields will be sent to the server as
  1992. // null. It is an error if a field in this list has a non-empty value.
  1993. // This may be used to include null fields in Patch requests.
  1994. NullFields []string `json:"-"`
  1995. }
  1996. func (s *GoogleCloudVideointelligenceV1p1beta1VideoSegment) MarshalJSON() ([]byte, error) {
  1997. type NoMethod GoogleCloudVideointelligenceV1p1beta1VideoSegment
  1998. raw := NoMethod(*s)
  1999. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2000. }
  2001. // GoogleCloudVideointelligenceV1p1beta1WordInfo: Word-specific
  2002. // information for recognized words. Word information is only
  2003. // included in the response when certain request parameters are set,
  2004. // such
  2005. // as `enable_word_time_offsets`.
  2006. type GoogleCloudVideointelligenceV1p1beta1WordInfo struct {
  2007. // EndTime: Output only. Time offset relative to the beginning of the
  2008. // audio, and
  2009. // corresponding to the end of the spoken word. This field is only set
  2010. // if
  2011. // `enable_word_time_offsets=true` and only in the top hypothesis. This
  2012. // is an
  2013. // experimental feature and the accuracy of the time offset can vary.
  2014. EndTime string `json:"endTime,omitempty"`
  2015. // StartTime: Output only. Time offset relative to the beginning of the
  2016. // audio, and
  2017. // corresponding to the start of the spoken word. This field is only set
  2018. // if
  2019. // `enable_word_time_offsets=true` and only in the top hypothesis. This
  2020. // is an
  2021. // experimental feature and the accuracy of the time offset can vary.
  2022. StartTime string `json:"startTime,omitempty"`
  2023. // Word: Output only. The word corresponding to this set of information.
  2024. Word string `json:"word,omitempty"`
  2025. // ForceSendFields is a list of field names (e.g. "EndTime") to
  2026. // unconditionally include in API requests. By default, fields with
  2027. // empty values are omitted from API requests. However, any non-pointer,
  2028. // non-interface field appearing in ForceSendFields will be sent to the
  2029. // server regardless of whether the field is empty or not. This may be
  2030. // used to include empty fields in Patch requests.
  2031. ForceSendFields []string `json:"-"`
  2032. // NullFields is a list of field names (e.g. "EndTime") to include in
  2033. // API requests with the JSON null value. By default, fields with empty
  2034. // values are omitted from API requests. However, any field with an
  2035. // empty value appearing in NullFields will be sent to the server as
  2036. // null. It is an error if a field in this list has a non-empty value.
  2037. // This may be used to include null fields in Patch requests.
  2038. NullFields []string `json:"-"`
  2039. }
  2040. func (s *GoogleCloudVideointelligenceV1p1beta1WordInfo) MarshalJSON() ([]byte, error) {
  2041. type NoMethod GoogleCloudVideointelligenceV1p1beta1WordInfo
  2042. raw := NoMethod(*s)
  2043. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2044. }
  2045. // GoogleLongrunningOperation: This resource represents a long-running
  2046. // operation that is the result of a
  2047. // network API call.
  2048. type GoogleLongrunningOperation struct {
  2049. // Done: If the value is `false`, it means the operation is still in
  2050. // progress.
  2051. // If `true`, the operation is completed, and either `error` or
  2052. // `response` is
  2053. // available.
  2054. Done bool `json:"done,omitempty"`
  2055. // Error: The error result of the operation in case of failure or
  2056. // cancellation.
  2057. Error *GoogleRpcStatus `json:"error,omitempty"`
  2058. // Metadata: Service-specific metadata associated with the operation.
  2059. // It typically
  2060. // contains progress information and common metadata such as create
  2061. // time.
  2062. // Some services might not provide such metadata. Any method that
  2063. // returns a
  2064. // long-running operation should document the metadata type, if any.
  2065. Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  2066. // Name: The server-assigned name, which is only unique within the same
  2067. // service that
  2068. // originally returns it. If you use the default HTTP mapping,
  2069. // the
  2070. // `name` should have the format of `operations/some/unique/name`.
  2071. Name string `json:"name,omitempty"`
  2072. // Response: The normal response of the operation in case of success.
  2073. // If the original
  2074. // method returns no data on success, such as `Delete`, the response
  2075. // is
  2076. // `google.protobuf.Empty`. If the original method is
  2077. // standard
  2078. // `Get`/`Create`/`Update`, the response should be the resource. For
  2079. // other
  2080. // methods, the response should have the type `XxxResponse`, where
  2081. // `Xxx`
  2082. // is the original method name. For example, if the original method
  2083. // name
  2084. // is `TakeSnapshot()`, the inferred response type
  2085. // is
  2086. // `TakeSnapshotResponse`.
  2087. Response googleapi.RawMessage `json:"response,omitempty"`
  2088. // ServerResponse contains the HTTP response code and headers from the
  2089. // server.
  2090. googleapi.ServerResponse `json:"-"`
  2091. // ForceSendFields is a list of field names (e.g. "Done") to
  2092. // unconditionally include in API requests. By default, fields with
  2093. // empty values are omitted from API requests. However, any non-pointer,
  2094. // non-interface field appearing in ForceSendFields will be sent to the
  2095. // server regardless of whether the field is empty or not. This may be
  2096. // used to include empty fields in Patch requests.
  2097. ForceSendFields []string `json:"-"`
  2098. // NullFields is a list of field names (e.g. "Done") to include in API
  2099. // requests with the JSON null value. By default, fields with empty
  2100. // values are omitted from API requests. However, any field with an
  2101. // empty value appearing in NullFields will be sent to the server as
  2102. // null. It is an error if a field in this list has a non-empty value.
  2103. // This may be used to include null fields in Patch requests.
  2104. NullFields []string `json:"-"`
  2105. }
  2106. func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) {
  2107. type NoMethod GoogleLongrunningOperation
  2108. raw := NoMethod(*s)
  2109. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2110. }
  2111. // GoogleRpcStatus: The `Status` type defines a logical error model that
  2112. // is suitable for different
  2113. // programming environments, including REST APIs and RPC APIs. It is
  2114. // used by
  2115. // [gRPC](https://github.com/grpc). The error model is designed to
  2116. // be:
  2117. //
  2118. // - Simple to use and understand for most users
  2119. // - Flexible enough to meet unexpected needs
  2120. //
  2121. // # Overview
  2122. //
  2123. // The `Status` message contains three pieces of data: error code, error
  2124. // message,
  2125. // and error details. The error code should be an enum value
  2126. // of
  2127. // google.rpc.Code, but it may accept additional error codes if needed.
  2128. // The
  2129. // error message should be a developer-facing English message that
  2130. // helps
  2131. // developers *understand* and *resolve* the error. If a localized
  2132. // user-facing
  2133. // error message is needed, put the localized message in the error
  2134. // details or
  2135. // localize it in the client. The optional error details may contain
  2136. // arbitrary
  2137. // information about the error. There is a predefined set of error
  2138. // detail types
  2139. // in the package `google.rpc` that can be used for common error
  2140. // conditions.
  2141. //
  2142. // # Language mapping
  2143. //
  2144. // The `Status` message is the logical representation of the error
  2145. // model, but it
  2146. // is not necessarily the actual wire format. When the `Status` message
  2147. // is
  2148. // exposed in different client libraries and different wire protocols,
  2149. // it can be
  2150. // mapped differently. For example, it will likely be mapped to some
  2151. // exceptions
  2152. // in Java, but more likely mapped to some error codes in C.
  2153. //
  2154. // # Other uses
  2155. //
  2156. // The error model and the `Status` message can be used in a variety
  2157. // of
  2158. // environments, either with or without APIs, to provide a
  2159. // consistent developer experience across different
  2160. // environments.
  2161. //
  2162. // Example uses of this error model include:
  2163. //
  2164. // - Partial errors. If a service needs to return partial errors to the
  2165. // client,
  2166. // it may embed the `Status` in the normal response to indicate the
  2167. // partial
  2168. // errors.
  2169. //
  2170. // - Workflow errors. A typical workflow has multiple steps. Each step
  2171. // may
  2172. // have a `Status` message for error reporting.
  2173. //
  2174. // - Batch operations. If a client uses batch request and batch
  2175. // response, the
  2176. // `Status` message should be used directly inside batch response,
  2177. // one for
  2178. // each error sub-response.
  2179. //
  2180. // - Asynchronous operations. If an API call embeds asynchronous
  2181. // operation
  2182. // results in its response, the status of those operations should
  2183. // be
  2184. // represented directly using the `Status` message.
  2185. //
  2186. // - Logging. If some API errors are stored in logs, the message
  2187. // `Status` could
  2188. // be used directly after any stripping needed for security/privacy
  2189. // reasons.
  2190. type GoogleRpcStatus struct {
  2191. // Code: The status code, which should be an enum value of
  2192. // google.rpc.Code.
  2193. Code int64 `json:"code,omitempty"`
  2194. // Details: A list of messages that carry the error details. There is a
  2195. // common set of
  2196. // message types for APIs to use.
  2197. Details []googleapi.RawMessage `json:"details,omitempty"`
  2198. // Message: A developer-facing error message, which should be in
  2199. // English. Any
  2200. // user-facing error message should be localized and sent in
  2201. // the
  2202. // google.rpc.Status.details field, or localized by the client.
  2203. Message string `json:"message,omitempty"`
  2204. // ForceSendFields is a list of field names (e.g. "Code") to
  2205. // unconditionally include in API requests. By default, fields with
  2206. // empty values are omitted from API requests. However, any non-pointer,
  2207. // non-interface field appearing in ForceSendFields will be sent to the
  2208. // server regardless of whether the field is empty or not. This may be
  2209. // used to include empty fields in Patch requests.
  2210. ForceSendFields []string `json:"-"`
  2211. // NullFields is a list of field names (e.g. "Code") to include in API
  2212. // requests with the JSON null value. By default, fields with empty
  2213. // values are omitted from API requests. However, any field with an
  2214. // empty value appearing in NullFields will be sent to the server as
  2215. // null. It is an error if a field in this list has a non-empty value.
  2216. // This may be used to include null fields in Patch requests.
  2217. NullFields []string `json:"-"`
  2218. }
  2219. func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) {
  2220. type NoMethod GoogleRpcStatus
  2221. raw := NoMethod(*s)
  2222. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2223. }
  2224. // method id "videointelligence.videos.annotate":
  2225. type VideosAnnotateCall struct {
  2226. s *Service
  2227. googlecloudvideointelligencev1beta1Annotatevideorequest *GoogleCloudVideointelligenceV1beta1AnnotateVideoRequest
  2228. urlParams_ gensupport.URLParams
  2229. ctx_ context.Context
  2230. header_ http.Header
  2231. }
  2232. // Annotate: Performs asynchronous video annotation. Progress and
  2233. // results can be
  2234. // retrieved through the `google.longrunning.Operations`
  2235. // interface.
  2236. // `Operation.metadata` contains `AnnotateVideoProgress`
  2237. // (progress).
  2238. // `Operation.response` contains `AnnotateVideoResponse` (results).
  2239. func (r *VideosService) Annotate(googlecloudvideointelligencev1beta1Annotatevideorequest *GoogleCloudVideointelligenceV1beta1AnnotateVideoRequest) *VideosAnnotateCall {
  2240. c := &VideosAnnotateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2241. c.googlecloudvideointelligencev1beta1Annotatevideorequest = googlecloudvideointelligencev1beta1Annotatevideorequest
  2242. return c
  2243. }
  2244. // Fields allows partial responses to be retrieved. See
  2245. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2246. // for more information.
  2247. func (c *VideosAnnotateCall) Fields(s ...googleapi.Field) *VideosAnnotateCall {
  2248. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2249. return c
  2250. }
  2251. // Context sets the context to be used in this call's Do method. Any
  2252. // pending HTTP request will be aborted if the provided context is
  2253. // canceled.
  2254. func (c *VideosAnnotateCall) Context(ctx context.Context) *VideosAnnotateCall {
  2255. c.ctx_ = ctx
  2256. return c
  2257. }
  2258. // Header returns an http.Header that can be modified by the caller to
  2259. // add HTTP headers to the request.
  2260. func (c *VideosAnnotateCall) Header() http.Header {
  2261. if c.header_ == nil {
  2262. c.header_ = make(http.Header)
  2263. }
  2264. return c.header_
  2265. }
  2266. func (c *VideosAnnotateCall) doRequest(alt string) (*http.Response, error) {
  2267. reqHeaders := make(http.Header)
  2268. for k, v := range c.header_ {
  2269. reqHeaders[k] = v
  2270. }
  2271. reqHeaders.Set("User-Agent", c.s.userAgent())
  2272. var body io.Reader = nil
  2273. body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudvideointelligencev1beta1Annotatevideorequest)
  2274. if err != nil {
  2275. return nil, err
  2276. }
  2277. reqHeaders.Set("Content-Type", "application/json")
  2278. c.urlParams_.Set("alt", alt)
  2279. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/videos:annotate")
  2280. urls += "?" + c.urlParams_.Encode()
  2281. req, _ := http.NewRequest("POST", urls, body)
  2282. req.Header = reqHeaders
  2283. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2284. }
  2285. // Do executes the "videointelligence.videos.annotate" call.
  2286. // Exactly one of *GoogleLongrunningOperation or error will be non-nil.
  2287. // Any non-2xx status code is an error. Response headers are in either
  2288. // *GoogleLongrunningOperation.ServerResponse.Header or (if a response
  2289. // was returned at all) in error.(*googleapi.Error).Header. Use
  2290. // googleapi.IsNotModified to check whether the returned error was
  2291. // because http.StatusNotModified was returned.
  2292. func (c *VideosAnnotateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  2293. gensupport.SetOptions(c.urlParams_, opts...)
  2294. res, err := c.doRequest("json")
  2295. if res != nil && res.StatusCode == http.StatusNotModified {
  2296. if res.Body != nil {
  2297. res.Body.Close()
  2298. }
  2299. return nil, &googleapi.Error{
  2300. Code: res.StatusCode,
  2301. Header: res.Header,
  2302. }
  2303. }
  2304. if err != nil {
  2305. return nil, err
  2306. }
  2307. defer googleapi.CloseBody(res)
  2308. if err := googleapi.CheckResponse(res); err != nil {
  2309. return nil, err
  2310. }
  2311. ret := &GoogleLongrunningOperation{
  2312. ServerResponse: googleapi.ServerResponse{
  2313. Header: res.Header,
  2314. HTTPStatusCode: res.StatusCode,
  2315. },
  2316. }
  2317. target := &ret
  2318. if err := gensupport.DecodeResponse(target, res); err != nil {
  2319. return nil, err
  2320. }
  2321. return ret, nil
  2322. // {
  2323. // "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).",
  2324. // "flatPath": "v1beta1/videos:annotate",
  2325. // "httpMethod": "POST",
  2326. // "id": "videointelligence.videos.annotate",
  2327. // "parameterOrder": [],
  2328. // "parameters": {},
  2329. // "path": "v1beta1/videos:annotate",
  2330. // "request": {
  2331. // "$ref": "GoogleCloudVideointelligenceV1beta1_AnnotateVideoRequest"
  2332. // },
  2333. // "response": {
  2334. // "$ref": "GoogleLongrunning_Operation"
  2335. // },
  2336. // "scopes": [
  2337. // "https://www.googleapis.com/auth/cloud-platform"
  2338. // ]
  2339. // }
  2340. }