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
// 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_MODULE_SERVICE_VERSION: ::grpcio::Method<super::rudder::VersionReleaseRequest, super::rudder::VersionReleaseResponse> = ::grpcio::Method {
    ty: ::grpcio::MethodType::Unary,
    name: "/hapi.services.rudder.ReleaseModuleService/Version",
    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_MODULE_SERVICE_INSTALL_RELEASE: ::grpcio::Method<super::rudder::InstallReleaseRequest, super::rudder::InstallReleaseResponse> = ::grpcio::Method {
    ty: ::grpcio::MethodType::Unary,
    name: "/hapi.services.rudder.ReleaseModuleService/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_MODULE_SERVICE_DELETE_RELEASE: ::grpcio::Method<super::rudder::DeleteReleaseRequest, super::rudder::DeleteReleaseResponse> = ::grpcio::Method {
    ty: ::grpcio::MethodType::Unary,
    name: "/hapi.services.rudder.ReleaseModuleService/DeleteRelease",
    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_MODULE_SERVICE_ROLLBACK_RELEASE: ::grpcio::Method<super::rudder::RollbackReleaseRequest, super::rudder::RollbackReleaseResponse> = ::grpcio::Method {
    ty: ::grpcio::MethodType::Unary,
    name: "/hapi.services.rudder.ReleaseModuleService/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_MODULE_SERVICE_UPGRADE_RELEASE: ::grpcio::Method<super::rudder::UpgradeReleaseRequest, super::rudder::UpgradeReleaseResponse> = ::grpcio::Method {
    ty: ::grpcio::MethodType::Unary,
    name: "/hapi.services.rudder.ReleaseModuleService/UpgradeRelease",
    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_MODULE_SERVICE_RELEASE_STATUS: ::grpcio::Method<super::rudder::ReleaseStatusRequest, super::rudder::ReleaseStatusResponse> = ::grpcio::Method {
    ty: ::grpcio::MethodType::Unary,
    name: "/hapi.services.rudder.ReleaseModuleService/ReleaseStatus",
    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 ReleaseModuleServiceClient {
    client: ::grpcio::Client,
}

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

    pub fn version_opt(&self, req: &super::rudder::VersionReleaseRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::rudder::VersionReleaseResponse> {
        self.client.unary_call(&METHOD_RELEASE_MODULE_SERVICE_VERSION, req, opt)
    }

    pub fn version(&self, req: &super::rudder::VersionReleaseRequest) -> ::grpcio::Result<super::rudder::VersionReleaseResponse> {
        self.version_opt(req, ::grpcio::CallOption::default())
    }

    pub fn version_async_opt(&self, req: &super::rudder::VersionReleaseRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::rudder::VersionReleaseResponse>> {
        self.client.unary_call_async(&METHOD_RELEASE_MODULE_SERVICE_VERSION, req, opt)
    }

    pub fn version_async(&self, req: &super::rudder::VersionReleaseRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::rudder::VersionReleaseResponse>> {
        self.version_async_opt(req, ::grpcio::CallOption::default())
    }

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

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

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

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

    pub fn delete_release_opt(&self, req: &super::rudder::DeleteReleaseRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::rudder::DeleteReleaseResponse> {
        self.client.unary_call(&METHOD_RELEASE_MODULE_SERVICE_DELETE_RELEASE, req, opt)
    }

    pub fn delete_release(&self, req: &super::rudder::DeleteReleaseRequest) -> ::grpcio::Result<super::rudder::DeleteReleaseResponse> {
        self.delete_release_opt(req, ::grpcio::CallOption::default())
    }

    pub fn delete_release_async_opt(&self, req: &super::rudder::DeleteReleaseRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::rudder::DeleteReleaseResponse>> {
        self.client.unary_call_async(&METHOD_RELEASE_MODULE_SERVICE_DELETE_RELEASE, req, opt)
    }

    pub fn delete_release_async(&self, req: &super::rudder::DeleteReleaseRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::rudder::DeleteReleaseResponse>> {
        self.delete_release_async_opt(req, ::grpcio::CallOption::default())
    }

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

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

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

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

    pub fn upgrade_release_opt(&self, req: &super::rudder::UpgradeReleaseRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::rudder::UpgradeReleaseResponse> {
        self.client.unary_call(&METHOD_RELEASE_MODULE_SERVICE_UPGRADE_RELEASE, req, opt)
    }

    pub fn upgrade_release(&self, req: &super::rudder::UpgradeReleaseRequest) -> ::grpcio::Result<super::rudder::UpgradeReleaseResponse> {
        self.upgrade_release_opt(req, ::grpcio::CallOption::default())
    }

    pub fn upgrade_release_async_opt(&self, req: &super::rudder::UpgradeReleaseRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::rudder::UpgradeReleaseResponse>> {
        self.client.unary_call_async(&METHOD_RELEASE_MODULE_SERVICE_UPGRADE_RELEASE, req, opt)
    }

    pub fn upgrade_release_async(&self, req: &super::rudder::UpgradeReleaseRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::rudder::UpgradeReleaseResponse>> {
        self.upgrade_release_async_opt(req, ::grpcio::CallOption::default())
    }

    pub fn release_status_opt(&self, req: &super::rudder::ReleaseStatusRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::rudder::ReleaseStatusResponse> {
        self.client.unary_call(&METHOD_RELEASE_MODULE_SERVICE_RELEASE_STATUS, req, opt)
    }

    pub fn release_status(&self, req: &super::rudder::ReleaseStatusRequest) -> ::grpcio::Result<super::rudder::ReleaseStatusResponse> {
        self.release_status_opt(req, ::grpcio::CallOption::default())
    }

    pub fn release_status_async_opt(&self, req: &super::rudder::ReleaseStatusRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::rudder::ReleaseStatusResponse>> {
        self.client.unary_call_async(&METHOD_RELEASE_MODULE_SERVICE_RELEASE_STATUS, req, opt)
    }

    pub fn release_status_async(&self, req: &super::rudder::ReleaseStatusRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::rudder::ReleaseStatusResponse>> {
        self.release_status_async_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 ReleaseModuleService {
    fn version(&mut self, ctx: ::grpcio::RpcContext, req: super::rudder::VersionReleaseRequest, sink: ::grpcio::UnarySink<super::rudder::VersionReleaseResponse>);
    fn install_release(&mut self, ctx: ::grpcio::RpcContext, req: super::rudder::InstallReleaseRequest, sink: ::grpcio::UnarySink<super::rudder::InstallReleaseResponse>);
    fn delete_release(&mut self, ctx: ::grpcio::RpcContext, req: super::rudder::DeleteReleaseRequest, sink: ::grpcio::UnarySink<super::rudder::DeleteReleaseResponse>);
    fn rollback_release(&mut self, ctx: ::grpcio::RpcContext, req: super::rudder::RollbackReleaseRequest, sink: ::grpcio::UnarySink<super::rudder::RollbackReleaseResponse>);
    fn upgrade_release(&mut self, ctx: ::grpcio::RpcContext, req: super::rudder::UpgradeReleaseRequest, sink: ::grpcio::UnarySink<super::rudder::UpgradeReleaseResponse>);
    fn release_status(&mut self, ctx: ::grpcio::RpcContext, req: super::rudder::ReleaseStatusRequest, sink: ::grpcio::UnarySink<super::rudder::ReleaseStatusResponse>);
}

pub fn create_release_module_service<S: ReleaseModuleService + Send + Clone + 'static>(s: S) -> ::grpcio::Service {
    let mut builder = ::grpcio::ServiceBuilder::new();
    let mut instance = s.clone();
    builder = builder.add_unary_handler(&METHOD_RELEASE_MODULE_SERVICE_VERSION, move |ctx, req, resp| {
        instance.version(ctx, req, resp)
    });
    let mut instance = s.clone();
    builder = builder.add_unary_handler(&METHOD_RELEASE_MODULE_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_MODULE_SERVICE_DELETE_RELEASE, move |ctx, req, resp| {
        instance.delete_release(ctx, req, resp)
    });
    let mut instance = s.clone();
    builder = builder.add_unary_handler(&METHOD_RELEASE_MODULE_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_MODULE_SERVICE_UPGRADE_RELEASE, move |ctx, req, resp| {
        instance.upgrade_release(ctx, req, resp)
    });
    let mut instance = s;
    builder = builder.add_unary_handler(&METHOD_RELEASE_MODULE_SERVICE_RELEASE_STATUS, move |ctx, req, resp| {
        instance.release_status(ctx, req, resp)
    });
    builder.build()
}