func (r *GetForRepoResponse) HTTPResponse() *http.Response {
	return r.httpResponse
}
HTTPResponse returns the *http.Response
package codesofconduct
import (
	"context"
	"fmt"
	components "github.com/willabides/octo-go/components"
	requests "github.com/willabides/octo-go/requests"
	"net/http"
)
func GetAllCodesOfConduct(ctx context.Context, req *GetAllCodesOfConductReq, opt ...requests.Option) (*GetAllCodesOfConductResponse, error) {
	opts := requests.BuildOptions(opt...)
	if req == nil {
		req = new(GetAllCodesOfConductReq)
	}
	resp := &GetAllCodesOfConductResponse{}
	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) GetAllCodesOfConduct(ctx context.Context, req *GetAllCodesOfConductReq, opt ...requests.Option) (*GetAllCodesOfConductResponse, error) {
	return GetAllCodesOfConduct(ctx, req, append(c, opt...)...)
}
type GetAllCodesOfConductReq struct {
	_url string
	ScarletWitchPreview bool
}
func (r *GetAllCodesOfConductReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error) {
	return buildHTTPRequest(ctx, buildHTTPRequestOptions{
		AllPreviews:      []string{"scarlet-witch"},
		ExplicitURL:      r._url,
		HeaderVals:       map[string]*string{"accept": strPtr("application/json")},
		Method:           "GET",
		Options:          opt,
		Previews:         map[string]bool{"scarlet-witch": r.ScarletWitchPreview},
		RequiredPreviews: []string{"scarlet-witch"},
		URLPath:          fmt.Sprintf("/codes_of_conduct"),
	})
}
func (r *GetAllCodesOfConductReq) Rel(link string, resp *GetAllCodesOfConductResponse) bool {
	u := getRelLink(resp.HTTPResponse(), link)
	if u == "" {
		return false
	}
	r._url = u
	return true
}
type GetAllCodesOfConductResponse struct {
	httpResponse *http.Response
	Data         []components.CodeOfConduct
}
func (r *GetAllCodesOfConductResponse) HTTPResponse() *http.Response {
	return r.httpResponse
}
func (r *GetAllCodesOfConductResponse) ReadResponse(resp *http.Response) error {
	r.httpResponse = resp
	err := responseErrorCheck(resp, []int{200, 304})
	if err != nil {
		return err
	}
	if intInSlice(resp.StatusCode, []int{200}) {
		err = unmarshalResponseBody(resp, &r.Data)
		if err != nil {
			return err
		}
	}
	return nil
}
func GetConductCode(ctx context.Context, req *GetConductCodeReq, opt ...requests.Option) (*GetConductCodeResponse, error) {
	opts := requests.BuildOptions(opt...)
	if req == nil {
		req = new(GetConductCodeReq)
	}
	resp := &GetConductCodeResponse{}
	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) GetConductCode(ctx context.Context, req *GetConductCodeReq, opt ...requests.Option) (*GetConductCodeResponse, error) {
	return GetConductCode(ctx, req, append(c, opt...)...)
}
type GetConductCodeReq struct {
	_url string
	Key string
	ScarletWitchPreview bool
}
func (r *GetConductCodeReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error) {
	return buildHTTPRequest(ctx, buildHTTPRequestOptions{
		AllPreviews:      []string{"scarlet-witch"},
		ExplicitURL:      r._url,
		HeaderVals:       map[string]*string{"accept": strPtr("application/json")},
		Method:           "GET",
		Options:          opt,
		Previews:         map[string]bool{"scarlet-witch": r.ScarletWitchPreview},
		RequiredPreviews: []string{"scarlet-witch"},
		URLPath:          fmt.Sprintf("/codes_of_conduct/%v", r.Key),
	})
}
func (r *GetConductCodeReq) Rel(link string, resp *GetConductCodeResponse) bool {
	u := getRelLink(resp.HTTPResponse(), link)
	if u == "" {
		return false
	}
	r._url = u
	return true
}
type GetConductCodeResponse struct {
	httpResponse *http.Response
	Data         components.CodeOfConduct
}
func (r *GetConductCodeResponse) HTTPResponse() *http.Response {
	return r.httpResponse
}
func (r *GetConductCodeResponse) ReadResponse(resp *http.Response) error {
	r.httpResponse = resp
	err := responseErrorCheck(resp, []int{200, 304})
	if err != nil {
		return err
	}
	if intInSlice(resp.StatusCode, []int{200}) {
		err = unmarshalResponseBody(resp, &r.Data)
		if err != nil {
			return err
		}
	}
	return nil
}
func GetForRepo(ctx context.Context, req *GetForRepoReq, opt ...requests.Option) (*GetForRepoResponse, error) {
	opts := requests.BuildOptions(opt...)
	if req == nil {
		req = new(GetForRepoReq)
	}
	resp := &GetForRepoResponse{}
	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) GetForRepo(ctx context.Context, req *GetForRepoReq, opt ...requests.Option) (*GetForRepoResponse, error) {
	return GetForRepo(ctx, req, append(c, opt...)...)
}
type GetForRepoReq struct {
	_url  string
	Owner string
	Repo  string
	ScarletWitchPreview bool
}
func (r *GetForRepoReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error) {
	return buildHTTPRequest(ctx, buildHTTPRequestOptions{
		AllPreviews:      []string{"scarlet-witch"},
		ExplicitURL:      r._url,
		HeaderVals:       map[string]*string{"accept": strPtr("application/json")},
		Method:           "GET",
		Options:          opt,
		Previews:         map[string]bool{"scarlet-witch": r.ScarletWitchPreview},
		RequiredPreviews: []string{"scarlet-witch"},
		URLPath:          fmt.Sprintf("/repos/%v/%v/community/code_of_conduct", r.Owner, r.Repo),
	})
}
func (r *GetForRepoReq) Rel(link string, resp *GetForRepoResponse) bool {
	u := getRelLink(resp.HTTPResponse(), link)
	if u == "" {
		return false
	}
	r._url = u
	return true
}
type GetForRepoResponse struct {
	httpResponse *http.Response
	Data         components.CodeOfConduct
}