func (c Client) CreateRemoveTokenForOrg(ctx context.Context, req *CreateRemoveTokenForOrgReq, opt ...requests.Option) (*CreateRemoveTokenForOrgResponse, error) {
	return CreateRemoveTokenForOrg(ctx, req, append(c, opt...)...)
}
/*
CreateRemoveTokenForOrg performs requests for "actions/create-remove-token-for-org"

Create a remove token for an organization.

POST /orgs/{org}/actions/runners/remove-token

https://developer.github.com/v3/actions/self-hosted-runners/#create-a-remove-token-for-an-organization

Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
package actions
import (
	"context"
	"fmt"
	components "github.com/willabides/octo-go/components"
	requests "github.com/willabides/octo-go/requests"
	"net/http"
	"net/url"
	"strconv"
)
func AddSelectedRepoToOrgSecret(ctx context.Context, req *AddSelectedRepoToOrgSecretReq, opt ...requests.Option) (*AddSelectedRepoToOrgSecretResponse, error) {
	opts := requests.BuildOptions(opt...)
	if req == nil {
		req = new(AddSelectedRepoToOrgSecretReq)
	}
	resp := &AddSelectedRepoToOrgSecretResponse{}
	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) AddSelectedRepoToOrgSecret(ctx context.Context, req *AddSelectedRepoToOrgSecretReq, opt ...requests.Option) (*AddSelectedRepoToOrgSecretResponse, error) {
	return AddSelectedRepoToOrgSecret(ctx, req, append(c, opt...)...)
}
type AddSelectedRepoToOrgSecretReq struct {
	_url string
	Org  string
	SecretName string
	RepositoryId int64
}
func (r *AddSelectedRepoToOrgSecretReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error) {
	return buildHTTPRequest(ctx, buildHTTPRequestOptions{
		ExplicitURL: r._url,
		Method:      "PUT",
		Options:     opt,
		URLPath:     fmt.Sprintf("/orgs/%v/actions/secrets/%v/repositories/%v", r.Org, r.SecretName, r.RepositoryId),
	})
}
func (r *AddSelectedRepoToOrgSecretReq) Rel(link string, resp *AddSelectedRepoToOrgSecretResponse) bool {
	u := getRelLink(resp.HTTPResponse(), link)
	if u == "" {
		return false
	}
	r._url = u
	return true
}
type AddSelectedRepoToOrgSecretResponse struct {
	httpResponse *http.Response
}
func (r *AddSelectedRepoToOrgSecretResponse) HTTPResponse() *http.Response {
	return r.httpResponse
}
func (r *AddSelectedRepoToOrgSecretResponse) ReadResponse(resp *http.Response) error {
	r.httpResponse = resp
	err := responseErrorCheck(resp, []int{204})
	if err != nil {
		return err
	}
	return nil
}
func CancelWorkflowRun(ctx context.Context, req *CancelWorkflowRunReq, opt ...requests.Option) (*CancelWorkflowRunResponse, error) {
	opts := requests.BuildOptions(opt...)
	if req == nil {
		req = new(CancelWorkflowRunReq)
	}
	resp := &CancelWorkflowRunResponse{}
	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) CancelWorkflowRun(ctx context.Context, req *CancelWorkflowRunReq, opt ...requests.Option) (*CancelWorkflowRunResponse, error) {
	return CancelWorkflowRun(ctx, req, append(c, opt...)...)
}
type CancelWorkflowRunReq struct {
	_url  string
	Owner string
	Repo  string
	RunId int64
}
func (r *CancelWorkflowRunReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error) {
	return buildHTTPRequest(ctx, buildHTTPRequestOptions{
		ExplicitURL: r._url,
		Method:      "POST",
		Options:     opt,
		URLPath:     fmt.Sprintf("/repos/%v/%v/actions/runs/%v/cancel", r.Owner, r.Repo, r.RunId),
	})
}
func (r *CancelWorkflowRunReq) Rel(link string, resp *CancelWorkflowRunResponse) bool {
	u := getRelLink(resp.HTTPResponse(), link)
	if u == "" {
		return false
	}
	r._url = u
	return true
}
type CancelWorkflowRunResponse struct {
	httpResponse *http.Response
}
func (r *CancelWorkflowRunResponse) HTTPResponse() *http.Response {
	return r.httpResponse
}
func (r *CancelWorkflowRunResponse) ReadResponse(resp *http.Response) error {
	r.httpResponse = resp
	err := responseErrorCheck(resp, []int{202})
	if err != nil {
		return err
	}
	return nil
}
func CreateOrUpdateOrgSecret(ctx context.Context, req *CreateOrUpdateOrgSecretReq, opt ...requests.Option) (*CreateOrUpdateOrgSecretResponse, error) {
	opts := requests.BuildOptions(opt...)
	if req == nil {
		req = new(CreateOrUpdateOrgSecretReq)
	}
	resp := &CreateOrUpdateOrgSecretResponse{}
	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) CreateOrUpdateOrgSecret(ctx context.Context, req *CreateOrUpdateOrgSecretReq, opt ...requests.Option) (*CreateOrUpdateOrgSecretResponse, error) {
	return CreateOrUpdateOrgSecret(ctx, req, append(c, opt...)...)
}
type CreateOrUpdateOrgSecretReq struct {
	_url string
	Org  string
	SecretName  string
	RequestBody CreateOrUpdateOrgSecretReqBody
}
func (r *CreateOrUpdateOrgSecretReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error) {
	return buildHTTPRequest(ctx, buildHTTPRequestOptions{
		Body:        r.RequestBody,
		ExplicitURL: r._url,
		HeaderVals:  map[string]*string{"content-type": strPtr("application/json")},
		Method:      "PUT",
		Options:     opt,
		URLPath:     fmt.Sprintf("/orgs/%v/actions/secrets/%v", r.Org, r.SecretName),
	})
}
func (r *CreateOrUpdateOrgSecretReq) Rel(link string, resp *CreateOrUpdateOrgSecretResponse) bool {
	u := getRelLink(resp.HTTPResponse(), link)
	if u == "" {
		return false
	}
	r._url = u
	return true
}
type CreateOrUpdateOrgSecretReqBody struct {
	EncryptedValue *string `json:"encrypted_value,omitempty"`
	KeyId *string `json:"key_id,omitempty"`
	SelectedRepositoryIds []string `json:"selected_repository_ids,omitempty"`
	Visibility *string `json:"visibility,omitempty"`
}
type CreateOrUpdateOrgSecretResponse struct {
	httpResponse *http.Response
}
func (r *CreateOrUpdateOrgSecretResponse) HTTPResponse() *http.Response {
	return r.httpResponse
}
func (r *CreateOrUpdateOrgSecretResponse) ReadResponse(resp *http.Response) error {
	r.httpResponse = resp
	err := responseErrorCheck(resp, []int{201, 204})
	if err != nil {
		return err
	}
	return nil
}
func CreateOrUpdateRepoSecret(ctx context.Context, req *CreateOrUpdateRepoSecretReq, opt ...requests.Option) (*CreateOrUpdateRepoSecretResponse, error) {
	opts := requests.BuildOptions(opt...)
	if req == nil {
		req = new(CreateOrUpdateRepoSecretReq)
	}
	resp := &CreateOrUpdateRepoSecretResponse{}
	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) CreateOrUpdateRepoSecret(ctx context.Context, req *CreateOrUpdateRepoSecretReq, opt ...requests.Option) (*CreateOrUpdateRepoSecretResponse, error) {
	return CreateOrUpdateRepoSecret(ctx, req, append(c, opt...)...)
}
type CreateOrUpdateRepoSecretReq struct {
	_url  string
	Owner string
	Repo  string
	SecretName  string
	RequestBody CreateOrUpdateRepoSecretReqBody
}
func (r *CreateOrUpdateRepoSecretReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error) {
	return buildHTTPRequest(ctx, buildHTTPRequestOptions{
		Body:        r.RequestBody,
		ExplicitURL: r._url,
		HeaderVals:  map[string]*string{"content-type": strPtr("application/json")},
		Method:      "PUT",
		Options:     opt,
		URLPath:     fmt.Sprintf("/repos/%v/%v/actions/secrets/%v", r.Owner, r.Repo, r.SecretName),
	})
}
func (r *CreateOrUpdateRepoSecretReq) Rel(link string, resp *CreateOrUpdateRepoSecretResponse) bool {
	u := getRelLink(resp.HTTPResponse(), link)
	if u == "" {
		return false
	}
	r._url = u
	return true
}
type CreateOrUpdateRepoSecretReqBody struct {
	EncryptedValue *string `json:"encrypted_value,omitempty"`
	KeyId *string `json:"key_id,omitempty"`
}
type CreateOrUpdateRepoSecretResponse struct {
	httpResponse *http.Response
}
func (r *CreateOrUpdateRepoSecretResponse) HTTPResponse() *http.Response {
	return r.httpResponse
}
func (r *CreateOrUpdateRepoSecretResponse) ReadResponse(resp *http.Response) error {
	r.httpResponse = resp
	err := responseErrorCheck(resp, []int{201, 204})
	if err != nil {
		return err
	}
	return nil
}
func CreateRegistrationTokenForOrg(ctx context.Context, req *CreateRegistrationTokenForOrgReq, opt ...requests.Option) (*CreateRegistrationTokenForOrgResponse, error) {
	opts := requests.BuildOptions(opt...)
	if req == nil {
		req = new(CreateRegistrationTokenForOrgReq)
	}
	resp := &CreateRegistrationTokenForOrgResponse{}
	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) CreateRegistrationTokenForOrg(ctx context.Context, req *CreateRegistrationTokenForOrgReq, opt ...requests.Option) (*CreateRegistrationTokenForOrgResponse, error) {
	return CreateRegistrationTokenForOrg(ctx, req, append(c, opt...)...)
}
type CreateRegistrationTokenForOrgReq struct {
	_url string
	Org  string
}
func (r *CreateRegistrationTokenForOrgReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error) {
	return buildHTTPRequest(ctx, buildHTTPRequestOptions{
		ExplicitURL: r._url,
		HeaderVals:  map[string]*string{"accept": strPtr("application/json")},
		Method:      "POST",
		Options:     opt,
		URLPath:     fmt.Sprintf("/orgs/%v/actions/runners/registration-token", r.Org),
	})
}
func (r *CreateRegistrationTokenForOrgReq) Rel(link string, resp *CreateRegistrationTokenForOrgResponse) bool {
	u := getRelLink(resp.HTTPResponse(), link)
	if u == "" {
		return false
	}
	r._url = u
	return true
}
type CreateRegistrationTokenForOrgResponse struct {
	httpResponse *http.Response
	Data         components.AuthenticationToken
}
func (r *CreateRegistrationTokenForOrgResponse) HTTPResponse() *http.Response {
	return r.httpResponse
}
func (r *CreateRegistrationTokenForOrgResponse) 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 CreateRegistrationTokenForRepo(ctx context.Context, req *CreateRegistrationTokenForRepoReq, opt ...requests.Option) (*CreateRegistrationTokenForRepoResponse, error) {
	opts := requests.BuildOptions(opt...)
	if req == nil {
		req = new(CreateRegistrationTokenForRepoReq)
	}
	resp := &CreateRegistrationTokenForRepoResponse{}
	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) CreateRegistrationTokenForRepo(ctx context.Context, req *CreateRegistrationTokenForRepoReq, opt ...requests.Option) (*CreateRegistrationTokenForRepoResponse, error) {
	return CreateRegistrationTokenForRepo(ctx, req, append(c, opt...)...)
}
type CreateRegistrationTokenForRepoReq struct {
	_url  string
	Owner string
	Repo  string
}
func (r *CreateRegistrationTokenForRepoReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error) {
	return buildHTTPRequest(ctx, buildHTTPRequestOptions{
		ExplicitURL: r._url,
		HeaderVals:  map[string]*string{"accept": strPtr("application/json")},
		Method:      "POST",
		Options:     opt,
		URLPath:     fmt.Sprintf("/repos/%v/%v/actions/runners/registration-token", r.Owner, r.Repo),
	})
}
func (r *CreateRegistrationTokenForRepoReq) Rel(link string, resp *CreateRegistrationTokenForRepoResponse) bool {
	u := getRelLink(resp.HTTPResponse(), link)
	if u == "" {
		return false
	}
	r._url = u
	return true
}
type CreateRegistrationTokenForRepoResponse struct {
	httpResponse *http.Response
	Data         components.AuthenticationToken
}
func (r *CreateRegistrationTokenForRepoResponse) HTTPResponse() *http.Response {
	return r.httpResponse
}
func (r *CreateRegistrationTokenForRepoResponse) 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 CreateRemoveTokenForOrg(ctx context.Context, req *CreateRemoveTokenForOrgReq, opt ...requests.Option) (*CreateRemoveTokenForOrgResponse, error) {
	opts := requests.BuildOptions(opt...)
	if req == nil {
		req = new(CreateRemoveTokenForOrgReq)
	}
	resp := &CreateRemoveTokenForOrgResponse{}
	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
}