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 * Base64 blob body for {@code resources/read} results or embedded resource content.
023 *
024 * <p>
025 * Discriminator {@code type} value is {@code resourceBlob} (distinct from generic {@code blob} tokens elsewhere).
026 */
027@Marshalled(typeName = "resourceBlob")
028public class BlobResourceContents implements ResourceContents {
029
030   private String uri;
031   private String mimeType;
032   private String blob;
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 BlobResourceContents setUri(String value) {
050      uri = value;
051      return this;
052   }
053
054   /**
055    * Optional MIME type.
056    *
057    * @return The MIME type, or {@code null} if not set.
058    */
059   public String getMimeType() {
060      return mimeType;
061   }
062
063   /**
064    * Sets the MIME type.
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 BlobResourceContents setMimeType(String value) {
070      mimeType = value;
071      return this;
072   }
073
074   /**
075    * Base64-encoded bytes.
076    *
077    * @return The blob, or {@code null} if not set.
078    */
079   public String getBlob() {
080      return blob;
081   }
082
083   /**
084    * Sets the base64 payload.
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 BlobResourceContents setBlob(String value) {
090      blob = value;
091      return this;
092   }
093}