1#[derive(serde::Serialize, serde::Deserialize)]
4#[serde(rename_all = "snake_case")]
5#[derive(Clone, PartialEq, ::prost::Message)]
6pub struct IpAccess {
7 #[prost(string, tag = "1")]
9 pub name: ::prost::alloc::string::String,
10 #[prost(string, tag = "2")]
12 pub ip_range: ::prost::alloc::string::String,
13 #[prost(bool, tag = "3")]
15 pub enabled: bool,
16}
17#[derive(serde::Serialize, serde::Deserialize)]
19#[serde(rename_all = "snake_case")]
20#[derive(Clone, PartialEq, ::prost::Message)]
21pub struct CompanyIpAccessSettings {
22 #[prost(string, tag = "1")]
25 pub id: ::prost::alloc::string::String,
26 #[prost(map = "string, message", tag = "2")]
28 pub ip_access: ::std::collections::HashMap<::prost::alloc::string::String, IpAccess>,
29 #[prost(enumeration = "CoralogixCustomerSupportAccess", tag = "3")]
31 pub enable_coralogix_customer_support_access: i32,
32}
33#[derive(serde::Serialize, serde::Deserialize)]
36#[serde(rename_all = "snake_case")]
37#[derive(Clone, PartialEq, ::prost::Message)]
38pub struct CreateCompanyIpAccessSettingsRequest {
39 #[prost(message, repeated, tag = "1")]
40 pub ip_access: ::prost::alloc::vec::Vec<IpAccess>,
41 #[prost(enumeration = "CoralogixCustomerSupportAccess", tag = "2")]
44 pub enable_coralogix_customer_support_access: i32,
45}
46#[derive(serde::Serialize, serde::Deserialize)]
49#[serde(rename_all = "snake_case")]
50#[derive(Clone, PartialEq, ::prost::Message)]
51pub struct CreateCompanyIpAccessSettingsResponse {
52 #[prost(message, optional, tag = "1")]
54 pub settings: ::core::option::Option<CompanyIpAccessSettings>,
55}
56#[derive(serde::Serialize, serde::Deserialize)]
59#[serde(rename_all = "snake_case")]
60#[derive(Clone, PartialEq, ::prost::Message)]
61pub struct ReplaceCompanyIpAccessSettingsRequest {
62 #[prost(string, optional, tag = "1")]
63 pub id: ::core::option::Option<::prost::alloc::string::String>,
64 #[prost(message, repeated, tag = "2")]
65 pub ip_access: ::prost::alloc::vec::Vec<IpAccess>,
66 #[prost(enumeration = "CoralogixCustomerSupportAccess", tag = "3")]
69 pub enable_coralogix_customer_support_access: i32,
70}
71#[derive(serde::Serialize, serde::Deserialize)]
74#[serde(rename_all = "snake_case")]
75#[derive(Clone, PartialEq, ::prost::Message)]
76pub struct ReplaceCompanyIpAccessSettingsResponse {
77 #[prost(message, optional, tag = "1")]
79 pub settings: ::core::option::Option<CompanyIpAccessSettings>,
80}
81#[derive(serde::Serialize, serde::Deserialize)]
84#[serde(rename_all = "snake_case")]
85#[derive(Clone, PartialEq, ::prost::Message)]
86pub struct GetCompanyIpAccessSettingsRequest {
87 #[prost(string, optional, tag = "1")]
90 pub id: ::core::option::Option<::prost::alloc::string::String>,
91}
92#[derive(serde::Serialize, serde::Deserialize)]
95#[serde(rename_all = "snake_case")]
96#[derive(Clone, PartialEq, ::prost::Message)]
97pub struct GetCompanyIpAccessSettingsResponse {
98 #[prost(message, optional, tag = "1")]
100 pub settings: ::core::option::Option<CompanyIpAccessSettings>,
101}
102#[derive(serde::Serialize, serde::Deserialize)]
105#[serde(rename_all = "snake_case")]
106#[derive(Clone, PartialEq, ::prost::Message)]
107pub struct DeleteCompanyIpAccessSettingsRequest {
108 #[prost(string, optional, tag = "1")]
109 pub id: ::core::option::Option<::prost::alloc::string::String>,
110}
111#[derive(serde::Serialize, serde::Deserialize)]
114#[serde(rename_all = "snake_case")]
115#[derive(Clone, Copy, PartialEq, ::prost::Message)]
116pub struct DeleteCompanyIpAccessSettingsResponse {}
117#[derive(serde::Serialize, serde::Deserialize)]
120#[serde(rename_all = "snake_case")]
121#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
122#[repr(i32)]
123pub enum CoralogixCustomerSupportAccess {
124 Unspecified = 0,
126 Disabled = 1,
128 Enabled = 2,
130}
131impl CoralogixCustomerSupportAccess {
132 pub fn as_str_name(&self) -> &'static str {
137 match self {
138 Self::Unspecified => "CORALOGIX_CUSTOMER_SUPPORT_ACCESS_UNSPECIFIED",
139 Self::Disabled => "CORALOGIX_CUSTOMER_SUPPORT_ACCESS_DISABLED",
140 Self::Enabled => "CORALOGIX_CUSTOMER_SUPPORT_ACCESS_ENABLED",
141 }
142 }
143 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
145 match value {
146 "CORALOGIX_CUSTOMER_SUPPORT_ACCESS_UNSPECIFIED" => Some(Self::Unspecified),
147 "CORALOGIX_CUSTOMER_SUPPORT_ACCESS_DISABLED" => Some(Self::Disabled),
148 "CORALOGIX_CUSTOMER_SUPPORT_ACCESS_ENABLED" => Some(Self::Enabled),
149 _ => None,
150 }
151 }
152}
153pub mod ip_access_service_client {
155 #![allow(
156 unused_variables,
157 dead_code,
158 missing_docs,
159 clippy::wildcard_imports,
160 clippy::let_unit_value,
161 )]
162 use tonic::codegen::*;
163 use tonic::codegen::http::Uri;
164 #[derive(Debug, Clone)]
166 pub struct IpAccessServiceClient<T> {
167 inner: tonic::client::Grpc<T>,
168 }
169 impl IpAccessServiceClient<tonic::transport::Channel> {
170 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
172 where
173 D: TryInto<tonic::transport::Endpoint>,
174 D::Error: Into<StdError>,
175 {
176 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
177 Ok(Self::new(conn))
178 }
179 }
180 impl<T> IpAccessServiceClient<T>
181 where
182 T: tonic::client::GrpcService<tonic::body::BoxBody>,
183 T::Error: Into<StdError>,
184 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
185 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
186 {
187 pub fn new(inner: T) -> Self {
188 let inner = tonic::client::Grpc::new(inner);
189 Self { inner }
190 }
191 pub fn with_origin(inner: T, origin: Uri) -> Self {
192 let inner = tonic::client::Grpc::with_origin(inner, origin);
193 Self { inner }
194 }
195 pub fn with_interceptor<F>(
196 inner: T,
197 interceptor: F,
198 ) -> IpAccessServiceClient<InterceptedService<T, F>>
199 where
200 F: tonic::service::Interceptor,
201 T::ResponseBody: Default,
202 T: tonic::codegen::Service<
203 http::Request<tonic::body::BoxBody>,
204 Response = http::Response<
205 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
206 >,
207 >,
208 <T as tonic::codegen::Service<
209 http::Request<tonic::body::BoxBody>,
210 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
211 {
212 IpAccessServiceClient::new(InterceptedService::new(inner, interceptor))
213 }
214 #[must_use]
219 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
220 self.inner = self.inner.send_compressed(encoding);
221 self
222 }
223 #[must_use]
225 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
226 self.inner = self.inner.accept_compressed(encoding);
227 self
228 }
229 #[must_use]
233 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
234 self.inner = self.inner.max_decoding_message_size(limit);
235 self
236 }
237 #[must_use]
241 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
242 self.inner = self.inner.max_encoding_message_size(limit);
243 self
244 }
245 pub async fn create_company_ip_access_settings(
247 &mut self,
248 request: impl tonic::IntoRequest<super::CreateCompanyIpAccessSettingsRequest>,
249 ) -> std::result::Result<
250 tonic::Response<super::CreateCompanyIpAccessSettingsResponse>,
251 tonic::Status,
252 > {
253 self.inner
254 .ready()
255 .await
256 .map_err(|e| {
257 tonic::Status::unknown(
258 format!("Service was not ready: {}", e.into()),
259 )
260 })?;
261 let codec = tonic::codec::ProstCodec::default();
262 let path = http::uri::PathAndQuery::from_static(
263 "/com.coralogixapis.aaa.v1.IpAccessService/CreateCompanyIpAccessSettings",
264 );
265 let mut req = request.into_request();
266 req.extensions_mut()
267 .insert(
268 GrpcMethod::new(
269 "com.coralogixapis.aaa.v1.IpAccessService",
270 "CreateCompanyIpAccessSettings",
271 ),
272 );
273 self.inner.unary(req, path, codec).await
274 }
275 pub async fn replace_company_ip_access_settings(
277 &mut self,
278 request: impl tonic::IntoRequest<
279 super::ReplaceCompanyIpAccessSettingsRequest,
280 >,
281 ) -> std::result::Result<
282 tonic::Response<super::ReplaceCompanyIpAccessSettingsResponse>,
283 tonic::Status,
284 > {
285 self.inner
286 .ready()
287 .await
288 .map_err(|e| {
289 tonic::Status::unknown(
290 format!("Service was not ready: {}", e.into()),
291 )
292 })?;
293 let codec = tonic::codec::ProstCodec::default();
294 let path = http::uri::PathAndQuery::from_static(
295 "/com.coralogixapis.aaa.v1.IpAccessService/ReplaceCompanyIpAccessSettings",
296 );
297 let mut req = request.into_request();
298 req.extensions_mut()
299 .insert(
300 GrpcMethod::new(
301 "com.coralogixapis.aaa.v1.IpAccessService",
302 "ReplaceCompanyIpAccessSettings",
303 ),
304 );
305 self.inner.unary(req, path, codec).await
306 }
307 pub async fn get_company_ip_access_settings(
309 &mut self,
310 request: impl tonic::IntoRequest<super::GetCompanyIpAccessSettingsRequest>,
311 ) -> std::result::Result<
312 tonic::Response<super::GetCompanyIpAccessSettingsResponse>,
313 tonic::Status,
314 > {
315 self.inner
316 .ready()
317 .await
318 .map_err(|e| {
319 tonic::Status::unknown(
320 format!("Service was not ready: {}", e.into()),
321 )
322 })?;
323 let codec = tonic::codec::ProstCodec::default();
324 let path = http::uri::PathAndQuery::from_static(
325 "/com.coralogixapis.aaa.v1.IpAccessService/GetCompanyIpAccessSettings",
326 );
327 let mut req = request.into_request();
328 req.extensions_mut()
329 .insert(
330 GrpcMethod::new(
331 "com.coralogixapis.aaa.v1.IpAccessService",
332 "GetCompanyIpAccessSettings",
333 ),
334 );
335 self.inner.unary(req, path, codec).await
336 }
337 pub async fn delete_company_ip_access_settings(
339 &mut self,
340 request: impl tonic::IntoRequest<super::DeleteCompanyIpAccessSettingsRequest>,
341 ) -> std::result::Result<
342 tonic::Response<super::DeleteCompanyIpAccessSettingsResponse>,
343 tonic::Status,
344 > {
345 self.inner
346 .ready()
347 .await
348 .map_err(|e| {
349 tonic::Status::unknown(
350 format!("Service was not ready: {}", e.into()),
351 )
352 })?;
353 let codec = tonic::codec::ProstCodec::default();
354 let path = http::uri::PathAndQuery::from_static(
355 "/com.coralogixapis.aaa.v1.IpAccessService/DeleteCompanyIpAccessSettings",
356 );
357 let mut req = request.into_request();
358 req.extensions_mut()
359 .insert(
360 GrpcMethod::new(
361 "com.coralogixapis.aaa.v1.IpAccessService",
362 "DeleteCompanyIpAccessSettings",
363 ),
364 );
365 self.inner.unary(req, path, codec).await
366 }
367 }
368}