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.rest.server.mcp;
018
019/**
020 * Revision-neutral resource descriptor returned from {@code resources/list}.
021 *
022 * <p>
023 * Supersedes the wire-level {@code Resource} bean.
024 */
025public class McpResourceSpec {
026
027   private String uri;
028   private String name;
029   private String title;
030   private String description;
031   private String mimeType;
032   private Long size;
033
034   /**
035    * The resource URI.
036    *
037    * @return The URI, or <jk>null</jk> if not set.
038    */
039   public String getUri() {
040      return uri;
041   }
042
043   /**
044    * Sets the resource URI.
045    *
046    * @param value The new value. Can be <jk>null</jk> to unset the property.
047    * @return This object.
048    */
049   public McpResourceSpec setUri(String value) {
050      uri = value;
051      return this;
052   }
053
054   /**
055    * The resource name.
056    *
057    * @return The name, or <jk>null</jk> if not set.
058    */
059   public String getName() {
060      return name;
061   }
062
063   /**
064    * Sets the resource name.
065    *
066    * @param value The new value. Can be <jk>null</jk> to unset the property.
067    * @return This object.
068    */
069   public McpResourceSpec setName(String value) {
070      name = value;
071      return this;
072   }
073
074   /**
075    * The human-readable resource title.
076    *
077    * @return The title, or <jk>null</jk> if not set.
078    */
079   public String getTitle() {
080      return title;
081   }
082
083   /**
084    * Sets the resource title.
085    *
086    * @param value The new value. Can be <jk>null</jk> to unset the property.
087    * @return This object.
088    */
089   public McpResourceSpec setTitle(String value) {
090      title = value;
091      return this;
092   }
093
094   /**
095    * The human-readable resource description.
096    *
097    * @return The description, or <jk>null</jk> if not set.
098    */
099   public String getDescription() {
100      return description;
101   }
102
103   /**
104    * Sets the resource description.
105    *
106    * @param value The new value. Can be <jk>null</jk> to unset the property.
107    * @return This object.
108    */
109   public McpResourceSpec setDescription(String value) {
110      description = value;
111      return this;
112   }
113
114   /**
115    * The resource's media type.
116    *
117    * @return The media type, or <jk>null</jk> if not set.
118    */
119   public String getMimeType() {
120      return mimeType;
121   }
122
123   /**
124    * Sets the resource's media type.
125    *
126    * @param value The new value. Can be <jk>null</jk> to unset the property.
127    * @return This object.
128    */
129   public McpResourceSpec setMimeType(String value) {
130      mimeType = value;
131      return this;
132   }
133
134   /**
135    * The resource's size in bytes.
136    *
137    * @return The size, or <jk>null</jk> if not set.
138    */
139   public Long getSize() {
140      return size;
141   }
142
143   /**
144    * Sets the resource's size in bytes.
145    *
146    * @param value The new value. Can be <jk>null</jk> to unset the property.
147    * @return This object.
148    */
149   public McpResourceSpec setSize(Long value) {
150      size = value;
151      return this;
152   }
153}