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.
 
 
 

269 lines
11 KiB

  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: google/cloud/automl/v1beta1/prediction_service.proto
  3. package automl // import "google.golang.org/genproto/googleapis/cloud/automl/v1beta1"
  4. import proto "github.com/golang/protobuf/proto"
  5. import fmt "fmt"
  6. import math "math"
  7. import _ "google.golang.org/genproto/googleapis/api/annotations"
  8. import (
  9. context "golang.org/x/net/context"
  10. grpc "google.golang.org/grpc"
  11. )
  12. // Reference imports to suppress errors if they are not otherwise used.
  13. var _ = proto.Marshal
  14. var _ = fmt.Errorf
  15. var _ = math.Inf
  16. // This is a compile-time assertion to ensure that this generated file
  17. // is compatible with the proto package it is being compiled against.
  18. // A compilation error at this line likely means your copy of the
  19. // proto package needs to be updated.
  20. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  21. // Request message for
  22. // [PredictionService.Predict][google.cloud.automl.v1beta1.PredictionService.Predict].
  23. type PredictRequest struct {
  24. // Name of the model requested to serve the prediction.
  25. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
  26. // Required.
  27. // Payload to perform a prediction on. The payload must match the
  28. // problem type that the model was trained to solve.
  29. Payload *ExamplePayload `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
  30. // Additional domain-specific parameters, any string must be up to 25000
  31. // characters long.
  32. //
  33. // * For Image Classification:
  34. //
  35. // `score_threshold` - (float) A value from 0.0 to 1.0. When the model
  36. // makes predictions for an
  37. // image, it will only produce results that have at least this confidence
  38. // score threshold. The default is 0.5.
  39. Params map[string]string `protobuf:"bytes,3,rep,name=params,proto3" json:"params,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
  40. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  41. XXX_unrecognized []byte `json:"-"`
  42. XXX_sizecache int32 `json:"-"`
  43. }
  44. func (m *PredictRequest) Reset() { *m = PredictRequest{} }
  45. func (m *PredictRequest) String() string { return proto.CompactTextString(m) }
  46. func (*PredictRequest) ProtoMessage() {}
  47. func (*PredictRequest) Descriptor() ([]byte, []int) {
  48. return fileDescriptor_prediction_service_cf0f5f7b6ce9d851, []int{0}
  49. }
  50. func (m *PredictRequest) XXX_Unmarshal(b []byte) error {
  51. return xxx_messageInfo_PredictRequest.Unmarshal(m, b)
  52. }
  53. func (m *PredictRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  54. return xxx_messageInfo_PredictRequest.Marshal(b, m, deterministic)
  55. }
  56. func (dst *PredictRequest) XXX_Merge(src proto.Message) {
  57. xxx_messageInfo_PredictRequest.Merge(dst, src)
  58. }
  59. func (m *PredictRequest) XXX_Size() int {
  60. return xxx_messageInfo_PredictRequest.Size(m)
  61. }
  62. func (m *PredictRequest) XXX_DiscardUnknown() {
  63. xxx_messageInfo_PredictRequest.DiscardUnknown(m)
  64. }
  65. var xxx_messageInfo_PredictRequest proto.InternalMessageInfo
  66. func (m *PredictRequest) GetName() string {
  67. if m != nil {
  68. return m.Name
  69. }
  70. return ""
  71. }
  72. func (m *PredictRequest) GetPayload() *ExamplePayload {
  73. if m != nil {
  74. return m.Payload
  75. }
  76. return nil
  77. }
  78. func (m *PredictRequest) GetParams() map[string]string {
  79. if m != nil {
  80. return m.Params
  81. }
  82. return nil
  83. }
  84. // Response message for
  85. // [PredictionService.Predict][google.cloud.automl.v1beta1.PredictionService.Predict].
  86. //
  87. // Currently, this is only
  88. // used to return an image recognition prediction result. More prediction
  89. // output metadata might be introduced in the future.
  90. type PredictResponse struct {
  91. // Prediction result.
  92. Payload []*AnnotationPayload `protobuf:"bytes,1,rep,name=payload,proto3" json:"payload,omitempty"`
  93. // Additional domain-specific prediction response metadata.
  94. Metadata map[string]string `protobuf:"bytes,2,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
  95. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  96. XXX_unrecognized []byte `json:"-"`
  97. XXX_sizecache int32 `json:"-"`
  98. }
  99. func (m *PredictResponse) Reset() { *m = PredictResponse{} }
  100. func (m *PredictResponse) String() string { return proto.CompactTextString(m) }
  101. func (*PredictResponse) ProtoMessage() {}
  102. func (*PredictResponse) Descriptor() ([]byte, []int) {
  103. return fileDescriptor_prediction_service_cf0f5f7b6ce9d851, []int{1}
  104. }
  105. func (m *PredictResponse) XXX_Unmarshal(b []byte) error {
  106. return xxx_messageInfo_PredictResponse.Unmarshal(m, b)
  107. }
  108. func (m *PredictResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  109. return xxx_messageInfo_PredictResponse.Marshal(b, m, deterministic)
  110. }
  111. func (dst *PredictResponse) XXX_Merge(src proto.Message) {
  112. xxx_messageInfo_PredictResponse.Merge(dst, src)
  113. }
  114. func (m *PredictResponse) XXX_Size() int {
  115. return xxx_messageInfo_PredictResponse.Size(m)
  116. }
  117. func (m *PredictResponse) XXX_DiscardUnknown() {
  118. xxx_messageInfo_PredictResponse.DiscardUnknown(m)
  119. }
  120. var xxx_messageInfo_PredictResponse proto.InternalMessageInfo
  121. func (m *PredictResponse) GetPayload() []*AnnotationPayload {
  122. if m != nil {
  123. return m.Payload
  124. }
  125. return nil
  126. }
  127. func (m *PredictResponse) GetMetadata() map[string]string {
  128. if m != nil {
  129. return m.Metadata
  130. }
  131. return nil
  132. }
  133. func init() {
  134. proto.RegisterType((*PredictRequest)(nil), "google.cloud.automl.v1beta1.PredictRequest")
  135. proto.RegisterMapType((map[string]string)(nil), "google.cloud.automl.v1beta1.PredictRequest.ParamsEntry")
  136. proto.RegisterType((*PredictResponse)(nil), "google.cloud.automl.v1beta1.PredictResponse")
  137. proto.RegisterMapType((map[string]string)(nil), "google.cloud.automl.v1beta1.PredictResponse.MetadataEntry")
  138. }
  139. // Reference imports to suppress errors if they are not otherwise used.
  140. var _ context.Context
  141. var _ grpc.ClientConn
  142. // This is a compile-time assertion to ensure that this generated file
  143. // is compatible with the grpc package it is being compiled against.
  144. const _ = grpc.SupportPackageIsVersion4
  145. // PredictionServiceClient is the client API for PredictionService service.
  146. //
  147. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  148. type PredictionServiceClient interface {
  149. // Perform a prediction.
  150. Predict(ctx context.Context, in *PredictRequest, opts ...grpc.CallOption) (*PredictResponse, error)
  151. }
  152. type predictionServiceClient struct {
  153. cc *grpc.ClientConn
  154. }
  155. func NewPredictionServiceClient(cc *grpc.ClientConn) PredictionServiceClient {
  156. return &predictionServiceClient{cc}
  157. }
  158. func (c *predictionServiceClient) Predict(ctx context.Context, in *PredictRequest, opts ...grpc.CallOption) (*PredictResponse, error) {
  159. out := new(PredictResponse)
  160. err := c.cc.Invoke(ctx, "/google.cloud.automl.v1beta1.PredictionService/Predict", in, out, opts...)
  161. if err != nil {
  162. return nil, err
  163. }
  164. return out, nil
  165. }
  166. // PredictionServiceServer is the server API for PredictionService service.
  167. type PredictionServiceServer interface {
  168. // Perform a prediction.
  169. Predict(context.Context, *PredictRequest) (*PredictResponse, error)
  170. }
  171. func RegisterPredictionServiceServer(s *grpc.Server, srv PredictionServiceServer) {
  172. s.RegisterService(&_PredictionService_serviceDesc, srv)
  173. }
  174. func _PredictionService_Predict_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  175. in := new(PredictRequest)
  176. if err := dec(in); err != nil {
  177. return nil, err
  178. }
  179. if interceptor == nil {
  180. return srv.(PredictionServiceServer).Predict(ctx, in)
  181. }
  182. info := &grpc.UnaryServerInfo{
  183. Server: srv,
  184. FullMethod: "/google.cloud.automl.v1beta1.PredictionService/Predict",
  185. }
  186. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  187. return srv.(PredictionServiceServer).Predict(ctx, req.(*PredictRequest))
  188. }
  189. return interceptor(ctx, in, info, handler)
  190. }
  191. var _PredictionService_serviceDesc = grpc.ServiceDesc{
  192. ServiceName: "google.cloud.automl.v1beta1.PredictionService",
  193. HandlerType: (*PredictionServiceServer)(nil),
  194. Methods: []grpc.MethodDesc{
  195. {
  196. MethodName: "Predict",
  197. Handler: _PredictionService_Predict_Handler,
  198. },
  199. },
  200. Streams: []grpc.StreamDesc{},
  201. Metadata: "google/cloud/automl/v1beta1/prediction_service.proto",
  202. }
  203. func init() {
  204. proto.RegisterFile("google/cloud/automl/v1beta1/prediction_service.proto", fileDescriptor_prediction_service_cf0f5f7b6ce9d851)
  205. }
  206. var fileDescriptor_prediction_service_cf0f5f7b6ce9d851 = []byte{
  207. // 486 bytes of a gzipped FileDescriptorProto
  208. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x93, 0xdf, 0x8a, 0xd3, 0x40,
  209. 0x14, 0xc6, 0x99, 0x54, 0x77, 0xdd, 0x29, 0xfe, 0x1b, 0x44, 0x4a, 0x56, 0xb0, 0xf4, 0xaa, 0x74,
  210. 0x97, 0x19, 0xb6, 0x0a, 0xab, 0x5d, 0xbd, 0x68, 0xa5, 0xe8, 0xcd, 0x62, 0x88, 0xb0, 0x17, 0x52,
  211. 0x28, 0xb3, 0xc9, 0x10, 0xa2, 0x93, 0x9c, 0x98, 0x99, 0x14, 0x8b, 0x78, 0xe3, 0x2b, 0x78, 0xeb,
  212. 0x03, 0xf8, 0x14, 0x3e, 0x80, 0xb7, 0xbe, 0x82, 0x0f, 0xe0, 0x9d, 0xb7, 0x92, 0x99, 0x31, 0xeb,
  213. 0xb2, 0x12, 0xb6, 0x77, 0x49, 0xe6, 0xfc, 0xbe, 0xf3, 0x7d, 0x99, 0x73, 0xf0, 0xc3, 0x04, 0x20,
  214. 0x91, 0x82, 0x45, 0x12, 0xaa, 0x98, 0xf1, 0x4a, 0x43, 0x26, 0xd9, 0xea, 0xe0, 0x54, 0x68, 0x7e,
  215. 0xc0, 0x8a, 0x52, 0xc4, 0x69, 0xa4, 0x53, 0xc8, 0x97, 0x4a, 0x94, 0xab, 0x34, 0x12, 0xb4, 0x28,
  216. 0x41, 0x03, 0xd9, 0xb5, 0x14, 0x35, 0x14, 0xb5, 0x14, 0x75, 0x94, 0x7f, 0xcf, 0x49, 0xf2, 0x22,
  217. 0x65, 0x3c, 0xcf, 0x41, 0xf3, 0x5a, 0x41, 0x59, 0xd4, 0x6f, 0x6d, 0x78, 0x56, 0xbe, 0x2c, 0xf8,
  218. 0x5a, 0x02, 0x8f, 0x1d, 0xb5, 0xdf, 0x46, 0xc5, 0x5c, 0xf3, 0x65, 0xaa, 0x45, 0xe6, 0x7a, 0x0c,
  219. 0x7e, 0x23, 0x7c, 0x23, 0xb0, 0xde, 0x43, 0xf1, 0xae, 0x12, 0x4a, 0x13, 0x82, 0xaf, 0xe4, 0x3c,
  220. 0x13, 0x3d, 0xd4, 0x47, 0xc3, 0x9d, 0xd0, 0x3c, 0x93, 0x39, 0xde, 0x76, 0x5d, 0x7a, 0x5e, 0x1f,
  221. 0x0d, 0xbb, 0xe3, 0x3d, 0xda, 0x92, 0x8b, 0xce, 0xdf, 0xf3, 0xac, 0x90, 0x22, 0xb0, 0x48, 0xf8,
  222. 0x97, 0x25, 0x2f, 0xf1, 0x56, 0xc1, 0x4b, 0x9e, 0xa9, 0x5e, 0xa7, 0xdf, 0x19, 0x76, 0xc7, 0x87,
  223. 0xad, 0x2a, 0xe7, 0x7d, 0xd1, 0xc0, 0x90, 0xf3, 0x5c, 0x97, 0xeb, 0xd0, 0xc9, 0xf8, 0x8f, 0x71,
  224. 0xf7, 0x9f, 0xcf, 0xe4, 0x16, 0xee, 0xbc, 0x15, 0x6b, 0xe7, 0xbc, 0x7e, 0x24, 0x77, 0xf0, 0xd5,
  225. 0x15, 0x97, 0x95, 0x30, 0xb6, 0x77, 0x42, 0xfb, 0x32, 0xf1, 0x1e, 0xa1, 0xc1, 0x2f, 0x84, 0x6f,
  226. 0x36, 0x1d, 0x54, 0x01, 0xb9, 0x12, 0xe4, 0xc5, 0x59, 0x4c, 0x64, 0x0c, 0xd2, 0x56, 0x83, 0xd3,
  227. 0xe6, 0x0e, 0x2e, 0x24, 0x3d, 0xc1, 0xd7, 0x32, 0xa1, 0x79, 0xfd, 0xbf, 0x7b, 0x9e, 0x91, 0x9a,
  228. 0x5c, 0x2e, 0xab, 0x75, 0x42, 0x8f, 0x1d, 0x6c, 0xe3, 0x36, 0x5a, 0xfe, 0x11, 0xbe, 0x7e, 0xee,
  229. 0x68, 0x93, 0xc8, 0xe3, 0x6f, 0x08, 0xdf, 0x0e, 0x9a, 0x41, 0x7d, 0x65, 0xe7, 0x94, 0x7c, 0x45,
  230. 0x78, 0xdb, 0x7d, 0x25, 0x7b, 0x1b, 0x5c, 0x88, 0xbf, 0xbf, 0x49, 0xa2, 0xc1, 0xec, 0xd3, 0x8f,
  231. 0x9f, 0x9f, 0xbd, 0x27, 0x83, 0xc3, 0x66, 0x18, 0x3f, 0xd4, 0xa3, 0xf5, 0xb4, 0x28, 0xe1, 0x8d,
  232. 0x88, 0xb4, 0x62, 0x23, 0x26, 0x21, 0xb2, 0x0b, 0xc0, 0x46, 0x2c, 0x83, 0x58, 0x48, 0xc5, 0x46,
  233. 0x1f, 0x27, 0x6e, 0xb5, 0x26, 0x68, 0x34, 0xfb, 0x82, 0xf0, 0xfd, 0x08, 0xb2, 0xb6, 0xbe, 0xb3,
  234. 0xbb, 0x17, 0x12, 0x06, 0xf5, 0xa4, 0x07, 0xe8, 0xf5, 0xd4, 0x61, 0x09, 0x48, 0x9e, 0x27, 0x14,
  235. 0xca, 0x84, 0x25, 0x22, 0x37, 0x7b, 0xc0, 0xec, 0x11, 0x2f, 0x52, 0xf5, 0xdf, 0xc5, 0x39, 0xb2,
  236. 0xaf, 0xdf, 0xbd, 0xdd, 0xe7, 0xa6, 0x70, 0xf1, 0xac, 0x2e, 0x5a, 0x4c, 0x2b, 0x0d, 0xc7, 0x72,
  237. 0x71, 0x62, 0x8b, 0x4e, 0xb7, 0x8c, 0xd6, 0x83, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x55, 0x88,
  238. 0x1b, 0x5d, 0x2a, 0x04, 0x00, 0x00,
  239. }