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.
 
 
 

2154 lines
94 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/v1beta2"
  8. // ...
  9. // videointelligenceService, err := videointelligence.New(oauthHttpClient)
  10. package videointelligence // import "google.golang.org/api/videointelligence/v1beta2"
  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:v1beta2"
  41. const apiName = "videointelligence"
  42. const apiVersion = "v1beta2"
  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. // GoogleCloudVideointelligenceV1beta2AnnotateVideoProgress: 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 GoogleCloudVideointelligenceV1beta2AnnotateVideoProgress struct {
  467. // AnnotationProgress: Progress metadata for all videos specified in
  468. // `AnnotateVideoRequest`.
  469. AnnotationProgress []*GoogleCloudVideointelligenceV1beta2VideoAnnotationProgress `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 *GoogleCloudVideointelligenceV1beta2AnnotateVideoProgress) MarshalJSON() ([]byte, error) {
  487. type NoMethod GoogleCloudVideointelligenceV1beta2AnnotateVideoProgress
  488. raw := NoMethod(*s)
  489. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  490. }
  491. // GoogleCloudVideointelligenceV1beta2AnnotateVideoRequest: Video
  492. // annotation request.
  493. type GoogleCloudVideointelligenceV1beta2AnnotateVideoRequest 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. // "EXPLICIT_CONTENT_DETECTION" - Explicit content detection.
  502. Features []string `json:"features,omitempty"`
  503. // InputContent: The video data bytes.
  504. // If unset, the input video(s) should be specified via `input_uri`.
  505. // If set, `input_uri` should be unset.
  506. InputContent string `json:"inputContent,omitempty"`
  507. // InputUri: Input video location. Currently, only
  508. // [Google Cloud Storage](https://cloud.google.com/storage/) URIs
  509. // are
  510. // supported, which must be specified in the following
  511. // format:
  512. // `gs://bucket-id/object-id` (other URI formats
  513. // return
  514. // google.rpc.Code.INVALID_ARGUMENT). For more information, see
  515. // [Request URIs](/storage/docs/reference-uris).
  516. // A video URI may include wildcards in `object-id`, and thus
  517. // identify
  518. // multiple videos. Supported wildcards: '*' to match 0 or more
  519. // characters;
  520. // '?' to match 1 character. If unset, the input video should be
  521. // embedded
  522. // in the request as `input_content`. If set, `input_content` should be
  523. // unset.
  524. InputUri string `json:"inputUri,omitempty"`
  525. // LocationId: Optional cloud region where annotation should take place.
  526. // Supported cloud
  527. // regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no
  528. // region
  529. // is specified, a region will be determined based on video file
  530. // location.
  531. LocationId string `json:"locationId,omitempty"`
  532. // OutputUri: Optional location where the output (in JSON format) should
  533. // be stored.
  534. // Currently, only [Google Cloud
  535. // Storage](https://cloud.google.com/storage/)
  536. // URIs are supported, which must be specified in the following
  537. // format:
  538. // `gs://bucket-id/object-id` (other URI formats
  539. // return
  540. // google.rpc.Code.INVALID_ARGUMENT). For more information, see
  541. // [Request URIs](/storage/docs/reference-uris).
  542. OutputUri string `json:"outputUri,omitempty"`
  543. // VideoContext: Additional video context and/or feature-specific
  544. // parameters.
  545. VideoContext *GoogleCloudVideointelligenceV1beta2VideoContext `json:"videoContext,omitempty"`
  546. // ForceSendFields is a list of field names (e.g. "Features") to
  547. // unconditionally include in API requests. By default, fields with
  548. // empty values are omitted from API requests. However, any non-pointer,
  549. // non-interface field appearing in ForceSendFields will be sent to the
  550. // server regardless of whether the field is empty or not. This may be
  551. // used to include empty fields in Patch requests.
  552. ForceSendFields []string `json:"-"`
  553. // NullFields is a list of field names (e.g. "Features") to include in
  554. // API requests with the JSON null value. By default, fields with empty
  555. // values are omitted from API requests. However, any field with an
  556. // empty value appearing in NullFields will be sent to the server as
  557. // null. It is an error if a field in this list has a non-empty value.
  558. // This may be used to include null fields in Patch requests.
  559. NullFields []string `json:"-"`
  560. }
  561. func (s *GoogleCloudVideointelligenceV1beta2AnnotateVideoRequest) MarshalJSON() ([]byte, error) {
  562. type NoMethod GoogleCloudVideointelligenceV1beta2AnnotateVideoRequest
  563. raw := NoMethod(*s)
  564. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  565. }
  566. // GoogleCloudVideointelligenceV1beta2AnnotateVideoResponse: Video
  567. // annotation response. Included in the `response`
  568. // field of the `Operation` returned by the `GetOperation`
  569. // call of the `google::longrunning::Operations` service.
  570. type GoogleCloudVideointelligenceV1beta2AnnotateVideoResponse struct {
  571. // AnnotationResults: Annotation results for all videos specified in
  572. // `AnnotateVideoRequest`.
  573. AnnotationResults []*GoogleCloudVideointelligenceV1beta2VideoAnnotationResults `json:"annotationResults,omitempty"`
  574. // ForceSendFields is a list of field names (e.g. "AnnotationResults")
  575. // to unconditionally include in API requests. By default, fields with
  576. // empty values are omitted from API requests. However, any non-pointer,
  577. // non-interface field appearing in ForceSendFields will be sent to the
  578. // server regardless of whether the field is empty or not. This may be
  579. // used to include empty fields in Patch requests.
  580. ForceSendFields []string `json:"-"`
  581. // NullFields is a list of field names (e.g. "AnnotationResults") to
  582. // include in API requests with the JSON null value. By default, fields
  583. // with empty values are omitted from API requests. However, any field
  584. // with an empty value appearing in NullFields will be sent to the
  585. // server as null. It is an error if a field in this list has a
  586. // non-empty value. This may be used to include null fields in Patch
  587. // requests.
  588. NullFields []string `json:"-"`
  589. }
  590. func (s *GoogleCloudVideointelligenceV1beta2AnnotateVideoResponse) MarshalJSON() ([]byte, error) {
  591. type NoMethod GoogleCloudVideointelligenceV1beta2AnnotateVideoResponse
  592. raw := NoMethod(*s)
  593. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  594. }
  595. // GoogleCloudVideointelligenceV1beta2Entity: Detected entity from video
  596. // analysis.
  597. type GoogleCloudVideointelligenceV1beta2Entity struct {
  598. // Description: Textual description, e.g. `Fixed-gear bicycle`.
  599. Description string `json:"description,omitempty"`
  600. // EntityId: Opaque entity ID. Some IDs may be available in
  601. // [Google Knowledge Graph
  602. // Search
  603. // API](https://developers.google.com/knowledge-graph/).
  604. EntityId string `json:"entityId,omitempty"`
  605. // LanguageCode: Language code for `description` in BCP-47 format.
  606. LanguageCode string `json:"languageCode,omitempty"`
  607. // ForceSendFields is a list of field names (e.g. "Description") to
  608. // unconditionally include in API requests. By default, fields with
  609. // empty values are omitted from API requests. However, any non-pointer,
  610. // non-interface field appearing in ForceSendFields will be sent to the
  611. // server regardless of whether the field is empty or not. This may be
  612. // used to include empty fields in Patch requests.
  613. ForceSendFields []string `json:"-"`
  614. // NullFields is a list of field names (e.g. "Description") to include
  615. // in API requests with the JSON null value. By default, fields with
  616. // empty values are omitted from API requests. However, any field with
  617. // an empty value appearing in NullFields will be sent to the server as
  618. // null. It is an error if a field in this list has a non-empty value.
  619. // This may be used to include null fields in Patch requests.
  620. NullFields []string `json:"-"`
  621. }
  622. func (s *GoogleCloudVideointelligenceV1beta2Entity) MarshalJSON() ([]byte, error) {
  623. type NoMethod GoogleCloudVideointelligenceV1beta2Entity
  624. raw := NoMethod(*s)
  625. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  626. }
  627. // GoogleCloudVideointelligenceV1beta2ExplicitContentAnnotation:
  628. // Explicit content annotation (based on per-frame visual signals
  629. // only).
  630. // If no explicit content has been detected in a frame, no annotations
  631. // are
  632. // present for that frame.
  633. type GoogleCloudVideointelligenceV1beta2ExplicitContentAnnotation struct {
  634. // Frames: All video frames where explicit content was detected.
  635. Frames []*GoogleCloudVideointelligenceV1beta2ExplicitContentFrame `json:"frames,omitempty"`
  636. // ForceSendFields is a list of field names (e.g. "Frames") to
  637. // unconditionally include in API requests. By default, fields with
  638. // empty values are omitted from API requests. However, any non-pointer,
  639. // non-interface field appearing in ForceSendFields will be sent to the
  640. // server regardless of whether the field is empty or not. This may be
  641. // used to include empty fields in Patch requests.
  642. ForceSendFields []string `json:"-"`
  643. // NullFields is a list of field names (e.g. "Frames") to include in API
  644. // requests with the JSON null value. By default, fields with empty
  645. // values are omitted from API requests. However, any field with an
  646. // empty value appearing in NullFields will be sent to the server as
  647. // null. It is an error if a field in this list has a non-empty value.
  648. // This may be used to include null fields in Patch requests.
  649. NullFields []string `json:"-"`
  650. }
  651. func (s *GoogleCloudVideointelligenceV1beta2ExplicitContentAnnotation) MarshalJSON() ([]byte, error) {
  652. type NoMethod GoogleCloudVideointelligenceV1beta2ExplicitContentAnnotation
  653. raw := NoMethod(*s)
  654. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  655. }
  656. // GoogleCloudVideointelligenceV1beta2ExplicitContentDetectionConfig:
  657. // Config for EXPLICIT_CONTENT_DETECTION.
  658. type GoogleCloudVideointelligenceV1beta2ExplicitContentDetectionConfig struct {
  659. // Model: Model to use for explicit content detection.
  660. // Supported values: "builtin/stable" (the default if unset)
  661. // and
  662. // "builtin/latest".
  663. Model string `json:"model,omitempty"`
  664. // ForceSendFields is a list of field names (e.g. "Model") to
  665. // unconditionally include in API requests. By default, fields with
  666. // empty values are omitted from API requests. However, any non-pointer,
  667. // non-interface field appearing in ForceSendFields will be sent to the
  668. // server regardless of whether the field is empty or not. This may be
  669. // used to include empty fields in Patch requests.
  670. ForceSendFields []string `json:"-"`
  671. // NullFields is a list of field names (e.g. "Model") to include in API
  672. // requests with the JSON null value. By default, fields with empty
  673. // values are omitted from API requests. However, any field with an
  674. // empty value appearing in NullFields will be sent to the server as
  675. // null. It is an error if a field in this list has a non-empty value.
  676. // This may be used to include null fields in Patch requests.
  677. NullFields []string `json:"-"`
  678. }
  679. func (s *GoogleCloudVideointelligenceV1beta2ExplicitContentDetectionConfig) MarshalJSON() ([]byte, error) {
  680. type NoMethod GoogleCloudVideointelligenceV1beta2ExplicitContentDetectionConfig
  681. raw := NoMethod(*s)
  682. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  683. }
  684. // GoogleCloudVideointelligenceV1beta2ExplicitContentFrame: Video frame
  685. // level annotation results for explicit content.
  686. type GoogleCloudVideointelligenceV1beta2ExplicitContentFrame struct {
  687. // PornographyLikelihood: Likelihood of the pornography content..
  688. //
  689. // Possible values:
  690. // "LIKELIHOOD_UNSPECIFIED" - Unspecified likelihood.
  691. // "VERY_UNLIKELY" - Very unlikely.
  692. // "UNLIKELY" - Unlikely.
  693. // "POSSIBLE" - Possible.
  694. // "LIKELY" - Likely.
  695. // "VERY_LIKELY" - Very likely.
  696. PornographyLikelihood string `json:"pornographyLikelihood,omitempty"`
  697. // TimeOffset: Time-offset, relative to the beginning of the video,
  698. // corresponding to the
  699. // video frame for this location.
  700. TimeOffset string `json:"timeOffset,omitempty"`
  701. // ForceSendFields is a list of field names (e.g.
  702. // "PornographyLikelihood") to unconditionally include in API requests.
  703. // By default, fields with empty values are omitted from API requests.
  704. // However, any non-pointer, non-interface field appearing in
  705. // ForceSendFields will be sent to the server regardless of whether the
  706. // field is empty or not. This may be used to include empty fields in
  707. // Patch requests.
  708. ForceSendFields []string `json:"-"`
  709. // NullFields is a list of field names (e.g. "PornographyLikelihood") to
  710. // include in API requests with the JSON null value. By default, fields
  711. // with empty values are omitted from API requests. However, any field
  712. // with an empty value appearing in NullFields will be sent to the
  713. // server as null. It is an error if a field in this list has a
  714. // non-empty value. This may be used to include null fields in Patch
  715. // requests.
  716. NullFields []string `json:"-"`
  717. }
  718. func (s *GoogleCloudVideointelligenceV1beta2ExplicitContentFrame) MarshalJSON() ([]byte, error) {
  719. type NoMethod GoogleCloudVideointelligenceV1beta2ExplicitContentFrame
  720. raw := NoMethod(*s)
  721. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  722. }
  723. // GoogleCloudVideointelligenceV1beta2LabelAnnotation: Label annotation.
  724. type GoogleCloudVideointelligenceV1beta2LabelAnnotation struct {
  725. // CategoryEntities: Common categories for the detected entity.
  726. // E.g. when the label is `Terrier` the category is likely `dog`. And in
  727. // some
  728. // cases there might be more than one categories e.g. `Terrier` could
  729. // also be
  730. // a `pet`.
  731. CategoryEntities []*GoogleCloudVideointelligenceV1beta2Entity `json:"categoryEntities,omitempty"`
  732. // Entity: Detected entity.
  733. Entity *GoogleCloudVideointelligenceV1beta2Entity `json:"entity,omitempty"`
  734. // Frames: All video frames where a label was detected.
  735. Frames []*GoogleCloudVideointelligenceV1beta2LabelFrame `json:"frames,omitempty"`
  736. // Segments: All video segments where a label was detected.
  737. Segments []*GoogleCloudVideointelligenceV1beta2LabelSegment `json:"segments,omitempty"`
  738. // ForceSendFields is a list of field names (e.g. "CategoryEntities") to
  739. // unconditionally include in API requests. By default, fields with
  740. // empty values are omitted from API requests. However, any non-pointer,
  741. // non-interface field appearing in ForceSendFields will be sent to the
  742. // server regardless of whether the field is empty or not. This may be
  743. // used to include empty fields in Patch requests.
  744. ForceSendFields []string `json:"-"`
  745. // NullFields is a list of field names (e.g. "CategoryEntities") to
  746. // include in API requests with the JSON null value. By default, fields
  747. // with empty values are omitted from API requests. However, any field
  748. // with an empty value appearing in NullFields will be sent to the
  749. // server as null. It is an error if a field in this list has a
  750. // non-empty value. This may be used to include null fields in Patch
  751. // requests.
  752. NullFields []string `json:"-"`
  753. }
  754. func (s *GoogleCloudVideointelligenceV1beta2LabelAnnotation) MarshalJSON() ([]byte, error) {
  755. type NoMethod GoogleCloudVideointelligenceV1beta2LabelAnnotation
  756. raw := NoMethod(*s)
  757. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  758. }
  759. // GoogleCloudVideointelligenceV1beta2LabelDetectionConfig: Config for
  760. // LABEL_DETECTION.
  761. type GoogleCloudVideointelligenceV1beta2LabelDetectionConfig struct {
  762. // LabelDetectionMode: What labels should be detected with
  763. // LABEL_DETECTION, in addition to
  764. // video-level labels or segment-level labels.
  765. // If unspecified, defaults to `SHOT_MODE`.
  766. //
  767. // Possible values:
  768. // "LABEL_DETECTION_MODE_UNSPECIFIED" - Unspecified.
  769. // "SHOT_MODE" - Detect shot-level labels.
  770. // "FRAME_MODE" - Detect frame-level labels.
  771. // "SHOT_AND_FRAME_MODE" - Detect both shot-level and frame-level
  772. // labels.
  773. LabelDetectionMode string `json:"labelDetectionMode,omitempty"`
  774. // Model: Model to use for label detection.
  775. // Supported values: "builtin/stable" (the default if unset)
  776. // and
  777. // "builtin/latest".
  778. Model string `json:"model,omitempty"`
  779. // StationaryCamera: Whether the video has been shot from a stationary
  780. // (i.e. non-moving) camera.
  781. // When set to true, might improve detection accuracy for moving
  782. // objects.
  783. // Should be used with `SHOT_AND_FRAME_MODE` enabled.
  784. StationaryCamera bool `json:"stationaryCamera,omitempty"`
  785. // ForceSendFields is a list of field names (e.g. "LabelDetectionMode")
  786. // to unconditionally include in API requests. By default, fields with
  787. // empty values are omitted from API requests. However, any non-pointer,
  788. // non-interface field appearing in ForceSendFields will be sent to the
  789. // server regardless of whether the field is empty or not. This may be
  790. // used to include empty fields in Patch requests.
  791. ForceSendFields []string `json:"-"`
  792. // NullFields is a list of field names (e.g. "LabelDetectionMode") to
  793. // include in API requests with the JSON null value. By default, fields
  794. // with empty values are omitted from API requests. However, any field
  795. // with an empty value appearing in NullFields will be sent to the
  796. // server as null. It is an error if a field in this list has a
  797. // non-empty value. This may be used to include null fields in Patch
  798. // requests.
  799. NullFields []string `json:"-"`
  800. }
  801. func (s *GoogleCloudVideointelligenceV1beta2LabelDetectionConfig) MarshalJSON() ([]byte, error) {
  802. type NoMethod GoogleCloudVideointelligenceV1beta2LabelDetectionConfig
  803. raw := NoMethod(*s)
  804. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  805. }
  806. // GoogleCloudVideointelligenceV1beta2LabelFrame: Video frame level
  807. // annotation results for label detection.
  808. type GoogleCloudVideointelligenceV1beta2LabelFrame struct {
  809. // Confidence: Confidence that the label is accurate. Range: [0, 1].
  810. Confidence float64 `json:"confidence,omitempty"`
  811. // TimeOffset: Time-offset, relative to the beginning of the video,
  812. // corresponding to the
  813. // video frame for this location.
  814. TimeOffset string `json:"timeOffset,omitempty"`
  815. // ForceSendFields is a list of field names (e.g. "Confidence") to
  816. // unconditionally include in API requests. By default, fields with
  817. // empty values are omitted from API requests. However, any non-pointer,
  818. // non-interface field appearing in ForceSendFields will be sent to the
  819. // server regardless of whether the field is empty or not. This may be
  820. // used to include empty fields in Patch requests.
  821. ForceSendFields []string `json:"-"`
  822. // NullFields is a list of field names (e.g. "Confidence") to include in
  823. // API requests with the JSON null value. By default, fields with empty
  824. // values are omitted from API requests. However, any field with an
  825. // empty value appearing in NullFields will be sent to the server as
  826. // null. It is an error if a field in this list has a non-empty value.
  827. // This may be used to include null fields in Patch requests.
  828. NullFields []string `json:"-"`
  829. }
  830. func (s *GoogleCloudVideointelligenceV1beta2LabelFrame) MarshalJSON() ([]byte, error) {
  831. type NoMethod GoogleCloudVideointelligenceV1beta2LabelFrame
  832. raw := NoMethod(*s)
  833. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  834. }
  835. func (s *GoogleCloudVideointelligenceV1beta2LabelFrame) UnmarshalJSON(data []byte) error {
  836. type NoMethod GoogleCloudVideointelligenceV1beta2LabelFrame
  837. var s1 struct {
  838. Confidence gensupport.JSONFloat64 `json:"confidence"`
  839. *NoMethod
  840. }
  841. s1.NoMethod = (*NoMethod)(s)
  842. if err := json.Unmarshal(data, &s1); err != nil {
  843. return err
  844. }
  845. s.Confidence = float64(s1.Confidence)
  846. return nil
  847. }
  848. // GoogleCloudVideointelligenceV1beta2LabelSegment: Video segment level
  849. // annotation results for label detection.
  850. type GoogleCloudVideointelligenceV1beta2LabelSegment struct {
  851. // Confidence: Confidence that the label is accurate. Range: [0, 1].
  852. Confidence float64 `json:"confidence,omitempty"`
  853. // Segment: Video segment where a label was detected.
  854. Segment *GoogleCloudVideointelligenceV1beta2VideoSegment `json:"segment,omitempty"`
  855. // ForceSendFields is a list of field names (e.g. "Confidence") to
  856. // unconditionally include in API requests. By default, fields with
  857. // empty values are omitted from API requests. However, any non-pointer,
  858. // non-interface field appearing in ForceSendFields will be sent to the
  859. // server regardless of whether the field is empty or not. This may be
  860. // used to include empty fields in Patch requests.
  861. ForceSendFields []string `json:"-"`
  862. // NullFields is a list of field names (e.g. "Confidence") to include in
  863. // API requests with the JSON null value. By default, fields with empty
  864. // values are omitted from API requests. However, any field with an
  865. // empty value appearing in NullFields will be sent to the server as
  866. // null. It is an error if a field in this list has a non-empty value.
  867. // This may be used to include null fields in Patch requests.
  868. NullFields []string `json:"-"`
  869. }
  870. func (s *GoogleCloudVideointelligenceV1beta2LabelSegment) MarshalJSON() ([]byte, error) {
  871. type NoMethod GoogleCloudVideointelligenceV1beta2LabelSegment
  872. raw := NoMethod(*s)
  873. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  874. }
  875. func (s *GoogleCloudVideointelligenceV1beta2LabelSegment) UnmarshalJSON(data []byte) error {
  876. type NoMethod GoogleCloudVideointelligenceV1beta2LabelSegment
  877. var s1 struct {
  878. Confidence gensupport.JSONFloat64 `json:"confidence"`
  879. *NoMethod
  880. }
  881. s1.NoMethod = (*NoMethod)(s)
  882. if err := json.Unmarshal(data, &s1); err != nil {
  883. return err
  884. }
  885. s.Confidence = float64(s1.Confidence)
  886. return nil
  887. }
  888. // GoogleCloudVideointelligenceV1beta2ShotChangeDetectionConfig: Config
  889. // for SHOT_CHANGE_DETECTION.
  890. type GoogleCloudVideointelligenceV1beta2ShotChangeDetectionConfig struct {
  891. // Model: Model to use for shot change detection.
  892. // Supported values: "builtin/stable" (the default if unset)
  893. // and
  894. // "builtin/latest".
  895. Model string `json:"model,omitempty"`
  896. // ForceSendFields is a list of field names (e.g. "Model") to
  897. // unconditionally include in API requests. By default, fields with
  898. // empty values are omitted from API requests. However, any non-pointer,
  899. // non-interface field appearing in ForceSendFields will be sent to the
  900. // server regardless of whether the field is empty or not. This may be
  901. // used to include empty fields in Patch requests.
  902. ForceSendFields []string `json:"-"`
  903. // NullFields is a list of field names (e.g. "Model") to include in API
  904. // requests with the JSON null value. By default, fields with empty
  905. // values are omitted from API requests. However, any field with an
  906. // empty value appearing in NullFields will be sent to the server as
  907. // null. It is an error if a field in this list has a non-empty value.
  908. // This may be used to include null fields in Patch requests.
  909. NullFields []string `json:"-"`
  910. }
  911. func (s *GoogleCloudVideointelligenceV1beta2ShotChangeDetectionConfig) MarshalJSON() ([]byte, error) {
  912. type NoMethod GoogleCloudVideointelligenceV1beta2ShotChangeDetectionConfig
  913. raw := NoMethod(*s)
  914. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  915. }
  916. // GoogleCloudVideointelligenceV1beta2VideoAnnotationProgress:
  917. // Annotation progress for a single video.
  918. type GoogleCloudVideointelligenceV1beta2VideoAnnotationProgress struct {
  919. // InputUri: Output only. Video file location in
  920. // [Google Cloud Storage](https://cloud.google.com/storage/).
  921. InputUri string `json:"inputUri,omitempty"`
  922. // ProgressPercent: Output only. Approximate percentage processed thus
  923. // far. Guaranteed to be
  924. // 100 when fully processed.
  925. ProgressPercent int64 `json:"progressPercent,omitempty"`
  926. // StartTime: Output only. Time when the request was received.
  927. StartTime string `json:"startTime,omitempty"`
  928. // UpdateTime: Output only. Time of the most recent update.
  929. UpdateTime string `json:"updateTime,omitempty"`
  930. // ForceSendFields is a list of field names (e.g. "InputUri") to
  931. // unconditionally include in API requests. By default, fields with
  932. // empty values are omitted from API requests. However, any non-pointer,
  933. // non-interface field appearing in ForceSendFields will be sent to the
  934. // server regardless of whether the field is empty or not. This may be
  935. // used to include empty fields in Patch requests.
  936. ForceSendFields []string `json:"-"`
  937. // NullFields is a list of field names (e.g. "InputUri") to include in
  938. // API requests with the JSON null value. By default, fields with empty
  939. // values are omitted from API requests. However, any field with an
  940. // empty value appearing in NullFields will be sent to the server as
  941. // null. It is an error if a field in this list has a non-empty value.
  942. // This may be used to include null fields in Patch requests.
  943. NullFields []string `json:"-"`
  944. }
  945. func (s *GoogleCloudVideointelligenceV1beta2VideoAnnotationProgress) MarshalJSON() ([]byte, error) {
  946. type NoMethod GoogleCloudVideointelligenceV1beta2VideoAnnotationProgress
  947. raw := NoMethod(*s)
  948. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  949. }
  950. // GoogleCloudVideointelligenceV1beta2VideoAnnotationResults: Annotation
  951. // results for a single video.
  952. type GoogleCloudVideointelligenceV1beta2VideoAnnotationResults struct {
  953. // Error: Output only. Non-streaming error only. If set, indicates an
  954. // error. Note
  955. // that for a single `AnnotateVideoRequest` some videos may succeed and
  956. // some
  957. // may fail.
  958. Error *GoogleRpcStatus `json:"error,omitempty"`
  959. // ExplicitAnnotation: Explicit content annotation.
  960. ExplicitAnnotation *GoogleCloudVideointelligenceV1beta2ExplicitContentAnnotation `json:"explicitAnnotation,omitempty"`
  961. // FrameLabelAnnotations: Label annotations on frame level.
  962. // There is exactly one element for each unique label.
  963. FrameLabelAnnotations []*GoogleCloudVideointelligenceV1beta2LabelAnnotation `json:"frameLabelAnnotations,omitempty"`
  964. // InputUri: Output only. Video file location in
  965. // [Google Cloud Storage](https://cloud.google.com/storage/).
  966. InputUri string `json:"inputUri,omitempty"`
  967. // SegmentLabelAnnotations: Label annotations on video level or user
  968. // specified segment level.
  969. // There is exactly one element for each unique label.
  970. SegmentLabelAnnotations []*GoogleCloudVideointelligenceV1beta2LabelAnnotation `json:"segmentLabelAnnotations,omitempty"`
  971. // ShotAnnotations: Shot annotations. Each shot is represented as a
  972. // video segment.
  973. ShotAnnotations []*GoogleCloudVideointelligenceV1beta2VideoSegment `json:"shotAnnotations,omitempty"`
  974. // ShotLabelAnnotations: Label annotations on shot level.
  975. // There is exactly one element for each unique label.
  976. ShotLabelAnnotations []*GoogleCloudVideointelligenceV1beta2LabelAnnotation `json:"shotLabelAnnotations,omitempty"`
  977. // ForceSendFields is a list of field names (e.g. "Error") to
  978. // unconditionally include in API requests. By default, fields with
  979. // empty values are omitted from API requests. However, any non-pointer,
  980. // non-interface field appearing in ForceSendFields will be sent to the
  981. // server regardless of whether the field is empty or not. This may be
  982. // used to include empty fields in Patch requests.
  983. ForceSendFields []string `json:"-"`
  984. // NullFields is a list of field names (e.g. "Error") to include in API
  985. // requests with the JSON null value. By default, fields with empty
  986. // values are omitted from API requests. However, any field with an
  987. // empty value appearing in NullFields will be sent to the server as
  988. // null. It is an error if a field in this list has a non-empty value.
  989. // This may be used to include null fields in Patch requests.
  990. NullFields []string `json:"-"`
  991. }
  992. func (s *GoogleCloudVideointelligenceV1beta2VideoAnnotationResults) MarshalJSON() ([]byte, error) {
  993. type NoMethod GoogleCloudVideointelligenceV1beta2VideoAnnotationResults
  994. raw := NoMethod(*s)
  995. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  996. }
  997. // GoogleCloudVideointelligenceV1beta2VideoContext: Video context and/or
  998. // feature-specific parameters.
  999. type GoogleCloudVideointelligenceV1beta2VideoContext struct {
  1000. // ExplicitContentDetectionConfig: Config for
  1001. // EXPLICIT_CONTENT_DETECTION.
  1002. ExplicitContentDetectionConfig *GoogleCloudVideointelligenceV1beta2ExplicitContentDetectionConfig `json:"explicitContentDetectionConfig,omitempty"`
  1003. // LabelDetectionConfig: Config for LABEL_DETECTION.
  1004. LabelDetectionConfig *GoogleCloudVideointelligenceV1beta2LabelDetectionConfig `json:"labelDetectionConfig,omitempty"`
  1005. // Segments: Non-streaming request only. Video segments to annotate. The
  1006. // segments may
  1007. // overlap and are not required to be contiguous or span the whole
  1008. // video. If
  1009. // unspecified, each video is treated as a single segment.
  1010. Segments []*GoogleCloudVideointelligenceV1beta2VideoSegment `json:"segments,omitempty"`
  1011. // ShotChangeDetectionConfig: Config for SHOT_CHANGE_DETECTION.
  1012. ShotChangeDetectionConfig *GoogleCloudVideointelligenceV1beta2ShotChangeDetectionConfig `json:"shotChangeDetectionConfig,omitempty"`
  1013. // ForceSendFields is a list of field names (e.g.
  1014. // "ExplicitContentDetectionConfig") to unconditionally include in API
  1015. // requests. By default, fields with empty values are omitted from API
  1016. // requests. However, any non-pointer, non-interface field appearing in
  1017. // ForceSendFields will be sent to the server regardless of whether the
  1018. // field is empty or not. This may be used to include empty fields in
  1019. // Patch requests.
  1020. ForceSendFields []string `json:"-"`
  1021. // NullFields is a list of field names (e.g.
  1022. // "ExplicitContentDetectionConfig") to include in API requests with the
  1023. // JSON null value. By default, fields with empty values are omitted
  1024. // from API requests. However, any field with an empty value appearing
  1025. // in NullFields will be sent to the server as null. It is an error if a
  1026. // field in this list has a non-empty value. This may be used to include
  1027. // null fields in Patch requests.
  1028. NullFields []string `json:"-"`
  1029. }
  1030. func (s *GoogleCloudVideointelligenceV1beta2VideoContext) MarshalJSON() ([]byte, error) {
  1031. type NoMethod GoogleCloudVideointelligenceV1beta2VideoContext
  1032. raw := NoMethod(*s)
  1033. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1034. }
  1035. // GoogleCloudVideointelligenceV1beta2VideoSegment: Video segment.
  1036. type GoogleCloudVideointelligenceV1beta2VideoSegment struct {
  1037. // EndTimeOffset: Time-offset, relative to the beginning of the
  1038. // video,
  1039. // corresponding to the end of the segment (inclusive).
  1040. EndTimeOffset string `json:"endTimeOffset,omitempty"`
  1041. // StartTimeOffset: Time-offset, relative to the beginning of the
  1042. // video,
  1043. // corresponding to the start of the segment (inclusive).
  1044. StartTimeOffset string `json:"startTimeOffset,omitempty"`
  1045. // ForceSendFields is a list of field names (e.g. "EndTimeOffset") to
  1046. // unconditionally include in API requests. By default, fields with
  1047. // empty values are omitted from API requests. However, any non-pointer,
  1048. // non-interface field appearing in ForceSendFields will be sent to the
  1049. // server regardless of whether the field is empty or not. This may be
  1050. // used to include empty fields in Patch requests.
  1051. ForceSendFields []string `json:"-"`
  1052. // NullFields is a list of field names (e.g. "EndTimeOffset") to include
  1053. // in API requests with the JSON null value. By default, fields with
  1054. // empty values are omitted from API requests. However, any field with
  1055. // an empty value appearing in NullFields will be sent to the server as
  1056. // null. It is an error if a field in this list has a non-empty value.
  1057. // This may be used to include null fields in Patch requests.
  1058. NullFields []string `json:"-"`
  1059. }
  1060. func (s *GoogleCloudVideointelligenceV1beta2VideoSegment) MarshalJSON() ([]byte, error) {
  1061. type NoMethod GoogleCloudVideointelligenceV1beta2VideoSegment
  1062. raw := NoMethod(*s)
  1063. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1064. }
  1065. // GoogleCloudVideointelligenceV1p1beta1AnnotateVideoProgress: Video
  1066. // annotation progress. Included in the `metadata`
  1067. // field of the `Operation` returned by the `GetOperation`
  1068. // call of the `google::longrunning::Operations` service.
  1069. type GoogleCloudVideointelligenceV1p1beta1AnnotateVideoProgress struct {
  1070. // AnnotationProgress: Progress metadata for all videos specified in
  1071. // `AnnotateVideoRequest`.
  1072. AnnotationProgress []*GoogleCloudVideointelligenceV1p1beta1VideoAnnotationProgress `json:"annotationProgress,omitempty"`
  1073. // ForceSendFields is a list of field names (e.g. "AnnotationProgress")
  1074. // to unconditionally include in API requests. By default, fields with
  1075. // empty values are omitted from API requests. However, any non-pointer,
  1076. // non-interface field appearing in ForceSendFields will be sent to the
  1077. // server regardless of whether the field is empty or not. This may be
  1078. // used to include empty fields in Patch requests.
  1079. ForceSendFields []string `json:"-"`
  1080. // NullFields is a list of field names (e.g. "AnnotationProgress") to
  1081. // include in API requests with the JSON null value. By default, fields
  1082. // with empty values are omitted from API requests. However, any field
  1083. // with an empty value appearing in NullFields will be sent to the
  1084. // server as null. It is an error if a field in this list has a
  1085. // non-empty value. This may be used to include null fields in Patch
  1086. // requests.
  1087. NullFields []string `json:"-"`
  1088. }
  1089. func (s *GoogleCloudVideointelligenceV1p1beta1AnnotateVideoProgress) MarshalJSON() ([]byte, error) {
  1090. type NoMethod GoogleCloudVideointelligenceV1p1beta1AnnotateVideoProgress
  1091. raw := NoMethod(*s)
  1092. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1093. }
  1094. // GoogleCloudVideointelligenceV1p1beta1AnnotateVideoResponse: Video
  1095. // annotation response. Included in the `response`
  1096. // field of the `Operation` returned by the `GetOperation`
  1097. // call of the `google::longrunning::Operations` service.
  1098. type GoogleCloudVideointelligenceV1p1beta1AnnotateVideoResponse struct {
  1099. // AnnotationResults: Annotation results for all videos specified in
  1100. // `AnnotateVideoRequest`.
  1101. AnnotationResults []*GoogleCloudVideointelligenceV1p1beta1VideoAnnotationResults `json:"annotationResults,omitempty"`
  1102. // ForceSendFields is a list of field names (e.g. "AnnotationResults")
  1103. // to unconditionally include in API requests. By default, fields with
  1104. // empty values are omitted from API requests. However, any non-pointer,
  1105. // non-interface field appearing in ForceSendFields will be sent to the
  1106. // server regardless of whether the field is empty or not. This may be
  1107. // used to include empty fields in Patch requests.
  1108. ForceSendFields []string `json:"-"`
  1109. // NullFields is a list of field names (e.g. "AnnotationResults") to
  1110. // include in API requests with the JSON null value. By default, fields
  1111. // with empty values are omitted from API requests. However, any field
  1112. // with an empty value appearing in NullFields will be sent to the
  1113. // server as null. It is an error if a field in this list has a
  1114. // non-empty value. This may be used to include null fields in Patch
  1115. // requests.
  1116. NullFields []string `json:"-"`
  1117. }
  1118. func (s *GoogleCloudVideointelligenceV1p1beta1AnnotateVideoResponse) MarshalJSON() ([]byte, error) {
  1119. type NoMethod GoogleCloudVideointelligenceV1p1beta1AnnotateVideoResponse
  1120. raw := NoMethod(*s)
  1121. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1122. }
  1123. // GoogleCloudVideointelligenceV1p1beta1Entity: Detected entity from
  1124. // video analysis.
  1125. type GoogleCloudVideointelligenceV1p1beta1Entity struct {
  1126. // Description: Textual description, e.g. `Fixed-gear bicycle`.
  1127. Description string `json:"description,omitempty"`
  1128. // EntityId: Opaque entity ID. Some IDs may be available in
  1129. // [Google Knowledge Graph
  1130. // Search
  1131. // API](https://developers.google.com/knowledge-graph/).
  1132. EntityId string `json:"entityId,omitempty"`
  1133. // LanguageCode: Language code for `description` in BCP-47 format.
  1134. LanguageCode string `json:"languageCode,omitempty"`
  1135. // ForceSendFields is a list of field names (e.g. "Description") to
  1136. // unconditionally include in API requests. By default, fields with
  1137. // empty values are omitted from API requests. However, any non-pointer,
  1138. // non-interface field appearing in ForceSendFields will be sent to the
  1139. // server regardless of whether the field is empty or not. This may be
  1140. // used to include empty fields in Patch requests.
  1141. ForceSendFields []string `json:"-"`
  1142. // NullFields is a list of field names (e.g. "Description") to include
  1143. // in API requests with the JSON null value. By default, fields with
  1144. // empty values are omitted from API requests. However, any field with
  1145. // an empty value appearing in NullFields will be sent to the server as
  1146. // null. It is an error if a field in this list has a non-empty value.
  1147. // This may be used to include null fields in Patch requests.
  1148. NullFields []string `json:"-"`
  1149. }
  1150. func (s *GoogleCloudVideointelligenceV1p1beta1Entity) MarshalJSON() ([]byte, error) {
  1151. type NoMethod GoogleCloudVideointelligenceV1p1beta1Entity
  1152. raw := NoMethod(*s)
  1153. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1154. }
  1155. // GoogleCloudVideointelligenceV1p1beta1ExplicitContentAnnotation:
  1156. // Explicit content annotation (based on per-frame visual signals
  1157. // only).
  1158. // If no explicit content has been detected in a frame, no annotations
  1159. // are
  1160. // present for that frame.
  1161. type GoogleCloudVideointelligenceV1p1beta1ExplicitContentAnnotation struct {
  1162. // Frames: All video frames where explicit content was detected.
  1163. Frames []*GoogleCloudVideointelligenceV1p1beta1ExplicitContentFrame `json:"frames,omitempty"`
  1164. // ForceSendFields is a list of field names (e.g. "Frames") to
  1165. // unconditionally include in API requests. By default, fields with
  1166. // empty values are omitted from API requests. However, any non-pointer,
  1167. // non-interface field appearing in ForceSendFields will be sent to the
  1168. // server regardless of whether the field is empty or not. This may be
  1169. // used to include empty fields in Patch requests.
  1170. ForceSendFields []string `json:"-"`
  1171. // NullFields is a list of field names (e.g. "Frames") to include in API
  1172. // requests with the JSON null value. By default, fields with empty
  1173. // values are omitted from API requests. However, any field with an
  1174. // empty value appearing in NullFields will be sent to the server as
  1175. // null. It is an error if a field in this list has a non-empty value.
  1176. // This may be used to include null fields in Patch requests.
  1177. NullFields []string `json:"-"`
  1178. }
  1179. func (s *GoogleCloudVideointelligenceV1p1beta1ExplicitContentAnnotation) MarshalJSON() ([]byte, error) {
  1180. type NoMethod GoogleCloudVideointelligenceV1p1beta1ExplicitContentAnnotation
  1181. raw := NoMethod(*s)
  1182. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1183. }
  1184. // GoogleCloudVideointelligenceV1p1beta1ExplicitContentFrame: Video
  1185. // frame level annotation results for explicit content.
  1186. type GoogleCloudVideointelligenceV1p1beta1ExplicitContentFrame struct {
  1187. // PornographyLikelihood: Likelihood of the pornography content..
  1188. //
  1189. // Possible values:
  1190. // "LIKELIHOOD_UNSPECIFIED" - Unspecified likelihood.
  1191. // "VERY_UNLIKELY" - Very unlikely.
  1192. // "UNLIKELY" - Unlikely.
  1193. // "POSSIBLE" - Possible.
  1194. // "LIKELY" - Likely.
  1195. // "VERY_LIKELY" - Very likely.
  1196. PornographyLikelihood string `json:"pornographyLikelihood,omitempty"`
  1197. // TimeOffset: Time-offset, relative to the beginning of the video,
  1198. // corresponding to the
  1199. // video frame for this location.
  1200. TimeOffset string `json:"timeOffset,omitempty"`
  1201. // ForceSendFields is a list of field names (e.g.
  1202. // "PornographyLikelihood") to unconditionally include in API requests.
  1203. // By default, fields with empty values are omitted from API requests.
  1204. // However, any non-pointer, non-interface field appearing in
  1205. // ForceSendFields will be sent to the server regardless of whether the
  1206. // field is empty or not. This may be used to include empty fields in
  1207. // Patch requests.
  1208. ForceSendFields []string `json:"-"`
  1209. // NullFields is a list of field names (e.g. "PornographyLikelihood") to
  1210. // include in API requests with the JSON null value. By default, fields
  1211. // with empty values are omitted from API requests. However, any field
  1212. // with an empty value appearing in NullFields will be sent to the
  1213. // server as null. It is an error if a field in this list has a
  1214. // non-empty value. This may be used to include null fields in Patch
  1215. // requests.
  1216. NullFields []string `json:"-"`
  1217. }
  1218. func (s *GoogleCloudVideointelligenceV1p1beta1ExplicitContentFrame) MarshalJSON() ([]byte, error) {
  1219. type NoMethod GoogleCloudVideointelligenceV1p1beta1ExplicitContentFrame
  1220. raw := NoMethod(*s)
  1221. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1222. }
  1223. // GoogleCloudVideointelligenceV1p1beta1LabelAnnotation: Label
  1224. // annotation.
  1225. type GoogleCloudVideointelligenceV1p1beta1LabelAnnotation struct {
  1226. // CategoryEntities: Common categories for the detected entity.
  1227. // E.g. when the label is `Terrier` the category is likely `dog`. And in
  1228. // some
  1229. // cases there might be more than one categories e.g. `Terrier` could
  1230. // also be
  1231. // a `pet`.
  1232. CategoryEntities []*GoogleCloudVideointelligenceV1p1beta1Entity `json:"categoryEntities,omitempty"`
  1233. // Entity: Detected entity.
  1234. Entity *GoogleCloudVideointelligenceV1p1beta1Entity `json:"entity,omitempty"`
  1235. // Frames: All video frames where a label was detected.
  1236. Frames []*GoogleCloudVideointelligenceV1p1beta1LabelFrame `json:"frames,omitempty"`
  1237. // Segments: All video segments where a label was detected.
  1238. Segments []*GoogleCloudVideointelligenceV1p1beta1LabelSegment `json:"segments,omitempty"`
  1239. // ForceSendFields is a list of field names (e.g. "CategoryEntities") to
  1240. // unconditionally include in API requests. By default, fields with
  1241. // empty values are omitted from API requests. However, any non-pointer,
  1242. // non-interface field appearing in ForceSendFields will be sent to the
  1243. // server regardless of whether the field is empty or not. This may be
  1244. // used to include empty fields in Patch requests.
  1245. ForceSendFields []string `json:"-"`
  1246. // NullFields is a list of field names (e.g. "CategoryEntities") to
  1247. // include in API requests with the JSON null value. By default, fields
  1248. // with empty values are omitted from API requests. However, any field
  1249. // with an empty value appearing in NullFields will be sent to the
  1250. // server as null. It is an error if a field in this list has a
  1251. // non-empty value. This may be used to include null fields in Patch
  1252. // requests.
  1253. NullFields []string `json:"-"`
  1254. }
  1255. func (s *GoogleCloudVideointelligenceV1p1beta1LabelAnnotation) MarshalJSON() ([]byte, error) {
  1256. type NoMethod GoogleCloudVideointelligenceV1p1beta1LabelAnnotation
  1257. raw := NoMethod(*s)
  1258. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1259. }
  1260. // GoogleCloudVideointelligenceV1p1beta1LabelFrame: Video frame level
  1261. // annotation results for label detection.
  1262. type GoogleCloudVideointelligenceV1p1beta1LabelFrame struct {
  1263. // Confidence: Confidence that the label is accurate. Range: [0, 1].
  1264. Confidence float64 `json:"confidence,omitempty"`
  1265. // TimeOffset: Time-offset, relative to the beginning of the video,
  1266. // corresponding to the
  1267. // video frame for this location.
  1268. TimeOffset string `json:"timeOffset,omitempty"`
  1269. // ForceSendFields is a list of field names (e.g. "Confidence") to
  1270. // unconditionally include in API requests. By default, fields with
  1271. // empty values are omitted from API requests. However, any non-pointer,
  1272. // non-interface field appearing in ForceSendFields will be sent to the
  1273. // server regardless of whether the field is empty or not. This may be
  1274. // used to include empty fields in Patch requests.
  1275. ForceSendFields []string `json:"-"`
  1276. // NullFields is a list of field names (e.g. "Confidence") to include in
  1277. // API requests with the JSON null value. By default, fields with empty
  1278. // values are omitted from API requests. However, any field with an
  1279. // empty value appearing in NullFields will be sent to the server as
  1280. // null. It is an error if a field in this list has a non-empty value.
  1281. // This may be used to include null fields in Patch requests.
  1282. NullFields []string `json:"-"`
  1283. }
  1284. func (s *GoogleCloudVideointelligenceV1p1beta1LabelFrame) MarshalJSON() ([]byte, error) {
  1285. type NoMethod GoogleCloudVideointelligenceV1p1beta1LabelFrame
  1286. raw := NoMethod(*s)
  1287. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1288. }
  1289. func (s *GoogleCloudVideointelligenceV1p1beta1LabelFrame) UnmarshalJSON(data []byte) error {
  1290. type NoMethod GoogleCloudVideointelligenceV1p1beta1LabelFrame
  1291. var s1 struct {
  1292. Confidence gensupport.JSONFloat64 `json:"confidence"`
  1293. *NoMethod
  1294. }
  1295. s1.NoMethod = (*NoMethod)(s)
  1296. if err := json.Unmarshal(data, &s1); err != nil {
  1297. return err
  1298. }
  1299. s.Confidence = float64(s1.Confidence)
  1300. return nil
  1301. }
  1302. // GoogleCloudVideointelligenceV1p1beta1LabelSegment: Video segment
  1303. // level annotation results for label detection.
  1304. type GoogleCloudVideointelligenceV1p1beta1LabelSegment struct {
  1305. // Confidence: Confidence that the label is accurate. Range: [0, 1].
  1306. Confidence float64 `json:"confidence,omitempty"`
  1307. // Segment: Video segment where a label was detected.
  1308. Segment *GoogleCloudVideointelligenceV1p1beta1VideoSegment `json:"segment,omitempty"`
  1309. // ForceSendFields is a list of field names (e.g. "Confidence") to
  1310. // unconditionally include in API requests. By default, fields with
  1311. // empty values are omitted from API requests. However, any non-pointer,
  1312. // non-interface field appearing in ForceSendFields will be sent to the
  1313. // server regardless of whether the field is empty or not. This may be
  1314. // used to include empty fields in Patch requests.
  1315. ForceSendFields []string `json:"-"`
  1316. // NullFields is a list of field names (e.g. "Confidence") to include in
  1317. // API requests with the JSON null value. By default, fields with empty
  1318. // values are omitted from API requests. However, any field with an
  1319. // empty value appearing in NullFields will be sent to the server as
  1320. // null. It is an error if a field in this list has a non-empty value.
  1321. // This may be used to include null fields in Patch requests.
  1322. NullFields []string `json:"-"`
  1323. }
  1324. func (s *GoogleCloudVideointelligenceV1p1beta1LabelSegment) MarshalJSON() ([]byte, error) {
  1325. type NoMethod GoogleCloudVideointelligenceV1p1beta1LabelSegment
  1326. raw := NoMethod(*s)
  1327. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1328. }
  1329. func (s *GoogleCloudVideointelligenceV1p1beta1LabelSegment) UnmarshalJSON(data []byte) error {
  1330. type NoMethod GoogleCloudVideointelligenceV1p1beta1LabelSegment
  1331. var s1 struct {
  1332. Confidence gensupport.JSONFloat64 `json:"confidence"`
  1333. *NoMethod
  1334. }
  1335. s1.NoMethod = (*NoMethod)(s)
  1336. if err := json.Unmarshal(data, &s1); err != nil {
  1337. return err
  1338. }
  1339. s.Confidence = float64(s1.Confidence)
  1340. return nil
  1341. }
  1342. // GoogleCloudVideointelligenceV1p1beta1SpeechRecognitionAlternative:
  1343. // Alternative hypotheses (a.k.a. n-best list).
  1344. type GoogleCloudVideointelligenceV1p1beta1SpeechRecognitionAlternative struct {
  1345. // Confidence: Output only. The confidence estimate between 0.0 and 1.0.
  1346. // A higher number
  1347. // indicates an estimated greater likelihood that the recognized words
  1348. // are
  1349. // correct. This field is typically provided only for the top
  1350. // hypothesis, and
  1351. // only for `is_final=true` results. Clients should not rely on
  1352. // the
  1353. // `confidence` field as it is not guaranteed to be accurate or
  1354. // consistent.
  1355. // The default of 0.0 is a sentinel value indicating `confidence` was
  1356. // not set.
  1357. Confidence float64 `json:"confidence,omitempty"`
  1358. // Transcript: Output only. Transcript text representing the words that
  1359. // the user spoke.
  1360. Transcript string `json:"transcript,omitempty"`
  1361. // Words: Output only. A list of word-specific information for each
  1362. // recognized word.
  1363. Words []*GoogleCloudVideointelligenceV1p1beta1WordInfo `json:"words,omitempty"`
  1364. // ForceSendFields is a list of field names (e.g. "Confidence") to
  1365. // unconditionally include in API requests. By default, fields with
  1366. // empty values are omitted from API requests. However, any non-pointer,
  1367. // non-interface field appearing in ForceSendFields will be sent to the
  1368. // server regardless of whether the field is empty or not. This may be
  1369. // used to include empty fields in Patch requests.
  1370. ForceSendFields []string `json:"-"`
  1371. // NullFields is a list of field names (e.g. "Confidence") to include in
  1372. // API requests with the JSON null value. By default, fields with empty
  1373. // values are omitted from API requests. However, any field with an
  1374. // empty value appearing in NullFields will be sent to the server as
  1375. // null. It is an error if a field in this list has a non-empty value.
  1376. // This may be used to include null fields in Patch requests.
  1377. NullFields []string `json:"-"`
  1378. }
  1379. func (s *GoogleCloudVideointelligenceV1p1beta1SpeechRecognitionAlternative) MarshalJSON() ([]byte, error) {
  1380. type NoMethod GoogleCloudVideointelligenceV1p1beta1SpeechRecognitionAlternative
  1381. raw := NoMethod(*s)
  1382. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1383. }
  1384. func (s *GoogleCloudVideointelligenceV1p1beta1SpeechRecognitionAlternative) UnmarshalJSON(data []byte) error {
  1385. type NoMethod GoogleCloudVideointelligenceV1p1beta1SpeechRecognitionAlternative
  1386. var s1 struct {
  1387. Confidence gensupport.JSONFloat64 `json:"confidence"`
  1388. *NoMethod
  1389. }
  1390. s1.NoMethod = (*NoMethod)(s)
  1391. if err := json.Unmarshal(data, &s1); err != nil {
  1392. return err
  1393. }
  1394. s.Confidence = float64(s1.Confidence)
  1395. return nil
  1396. }
  1397. // GoogleCloudVideointelligenceV1p1beta1SpeechTranscription: A speech
  1398. // recognition result corresponding to a portion of the audio.
  1399. type GoogleCloudVideointelligenceV1p1beta1SpeechTranscription struct {
  1400. // Alternatives: Output only. May contain one or more recognition
  1401. // hypotheses (up to the
  1402. // maximum specified in `max_alternatives`).
  1403. // These alternatives are ordered in terms of accuracy, with the top
  1404. // (first)
  1405. // alternative being the most probable, as ranked by the recognizer.
  1406. Alternatives []*GoogleCloudVideointelligenceV1p1beta1SpeechRecognitionAlternative `json:"alternatives,omitempty"`
  1407. // ForceSendFields is a list of field names (e.g. "Alternatives") to
  1408. // unconditionally include in API requests. By default, fields with
  1409. // empty values are omitted from API requests. However, any non-pointer,
  1410. // non-interface field appearing in ForceSendFields will be sent to the
  1411. // server regardless of whether the field is empty or not. This may be
  1412. // used to include empty fields in Patch requests.
  1413. ForceSendFields []string `json:"-"`
  1414. // NullFields is a list of field names (e.g. "Alternatives") to include
  1415. // in API requests with the JSON null value. By default, fields with
  1416. // empty values are omitted from API requests. However, any field with
  1417. // an empty value appearing in NullFields will be sent to the server as
  1418. // null. It is an error if a field in this list has a non-empty value.
  1419. // This may be used to include null fields in Patch requests.
  1420. NullFields []string `json:"-"`
  1421. }
  1422. func (s *GoogleCloudVideointelligenceV1p1beta1SpeechTranscription) MarshalJSON() ([]byte, error) {
  1423. type NoMethod GoogleCloudVideointelligenceV1p1beta1SpeechTranscription
  1424. raw := NoMethod(*s)
  1425. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1426. }
  1427. // GoogleCloudVideointelligenceV1p1beta1VideoAnnotationProgress:
  1428. // Annotation progress for a single video.
  1429. type GoogleCloudVideointelligenceV1p1beta1VideoAnnotationProgress struct {
  1430. // InputUri: Output only. Video file location in
  1431. // [Google Cloud Storage](https://cloud.google.com/storage/).
  1432. InputUri string `json:"inputUri,omitempty"`
  1433. // ProgressPercent: Output only. Approximate percentage processed thus
  1434. // far. Guaranteed to be
  1435. // 100 when fully processed.
  1436. ProgressPercent int64 `json:"progressPercent,omitempty"`
  1437. // StartTime: Output only. Time when the request was received.
  1438. StartTime string `json:"startTime,omitempty"`
  1439. // UpdateTime: Output only. Time of the most recent update.
  1440. UpdateTime string `json:"updateTime,omitempty"`
  1441. // ForceSendFields is a list of field names (e.g. "InputUri") to
  1442. // unconditionally include in API requests. By default, fields with
  1443. // empty values are omitted from API requests. However, any non-pointer,
  1444. // non-interface field appearing in ForceSendFields will be sent to the
  1445. // server regardless of whether the field is empty or not. This may be
  1446. // used to include empty fields in Patch requests.
  1447. ForceSendFields []string `json:"-"`
  1448. // NullFields is a list of field names (e.g. "InputUri") to include in
  1449. // API requests with the JSON null value. By default, fields with empty
  1450. // values are omitted from API requests. However, any field with an
  1451. // empty value appearing in NullFields will be sent to the server as
  1452. // null. It is an error if a field in this list has a non-empty value.
  1453. // This may be used to include null fields in Patch requests.
  1454. NullFields []string `json:"-"`
  1455. }
  1456. func (s *GoogleCloudVideointelligenceV1p1beta1VideoAnnotationProgress) MarshalJSON() ([]byte, error) {
  1457. type NoMethod GoogleCloudVideointelligenceV1p1beta1VideoAnnotationProgress
  1458. raw := NoMethod(*s)
  1459. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1460. }
  1461. // GoogleCloudVideointelligenceV1p1beta1VideoAnnotationResults:
  1462. // Annotation results for a single video.
  1463. type GoogleCloudVideointelligenceV1p1beta1VideoAnnotationResults struct {
  1464. // Error: Output only. Non-streaming error only. If set, indicates an
  1465. // error. Note
  1466. // that for a single `AnnotateVideoRequest` some videos may succeed and
  1467. // some
  1468. // may fail.
  1469. Error *GoogleRpcStatus `json:"error,omitempty"`
  1470. // ExplicitAnnotation: Explicit content annotation.
  1471. ExplicitAnnotation *GoogleCloudVideointelligenceV1p1beta1ExplicitContentAnnotation `json:"explicitAnnotation,omitempty"`
  1472. // FrameLabelAnnotations: Label annotations on frame level.
  1473. // There is exactly one element for each unique label.
  1474. FrameLabelAnnotations []*GoogleCloudVideointelligenceV1p1beta1LabelAnnotation `json:"frameLabelAnnotations,omitempty"`
  1475. // InputUri: Output only. Video file location in
  1476. // [Google Cloud Storage](https://cloud.google.com/storage/).
  1477. InputUri string `json:"inputUri,omitempty"`
  1478. // SegmentLabelAnnotations: Label annotations on video level or user
  1479. // specified segment level.
  1480. // There is exactly one element for each unique label.
  1481. SegmentLabelAnnotations []*GoogleCloudVideointelligenceV1p1beta1LabelAnnotation `json:"segmentLabelAnnotations,omitempty"`
  1482. // ShotAnnotations: Shot annotations. Each shot is represented as a
  1483. // video segment.
  1484. ShotAnnotations []*GoogleCloudVideointelligenceV1p1beta1VideoSegment `json:"shotAnnotations,omitempty"`
  1485. // ShotLabelAnnotations: Label annotations on shot level.
  1486. // There is exactly one element for each unique label.
  1487. ShotLabelAnnotations []*GoogleCloudVideointelligenceV1p1beta1LabelAnnotation `json:"shotLabelAnnotations,omitempty"`
  1488. // SpeechTranscriptions: Speech transcription.
  1489. SpeechTranscriptions []*GoogleCloudVideointelligenceV1p1beta1SpeechTranscription `json:"speechTranscriptions,omitempty"`
  1490. // ForceSendFields is a list of field names (e.g. "Error") to
  1491. // unconditionally include in API requests. By default, fields with
  1492. // empty values are omitted from API requests. However, any non-pointer,
  1493. // non-interface field appearing in ForceSendFields will be sent to the
  1494. // server regardless of whether the field is empty or not. This may be
  1495. // used to include empty fields in Patch requests.
  1496. ForceSendFields []string `json:"-"`
  1497. // NullFields is a list of field names (e.g. "Error") to include in API
  1498. // requests with the JSON null value. By default, fields with empty
  1499. // values are omitted from API requests. However, any field with an
  1500. // empty value appearing in NullFields will be sent to the server as
  1501. // null. It is an error if a field in this list has a non-empty value.
  1502. // This may be used to include null fields in Patch requests.
  1503. NullFields []string `json:"-"`
  1504. }
  1505. func (s *GoogleCloudVideointelligenceV1p1beta1VideoAnnotationResults) MarshalJSON() ([]byte, error) {
  1506. type NoMethod GoogleCloudVideointelligenceV1p1beta1VideoAnnotationResults
  1507. raw := NoMethod(*s)
  1508. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1509. }
  1510. // GoogleCloudVideointelligenceV1p1beta1VideoSegment: Video segment.
  1511. type GoogleCloudVideointelligenceV1p1beta1VideoSegment struct {
  1512. // EndTimeOffset: Time-offset, relative to the beginning of the
  1513. // video,
  1514. // corresponding to the end of the segment (inclusive).
  1515. EndTimeOffset string `json:"endTimeOffset,omitempty"`
  1516. // StartTimeOffset: Time-offset, relative to the beginning of the
  1517. // video,
  1518. // corresponding to the start of the segment (inclusive).
  1519. StartTimeOffset string `json:"startTimeOffset,omitempty"`
  1520. // ForceSendFields is a list of field names (e.g. "EndTimeOffset") to
  1521. // unconditionally include in API requests. By default, fields with
  1522. // empty values are omitted from API requests. However, any non-pointer,
  1523. // non-interface field appearing in ForceSendFields will be sent to the
  1524. // server regardless of whether the field is empty or not. This may be
  1525. // used to include empty fields in Patch requests.
  1526. ForceSendFields []string `json:"-"`
  1527. // NullFields is a list of field names (e.g. "EndTimeOffset") to include
  1528. // in API requests with the JSON null value. By default, fields with
  1529. // empty values are omitted from API requests. However, any field with
  1530. // an empty value appearing in NullFields will be sent to the server as
  1531. // null. It is an error if a field in this list has a non-empty value.
  1532. // This may be used to include null fields in Patch requests.
  1533. NullFields []string `json:"-"`
  1534. }
  1535. func (s *GoogleCloudVideointelligenceV1p1beta1VideoSegment) MarshalJSON() ([]byte, error) {
  1536. type NoMethod GoogleCloudVideointelligenceV1p1beta1VideoSegment
  1537. raw := NoMethod(*s)
  1538. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1539. }
  1540. // GoogleCloudVideointelligenceV1p1beta1WordInfo: Word-specific
  1541. // information for recognized words. Word information is only
  1542. // included in the response when certain request parameters are set,
  1543. // such
  1544. // as `enable_word_time_offsets`.
  1545. type GoogleCloudVideointelligenceV1p1beta1WordInfo struct {
  1546. // EndTime: Output only. Time offset relative to the beginning of the
  1547. // audio, and
  1548. // corresponding to the end of the spoken word. This field is only set
  1549. // if
  1550. // `enable_word_time_offsets=true` and only in the top hypothesis. This
  1551. // is an
  1552. // experimental feature and the accuracy of the time offset can vary.
  1553. EndTime string `json:"endTime,omitempty"`
  1554. // StartTime: Output only. Time offset relative to the beginning of the
  1555. // audio, and
  1556. // corresponding to the start of the spoken word. This field is only set
  1557. // if
  1558. // `enable_word_time_offsets=true` and only in the top hypothesis. This
  1559. // is an
  1560. // experimental feature and the accuracy of the time offset can vary.
  1561. StartTime string `json:"startTime,omitempty"`
  1562. // Word: Output only. The word corresponding to this set of information.
  1563. Word string `json:"word,omitempty"`
  1564. // ForceSendFields is a list of field names (e.g. "EndTime") to
  1565. // unconditionally include in API requests. By default, fields with
  1566. // empty values are omitted from API requests. However, any non-pointer,
  1567. // non-interface field appearing in ForceSendFields will be sent to the
  1568. // server regardless of whether the field is empty or not. This may be
  1569. // used to include empty fields in Patch requests.
  1570. ForceSendFields []string `json:"-"`
  1571. // NullFields is a list of field names (e.g. "EndTime") to include in
  1572. // API requests with the JSON null value. By default, fields with empty
  1573. // values are omitted from API requests. However, any field with an
  1574. // empty value appearing in NullFields will be sent to the server as
  1575. // null. It is an error if a field in this list has a non-empty value.
  1576. // This may be used to include null fields in Patch requests.
  1577. NullFields []string `json:"-"`
  1578. }
  1579. func (s *GoogleCloudVideointelligenceV1p1beta1WordInfo) MarshalJSON() ([]byte, error) {
  1580. type NoMethod GoogleCloudVideointelligenceV1p1beta1WordInfo
  1581. raw := NoMethod(*s)
  1582. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1583. }
  1584. // GoogleLongrunningOperation: This resource represents a long-running
  1585. // operation that is the result of a
  1586. // network API call.
  1587. type GoogleLongrunningOperation struct {
  1588. // Done: If the value is `false`, it means the operation is still in
  1589. // progress.
  1590. // If `true`, the operation is completed, and either `error` or
  1591. // `response` is
  1592. // available.
  1593. Done bool `json:"done,omitempty"`
  1594. // Error: The error result of the operation in case of failure or
  1595. // cancellation.
  1596. Error *GoogleRpcStatus `json:"error,omitempty"`
  1597. // Metadata: Service-specific metadata associated with the operation.
  1598. // It typically
  1599. // contains progress information and common metadata such as create
  1600. // time.
  1601. // Some services might not provide such metadata. Any method that
  1602. // returns a
  1603. // long-running operation should document the metadata type, if any.
  1604. Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  1605. // Name: The server-assigned name, which is only unique within the same
  1606. // service that
  1607. // originally returns it. If you use the default HTTP mapping,
  1608. // the
  1609. // `name` should have the format of `operations/some/unique/name`.
  1610. Name string `json:"name,omitempty"`
  1611. // Response: The normal response of the operation in case of success.
  1612. // If the original
  1613. // method returns no data on success, such as `Delete`, the response
  1614. // is
  1615. // `google.protobuf.Empty`. If the original method is
  1616. // standard
  1617. // `Get`/`Create`/`Update`, the response should be the resource. For
  1618. // other
  1619. // methods, the response should have the type `XxxResponse`, where
  1620. // `Xxx`
  1621. // is the original method name. For example, if the original method
  1622. // name
  1623. // is `TakeSnapshot()`, the inferred response type
  1624. // is
  1625. // `TakeSnapshotResponse`.
  1626. Response googleapi.RawMessage `json:"response,omitempty"`
  1627. // ServerResponse contains the HTTP response code and headers from the
  1628. // server.
  1629. googleapi.ServerResponse `json:"-"`
  1630. // ForceSendFields is a list of field names (e.g. "Done") to
  1631. // unconditionally include in API requests. By default, fields with
  1632. // empty values are omitted from API requests. However, any non-pointer,
  1633. // non-interface field appearing in ForceSendFields will be sent to the
  1634. // server regardless of whether the field is empty or not. This may be
  1635. // used to include empty fields in Patch requests.
  1636. ForceSendFields []string `json:"-"`
  1637. // NullFields is a list of field names (e.g. "Done") to include in API
  1638. // requests with the JSON null value. By default, fields with empty
  1639. // values are omitted from API requests. However, any field with an
  1640. // empty value appearing in NullFields will be sent to the server as
  1641. // null. It is an error if a field in this list has a non-empty value.
  1642. // This may be used to include null fields in Patch requests.
  1643. NullFields []string `json:"-"`
  1644. }
  1645. func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) {
  1646. type NoMethod GoogleLongrunningOperation
  1647. raw := NoMethod(*s)
  1648. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1649. }
  1650. // GoogleRpcStatus: The `Status` type defines a logical error model that
  1651. // is suitable for different
  1652. // programming environments, including REST APIs and RPC APIs. It is
  1653. // used by
  1654. // [gRPC](https://github.com/grpc). The error model is designed to
  1655. // be:
  1656. //
  1657. // - Simple to use and understand for most users
  1658. // - Flexible enough to meet unexpected needs
  1659. //
  1660. // # Overview
  1661. //
  1662. // The `Status` message contains three pieces of data: error code, error
  1663. // message,
  1664. // and error details. The error code should be an enum value
  1665. // of
  1666. // google.rpc.Code, but it may accept additional error codes if needed.
  1667. // The
  1668. // error message should be a developer-facing English message that
  1669. // helps
  1670. // developers *understand* and *resolve* the error. If a localized
  1671. // user-facing
  1672. // error message is needed, put the localized message in the error
  1673. // details or
  1674. // localize it in the client. The optional error details may contain
  1675. // arbitrary
  1676. // information about the error. There is a predefined set of error
  1677. // detail types
  1678. // in the package `google.rpc` that can be used for common error
  1679. // conditions.
  1680. //
  1681. // # Language mapping
  1682. //
  1683. // The `Status` message is the logical representation of the error
  1684. // model, but it
  1685. // is not necessarily the actual wire format. When the `Status` message
  1686. // is
  1687. // exposed in different client libraries and different wire protocols,
  1688. // it can be
  1689. // mapped differently. For example, it will likely be mapped to some
  1690. // exceptions
  1691. // in Java, but more likely mapped to some error codes in C.
  1692. //
  1693. // # Other uses
  1694. //
  1695. // The error model and the `Status` message can be used in a variety
  1696. // of
  1697. // environments, either with or without APIs, to provide a
  1698. // consistent developer experience across different
  1699. // environments.
  1700. //
  1701. // Example uses of this error model include:
  1702. //
  1703. // - Partial errors. If a service needs to return partial errors to the
  1704. // client,
  1705. // it may embed the `Status` in the normal response to indicate the
  1706. // partial
  1707. // errors.
  1708. //
  1709. // - Workflow errors. A typical workflow has multiple steps. Each step
  1710. // may
  1711. // have a `Status` message for error reporting.
  1712. //
  1713. // - Batch operations. If a client uses batch request and batch
  1714. // response, the
  1715. // `Status` message should be used directly inside batch response,
  1716. // one for
  1717. // each error sub-response.
  1718. //
  1719. // - Asynchronous operations. If an API call embeds asynchronous
  1720. // operation
  1721. // results in its response, the status of those operations should
  1722. // be
  1723. // represented directly using the `Status` message.
  1724. //
  1725. // - Logging. If some API errors are stored in logs, the message
  1726. // `Status` could
  1727. // be used directly after any stripping needed for security/privacy
  1728. // reasons.
  1729. type GoogleRpcStatus struct {
  1730. // Code: The status code, which should be an enum value of
  1731. // google.rpc.Code.
  1732. Code int64 `json:"code,omitempty"`
  1733. // Details: A list of messages that carry the error details. There is a
  1734. // common set of
  1735. // message types for APIs to use.
  1736. Details []googleapi.RawMessage `json:"details,omitempty"`
  1737. // Message: A developer-facing error message, which should be in
  1738. // English. Any
  1739. // user-facing error message should be localized and sent in
  1740. // the
  1741. // google.rpc.Status.details field, or localized by the client.
  1742. Message string `json:"message,omitempty"`
  1743. // ForceSendFields is a list of field names (e.g. "Code") to
  1744. // unconditionally include in API requests. By default, fields with
  1745. // empty values are omitted from API requests. However, any non-pointer,
  1746. // non-interface field appearing in ForceSendFields will be sent to the
  1747. // server regardless of whether the field is empty or not. This may be
  1748. // used to include empty fields in Patch requests.
  1749. ForceSendFields []string `json:"-"`
  1750. // NullFields is a list of field names (e.g. "Code") to include in API
  1751. // requests with the JSON null value. By default, fields with empty
  1752. // values are omitted from API requests. However, any field with an
  1753. // empty value appearing in NullFields will be sent to the server as
  1754. // null. It is an error if a field in this list has a non-empty value.
  1755. // This may be used to include null fields in Patch requests.
  1756. NullFields []string `json:"-"`
  1757. }
  1758. func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) {
  1759. type NoMethod GoogleRpcStatus
  1760. raw := NoMethod(*s)
  1761. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1762. }
  1763. // method id "videointelligence.videos.annotate":
  1764. type VideosAnnotateCall struct {
  1765. s *Service
  1766. googlecloudvideointelligencev1beta2Annotatevideorequest *GoogleCloudVideointelligenceV1beta2AnnotateVideoRequest
  1767. urlParams_ gensupport.URLParams
  1768. ctx_ context.Context
  1769. header_ http.Header
  1770. }
  1771. // Annotate: Performs asynchronous video annotation. Progress and
  1772. // results can be
  1773. // retrieved through the `google.longrunning.Operations`
  1774. // interface.
  1775. // `Operation.metadata` contains `AnnotateVideoProgress`
  1776. // (progress).
  1777. // `Operation.response` contains `AnnotateVideoResponse` (results).
  1778. func (r *VideosService) Annotate(googlecloudvideointelligencev1beta2Annotatevideorequest *GoogleCloudVideointelligenceV1beta2AnnotateVideoRequest) *VideosAnnotateCall {
  1779. c := &VideosAnnotateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1780. c.googlecloudvideointelligencev1beta2Annotatevideorequest = googlecloudvideointelligencev1beta2Annotatevideorequest
  1781. return c
  1782. }
  1783. // Fields allows partial responses to be retrieved. See
  1784. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1785. // for more information.
  1786. func (c *VideosAnnotateCall) Fields(s ...googleapi.Field) *VideosAnnotateCall {
  1787. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1788. return c
  1789. }
  1790. // Context sets the context to be used in this call's Do method. Any
  1791. // pending HTTP request will be aborted if the provided context is
  1792. // canceled.
  1793. func (c *VideosAnnotateCall) Context(ctx context.Context) *VideosAnnotateCall {
  1794. c.ctx_ = ctx
  1795. return c
  1796. }
  1797. // Header returns an http.Header that can be modified by the caller to
  1798. // add HTTP headers to the request.
  1799. func (c *VideosAnnotateCall) Header() http.Header {
  1800. if c.header_ == nil {
  1801. c.header_ = make(http.Header)
  1802. }
  1803. return c.header_
  1804. }
  1805. func (c *VideosAnnotateCall) doRequest(alt string) (*http.Response, error) {
  1806. reqHeaders := make(http.Header)
  1807. for k, v := range c.header_ {
  1808. reqHeaders[k] = v
  1809. }
  1810. reqHeaders.Set("User-Agent", c.s.userAgent())
  1811. var body io.Reader = nil
  1812. body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudvideointelligencev1beta2Annotatevideorequest)
  1813. if err != nil {
  1814. return nil, err
  1815. }
  1816. reqHeaders.Set("Content-Type", "application/json")
  1817. c.urlParams_.Set("alt", alt)
  1818. urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/videos:annotate")
  1819. urls += "?" + c.urlParams_.Encode()
  1820. req, _ := http.NewRequest("POST", urls, body)
  1821. req.Header = reqHeaders
  1822. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1823. }
  1824. // Do executes the "videointelligence.videos.annotate" call.
  1825. // Exactly one of *GoogleLongrunningOperation or error will be non-nil.
  1826. // Any non-2xx status code is an error. Response headers are in either
  1827. // *GoogleLongrunningOperation.ServerResponse.Header or (if a response
  1828. // was returned at all) in error.(*googleapi.Error).Header. Use
  1829. // googleapi.IsNotModified to check whether the returned error was
  1830. // because http.StatusNotModified was returned.
  1831. func (c *VideosAnnotateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  1832. gensupport.SetOptions(c.urlParams_, opts...)
  1833. res, err := c.doRequest("json")
  1834. if res != nil && res.StatusCode == http.StatusNotModified {
  1835. if res.Body != nil {
  1836. res.Body.Close()
  1837. }
  1838. return nil, &googleapi.Error{
  1839. Code: res.StatusCode,
  1840. Header: res.Header,
  1841. }
  1842. }
  1843. if err != nil {
  1844. return nil, err
  1845. }
  1846. defer googleapi.CloseBody(res)
  1847. if err := googleapi.CheckResponse(res); err != nil {
  1848. return nil, err
  1849. }
  1850. ret := &GoogleLongrunningOperation{
  1851. ServerResponse: googleapi.ServerResponse{
  1852. Header: res.Header,
  1853. HTTPStatusCode: res.StatusCode,
  1854. },
  1855. }
  1856. target := &ret
  1857. if err := gensupport.DecodeResponse(target, res); err != nil {
  1858. return nil, err
  1859. }
  1860. return ret, nil
  1861. // {
  1862. // "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).",
  1863. // "flatPath": "v1beta2/videos:annotate",
  1864. // "httpMethod": "POST",
  1865. // "id": "videointelligence.videos.annotate",
  1866. // "parameterOrder": [],
  1867. // "parameters": {},
  1868. // "path": "v1beta2/videos:annotate",
  1869. // "request": {
  1870. // "$ref": "GoogleCloudVideointelligenceV1beta2_AnnotateVideoRequest"
  1871. // },
  1872. // "response": {
  1873. // "$ref": "GoogleLongrunning_Operation"
  1874. // },
  1875. // "scopes": [
  1876. // "https://www.googleapis.com/auth/cloud-platform"
  1877. // ]
  1878. // }
  1879. }