use openlark_core::config::Config;
#[derive(Debug)]
pub struct SecurityAndComplianceProject {
config: Config,
v1: SecurityAndComplianceV1Service,
v2: SecurityAndComplianceV2Service,
}
impl Clone for SecurityAndComplianceProject {
fn clone(&self) -> Self {
Self::new(self.config.clone())
}
}
impl SecurityAndComplianceProject {
pub(crate) fn new(config: Config) -> Self {
Self {
v1: SecurityAndComplianceV1Service::new(config.clone()),
v2: SecurityAndComplianceV2Service::new(config.clone()),
config,
}
}
pub fn v1(&self) -> &SecurityAndComplianceV1Service {
&self.v1
}
pub fn v2(&self) -> &SecurityAndComplianceV2Service {
&self.v2
}
pub fn config(&self) -> &Config {
&self.config
}
}
#[derive(Debug)]
pub struct SecurityAndComplianceV1Service {
openapi_logs: crate::security::security_and_compliance::v1::openapi_logs::OpenApiLogsService,
}
impl SecurityAndComplianceV1Service {
pub fn new(config: Config) -> Self {
Self {
openapi_logs:
crate::security::security_and_compliance::v1::openapi_logs::OpenApiLogsService::new(
config,
),
}
}
pub fn openapi_logs(
&self,
) -> &crate::security::security_and_compliance::v1::openapi_logs::OpenApiLogsService {
&self.openapi_logs
}
}
#[derive(Debug)]
pub struct SecurityAndComplianceV2Service {
device_records: crate::security::security_and_compliance::v2::device_records::DeviceRecordsService,
device_apply_records:
crate::security::security_and_compliance::v2::device_apply_records::DeviceApplyRecordsService,
}
impl SecurityAndComplianceV2Service {
pub fn new(config: Config) -> Self {
Self {
device_records: crate::security::security_and_compliance::v2::device_records::DeviceRecordsService::new(config.clone()),
device_apply_records: crate::security::security_and_compliance::v2::device_apply_records::DeviceApplyRecordsService::new(config),
}
}
pub fn device_records(
&self,
) -> &crate::security::security_and_compliance::v2::device_records::DeviceRecordsService {
&self.device_records
}
pub fn device_apply_records(
&self,
) -> &crate::security::security_and_compliance::v2::device_apply_records::DeviceApplyRecordsService{
&self.device_apply_records
}
}
pub mod v1;
pub mod v2;