import gql from 'graphql-tag';
import { Injectable } from '@angular/core';
import * as Apollo from 'apollo-angular';
export type Maybe<T> = T | null;
export type Exact<T extends { [key: string]: any }> = { [K in keyof T]: T[K] };
/** All built-in and custom scalars, mapped to their actual values */
export type Scalars = {
  ID: string;
  String: string;
  Boolean: boolean;
  Int: number;
  Float: number;
  /** The `Upload` scalar type represents a file upload. */
  Upload: any;
};



export type Pizza = {
  __typename?: 'Pizza';
  id: Scalars['ID'];
  name: Scalars['String'];
  toppings: Array<Topping>;
};

export type Topping = {
  __typename?: 'Topping';
  id: Scalars['ID'];
  name: Scalars['String'];
};

export type Query = {
  __typename?: 'Query';
  getPizzaById: Pizza;
  getToppingById: Topping;
  getPizzaByName: Pizza;
  getToppingByName: Topping;
  listPizza: Array<Maybe<Pizza>>;
  listTopping: Array<Maybe<Topping>>;
};


export type QueryGetPizzaByIdArgs = {
  pizzaId: Scalars['ID'];
};


export type QueryGetToppingByIdArgs = {
  toppingId: Scalars['ID'];
};


export type QueryGetPizzaByNameArgs = {
  pizzaName: Scalars['ID'];
};


export type QueryGetToppingByNameArgs = {
  toppingName: Scalars['ID'];
};

export type ChangePizzaDto = {
  name: Scalars['String'];
  toppingIds: Array<Maybe<Scalars['ID']>>;
};

export type ChangeToppingDto = {
  name: Scalars['String'];
};

export type Mutation = {
  __typename?: 'Mutation';
  createPizza: Pizza;
  updatePizza: Pizza;
  createTopping: Topping;
  updateTopping: Topping;
  deleteTopping: Topping;
  deletePizza: Pizza;
};


export type MutationCreatePizzaArgs = {
  createPizzaDto?: Maybe<ChangePizzaDto>;
};


export type MutationUpdatePizzaArgs = {
  pizzaId: Scalars['ID'];
  updatedPizzaDto: ChangePizzaDto;
};


export type MutationCreateToppingArgs = {
  createToppingDto?: Maybe<ChangeToppingDto>;
};


export type MutationUpdateToppingArgs = {
  toppingId: Scalars['ID'];
  updatedToppingDto: ChangeToppingDto;
};


export type MutationDeleteToppingArgs = {
  toppingId: Scalars['ID'];
};


export type MutationDeletePizzaArgs = {
  pizzaId: Scalars['ID'];
};

export type Subscription = {
  __typename?: 'Subscription';
  pizzasChanged: Array<Maybe<Pizza>>;
  toppingsChanged: Array<Maybe<Topping>>;
};

export enum CacheControlScope {
  Public = 'PUBLIC',
  Private = 'PRIVATE'
}


export type ToppingChangedSubscriptionVariables = Exact<{ [key: string]: never; }>;


export type ToppingChangedSubscription = (
  { __typename?: 'Subscription' }
  & { toppingsChanged: Array<Maybe<(
    { __typename?: 'Topping' }
    & Pick<Topping, 'id' | 'name'>
  )>> }
);

export type ListToppingsForPizzaCreateQueryVariables = Exact<{ [key: string]: never; }>;


export type ListToppingsForPizzaCreateQuery = (
  { __typename?: 'Query' }
  & { listTopping: Array<Maybe<(
    { __typename?: 'Topping' }
    & Pick<Topping, 'id' | 'name'>
  )>> }
);

export type CreatePizzaMutationVariables = Exact<{
  createPizzaDto?: Maybe<ChangePizzaDto>;
}>;


export type CreatePizzaMutation = (
  { __typename?: 'Mutation' }
  & { createPizza: (
    { __typename?: 'Pizza' }
    & Pick<Pizza, 'name'>
  ) }
);

export type PizzaWithToppingChangedSubscriptionVariables = Exact<{ [key: string]: never; }>;


export type PizzaWithToppingChangedSubscription = (
  { __typename?: 'Subscription' }
  & { pizzasChanged: Array<Maybe<(
    { __typename?: 'Pizza' }
    & Pick<Pizza, 'id' | 'name'>
    & { toppings: Array<(
      { __typename?: 'Topping' }
      & Pick<Topping, 'name'>
    )> }
  )>> }
);

export type ListPizzaWithToppingQueryVariables = Exact<{ [key: string]: never; }>;


