12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- using Newtonsoft.Json;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace KdanCommon.GoogleCloud.Data.Vision
- {
- public partial class ImgesRequest
- {
- [JsonProperty("requests")]
- public ImageRequest[] Requests { get; set; }
- public ImgesRequest(List<string> inputContents)
- {
- Requests = new ImageRequest[inputContents.Count];
- for (int i = 0; i < inputContents.Count; i++)
- {
- Requests[i] = new ImageRequest()
- {
- Image = new Image()
- {
- Content = inputContents[i]
- },
- Features = new Feature[]
- {
- new Feature()
- {
- Type = "TEXT_DETECTION"
- }
- }
- };
- }
- }
- }
- public partial class ImageRequest
- {
- [JsonProperty("image")]
- public Image Image { get; set; }
- [JsonProperty("features")]
- public Feature[] Features { get; set; }
- }
- public partial class Feature
- {
- [JsonProperty("type")]
- public string Type { get; set; }
- }
- public partial class Image
- {
- [JsonProperty("content")]
- public string Content { get; set; }
- }
- }
|