func (r *DownloadArchiveForOrgResponse) HTTPResponse() *http.Response {
	return r.httpResponse
}
HTTPResponse returns the *http.Response
package migrations
import (
	"context"
	"fmt"
	components "github.com/willabides/octo-go/components"
	requests "github.com/willabides/octo-go/requests"
	"net/http"
	"net/url"
	"strconv"
)
func CancelImport(ctx context.Context, req *CancelImportReq, opt ...requests.Option) (*CancelImportResponse, error) {
	opts := requests.BuildOptions(opt...)
	if req == nil {
		req = new(CancelImportReq)
	}
	resp := &CancelImportResponse{}
	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) CancelImport(ctx context.Context, req *CancelImportReq, opt ...requests.Option) (*CancelImportResponse, error) {
	return CancelImport(ctx, req, append(c, opt...)...)
}
type CancelImportReq struct {
	_url  string
	Owner string
	Repo  string
}
func (r *CancelImportReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error) {
	return buildHTTPRequest(ctx, buildHTTPRequestOptions{
		ExplicitURL: r._url,
		Method:      "DELETE",
		Options:     opt,
		URLPath:     fmt.Sprintf("/repos/%v/%v/import", r.Owner, r.Repo),
	})
}
func (r *CancelImportReq) Rel(link string, resp *CancelImportResponse) bool {
	u := getRelLink(resp.HTTPResponse(), link)
	if u == "" {
		return false
	}
	r._url = u
	return true
}
type CancelImportResponse struct {
	httpResponse *http.Response
}
func (r *CancelImportResponse) HTTPResponse() *http.Response {
	return r.httpResponse
}
func (r *CancelImportResponse) ReadResponse(resp *http.Response) error {
	r.httpResponse = resp
	err := responseErrorCheck(resp, []int{204})
	if err != nil {
		return err
	}
	return nil
}
func DeleteArchiveForAuthenticatedUser(ctx context.Context, req *DeleteArchiveForAuthenticatedUserReq, opt ...requests.Option) (*DeleteArchiveForAuthenticatedUserResponse, error) {
	opts := requests.BuildOptions(opt...)
	if req == nil {
		req = new(DeleteArchiveForAuthenticatedUserReq)
	}
	resp := &DeleteArchiveForAuthenticatedUserResponse{}
	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) DeleteArchiveForAuthenticatedUser(ctx context.Context, req *DeleteArchiveForAuthenticatedUserReq, opt ...requests.Option) (*DeleteArchiveForAuthenticatedUserResponse, error) {
	return DeleteArchiveForAuthenticatedUser(ctx, req, append(c, opt...)...)
}
type DeleteArchiveForAuthenticatedUserReq struct {
	_url string
	MigrationId int64
	WyandottePreview bool
}
func (r *DeleteArchiveForAuthenticatedUserReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error) {
	return buildHTTPRequest(ctx, buildHTTPRequestOptions{
		AllPreviews:      []string{"wyandotte"},
		ExplicitURL:      r._url,
		Method:           "DELETE",
		Options:          opt,
		Previews:         map[string]bool{"wyandotte": r.WyandottePreview},
		RequiredPreviews: []string{"wyandotte"},
		URLPath:          fmt.Sprintf("/user/migrations/%v/archive", r.MigrationId),
	})
}
func (r *DeleteArchiveForAuthenticatedUserReq) Rel(link string, resp *DeleteArchiveForAuthenticatedUserResponse) bool {
	u := getRelLink(resp.HTTPResponse(), link)
	if u == "" {
		return false
	}
	r._url = u
	return true
}
type DeleteArchiveForAuthenticatedUserResponse struct {
	httpResponse *http.Response
}
func (r *DeleteArchiveForAuthenticatedUserResponse) HTTPResponse() *http.Response {
	return r.httpResponse
}
func (r *DeleteArchiveForAuthenticatedUserResponse) ReadResponse(resp *http.Response) error {
	r.httpResponse = resp
	err := responseErrorCheck(resp, []int{204, 304})
	if err != nil {
		return err
	}
	return nil
}
func DeleteArchiveForOrg(ctx context.Context, req *DeleteArchiveForOrgReq, opt ...requests.Option) (*DeleteArchiveForOrgResponse, error) {
	opts := requests.BuildOptions(opt...)
	if req == nil {
		req = new(DeleteArchiveForOrgReq)
	}
	resp := &DeleteArchiveForOrgResponse{}
	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) DeleteArchiveForOrg(ctx context.Context, req *DeleteArchiveForOrgReq, opt ...requests.Option) (*DeleteArchiveForOrgResponse, error) {
	return DeleteArchiveForOrg(ctx, req, append(c, opt...)...)
}
type DeleteArchiveForOrgReq struct {
	_url string
	Org  string
	MigrationId int64
	WyandottePreview bool
}
func (r *DeleteArchiveForOrgReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error) {
	return buildHTTPRequest(ctx, buildHTTPRequestOptions{
		AllPreviews:      []string{"wyandotte"},
		ExplicitURL:      r._url,
		Method:           "DELETE",
		Options:          opt,
		Previews:         map[string]bool{"wyandotte": r.WyandottePreview},
		RequiredPreviews: []string{"wyandotte"},
		URLPath:          fmt.Sprintf("/orgs/%v/migrations/%v/archive", r.Org, r.MigrationId),
	})
}
func (r *DeleteArchiveForOrgReq) Rel(link string, resp *DeleteArchiveForOrgResponse) bool {
	u := getRelLink(resp.HTTPResponse(), link)
	if u == "" {
		return false
	}
	r._url = u
	return true
}
type DeleteArchiveForOrgResponse struct {
	httpResponse *http.Response
	Data         bool
}
func (r *DeleteArchiveForOrgResponse) HTTPResponse() *http.Response {
	return r.httpResponse
}
func (r *DeleteArchiveForOrgResponse) ReadResponse(resp *http.Response) error {
	r.httpResponse = resp
	err := responseErrorCheck(resp, []int{204, 404})
	if err != nil {
		return err
	}
	err = setBoolResult(resp, &r.Data)
	if err != nil {
		return err
	}
	return nil
}
func DownloadArchiveForOrg(ctx context.Context, req *DownloadArchiveForOrgReq, opt ...requests.Option) (*DownloadArchiveForOrgResponse, error) {
	opts := requests.BuildOptions(opt...)
	if req == nil {
		req = new(DownloadArchiveForOrgReq)
	}
	resp := &DownloadArchiveForOrgResponse{}
	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) DownloadArchiveForOrg(ctx context.Context, req *DownloadArchiveForOrgReq, opt ...requests.Option) (*DownloadArchiveForOrgResponse, error) {
	return DownloadArchiveForOrg(ctx, req, append(c, opt...)...)
}
type DownloadArchiveForOrgReq struct {
	_url string
	Org  string
	MigrationId int64
	WyandottePreview bool
}
func (r *DownloadArchiveForOrgReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error) {
	return buildHTTPRequest(ctx, buildHTTPRequestOptions{
		AllPreviews:      []string{"wyandotte"},
		ExplicitURL:      r._url,
		Method:           "GET",
		Options:          opt,
		Previews:         map[string]bool{"wyandotte": r.WyandottePreview},
		RequiredPreviews: []string{"wyandotte"},
		URLPath:          fmt.Sprintf("/orgs/%v/migrations/%v/archive", r.Org, r.MigrationId),
	})
}
func (r *DownloadArchiveForOrgReq) Rel(link string, resp *DownloadArchiveForOrgResponse) bool {
	u := getRelLink(resp.HTTPResponse(), link)
	if u == "" {
		return false
	}
	r._url = u
	return true
}
type DownloadArchiveForOrgResponse struct {
	httpResponse *http.Response
}