Package org.azd.abstractions.internals
Class ClientRequestBuilder
java.lang.Object
org.azd.abstractions.internals.ClientRequestBuilder
- All Implemented Interfaces:
ClientRequest.Builder
Client request builder implementation to build the request.
-
Constructor Summary
ConstructorsConstructorDescriptionDefault.ClientRequestBuilder(AccessTokenCredential accessTokenCredential) Default with access token credential. -
Method Summary
Modifier and TypeMethodDescriptionGet the access token credential object.apiVersion(String apiVersion) Pass the api version.Pass the Azure DevOps service area.baseInstance(String baseInstance) Pass the base url instance.build()Constructs and the client request object.DELETE()Represents the DELETE request and sets the RequestMethod for sending the request.GET()Represents the GET request and sets the RequestMethod for sending the request.HEAD()Represents the HEAD request and sets the RequestMethod for sending the request.header(CustomHeader customHeader) Set the request header.headers(RequestHeaders requestHeaders) Set the request headers.Pass the location id.OPTIONS()Represents the OPTIONS request and sets the RequestMethod for sending the request.Represents the PATCH request and sets the RequestMethod for sending the request.Represents the POST request and sets the RequestMethod for sending the request.Represents the PUT request and sets the RequestMethod for sending the request.Pass the query parametersSupply the values to set the query parameters.request()Get the request information.request(RequestInformation requestInfo) Set the complete request information.serviceEndpoint(String key, Object value) Pass the service endpoint to append the URL with.Pass the complete request url.Pass the complete request url.
-
Constructor Details
-
ClientRequestBuilder
public ClientRequestBuilder()Default. -
ClientRequestBuilder
Default with access token credential.- Parameters:
accessTokenCredential- AccessTokenCredentialAccessTokenCredential
-
-
Method Details
-
baseInstance
Pass the base url instance. (dev.azure.com/{organisation})- Specified by:
baseInstancein interfaceClientRequest.Builder- Parameters:
baseInstance- Base instance to set to construct the request url.- Returns:
- Client request builder object
ClientRequest.Builder
-
area
Pass the Azure DevOps service area.- Specified by:
areain interfaceClientRequest.Builder- Parameters:
area- Pass the value for area. E.g. core or build or git etc.- Returns:
- Client request builder object
ClientRequest.Builder
-
location
Pass the location id.- Specified by:
locationin interfaceClientRequest.Builder- Parameters:
locationId- Pass the location id for service specific area.- Returns:
- Client request builder object
ClientRequest.Builder
-
apiVersion
Pass the api version.- Specified by:
apiVersionin interfaceClientRequest.Builder- Parameters:
apiVersion- Api version to set.- Returns:
- Client request builder object
ClientRequest.Builder
-
GET
Represents the GET request and sets the RequestMethod for sending the request.- Specified by:
GETin interfaceClientRequest.Builder- Returns:
- Client request builder object
ClientRequest.Builder
-
POST
Represents the POST request and sets the RequestMethod for sending the request.- Specified by:
POSTin interfaceClientRequest.Builder- Parameters:
requestBody- Pass the request body.- Returns:
- Client request builder object
ClientRequest.Builder
-
PATCH
Represents the PATCH request and sets the RequestMethod for sending the request.- Specified by:
PATCHin interfaceClientRequest.Builder- Parameters:
requestBody- Pass the request body.- Returns:
- Client request builder object
ClientRequest.Builder
-
PUT
Represents the PUT request and sets the RequestMethod for sending the request.- Specified by:
PUTin interfaceClientRequest.Builder- Parameters:
requestBody- Pass the request body.- Returns:
- Client request builder object
ClientRequest.Builder
-
DELETE
Represents the DELETE request and sets the RequestMethod for sending the request.- Specified by:
DELETEin interfaceClientRequest.Builder- Returns:
- Client request builder object
ClientRequest.Builder
-
OPTIONS
Represents the OPTIONS request and sets the RequestMethod for sending the request.- Specified by:
OPTIONSin interfaceClientRequest.Builder- Returns:
- Client request builder object
ClientRequest.Builder
-
HEAD
Represents the HEAD request and sets the RequestMethod for sending the request.- Specified by:
HEADin interfaceClientRequest.Builder- Returns:
- Client request builder object
ClientRequest.Builder
-
URI
Pass the complete request url.- Specified by:
URIin interfaceClientRequest.Builder- Parameters:
url- Request url to set.- Returns:
- Client request builder object
ClientRequest.Builder
-
URI
Pass the complete request url.- Specified by:
URIin interfaceClientRequest.Builder- Parameters:
uri- Request url to set.- Returns:
- Client request builder object
ClientRequest.Builder
-
serviceEndpoint
Pass the service endpoint to append the URL with.- Specified by:
serviceEndpointin interfaceClientRequest.Builder- Parameters:
key- Represents the path parameter of the url.value- Value for the path parameter.- Returns:
- Client request builder object
ClientRequest.Builder
-
query
Pass the query parameters- Specified by:
queryin interfaceClientRequest.Builder- Parameters:
name- Name of the query parameter.value- Value of the query parameter.- Returns:
- Client request builder object
ClientRequest.Builder
-
query
public <T> ClientRequest.Builder query(Supplier<T> config, Consumer<T> requestConfig, Function<T, Object> func) Supply the values to set the query parameters.- Specified by:
queryin interfaceClientRequest.Builder- Parameters:
config- Supplier of request configuration instance.requestConfig- Consumer of request configuration that contains the query parameters.func- Function of request configuration query parameters that returns any object.- Returns:
- Client request builder object
ClientRequest.Builder
-
header
Set the request header.- Specified by:
headerin interfaceClientRequest.Builder- Parameters:
customHeader- Custom header to add.CustomHeader- Returns:
- Client request builder object
ClientRequest.Builder
-
headers
Set the request headers.- Specified by:
headersin interfaceClientRequest.Builder- Parameters:
requestHeaders- Request headers value.RequestHeaders- Returns:
- Client request builder object
ClientRequest.Builder
-
request
Set the complete request information.- Specified by:
requestin interfaceClientRequest.Builder- Parameters:
requestInfo- Request information object.- Returns:
- Client request builder object
ClientRequest.Builder
-
request
Get the request information.- Specified by:
requestin interfaceClientRequest.Builder- Returns:
- Request information object
RequestInformation
-
accessTokenCredential
Get the access token credential object.- Specified by:
accessTokenCredentialin interfaceClientRequest.Builder- Returns:
- AccessTokenCredential
AccessTokenCredential
-
build
Constructs and the client request object.- Specified by:
buildin interfaceClientRequest.Builder- Returns:
- ClientRequest
ClientRequest
-