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
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
// This file is generated. Do not edit
// @generated

// https://github.com/Manishearth/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy::all)]

#![cfg_attr(rustfmt, rustfmt_skip)]

#![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_RELEASE_SERVICE_LIST_RELEASES: ::grpcio::Method<super::tiller::ListReleasesRequest, super::tiller::ListReleasesResponse> = ::grpcio::Method {
    ty: ::grpcio::MethodType::ServerStreaming,
    name: "/hapi.services.tiller.ReleaseService/ListReleases",
    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_RELEASE_SERVICE_GET_RELEASE_STATUS: ::grpcio::Method<super::tiller::GetReleaseStatusRequest, super::tiller::GetReleaseStatusResponse> = ::grpcio::Method {
    ty: ::grpcio::MethodType::Unary,
    name: "/hapi.services.tiller.ReleaseService/GetReleaseStatus",
    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_RELEASE_SERVICE_GET_RELEASE_CONTENT: ::grpcio::Method<super::tiller::GetReleaseContentRequest, super::tiller::GetReleaseContentResponse> = ::grpcio::Method {
    ty: ::grpcio::MethodType::Unary,
    name: "/hapi.services.tiller.ReleaseService/GetReleaseContent",
    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_RELEASE_SERVICE_UPDATE_RELEASE: ::grpcio::Method<super::tiller::UpdateReleaseRequest, super::tiller::UpdateReleaseResponse> = ::grpcio::Method {
    ty: ::grpcio::MethodType::Unary,
    name: "/hapi.services.tiller.ReleaseService/UpdateRelease",
    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_RELEASE_SERVICE_INSTALL_RELEASE: ::grpcio::Method<super::tiller::InstallReleaseRequest, super::tiller::InstallReleaseResponse> = ::grpcio::Method {
    ty: ::grpcio::MethodType::Unary,
    name: "/hapi.services.tiller.ReleaseService/InstallRelease",
    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_RELEASE_SERVICE_UNINSTALL_RELEASE: ::grpcio::Method<super::tiller::UninstallReleaseRequest, super::tiller::UninstallReleaseResponse> = ::grpcio::Method {
    ty: ::grpcio::MethodType::Unary,
    name: "/hapi.services.tiller.ReleaseService/UninstallRelease",
    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_RELEASE_SERVICE_GET_VERSION: ::grpcio::Method<super::tiller::GetVersionRequest, super::tiller::GetVersionResponse> = ::grpcio::Method {
    ty: ::grpcio::MethodType::Unary,
    name: "/hapi.services.tiller.ReleaseService/GetVersion",
    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_RELEASE_SERVICE_ROLLBACK_RELEASE: ::grpcio::Method<super::tiller::RollbackReleaseRequest, super::tiller::RollbackReleaseResponse> = ::grpcio::Method {
    ty: ::grpcio::MethodType::Unary,
    name: "/hapi.services.tiller.ReleaseService/RollbackRelease",
    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_RELEASE_SERVICE_GET_HISTORY: ::grpcio::Method<super::tiller::GetHistoryRequest, super::tiller::GetHistoryResponse> = ::grpcio::Method {
    ty: ::grpcio::MethodType::Unary,
    name: "/hapi.services.tiller.ReleaseService/GetHistory",
    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_RELEASE_SERVICE_RUN_RELEASE_TEST: ::grpcio::Method<super::tiller::TestReleaseRequest, super::tiller::TestReleaseResponse> = ::grpcio::Method {
    ty: ::grpcio::MethodType::ServerStreaming,
    name: "/hapi.services.tiller.ReleaseService/RunReleaseTest",
    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 ReleaseServiceClient {
    client: ::grpcio::Client,
}

impl ReleaseServiceClient {
    pub fn new(channel: ::grpcio::Channel) -> Self {
        ReleaseServiceClient {
            client: ::grpcio::Client::new(channel),
        }
    }

    pub fn list_releases_opt(&self, req: &super::tiller::ListReleasesRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientSStreamReceiver<super::tiller::ListReleasesResponse>> {
        self.client.server_streaming(&METHOD_RELEASE_SERVICE_LIST_RELEASES, req, opt)
    }

    pub fn list_releases(&self, req: &super::tiller::ListReleasesRequest) -> ::grpcio::Result<::grpcio::ClientSStreamReceiver<super::tiller::ListReleasesResponse>> {
        self.list_releases_opt(req, ::grpcio::CallOption::default())
    }

    pub fn get_release_status_opt(&self, req: &super::tiller::GetReleaseStatusRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::tiller::GetReleaseStatusResponse> {
        self.client.unary_call(&METHOD_RELEASE_SERVICE_GET_RELEASE_STATUS, req, opt)
    }

    pub fn get_release_status(&self, req: &super::tiller::GetReleaseStatusRequest) -> ::grpcio::Result<super::tiller::GetReleaseStatusResponse> {
        self.get_release_status_opt(req, ::grpcio::CallOption::default())
    }

    pub fn get_release_status_async_opt(&self, req: &super::tiller::GetReleaseStatusRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::tiller::GetReleaseStatusResponse>> {
        self.client.unary_call_async(&METHOD_RELEASE_SERVICE_GET_RELEASE_STATUS, req, opt)
    }

    pub fn get_release_status_async(&self, req: &super::tiller::GetReleaseStatusRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::tiller::GetReleaseStatusResponse>> {
        self.get_release_status_async_opt(req, ::grpcio::CallOption::default())
    }

    pub fn get_release_content_opt(&self, req: &super::tiller::GetReleaseContentRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::tiller::GetReleaseContentResponse> {
        self.client.unary_call(&METHOD_RELEASE_SERVICE_GET_RELEASE_CONTENT, req, opt)
    }

    pub fn get_release_content(&self, req: &super::tiller::GetReleaseContentRequest) -> ::grpcio::Result<super::tiller::GetReleaseContentResponse> {
        self.get_release_content_opt(req, ::grpcio::CallOption::default())
    }

    pub fn get_release_content_async_opt(&self, req: &super::tiller::GetReleaseContentRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::tiller::GetReleaseContentResponse>> {
        self.client.unary_call_async(&METHOD_RELEASE_SERVICE_GET_RELEASE_CONTENT, req, opt)
    }

    pub fn get_release_content_async(&self, req: &super::tiller::GetReleaseContentRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::tiller::GetReleaseContentResponse>> {
        self.get_release_content_async_opt(req, ::grpcio::CallOption::default())
    }

    pub fn update_release_opt(&self, req: &super::tiller::UpdateReleaseRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::tiller::UpdateReleaseResponse> {
        self.client.unary_call(&METHOD_RELEASE_SERVICE_UPDATE_RELEASE, req, opt)
    }

    pub fn update_release(&self, req: &super::tiller::UpdateReleaseRequest) -> ::grpcio::Result<super::tiller::UpdateReleaseResponse> {
        self.update_release_opt(req, ::grpcio::CallOption::default())
    }

    pub fn update_release_async_opt(&self, req: &super::tiller::UpdateReleaseRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::tiller::UpdateReleaseResponse>> {
        self.client.unary_call_async(&METHOD_RELEASE_SERVICE_UPDATE_RELEASE, req, opt)
    }

    pub fn update_release_async(&self, req: &super::tiller::UpdateReleaseRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::tiller::UpdateReleaseResponse>> {
        self.update_release_async_opt(req, ::grpcio::CallOption::default())
    }

    pub fn install_release_opt(&self, req: &super::tiller::InstallReleaseRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::tiller::InstallReleaseResponse> {
        self.client.unary_call(&METHOD_RELEASE_SERVICE_INSTALL_RELEASE, req, opt)
    }

    pub fn install_release(&self, req: &super::tiller::InstallReleaseRequest) -> ::grpcio::Result<super::tiller::InstallReleaseResponse> {
        self.install_release_opt(req, ::grpcio::CallOption::default())
    }

    pub fn install_release_async_opt(&self, req: &super::tiller::InstallReleaseRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::tiller::InstallReleaseResponse>> {
        self.client.unary_call_async(&METHOD_RELEASE_SERVICE_INSTALL_RELEASE, req, opt)
    }

    pub fn install_release_async(&self, req: &super::tiller::InstallReleaseRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::tiller::InstallReleaseResponse>> {
        self.install_release_async_opt(req, ::grpcio::CallOption::default())
    }

    pub fn uninstall_release_opt(&self, req: &super::tiller::UninstallReleaseRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::tiller::UninstallReleaseResponse> {
        self.client.unary_call(&METHOD_RELEASE_SERVICE_UNINSTALL_RELEASE, req, opt)
    }

    pub fn uninstall_release(&self, req: &super::tiller::UninstallReleaseRequest) -> ::grpcio::Result<super::tiller::UninstallReleaseResponse> {
        self.uninstall_release_opt(req, ::grpcio::CallOption::default())
    }

    pub fn uninstall_release_async_opt(&self, req: &super::tiller::UninstallReleaseRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::tiller::UninstallReleaseResponse>> {
        self.client.unary_call_async(&METHOD_RELEASE_SERVICE_UNINSTALL_RELEASE, req, opt)
    }

    pub fn uninstall_release_async(&self, req: &super::tiller::UninstallReleaseRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::tiller::UninstallReleaseResponse>> {
        self.uninstall_release_async_opt(req, ::grpcio::CallOption::default())
    }

    pub fn get_version_opt(&self, req: &super::tiller::GetVersionRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::tiller::GetVersionResponse> {
        self.client.unary_call(&METHOD_RELEASE_SERVICE_GET_VERSION, req, opt)
    }

    pub fn get_version(&self, req: &super::tiller::GetVersionRequest) -> ::grpcio::Result<super::tiller::GetVersionResponse> {
        self.get_version_opt(req, ::grpcio::CallOption::default())
    }

    pub fn get_version_async_opt(&self, req: &super::tiller::GetVersionRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::tiller::GetVersionResponse>> {
        self.client.unary_call_async(&METHOD_RELEASE_SERVICE_GET_VERSION, req, opt)
    }

    pub fn get_version_async(&self, req: &super::tiller::GetVersionRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::tiller::GetVersionResponse>> {
        self.get_version_async_opt(req, ::grpcio::CallOption::default())
    }

    pub fn rollback_release_opt(&self, req: &super::tiller::RollbackReleaseRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::tiller::RollbackReleaseResponse> {
        self.client.unary_call(&METHOD_RELEASE_SERVICE_ROLLBACK_RELEASE, req, opt)
    }

    pub fn rollback_release(&self, req: &super::tiller::RollbackReleaseRequest) -> ::grpcio::Result<super::tiller::RollbackReleaseResponse> {
        self.rollback_release_opt(req, ::grpcio::CallOption::default())
    }

    pub fn rollback_release_async_opt(&self, req: &super::tiller::RollbackReleaseRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::tiller::RollbackReleaseResponse>> {
        self.client.unary_call_async(&METHOD_RELEASE_SERVICE_ROLLBACK_RELEASE, req, opt)
    }

    pub fn rollback_release_async(&self, req: &super::tiller::RollbackReleaseRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::tiller::RollbackReleaseResponse>> {
        self.rollback_release_async_opt(req, ::grpcio::CallOption::default())
    }

    pub fn get_history_opt(&self, req: &super::tiller::GetHistoryRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::tiller::GetHistoryResponse> {
        self.client.unary_call(&METHOD_RELEASE_SERVICE_GET_HISTORY, req, opt)
    }

    pub fn get_history(&self, req: &super::tiller::GetHistoryRequest) -> ::grpcio::Result<super::tiller::GetHistoryResponse> {
        self.get_history_opt(req, ::grpcio::CallOption::default())
    }

    pub fn get_history_async_opt(&self, req: &super::tiller::GetHistoryRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::tiller::GetHistoryResponse>> {
        self.client.unary_call_async(&METHOD_RELEASE_SERVICE_GET_HISTORY, req, opt)
    }

    pub fn get_history_async(&self, req: &super::tiller::GetHistoryRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::tiller::GetHistoryResponse>> {
        self.get_history_async_opt(req, ::grpcio::CallOption::default())
    }

    pub fn run_release_test_opt(&self, req: &super::tiller::TestReleaseRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientSStreamReceiver<super::tiller::TestReleaseResponse>> {
        self.client.server_streaming(&METHOD_RELEASE_SERVICE_RUN_RELEASE_TEST, req, opt)
    }

    pub fn run_release_test(&self, req: &super::tiller::TestReleaseRequest) -> ::grpcio::Result<::grpcio::ClientSStreamReceiver<super::tiller::TestReleaseResponse>> {
        self.run_release_test_opt(req, ::grpcio::CallOption::default())
    }
    pub fn spawn<F>(&self, f: F) where F: ::futures::Future<Item = (), Error = ()> + Send + 'static {
        self.client.spawn(f)
    }
}

pub trait ReleaseService {
    fn list_releases(&mut self, ctx: ::grpcio::RpcContext, req: super::tiller::ListReleasesRequest, sink: ::grpcio::ServerStreamingSink<super::tiller::ListReleasesResponse>);
    fn get_release_status(&mut self, ctx: ::grpcio::RpcContext, req: super::tiller::GetReleaseStatusRequest, sink: ::grpcio::UnarySink<super::tiller::GetReleaseStatusResponse>);
    fn get_release_content(&mut self, ctx: ::grpcio::RpcContext, req: super::tiller::GetReleaseContentRequest, sink: ::grpcio::UnarySink<super::tiller::GetReleaseContentResponse>);
    fn update_release(&mut self, ctx: ::grpcio::RpcContext, req: super::tiller::UpdateReleaseRequest, sink: ::grpcio::UnarySink<super::tiller::UpdateReleaseResponse>);
    fn install_release(&mut self, ctx: ::grpcio::RpcContext, req: super::tiller::InstallReleaseRequest, sink: ::grpcio::UnarySink<super::tiller::InstallReleaseResponse>);
    fn uninstall_release(&mut self, ctx: ::grpcio::RpcContext, req: super::tiller::UninstallReleaseRequest, sink: ::grpcio::UnarySink<super::tiller::UninstallReleaseResponse>);
    fn get_version(&mut self, ctx: ::grpcio::RpcContext, req: super::tiller::GetVersionRequest, sink: ::grpcio::UnarySink<super::tiller::GetVersionResponse>);
    fn rollback_release(&mut self, ctx: ::grpcio::RpcContext, req: super::tiller::RollbackReleaseRequest, sink: ::grpcio::UnarySink<super::tiller::RollbackReleaseResponse>);
    fn get_history(&mut self, ctx: ::grpcio::RpcContext, req: super::tiller::GetHistoryRequest, sink: ::grpcio::UnarySink<super::tiller::GetHistoryResponse>);
    fn run_release_test(&mut self, ctx: ::grpcio::RpcContext, req: super::tiller::TestReleaseRequest, sink: ::grpcio::ServerStreamingSink<super::tiller::TestReleaseResponse>);
}

pub fn create_release_service<S: ReleaseService + Send + Clone + 'static>(s: S) -> ::grpcio::Service {
    let mut builder = ::grpcio::ServiceBuilder::new();
    let mut instance = s.clone();
    builder = builder.add_server_streaming_handler(&METHOD_RELEASE_SERVICE_LIST_RELEASES, move |ctx, req, resp| {
        instance.list_releases(ctx, req, resp)
    });
    let mut instance = s.clone();
    builder = builder.add_unary_handler(&METHOD_RELEASE_SERVICE_GET_RELEASE_STATUS, move |ctx, req, resp| {
        instance.get_release_status(ctx, req, resp)
    });
    let mut instance = s.clone();
    builder = builder.add_unary_handler(&METHOD_RELEASE_SERVICE_GET_RELEASE_CONTENT, move |ctx, req, resp| {
        instance.get_release_content(ctx, req, resp)
    });
    let mut instance = s.clone();
    builder = builder.add_unary_handler(&METHOD_RELEASE_SERVICE_UPDATE_RELEASE, move |ctx, req, resp| {
        instance.update_release(ctx, req, resp)
    });
    let mut instance = s.clone();
    builder = builder.add_unary_handler(&METHOD_RELEASE_SERVICE_INSTALL_RELEASE, move |ctx, req, resp| {
        instance.install_release(ctx, req, resp)
    });
    let mut instance = s.clone();
    builder = builder.add_unary_handler(&METHOD_RELEASE_SERVICE_UNINSTALL_RELEASE, move |ctx, req, resp| {
        instance.uninstall_release(ctx, req, resp)
    });
    let mut instance = s.clone();
    builder = builder.add_unary_handler(&METHOD_RELEASE_SERVICE_GET_VERSION, move |ctx, req, resp| {
        instance.get_version(ctx, req, resp)
    });
    let mut instance = s.clone();
    builder = builder.add_unary_handler(&METHOD_RELEASE_SERVICE_ROLLBACK_RELEASE, move |ctx, req, resp| {
        instance.rollback_release(ctx, req, resp)
    });
    let mut instance = s.clone();
    builder = builder.add_unary_handler(&METHOD_RELEASE_SERVICE_GET_HISTORY, move |ctx, req, resp| {
        instance.get_history(ctx, req, resp)
    });
    let mut instance = s;
    builder = builder.add_server_streaming_handler(&METHOD_RELEASE_SERVICE_RUN_RELEASE_TEST, move |ctx, req, resp| {
        instance.run_release_test(ctx, req, resp)
    });
    builder.build()
}