text: // Copyright (c) Microsoft Corporation. All rights reserved.
  // Licensed under the MIT License.
  
  // WARNING! Do not edit this file manually, your changes will be overwritten.
  
  #pragma once
  
  #ifndef QUERYCLIENT_H
  #define QUERYCLIENT_H
  
  #include "graphqlservice/GraphQLClient.h"
  #include "graphqlservice/GraphQLParse.h"
  #include "graphqlservice/GraphQLResponse.h"
  
  #include "graphqlservice/internal/Version.h"
  
  // Check if the library version is compatible with clientgen 4.0.0
  static_assert(graphql::internal::MajorVersion == 4, "regenerate with clientgen: major version mismatch");
  static_assert(graphql::internal::MinorVersion == 0, "regenerate with clientgen: minor version mismatch");
  
  #include <optional>
  #include <string>
  #include <vector>
  
  /// <summary>
  /// Operation: query (unnamed)
  /// </summary>
  /// <code class="language-graphql">
  /// # Copyright (c) Microsoft Corporation. All rights reserved.
  /// # Licensed under the MIT License.
  /// 
  /// query {
  ///   appointments {
  ///     edges {
  ///       node {
  ///         id
  ///         subject
  ///         when
  ///         isNow
  ///         __typename
  ///       }
  ///     }
  ///   }
  ///   tasks {
  ///     edges {
  ///       node {
  ///         id
  ///         title
  ///         isComplete
  ///         __typename
  ///       }
  ///     }
  ///   }
  ///   unreadCounts {
  ///     edges {
  ///       node {
  ///         id
  ///         name
  ///         unreadCount
  ///         __typename
  ///       }
  ///     }
  ///   }
  /// 
  ///   # Read a field with an enum type
  ///   testTaskState
  /// 
  ///   # Try a field with a union type
  ///   anyType(ids: ["ZmFrZVRhc2tJZA=="]) {
  ///     __typename
  ///     ...on Node {
  ///       id
  ///     }
  ///     ...on Task {
  ///       id
  ///       title
  ///       isComplete
  ///     }
  ///     ...on Appointment {
  ///       id
  ///       subject
  ///       when
  ///       isNow
  ///     }
  ///   }
  /// }
  /// </code>
  namespace graphql::client::query::Query {
  
  // Return the original text of the request document.
  const std::string& GetRequestText() noexcept;
  
  // Return a pre-parsed, pre-validated request object.
  const peg::ast& GetRequestObject() noexcept;
  
  enum class TaskState
  {
  	New,
  	Started,
  	Complete,
  	Unassigned,
  };
  
  struct Response
  {
  	struct appointments_AppointmentConnection
  	{
  		struct edges_AppointmentEdge
  		{
  			struct node_Appointment
  			{
  				response::IdType id {};
  				std::optional<std::string> subject {};
  				std::optional<response::Value> when {};
  				bool isNow {};
  				std::string _typename {};
  			};
  
  			std::optional<node_Appointment> node {};
  		};
  
  		std::optional<std::vector<std::optional<edges_AppointmentEdge>>> edges {};
  	};
  
  	struct tasks_TaskConnection
  	{
  		struct edges_TaskEdge
  		{
  			struct node_Task
  			{
  				response::IdType id {};
  				std::optional<std::string> title {};
  				bool isComplete {};
  				std::string _typename {};
  			};
  
  			std::optional<node_Task> node {};
  		};
  
  		std::optional<std::vector<std::optional<edges_TaskEdge>>> edges {};
  	};
  
  	struct unreadCounts_FolderConnection
  	{
  		struct edges_FolderEdge
  		{
  			struct node_Folder
  			{
  				response::IdType id {};
  				std::optional<std::string> name {};
  				int unreadCount {};
  				std::string _typename {};
  			};
  
  			std::optional<node_Folder> node {};
  		};
  
  		std::optional<std::vector<std::optional<edges_FolderEdge>>> edges {};
  	};
  
  	struct anyType_UnionType
  	{
  		std::string _typename {};
  		response::IdType id {};
  		std::optional<std::string> title {};
  		bool isComplete {};
  		std::optional<std::string> subject {};
  		std::optional<response::Value> when {};
  		bool isNow {};
  	};
  
  	appointments_AppointmentConnection appointments {};
  	tasks_TaskConnection tasks {};
  	unreadCounts_FolderConnection unreadCounts {};
  	TaskState testTaskState {};
  	std::vector<std::optional<anyType_UnionType>> anyType {};
  };
  
  Response parseResponse(response::Value response);
  
  } // namespace graphql::client::query::Query
  
  #endif // QUERYCLIENT_H
  