001/*
002 * Licensed to the Apache Software Foundation (ASF) under one or more
003 * contributor license agreements.  See the NOTICE file distributed with
004 * this work for additional information regarding copyright ownership.
005 * The ASF licenses this file to You under the Apache License, Version 2.0
006 * (the "License"); you may not use this file except in compliance with
007 * the License.  You may obtain a copy of the License at
008 *
009 *      http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017package org.apache.juneau.bean.mcp.v20250618;
018
019import org.apache.juneau.marshall.*;
020
021/**
022 * MCP {@code initialize} result payload.
023 */
024@Marshalled
025public class InitializeResult {
026
027   private String protocolVersion;
028   private ServerCapabilities capabilities;
029   private Implementation serverInfo;
030   private String instructions;
031
032   /**
033    * Negotiated protocol revision.
034    *
035    * @return The protocol version, or {@code null} if not set.
036    */
037   public String getProtocolVersion() {
038      return protocolVersion;
039   }
040
041   /**
042    * Sets the negotiated protocol revision.
043    *
044    * @param value The new value.  Can be <jk>null</jk> to unset the property.
045    * @return This object (for method chaining).
046    */
047   public InitializeResult setProtocolVersion(String value) {
048      protocolVersion = value;
049      return this;
050   }
051
052   /**
053    * Server capabilities.
054    *
055    * @return The capabilities, or {@code null} if not set.
056    */
057   public ServerCapabilities getCapabilities() {
058      return capabilities;
059   }
060
061   /**
062    * Sets server capabilities.
063    *
064    * @param value The new value.  Can be <jk>null</jk> to unset the property.
065    * @return This object (for method chaining).
066    */
067   public InitializeResult setCapabilities(ServerCapabilities value) {
068      capabilities = value;
069      return this;
070   }
071
072   /**
073    * Server implementation metadata.
074    *
075    * @return The server info, or {@code null} if not set.
076    */
077   public Implementation getServerInfo() {
078      return serverInfo;
079   }
080
081   /**
082    * Sets server implementation metadata.
083    *
084    * @param value The new value.  Can be <jk>null</jk> to unset the property.
085    * @return This object (for method chaining).
086    */
087   public InitializeResult setServerInfo(Implementation value) {
088      serverInfo = value;
089      return this;
090   }
091
092   /**
093    * Optional instructions for the client.
094    *
095    * @return The instructions, or {@code null} if not set.
096    */
097   public String getInstructions() {
098      return instructions;
099   }
100
101   /**
102    * Sets optional instructions.
103    *
104    * @param value The new value.  Can be <jk>null</jk> to unset the property.
105    * @return This object (for method chaining).
106    */
107   public InitializeResult setInstructions(String value) {
108      instructions = value;
109      return this;
110   }
111}