export type ListPizzaWithToppingQuery = (
  { __typename?: 'Query' }
  & { listPizza: Array<Maybe<(
    { __typename?: 'Pizza' }
    & Pick<Pizza, 'id' | 'name'>
    & { toppings: Array<(
      { __typename?: 'Topping' }
      & Pick<Topping, 'name'>
    )> }
  )>> }
);

export type PizzaChangedSubscriptionVariables = Exact<{ [key: string]: never; }>;


export type PizzaChangedSubscription = (
  { __typename?: 'Subscription' }
  & { pizzasChanged: Array<Maybe<(
    { __typename?: 'Pizza' }
    & Pick<Pizza, 'id' | 'name'>
  )>> }
);

export type ListPizzaQueryVariables = Exact<{ [key: string]: never; }>;


export type ListPizzaQuery = (
  { __typename?: 'Query' }
  & { listPizza: Array<Maybe<(
    { __typename?: 'Pizza' }
    & Pick<Pizza, 'id' | 'name'>
  )>> }
);

export type CreateToppingMutationVariables = Exact<{
  createToppingDto?: Maybe<ChangeToppingDto>;
}>;


export type CreateToppingMutation = (
  { __typename?: 'Mutation' }
  & { createTopping: (
    { __typename?: 'Topping' }
    & Pick<Topping, 'name'>
  ) }
);

export const ToppingChangedDocument = gql`
    subscription ToppingChanged {
  toppingsChanged {
    id
    name
  }
}
    `;

  @Injectable({
    providedIn: 'root'
  })
  export class ToppingChangedGQL extends Apollo.Subscription<ToppingChangedSubscription, ToppingChangedSubscriptionVariables> {
    document = ToppingChangedDocument;
    
  }
export const ListToppingsForPizzaCreateDocument = gql`
    query ListToppingsForPizzaCreate {
  listTopping {
    id
    name
  }
}
    `;

  @Injectable({
    providedIn: 'root'
  })
  export class ListToppingsForPizzaCreateGQL extends Apollo.Query<ListToppingsForPizzaCreateQuery, ListToppingsForPizzaCreateQueryVariables> {
    document = ListToppingsForPizzaCreateDocument;
    
  }
export const CreatePizzaDocument = gql`
    mutation CreatePizza($createPizzaDto: ChangePizzaDto) {
  createPizza(createPizzaDto: $createPizzaDto) {
    name
  }
}
    `;

  @Injectable({
    providedIn: 'root'
  })
  export class CreatePizzaGQL extends Apollo.Mutation<CreatePizzaMutation, CreatePizzaMutationVariables> {
    document = CreatePizzaDocument;
    
  }
export const PizzaWithToppingChangedDocument = gql`
    subscription PizzaWithToppingChanged {
  pizzasChanged {
    id
    name
    toppings {
      name
    }
  }
}
    `;

  @Injectable({
    providedIn: 'root'
  })
  export class PizzaWithToppingChangedGQL extends Apollo.Subscription<PizzaWithToppingChangedSubscription, PizzaWithToppingChangedSubscriptionVariables> {
    document = PizzaWithToppingChangedDocument;
    
  }
export const ListPizzaWithToppingDocument = gql`
    query ListPizzaWithTopping {
  listPizza {
    id
    name
    toppings {
      name
    }
  }
}
    `;

  @Injectable({
    providedIn: 'root'
  })
  export class ListPizzaWithToppingGQL extends Apollo.Query<ListPizzaWithToppingQuery, ListPizzaWithToppingQueryVariables> {
    document = ListPizzaWithToppingDocument;
    
  }
export const PizzaChangedDocument = gql`
    subscription PizzaChanged {
  pizzasChanged {
    id
    name
  }
}
    `;

  @Injectable({
    providedIn: 'root'
  })
  export class PizzaChangedGQL extends Apollo.Subscription<PizzaChangedSubscription, PizzaChangedSubscriptionVariables> {
    document = PizzaChangedDocument;
    
  }
export const ListPizzaDocument = gql`
    query ListPizza {
  listPizza {
    id
    name
  }
}
    `;

  @Injectable({
    providedIn: 'root'
  })
  export class ListPizzaGQL extends Apollo.Query<ListPizzaQuery, ListPizzaQueryVariables> {
    document = ListPizzaDocument;
    
  }
export const CreateToppingDocument = gql`
    mutation CreateTopping($createToppingDto: ChangeToppingDto) {
  createTopping(createToppingDto: $createToppingDto) {
    name
  }
}
    `;

  @Injectable({
    providedIn: 'root'
  })
  export class CreateToppingGQL extends Apollo.Mutation<CreateToppingMutation, CreateToppingMutationVariables> {
    document = CreateToppingDocument;
    
  }