Skip to content
This repository was archived by the owner on Dec 25, 2024. It is now read-only.

Latest commit

 

History

History
126 lines (98 loc) · 6.98 KB

SuccessfulXmlAndJsonArrayOfPet.md

File metadata and controls

126 lines (98 loc) · 6.98 KB

SuccessfulXmlAndJsonArrayOfPet

SuccessfulXmlAndJsonArrayOfPet.java

public class SuccessfulXmlAndJsonArrayOfPet

A class that contains necessary nested response classes

  • SealedMediaType, a sealed interface which contains all the schema/encoding info for each contentType
  • records which implement SealedMediaType, the concrete media types
  • SealedResponseBody, a sealed interface which contains all the contentType/schema types
  • records which implement SealedResponseBody, the concrete response body types
  • a class that extends ResponseDeserializer and is used to deserialize responses

Nested Class Summary

Modifier and Type Class and Description
sealed interface SuccessfulXmlAndJsonArrayOfPet.SealedMediaType
media type sealed interface
record SuccessfulXmlAndJsonArrayOfPet.ApplicationxmlMediaType
record storing schema + encoding for a specific contentType
record SuccessfulXmlAndJsonArrayOfPet.ApplicationjsonMediaType
record storing schema + encoding for a specific contentType
sealed interface SuccessfulXmlAndJsonArrayOfPet.SealedResponseBody
response body sealed interface
record SuccessfulXmlAndJsonArrayOfPet.ApplicationxmlResponseBody
implements sealed interface to store response body
record SuccessfulXmlAndJsonArrayOfPet.ApplicationjsonResponseBody
implements sealed interface to store response body
static class SuccessfulXmlAndJsonArrayOfPet.SuccessfulXmlAndJsonArrayOfPet1
class that deserializes responses

SealedMediaType

public sealed interface SealedMediaType
permits
ApplicationxmlMediaType, ApplicationjsonMediaType

sealed interface that stores schema and encoding info

ApplicationxmlMediaType

public record ApplicationxmlMediaType
implements SealedMediaType, MediaType<ApplicationxmlSchema.ApplicationxmlSchema1, Void>

class storing schema info for a specific contentType

Constructor Summary

Constructor and Description
ApplicationxmlMediaType()
Creates an instance

Method Summary

Modifier and Type Method and Description
ApplicationxmlSchema.ApplicationxmlSchema1 schema()
the schema for this MediaType
Void encoding()
the encoding info

ApplicationjsonMediaType

public record ApplicationjsonMediaType
implements SealedMediaType, MediaType<ApplicationjsonSchema.ApplicationjsonSchema1, Void>

class storing schema info for a specific contentType

Constructor Summary

Constructor and Description
ApplicationjsonMediaType()
Creates an instance

Method Summary

Modifier and Type Method and Description
ApplicationjsonSchema.ApplicationjsonSchema1 schema()
the schema for this MediaType
Void encoding()
the encoding info

SealedResponseBody

public sealed interface SealedResponseBody
permits
ApplicationxmlResponseBody, ApplicationjsonResponseBody

sealed interface that stores response body

ApplicationxmlResponseBody

public record ApplicationxmlResponseBody
implements SealedResponseBody

A record class to store response body for contentType="application/xml"

Constructor Summary

Constructor and Description
ApplicationxmlResponseBody(ApplicationxmlSchema.ApplicationxmlSchema1Boxed body)
Creates an instance

Method Summary

Modifier and Type Method and Description
ApplicationxmlSchema.ApplicationxmlSchema1Boxed body()
returns the body passed in in the constructor

ApplicationjsonResponseBody

public record ApplicationjsonResponseBody
implements SealedResponseBody

A record class to store response body for contentType="application/json"

Constructor Summary

Constructor and Description
ApplicationjsonResponseBody(ApplicationjsonSchema.ApplicationjsonSchema1Boxed body)
Creates an instance

Method Summary

Modifier and Type Method and Description
ApplicationjsonSchema.ApplicationjsonSchema1Boxed body()
returns the body passed in in the constructor

SuccessfulXmlAndJsonArrayOfPet1

public static class SuccessfulXmlAndJsonArrayOfPet1
extends ResponseDeserializer<SealedResponseBody, Void, SealedMediaType>

a class that deserializes responses

Constructor Summary

Constructor and Description
SuccessfulXmlAndJsonArrayOfPet1()
Creates an instance

Field Summary

Modifier and Type Field and Description
Map<String, SealedMediaType> content = Map.ofEntries(
    new AbstractMap.SimpleEntry<>("application/xml", new ApplicationxmlMediaType()),
    new AbstractMap.SimpleEntry<>("application/json", new ApplicationjsonMediaType())
)
the contentType to schema info

Method Summary

Modifier and Type Method and Description
ApiResponse<SealedResponseBody, Void> deserialize(HttpResponse<byte[]> response, SchemaConfiguration configuration)
called by endpoint when deserialize responses

[Back to top] [Back to Component Responses] [Back to README]