Class McpServerUpdateBuilder
java.lang.Object
com.commercetools.api.models.mcp_server.McpServerUpdateBuilder
- All Implemented Interfaces:
Builder<McpServerUpdate>
McpServerUpdateBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
McpServerUpdate mcpServerUpdate = McpServerUpdate.builder()
.version(0.3)
.plusActions(actionsBuilder -> actionsBuilder)
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionactions(McpServerUpdateAction... actions) Update actions to be performed on the MCP Server.actions(List<McpServerUpdateAction> actions) Update actions to be performed on the MCP Server.build()builds McpServerUpdate with checking for non-null required valuesbuilds McpServerUpdate without checking for non-null required valuesUpdate actions to be performed on the MCP Server.Expected version of the MCP Server on which the changes should be applied.static McpServerUpdateBuilderof()factory method for an instance of McpServerUpdateBuilderstatic McpServerUpdateBuilderof(McpServerUpdate template) create builder for McpServerUpdate instanceplusActions(McpServerUpdateAction... actions) Update actions to be performed on the MCP Server.plusActions(Function<McpServerUpdateActionBuilder, Builder<? extends McpServerUpdateAction>> builder) Update actions to be performed on the MCP Server.Expected version of the MCP Server on which the changes should be applied.withActions(Function<McpServerUpdateActionBuilder, Builder<? extends McpServerUpdateAction>> builder) Update actions to be performed on the MCP Server.
-
Constructor Details
-
McpServerUpdateBuilder
public McpServerUpdateBuilder()
-
-
Method Details
-
version
Expected version of the MCP Server on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error is returned.
- Parameters:
version- value to be set- Returns:
- Builder
-
actions
Update actions to be performed on the MCP Server.
- Parameters:
actions- value to be set- Returns:
- Builder
-
actions
Update actions to be performed on the MCP Server.
- Parameters:
actions- value to be set- Returns:
- Builder
-
plusActions
Update actions to be performed on the MCP Server.
- Parameters:
actions- value to be set- Returns:
- Builder
-
plusActions
public McpServerUpdateBuilder plusActions(Function<McpServerUpdateActionBuilder, Builder<? extends McpServerUpdateAction>> builder) Update actions to be performed on the MCP Server.
- Parameters:
builder- function to build the actions value- Returns:
- Builder
-
withActions
public McpServerUpdateBuilder withActions(Function<McpServerUpdateActionBuilder, Builder<? extends McpServerUpdateAction>> builder) Update actions to be performed on the MCP Server.
- Parameters:
builder- function to build the actions value- Returns:
- Builder
-
getVersion
Expected version of the MCP Server on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error is returned.
- Returns:
- version
-
getActions
Update actions to be performed on the MCP Server.
- Returns:
- actions
-
build
builds McpServerUpdate with checking for non-null required values- Specified by:
buildin interfaceBuilder<McpServerUpdate>- Returns:
- McpServerUpdate
-
buildUnchecked
builds McpServerUpdate without checking for non-null required values- Returns:
- McpServerUpdate
-
of
factory method for an instance of McpServerUpdateBuilder- Returns:
- builder
-
of
create builder for McpServerUpdate instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-