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.v20260728;
018
019import static org.apache.juneau.commons.utils.CollectionUtils.*;
020import static org.apache.juneau.commons.utils.Shorts.*;
021
022import java.util.*;
023
024import org.apache.juneau.marshall.*;
025
026/**
027 * MCP prompt descriptor ({@code prompts/list} entry).
028 */
029@Marshalled
030public class Prompt {
031
032   private String name;
033   private String description;
034   private List<PromptArgument> arguments;
035
036   /**
037    * Prompt name.
038    *
039    * @return The name, or {@code null} if not set.
040    */
041   public String getName() {
042      return name;
043   }
044
045   /**
046    * Sets the prompt name.
047    *
048    * @param value The new value.  Can be <jk>null</jk> to unset the property.
049    * @return This object (for method chaining).
050    */
051   public Prompt setName(String value) {
052      name = value;
053      return this;
054   }
055
056   /**
057    * Human-readable description.
058    *
059    * @return The description, or {@code null} if not set.
060    */
061   public String getDescription() {
062      return description;
063   }
064
065   /**
066    * Sets the description.
067    *
068    * @param value The new value.  Can be <jk>null</jk> to unset the property.
069    * @return This object (for method chaining).
070    */
071   public Prompt setDescription(String value) {
072      description = value;
073      return this;
074   }
075
076   /**
077    * Declared prompt arguments.
078    *
079    * @return The arguments list, or {@code null} if not set.
080    */
081   public List<PromptArgument> getArguments() {
082      return u(arguments);
083   }
084
085   /**
086    * Sets declared arguments.
087    *
088    * @param value The new value.  Can be <jk>null</jk> to unset the property.
089    * @return This object (for method chaining).
090    */
091   public Prompt setArguments(List<PromptArgument> value) {
092      arguments = value;
093      return this;
094   }
095
096   /**
097    * Sets declared arguments.
098    *
099    * @param value The new value.  Can be <jk>null</jk> to unset the property.
100    * @return This object (for method chaining).
101    */
102   public Prompt setArguments(PromptArgument...value) {
103      arguments = list(value);
104      return this;
105   }
106
107   /**
108    * Appends to the declared arguments.
109    *
110    * @param value The values to append.
111    * @return This object (for method chaining).
112    */
113   public Prompt addArguments(PromptArgument...value) {
114      if (arguments == null)
115         arguments = list();
116      Collections.addAll(arguments, value);
117      return this;
118   }
119
120   /**
121    * Appends to the declared arguments.
122    *
123    * @param value The values to append.
124    * @return This object (for method chaining).
125    */
126   public Prompt addArguments(Collection<PromptArgument> value) {
127      if (arguments == null)
128         arguments = list();
129      arguments.addAll(value);
130      return this;
131   }
132}