package com.airlock.iam.oauth2.infrastructure.generated.transfer.response;

import ch.ergon.restal.jsonapi.Links;
import ch.ergon.restal.jsonapi.Metadata;
import ch.ergon.restal.jsonapi.document.DocumentMetadata;
import ch.ergon.restal.jsonapi.document.JsonApi;
import ch.ergon.restal.jsonapi.document.data.Relationships;
import com.airlock.iam.oauth2.infrastructure.transfer.response.OAuth2SessionData;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import io.swagger.v3.oas.annotations.media.ArraySchema;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
import java.util.List;

@SuppressFBWarnings("URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
public class OAuth2SessionDataResourceDocument {
   @Schema(description = "An included resource to which the primary data refers.")
   public OAuth2SessionDataResourceDocument.OAuth2SessionDataResourceObject data = new OAuth2SessionDataResourceDocument.OAuth2SessionDataResourceObject();
   @ArraySchema(
      uniqueItems = true,
      arraySchema = @Schema(
         description = "To reduce the number of HTTP requests, servers **MAY** allow responses that include related resources along with the requested primary resources. Such responses are called \"compound documents\"."
      ),
      schema = @Schema(ref = "json-api.yaml#/components/schemas/ResourceObjectBase")
   )
   public List<Object> included;
   @Schema(ref = "json-api.yaml#/components/schemas/Jsonapi")
   public JsonApi jsonapi;
   @Schema(ref = "json-api.yaml#/components/schemas/Links")
   public Links links;
   @Schema(ref = "json-api.yaml#/components/schemas/Meta")
   public DocumentMetadata meta;

   public static class OAuth2SessionDataResourceObject {
      @Schema(description = "Attributes of this resource.")
      public OAuth2SessionData attributes;
      @Schema(
         description = "Identifies the instance of this resource; type and id together make a resource unique.\nWhile the server always returns a valid ID value, it MAY accept a client-generated ID in a request to create\na resource.",
         requiredMode = RequiredMode.REQUIRED
      )
      public String id;
      @Schema(ref = "json-api.yaml#/components/schemas/Links")
      public Links links;
      @Schema(ref = "json-api.yaml#/components/schemas/Meta")
      public Metadata meta;
      @Schema(ref = "json-api.yaml#/components/schemas/Relationships")
      public Relationships relationships;
      @Schema(description = "Identifies the type of this resource; type and id together make a resource unique.", requiredMode = RequiredMode.REQUIRED)
      public OAuth2SessionDataTypeEnum type = OAuth2SessionDataTypeEnum.TYPE;
   }
}
