func (c Client) ListAnnotations(ctx context.Context, req *ListAnnotationsReq, opt ...requests.Option) (*ListAnnotationsResponse, error) {
	return ListAnnotations(ctx, req, append(c, opt...)...)
}
/*
ListAnnotations performs requests for "checks/list-annotations"

List check run annotations.

GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations

https://developer.github.com/v3/checks/runs/#list-check-run-annotations

Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
package checks
import (
	"context"
	"fmt"
	components "github.com/willabides/octo-go/components"
	requests "github.com/willabides/octo-go/requests"
	"net/http"
	"net/url"
	"strconv"
)
func Create(ctx context.Context, req *CreateReq, opt ...requests.Option) (*CreateResponse, error) {
	opts := requests.BuildOptions(opt...)
	if req == nil {
		req = new(CreateReq)
	}
	resp := &CreateResponse{}
	httpReq, err := req.HTTPRequest(ctx, opt...)
	if err != nil {
		return nil, err
	}
	r, err := opts.HttpClient().Do(httpReq)
	if err != nil {
		return nil, err
	}
	err = resp.ReadResponse(r)
	if err != nil {
		return nil, err
	}
	return resp, nil
}
func (c Client) Create(ctx context.Context, req *CreateReq, opt ...requests.Option) (*CreateResponse, error) {
	return Create(ctx, req, append(c, opt...)...)
}
type CreateReq struct {
	_url        string
	Owner       string
	Repo        string
	RequestBody CreateReqBody
	AntiopePreview bool
}
func (r *CreateReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error) {
	return buildHTTPRequest(ctx, buildHTTPRequestOptions{
		AllPreviews: []string{"antiope"},
		Body:        r.RequestBody,
		ExplicitURL: r._url,
		HeaderVals: map[string]*string{
			"accept":       strPtr("application/json"),
			"content-type": strPtr("application/json"),
		},
		Method:           "POST",
		Options:          opt,
		Previews:         map[string]bool{"antiope": r.AntiopePreview},
		RequiredPreviews: []string{"antiope"},
		URLPath:          fmt.Sprintf("/repos/%v/%v/check-runs", r.Owner, r.Repo),
	})
}
func (r *CreateReq) Rel(link string, resp *CreateResponse) bool {
	u := getRelLink(resp.HTTPResponse(), link)
	if u == "" {
		return false
	}
	r._url = u
	return true
}
type CreateReqBodyActions struct {
	Description *string `json:"description"`
	Identifier *string `json:"identifier"`
	Label *string `json:"label"`
}
type CreateReqBodyOutput struct {
	Annotations []CreateReqBodyOutputAnnotations `json:"annotations,omitempty"`
	Images []CreateReqBodyOutputImages `json:"images,omitempty"`
	Summary *string `json:"summary"`
	Text *string `json:"text,omitempty"`
	Title *string `json:"title"`
}
type CreateReqBodyOutputAnnotations struct {
	AnnotationLevel *string `json:"annotation_level"`
	EndColumn *int64 `json:"end_column,omitempty"`
	EndLine *int64 `json:"end_line"`
	Message *string `json:"message"`
	Path *string `json:"path"`
	RawDetails *string `json:"raw_details,omitempty"`
	StartColumn *int64 `json:"start_column,omitempty"`
	StartLine *int64 `json:"start_line"`
	Title *string `json:"title,omitempty"`
}
type CreateReqBodyOutputImages struct {
	Alt *string `json:"alt"`
	Caption *string `json:"caption,omitempty"`
	ImageUrl *string `json:"image_url"`
}
type CreateReqBody struct {
	Actions []CreateReqBodyActions `json:"actions,omitempty"`
	CompletedAt *string `json:"completed_at,omitempty"`
	Conclusion *string `json:"conclusion,omitempty"`
	DetailsUrl *string `json:"details_url,omitempty"`
	ExternalId *string `json:"external_id,omitempty"`
	HeadSha *string `json:"head_sha"`
	Name *string `json:"name"`
	Output *CreateReqBodyOutput `json:"output,omitempty"`
	StartedAt *string `json:"started_at,omitempty"`
	Status *string `json:"status,omitempty"`
}
type CreateResponse struct {
	httpResponse *http.Response
	Data         components.CheckRun
}
func (r *CreateResponse) HTTPResponse() *http.Response {
	return r.httpResponse
}
func (r *CreateResponse) ReadResponse(resp *http.Response) error {
	r.httpResponse = resp
	err := responseErrorCheck(resp, []int{201})
	if err != nil {
		return err
	}
	if intInSlice(resp.StatusCode, []int{201}) {
		err = unmarshalResponseBody(resp, &r.Data)
		if err != nil {
			return err
		}
	}
	return nil
}
func CreateSuite(ctx context.Context, req *CreateSuiteReq, opt ...requests.Option) (*CreateSuiteResponse, error) {
	opts := requests.BuildOptions(opt...)
	if req == nil {
		req = new(CreateSuiteReq)
	}
	resp := &CreateSuiteResponse{}
	httpReq, err := req.HTTPRequest(ctx, opt...)
	if err != nil {
		return nil, err
	}
	r, err := opts.HttpClient().Do(httpReq)
	if err != nil {
		return nil, err
	}
	err = resp.ReadResponse(r)
	if err != nil {
		return nil, err
	}
	return resp, nil
}
func (c Client) CreateSuite(ctx context.Context, req *CreateSuiteReq, opt ...requests.Option) (*CreateSuiteResponse, error) {
	return CreateSuite(ctx, req, append(c, opt...)...)
}
type CreateSuiteReq struct {
	_url        string
	Owner       string
	Repo        string
	RequestBody CreateSuiteReqBody
	AntiopePreview bool
}
func (r *CreateSuiteReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error) {
	return buildHTTPRequest(ctx, buildHTTPRequestOptions{
		AllPreviews: []string{"antiope"},
		Body:        r.RequestBody,
		ExplicitURL: r._url,
		HeaderVals: map[string]*string{
			"accept":       strPtr("application/json"),
			"content-type": strPtr("application/json"),
		},
		Method:           "POST",
		Options:          opt,
		Previews:         map[string]bool{"antiope": r.AntiopePreview},
		RequiredPreviews: []string{"antiope"},
		URLPath:          fmt.Sprintf("/repos/%v/%v/check-suites", r.Owner, r.Repo),
	})
}
func (r *CreateSuiteReq) Rel(link string, resp *CreateSuiteResponse) bool {
	u := getRelLink(resp.HTTPResponse(), link)
	if u == "" {
		return false
	}
	r._url = u
	return true
}
type CreateSuiteReqBody struct {
	HeadSha *string `json:"head_sha"`
}
type CreateSuiteResponse struct {
	httpResponse *http.Response
	Data         components.CheckSuite
}
func (r *CreateSuiteResponse) HTTPResponse() *http.Response {
	return r.httpResponse
}
func (r *CreateSuiteResponse) ReadResponse(resp *http.Response) error {
	r.httpResponse = resp
	err := responseErrorCheck(resp, []int{201})
	if err != nil {
		return err
	}
	if intInSlice(resp.StatusCode, []int{201}) {
		err = unmarshalResponseBody(resp, &r.Data)
		if err != nil {
			return err
		}
	}
	return nil
}
func Get(ctx context.Context, req *GetReq, opt ...requests.Option) (*GetResponse, error) {
	opts := requests.BuildOptions(opt...)
	if req == nil {
		req = new(GetReq)
	}
	resp := &GetResponse{}
	httpReq, err := req.HTTPRequest(ctx, opt...)
	if err != nil {
		return nil, err
	}
	r, err := opts.HttpClient().Do(httpReq)
	if err != nil {
		return nil, err
	}
	err = resp.ReadResponse(r)
	if err != nil {
		return nil, err
	}
	return resp, nil
}
func (c Client) Get(ctx context.Context, req *GetReq, opt ...requests.Option) (*GetResponse, error) {
	return Get(ctx, req, append(c, opt...)...)
}
type GetReq struct {
	_url  string
	Owner string
	Repo  string
	CheckRunId int64
	AntiopePreview bool
}
func (r *GetReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error) {
	return buildHTTPRequest(ctx, buildHTTPRequestOptions{
		AllPreviews:      []string{"antiope"},
		ExplicitURL:      r._url,
		HeaderVals:       map[string]*string{"accept": strPtr("application/json")},
		Method:           "GET",
		Options:          opt,
		Previews:         map[string]bool{"antiope": r.AntiopePreview},
		RequiredPreviews: []string{"antiope"},
		URLPath:          fmt.Sprintf("/repos/%v/%v/check-runs/%v", r.Owner, r.Repo, r.CheckRunId),
	})
}
func (r *GetReq) Rel(link string, resp *GetResponse) bool {
	u := getRelLink(resp.HTTPResponse(), link)
	if u == "" {
		return false
	}
	r._url = u
	return true
}
type GetResponse struct {
	httpResponse *http.Response
	Data         components.CheckRun
}
func (r *GetResponse) HTTPResponse() *http.Response {
	return r.httpResponse
}
func (r *GetResponse) ReadResponse(resp *http.Response) error {
	r.httpResponse = resp
	err := responseErrorCheck(resp, []int{200})
	if err != nil {
		return err
	}
	if intInSlice(resp.StatusCode, []int{200}) {
		err = unmarshalResponseBody(resp, &r.Data)
		if err != nil {
			return err
		}
	}
	return nil
}
func GetSuite(ctx context.Context, req *GetSuiteReq, opt ...requests.Option) (*GetSuiteResponse, error) {
	opts := requests.BuildOptions(opt...)
	if req == nil {
		req = new(GetSuiteReq)
	}
	resp := &GetSuiteResponse{}
	httpReq, err := req.HTTPRequest(ctx, opt...)
	if err != nil {
		return nil, err
	}
	r, err := opts.HttpClient().Do(httpReq)
	if err != nil {
		return nil, err
	}
	err = resp.ReadResponse(r)
	if err != nil {
		return nil, err
	}
	return resp, nil
}
func (c Client) GetSuite(ctx context.Context, req *GetSuiteReq, opt ...requests.Option) (*GetSuiteResponse, error) {
	return GetSuite(ctx, req, append(c, opt...)...)
}
type GetSuiteReq struct {
	_url  string
	Owner string
	Repo  string
	CheckSuiteId int64
	AntiopePreview bool
}
func (r *GetSuiteReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error) {
	return buildHTTPRequest(ctx, buildHTTPRequestOptions{
		AllPreviews:      []string{"antiope"},
		ExplicitURL:      r._url,
		HeaderVals:       map[string]*string{"accept": strPtr("application/json")},
		Method:           "GET",
		Options:          opt,
		Previews:         map[string]bool{"antiope": r.AntiopePreview},
		RequiredPreviews: []string{"antiope"},
		URLPath:          fmt.Sprintf("/repos/%v/%v/check-suites/%v", r.Owner, r.Repo, r.CheckSuiteId),
	})
}
func (r *GetSuiteReq) Rel(link string, resp *GetSuiteResponse) bool {
	u := getRelLink(resp.HTTPResponse(), link)
	if u == "" {
		return false
	}
	r._url = u
	return true
}
type GetSuiteResponse struct {
	httpResponse *http.Response
	Data         components.CheckSuite
}
func (r *GetSuiteResponse) HTTPResponse() *http.Response {
	return r.httpResponse
}
func (r *GetSuiteResponse) ReadResponse(resp *http.Response) error {
	r.httpResponse = resp
	err := responseErrorCheck(resp, []int{200})
	if err != nil {
		return err
	}
	if intInSlice(resp.StatusCode, []int{200}) {
		err = unmarshalResponseBody(resp, &r.Data)
		if err != nil {
			return err
		}
	}
	return nil
}
func ListAnnotations(ctx context.Context, req *ListAnnotationsReq, opt ...requests.Option) (*ListAnnotationsResponse, error) {
	opts := requests.BuildOptions(opt...)
	if req == nil {
		req = new(ListAnnotationsReq)
	}
	resp := &ListAnnotationsResponse{}
	httpReq, err := req.HTTPRequest(ctx, opt...)
	if err != nil {
		return nil, err
	}
	r, err := opts.HttpClient().Do(httpReq)
	if err != nil {
		return nil, err
	}
	err = resp.ReadResponse(r)
	if err != nil {
		return nil, err
	}
	return resp, nil
}