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
ConstructorDescriptionDefault.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:
baseInstance
in 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:
area
in 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:
location
in 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:
apiVersion
in 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:
GET
in interfaceClientRequest.Builder
- Returns:
- Client request builder object
ClientRequest.Builder
-
POST
Represents the POST request and sets the RequestMethod for sending the request.- Specified by:
POST
in 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:
PATCH
in 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:
PUT
in 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:
DELETE
in interfaceClientRequest.Builder
- Returns:
- Client request builder object
ClientRequest.Builder
-
OPTIONS
Represents the OPTIONS request and sets the RequestMethod for sending the request.- Specified by:
OPTIONS
in interfaceClientRequest.Builder
- Returns:
- Client request builder object
ClientRequest.Builder
-
HEAD
Represents the HEAD request and sets the RequestMethod for sending the request.- Specified by:
HEAD
in interfaceClientRequest.Builder
- Returns:
- Client request builder object
ClientRequest.Builder
-
URI
Pass the complete request url.- Specified by:
URI
in interfaceClientRequest.Builder
- Parameters:
url
- Request url to set.- Returns:
- Client request builder object
ClientRequest.Builder
-
URI
Pass the complete request url.- Specified by:
URI
in 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:
serviceEndpoint
in 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:
query
in 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:
query
in 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:
header
in interfaceClientRequest.Builder
- Parameters:
customHeader
- Custom header to add.CustomHeader
- Returns:
- Client request builder object
ClientRequest.Builder
-
headers
Set the request headers.- Specified by:
headers
in interfaceClientRequest.Builder
- Parameters:
requestHeaders
- Request headers value.RequestHeaders
- Returns:
- Client request builder object
ClientRequest.Builder
-
request
Set the complete request information.- Specified by:
request
in interfaceClientRequest.Builder
- Parameters:
requestInfo
- Request information object.- Returns:
- Client request builder object
ClientRequest.Builder
-
request
Get the request information.- Specified by:
request
in interfaceClientRequest.Builder
- Returns:
- Request information object
RequestInformation
-
accessTokenCredential
Get the access token credential object.- Specified by:
accessTokenCredential
in interfaceClientRequest.Builder
- Returns:
- AccessTokenCredential
AccessTokenCredential
-
build
Constructs and the client request object.- Specified by:
build
in interfaceClientRequest.Builder
- Returns:
- ClientRequest
ClientRequest
-