2869 lines
110 KiB
Go
2869 lines
110 KiB
Go
|
// Code generated by go-swagger; DO NOT EDIT.
|
||
|
|
||
|
package issue
|
||
|
|
||
|
// This file was generated by the swagger tool.
|
||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
|
||
|
"github.com/go-openapi/runtime"
|
||
|
httptransport "github.com/go-openapi/runtime/client"
|
||
|
"github.com/go-openapi/strfmt"
|
||
|
)
|
||
|
|
||
|
// New creates a new issue API client.
|
||
|
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
|
||
|
return &Client{transport: transport, formats: formats}
|
||
|
}
|
||
|
|
||
|
// New creates a new issue API client with basic auth credentials.
|
||
|
// It takes the following parameters:
|
||
|
// - host: http host (github.com).
|
||
|
// - basePath: any base path for the API client ("/v1", "/v3").
|
||
|
// - scheme: http scheme ("http", "https").
|
||
|
// - user: user for basic authentication header.
|
||
|
// - password: password for basic authentication header.
|
||
|
func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService {
|
||
|
transport := httptransport.New(host, basePath, []string{scheme})
|
||
|
transport.DefaultAuthentication = httptransport.BasicAuth(user, password)
|
||
|
return &Client{transport: transport, formats: strfmt.Default}
|
||
|
}
|
||
|
|
||
|
// New creates a new issue API client with a bearer token for authentication.
|
||
|
// It takes the following parameters:
|
||
|
// - host: http host (github.com).
|
||
|
// - basePath: any base path for the API client ("/v1", "/v3").
|
||
|
// - scheme: http scheme ("http", "https").
|
||
|
// - bearerToken: bearer token for Bearer authentication header.
|
||
|
func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService {
|
||
|
transport := httptransport.New(host, basePath, []string{scheme})
|
||
|
transport.DefaultAuthentication = httptransport.BearerToken(bearerToken)
|
||
|
return &Client{transport: transport, formats: strfmt.Default}
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
Client for issue API
|
||
|
*/
|
||
|
type Client struct {
|
||
|
transport runtime.ClientTransport
|
||
|
formats strfmt.Registry
|
||
|
}
|
||
|
|
||
|
// ClientOption may be used to customize the behavior of Client methods.
|
||
|
type ClientOption func(*runtime.ClientOperation)
|
||
|
|
||
|
// This client is generated with a few options you might find useful for your swagger spec.
|
||
|
//
|
||
|
// Feel free to add you own set of options.
|
||
|
|
||
|
// WithContentType allows the client to force the Content-Type header
|
||
|
// to negotiate a specific Consumer from the server.
|
||
|
//
|
||
|
// You may use this option to set arbitrary extensions to your MIME media type.
|
||
|
func WithContentType(mime string) ClientOption {
|
||
|
return func(r *runtime.ClientOperation) {
|
||
|
r.ConsumesMediaTypes = []string{mime}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// WithContentTypeApplicationJSON sets the Content-Type header to "application/json".
|
||
|
func WithContentTypeApplicationJSON(r *runtime.ClientOperation) {
|
||
|
r.ConsumesMediaTypes = []string{"application/json"}
|
||
|
}
|
||
|
|
||
|
// WithContentTypeMultipartFormData sets the Content-Type header to "multipart/form-data".
|
||
|
func WithContentTypeMultipartFormData(r *runtime.ClientOperation) {
|
||
|
r.ConsumesMediaTypes = []string{"multipart/form-data"}
|
||
|
}
|
||
|
|
||
|
// WithContentTypeTextPlain sets the Content-Type header to "text/plain".
|
||
|
func WithContentTypeTextPlain(r *runtime.ClientOperation) {
|
||
|
r.ConsumesMediaTypes = []string{"text/plain"}
|
||
|
}
|
||
|
|
||
|
// WithAccept allows the client to force the Accept header
|
||
|
// to negotiate a specific Producer from the server.
|
||
|
//
|
||
|
// You may use this option to set arbitrary extensions to your MIME media type.
|
||
|
func WithAccept(mime string) ClientOption {
|
||
|
return func(r *runtime.ClientOperation) {
|
||
|
r.ProducesMediaTypes = []string{mime}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// WithAcceptApplicationJSON sets the Accept header to "application/json".
|
||
|
func WithAcceptApplicationJSON(r *runtime.ClientOperation) {
|
||
|
r.ProducesMediaTypes = []string{"application/json"}
|
||
|
}
|
||
|
|
||
|
// WithAcceptTextHTML sets the Accept header to "text/html".
|
||
|
func WithAcceptTextHTML(r *runtime.ClientOperation) {
|
||
|
r.ProducesMediaTypes = []string{"text/html"}
|
||
|
}
|
||
|
|
||
|
// ClientService is the interface for Client methods
|
||
|
type ClientService interface {
|
||
|
IssueAddLabel(params *IssueAddLabelParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueAddLabelOK, error)
|
||
|
|
||
|
IssueAddSubscription(params *IssueAddSubscriptionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueAddSubscriptionOK, *IssueAddSubscriptionCreated, error)
|
||
|
|
||
|
IssueAddTime(params *IssueAddTimeParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueAddTimeOK, error)
|
||
|
|
||
|
IssueCheckSubscription(params *IssueCheckSubscriptionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueCheckSubscriptionOK, error)
|
||
|
|
||
|
IssueClearLabels(params *IssueClearLabelsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueClearLabelsNoContent, error)
|
||
|
|
||
|
IssueCreateComment(params *IssueCreateCommentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueCreateCommentCreated, error)
|
||
|
|
||
|
IssueCreateIssue(params *IssueCreateIssueParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueCreateIssueCreated, error)
|
||
|
|
||
|
IssueCreateIssueAttachment(params *IssueCreateIssueAttachmentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueCreateIssueAttachmentCreated, error)
|
||
|
|
||
|
IssueCreateIssueBlocking(params *IssueCreateIssueBlockingParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueCreateIssueBlockingCreated, error)
|
||
|
|
||
|
IssueCreateIssueCommentAttachment(params *IssueCreateIssueCommentAttachmentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueCreateIssueCommentAttachmentCreated, error)
|
||
|
|
||
|
IssueCreateIssueDependencies(params *IssueCreateIssueDependenciesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueCreateIssueDependenciesCreated, error)
|
||
|
|
||
|
IssueCreateLabel(params *IssueCreateLabelParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueCreateLabelCreated, error)
|
||
|
|
||
|
IssueCreateMilestone(params *IssueCreateMilestoneParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueCreateMilestoneCreated, error)
|
||
|
|
||
|
IssueDelete(params *IssueDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueDeleteNoContent, error)
|
||
|
|
||
|
IssueDeleteComment(params *IssueDeleteCommentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueDeleteCommentNoContent, error)
|
||
|
|
||
|
IssueDeleteCommentDeprecated(params *IssueDeleteCommentDeprecatedParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueDeleteCommentDeprecatedNoContent, error)
|
||
|
|
||
|
IssueDeleteCommentReaction(params *IssueDeleteCommentReactionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueDeleteCommentReactionOK, error)
|
||
|
|
||
|
IssueDeleteIssueAttachment(params *IssueDeleteIssueAttachmentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueDeleteIssueAttachmentNoContent, error)
|
||
|
|
||
|
IssueDeleteIssueCommentAttachment(params *IssueDeleteIssueCommentAttachmentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueDeleteIssueCommentAttachmentNoContent, error)
|
||
|
|
||
|
IssueDeleteIssueReaction(params *IssueDeleteIssueReactionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueDeleteIssueReactionOK, error)
|
||
|
|
||
|
IssueDeleteLabel(params *IssueDeleteLabelParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueDeleteLabelNoContent, error)
|
||
|
|
||
|
IssueDeleteMilestone(params *IssueDeleteMilestoneParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueDeleteMilestoneNoContent, error)
|
||
|
|
||
|
IssueDeleteStopWatch(params *IssueDeleteStopWatchParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueDeleteStopWatchNoContent, error)
|
||
|
|
||
|
IssueDeleteSubscription(params *IssueDeleteSubscriptionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueDeleteSubscriptionOK, *IssueDeleteSubscriptionCreated, error)
|
||
|
|
||
|
IssueDeleteTime(params *IssueDeleteTimeParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueDeleteTimeNoContent, error)
|
||
|
|
||
|
IssueEditComment(params *IssueEditCommentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueEditCommentOK, *IssueEditCommentNoContent, error)
|
||
|
|
||
|
IssueEditCommentDeprecated(params *IssueEditCommentDeprecatedParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueEditCommentDeprecatedOK, *IssueEditCommentDeprecatedNoContent, error)
|
||
|
|
||
|
IssueEditIssue(params *IssueEditIssueParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueEditIssueCreated, error)
|
||
|
|
||
|
IssueEditIssueAttachment(params *IssueEditIssueAttachmentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueEditIssueAttachmentCreated, error)
|
||
|
|
||
|
IssueEditIssueCommentAttachment(params *IssueEditIssueCommentAttachmentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueEditIssueCommentAttachmentCreated, error)
|
||
|
|
||
|
IssueEditIssueDeadline(params *IssueEditIssueDeadlineParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueEditIssueDeadlineCreated, error)
|
||
|
|
||
|
IssueEditLabel(params *IssueEditLabelParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueEditLabelOK, error)
|
||
|
|
||
|
IssueEditMilestone(params *IssueEditMilestoneParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueEditMilestoneOK, error)
|
||
|
|
||
|
IssueGetComment(params *IssueGetCommentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueGetCommentOK, *IssueGetCommentNoContent, error)
|
||
|
|
||
|
IssueGetCommentReactions(params *IssueGetCommentReactionsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueGetCommentReactionsOK, error)
|
||
|
|
||
|
IssueGetComments(params *IssueGetCommentsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueGetCommentsOK, error)
|
||
|
|
||
|
IssueGetCommentsAndTimeline(params *IssueGetCommentsAndTimelineParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueGetCommentsAndTimelineOK, error)
|
||
|
|
||
|
IssueGetIssue(params *IssueGetIssueParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueGetIssueOK, error)
|
||
|
|
||
|
IssueGetIssueAttachment(params *IssueGetIssueAttachmentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueGetIssueAttachmentOK, error)
|
||
|
|
||
|
IssueGetIssueCommentAttachment(params *IssueGetIssueCommentAttachmentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueGetIssueCommentAttachmentOK, error)
|
||
|
|
||
|
IssueGetIssueReactions(params *IssueGetIssueReactionsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueGetIssueReactionsOK, error)
|
||
|
|
||
|
IssueGetLabel(params *IssueGetLabelParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueGetLabelOK, error)
|
||
|
|
||
|
IssueGetLabels(params *IssueGetLabelsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueGetLabelsOK, error)
|
||
|
|
||
|
IssueGetMilestone(params *IssueGetMilestoneParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueGetMilestoneOK, error)
|
||
|
|
||
|
IssueGetMilestonesList(params *IssueGetMilestonesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueGetMilestonesListOK, error)
|
||
|
|
||
|
IssueGetRepoComments(params *IssueGetRepoCommentsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueGetRepoCommentsOK, error)
|
||
|
|
||
|
IssueListBlocks(params *IssueListBlocksParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueListBlocksOK, error)
|
||
|
|
||
|
IssueListIssueAttachments(params *IssueListIssueAttachmentsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueListIssueAttachmentsOK, error)
|
||
|
|
||
|
IssueListIssueCommentAttachments(params *IssueListIssueCommentAttachmentsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueListIssueCommentAttachmentsOK, error)
|
||
|
|
||
|
IssueListIssueDependencies(params *IssueListIssueDependenciesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueListIssueDependenciesOK, error)
|
||
|
|
||
|
IssueListIssues(params *IssueListIssuesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueListIssuesOK, error)
|
||
|
|
||
|
IssueListLabels(params *IssueListLabelsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueListLabelsOK, error)
|
||
|
|
||
|
IssuePostCommentReaction(params *IssuePostCommentReactionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssuePostCommentReactionOK, *IssuePostCommentReactionCreated, error)
|
||
|
|
||
|
IssuePostIssueReaction(params *IssuePostIssueReactionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssuePostIssueReactionOK, *IssuePostIssueReactionCreated, error)
|
||
|
|
||
|
IssueRemoveIssueBlocking(params *IssueRemoveIssueBlockingParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueRemoveIssueBlockingOK, error)
|
||
|
|
||
|
IssueRemoveIssueDependencies(params *IssueRemoveIssueDependenciesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueRemoveIssueDependenciesOK, error)
|
||
|
|
||
|
IssueRemoveLabel(params *IssueRemoveLabelParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueRemoveLabelNoContent, error)
|
||
|
|
||
|
IssueReplaceLabels(params *IssueReplaceLabelsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueReplaceLabelsOK, error)
|
||
|
|
||
|
IssueResetTime(params *IssueResetTimeParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueResetTimeNoContent, error)
|
||
|
|
||
|
IssueSearchIssues(params *IssueSearchIssuesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueSearchIssuesOK, error)
|
||
|
|
||
|
IssueStartStopWatch(params *IssueStartStopWatchParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueStartStopWatchCreated, error)
|
||
|
|
||
|
IssueStopStopWatch(params *IssueStopStopWatchParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueStopStopWatchCreated, error)
|
||
|
|
||
|
IssueSubscriptions(params *IssueSubscriptionsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueSubscriptionsOK, error)
|
||
|
|
||
|
IssueTrackedTimes(params *IssueTrackedTimesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueTrackedTimesOK, error)
|
||
|
|
||
|
MoveIssuePin(params *MoveIssuePinParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*MoveIssuePinNoContent, error)
|
||
|
|
||
|
PinIssue(params *PinIssueParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PinIssueNoContent, error)
|
||
|
|
||
|
UnpinIssue(params *UnpinIssueParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UnpinIssueNoContent, error)
|
||
|
|
||
|
SetTransport(transport runtime.ClientTransport)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueAddLabel adds a label to an issue
|
||
|
*/
|
||
|
func (a *Client) IssueAddLabel(params *IssueAddLabelParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueAddLabelOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueAddLabelParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueAddLabel",
|
||
|
Method: "POST",
|
||
|
PathPattern: "/repos/{owner}/{repo}/issues/{index}/labels",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueAddLabelReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*IssueAddLabelOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issueAddLabel: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueAddSubscription subscribes user to issue
|
||
|
*/
|
||
|
func (a *Client) IssueAddSubscription(params *IssueAddSubscriptionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueAddSubscriptionOK, *IssueAddSubscriptionCreated, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueAddSubscriptionParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueAddSubscription",
|
||
|
Method: "PUT",
|
||
|
PathPattern: "/repos/{owner}/{repo}/issues/{index}/subscriptions/{user}",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueAddSubscriptionReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, nil, err
|
||
|
}
|
||
|
switch value := result.(type) {
|
||
|
case *IssueAddSubscriptionOK:
|
||
|
return value, nil, nil
|
||
|
case *IssueAddSubscriptionCreated:
|
||
|
return nil, value, nil
|
||
|
}
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issue: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueAddTime adds tracked time to a issue
|
||
|
*/
|
||
|
func (a *Client) IssueAddTime(params *IssueAddTimeParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueAddTimeOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueAddTimeParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueAddTime",
|
||
|
Method: "POST",
|
||
|
PathPattern: "/repos/{owner}/{repo}/issues/{index}/times",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueAddTimeReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*IssueAddTimeOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issueAddTime: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueCheckSubscription checks if user is subscribed to an issue
|
||
|
*/
|
||
|
func (a *Client) IssueCheckSubscription(params *IssueCheckSubscriptionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueCheckSubscriptionOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueCheckSubscriptionParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueCheckSubscription",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/repos/{owner}/{repo}/issues/{index}/subscriptions/check",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueCheckSubscriptionReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*IssueCheckSubscriptionOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issueCheckSubscription: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueClearLabels removes all labels from an issue
|
||
|
*/
|
||
|
func (a *Client) IssueClearLabels(params *IssueClearLabelsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueClearLabelsNoContent, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueClearLabelsParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueClearLabels",
|
||
|
Method: "DELETE",
|
||
|
PathPattern: "/repos/{owner}/{repo}/issues/{index}/labels",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueClearLabelsReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*IssueClearLabelsNoContent)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issueClearLabels: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueCreateComment adds a comment to an issue
|
||
|
*/
|
||
|
func (a *Client) IssueCreateComment(params *IssueCreateCommentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueCreateCommentCreated, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueCreateCommentParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueCreateComment",
|
||
|
Method: "POST",
|
||
|
PathPattern: "/repos/{owner}/{repo}/issues/{index}/comments",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueCreateCommentReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*IssueCreateCommentCreated)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issueCreateComment: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueCreateIssue creates an issue if using deadline only the date will be taken into account and time of day ignored
|
||
|
*/
|
||
|
func (a *Client) IssueCreateIssue(params *IssueCreateIssueParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueCreateIssueCreated, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueCreateIssueParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueCreateIssue",
|
||
|
Method: "POST",
|
||
|
PathPattern: "/repos/{owner}/{repo}/issues",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueCreateIssueReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*IssueCreateIssueCreated)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issueCreateIssue: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueCreateIssueAttachment creates an issue attachment
|
||
|
*/
|
||
|
func (a *Client) IssueCreateIssueAttachment(params *IssueCreateIssueAttachmentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueCreateIssueAttachmentCreated, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueCreateIssueAttachmentParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueCreateIssueAttachment",
|
||
|
Method: "POST",
|
||
|
PathPattern: "/repos/{owner}/{repo}/issues/{index}/assets",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"multipart/form-data"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueCreateIssueAttachmentReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*IssueCreateIssueAttachmentCreated)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issueCreateIssueAttachment: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueCreateIssueBlocking blocks the issue given in the body by the issue in path
|
||
|
*/
|
||
|
func (a *Client) IssueCreateIssueBlocking(params *IssueCreateIssueBlockingParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueCreateIssueBlockingCreated, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueCreateIssueBlockingParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueCreateIssueBlocking",
|
||
|
Method: "POST",
|
||
|
PathPattern: "/repos/{owner}/{repo}/issues/{index}/blocks",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueCreateIssueBlockingReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*IssueCreateIssueBlockingCreated)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issueCreateIssueBlocking: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueCreateIssueCommentAttachment creates a comment attachment
|
||
|
*/
|
||
|
func (a *Client) IssueCreateIssueCommentAttachment(params *IssueCreateIssueCommentAttachmentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueCreateIssueCommentAttachmentCreated, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueCreateIssueCommentAttachmentParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueCreateIssueCommentAttachment",
|
||
|
Method: "POST",
|
||
|
PathPattern: "/repos/{owner}/{repo}/issues/comments/{id}/assets",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"multipart/form-data"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueCreateIssueCommentAttachmentReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*IssueCreateIssueCommentAttachmentCreated)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issueCreateIssueCommentAttachment: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueCreateIssueDependencies makes the issue in the url depend on the issue in the form
|
||
|
*/
|
||
|
func (a *Client) IssueCreateIssueDependencies(params *IssueCreateIssueDependenciesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueCreateIssueDependenciesCreated, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueCreateIssueDependenciesParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueCreateIssueDependencies",
|
||
|
Method: "POST",
|
||
|
PathPattern: "/repos/{owner}/{repo}/issues/{index}/dependencies",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueCreateIssueDependenciesReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*IssueCreateIssueDependenciesCreated)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issueCreateIssueDependencies: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueCreateLabel creates a label
|
||
|
*/
|
||
|
func (a *Client) IssueCreateLabel(params *IssueCreateLabelParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueCreateLabelCreated, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueCreateLabelParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueCreateLabel",
|
||
|
Method: "POST",
|
||
|
PathPattern: "/repos/{owner}/{repo}/labels",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueCreateLabelReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*IssueCreateLabelCreated)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issueCreateLabel: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueCreateMilestone creates a milestone
|
||
|
*/
|
||
|
func (a *Client) IssueCreateMilestone(params *IssueCreateMilestoneParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueCreateMilestoneCreated, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueCreateMilestoneParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueCreateMilestone",
|
||
|
Method: "POST",
|
||
|
PathPattern: "/repos/{owner}/{repo}/milestones",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueCreateMilestoneReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*IssueCreateMilestoneCreated)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issueCreateMilestone: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueDelete deletes an issue
|
||
|
*/
|
||
|
func (a *Client) IssueDelete(params *IssueDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueDeleteNoContent, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueDeleteParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueDelete",
|
||
|
Method: "DELETE",
|
||
|
PathPattern: "/repos/{owner}/{repo}/issues/{index}",
|
||
|
ProducesMediaTypes: []string{"application/json", "text/html"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueDeleteReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*IssueDeleteNoContent)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issueDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueDeleteComment deletes a comment
|
||
|
*/
|
||
|
func (a *Client) IssueDeleteComment(params *IssueDeleteCommentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueDeleteCommentNoContent, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueDeleteCommentParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueDeleteComment",
|
||
|
Method: "DELETE",
|
||
|
PathPattern: "/repos/{owner}/{repo}/issues/comments/{id}",
|
||
|
ProducesMediaTypes: []string{"application/json", "text/html"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueDeleteCommentReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*IssueDeleteCommentNoContent)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issueDeleteComment: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueDeleteCommentDeprecated deletes a comment
|
||
|
*/
|
||
|
func (a *Client) IssueDeleteCommentDeprecated(params *IssueDeleteCommentDeprecatedParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueDeleteCommentDeprecatedNoContent, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueDeleteCommentDeprecatedParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueDeleteCommentDeprecated",
|
||
|
Method: "DELETE",
|
||
|
PathPattern: "/repos/{owner}/{repo}/issues/{index}/comments/{id}",
|
||
|
ProducesMediaTypes: []string{"application/json", "text/html"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueDeleteCommentDeprecatedReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*IssueDeleteCommentDeprecatedNoContent)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issueDeleteCommentDeprecated: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueDeleteCommentReaction removes a reaction from a comment of an issue
|
||
|
*/
|
||
|
func (a *Client) IssueDeleteCommentReaction(params *IssueDeleteCommentReactionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueDeleteCommentReactionOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueDeleteCommentReactionParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueDeleteCommentReaction",
|
||
|
Method: "DELETE",
|
||
|
PathPattern: "/repos/{owner}/{repo}/issues/comments/{id}/reactions",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueDeleteCommentReactionReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*IssueDeleteCommentReactionOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issueDeleteCommentReaction: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueDeleteIssueAttachment deletes an issue attachment
|
||
|
*/
|
||
|
func (a *Client) IssueDeleteIssueAttachment(params *IssueDeleteIssueAttachmentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueDeleteIssueAttachmentNoContent, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueDeleteIssueAttachmentParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueDeleteIssueAttachment",
|
||
|
Method: "DELETE",
|
||
|
PathPattern: "/repos/{owner}/{repo}/issues/{index}/assets/{attachment_id}",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueDeleteIssueAttachmentReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*IssueDeleteIssueAttachmentNoContent)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issueDeleteIssueAttachment: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueDeleteIssueCommentAttachment deletes a comment attachment
|
||
|
*/
|
||
|
func (a *Client) IssueDeleteIssueCommentAttachment(params *IssueDeleteIssueCommentAttachmentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueDeleteIssueCommentAttachmentNoContent, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueDeleteIssueCommentAttachmentParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueDeleteIssueCommentAttachment",
|
||
|
Method: "DELETE",
|
||
|
PathPattern: "/repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id}",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueDeleteIssueCommentAttachmentReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*IssueDeleteIssueCommentAttachmentNoContent)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issueDeleteIssueCommentAttachment: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueDeleteIssueReaction removes a reaction from an issue
|
||
|
*/
|
||
|
func (a *Client) IssueDeleteIssueReaction(params *IssueDeleteIssueReactionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueDeleteIssueReactionOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueDeleteIssueReactionParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueDeleteIssueReaction",
|
||
|
Method: "DELETE",
|
||
|
PathPattern: "/repos/{owner}/{repo}/issues/{index}/reactions",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueDeleteIssueReactionReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*IssueDeleteIssueReactionOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issueDeleteIssueReaction: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueDeleteLabel deletes a label
|
||
|
*/
|
||
|
func (a *Client) IssueDeleteLabel(params *IssueDeleteLabelParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueDeleteLabelNoContent, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueDeleteLabelParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueDeleteLabel",
|
||
|
Method: "DELETE",
|
||
|
PathPattern: "/repos/{owner}/{repo}/labels/{id}",
|
||
|
ProducesMediaTypes: []string{"application/json", "text/html"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueDeleteLabelReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*IssueDeleteLabelNoContent)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issueDeleteLabel: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueDeleteMilestone deletes a milestone
|
||
|
*/
|
||
|
func (a *Client) IssueDeleteMilestone(params *IssueDeleteMilestoneParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueDeleteMilestoneNoContent, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueDeleteMilestoneParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueDeleteMilestone",
|
||
|
Method: "DELETE",
|
||
|
PathPattern: "/repos/{owner}/{repo}/milestones/{id}",
|
||
|
ProducesMediaTypes: []string{"application/json", "text/html"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueDeleteMilestoneReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*IssueDeleteMilestoneNoContent)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issueDeleteMilestone: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueDeleteStopWatch deletes an issue s existing stopwatch
|
||
|
*/
|
||
|
func (a *Client) IssueDeleteStopWatch(params *IssueDeleteStopWatchParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueDeleteStopWatchNoContent, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueDeleteStopWatchParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueDeleteStopWatch",
|
||
|
Method: "DELETE",
|
||
|
PathPattern: "/repos/{owner}/{repo}/issues/{index}/stopwatch/delete",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueDeleteStopWatchReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*IssueDeleteStopWatchNoContent)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issueDeleteStopWatch: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueDeleteSubscription unsubscribes user from issue
|
||
|
*/
|
||
|
func (a *Client) IssueDeleteSubscription(params *IssueDeleteSubscriptionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueDeleteSubscriptionOK, *IssueDeleteSubscriptionCreated, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueDeleteSubscriptionParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueDeleteSubscription",
|
||
|
Method: "DELETE",
|
||
|
PathPattern: "/repos/{owner}/{repo}/issues/{index}/subscriptions/{user}",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueDeleteSubscriptionReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, nil, err
|
||
|
}
|
||
|
switch value := result.(type) {
|
||
|
case *IssueDeleteSubscriptionOK:
|
||
|
return value, nil, nil
|
||
|
case *IssueDeleteSubscriptionCreated:
|
||
|
return nil, value, nil
|
||
|
}
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issue: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueDeleteTime deletes specific tracked time
|
||
|
*/
|
||
|
func (a *Client) IssueDeleteTime(params *IssueDeleteTimeParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueDeleteTimeNoContent, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueDeleteTimeParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueDeleteTime",
|
||
|
Method: "DELETE",
|
||
|
PathPattern: "/repos/{owner}/{repo}/issues/{index}/times/{id}",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueDeleteTimeReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*IssueDeleteTimeNoContent)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issueDeleteTime: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueEditComment edits a comment
|
||
|
*/
|
||
|
func (a *Client) IssueEditComment(params *IssueEditCommentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueEditCommentOK, *IssueEditCommentNoContent, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueEditCommentParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueEditComment",
|
||
|
Method: "PATCH",
|
||
|
PathPattern: "/repos/{owner}/{repo}/issues/comments/{id}",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueEditCommentReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, nil, err
|
||
|
}
|
||
|
switch value := result.(type) {
|
||
|
case *IssueEditCommentOK:
|
||
|
return value, nil, nil
|
||
|
case *IssueEditCommentNoContent:
|
||
|
return nil, value, nil
|
||
|
}
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issue: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueEditCommentDeprecated edits a comment
|
||
|
*/
|
||
|
func (a *Client) IssueEditCommentDeprecated(params *IssueEditCommentDeprecatedParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueEditCommentDeprecatedOK, *IssueEditCommentDeprecatedNoContent, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueEditCommentDeprecatedParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueEditCommentDeprecated",
|
||
|
Method: "PATCH",
|
||
|
PathPattern: "/repos/{owner}/{repo}/issues/{index}/comments/{id}",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueEditCommentDeprecatedReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, nil, err
|
||
|
}
|
||
|
switch value := result.(type) {
|
||
|
case *IssueEditCommentDeprecatedOK:
|
||
|
return value, nil, nil
|
||
|
case *IssueEditCommentDeprecatedNoContent:
|
||
|
return nil, value, nil
|
||
|
}
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issue: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueEditIssue edits an issue if using deadline only the date will be taken into account and time of day ignored
|
||
|
*/
|
||
|
func (a *Client) IssueEditIssue(params *IssueEditIssueParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueEditIssueCreated, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueEditIssueParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueEditIssue",
|
||
|
Method: "PATCH",
|
||
|
PathPattern: "/repos/{owner}/{repo}/issues/{index}",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueEditIssueReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*IssueEditIssueCreated)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issueEditIssue: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueEditIssueAttachment edits an issue attachment
|
||
|
*/
|
||
|
func (a *Client) IssueEditIssueAttachment(params *IssueEditIssueAttachmentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueEditIssueAttachmentCreated, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueEditIssueAttachmentParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueEditIssueAttachment",
|
||
|
Method: "PATCH",
|
||
|
PathPattern: "/repos/{owner}/{repo}/issues/{index}/assets/{attachment_id}",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueEditIssueAttachmentReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*IssueEditIssueAttachmentCreated)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issueEditIssueAttachment: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueEditIssueCommentAttachment edits a comment attachment
|
||
|
*/
|
||
|
func (a *Client) IssueEditIssueCommentAttachment(params *IssueEditIssueCommentAttachmentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueEditIssueCommentAttachmentCreated, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueEditIssueCommentAttachmentParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueEditIssueCommentAttachment",
|
||
|
Method: "PATCH",
|
||
|
PathPattern: "/repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id}",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueEditIssueCommentAttachmentReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*IssueEditIssueCommentAttachmentCreated)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issueEditIssueCommentAttachment: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueEditIssueDeadline sets an issue deadline if set to null the deadline is deleted if using deadline only the date will be taken into account and time of day ignored
|
||
|
*/
|
||
|
func (a *Client) IssueEditIssueDeadline(params *IssueEditIssueDeadlineParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueEditIssueDeadlineCreated, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueEditIssueDeadlineParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueEditIssueDeadline",
|
||
|
Method: "POST",
|
||
|
PathPattern: "/repos/{owner}/{repo}/issues/{index}/deadline",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueEditIssueDeadlineReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*IssueEditIssueDeadlineCreated)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issueEditIssueDeadline: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueEditLabel updates a label
|
||
|
*/
|
||
|
func (a *Client) IssueEditLabel(params *IssueEditLabelParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueEditLabelOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueEditLabelParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueEditLabel",
|
||
|
Method: "PATCH",
|
||
|
PathPattern: "/repos/{owner}/{repo}/labels/{id}",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueEditLabelReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*IssueEditLabelOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issueEditLabel: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueEditMilestone updates a milestone
|
||
|
*/
|
||
|
func (a *Client) IssueEditMilestone(params *IssueEditMilestoneParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueEditMilestoneOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueEditMilestoneParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueEditMilestone",
|
||
|
Method: "PATCH",
|
||
|
PathPattern: "/repos/{owner}/{repo}/milestones/{id}",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueEditMilestoneReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*IssueEditMilestoneOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issueEditMilestone: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueGetComment gets a comment
|
||
|
*/
|
||
|
func (a *Client) IssueGetComment(params *IssueGetCommentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueGetCommentOK, *IssueGetCommentNoContent, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueGetCommentParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueGetComment",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/repos/{owner}/{repo}/issues/comments/{id}",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueGetCommentReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, nil, err
|
||
|
}
|
||
|
switch value := result.(type) {
|
||
|
case *IssueGetCommentOK:
|
||
|
return value, nil, nil
|
||
|
case *IssueGetCommentNoContent:
|
||
|
return nil, value, nil
|
||
|
}
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issue: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueGetCommentReactions gets a list of reactions from a comment of an issue
|
||
|
*/
|
||
|
func (a *Client) IssueGetCommentReactions(params *IssueGetCommentReactionsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueGetCommentReactionsOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueGetCommentReactionsParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueGetCommentReactions",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/repos/{owner}/{repo}/issues/comments/{id}/reactions",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueGetCommentReactionsReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*IssueGetCommentReactionsOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issueGetCommentReactions: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueGetComments lists all comments on an issue
|
||
|
*/
|
||
|
func (a *Client) IssueGetComments(params *IssueGetCommentsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueGetCommentsOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueGetCommentsParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueGetComments",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/repos/{owner}/{repo}/issues/{index}/comments",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueGetCommentsReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*IssueGetCommentsOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issueGetComments: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueGetCommentsAndTimeline lists all comments and events on an issue
|
||
|
*/
|
||
|
func (a *Client) IssueGetCommentsAndTimeline(params *IssueGetCommentsAndTimelineParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueGetCommentsAndTimelineOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueGetCommentsAndTimelineParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueGetCommentsAndTimeline",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/repos/{owner}/{repo}/issues/{index}/timeline",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueGetCommentsAndTimelineReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*IssueGetCommentsAndTimelineOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issueGetCommentsAndTimeline: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueGetIssue gets an issue
|
||
|
*/
|
||
|
func (a *Client) IssueGetIssue(params *IssueGetIssueParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueGetIssueOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueGetIssueParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueGetIssue",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/repos/{owner}/{repo}/issues/{index}",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueGetIssueReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*IssueGetIssueOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issueGetIssue: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueGetIssueAttachment gets an issue attachment
|
||
|
*/
|
||
|
func (a *Client) IssueGetIssueAttachment(params *IssueGetIssueAttachmentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueGetIssueAttachmentOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueGetIssueAttachmentParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueGetIssueAttachment",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/repos/{owner}/{repo}/issues/{index}/assets/{attachment_id}",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueGetIssueAttachmentReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*IssueGetIssueAttachmentOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issueGetIssueAttachment: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueGetIssueCommentAttachment gets a comment attachment
|
||
|
*/
|
||
|
func (a *Client) IssueGetIssueCommentAttachment(params *IssueGetIssueCommentAttachmentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueGetIssueCommentAttachmentOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueGetIssueCommentAttachmentParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueGetIssueCommentAttachment",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id}",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueGetIssueCommentAttachmentReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*IssueGetIssueCommentAttachmentOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issueGetIssueCommentAttachment: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueGetIssueReactions gets a list reactions of an issue
|
||
|
*/
|
||
|
func (a *Client) IssueGetIssueReactions(params *IssueGetIssueReactionsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueGetIssueReactionsOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueGetIssueReactionsParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueGetIssueReactions",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/repos/{owner}/{repo}/issues/{index}/reactions",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueGetIssueReactionsReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*IssueGetIssueReactionsOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issueGetIssueReactions: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueGetLabel gets a single label
|
||
|
*/
|
||
|
func (a *Client) IssueGetLabel(params *IssueGetLabelParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueGetLabelOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueGetLabelParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueGetLabel",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/repos/{owner}/{repo}/labels/{id}",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueGetLabelReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*IssueGetLabelOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issueGetLabel: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueGetLabels gets an issue s labels
|
||
|
*/
|
||
|
func (a *Client) IssueGetLabels(params *IssueGetLabelsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueGetLabelsOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueGetLabelsParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueGetLabels",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/repos/{owner}/{repo}/issues/{index}/labels",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueGetLabelsReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*IssueGetLabelsOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issueGetLabels: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueGetMilestone gets a milestone
|
||
|
*/
|
||
|
func (a *Client) IssueGetMilestone(params *IssueGetMilestoneParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueGetMilestoneOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueGetMilestoneParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueGetMilestone",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/repos/{owner}/{repo}/milestones/{id}",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueGetMilestoneReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*IssueGetMilestoneOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issueGetMilestone: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueGetMilestonesList gets all of a repository s opened milestones
|
||
|
*/
|
||
|
func (a *Client) IssueGetMilestonesList(params *IssueGetMilestonesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueGetMilestonesListOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueGetMilestonesListParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueGetMilestonesList",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/repos/{owner}/{repo}/milestones",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueGetMilestonesListReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*IssueGetMilestonesListOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issueGetMilestonesList: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueGetRepoComments lists all comments in a repository
|
||
|
*/
|
||
|
func (a *Client) IssueGetRepoComments(params *IssueGetRepoCommentsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueGetRepoCommentsOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueGetRepoCommentsParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueGetRepoComments",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/repos/{owner}/{repo}/issues/comments",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueGetRepoCommentsReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*IssueGetRepoCommentsOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issueGetRepoComments: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueListBlocks lists issues that are blocked by this issue
|
||
|
*/
|
||
|
func (a *Client) IssueListBlocks(params *IssueListBlocksParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueListBlocksOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueListBlocksParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueListBlocks",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/repos/{owner}/{repo}/issues/{index}/blocks",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueListBlocksReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*IssueListBlocksOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issueListBlocks: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueListIssueAttachments lists issue s attachments
|
||
|
*/
|
||
|
func (a *Client) IssueListIssueAttachments(params *IssueListIssueAttachmentsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueListIssueAttachmentsOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueListIssueAttachmentsParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueListIssueAttachments",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/repos/{owner}/{repo}/issues/{index}/assets",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueListIssueAttachmentsReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*IssueListIssueAttachmentsOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issueListIssueAttachments: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueListIssueCommentAttachments lists comment s attachments
|
||
|
*/
|
||
|
func (a *Client) IssueListIssueCommentAttachments(params *IssueListIssueCommentAttachmentsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueListIssueCommentAttachmentsOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueListIssueCommentAttachmentsParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueListIssueCommentAttachments",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/repos/{owner}/{repo}/issues/comments/{id}/assets",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueListIssueCommentAttachmentsReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*IssueListIssueCommentAttachmentsOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issueListIssueCommentAttachments: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueListIssueDependencies lists an issue s dependencies i e all issues that block this issue
|
||
|
*/
|
||
|
func (a *Client) IssueListIssueDependencies(params *IssueListIssueDependenciesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueListIssueDependenciesOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueListIssueDependenciesParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueListIssueDependencies",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/repos/{owner}/{repo}/issues/{index}/dependencies",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueListIssueDependenciesReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*IssueListIssueDependenciesOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issueListIssueDependencies: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueListIssues lists a repository s issues
|
||
|
*/
|
||
|
func (a *Client) IssueListIssues(params *IssueListIssuesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueListIssuesOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueListIssuesParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueListIssues",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/repos/{owner}/{repo}/issues",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueListIssuesReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*IssueListIssuesOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issueListIssues: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueListLabels gets all of a repository s labels
|
||
|
*/
|
||
|
func (a *Client) IssueListLabels(params *IssueListLabelsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueListLabelsOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueListLabelsParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueListLabels",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/repos/{owner}/{repo}/labels",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueListLabelsReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*IssueListLabelsOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issueListLabels: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssuePostCommentReaction adds a reaction to a comment of an issue
|
||
|
*/
|
||
|
func (a *Client) IssuePostCommentReaction(params *IssuePostCommentReactionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssuePostCommentReactionOK, *IssuePostCommentReactionCreated, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssuePostCommentReactionParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issuePostCommentReaction",
|
||
|
Method: "POST",
|
||
|
PathPattern: "/repos/{owner}/{repo}/issues/comments/{id}/reactions",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssuePostCommentReactionReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, nil, err
|
||
|
}
|
||
|
switch value := result.(type) {
|
||
|
case *IssuePostCommentReactionOK:
|
||
|
return value, nil, nil
|
||
|
case *IssuePostCommentReactionCreated:
|
||
|
return nil, value, nil
|
||
|
}
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issue: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssuePostIssueReaction adds a reaction to an issue
|
||
|
*/
|
||
|
func (a *Client) IssuePostIssueReaction(params *IssuePostIssueReactionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssuePostIssueReactionOK, *IssuePostIssueReactionCreated, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssuePostIssueReactionParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issuePostIssueReaction",
|
||
|
Method: "POST",
|
||
|
PathPattern: "/repos/{owner}/{repo}/issues/{index}/reactions",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssuePostIssueReactionReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, nil, err
|
||
|
}
|
||
|
switch value := result.(type) {
|
||
|
case *IssuePostIssueReactionOK:
|
||
|
return value, nil, nil
|
||
|
case *IssuePostIssueReactionCreated:
|
||
|
return nil, value, nil
|
||
|
}
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issue: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueRemoveIssueBlocking unblocks the issue given in the body by the issue in path
|
||
|
*/
|
||
|
func (a *Client) IssueRemoveIssueBlocking(params *IssueRemoveIssueBlockingParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueRemoveIssueBlockingOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueRemoveIssueBlockingParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueRemoveIssueBlocking",
|
||
|
Method: "DELETE",
|
||
|
PathPattern: "/repos/{owner}/{repo}/issues/{index}/blocks",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueRemoveIssueBlockingReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*IssueRemoveIssueBlockingOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issueRemoveIssueBlocking: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueRemoveIssueDependencies removes an issue dependency
|
||
|
*/
|
||
|
func (a *Client) IssueRemoveIssueDependencies(params *IssueRemoveIssueDependenciesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueRemoveIssueDependenciesOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueRemoveIssueDependenciesParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueRemoveIssueDependencies",
|
||
|
Method: "DELETE",
|
||
|
PathPattern: "/repos/{owner}/{repo}/issues/{index}/dependencies",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueRemoveIssueDependenciesReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*IssueRemoveIssueDependenciesOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issueRemoveIssueDependencies: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueRemoveLabel removes a label from an issue
|
||
|
*/
|
||
|
func (a *Client) IssueRemoveLabel(params *IssueRemoveLabelParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueRemoveLabelNoContent, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueRemoveLabelParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueRemoveLabel",
|
||
|
Method: "DELETE",
|
||
|
PathPattern: "/repos/{owner}/{repo}/issues/{index}/labels/{id}",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueRemoveLabelReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*IssueRemoveLabelNoContent)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issueRemoveLabel: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueReplaceLabels replaces an issue s labels
|
||
|
*/
|
||
|
func (a *Client) IssueReplaceLabels(params *IssueReplaceLabelsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueReplaceLabelsOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueReplaceLabelsParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueReplaceLabels",
|
||
|
Method: "PUT",
|
||
|
PathPattern: "/repos/{owner}/{repo}/issues/{index}/labels",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueReplaceLabelsReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*IssueReplaceLabelsOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issueReplaceLabels: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueResetTime resets a tracked time of an issue
|
||
|
*/
|
||
|
func (a *Client) IssueResetTime(params *IssueResetTimeParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueResetTimeNoContent, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueResetTimeParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueResetTime",
|
||
|
Method: "DELETE",
|
||
|
PathPattern: "/repos/{owner}/{repo}/issues/{index}/times",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueResetTimeReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*IssueResetTimeNoContent)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issueResetTime: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueSearchIssues searches for issues across the repositories that the user has access to
|
||
|
*/
|
||
|
func (a *Client) IssueSearchIssues(params *IssueSearchIssuesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueSearchIssuesOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueSearchIssuesParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueSearchIssues",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/repos/issues/search",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueSearchIssuesReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*IssueSearchIssuesOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issueSearchIssues: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueStartStopWatch starts stopwatch on an issue
|
||
|
*/
|
||
|
func (a *Client) IssueStartStopWatch(params *IssueStartStopWatchParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueStartStopWatchCreated, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueStartStopWatchParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueStartStopWatch",
|
||
|
Method: "POST",
|
||
|
PathPattern: "/repos/{owner}/{repo}/issues/{index}/stopwatch/start",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueStartStopWatchReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*IssueStartStopWatchCreated)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issueStartStopWatch: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueStopStopWatch stops an issue s existing stopwatch
|
||
|
*/
|
||
|
func (a *Client) IssueStopStopWatch(params *IssueStopStopWatchParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueStopStopWatchCreated, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueStopStopWatchParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueStopStopWatch",
|
||
|
Method: "POST",
|
||
|
PathPattern: "/repos/{owner}/{repo}/issues/{index}/stopwatch/stop",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueStopStopWatchReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*IssueStopStopWatchCreated)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issueStopStopWatch: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueSubscriptions gets users who subscribed on an issue
|
||
|
*/
|
||
|
func (a *Client) IssueSubscriptions(params *IssueSubscriptionsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueSubscriptionsOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueSubscriptionsParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueSubscriptions",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/repos/{owner}/{repo}/issues/{index}/subscriptions",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueSubscriptionsReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*IssueSubscriptionsOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issueSubscriptions: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
IssueTrackedTimes lists an issue s tracked times
|
||
|
*/
|
||
|
func (a *Client) IssueTrackedTimes(params *IssueTrackedTimesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IssueTrackedTimesOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewIssueTrackedTimesParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "issueTrackedTimes",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/repos/{owner}/{repo}/issues/{index}/times",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &IssueTrackedTimesReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*IssueTrackedTimesOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for issueTrackedTimes: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
MoveIssuePin moves the pin to the given position
|
||
|
*/
|
||
|
func (a *Client) MoveIssuePin(params *MoveIssuePinParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*MoveIssuePinNoContent, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewMoveIssuePinParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "moveIssuePin",
|
||
|
Method: "PATCH",
|
||
|
PathPattern: "/repos/{owner}/{repo}/issues/{index}/pin/{position}",
|
||
|
ProducesMediaTypes: []string{"application/json", "text/html"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &MoveIssuePinReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*MoveIssuePinNoContent)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for moveIssuePin: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
PinIssue pins an issue
|
||
|
*/
|
||
|
func (a *Client) PinIssue(params *PinIssueParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PinIssueNoContent, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewPinIssueParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "pinIssue",
|
||
|
Method: "POST",
|
||
|
PathPattern: "/repos/{owner}/{repo}/issues/{index}/pin",
|
||
|
ProducesMediaTypes: []string{"application/json", "text/html"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &PinIssueReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*PinIssueNoContent)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for pinIssue: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UnpinIssue unpins an issue
|
||
|
*/
|
||
|
func (a *Client) UnpinIssue(params *UnpinIssueParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UnpinIssueNoContent, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUnpinIssueParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "unpinIssue",
|
||
|
Method: "DELETE",
|
||
|
PathPattern: "/repos/{owner}/{repo}/issues/{index}/pin",
|
||
|
ProducesMediaTypes: []string{"application/json", "text/html"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UnpinIssueReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UnpinIssueNoContent)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for unpinIssue: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
// SetTransport changes the transport on the client
|
||
|
func (a *Client) SetTransport(transport runtime.ClientTransport) {
|
||
|
a.transport = transport
|
||
|
}
|