1#[derive(Clone, PartialEq, ::prost::Message)]
3pub struct Form {
4    #[prost(string, tag="1")]
6    pub action_uri: std::string::String,
7    #[prost(string, repeated, tag="2")]
9    pub fields: ::std::vec::Vec<std::string::String>,
10}
11#[derive(Clone, PartialEq, ::prost::Message)]
13pub struct OutdatedLibrary {
14    #[prost(string, tag="1")]
16    pub library_name: std::string::String,
17    #[prost(string, tag="2")]
19    pub version: std::string::String,
20    #[prost(string, repeated, tag="3")]
22    pub learn_more_urls: ::std::vec::Vec<std::string::String>,
23}
24#[derive(Clone, PartialEq, ::prost::Message)]
27pub struct ViolatingResource {
28    #[prost(string, tag="1")]
30    pub content_type: std::string::String,
31    #[prost(string, tag="2")]
33    pub resource_url: std::string::String,
34}
35#[derive(Clone, PartialEq, ::prost::Message)]
37pub struct VulnerableParameters {
38    #[prost(string, repeated, tag="1")]
40    pub parameter_names: ::std::vec::Vec<std::string::String>,
41}
42#[derive(Clone, PartialEq, ::prost::Message)]
44pub struct VulnerableHeaders {
45    #[prost(message, repeated, tag="1")]
47    pub headers: ::std::vec::Vec<vulnerable_headers::Header>,
48    #[prost(message, repeated, tag="2")]
50    pub missing_headers: ::std::vec::Vec<vulnerable_headers::Header>,
51}
52pub mod vulnerable_headers {
53    #[derive(Clone, PartialEq, ::prost::Message)]
55    pub struct Header {
56        #[prost(string, tag="1")]
58        pub name: std::string::String,
59        #[prost(string, tag="2")]
61        pub value: std::string::String,
62    }
63}
64#[derive(Clone, PartialEq, ::prost::Message)]
66pub struct Xss {
67    #[prost(string, repeated, tag="1")]
69    pub stack_traces: ::std::vec::Vec<std::string::String>,
70    #[prost(string, tag="2")]
72    pub error_message: std::string::String,
73}
74#[derive(Clone, PartialEq, ::prost::Message)]
77pub struct Finding {
78    #[prost(string, tag="1")]
82    pub name: std::string::String,
83    #[prost(string, tag="2")]
87    pub finding_type: std::string::String,
88    #[prost(string, tag="3")]
91    pub http_method: std::string::String,
92    #[prost(string, tag="4")]
95    pub fuzzed_url: std::string::String,
96    #[prost(string, tag="5")]
98    pub body: std::string::String,
99    #[prost(string, tag="6")]
101    pub description: std::string::String,
102    #[prost(string, tag="7")]
105    pub reproduction_url: std::string::String,
106    #[prost(string, tag="8")]
109    pub frame_url: std::string::String,
110    #[prost(string, tag="9")]
112    pub final_url: std::string::String,
113    #[prost(string, tag="10")]
116    pub tracking_id: std::string::String,
117    #[prost(message, optional, tag="16")]
120    pub form: ::std::option::Option<Form>,
121    #[prost(message, optional, tag="11")]
123    pub outdated_library: ::std::option::Option<OutdatedLibrary>,
124    #[prost(message, optional, tag="12")]
127    pub violating_resource: ::std::option::Option<ViolatingResource>,
128    #[prost(message, optional, tag="15")]
130    pub vulnerable_headers: ::std::option::Option<VulnerableHeaders>,
131    #[prost(message, optional, tag="13")]
134    pub vulnerable_parameters: ::std::option::Option<VulnerableParameters>,
135    #[prost(message, optional, tag="14")]
137    pub xss: ::std::option::Option<Xss>,
138}
139#[derive(Clone, PartialEq, ::prost::Message)]
142pub struct FindingTypeStats {
143    #[prost(string, tag="1")]
145    pub finding_type: std::string::String,
146    #[prost(int32, tag="2")]
148    pub finding_count: i32,
149}
150#[derive(Clone, PartialEq, ::prost::Message)]
155pub struct ScanConfigError {
156    #[prost(enumeration="scan_config_error::Code", tag="1")]
158    pub code: i32,
159    #[prost(string, tag="2")]
164    pub field_name: std::string::String,
165}
166pub mod scan_config_error {
167    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
171    #[repr(i32)]
172    pub enum Code {
173        Unspecified = 0,
175        InternalError = 1,
178        AppengineApiBackendError = 2,
181        AppengineApiNotAccessible = 3,
184        AppengineDefaultHostMissing = 4,
187        CannotUseGoogleComAccount = 6,
189        CannotUseOwnerAccount = 7,
191        ComputeApiBackendError = 8,
194        ComputeApiNotAccessible = 9,
197        CustomLoginUrlDoesNotBelongToCurrentProject = 10,
199        CustomLoginUrlMalformed = 11,
201        CustomLoginUrlMappedToNonRoutableAddress = 12,
203        CustomLoginUrlMappedToUnreservedAddress = 13,
206        CustomLoginUrlHasNonRoutableIpAddress = 14,
208        CustomLoginUrlHasUnreservedIpAddress = 15,
211        DuplicateScanName = 16,
213        InvalidFieldValue = 18,
215        FailedToAuthenticateToTarget = 19,
217        FindingTypeUnspecified = 20,
219        ForbiddenToScanCompute = 21,
222        ForbiddenUpdateToManagedScan = 43,
224        MalformedFilter = 22,
228        MalformedResourceName = 23,
230        ProjectInactive = 24,
232        RequiredField = 25,
234        ResourceNameInconsistent = 26,
237        ScanAlreadyRunning = 27,
239        ScanNotRunning = 28,
241        SeedUrlDoesNotBelongToCurrentProject = 29,
243        SeedUrlMalformed = 30,
245        SeedUrlMappedToNonRoutableAddress = 31,
247        SeedUrlMappedToUnreservedAddress = 32,
250        SeedUrlHasNonRoutableIpAddress = 33,
252        SeedUrlHasUnreservedIpAddress = 35,
255        ServiceAccountNotConfigured = 36,
258        TooManyScans = 37,
260        UnableToResolveProjectInfo = 38,
262        UnsupportedBlacklistPatternFormat = 39,
264        UnsupportedFilter = 40,
266        UnsupportedFindingType = 41,
269        UnsupportedUrlScheme = 42,
271    }
272}
273#[derive(Clone, PartialEq, ::prost::Message)]
276pub struct ScanRunErrorTrace {
277    #[prost(enumeration="scan_run_error_trace::Code", tag="1")]
279    pub code: i32,
280    #[prost(message, optional, tag="2")]
284    pub scan_config_error: ::std::option::Option<ScanConfigError>,
285    #[prost(int32, tag="3")]
289    pub most_common_http_error_code: i32,
290}
291pub mod scan_run_error_trace {
292    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
296    #[repr(i32)]
297    pub enum Code {
298        Unspecified = 0,
300        InternalError = 1,
302        ScanConfigIssue = 2,
305        AuthenticationConfigIssue = 3,
308        TimedOutWhileScanning = 4,
310        TooManyRedirects = 5,
313        TooManyHttpErrors = 6,
317    }
318}
319#[derive(Clone, PartialEq, ::prost::Message)]
323pub struct ScanRunWarningTrace {
324    #[prost(enumeration="scan_run_warning_trace::Code", tag="1")]
326    pub code: i32,
327}
328pub mod scan_run_warning_trace {
329    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
333    #[repr(i32)]
334    pub enum Code {
335        Unspecified = 0,
337        InsufficientCrawlResults = 1,
341        TooManyCrawlResults = 2,
344        TooManyFuzzTasks = 3,
348        BlockedByIap = 4,
350    }
351}
352#[derive(Clone, PartialEq, ::prost::Message)]
355pub struct ScanRun {
356    #[prost(string, tag="1")]
360    pub name: std::string::String,
361    #[prost(enumeration="scan_run::ExecutionState", tag="2")]
363    pub execution_state: i32,
364    #[prost(enumeration="scan_run::ResultState", tag="3")]
367    pub result_state: i32,
368    #[prost(message, optional, tag="4")]
370    pub start_time: ::std::option::Option<::prost_types::Timestamp>,
371    #[prost(message, optional, tag="5")]
374    pub end_time: ::std::option::Option<::prost_types::Timestamp>,
375    #[prost(int64, tag="6")]
378    pub urls_crawled_count: i64,
379    #[prost(int64, tag="7")]
384    pub urls_tested_count: i64,
385    #[prost(bool, tag="8")]
387    pub has_vulnerabilities: bool,
388    #[prost(int32, tag="9")]
393    pub progress_percent: i32,
394    #[prost(message, optional, tag="10")]
397    pub error_trace: ::std::option::Option<ScanRunErrorTrace>,
398    #[prost(message, repeated, tag="11")]
400    pub warning_traces: ::std::vec::Vec<ScanRunWarningTrace>,
401}
402pub mod scan_run {
403    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
405    #[repr(i32)]
406    pub enum ExecutionState {
407        Unspecified = 0,
410        Queued = 1,
412        Scanning = 2,
414        Finished = 3,
416    }
417    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
419    #[repr(i32)]
420    pub enum ResultState {
421        Unspecified = 0,
424        Success = 1,
426        Error = 2,
428        Killed = 3,
430    }
431}
432#[derive(Clone, PartialEq, ::prost::Message)]
434pub struct ScanConfig {
435    #[prost(string, tag="1")]
439    pub name: std::string::String,
440    #[prost(string, tag="2")]
442    pub display_name: std::string::String,
443    #[prost(int32, tag="3")]
448    pub max_qps: i32,
449    #[prost(string, repeated, tag="4")]
451    pub starting_urls: ::std::vec::Vec<std::string::String>,
452    #[prost(message, optional, tag="5")]
455    pub authentication: ::std::option::Option<scan_config::Authentication>,
456    #[prost(enumeration="scan_config::UserAgent", tag="6")]
458    pub user_agent: i32,
459    #[prost(string, repeated, tag="7")]
462    pub blacklist_patterns: ::std::vec::Vec<std::string::String>,
463    #[prost(message, optional, tag="8")]
465    pub schedule: ::std::option::Option<scan_config::Schedule>,
466    #[prost(enumeration="scan_config::TargetPlatform", repeated, tag="9")]
469    pub target_platforms: ::std::vec::Vec<i32>,
470    #[prost(enumeration="scan_config::ExportToSecurityCommandCenter", tag="10")]
473    pub export_to_security_command_center: i32,
474    #[prost(message, optional, tag="11")]
476    pub latest_run: ::std::option::Option<ScanRun>,
477    #[prost(enumeration="scan_config::RiskLevel", tag="12")]
479    pub risk_level: i32,
480}
481pub mod scan_config {
482    #[derive(Clone, PartialEq, ::prost::Message)]
484    pub struct Authentication {
485        #[prost(oneof="authentication::Authentication", tags="1, 2")]
488        pub authentication: ::std::option::Option<authentication::Authentication>,
489    }
490    pub mod authentication {
491        #[derive(Clone, PartialEq, ::prost::Message)]
493        pub struct GoogleAccount {
494            #[prost(string, tag="1")]
496            pub username: std::string::String,
497            #[prost(string, tag="2")]
500            pub password: std::string::String,
501        }
502        #[derive(Clone, PartialEq, ::prost::Message)]
504        pub struct CustomAccount {
505            #[prost(string, tag="1")]
507            pub username: std::string::String,
508            #[prost(string, tag="2")]
511            pub password: std::string::String,
512            #[prost(string, tag="3")]
514            pub login_url: std::string::String,
515        }
516        #[derive(Clone, PartialEq, ::prost::Oneof)]
519        pub enum Authentication {
520            #[prost(message, tag="1")]
522            GoogleAccount(GoogleAccount),
523            #[prost(message, tag="2")]
525            CustomAccount(CustomAccount),
526        }
527    }
528    #[derive(Clone, PartialEq, ::prost::Message)]
530    pub struct Schedule {
531        #[prost(message, optional, tag="1")]
536        pub schedule_time: ::std::option::Option<::prost_types::Timestamp>,
537        #[prost(int32, tag="2")]
539        pub interval_duration_days: i32,
540    }
541    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
543    #[repr(i32)]
544    pub enum UserAgent {
545        Unspecified = 0,
547        ChromeLinux = 1,
549        ChromeAndroid = 2,
551        SafariIphone = 3,
553    }
554    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
556    #[repr(i32)]
557    pub enum TargetPlatform {
558        Unspecified = 0,
561        AppEngine = 1,
563        Compute = 2,
565    }
566    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
570    #[repr(i32)]
571    pub enum RiskLevel {
572        Unspecified = 0,
574        Normal = 1,
576        Low = 2,
578    }
579    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
582    #[repr(i32)]
583    pub enum ExportToSecurityCommandCenter {
584        Unspecified = 0,
586        Enabled = 1,
588        Disabled = 2,
590    }
591}
592#[derive(Clone, PartialEq, ::prost::Message)]
596pub struct CrawledUrl {
597    #[prost(string, tag="1")]
600    pub http_method: std::string::String,
601    #[prost(string, tag="2")]
603    pub url: std::string::String,
604    #[prost(string, tag="3")]
606    pub body: std::string::String,
607}
608#[derive(Clone, PartialEq, ::prost::Message)]
610pub struct CreateScanConfigRequest {
611    #[prost(string, tag="1")]
614    pub parent: std::string::String,
615    #[prost(message, optional, tag="2")]
617    pub scan_config: ::std::option::Option<ScanConfig>,
618}
619#[derive(Clone, PartialEq, ::prost::Message)]
621pub struct DeleteScanConfigRequest {
622    #[prost(string, tag="1")]
625    pub name: std::string::String,
626}
627#[derive(Clone, PartialEq, ::prost::Message)]
629pub struct GetScanConfigRequest {
630    #[prost(string, tag="1")]
633    pub name: std::string::String,
634}
635#[derive(Clone, PartialEq, ::prost::Message)]
637pub struct ListScanConfigsRequest {
638    #[prost(string, tag="1")]
641    pub parent: std::string::String,
642    #[prost(string, tag="2")]
646    pub page_token: std::string::String,
647    #[prost(int32, tag="3")]
651    pub page_size: i32,
652}
653#[derive(Clone, PartialEq, ::prost::Message)]
655pub struct UpdateScanConfigRequest {
656    #[prost(message, optional, tag="2")]
660    pub scan_config: ::std::option::Option<ScanConfig>,
661    #[prost(message, optional, tag="3")]
665    pub update_mask: ::std::option::Option<::prost_types::FieldMask>,
666}
667#[derive(Clone, PartialEq, ::prost::Message)]
669pub struct ListScanConfigsResponse {
670    #[prost(message, repeated, tag="1")]
672    pub scan_configs: ::std::vec::Vec<ScanConfig>,
673    #[prost(string, tag="2")]
676    pub next_page_token: std::string::String,
677}
678#[derive(Clone, PartialEq, ::prost::Message)]
680pub struct StartScanRunRequest {
681    #[prost(string, tag="1")]
684    pub name: std::string::String,
685}
686#[derive(Clone, PartialEq, ::prost::Message)]
688pub struct GetScanRunRequest {
689    #[prost(string, tag="1")]
693    pub name: std::string::String,
694}
695#[derive(Clone, PartialEq, ::prost::Message)]
697pub struct ListScanRunsRequest {
698    #[prost(string, tag="1")]
701    pub parent: std::string::String,
702    #[prost(string, tag="2")]
706    pub page_token: std::string::String,
707    #[prost(int32, tag="3")]
711    pub page_size: i32,
712}
713#[derive(Clone, PartialEq, ::prost::Message)]
715pub struct ListScanRunsResponse {
716    #[prost(message, repeated, tag="1")]
718    pub scan_runs: ::std::vec::Vec<ScanRun>,
719    #[prost(string, tag="2")]
722    pub next_page_token: std::string::String,
723}
724#[derive(Clone, PartialEq, ::prost::Message)]
726pub struct StopScanRunRequest {
727    #[prost(string, tag="1")]
731    pub name: std::string::String,
732}
733#[derive(Clone, PartialEq, ::prost::Message)]
735pub struct ListCrawledUrlsRequest {
736    #[prost(string, tag="1")]
740    pub parent: std::string::String,
741    #[prost(string, tag="2")]
745    pub page_token: std::string::String,
746    #[prost(int32, tag="3")]
750    pub page_size: i32,
751}
752#[derive(Clone, PartialEq, ::prost::Message)]
754pub struct ListCrawledUrlsResponse {
755    #[prost(message, repeated, tag="1")]
757    pub crawled_urls: ::std::vec::Vec<CrawledUrl>,
758    #[prost(string, tag="2")]
761    pub next_page_token: std::string::String,
762}
763#[derive(Clone, PartialEq, ::prost::Message)]
765pub struct GetFindingRequest {
766    #[prost(string, tag="1")]
770    pub name: std::string::String,
771}
772#[derive(Clone, PartialEq, ::prost::Message)]
774pub struct ListFindingsRequest {
775    #[prost(string, tag="1")]
779    pub parent: std::string::String,
780    #[prost(string, tag="2")]
785    pub filter: std::string::String,
786    #[prost(string, tag="3")]
790    pub page_token: std::string::String,
791    #[prost(int32, tag="4")]
795    pub page_size: i32,
796}
797#[derive(Clone, PartialEq, ::prost::Message)]
799pub struct ListFindingsResponse {
800    #[prost(message, repeated, tag="1")]
802    pub findings: ::std::vec::Vec<Finding>,
803    #[prost(string, tag="2")]
806    pub next_page_token: std::string::String,
807}
808#[derive(Clone, PartialEq, ::prost::Message)]
810pub struct ListFindingTypeStatsRequest {
811    #[prost(string, tag="1")]
815    pub parent: std::string::String,
816}
817#[derive(Clone, PartialEq, ::prost::Message)]
819pub struct ListFindingTypeStatsResponse {
820    #[prost(message, repeated, tag="1")]
822    pub finding_type_stats: ::std::vec::Vec<FindingTypeStats>,
823}
824# [ doc = r" Generated client implementations." ] pub mod web_security_scanner_client { # ! [ allow ( unused_variables , dead_code , missing_docs ) ] use tonic :: codegen :: * ; # [ doc = " Cloud Web Security Scanner Service identifies security vulnerabilities in web" ] # [ doc = " applications hosted on Google Cloud Platform. It crawls your application, and" ] # [ doc = " attempts to exercise as many user inputs and event handlers as possible." ] pub struct WebSecurityScannerClient < T > { inner : tonic :: client :: Grpc < T > , } impl < T > WebSecurityScannerClient < T > where T : tonic :: client :: GrpcService < tonic :: body :: BoxBody > , T :: ResponseBody : Body + HttpBody + Send + 'static , T :: Error : Into < StdError > , < T :: ResponseBody as HttpBody > :: Error : Into < StdError > + Send , { pub fn new ( inner : T ) -> Self { let inner = tonic :: client :: Grpc :: new ( inner ) ; Self { inner } } pub fn with_interceptor ( inner : T , interceptor : impl Into < tonic :: Interceptor > ) -> Self { let inner = tonic :: client :: Grpc :: with_interceptor ( inner , interceptor ) ; Self { inner } } # [ doc = " Creates a new ScanConfig." ] pub async fn create_scan_config ( & mut self , request : impl tonic :: IntoRequest < super :: CreateScanConfigRequest > , ) -> Result < tonic :: Response < super :: ScanConfig > , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/CreateScanConfig" ) ; self . inner . unary ( request . into_request ( ) , path , codec ) . await } # [ doc = " Deletes an existing ScanConfig and its child resources." ] pub async fn delete_scan_config ( & mut self , request : impl tonic :: IntoRequest < super :: DeleteScanConfigRequest > , ) -> Result < tonic :: Response < ( ) > , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/DeleteScanConfig" ) ; self . inner . unary ( request . into_request ( ) , path , codec ) . await } # [ doc = " Gets a ScanConfig." ] pub async fn get_scan_config ( & mut self , request : impl tonic :: IntoRequest < super :: GetScanConfigRequest > , ) -> Result < tonic :: Response < super :: ScanConfig > , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/GetScanConfig" ) ; self . inner . unary ( request . into_request ( ) , path , codec ) . await } # [ doc = " Lists ScanConfigs under a given project." ] pub async fn list_scan_configs ( & mut self , request : impl tonic :: IntoRequest < super :: ListScanConfigsRequest > , ) -> Result < tonic :: Response < super :: ListScanConfigsResponse > , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/ListScanConfigs" ) ; self . inner . unary ( request . into_request ( ) , path , codec ) . await } # [ doc = " Updates a ScanConfig. This method support partial update of a ScanConfig." ] pub async fn update_scan_config ( & mut self , request : impl tonic :: IntoRequest < super :: UpdateScanConfigRequest > , ) -> Result < tonic :: Response < super :: ScanConfig > , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/UpdateScanConfig" ) ; self . inner . unary ( request . into_request ( ) , path , codec ) . await } # [ doc = " Start a ScanRun according to the given ScanConfig." ] pub async fn start_scan_run ( & mut self , request : impl tonic :: IntoRequest < super :: StartScanRunRequest > , ) -> Result < tonic :: Response < super :: ScanRun > , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/StartScanRun" ) ; self . inner . unary ( request . into_request ( ) , path , codec ) . await } # [ doc = " Gets a ScanRun." ] pub async fn get_scan_run ( & mut self , request : impl tonic :: IntoRequest < super :: GetScanRunRequest > , ) -> Result < tonic :: Response < super :: ScanRun > , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/GetScanRun" ) ; self . inner . unary ( request . into_request ( ) , path , codec ) . await } # [ doc = " Lists ScanRuns under a given ScanConfig, in descending order of ScanRun" ] # [ doc = " stop time." ] pub async fn list_scan_runs ( & mut self , request : impl tonic :: IntoRequest < super :: ListScanRunsRequest > , ) -> Result < tonic :: Response < super :: ListScanRunsResponse > , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/ListScanRuns" ) ; self . inner . unary ( request . into_request ( ) , path , codec ) . await } # [ doc = " Stops a ScanRun. The stopped ScanRun is returned." ] pub async fn stop_scan_run ( & mut self , request : impl tonic :: IntoRequest < super :: StopScanRunRequest > , ) -> Result < tonic :: Response < super :: ScanRun > , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/StopScanRun" ) ; self . inner . unary ( request . into_request ( ) , path , codec ) . await } # [ doc = " List CrawledUrls under a given ScanRun." ] pub async fn list_crawled_urls ( & mut self , request : impl tonic :: IntoRequest < super :: ListCrawledUrlsRequest > , ) -> Result < tonic :: Response < super :: ListCrawledUrlsResponse > , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/ListCrawledUrls" ) ; self . inner . unary ( request . into_request ( ) , path , codec ) . await } # [ doc = " Gets a Finding." ] pub async fn get_finding ( & mut self , request : impl tonic :: IntoRequest < super :: GetFindingRequest > , ) -> Result < tonic :: Response < super :: Finding > , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/GetFinding" ) ; self . inner . unary ( request . into_request ( ) , path , codec ) . await } # [ doc = " List Findings under a given ScanRun." ] pub async fn list_findings ( & mut self , request : impl tonic :: IntoRequest < super :: ListFindingsRequest > , ) -> Result < tonic :: Response < super :: ListFindingsResponse > , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/ListFindings" ) ; self . inner . unary ( request . into_request ( ) , path , codec ) . await } # [ doc = " List all FindingTypeStats under a given ScanRun." ] pub async fn list_finding_type_stats ( & mut self , request : impl tonic :: IntoRequest < super :: ListFindingTypeStatsRequest > , ) -> Result < tonic :: Response < super :: ListFindingTypeStatsResponse > , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/google.cloud.websecurityscanner.v1beta.WebSecurityScanner/ListFindingTypeStats" ) ; self . inner . unary ( request . into_request ( ) , path , codec ) . await } } impl < T : Clone > Clone for WebSecurityScannerClient < T > { fn clone ( & self ) -> Self { Self { inner : self . inner . clone ( ) , } } } impl < T > std :: fmt :: Debug for WebSecurityScannerClient < T > { fn fmt ( & self , f : & mut std :: fmt :: Formatter < '_ > ) -> std :: fmt :: Result { write ! ( f , "WebSecurityScannerClient {{ ... }}" ) } } }use serde :: { Serialize , Deserialize } ;