Class CdToolchain
- java.lang.Object
-
- com.ibm.cloud.sdk.core.service.BaseService
-
- com.ibm.cloud.continuous_delivery.cd_toolchain.v2.CdToolchain
-
public class CdToolchain extends com.ibm.cloud.sdk.core.service.BaseService
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEFAULT_SERVICE_NAMEDefault service name used when configuring the `CdToolchain` client.static java.lang.StringDEFAULT_SERVICE_URLDefault service endpoint URL.
-
Constructor Summary
Constructors Constructor Description CdToolchain(java.lang.String serviceName, com.ibm.cloud.sdk.core.security.Authenticator authenticator)Constructs an instance of the `CdToolchain` client.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.ibm.cloud.sdk.core.http.ServiceCall<ToolchainToolPost>createTool(CreateToolOptions createToolOptions)Create a tool.com.ibm.cloud.sdk.core.http.ServiceCall<ToolchainPost>createToolchain(CreateToolchainOptions createToolchainOptions)Create a toolchain.com.ibm.cloud.sdk.core.http.ServiceCall<ToolchainEventPost>createToolchainEvent(CreateToolchainEventOptions createToolchainEventOptions)Create a toolchain event.com.ibm.cloud.sdk.core.http.ServiceCall<java.lang.Void>deleteTool(DeleteToolOptions deleteToolOptions)Delete a tool.com.ibm.cloud.sdk.core.http.ServiceCall<java.lang.Void>deleteToolchain(DeleteToolchainOptions deleteToolchainOptions)Delete a toolchain.static java.lang.StringgetServiceUrlForRegion(java.lang.String region)Returns the service URL associated with the specified region.com.ibm.cloud.sdk.core.http.ServiceCall<ToolchainTool>getToolById(GetToolByIdOptions getToolByIdOptions)Get a tool.com.ibm.cloud.sdk.core.http.ServiceCall<Toolchain>getToolchainById(GetToolchainByIdOptions getToolchainByIdOptions)Get a toolchain.com.ibm.cloud.sdk.core.http.ServiceCall<ToolchainCollection>listToolchains(ListToolchainsOptions listToolchainsOptions)Get a list of toolchains.com.ibm.cloud.sdk.core.http.ServiceCall<ToolchainToolCollection>listTools(ListToolsOptions listToolsOptions)Get a list of tools bound to a toolchain.static CdToolchainnewInstance()Class method which constructs an instance of the `CdToolchain` client.static CdToolchainnewInstance(java.lang.String serviceName)Class method which constructs an instance of the `CdToolchain` client.com.ibm.cloud.sdk.core.http.ServiceCall<ToolchainToolPatch>updateTool(UpdateToolOptions updateToolOptions)Update a tool.com.ibm.cloud.sdk.core.http.ServiceCall<ToolchainPatch>updateToolchain(UpdateToolchainOptions updateToolchainOptions)Update a toolchain.-
Methods inherited from class com.ibm.cloud.sdk.core.service.BaseService
configureClient, configureService, constructServiceUrl, constructServiceURL, disableRetries, enableGzipCompression, enableRetries, getAuthenticator, getClient, getDefaultHeaders, getEndPoint, getName, getServiceUrl, isJsonMimeType, isJsonPatchMimeType, setClient, setDefaultHeaders, setEndPoint, setServiceUrl, toString
-
-
-
-
Field Detail
-
DEFAULT_SERVICE_NAME
public static final java.lang.String DEFAULT_SERVICE_NAME
Default service name used when configuring the `CdToolchain` client.- See Also:
- Constant Field Values
-
DEFAULT_SERVICE_URL
public static final java.lang.String DEFAULT_SERVICE_URL
Default service endpoint URL.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CdToolchain
public CdToolchain(java.lang.String serviceName, com.ibm.cloud.sdk.core.security.Authenticator authenticator)Constructs an instance of the `CdToolchain` client. The specified service name and authenticator are used to configure the client instance.- Parameters:
serviceName- the service name to be used when configuring the client instanceauthenticator- theAuthenticatorinstance to be configured for this client
-
-
Method Detail
-
getServiceUrlForRegion
public static java.lang.String getServiceUrlForRegion(java.lang.String region)
Returns the service URL associated with the specified region.- Parameters:
region- a string representing the region- Returns:
- the service URL associated with the specified region or null if no mapping for the region exists
-
newInstance
public static CdToolchain newInstance()
Class method which constructs an instance of the `CdToolchain` client. The default service name is used to configure the client instance.- Returns:
- an instance of the `CdToolchain` client using external configuration
-
newInstance
public static CdToolchain newInstance(java.lang.String serviceName)
Class method which constructs an instance of the `CdToolchain` client. The specified service name is used to configure the client instance.- Parameters:
serviceName- the service name to be used when configuring the client instance- Returns:
- an instance of the `CdToolchain` client using external configuration
-
listToolchains
public com.ibm.cloud.sdk.core.http.ServiceCall<ToolchainCollection> listToolchains(ListToolchainsOptions listToolchainsOptions)
Get a list of toolchains. Returns a list of toolchains that the caller is authorized to access and that meets the provided query parameters.- Parameters:
listToolchainsOptions- theListToolchainsOptionscontaining the options for the call- Returns:
- a
ServiceCallwith a result of typeToolchainCollection
-
createToolchain
public com.ibm.cloud.sdk.core.http.ServiceCall<ToolchainPost> createToolchain(CreateToolchainOptions createToolchainOptions)
Create a toolchain. Creates a new toolchain based off the provided parameters in the body.- Parameters:
createToolchainOptions- theCreateToolchainOptionscontaining the options for the call- Returns:
- a
ServiceCallwith a result of typeToolchainPost
-
getToolchainById
public com.ibm.cloud.sdk.core.http.ServiceCall<Toolchain> getToolchainById(GetToolchainByIdOptions getToolchainByIdOptions)
Get a toolchain. Returns data for a single toolchain identified by its ID.- Parameters:
getToolchainByIdOptions- theGetToolchainByIdOptionscontaining the options for the call- Returns:
- a
ServiceCallwith a result of typeToolchain
-
deleteToolchain
public com.ibm.cloud.sdk.core.http.ServiceCall<java.lang.Void> deleteToolchain(DeleteToolchainOptions deleteToolchainOptions)
Delete a toolchain. Delete the toolchain with the specified ID.- Parameters:
deleteToolchainOptions- theDeleteToolchainOptionscontaining the options for the call- Returns:
- a
ServiceCallwith a void result
-
updateToolchain
public com.ibm.cloud.sdk.core.http.ServiceCall<ToolchainPatch> updateToolchain(UpdateToolchainOptions updateToolchainOptions)
Update a toolchain. Update the toolchain with the specified ID.- Parameters:
updateToolchainOptions- theUpdateToolchainOptionscontaining the options for the call- Returns:
- a
ServiceCallwith a result of typeToolchainPatch
-
createToolchainEvent
public com.ibm.cloud.sdk.core.http.ServiceCall<ToolchainEventPost> createToolchainEvent(CreateToolchainEventOptions createToolchainEventOptions)
Create a toolchain event. Creates and sends a custom event to each Event Notifications instance configured as a tool into the toolchain. This operation will fail if no Event Notifications instances are configured into the toolchain.- Parameters:
createToolchainEventOptions- theCreateToolchainEventOptionscontaining the options for the call- Returns:
- a
ServiceCallwith a result of typeToolchainEventPost
-
listTools
public com.ibm.cloud.sdk.core.http.ServiceCall<ToolchainToolCollection> listTools(ListToolsOptions listToolsOptions)
Get a list of tools bound to a toolchain. Returns a list of tools bound to a toolchain that the caller is authorized to access and that meet the provided query parameters.- Parameters:
listToolsOptions- theListToolsOptionscontaining the options for the call- Returns:
- a
ServiceCallwith a result of typeToolchainToolCollection
-
createTool
public com.ibm.cloud.sdk.core.http.ServiceCall<ToolchainToolPost> createTool(CreateToolOptions createToolOptions)
Create a tool. Provisions a new tool based off the provided parameters in the body and binds it to the specified toolchain.- Parameters:
createToolOptions- theCreateToolOptionscontaining the options for the call- Returns:
- a
ServiceCallwith a result of typeToolchainToolPost
-
getToolById
public com.ibm.cloud.sdk.core.http.ServiceCall<ToolchainTool> getToolById(GetToolByIdOptions getToolByIdOptions)
Get a tool. Returns a tool that is bound to the provided toolchain.- Parameters:
getToolByIdOptions- theGetToolByIdOptionscontaining the options for the call- Returns:
- a
ServiceCallwith a result of typeToolchainTool
-
deleteTool
public com.ibm.cloud.sdk.core.http.ServiceCall<java.lang.Void> deleteTool(DeleteToolOptions deleteToolOptions)
Delete a tool. Delete the tool with the specified ID.- Parameters:
deleteToolOptions- theDeleteToolOptionscontaining the options for the call- Returns:
- a
ServiceCallwith a void result
-
updateTool
public com.ibm.cloud.sdk.core.http.ServiceCall<ToolchainToolPatch> updateTool(UpdateToolOptions updateToolOptions)
Update a tool. Update the tool with the specified ID.- Parameters:
updateToolOptions- theUpdateToolOptionscontaining the options for the call- Returns:
- a
ServiceCallwith a result of typeToolchainToolPatch
-
-