Class McpServerDraftBuilder
java.lang.Object
com.commercetools.api.models.mcp_server.McpServerDraftBuilder
- All Implemented Interfaces:
Builder<McpServerDraft>
McpServerDraftBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
McpServerDraft mcpServerDraft = McpServerDraft.builder()
.key("{key}")
.mcpServer(mcpServerBuilder -> mcpServerBuilder)
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionauthenticationMode(McpServerAuthenticationMode authenticationMode) Determines how AI agents authenticate when connecting to the MCP Server.build()builds McpServerDraft with checking for non-null required valuesbuilds McpServerDraft without checking for non-null required valuesdescription(LocalizedString description) Description of the MCP Server.Description of the MCP Server.Determines how AI agents authenticate when connecting to the MCP Server.Description of the MCP Server.getKey()User-defined unique identifier for the MCP Server.Configuration of the MCP Server connection.getName()Name of the MCP Server.getState()State of the MCP Server.User-defined unique identifier for the MCP Server.mcpServer(McpServerConfigDraft mcpServer) Configuration of the MCP Server connection.mcpServer(Function<McpServerConfigDraftBuilder, Builder<? extends McpServerConfigDraft>> builder) Configuration of the MCP Server connection.name(LocalizedString name) Name of the MCP Server.Name of the MCP Server.static McpServerDraftBuilderof()factory method for an instance of McpServerDraftBuilderstatic McpServerDraftBuilderof(McpServerDraft template) create builder for McpServerDraft instancestate(McpServerState state) State of the MCP Server.Description of the MCP Server.Name of the MCP Server.
-
Constructor Details
-
McpServerDraftBuilder
public McpServerDraftBuilder()
-
-
Method Details
-
key
User-defined unique identifier for the MCP Server. Must be unique within the Project.
- Parameters:
key- value to be set- Returns:
- Builder
-
name
Name of the MCP Server.
- Parameters:
builder- function to build the name value- Returns:
- Builder
-
withName
Name of the MCP Server.
- Parameters:
builder- function to build the name value- Returns:
- Builder
-
name
Name of the MCP Server.
- Parameters:
name- value to be set- Returns:
- Builder
-
description
public McpServerDraftBuilder description(Function<LocalizedStringBuilder, LocalizedStringBuilder> builder) Description of the MCP Server.
- Parameters:
builder- function to build the description value- Returns:
- Builder
-
withDescription
public McpServerDraftBuilder withDescription(Function<LocalizedStringBuilder, LocalizedString> builder) Description of the MCP Server.
- Parameters:
builder- function to build the description value- Returns:
- Builder
-
description
Description of the MCP Server.
- Parameters:
description- value to be set- Returns:
- Builder
-
authenticationMode
public McpServerDraftBuilder authenticationMode(@Nullable McpServerAuthenticationMode authenticationMode) Determines how AI agents authenticate when connecting to the MCP Server.
- Parameters:
authenticationMode- value to be set- Returns:
- Builder
-
state
State of the MCP Server.
- Parameters:
state- value to be set- Returns:
- Builder
-
mcpServer
Configuration of the MCP Server connection.
- Parameters:
mcpServer- value to be set- Returns:
- Builder
-
mcpServer
public McpServerDraftBuilder mcpServer(Function<McpServerConfigDraftBuilder, Builder<? extends McpServerConfigDraft>> builder) Configuration of the MCP Server connection.
- Parameters:
builder- function to build the mcpServer value- Returns:
- Builder
-
getKey
User-defined unique identifier for the MCP Server. Must be unique within the Project.
- Returns:
- key
-
getName
Name of the MCP Server.
- Returns:
- name
-
getDescription
Description of the MCP Server.
- Returns:
- description
-
getAuthenticationMode
Determines how AI agents authenticate when connecting to the MCP Server.
- Returns:
- authenticationMode
-
getState
State of the MCP Server.
- Returns:
- state
-
getMcpServer
Configuration of the MCP Server connection.
- Returns:
- mcpServer
-
build
builds McpServerDraft with checking for non-null required values- Specified by:
buildin interfaceBuilder<McpServerDraft>- Returns:
- McpServerDraft
-
buildUnchecked
builds McpServerDraft without checking for non-null required values- Returns:
- McpServerDraft
-
of
factory method for an instance of McpServerDraftBuilder- Returns:
- builder
-
of
create builder for McpServerDraft instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-