1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
#![allow(unknown_lints)]
#![allow(clippy::all)]
#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unsafe_code)]
#![allow(unused_imports)]
#![allow(unused_results)]
const METHOD_SCHEMA_SERVICE_CREATE_SCHEMA: ::grpcio::Method<super::schema::CreateSchemaRequest, super::schema::Schema> = ::grpcio::Method {
ty: ::grpcio::MethodType::Unary,
name: "/google.pubsub.v1.SchemaService/CreateSchema",
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
};
const METHOD_SCHEMA_SERVICE_GET_SCHEMA: ::grpcio::Method<super::schema::GetSchemaRequest, super::schema::Schema> = ::grpcio::Method {
ty: ::grpcio::MethodType::Unary,
name: "/google.pubsub.v1.SchemaService/GetSchema",
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
};
const METHOD_SCHEMA_SERVICE_LIST_SCHEMAS: ::grpcio::Method<super::schema::ListSchemasRequest, super::schema::ListSchemasResponse> = ::grpcio::Method {
ty: ::grpcio::MethodType::Unary,
name: "/google.pubsub.v1.SchemaService/ListSchemas",
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
};
const METHOD_SCHEMA_SERVICE_DELETE_SCHEMA: ::grpcio::Method<super::schema::DeleteSchemaRequest, super::empty::Empty> = ::grpcio::Method {
ty: ::grpcio::MethodType::Unary,
name: "/google.pubsub.v1.SchemaService/DeleteSchema",
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
};
const METHOD_SCHEMA_SERVICE_VALIDATE_SCHEMA: ::grpcio::Method<super::schema::ValidateSchemaRequest, super::schema::ValidateSchemaResponse> = ::grpcio::Method {
ty: ::grpcio::MethodType::Unary,
name: "/google.pubsub.v1.SchemaService/ValidateSchema",
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
};
const METHOD_SCHEMA_SERVICE_VALIDATE_MESSAGE: ::grpcio::Method<super::schema::ValidateMessageRequest, super::schema::ValidateMessageResponse> = ::grpcio::Method {
ty: ::grpcio::MethodType::Unary,
name: "/google.pubsub.v1.SchemaService/ValidateMessage",
req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
};
#[derive(Clone)]
pub struct SchemaServiceClient {
client: ::grpcio::Client,
}
impl SchemaServiceClient {
pub fn new(channel: ::grpcio::Channel) -> Self {
SchemaServiceClient {
client: ::grpcio::Client::new(channel),
}
}
pub fn create_schema_opt(&self, req: &super::schema::CreateSchemaRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::schema::Schema> {
self.client.unary_call(&METHOD_SCHEMA_SERVICE_CREATE_SCHEMA, req, opt)
}
pub fn create_schema(&self, req: &super::schema::CreateSchemaRequest) -> ::grpcio::Result<super::schema::Schema> {
self.create_schema_opt(req, ::grpcio::CallOption::default())
}
pub fn create_schema_async_opt(&self, req: &super::schema::CreateSchemaRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::schema::Schema>> {
self.client.unary_call_async(&METHOD_SCHEMA_SERVICE_CREATE_SCHEMA, req, opt)
}
pub fn create_schema_async(&self, req: &super::schema::CreateSchemaRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::schema::Schema>> {
self.create_schema_async_opt(req, ::grpcio::CallOption::default())
}
pub fn get_schema_opt(&self, req: &super::schema::GetSchemaRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::schema::Schema> {
self.client.unary_call(&METHOD_SCHEMA_SERVICE_GET_SCHEMA, req, opt)
}
pub fn get_schema(&self, req: &super::schema::GetSchemaRequest) -> ::grpcio::Result<super::schema::Schema> {
self.get_schema_opt(req, ::grpcio::CallOption::default())
}
pub fn get_schema_async_opt(&self, req: &super::schema::GetSchemaRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::schema::Schema>> {
self.client.unary_call_async(&METHOD_SCHEMA_SERVICE_GET_SCHEMA, req, opt)
}
pub fn get_schema_async(&self, req: &super::schema::GetSchemaRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::schema::Schema>> {
self.get_schema_async_opt(req, ::grpcio::CallOption::default())
}
pub fn list_schemas_opt(&self, req: &super::schema::ListSchemasRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::schema::ListSchemasResponse> {
self.client.unary_call(&METHOD_SCHEMA_SERVICE_LIST_SCHEMAS, req, opt)
}
pub fn list_schemas(&self, req: &super::schema::ListSchemasRequest) -> ::grpcio::Result<super::schema::ListSchemasResponse> {
self.list_schemas_opt(req, ::grpcio::CallOption::default())
}
pub fn list_schemas_async_opt(&self, req: &super::schema::ListSchemasRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::schema::ListSchemasResponse>> {
self.client.unary_call_async(&METHOD_SCHEMA_SERVICE_LIST_SCHEMAS, req, opt)
}
pub fn list_schemas_async(&self, req: &super::schema::ListSchemasRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::schema::ListSchemasResponse>> {
self.list_schemas_async_opt(req, ::grpcio::CallOption::default())
}
pub fn delete_schema_opt(&self, req: &super::schema::DeleteSchemaRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::empty::Empty> {
self.client.unary_call(&METHOD_SCHEMA_SERVICE_DELETE_SCHEMA, req, opt)
}
pub fn delete_schema(&self, req: &super::schema::DeleteSchemaRequest) -> ::grpcio::Result<super::empty::Empty> {
self.delete_schema_opt(req, ::grpcio::CallOption::default())
}
pub fn delete_schema_async_opt(&self, req: &super::schema::DeleteSchemaRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::empty::Empty>> {
self.client.unary_call_async(&METHOD_SCHEMA_SERVICE_DELETE_SCHEMA, req, opt)
}
pub fn delete_schema_async(&self, req: &super::schema::DeleteSchemaRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::empty::Empty>> {
self.delete_schema_async_opt(req, ::grpcio::CallOption::default())
}
pub fn validate_schema_opt(&self, req: &super::schema::ValidateSchemaRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::schema::ValidateSchemaResponse> {
self.client.unary_call(&METHOD_SCHEMA_SERVICE_VALIDATE_SCHEMA, req, opt)
}
pub fn validate_schema(&self, req: &super::schema::ValidateSchemaRequest) -> ::grpcio::Result<super::schema::ValidateSchemaResponse> {
self.validate_schema_opt(req, ::grpcio::CallOption::default())
}
pub fn validate_schema_async_opt(&self, req: &super::schema::ValidateSchemaRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::schema::ValidateSchemaResponse>> {
self.client.unary_call_async(&METHOD_SCHEMA_SERVICE_VALIDATE_SCHEMA, req, opt)
}
pub fn validate_schema_async(&self, req: &super::schema::ValidateSchemaRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::schema::ValidateSchemaResponse>> {
self.validate_schema_async_opt(req, ::grpcio::CallOption::default())
}
pub fn validate_message_opt(&self, req: &super::schema::ValidateMessageRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::schema::ValidateMessageResponse> {
self.client.unary_call(&METHOD_SCHEMA_SERVICE_VALIDATE_MESSAGE, req, opt)
}
pub fn validate_message(&self, req: &super::schema::ValidateMessageRequest) -> ::grpcio::Result<super::schema::ValidateMessageResponse> {
self.validate_message_opt(req, ::grpcio::CallOption::default())
}
pub fn validate_message_async_opt(&self, req: &super::schema::ValidateMessageRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::schema::ValidateMessageResponse>> {
self.client.unary_call_async(&METHOD_SCHEMA_SERVICE_VALIDATE_MESSAGE, req, opt)
}
pub fn validate_message_async(&self, req: &super::schema::ValidateMessageRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::schema::ValidateMessageResponse>> {
self.validate_message_async_opt(req, ::grpcio::CallOption::default())
}
pub fn spawn<F>(&self, f: F) where F: ::futures::Future<Output = ()> + Send + 'static {
self.client.spawn(f)
}
}
pub trait SchemaService {
fn create_schema(&mut self, ctx: ::grpcio::RpcContext, _req: super::schema::CreateSchemaRequest, sink: ::grpcio::UnarySink<super::schema::Schema>) {
grpcio::unimplemented_call!(ctx, sink)
}
fn get_schema(&mut self, ctx: ::grpcio::RpcContext, _req: super::schema::GetSchemaRequest, sink: ::grpcio::UnarySink<super::schema::Schema>) {
grpcio::unimplemented_call!(ctx, sink)
}
fn list_schemas(&mut self, ctx: ::grpcio::RpcContext, _req: super::schema::ListSchemasRequest, sink: ::grpcio::UnarySink<super::schema::ListSchemasResponse>) {
grpcio::unimplemented_call!(ctx, sink)
}
fn delete_schema(&mut self, ctx: ::grpcio::RpcContext, _req: super::schema::DeleteSchemaRequest, sink: ::grpcio::UnarySink<super::empty::Empty>) {
grpcio::unimplemented_call!(ctx, sink)
}
fn validate_schema(&mut self, ctx: ::grpcio::RpcContext, _req: super::schema::ValidateSchemaRequest, sink: ::grpcio::UnarySink<super::schema::ValidateSchemaResponse>) {
grpcio::unimplemented_call!(ctx, sink)
}
fn validate_message(&mut self, ctx: ::grpcio::RpcContext, _req: super::schema::ValidateMessageRequest, sink: ::grpcio::UnarySink<super::schema::ValidateMessageResponse>) {
grpcio::unimplemented_call!(ctx, sink)
}
}
pub fn create_schema_service<S: SchemaService + Send + Clone + 'static>(s: S) -> ::grpcio::Service {
let mut builder = ::grpcio::ServiceBuilder::new();
let mut instance = s.clone();
builder = builder.add_unary_handler(&METHOD_SCHEMA_SERVICE_CREATE_SCHEMA, move |ctx, req, resp| {
instance.create_schema(ctx, req, resp)
});
let mut instance = s.clone();
builder = builder.add_unary_handler(&METHOD_SCHEMA_SERVICE_GET_SCHEMA, move |ctx, req, resp| {
instance.get_schema(ctx, req, resp)
});
let mut instance = s.clone();
builder = builder.add_unary_handler(&METHOD_SCHEMA_SERVICE_LIST_SCHEMAS, move |ctx, req, resp| {
instance.list_schemas(ctx, req, resp)
});
let mut instance = s.clone();
builder = builder.add_unary_handler(&METHOD_SCHEMA_SERVICE_DELETE_SCHEMA, move |ctx, req, resp| {
instance.delete_schema(ctx, req, resp)
});
let mut instance = s.clone();
builder = builder.add_unary_handler(&METHOD_SCHEMA_SERVICE_VALIDATE_SCHEMA, move |ctx, req, resp| {
instance.validate_schema(ctx, req, resp)
});
let mut instance = s;
builder = builder.add_unary_handler(&METHOD_SCHEMA_SERVICE_VALIDATE_MESSAGE, move |ctx, req, resp| {
instance.validate_message(ctx, req, resp)
});
builder.build()
}