// Copyright © WireMock.Net using System; using System.Collections.Generic; using AnyOfTypes; using Newtonsoft.Json; using WireMock.Models.GraphQL; namespace WireMock.Models; /// /// GraphQLSchemaDetails /// public class GraphQLSchemaDetails { /// /// The GraphQL schema as a string. /// public string? SchemaAsString { get; set; } /// /// The GraphQL schema as a StringPattern. /// public StringPattern? SchemaAsStringPattern { get; set; } /// /// The GraphQL schema as a . /// public ISchemaData? SchemaAsISchemaData { get; set; } /// /// The GraphQL Schema. /// [JsonIgnore] public AnyOf? Schema { get { if (SchemaAsString != null) { return SchemaAsString; } if (SchemaAsStringPattern != null) { return SchemaAsStringPattern; } if (SchemaAsISchemaData != null) { return new AnyOf(SchemaAsISchemaData); } return null; } } /// /// The custom Scalars to define for this schema. /// public IDictionary? CustomScalars { get; set; } }