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 org.apache.juneau.marshall.*;
020
021/**
022 * MCP resource descriptor ({@code resources/list} entry).
023 */
024@Marshalled
025public class Resource {
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    * Resource URI.
036    *
037    * @return The URI, or {@code null} 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 (for method chaining).
048    */
049   public Resource setUri(String value) {
050      uri = value;
051      return this;
052   }
053
054   /**
055    * Short resource name.
056    *
057    * @return The name, or {@code null} if not set.
058    */
059   public String getName() {
060      return name;
061   }
062
063   /**
064    * Sets the short name.
065    *
066    * @param value The new value.  Can be <jk>null</jk> to unset the property.
067    * @return This object (for method chaining).
068    */
069   public Resource setName(String value) {
070      name = value;
071      return this;
072   }
073
074   /**
075    * Human-readable title.
076    *
077    * @return The title, or {@code null} if not set.
078    */
079   public String getTitle() {
080      return title;
081   }
082
083   /**
084    * Sets the title.
085    *
086    * @param value The new value.  Can be <jk>null</jk> to unset the property.
087    * @return This object (for method chaining).
088    */
089   public Resource setTitle(String value) {
090      title = value;
091      return this;
092   }
093
094   /**
095    * Resource description.
096    *
097    * @return The description, or {@code null} if not set.
098    */
099   public String getDescription() {
100      return description;
101   }
102
103   /**
104    * Sets the description.
105    *
106    * @param value The new value.  Can be <jk>null</jk> to unset the property.
107    * @return This object (for method chaining).
108    */
109   public Resource setDescription(String value) {
110      description = value;
111      return this;
112   }
113
114   /**
115    * MIME type hint.
116    *
117    * @return The MIME type, or {@code null} if not set.
118    */
119   public String getMimeType() {
120      return mimeType;
121   }
122
123   /**
124    * Sets the MIME type.
125    *
126    * @param value The new value.  Can be <jk>null</jk> to unset the property.
127    * @return This object (for method chaining).
128    */
129   public Resource setMimeType(String value) {
130      mimeType = value;
131      return this;
132   }
133
134   /**
135    * Optional size in bytes when known statically.
136    *
137    * @return The size, or {@code null} if not set.
138    */
139   public Long getSize() {
140      return size;
141   }
142
143   /**
144    * Sets the size hint.
145    *
146    * @param value The new value.  Can be <jk>null</jk> to unset the property.
147    * @return This object (for method chaining).
148    */
149   public Resource setSize(Long value) {
150      size = value;
151      return this;
152   }
153}