OSDN Git Service

new repo
[bytom/vapor.git] / vendor / google.golang.org / genproto / googleapis / cloud / ml / v1 / prediction_service.pb.go
1 // Code generated by protoc-gen-go. DO NOT EDIT.
2 // source: google/cloud/ml/v1/prediction_service.proto
3
4 package ml
5
6 import proto "github.com/golang/protobuf/proto"
7 import fmt "fmt"
8 import math "math"
9 import _ "google.golang.org/genproto/googleapis/api/annotations"
10 import google_api3 "google.golang.org/genproto/googleapis/api/httpbody"
11
12 import (
13         context "golang.org/x/net/context"
14         grpc "google.golang.org/grpc"
15 )
16
17 // Reference imports to suppress errors if they are not otherwise used.
18 var _ = proto.Marshal
19 var _ = fmt.Errorf
20 var _ = math.Inf
21
22 // Request for predictions to be issued against a trained model.
23 //
24 // The body of the request is a single JSON object with a single top-level
25 // field:
26 //
27 // <dl>
28 //   <dt>instances</dt>
29 //   <dd>A JSON array containing values representing the instances to use for
30 //       prediction.</dd>
31 // </dl>
32 //
33 // The structure of each element of the instances list is determined by your
34 // model's input definition. Instances can include named inputs or can contain
35 // only unlabeled values.
36 //
37 // Not all data includes named inputs. Some instances will be simple
38 // JSON values (boolean, number, or string). However, instances are often lists
39 // of simple values, or complex nested lists. Here are some examples of request
40 // bodies:
41 //
42 // CSV data with each row encoded as a string value:
43 // <pre>
44 // {"instances": ["1.0,true,\\"x\\"", "-2.0,false,\\"y\\""]}
45 // </pre>
46 // Plain text:
47 // <pre>
48 // {"instances": ["the quick brown fox", "la bruja le dio"]}
49 // </pre>
50 // Sentences encoded as lists of words (vectors of strings):
51 // <pre>
52 // {
53 //   "instances": [
54 //     ["the","quick","brown"],
55 //     ["la","bruja","le"],
56 //     ...
57 //   ]
58 // }
59 // </pre>
60 // Floating point scalar values:
61 // <pre>
62 // {"instances": [0.0, 1.1, 2.2]}
63 // </pre>
64 // Vectors of integers:
65 // <pre>
66 // {
67 //   "instances": [
68 //     [0, 1, 2],
69 //     [3, 4, 5],
70 //     ...
71 //   ]
72 // }
73 // </pre>
74 // Tensors (in this case, two-dimensional tensors):
75 // <pre>
76 // {
77 //   "instances": [
78 //     [
79 //       [0, 1, 2],
80 //       [3, 4, 5]
81 //     ],
82 //     ...
83 //   ]
84 // }
85 // </pre>
86 // Images can be represented different ways. In this encoding scheme the first
87 // two dimensions represent the rows and columns of the image, and the third
88 // contains lists (vectors) of the R, G, and B values for each pixel.
89 // <pre>
90 // {
91 //   "instances": [
92 //     [
93 //       [
94 //         [138, 30, 66],
95 //         [130, 20, 56],
96 //         ...
97 //       ],
98 //       [
99 //         [126, 38, 61],
100 //         [122, 24, 57],
101 //         ...
102 //       ],
103 //       ...
104 //     ],
105 //     ...
106 //   ]
107 // }
108 // </pre>
109 // JSON strings must be encoded as UTF-8. To send binary data, you must
110 // base64-encode the data and mark it as binary. To mark a JSON string
111 // as binary, replace it with a JSON object with a single attribute named `b64`:
112 // <pre>{"b64": "..."} </pre>
113 // For example:
114 //
115 // Two Serialized tf.Examples (fake data, for illustrative purposes only):
116 // <pre>
117 // {"instances": [{"b64": "X5ad6u"}, {"b64": "IA9j4nx"}]}
118 // </pre>
119 // Two JPEG image byte strings (fake data, for illustrative purposes only):
120 // <pre>
121 // {"instances": [{"b64": "ASa8asdf"}, {"b64": "JLK7ljk3"}]}
122 // </pre>
123 // If your data includes named references, format each instance as a JSON object
124 // with the named references as the keys:
125 //
126 // JSON input data to be preprocessed:
127 // <pre>
128 // {
129 //   "instances": [
130 //     {
131 //       "a": 1.0,
132 //       "b": true,
133 //       "c": "x"
134 //     },
135 //     {
136 //       "a": -2.0,
137 //       "b": false,
138 //       "c": "y"
139 //     }
140 //   ]
141 // }
142 // </pre>
143 // Some models have an underlying TensorFlow graph that accepts multiple input
144 // tensors. In this case, you should use the names of JSON name/value pairs to
145 // identify the input tensors, as shown in the following exmaples:
146 //
147 // For a graph with input tensor aliases "tag" (string) and "image"
148 // (base64-encoded string):
149 // <pre>
150 // {
151 //   "instances": [
152 //     {
153 //       "tag": "beach",
154 //       "image": {"b64": "ASa8asdf"}
155 //     },
156 //     {
157 //       "tag": "car",
158 //       "image": {"b64": "JLK7ljk3"}
159 //     }
160 //   ]
161 // }
162 // </pre>
163 // For a graph with input tensor aliases "tag" (string) and "image"
164 // (3-dimensional array of 8-bit ints):
165 // <pre>
166 // {
167 //   "instances": [
168 //     {
169 //       "tag": "beach",
170 //       "image": [
171 //         [
172 //           [138, 30, 66],
173 //           [130, 20, 56],
174 //           ...
175 //         ],
176 //         [
177 //           [126, 38, 61],
178 //           [122, 24, 57],
179 //           ...
180 //         ],
181 //         ...
182 //       ]
183 //     },
184 //     {
185 //       "tag": "car",
186 //       "image": [
187 //         [
188 //           [255, 0, 102],
189 //           [255, 0, 97],
190 //           ...
191 //         ],
192 //         [
193 //           [254, 1, 101],
194 //           [254, 2, 93],
195 //           ...
196 //         ],
197 //         ...
198 //       ]
199 //     },
200 //     ...
201 //   ]
202 // }
203 // </pre>
204 // If the call is successful, the response body will contain one prediction
205 // entry per instance in the request body. If prediction fails for any
206 // instance, the response body will contain no predictions and will contian
207 // a single error entry instead.
208 type PredictRequest struct {
209         // Required. The resource name of a model or a version.
210         //
211         // Authorization: requires `Viewer` role on the parent project.
212         Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
213         //
214         // Required. The prediction request body.
215         HttpBody *google_api3.HttpBody `protobuf:"bytes,2,opt,name=http_body,json=httpBody" json:"http_body,omitempty"`
216 }
217
218 func (m *PredictRequest) Reset()                    { *m = PredictRequest{} }
219 func (m *PredictRequest) String() string            { return proto.CompactTextString(m) }
220 func (*PredictRequest) ProtoMessage()               {}
221 func (*PredictRequest) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{0} }
222
223 func (m *PredictRequest) GetName() string {
224         if m != nil {
225                 return m.Name
226         }
227         return ""
228 }
229
230 func (m *PredictRequest) GetHttpBody() *google_api3.HttpBody {
231         if m != nil {
232                 return m.HttpBody
233         }
234         return nil
235 }
236
237 func init() {
238         proto.RegisterType((*PredictRequest)(nil), "google.cloud.ml.v1.PredictRequest")
239 }
240
241 // Reference imports to suppress errors if they are not otherwise used.
242 var _ context.Context
243 var _ grpc.ClientConn
244
245 // This is a compile-time assertion to ensure that this generated file
246 // is compatible with the grpc package it is being compiled against.
247 const _ = grpc.SupportPackageIsVersion4
248
249 // Client API for OnlinePredictionService service
250
251 type OnlinePredictionServiceClient interface {
252         // Performs prediction on the data in the request.
253         //
254         // **** REMOVE FROM GENERATED DOCUMENTATION
255         Predict(ctx context.Context, in *PredictRequest, opts ...grpc.CallOption) (*google_api3.HttpBody, error)
256 }
257
258 type onlinePredictionServiceClient struct {
259         cc *grpc.ClientConn
260 }
261
262 func NewOnlinePredictionServiceClient(cc *grpc.ClientConn) OnlinePredictionServiceClient {
263         return &onlinePredictionServiceClient{cc}
264 }
265
266 func (c *onlinePredictionServiceClient) Predict(ctx context.Context, in *PredictRequest, opts ...grpc.CallOption) (*google_api3.HttpBody, error) {
267         out := new(google_api3.HttpBody)
268         err := grpc.Invoke(ctx, "/google.cloud.ml.v1.OnlinePredictionService/Predict", in, out, c.cc, opts...)
269         if err != nil {
270                 return nil, err
271         }
272         return out, nil
273 }
274
275 // Server API for OnlinePredictionService service
276
277 type OnlinePredictionServiceServer interface {
278         // Performs prediction on the data in the request.
279         //
280         // **** REMOVE FROM GENERATED DOCUMENTATION
281         Predict(context.Context, *PredictRequest) (*google_api3.HttpBody, error)
282 }
283
284 func RegisterOnlinePredictionServiceServer(s *grpc.Server, srv OnlinePredictionServiceServer) {
285         s.RegisterService(&_OnlinePredictionService_serviceDesc, srv)
286 }
287
288 func _OnlinePredictionService_Predict_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
289         in := new(PredictRequest)
290         if err := dec(in); err != nil {
291                 return nil, err
292         }
293         if interceptor == nil {
294                 return srv.(OnlinePredictionServiceServer).Predict(ctx, in)
295         }
296         info := &grpc.UnaryServerInfo{
297                 Server:     srv,
298                 FullMethod: "/google.cloud.ml.v1.OnlinePredictionService/Predict",
299         }
300         handler := func(ctx context.Context, req interface{}) (interface{}, error) {
301                 return srv.(OnlinePredictionServiceServer).Predict(ctx, req.(*PredictRequest))
302         }
303         return interceptor(ctx, in, info, handler)
304 }
305
306 var _OnlinePredictionService_serviceDesc = grpc.ServiceDesc{
307         ServiceName: "google.cloud.ml.v1.OnlinePredictionService",
308         HandlerType: (*OnlinePredictionServiceServer)(nil),
309         Methods: []grpc.MethodDesc{
310                 {
311                         MethodName: "Predict",
312                         Handler:    _OnlinePredictionService_Predict_Handler,
313                 },
314         },
315         Streams:  []grpc.StreamDesc{},
316         Metadata: "google/cloud/ml/v1/prediction_service.proto",
317 }
318
319 func init() { proto.RegisterFile("google/cloud/ml/v1/prediction_service.proto", fileDescriptor3) }
320
321 var fileDescriptor3 = []byte{
322         // 308 bytes of a gzipped FileDescriptorProto
323         0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x51, 0x4f, 0x4b, 0xfb, 0x30,
324         0x18, 0xa6, 0xe3, 0xc7, 0x4f, 0x17, 0xc1, 0x43, 0x10, 0x9d, 0x45, 0x64, 0xd4, 0xcb, 0x9c, 0x90,
325         0xd0, 0xe9, 0x69, 0xe2, 0x65, 0x27, 0x6f, 0x96, 0x79, 0x10, 0xbc, 0x8c, 0xac, 0x0d, 0x59, 0x24,
326         0xcd, 0x1b, 0xdb, 0xac, 0x30, 0xc4, 0x8b, 0x37, 0xcf, 0x7e, 0x34, 0xbf, 0x82, 0x1f, 0x44, 0xd2,
327         0x04, 0x99, 0xd4, 0xdb, 0x4b, 0xde, 0xe7, 0x79, 0x9f, 0x3f, 0x41, 0x17, 0x02, 0x40, 0x28, 0x4e,
328         0x73, 0x05, 0xeb, 0x82, 0x96, 0x8a, 0x36, 0x29, 0x35, 0x15, 0x2f, 0x64, 0x6e, 0x25, 0xe8, 0x45,
329         0xcd, 0xab, 0x46, 0xe6, 0x9c, 0x98, 0x0a, 0x2c, 0x60, 0xec, 0xc1, 0xa4, 0x05, 0x93, 0x52, 0x91,
330         0x26, 0x8d, 0x4f, 0xc2, 0x01, 0x66, 0x24, 0x65, 0x5a, 0x83, 0x65, 0x8e, 0x58, 0x7b, 0x46, 0x7c,
331         0xbc, 0xb5, 0x5d, 0x59, 0x6b, 0x96, 0x50, 0x6c, 0xfc, 0x2a, 0x79, 0x40, 0xfb, 0x99, 0x17, 0x9a,
332         0xf3, 0xe7, 0x35, 0xaf, 0x2d, 0xc6, 0xe8, 0x9f, 0x66, 0x25, 0x1f, 0x44, 0xc3, 0x68, 0xd4, 0x9f,
333         0xb7, 0x33, 0x4e, 0x51, 0xdf, 0xf1, 0x16, 0x8e, 0x38, 0xe8, 0x0d, 0xa3, 0xd1, 0xde, 0xe4, 0x80,
334         0x04, 0x1b, 0xcc, 0x48, 0x72, 0x6b, 0xad, 0x99, 0x41, 0xb1, 0x99, 0xef, 0xae, 0xc2, 0x34, 0x79,
335         0x8f, 0xd0, 0xd1, 0x9d, 0x56, 0x52, 0xf3, 0xec, 0x27, 0xc8, 0xbd, 0xcf, 0x81, 0x35, 0xda, 0x09,
336         0x8f, 0x38, 0x21, 0xdd, 0x34, 0xe4, 0xb7, 0xa3, 0xf8, 0x4f, 0xa9, 0xe4, 0xfc, 0xed, 0xf3, 0xeb,
337         0xa3, 0x77, 0x96, 0x9c, 0xba, 0xb2, 0x5e, 0x9c, 0xcd, 0x1b, 0x53, 0xc1, 0x13, 0xcf, 0x6d, 0x4d,
338         0xc7, 0xe3, 0xd7, 0x69, 0xe8, 0x6f, 0x1a, 0x8d, 0x67, 0x0a, 0xc5, 0x39, 0x94, 0x1d, 0x25, 0x77,
339         0xae, 0x49, 0x67, 0x87, 0x1d, 0x83, 0x99, 0xab, 0x26, 0x8b, 0x1e, 0xaf, 0x02, 0x43, 0x80, 0x62,
340         0x5a, 0x10, 0xa8, 0x04, 0x15, 0x5c, 0xb7, 0xc5, 0x51, 0xbf, 0x62, 0x46, 0xd6, 0xdb, 0xbf, 0x76,
341         0x5d, 0xaa, 0xe5, 0xff, 0x16, 0x70, 0xf9, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x81, 0x8e, 0x25, 0xca,
342         0xd5, 0x01, 0x00, 0x00,
343 }