33 */ 
44package  com .oracle .bmc .audit ;
55
6- import  com .oracle .bmc .ClientConfiguration ;
7- import  com .oracle .bmc .auth .*;
8- import  com .oracle .bmc .http .ClientConfigurator ;
9- import  com .oracle .bmc .http .internal .*;
10- import  com .oracle .bmc .http .signing .*;
11- import  com .oracle .bmc .http .signing .internal .*;
12- import  com .oracle .bmc .responses .*;
13- import  com .oracle .bmc .util .internal .*;
14- 
15- import  com .google .common .base .Function ;
16- import  com .google .common .base .Optional ;
17- 
18- import  java .util .concurrent .Future ;
19- 
20- import  javax .ws .rs .client .*;
21- import  javax .ws .rs .core .*;
22- 
236import  com .oracle .bmc .audit .internal .http .*;
247import  com .oracle .bmc .audit .requests .*;
258import  com .oracle .bmc .audit .responses .*;
269
27- import  com .oracle .bmc .*;
28- 
29- import  lombok .AccessLevel ;
30- import  lombok .Getter ;
31- import  lombok .extern .slf4j .Slf4j ;
32- 
3310@ javax .annotation .Generated (value  = "OracleSDKGenerator" , comments  = "API Version: 20160918" )
34- @ Slf4j 
11+ @ lombok . extern . slf4j . Slf4j 
3512public  class  AuditAsyncClient  implements  AuditAsync  {
3613    /** 
3714     * Service instance for Audit. 
3815     */ 
39-     public  static  final  Service  SERVICE  = Services .create ("AUDIT" , "audit" );
16+     public  static  final  com .oracle .bmc .Service  SERVICE  =
17+             com .oracle .bmc .Services .create ("AUDIT" , "audit" );
4018
41-     @ Getter (value  = AccessLevel .PACKAGE )
42-     private  final  RestClient  client ;
19+     @ lombok . Getter (value  = lombok . AccessLevel .PACKAGE )
20+     private  final  com . oracle . bmc . http . internal . RestClient  client ;
4321
4422    /** 
4523     * Creates a new service instance using the given authentication provider. 
4624     * @param authenticationDetailsProvider The authentication details provider, required. 
4725     */ 
48-     public  AuditAsyncClient (BasicAuthenticationDetailsProvider  authenticationDetailsProvider ) {
26+     public  AuditAsyncClient (
27+             com .oracle .bmc .auth .BasicAuthenticationDetailsProvider  authenticationDetailsProvider ) {
4928        this (authenticationDetailsProvider , null );
5029    }
5130
@@ -55,8 +34,8 @@ public AuditAsyncClient(BasicAuthenticationDetailsProvider authenticationDetails
5534     * @param configuration The client configuration, optional. 
5635     */ 
5736    public  AuditAsyncClient (
58-             BasicAuthenticationDetailsProvider  authenticationDetailsProvider ,
59-             ClientConfiguration  configuration ) {
37+             com . oracle . bmc . auth . BasicAuthenticationDetailsProvider  authenticationDetailsProvider ,
38+             com . oracle . bmc . ClientConfiguration  configuration ) {
6039        this (authenticationDetailsProvider , configuration , null );
6140    }
6241
@@ -68,14 +47,15 @@ public AuditAsyncClient(
6847     * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. 
6948     */ 
7049    public  AuditAsyncClient (
71-             BasicAuthenticationDetailsProvider  authenticationDetailsProvider ,
72-             ClientConfiguration  configuration ,
73-             ClientConfigurator  clientConfigurator ) {
50+             com . oracle . bmc . auth . BasicAuthenticationDetailsProvider  authenticationDetailsProvider ,
51+             com . oracle . bmc . ClientConfiguration  configuration ,
52+             com . oracle . bmc . http . ClientConfigurator  clientConfigurator ) {
7453        this (
7554                authenticationDetailsProvider ,
7655                configuration ,
7756                clientConfigurator ,
78-                 new  DefaultRequestSignerFactory (SigningStrategy .STANDARD ));
57+                 new  com .oracle .bmc .http .signing .internal .DefaultRequestSignerFactory (
58+                         com .oracle .bmc .http .signing .SigningStrategy .STANDARD ));
7959    }
8060
8161    /** 
@@ -89,13 +69,15 @@ public AuditAsyncClient(
8969     * @param requestSignerFactory The request signer factory used to create the request signer for this service. 
9070     */ 
9171    public  AuditAsyncClient (
92-             AbstractAuthenticationDetailsProvider  authenticationDetailsProvider ,
93-             ClientConfiguration  configuration ,
94-             ClientConfigurator  clientConfigurator ,
95-             RequestSignerFactory  requestSignerFactory ) {
96-         RestClientFactory  restClientFactory  =
97-                 RestClientFactoryBuilder .builder ().clientConfigurator (clientConfigurator ).build ();
98-         RequestSigner  requestSigner  =
72+             com .oracle .bmc .auth .AbstractAuthenticationDetailsProvider  authenticationDetailsProvider ,
73+             com .oracle .bmc .ClientConfiguration  configuration ,
74+             com .oracle .bmc .http .ClientConfigurator  clientConfigurator ,
75+             com .oracle .bmc .http .signing .RequestSignerFactory  requestSignerFactory ) {
76+         com .oracle .bmc .http .internal .RestClientFactory  restClientFactory  =
77+                 com .oracle .bmc .http .internal .RestClientFactoryBuilder .builder ()
78+                         .clientConfigurator (clientConfigurator )
79+                         .build ();
80+         com .oracle .bmc .http .signing .RequestSigner  requestSigner  =
9981                requestSignerFactory .createRequestSigner (SERVICE , authenticationDetailsProvider );
10082        this .client  = restClientFactory .create (requestSigner , configuration );
10183    }
@@ -107,8 +89,8 @@ public void setEndpoint(String endpoint) {
10789    }
10890
10991    @ Override 
110-     public  void  setRegion (Region  region ) {
111-         Optional <String > endpoint  = region .getEndpoint (SERVICE );
92+     public  void  setRegion (com . oracle . bmc . Region  region ) {
93+         com . google . common . base . Optional <String > endpoint  = region .getEndpoint (SERVICE );
11294        if  (endpoint .isPresent ()) {
11395            setEndpoint (endpoint .get ());
11496        } else  {
@@ -121,11 +103,11 @@ public void setRegion(Region region) {
121103    public  void  setRegion (String  regionId ) {
122104        regionId  = regionId .toLowerCase ();
123105        try  {
124-             Region  region  = Region .fromRegionId (regionId );
106+             com . oracle . bmc . Region  region  = com . oracle . bmc . Region .fromRegionId (regionId );
125107            setRegion (region );
126108        } catch  (IllegalArgumentException  e ) {
127109            LOG .info ("Unknown regionId '{}', falling back to default endpoint format" , regionId );
128-             String  endpoint  = Region .formatDefaultRegionEndpoint (SERVICE , regionId );
110+             String  endpoint  = com . oracle . bmc . Region .formatDefaultRegionEndpoint (SERVICE , regionId );
129111            setEndpoint (endpoint );
130112        }
131113    }
@@ -136,18 +118,22 @@ public void close() {
136118    }
137119
138120    @ Override 
139-     public  Future <ListEventsResponse > listEvents (
121+     public  java . util . concurrent . Future <ListEventsResponse > listEvents (
140122            ListEventsRequest  request ,
141-             AsyncHandler <ListEventsRequest , ListEventsResponse > handler ) {
123+             com . oracle . bmc . responses . AsyncHandler <ListEventsRequest , ListEventsResponse > handler ) {
142124        LOG .trace ("Called async listEvents" );
143125        request  = ListEventsConverter .interceptRequest (request );
144-         Invocation .Builder  ib  = ListEventsConverter .fromRequest (client , request );
145-         Function <Response , ListEventsResponse > transformer  = ListEventsConverter .fromResponse ();
146- 
147-         Consumer <Response > onSuccess  = new  SuccessConsumer <>(handler , transformer , request );
148-         Consumer <Throwable > onError  = new  ErrorConsumer <>(handler , request );
149- 
150-         Future <Response > responseFuture  = client .get (ib , request , onSuccess , onError );
151-         return  new  TransformingFuture <>(responseFuture , transformer );
126+         javax .ws .rs .client .Invocation .Builder  ib  = ListEventsConverter .fromRequest (client , request );
127+         com .google .common .base .Function <javax .ws .rs .core .Response , ListEventsResponse > transformer  =
128+                 ListEventsConverter .fromResponse ();
129+ 
130+         com .oracle .bmc .util .internal .Consumer <javax .ws .rs .core .Response > onSuccess  =
131+                 new  com .oracle .bmc .http .internal .SuccessConsumer <>(handler , transformer , request );
132+         com .oracle .bmc .util .internal .Consumer <Throwable > onError  =
133+                 new  com .oracle .bmc .http .internal .ErrorConsumer <>(handler , request );
134+ 
135+         java .util .concurrent .Future <javax .ws .rs .core .Response > responseFuture  =
136+                 client .get (ib , request , onSuccess , onError );
137+         return  new  com .oracle .bmc .util .internal .TransformingFuture <>(responseFuture , transformer );
152138    }
153139}
0 commit comments