// Code generated by github.com/Khan/genqlient, DO NOT EDIT.

package gql

import (
	"context"

	"github.com/Khan/genqlient/graphql"
)

type WorkGenerateInput struct {
	Hash                 string `json:"hash"`
	DifficultyMultiplier int    `json:"difficultyMultiplier"`
	BlockAward           bool   `json:"blockAward"`
}

// GetHash returns WorkGenerateInput.Hash, and is useful for accessing the field via an interface.
func (v *WorkGenerateInput) GetHash() string { return v.Hash }

// GetDifficultyMultiplier returns WorkGenerateInput.DifficultyMultiplier, and is useful for accessing the field via an interface.
func (v *WorkGenerateInput) GetDifficultyMultiplier() int { return v.DifficultyMultiplier }

// GetBlockAward returns WorkGenerateInput.BlockAward, and is useful for accessing the field via an interface.
func (v *WorkGenerateInput) GetBlockAward() bool { return v.BlockAward }

// __workGenerateInput is used internally by genqlient
type __workGenerateInput struct {
	Input WorkGenerateInput `json:"input"`
}

// GetInput returns __workGenerateInput.Input, and is useful for accessing the field via an interface.
func (v *__workGenerateInput) GetInput() WorkGenerateInput { return v.Input }

// workGenerateResponse is returned by workGenerate on success.
type workGenerateResponse struct {
	WorkGenerate string `json:"workGenerate"`
}

// GetWorkGenerate returns workGenerateResponse.WorkGenerate, and is useful for accessing the field via an interface.
func (v *workGenerateResponse) GetWorkGenerate() string { return v.WorkGenerate }

func workGenerate(
	ctx context.Context,
	client graphql.Client,
	input WorkGenerateInput,
) (*workGenerateResponse, error) {
	req := &graphql.Request{
		OpName: "workGenerate",
		Query: `
mutation workGenerate ($input: WorkGenerateInput!) {
	workGenerate(input: $input)
}
`,
		Variables: &__workGenerateInput{
			Input: input,
		},
	}
	var err error

	var data workGenerateResponse
	resp := &graphql.Response{Data: &data}

	err = client.MakeRequest(
		ctx,
		req,
		resp,
	)

	return &data, err
}
