content: /*
   * Copyright 2024-2024 the original author or authors.
   */
  
  package com.alibaba.langengine.modelcontextprotocol.spec;
  
  import lombok.Data;
  
  import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
  import com.fasterxml.jackson.annotation.JsonInclude;
  import com.fasterxml.jackson.annotation.JsonProperty;
  
  import java.util.List;
  import java.util.Objects;
  
  /**
   * Result of a resources/read request.
   * 
   * JDK 1.8 compatible version.
   */
  @JsonInclude(JsonInclude.Include.NON_ABSENT)
  @JsonIgnoreProperties(ignoreUnknown = true)
  @Data
  public class ReadResourceResult {
      private final List<ResourceContents> contents;
  
      public ReadResourceResult(@JsonProperty("contents") List<ResourceContents> contents) {
          this.contents = contents;
      }
  
      public List<ResourceContents> contents() {
          return contents;
      }
  
      @Override
      public boolean equals(Object o) {
          if (this == o) return true;
          if (o == null || getClass() != o.getClass()) return false;
          ReadResourceResult that = (ReadResourceResult) o;
          return Objects.equals(contents, that.contents);
      }
  
      @Override
      public int hashCode() {
          return Objects.hash(contents);
      }
  
      @Override
      public String toString() {
          return "ReadResourceResult{" +
                 "contents=" + contents +
                 '}';
      }
  }
  