diff --git a/pkg/client/config/config_client.go b/pkg/client/config/config_client.go index bd5ebd2..f490b14 100644 --- a/pkg/client/config/config_client.go +++ b/pkg/client/config/config_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new config 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 config 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 config API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/pkg/client/config/get_web_config_responses.go b/pkg/client/config/get_web_config_responses.go index 96b50ae..82ab06b 100644 --- a/pkg/client/config/get_web_config_responses.go +++ b/pkg/client/config/get_web_config_responses.go @@ -6,6 +6,7 @@ package config // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -85,11 +86,13 @@ func (o *GetWebConfigOK) Code() int { } func (o *GetWebConfigOK) Error() string { - return fmt.Sprintf("[GET /config][%d] getWebConfigOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /config][%d] getWebConfigOK %s", 200, payload) } func (o *GetWebConfigOK) String() string { - return fmt.Sprintf("[GET /config][%d] getWebConfigOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /config][%d] getWebConfigOK %s", 200, payload) } func (o *GetWebConfigOK) GetPayload() *models.APIWebConfig { @@ -153,11 +156,13 @@ func (o *GetWebConfigUnprocessableEntity) Code() int { } func (o *GetWebConfigUnprocessableEntity) Error() string { - return fmt.Sprintf("[GET /config][%d] getWebConfigUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /config][%d] getWebConfigUnprocessableEntity %s", 422, payload) } func (o *GetWebConfigUnprocessableEntity) String() string { - return fmt.Sprintf("[GET /config][%d] getWebConfigUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /config][%d] getWebConfigUnprocessableEntity %s", 422, payload) } func (o *GetWebConfigUnprocessableEntity) GetPayload() *models.APIErrorRenderExample { diff --git a/pkg/client/contact/contact_client.go b/pkg/client/contact/contact_client.go index 78a4e94..2f35ddd 100644 --- a/pkg/client/contact/contact_client.go +++ b/pkg/client/contact/contact_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new contact 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 contact 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 contact API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/pkg/client/contact/create_new_contact_responses.go b/pkg/client/contact/create_new_contact_responses.go index 7aae106..7022fe3 100644 --- a/pkg/client/contact/create_new_contact_responses.go +++ b/pkg/client/contact/create_new_contact_responses.go @@ -6,6 +6,7 @@ package contact // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -97,11 +98,13 @@ func (o *CreateNewContactOK) Code() int { } func (o *CreateNewContactOK) Error() string { - return fmt.Sprintf("[PUT /contact][%d] createNewContactOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /contact][%d] createNewContactOK %s", 200, payload) } func (o *CreateNewContactOK) String() string { - return fmt.Sprintf("[PUT /contact][%d] createNewContactOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /contact][%d] createNewContactOK %s", 200, payload) } func (o *CreateNewContactOK) GetPayload() *models.DtoContact { @@ -165,11 +168,13 @@ func (o *CreateNewContactBadRequest) Code() int { } func (o *CreateNewContactBadRequest) Error() string { - return fmt.Sprintf("[PUT /contact][%d] createNewContactBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /contact][%d] createNewContactBadRequest %s", 400, payload) } func (o *CreateNewContactBadRequest) String() string { - return fmt.Sprintf("[PUT /contact][%d] createNewContactBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /contact][%d] createNewContactBadRequest %s", 400, payload) } func (o *CreateNewContactBadRequest) GetPayload() *models.APIErrorInvalidRequestExample { @@ -233,11 +238,13 @@ func (o *CreateNewContactUnprocessableEntity) Code() int { } func (o *CreateNewContactUnprocessableEntity) Error() string { - return fmt.Sprintf("[PUT /contact][%d] createNewContactUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /contact][%d] createNewContactUnprocessableEntity %s", 422, payload) } func (o *CreateNewContactUnprocessableEntity) String() string { - return fmt.Sprintf("[PUT /contact][%d] createNewContactUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /contact][%d] createNewContactUnprocessableEntity %s", 422, payload) } func (o *CreateNewContactUnprocessableEntity) GetPayload() *models.APIErrorRenderExample { @@ -301,11 +308,13 @@ func (o *CreateNewContactInternalServerError) Code() int { } func (o *CreateNewContactInternalServerError) Error() string { - return fmt.Sprintf("[PUT /contact][%d] createNewContactInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /contact][%d] createNewContactInternalServerError %s", 500, payload) } func (o *CreateNewContactInternalServerError) String() string { - return fmt.Sprintf("[PUT /contact][%d] createNewContactInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /contact][%d] createNewContactInternalServerError %s", 500, payload) } func (o *CreateNewContactInternalServerError) GetPayload() *models.APIErrorInternalServerExample { diff --git a/pkg/client/contact/get_all_contacts_responses.go b/pkg/client/contact/get_all_contacts_responses.go index dfb3dd9..e7cfba5 100644 --- a/pkg/client/contact/get_all_contacts_responses.go +++ b/pkg/client/contact/get_all_contacts_responses.go @@ -6,6 +6,7 @@ package contact // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -91,11 +92,13 @@ func (o *GetAllContactsOK) Code() int { } func (o *GetAllContactsOK) Error() string { - return fmt.Sprintf("[GET /contact][%d] getAllContactsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /contact][%d] getAllContactsOK %s", 200, payload) } func (o *GetAllContactsOK) String() string { - return fmt.Sprintf("[GET /contact][%d] getAllContactsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /contact][%d] getAllContactsOK %s", 200, payload) } func (o *GetAllContactsOK) GetPayload() *models.DtoContactList { @@ -159,11 +162,13 @@ func (o *GetAllContactsUnprocessableEntity) Code() int { } func (o *GetAllContactsUnprocessableEntity) Error() string { - return fmt.Sprintf("[GET /contact][%d] getAllContactsUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /contact][%d] getAllContactsUnprocessableEntity %s", 422, payload) } func (o *GetAllContactsUnprocessableEntity) String() string { - return fmt.Sprintf("[GET /contact][%d] getAllContactsUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /contact][%d] getAllContactsUnprocessableEntity %s", 422, payload) } func (o *GetAllContactsUnprocessableEntity) GetPayload() *models.APIErrorRenderExample { @@ -227,11 +232,13 @@ func (o *GetAllContactsInternalServerError) Code() int { } func (o *GetAllContactsInternalServerError) Error() string { - return fmt.Sprintf("[GET /contact][%d] getAllContactsInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /contact][%d] getAllContactsInternalServerError %s", 500, payload) } func (o *GetAllContactsInternalServerError) String() string { - return fmt.Sprintf("[GET /contact][%d] getAllContactsInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /contact][%d] getAllContactsInternalServerError %s", 500, payload) } func (o *GetAllContactsInternalServerError) GetPayload() *models.APIErrorInternalServerExample { diff --git a/pkg/client/contact/get_contact_by_id_responses.go b/pkg/client/contact/get_contact_by_id_responses.go index 71c1bd7..1f7d02e 100644 --- a/pkg/client/contact/get_contact_by_id_responses.go +++ b/pkg/client/contact/get_contact_by_id_responses.go @@ -6,6 +6,7 @@ package contact // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -103,11 +104,13 @@ func (o *GetContactByIDOK) Code() int { } func (o *GetContactByIDOK) Error() string { - return fmt.Sprintf("[GET /contact/{contactID}][%d] getContactByIdOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /contact/{contactID}][%d] getContactByIdOK %s", 200, payload) } func (o *GetContactByIDOK) String() string { - return fmt.Sprintf("[GET /contact/{contactID}][%d] getContactByIdOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /contact/{contactID}][%d] getContactByIdOK %s", 200, payload) } func (o *GetContactByIDOK) GetPayload() *models.DtoContact { @@ -171,11 +174,13 @@ func (o *GetContactByIDForbidden) Code() int { } func (o *GetContactByIDForbidden) Error() string { - return fmt.Sprintf("[GET /contact/{contactID}][%d] getContactByIdForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /contact/{contactID}][%d] getContactByIdForbidden %s", 403, payload) } func (o *GetContactByIDForbidden) String() string { - return fmt.Sprintf("[GET /contact/{contactID}][%d] getContactByIdForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /contact/{contactID}][%d] getContactByIdForbidden %s", 403, payload) } func (o *GetContactByIDForbidden) GetPayload() *models.APIErrorForbiddenExample { @@ -239,11 +244,13 @@ func (o *GetContactByIDNotFound) Code() int { } func (o *GetContactByIDNotFound) Error() string { - return fmt.Sprintf("[GET /contact/{contactID}][%d] getContactByIdNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /contact/{contactID}][%d] getContactByIdNotFound %s", 404, payload) } func (o *GetContactByIDNotFound) String() string { - return fmt.Sprintf("[GET /contact/{contactID}][%d] getContactByIdNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /contact/{contactID}][%d] getContactByIdNotFound %s", 404, payload) } func (o *GetContactByIDNotFound) GetPayload() *models.APIErrorNotFoundExample { @@ -307,11 +314,13 @@ func (o *GetContactByIDUnprocessableEntity) Code() int { } func (o *GetContactByIDUnprocessableEntity) Error() string { - return fmt.Sprintf("[GET /contact/{contactID}][%d] getContactByIdUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /contact/{contactID}][%d] getContactByIdUnprocessableEntity %s", 422, payload) } func (o *GetContactByIDUnprocessableEntity) String() string { - return fmt.Sprintf("[GET /contact/{contactID}][%d] getContactByIdUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /contact/{contactID}][%d] getContactByIdUnprocessableEntity %s", 422, payload) } func (o *GetContactByIDUnprocessableEntity) GetPayload() *models.APIErrorRenderExample { @@ -375,11 +384,13 @@ func (o *GetContactByIDInternalServerError) Code() int { } func (o *GetContactByIDInternalServerError) Error() string { - return fmt.Sprintf("[GET /contact/{contactID}][%d] getContactByIdInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /contact/{contactID}][%d] getContactByIdInternalServerError %s", 500, payload) } func (o *GetContactByIDInternalServerError) String() string { - return fmt.Sprintf("[GET /contact/{contactID}][%d] getContactByIdInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /contact/{contactID}][%d] getContactByIdInternalServerError %s", 500, payload) } func (o *GetContactByIDInternalServerError) GetPayload() *models.APIErrorInternalServerExample { diff --git a/pkg/client/contact/get_contact_events_by_id_responses.go b/pkg/client/contact/get_contact_events_by_id_responses.go index 3da7eef..e259097 100644 --- a/pkg/client/contact/get_contact_events_by_id_responses.go +++ b/pkg/client/contact/get_contact_events_by_id_responses.go @@ -6,6 +6,7 @@ package contact // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *GetContactEventsByIDOK) Code() int { } func (o *GetContactEventsByIDOK) Error() string { - return fmt.Sprintf("[GET /contact/{contactID}/events][%d] getContactEventsByIdOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /contact/{contactID}/events][%d] getContactEventsByIdOK %s", 200, payload) } func (o *GetContactEventsByIDOK) String() string { - return fmt.Sprintf("[GET /contact/{contactID}/events][%d] getContactEventsByIdOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /contact/{contactID}/events][%d] getContactEventsByIdOK %s", 200, payload) } func (o *GetContactEventsByIDOK) GetPayload() *models.DtoContactEventItemList { @@ -177,11 +180,13 @@ func (o *GetContactEventsByIDBadRequest) Code() int { } func (o *GetContactEventsByIDBadRequest) Error() string { - return fmt.Sprintf("[GET /contact/{contactID}/events][%d] getContactEventsByIdBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /contact/{contactID}/events][%d] getContactEventsByIdBadRequest %s", 400, payload) } func (o *GetContactEventsByIDBadRequest) String() string { - return fmt.Sprintf("[GET /contact/{contactID}/events][%d] getContactEventsByIdBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /contact/{contactID}/events][%d] getContactEventsByIdBadRequest %s", 400, payload) } func (o *GetContactEventsByIDBadRequest) GetPayload() *models.APIErrorInvalidRequestExample { @@ -245,11 +250,13 @@ func (o *GetContactEventsByIDForbidden) Code() int { } func (o *GetContactEventsByIDForbidden) Error() string { - return fmt.Sprintf("[GET /contact/{contactID}/events][%d] getContactEventsByIdForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /contact/{contactID}/events][%d] getContactEventsByIdForbidden %s", 403, payload) } func (o *GetContactEventsByIDForbidden) String() string { - return fmt.Sprintf("[GET /contact/{contactID}/events][%d] getContactEventsByIdForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /contact/{contactID}/events][%d] getContactEventsByIdForbidden %s", 403, payload) } func (o *GetContactEventsByIDForbidden) GetPayload() *models.APIErrorForbiddenExample { @@ -313,11 +320,13 @@ func (o *GetContactEventsByIDNotFound) Code() int { } func (o *GetContactEventsByIDNotFound) Error() string { - return fmt.Sprintf("[GET /contact/{contactID}/events][%d] getContactEventsByIdNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /contact/{contactID}/events][%d] getContactEventsByIdNotFound %s", 404, payload) } func (o *GetContactEventsByIDNotFound) String() string { - return fmt.Sprintf("[GET /contact/{contactID}/events][%d] getContactEventsByIdNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /contact/{contactID}/events][%d] getContactEventsByIdNotFound %s", 404, payload) } func (o *GetContactEventsByIDNotFound) GetPayload() *models.APIErrorNotFoundExample { @@ -381,11 +390,13 @@ func (o *GetContactEventsByIDUnprocessableEntity) Code() int { } func (o *GetContactEventsByIDUnprocessableEntity) Error() string { - return fmt.Sprintf("[GET /contact/{contactID}/events][%d] getContactEventsByIdUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /contact/{contactID}/events][%d] getContactEventsByIdUnprocessableEntity %s", 422, payload) } func (o *GetContactEventsByIDUnprocessableEntity) String() string { - return fmt.Sprintf("[GET /contact/{contactID}/events][%d] getContactEventsByIdUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /contact/{contactID}/events][%d] getContactEventsByIdUnprocessableEntity %s", 422, payload) } func (o *GetContactEventsByIDUnprocessableEntity) GetPayload() *models.APIErrorRenderExample { @@ -449,11 +460,13 @@ func (o *GetContactEventsByIDInternalServerError) Code() int { } func (o *GetContactEventsByIDInternalServerError) Error() string { - return fmt.Sprintf("[GET /contact/{contactID}/events][%d] getContactEventsByIdInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /contact/{contactID}/events][%d] getContactEventsByIdInternalServerError %s", 500, payload) } func (o *GetContactEventsByIDInternalServerError) String() string { - return fmt.Sprintf("[GET /contact/{contactID}/events][%d] getContactEventsByIdInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /contact/{contactID}/events][%d] getContactEventsByIdInternalServerError %s", 500, payload) } func (o *GetContactEventsByIDInternalServerError) GetPayload() *models.APIErrorInternalServerExample { diff --git a/pkg/client/contact/remove_contact_responses.go b/pkg/client/contact/remove_contact_responses.go index 833d6dd..2c4bc87 100644 --- a/pkg/client/contact/remove_contact_responses.go +++ b/pkg/client/contact/remove_contact_responses.go @@ -6,6 +6,7 @@ package contact // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -102,11 +103,11 @@ func (o *RemoveContactOK) Code() int { } func (o *RemoveContactOK) Error() string { - return fmt.Sprintf("[DELETE /contact/{contactID}][%d] removeContactOK ", 200) + return fmt.Sprintf("[DELETE /contact/{contactID}][%d] removeContactOK", 200) } func (o *RemoveContactOK) String() string { - return fmt.Sprintf("[DELETE /contact/{contactID}][%d] removeContactOK ", 200) + return fmt.Sprintf("[DELETE /contact/{contactID}][%d] removeContactOK", 200) } func (o *RemoveContactOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -159,11 +160,13 @@ func (o *RemoveContactBadRequest) Code() int { } func (o *RemoveContactBadRequest) Error() string { - return fmt.Sprintf("[DELETE /contact/{contactID}][%d] removeContactBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /contact/{contactID}][%d] removeContactBadRequest %s", 400, payload) } func (o *RemoveContactBadRequest) String() string { - return fmt.Sprintf("[DELETE /contact/{contactID}][%d] removeContactBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /contact/{contactID}][%d] removeContactBadRequest %s", 400, payload) } func (o *RemoveContactBadRequest) GetPayload() *models.APIErrorInvalidRequestExample { @@ -227,11 +230,13 @@ func (o *RemoveContactForbidden) Code() int { } func (o *RemoveContactForbidden) Error() string { - return fmt.Sprintf("[DELETE /contact/{contactID}][%d] removeContactForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /contact/{contactID}][%d] removeContactForbidden %s", 403, payload) } func (o *RemoveContactForbidden) String() string { - return fmt.Sprintf("[DELETE /contact/{contactID}][%d] removeContactForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /contact/{contactID}][%d] removeContactForbidden %s", 403, payload) } func (o *RemoveContactForbidden) GetPayload() *models.APIErrorForbiddenExample { @@ -295,11 +300,13 @@ func (o *RemoveContactNotFound) Code() int { } func (o *RemoveContactNotFound) Error() string { - return fmt.Sprintf("[DELETE /contact/{contactID}][%d] removeContactNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /contact/{contactID}][%d] removeContactNotFound %s", 404, payload) } func (o *RemoveContactNotFound) String() string { - return fmt.Sprintf("[DELETE /contact/{contactID}][%d] removeContactNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /contact/{contactID}][%d] removeContactNotFound %s", 404, payload) } func (o *RemoveContactNotFound) GetPayload() *models.APIErrorNotFoundExample { @@ -363,11 +370,13 @@ func (o *RemoveContactInternalServerError) Code() int { } func (o *RemoveContactInternalServerError) Error() string { - return fmt.Sprintf("[DELETE /contact/{contactID}][%d] removeContactInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /contact/{contactID}][%d] removeContactInternalServerError %s", 500, payload) } func (o *RemoveContactInternalServerError) String() string { - return fmt.Sprintf("[DELETE /contact/{contactID}][%d] removeContactInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /contact/{contactID}][%d] removeContactInternalServerError %s", 500, payload) } func (o *RemoveContactInternalServerError) GetPayload() *models.APIErrorInternalServerExample { diff --git a/pkg/client/contact/send_test_contact_notification_responses.go b/pkg/client/contact/send_test_contact_notification_responses.go index 234b8f0..f91101f 100644 --- a/pkg/client/contact/send_test_contact_notification_responses.go +++ b/pkg/client/contact/send_test_contact_notification_responses.go @@ -6,6 +6,7 @@ package contact // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -96,11 +97,11 @@ func (o *SendTestContactNotificationOK) Code() int { } func (o *SendTestContactNotificationOK) Error() string { - return fmt.Sprintf("[POST /contact/{contactID}/test][%d] sendTestContactNotificationOK ", 200) + return fmt.Sprintf("[POST /contact/{contactID}/test][%d] sendTestContactNotificationOK", 200) } func (o *SendTestContactNotificationOK) String() string { - return fmt.Sprintf("[POST /contact/{contactID}/test][%d] sendTestContactNotificationOK ", 200) + return fmt.Sprintf("[POST /contact/{contactID}/test][%d] sendTestContactNotificationOK", 200) } func (o *SendTestContactNotificationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -153,11 +154,13 @@ func (o *SendTestContactNotificationForbidden) Code() int { } func (o *SendTestContactNotificationForbidden) Error() string { - return fmt.Sprintf("[POST /contact/{contactID}/test][%d] sendTestContactNotificationForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /contact/{contactID}/test][%d] sendTestContactNotificationForbidden %s", 403, payload) } func (o *SendTestContactNotificationForbidden) String() string { - return fmt.Sprintf("[POST /contact/{contactID}/test][%d] sendTestContactNotificationForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /contact/{contactID}/test][%d] sendTestContactNotificationForbidden %s", 403, payload) } func (o *SendTestContactNotificationForbidden) GetPayload() *models.APIErrorForbiddenExample { @@ -221,11 +224,13 @@ func (o *SendTestContactNotificationNotFound) Code() int { } func (o *SendTestContactNotificationNotFound) Error() string { - return fmt.Sprintf("[POST /contact/{contactID}/test][%d] sendTestContactNotificationNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /contact/{contactID}/test][%d] sendTestContactNotificationNotFound %s", 404, payload) } func (o *SendTestContactNotificationNotFound) String() string { - return fmt.Sprintf("[POST /contact/{contactID}/test][%d] sendTestContactNotificationNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /contact/{contactID}/test][%d] sendTestContactNotificationNotFound %s", 404, payload) } func (o *SendTestContactNotificationNotFound) GetPayload() *models.APIErrorNotFoundExample { @@ -289,11 +294,13 @@ func (o *SendTestContactNotificationInternalServerError) Code() int { } func (o *SendTestContactNotificationInternalServerError) Error() string { - return fmt.Sprintf("[POST /contact/{contactID}/test][%d] sendTestContactNotificationInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /contact/{contactID}/test][%d] sendTestContactNotificationInternalServerError %s", 500, payload) } func (o *SendTestContactNotificationInternalServerError) String() string { - return fmt.Sprintf("[POST /contact/{contactID}/test][%d] sendTestContactNotificationInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /contact/{contactID}/test][%d] sendTestContactNotificationInternalServerError %s", 500, payload) } func (o *SendTestContactNotificationInternalServerError) GetPayload() *models.APIErrorInternalServerExample { diff --git a/pkg/client/contact/update_contact_responses.go b/pkg/client/contact/update_contact_responses.go index 4d0bbf1..0870063 100644 --- a/pkg/client/contact/update_contact_responses.go +++ b/pkg/client/contact/update_contact_responses.go @@ -6,6 +6,7 @@ package contact // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *UpdateContactOK) Code() int { } func (o *UpdateContactOK) Error() string { - return fmt.Sprintf("[PUT /contact/{contactID}][%d] updateContactOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /contact/{contactID}][%d] updateContactOK %s", 200, payload) } func (o *UpdateContactOK) String() string { - return fmt.Sprintf("[PUT /contact/{contactID}][%d] updateContactOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /contact/{contactID}][%d] updateContactOK %s", 200, payload) } func (o *UpdateContactOK) GetPayload() *models.DtoContact { @@ -177,11 +180,13 @@ func (o *UpdateContactBadRequest) Code() int { } func (o *UpdateContactBadRequest) Error() string { - return fmt.Sprintf("[PUT /contact/{contactID}][%d] updateContactBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /contact/{contactID}][%d] updateContactBadRequest %s", 400, payload) } func (o *UpdateContactBadRequest) String() string { - return fmt.Sprintf("[PUT /contact/{contactID}][%d] updateContactBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /contact/{contactID}][%d] updateContactBadRequest %s", 400, payload) } func (o *UpdateContactBadRequest) GetPayload() *models.APIErrorInvalidRequestExample { @@ -245,11 +250,13 @@ func (o *UpdateContactForbidden) Code() int { } func (o *UpdateContactForbidden) Error() string { - return fmt.Sprintf("[PUT /contact/{contactID}][%d] updateContactForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /contact/{contactID}][%d] updateContactForbidden %s", 403, payload) } func (o *UpdateContactForbidden) String() string { - return fmt.Sprintf("[PUT /contact/{contactID}][%d] updateContactForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /contact/{contactID}][%d] updateContactForbidden %s", 403, payload) } func (o *UpdateContactForbidden) GetPayload() *models.APIErrorForbiddenExample { @@ -313,11 +320,13 @@ func (o *UpdateContactNotFound) Code() int { } func (o *UpdateContactNotFound) Error() string { - return fmt.Sprintf("[PUT /contact/{contactID}][%d] updateContactNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /contact/{contactID}][%d] updateContactNotFound %s", 404, payload) } func (o *UpdateContactNotFound) String() string { - return fmt.Sprintf("[PUT /contact/{contactID}][%d] updateContactNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /contact/{contactID}][%d] updateContactNotFound %s", 404, payload) } func (o *UpdateContactNotFound) GetPayload() *models.APIErrorNotFoundExample { @@ -381,11 +390,13 @@ func (o *UpdateContactUnprocessableEntity) Code() int { } func (o *UpdateContactUnprocessableEntity) Error() string { - return fmt.Sprintf("[PUT /contact/{contactID}][%d] updateContactUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /contact/{contactID}][%d] updateContactUnprocessableEntity %s", 422, payload) } func (o *UpdateContactUnprocessableEntity) String() string { - return fmt.Sprintf("[PUT /contact/{contactID}][%d] updateContactUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /contact/{contactID}][%d] updateContactUnprocessableEntity %s", 422, payload) } func (o *UpdateContactUnprocessableEntity) GetPayload() *models.APIErrorRenderExample { @@ -449,11 +460,13 @@ func (o *UpdateContactInternalServerError) Code() int { } func (o *UpdateContactInternalServerError) Error() string { - return fmt.Sprintf("[PUT /contact/{contactID}][%d] updateContactInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /contact/{contactID}][%d] updateContactInternalServerError %s", 500, payload) } func (o *UpdateContactInternalServerError) String() string { - return fmt.Sprintf("[PUT /contact/{contactID}][%d] updateContactInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /contact/{contactID}][%d] updateContactInternalServerError %s", 500, payload) } func (o *UpdateContactInternalServerError) GetPayload() *models.APIErrorInternalServerExample { diff --git a/pkg/client/event/delete_all_events_responses.go b/pkg/client/event/delete_all_events_responses.go index ccec24f..9b9ca78 100644 --- a/pkg/client/event/delete_all_events_responses.go +++ b/pkg/client/event/delete_all_events_responses.go @@ -6,6 +6,7 @@ package event // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -84,11 +85,11 @@ func (o *DeleteAllEventsOK) Code() int { } func (o *DeleteAllEventsOK) Error() string { - return fmt.Sprintf("[DELETE /event/all][%d] deleteAllEventsOK ", 200) + return fmt.Sprintf("[DELETE /event/all][%d] deleteAllEventsOK", 200) } func (o *DeleteAllEventsOK) String() string { - return fmt.Sprintf("[DELETE /event/all][%d] deleteAllEventsOK ", 200) + return fmt.Sprintf("[DELETE /event/all][%d] deleteAllEventsOK", 200) } func (o *DeleteAllEventsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -141,11 +142,13 @@ func (o *DeleteAllEventsInternalServerError) Code() int { } func (o *DeleteAllEventsInternalServerError) Error() string { - return fmt.Sprintf("[DELETE /event/all][%d] deleteAllEventsInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /event/all][%d] deleteAllEventsInternalServerError %s", 500, payload) } func (o *DeleteAllEventsInternalServerError) String() string { - return fmt.Sprintf("[DELETE /event/all][%d] deleteAllEventsInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /event/all][%d] deleteAllEventsInternalServerError %s", 500, payload) } func (o *DeleteAllEventsInternalServerError) GetPayload() *models.APIErrorInternalServerExample { diff --git a/pkg/client/event/event_client.go b/pkg/client/event/event_client.go index ebe480f..50ae416 100644 --- a/pkg/client/event/event_client.go +++ b/pkg/client/event/event_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new event 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 event 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 event API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/pkg/client/event/get_events_list_responses.go b/pkg/client/event/get_events_list_responses.go index 07ee5e2..3f9fe44 100644 --- a/pkg/client/event/get_events_list_responses.go +++ b/pkg/client/event/get_events_list_responses.go @@ -6,6 +6,7 @@ package event // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -103,11 +104,13 @@ func (o *GetEventsListOK) Code() int { } func (o *GetEventsListOK) Error() string { - return fmt.Sprintf("[GET /event/{triggerID}][%d] getEventsListOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /event/{triggerID}][%d] getEventsListOK %s", 200, payload) } func (o *GetEventsListOK) String() string { - return fmt.Sprintf("[GET /event/{triggerID}][%d] getEventsListOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /event/{triggerID}][%d] getEventsListOK %s", 200, payload) } func (o *GetEventsListOK) GetPayload() *models.DtoEventsList { @@ -171,11 +174,13 @@ func (o *GetEventsListBadRequest) Code() int { } func (o *GetEventsListBadRequest) Error() string { - return fmt.Sprintf("[GET /event/{triggerID}][%d] getEventsListBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /event/{triggerID}][%d] getEventsListBadRequest %s", 400, payload) } func (o *GetEventsListBadRequest) String() string { - return fmt.Sprintf("[GET /event/{triggerID}][%d] getEventsListBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /event/{triggerID}][%d] getEventsListBadRequest %s", 400, payload) } func (o *GetEventsListBadRequest) GetPayload() *models.APIErrorInvalidRequestExample { @@ -239,11 +244,13 @@ func (o *GetEventsListNotFound) Code() int { } func (o *GetEventsListNotFound) Error() string { - return fmt.Sprintf("[GET /event/{triggerID}][%d] getEventsListNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /event/{triggerID}][%d] getEventsListNotFound %s", 404, payload) } func (o *GetEventsListNotFound) String() string { - return fmt.Sprintf("[GET /event/{triggerID}][%d] getEventsListNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /event/{triggerID}][%d] getEventsListNotFound %s", 404, payload) } func (o *GetEventsListNotFound) GetPayload() *models.APIErrorNotFoundExample { @@ -307,11 +314,13 @@ func (o *GetEventsListUnprocessableEntity) Code() int { } func (o *GetEventsListUnprocessableEntity) Error() string { - return fmt.Sprintf("[GET /event/{triggerID}][%d] getEventsListUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /event/{triggerID}][%d] getEventsListUnprocessableEntity %s", 422, payload) } func (o *GetEventsListUnprocessableEntity) String() string { - return fmt.Sprintf("[GET /event/{triggerID}][%d] getEventsListUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /event/{triggerID}][%d] getEventsListUnprocessableEntity %s", 422, payload) } func (o *GetEventsListUnprocessableEntity) GetPayload() *models.APIErrorRenderExample { @@ -375,11 +384,13 @@ func (o *GetEventsListInternalServerError) Code() int { } func (o *GetEventsListInternalServerError) Error() string { - return fmt.Sprintf("[GET /event/{triggerID}][%d] getEventsListInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /event/{triggerID}][%d] getEventsListInternalServerError %s", 500, payload) } func (o *GetEventsListInternalServerError) String() string { - return fmt.Sprintf("[GET /event/{triggerID}][%d] getEventsListInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /event/{triggerID}][%d] getEventsListInternalServerError %s", 500, payload) } func (o *GetEventsListInternalServerError) GetPayload() *models.APIErrorInternalServerExample { diff --git a/pkg/client/health/get_notifier_state_responses.go b/pkg/client/health/get_notifier_state_responses.go index 85937d4..9345a7b 100644 --- a/pkg/client/health/get_notifier_state_responses.go +++ b/pkg/client/health/get_notifier_state_responses.go @@ -6,6 +6,7 @@ package health // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -91,11 +92,13 @@ func (o *GetNotifierStateOK) Code() int { } func (o *GetNotifierStateOK) Error() string { - return fmt.Sprintf("[GET /health/notifier][%d] getNotifierStateOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /health/notifier][%d] getNotifierStateOK %s", 200, payload) } func (o *GetNotifierStateOK) String() string { - return fmt.Sprintf("[GET /health/notifier][%d] getNotifierStateOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /health/notifier][%d] getNotifierStateOK %s", 200, payload) } func (o *GetNotifierStateOK) GetPayload() *models.DtoNotifierState { @@ -159,11 +162,13 @@ func (o *GetNotifierStateUnprocessableEntity) Code() int { } func (o *GetNotifierStateUnprocessableEntity) Error() string { - return fmt.Sprintf("[GET /health/notifier][%d] getNotifierStateUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /health/notifier][%d] getNotifierStateUnprocessableEntity %s", 422, payload) } func (o *GetNotifierStateUnprocessableEntity) String() string { - return fmt.Sprintf("[GET /health/notifier][%d] getNotifierStateUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /health/notifier][%d] getNotifierStateUnprocessableEntity %s", 422, payload) } func (o *GetNotifierStateUnprocessableEntity) GetPayload() *models.APIErrorRenderExample { @@ -227,11 +232,13 @@ func (o *GetNotifierStateInternalServerError) Code() int { } func (o *GetNotifierStateInternalServerError) Error() string { - return fmt.Sprintf("[GET /health/notifier][%d] getNotifierStateInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /health/notifier][%d] getNotifierStateInternalServerError %s", 500, payload) } func (o *GetNotifierStateInternalServerError) String() string { - return fmt.Sprintf("[GET /health/notifier][%d] getNotifierStateInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /health/notifier][%d] getNotifierStateInternalServerError %s", 500, payload) } func (o *GetNotifierStateInternalServerError) GetPayload() *models.APIErrorInternalServerExample { diff --git a/pkg/client/health/health_client.go b/pkg/client/health/health_client.go index 0fb97ee..47e993c 100644 --- a/pkg/client/health/health_client.go +++ b/pkg/client/health/health_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new health 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 health 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 health API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/pkg/client/health/set_notifier_state_responses.go b/pkg/client/health/set_notifier_state_responses.go index d319bb2..e740f5e 100644 --- a/pkg/client/health/set_notifier_state_responses.go +++ b/pkg/client/health/set_notifier_state_responses.go @@ -6,6 +6,7 @@ package health // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -97,11 +98,13 @@ func (o *SetNotifierStateOK) Code() int { } func (o *SetNotifierStateOK) Error() string { - return fmt.Sprintf("[PUT /health/notifier][%d] setNotifierStateOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /health/notifier][%d] setNotifierStateOK %s", 200, payload) } func (o *SetNotifierStateOK) String() string { - return fmt.Sprintf("[PUT /health/notifier][%d] setNotifierStateOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /health/notifier][%d] setNotifierStateOK %s", 200, payload) } func (o *SetNotifierStateOK) GetPayload() *models.DtoNotifierState { @@ -165,11 +168,13 @@ func (o *SetNotifierStateForbidden) Code() int { } func (o *SetNotifierStateForbidden) Error() string { - return fmt.Sprintf("[PUT /health/notifier][%d] setNotifierStateForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /health/notifier][%d] setNotifierStateForbidden %s", 403, payload) } func (o *SetNotifierStateForbidden) String() string { - return fmt.Sprintf("[PUT /health/notifier][%d] setNotifierStateForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /health/notifier][%d] setNotifierStateForbidden %s", 403, payload) } func (o *SetNotifierStateForbidden) GetPayload() *models.APIErrorForbiddenExample { @@ -233,11 +238,13 @@ func (o *SetNotifierStateUnprocessableEntity) Code() int { } func (o *SetNotifierStateUnprocessableEntity) Error() string { - return fmt.Sprintf("[PUT /health/notifier][%d] setNotifierStateUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /health/notifier][%d] setNotifierStateUnprocessableEntity %s", 422, payload) } func (o *SetNotifierStateUnprocessableEntity) String() string { - return fmt.Sprintf("[PUT /health/notifier][%d] setNotifierStateUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /health/notifier][%d] setNotifierStateUnprocessableEntity %s", 422, payload) } func (o *SetNotifierStateUnprocessableEntity) GetPayload() *models.APIErrorRenderExample { @@ -301,11 +308,13 @@ func (o *SetNotifierStateInternalServerError) Code() int { } func (o *SetNotifierStateInternalServerError) Error() string { - return fmt.Sprintf("[PUT /health/notifier][%d] setNotifierStateInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /health/notifier][%d] setNotifierStateInternalServerError %s", 500, payload) } func (o *SetNotifierStateInternalServerError) String() string { - return fmt.Sprintf("[PUT /health/notifier][%d] setNotifierStateInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /health/notifier][%d] setNotifierStateInternalServerError %s", 500, payload) } func (o *SetNotifierStateInternalServerError) GetPayload() *models.APIErrorInternalServerExample { diff --git a/pkg/client/notification/delete_all_notifications_responses.go b/pkg/client/notification/delete_all_notifications_responses.go index 70adfa8..9d98229 100644 --- a/pkg/client/notification/delete_all_notifications_responses.go +++ b/pkg/client/notification/delete_all_notifications_responses.go @@ -6,6 +6,7 @@ package notification // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -91,11 +92,13 @@ func (o *DeleteAllNotificationsOK) Code() int { } func (o *DeleteAllNotificationsOK) Error() string { - return fmt.Sprintf("[DELETE /notification][%d] deleteAllNotificationsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /notification][%d] deleteAllNotificationsOK %s", 200, payload) } func (o *DeleteAllNotificationsOK) String() string { - return fmt.Sprintf("[DELETE /notification][%d] deleteAllNotificationsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /notification][%d] deleteAllNotificationsOK %s", 200, payload) } func (o *DeleteAllNotificationsOK) GetPayload() *models.DtoNotificationsList { @@ -159,11 +162,13 @@ func (o *DeleteAllNotificationsForbidden) Code() int { } func (o *DeleteAllNotificationsForbidden) Error() string { - return fmt.Sprintf("[DELETE /notification][%d] deleteAllNotificationsForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /notification][%d] deleteAllNotificationsForbidden %s", 403, payload) } func (o *DeleteAllNotificationsForbidden) String() string { - return fmt.Sprintf("[DELETE /notification][%d] deleteAllNotificationsForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /notification][%d] deleteAllNotificationsForbidden %s", 403, payload) } func (o *DeleteAllNotificationsForbidden) GetPayload() *models.APIErrorForbiddenExample { @@ -227,11 +232,13 @@ func (o *DeleteAllNotificationsInternalServerError) Code() int { } func (o *DeleteAllNotificationsInternalServerError) Error() string { - return fmt.Sprintf("[DELETE /notification][%d] deleteAllNotificationsInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /notification][%d] deleteAllNotificationsInternalServerError %s", 500, payload) } func (o *DeleteAllNotificationsInternalServerError) String() string { - return fmt.Sprintf("[DELETE /notification][%d] deleteAllNotificationsInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /notification][%d] deleteAllNotificationsInternalServerError %s", 500, payload) } func (o *DeleteAllNotificationsInternalServerError) GetPayload() *models.APIErrorInternalServerExample { diff --git a/pkg/client/notification/get_notifications_responses.go b/pkg/client/notification/get_notifications_responses.go index cf249f5..d296cf2 100644 --- a/pkg/client/notification/get_notifications_responses.go +++ b/pkg/client/notification/get_notifications_responses.go @@ -6,6 +6,7 @@ package notification // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -97,11 +98,13 @@ func (o *GetNotificationsOK) Code() int { } func (o *GetNotificationsOK) Error() string { - return fmt.Sprintf("[GET /notification][%d] getNotificationsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /notification][%d] getNotificationsOK %s", 200, payload) } func (o *GetNotificationsOK) String() string { - return fmt.Sprintf("[GET /notification][%d] getNotificationsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /notification][%d] getNotificationsOK %s", 200, payload) } func (o *GetNotificationsOK) GetPayload() *models.DtoNotificationsList { @@ -165,11 +168,13 @@ func (o *GetNotificationsBadRequest) Code() int { } func (o *GetNotificationsBadRequest) Error() string { - return fmt.Sprintf("[GET /notification][%d] getNotificationsBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /notification][%d] getNotificationsBadRequest %s", 400, payload) } func (o *GetNotificationsBadRequest) String() string { - return fmt.Sprintf("[GET /notification][%d] getNotificationsBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /notification][%d] getNotificationsBadRequest %s", 400, payload) } func (o *GetNotificationsBadRequest) GetPayload() *models.APIErrorInvalidRequestExample { @@ -233,11 +238,13 @@ func (o *GetNotificationsUnprocessableEntity) Code() int { } func (o *GetNotificationsUnprocessableEntity) Error() string { - return fmt.Sprintf("[GET /notification][%d] getNotificationsUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /notification][%d] getNotificationsUnprocessableEntity %s", 422, payload) } func (o *GetNotificationsUnprocessableEntity) String() string { - return fmt.Sprintf("[GET /notification][%d] getNotificationsUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /notification][%d] getNotificationsUnprocessableEntity %s", 422, payload) } func (o *GetNotificationsUnprocessableEntity) GetPayload() *models.APIErrorRenderExample { @@ -301,11 +308,13 @@ func (o *GetNotificationsInternalServerError) Code() int { } func (o *GetNotificationsInternalServerError) Error() string { - return fmt.Sprintf("[GET /notification][%d] getNotificationsInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /notification][%d] getNotificationsInternalServerError %s", 500, payload) } func (o *GetNotificationsInternalServerError) String() string { - return fmt.Sprintf("[GET /notification][%d] getNotificationsInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /notification][%d] getNotificationsInternalServerError %s", 500, payload) } func (o *GetNotificationsInternalServerError) GetPayload() *models.APIErrorInternalServerExample { diff --git a/pkg/client/notification/notification_client.go b/pkg/client/notification/notification_client.go index 96ca5df..2ba4c1a 100644 --- a/pkg/client/notification/notification_client.go +++ b/pkg/client/notification/notification_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new notification 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 notification 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 notification API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/pkg/client/pattern/delete_pattern_responses.go b/pkg/client/pattern/delete_pattern_responses.go index cde2c33..dfcddc0 100644 --- a/pkg/client/pattern/delete_pattern_responses.go +++ b/pkg/client/pattern/delete_pattern_responses.go @@ -6,6 +6,7 @@ package pattern // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -96,11 +97,11 @@ func (o *DeletePatternOK) Code() int { } func (o *DeletePatternOK) Error() string { - return fmt.Sprintf("[DELETE /pattern/{pattern}][%d] deletePatternOK ", 200) + return fmt.Sprintf("[DELETE /pattern/{pattern}][%d] deletePatternOK", 200) } func (o *DeletePatternOK) String() string { - return fmt.Sprintf("[DELETE /pattern/{pattern}][%d] deletePatternOK ", 200) + return fmt.Sprintf("[DELETE /pattern/{pattern}][%d] deletePatternOK", 200) } func (o *DeletePatternOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -153,11 +154,13 @@ func (o *DeletePatternBadRequest) Code() int { } func (o *DeletePatternBadRequest) Error() string { - return fmt.Sprintf("[DELETE /pattern/{pattern}][%d] deletePatternBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pattern/{pattern}][%d] deletePatternBadRequest %s", 400, payload) } func (o *DeletePatternBadRequest) String() string { - return fmt.Sprintf("[DELETE /pattern/{pattern}][%d] deletePatternBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pattern/{pattern}][%d] deletePatternBadRequest %s", 400, payload) } func (o *DeletePatternBadRequest) GetPayload() *models.APIErrorInvalidRequestExample { @@ -221,11 +224,13 @@ func (o *DeletePatternForbidden) Code() int { } func (o *DeletePatternForbidden) Error() string { - return fmt.Sprintf("[DELETE /pattern/{pattern}][%d] deletePatternForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pattern/{pattern}][%d] deletePatternForbidden %s", 403, payload) } func (o *DeletePatternForbidden) String() string { - return fmt.Sprintf("[DELETE /pattern/{pattern}][%d] deletePatternForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pattern/{pattern}][%d] deletePatternForbidden %s", 403, payload) } func (o *DeletePatternForbidden) GetPayload() *models.APIErrorForbiddenExample { @@ -289,11 +294,13 @@ func (o *DeletePatternInternalServerError) Code() int { } func (o *DeletePatternInternalServerError) Error() string { - return fmt.Sprintf("[DELETE /pattern/{pattern}][%d] deletePatternInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pattern/{pattern}][%d] deletePatternInternalServerError %s", 500, payload) } func (o *DeletePatternInternalServerError) String() string { - return fmt.Sprintf("[DELETE /pattern/{pattern}][%d] deletePatternInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pattern/{pattern}][%d] deletePatternInternalServerError %s", 500, payload) } func (o *DeletePatternInternalServerError) GetPayload() *models.APIErrorInternalServerExample { diff --git a/pkg/client/pattern/get_all_patterns_responses.go b/pkg/client/pattern/get_all_patterns_responses.go index 52b45d9..4329ee7 100644 --- a/pkg/client/pattern/get_all_patterns_responses.go +++ b/pkg/client/pattern/get_all_patterns_responses.go @@ -6,6 +6,7 @@ package pattern // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -97,11 +98,13 @@ func (o *GetAllPatternsOK) Code() int { } func (o *GetAllPatternsOK) Error() string { - return fmt.Sprintf("[GET /pattern][%d] getAllPatternsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pattern][%d] getAllPatternsOK %s", 200, payload) } func (o *GetAllPatternsOK) String() string { - return fmt.Sprintf("[GET /pattern][%d] getAllPatternsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pattern][%d] getAllPatternsOK %s", 200, payload) } func (o *GetAllPatternsOK) GetPayload() *models.DtoPatternList { @@ -165,11 +168,13 @@ func (o *GetAllPatternsForbidden) Code() int { } func (o *GetAllPatternsForbidden) Error() string { - return fmt.Sprintf("[GET /pattern][%d] getAllPatternsForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pattern][%d] getAllPatternsForbidden %s", 403, payload) } func (o *GetAllPatternsForbidden) String() string { - return fmt.Sprintf("[GET /pattern][%d] getAllPatternsForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pattern][%d] getAllPatternsForbidden %s", 403, payload) } func (o *GetAllPatternsForbidden) GetPayload() *models.APIErrorForbiddenExample { @@ -233,11 +238,13 @@ func (o *GetAllPatternsUnprocessableEntity) Code() int { } func (o *GetAllPatternsUnprocessableEntity) Error() string { - return fmt.Sprintf("[GET /pattern][%d] getAllPatternsUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pattern][%d] getAllPatternsUnprocessableEntity %s", 422, payload) } func (o *GetAllPatternsUnprocessableEntity) String() string { - return fmt.Sprintf("[GET /pattern][%d] getAllPatternsUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pattern][%d] getAllPatternsUnprocessableEntity %s", 422, payload) } func (o *GetAllPatternsUnprocessableEntity) GetPayload() *models.APIErrorRenderExample { @@ -301,11 +308,13 @@ func (o *GetAllPatternsInternalServerError) Code() int { } func (o *GetAllPatternsInternalServerError) Error() string { - return fmt.Sprintf("[GET /pattern][%d] getAllPatternsInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pattern][%d] getAllPatternsInternalServerError %s", 500, payload) } func (o *GetAllPatternsInternalServerError) String() string { - return fmt.Sprintf("[GET /pattern][%d] getAllPatternsInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pattern][%d] getAllPatternsInternalServerError %s", 500, payload) } func (o *GetAllPatternsInternalServerError) GetPayload() *models.APIErrorInternalServerExample { diff --git a/pkg/client/pattern/pattern_client.go b/pkg/client/pattern/pattern_client.go index 503b096..b299da1 100644 --- a/pkg/client/pattern/pattern_client.go +++ b/pkg/client/pattern/pattern_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new pattern 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 pattern 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 pattern API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/pkg/client/subscription/create_subscription_responses.go b/pkg/client/subscription/create_subscription_responses.go index a93012a..eb4f729 100644 --- a/pkg/client/subscription/create_subscription_responses.go +++ b/pkg/client/subscription/create_subscription_responses.go @@ -6,6 +6,7 @@ package subscription // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -97,11 +98,13 @@ func (o *CreateSubscriptionOK) Code() int { } func (o *CreateSubscriptionOK) Error() string { - return fmt.Sprintf("[PUT /subscription][%d] createSubscriptionOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /subscription][%d] createSubscriptionOK %s", 200, payload) } func (o *CreateSubscriptionOK) String() string { - return fmt.Sprintf("[PUT /subscription][%d] createSubscriptionOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /subscription][%d] createSubscriptionOK %s", 200, payload) } func (o *CreateSubscriptionOK) GetPayload() *models.DtoSubscription { @@ -165,11 +168,13 @@ func (o *CreateSubscriptionBadRequest) Code() int { } func (o *CreateSubscriptionBadRequest) Error() string { - return fmt.Sprintf("[PUT /subscription][%d] createSubscriptionBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /subscription][%d] createSubscriptionBadRequest %s", 400, payload) } func (o *CreateSubscriptionBadRequest) String() string { - return fmt.Sprintf("[PUT /subscription][%d] createSubscriptionBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /subscription][%d] createSubscriptionBadRequest %s", 400, payload) } func (o *CreateSubscriptionBadRequest) GetPayload() *models.APIErrorInvalidRequestExample { @@ -233,11 +238,13 @@ func (o *CreateSubscriptionUnprocessableEntity) Code() int { } func (o *CreateSubscriptionUnprocessableEntity) Error() string { - return fmt.Sprintf("[PUT /subscription][%d] createSubscriptionUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /subscription][%d] createSubscriptionUnprocessableEntity %s", 422, payload) } func (o *CreateSubscriptionUnprocessableEntity) String() string { - return fmt.Sprintf("[PUT /subscription][%d] createSubscriptionUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /subscription][%d] createSubscriptionUnprocessableEntity %s", 422, payload) } func (o *CreateSubscriptionUnprocessableEntity) GetPayload() *models.APIErrorRenderExample { @@ -301,11 +308,13 @@ func (o *CreateSubscriptionInternalServerError) Code() int { } func (o *CreateSubscriptionInternalServerError) Error() string { - return fmt.Sprintf("[PUT /subscription][%d] createSubscriptionInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /subscription][%d] createSubscriptionInternalServerError %s", 500, payload) } func (o *CreateSubscriptionInternalServerError) String() string { - return fmt.Sprintf("[PUT /subscription][%d] createSubscriptionInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /subscription][%d] createSubscriptionInternalServerError %s", 500, payload) } func (o *CreateSubscriptionInternalServerError) GetPayload() *models.APIErrorInternalServerExample { diff --git a/pkg/client/subscription/get_subscription_responses.go b/pkg/client/subscription/get_subscription_responses.go index 2d675fb..440b8af 100644 --- a/pkg/client/subscription/get_subscription_responses.go +++ b/pkg/client/subscription/get_subscription_responses.go @@ -6,6 +6,7 @@ package subscription // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -97,11 +98,13 @@ func (o *GetSubscriptionOK) Code() int { } func (o *GetSubscriptionOK) Error() string { - return fmt.Sprintf("[GET /subscription/{subscriptionID}][%d] getSubscriptionOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /subscription/{subscriptionID}][%d] getSubscriptionOK %s", 200, payload) } func (o *GetSubscriptionOK) String() string { - return fmt.Sprintf("[GET /subscription/{subscriptionID}][%d] getSubscriptionOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /subscription/{subscriptionID}][%d] getSubscriptionOK %s", 200, payload) } func (o *GetSubscriptionOK) GetPayload() *models.DtoSubscription { @@ -165,11 +168,13 @@ func (o *GetSubscriptionForbidden) Code() int { } func (o *GetSubscriptionForbidden) Error() string { - return fmt.Sprintf("[GET /subscription/{subscriptionID}][%d] getSubscriptionForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /subscription/{subscriptionID}][%d] getSubscriptionForbidden %s", 403, payload) } func (o *GetSubscriptionForbidden) String() string { - return fmt.Sprintf("[GET /subscription/{subscriptionID}][%d] getSubscriptionForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /subscription/{subscriptionID}][%d] getSubscriptionForbidden %s", 403, payload) } func (o *GetSubscriptionForbidden) GetPayload() *models.APIErrorForbiddenExample { @@ -233,11 +238,13 @@ func (o *GetSubscriptionUnprocessableEntity) Code() int { } func (o *GetSubscriptionUnprocessableEntity) Error() string { - return fmt.Sprintf("[GET /subscription/{subscriptionID}][%d] getSubscriptionUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /subscription/{subscriptionID}][%d] getSubscriptionUnprocessableEntity %s", 422, payload) } func (o *GetSubscriptionUnprocessableEntity) String() string { - return fmt.Sprintf("[GET /subscription/{subscriptionID}][%d] getSubscriptionUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /subscription/{subscriptionID}][%d] getSubscriptionUnprocessableEntity %s", 422, payload) } func (o *GetSubscriptionUnprocessableEntity) GetPayload() *models.APIErrorRenderExample { @@ -301,11 +308,13 @@ func (o *GetSubscriptionInternalServerError) Code() int { } func (o *GetSubscriptionInternalServerError) Error() string { - return fmt.Sprintf("[GET /subscription/{subscriptionID}][%d] getSubscriptionInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /subscription/{subscriptionID}][%d] getSubscriptionInternalServerError %s", 500, payload) } func (o *GetSubscriptionInternalServerError) String() string { - return fmt.Sprintf("[GET /subscription/{subscriptionID}][%d] getSubscriptionInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /subscription/{subscriptionID}][%d] getSubscriptionInternalServerError %s", 500, payload) } func (o *GetSubscriptionInternalServerError) GetPayload() *models.APIErrorInternalServerExample { diff --git a/pkg/client/subscription/get_user_subscriptions_responses.go b/pkg/client/subscription/get_user_subscriptions_responses.go index 4980e69..c7ccc98 100644 --- a/pkg/client/subscription/get_user_subscriptions_responses.go +++ b/pkg/client/subscription/get_user_subscriptions_responses.go @@ -6,6 +6,7 @@ package subscription // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -91,11 +92,13 @@ func (o *GetUserSubscriptionsOK) Code() int { } func (o *GetUserSubscriptionsOK) Error() string { - return fmt.Sprintf("[GET /subscription][%d] getUserSubscriptionsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /subscription][%d] getUserSubscriptionsOK %s", 200, payload) } func (o *GetUserSubscriptionsOK) String() string { - return fmt.Sprintf("[GET /subscription][%d] getUserSubscriptionsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /subscription][%d] getUserSubscriptionsOK %s", 200, payload) } func (o *GetUserSubscriptionsOK) GetPayload() *models.DtoSubscriptionList { @@ -159,11 +162,13 @@ func (o *GetUserSubscriptionsUnprocessableEntity) Code() int { } func (o *GetUserSubscriptionsUnprocessableEntity) Error() string { - return fmt.Sprintf("[GET /subscription][%d] getUserSubscriptionsUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /subscription][%d] getUserSubscriptionsUnprocessableEntity %s", 422, payload) } func (o *GetUserSubscriptionsUnprocessableEntity) String() string { - return fmt.Sprintf("[GET /subscription][%d] getUserSubscriptionsUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /subscription][%d] getUserSubscriptionsUnprocessableEntity %s", 422, payload) } func (o *GetUserSubscriptionsUnprocessableEntity) GetPayload() *models.APIErrorRenderExample { @@ -227,11 +232,13 @@ func (o *GetUserSubscriptionsInternalServerError) Code() int { } func (o *GetUserSubscriptionsInternalServerError) Error() string { - return fmt.Sprintf("[GET /subscription][%d] getUserSubscriptionsInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /subscription][%d] getUserSubscriptionsInternalServerError %s", 500, payload) } func (o *GetUserSubscriptionsInternalServerError) String() string { - return fmt.Sprintf("[GET /subscription][%d] getUserSubscriptionsInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /subscription][%d] getUserSubscriptionsInternalServerError %s", 500, payload) } func (o *GetUserSubscriptionsInternalServerError) GetPayload() *models.APIErrorInternalServerExample { diff --git a/pkg/client/subscription/remove_subscription_responses.go b/pkg/client/subscription/remove_subscription_responses.go index 5d7675f..69bc143 100644 --- a/pkg/client/subscription/remove_subscription_responses.go +++ b/pkg/client/subscription/remove_subscription_responses.go @@ -6,6 +6,7 @@ package subscription // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -96,11 +97,11 @@ func (o *RemoveSubscriptionOK) Code() int { } func (o *RemoveSubscriptionOK) Error() string { - return fmt.Sprintf("[DELETE /subscription/{subscriptionID}][%d] removeSubscriptionOK ", 200) + return fmt.Sprintf("[DELETE /subscription/{subscriptionID}][%d] removeSubscriptionOK", 200) } func (o *RemoveSubscriptionOK) String() string { - return fmt.Sprintf("[DELETE /subscription/{subscriptionID}][%d] removeSubscriptionOK ", 200) + return fmt.Sprintf("[DELETE /subscription/{subscriptionID}][%d] removeSubscriptionOK", 200) } func (o *RemoveSubscriptionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -153,11 +154,13 @@ func (o *RemoveSubscriptionForbidden) Code() int { } func (o *RemoveSubscriptionForbidden) Error() string { - return fmt.Sprintf("[DELETE /subscription/{subscriptionID}][%d] removeSubscriptionForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /subscription/{subscriptionID}][%d] removeSubscriptionForbidden %s", 403, payload) } func (o *RemoveSubscriptionForbidden) String() string { - return fmt.Sprintf("[DELETE /subscription/{subscriptionID}][%d] removeSubscriptionForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /subscription/{subscriptionID}][%d] removeSubscriptionForbidden %s", 403, payload) } func (o *RemoveSubscriptionForbidden) GetPayload() *models.APIErrorForbiddenExample { @@ -221,11 +224,13 @@ func (o *RemoveSubscriptionNotFound) Code() int { } func (o *RemoveSubscriptionNotFound) Error() string { - return fmt.Sprintf("[DELETE /subscription/{subscriptionID}][%d] removeSubscriptionNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /subscription/{subscriptionID}][%d] removeSubscriptionNotFound %s", 404, payload) } func (o *RemoveSubscriptionNotFound) String() string { - return fmt.Sprintf("[DELETE /subscription/{subscriptionID}][%d] removeSubscriptionNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /subscription/{subscriptionID}][%d] removeSubscriptionNotFound %s", 404, payload) } func (o *RemoveSubscriptionNotFound) GetPayload() *models.APIErrorNotFoundExample { @@ -289,11 +294,13 @@ func (o *RemoveSubscriptionInternalServerError) Code() int { } func (o *RemoveSubscriptionInternalServerError) Error() string { - return fmt.Sprintf("[DELETE /subscription/{subscriptionID}][%d] removeSubscriptionInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /subscription/{subscriptionID}][%d] removeSubscriptionInternalServerError %s", 500, payload) } func (o *RemoveSubscriptionInternalServerError) String() string { - return fmt.Sprintf("[DELETE /subscription/{subscriptionID}][%d] removeSubscriptionInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /subscription/{subscriptionID}][%d] removeSubscriptionInternalServerError %s", 500, payload) } func (o *RemoveSubscriptionInternalServerError) GetPayload() *models.APIErrorInternalServerExample { diff --git a/pkg/client/subscription/send_test_notification_responses.go b/pkg/client/subscription/send_test_notification_responses.go index 43abe01..5b05d19 100644 --- a/pkg/client/subscription/send_test_notification_responses.go +++ b/pkg/client/subscription/send_test_notification_responses.go @@ -6,6 +6,7 @@ package subscription // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -96,11 +97,11 @@ func (o *SendTestNotificationOK) Code() int { } func (o *SendTestNotificationOK) Error() string { - return fmt.Sprintf("[PUT /subscription/{subscriptionID}/test][%d] sendTestNotificationOK ", 200) + return fmt.Sprintf("[PUT /subscription/{subscriptionID}/test][%d] sendTestNotificationOK", 200) } func (o *SendTestNotificationOK) String() string { - return fmt.Sprintf("[PUT /subscription/{subscriptionID}/test][%d] sendTestNotificationOK ", 200) + return fmt.Sprintf("[PUT /subscription/{subscriptionID}/test][%d] sendTestNotificationOK", 200) } func (o *SendTestNotificationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -153,11 +154,13 @@ func (o *SendTestNotificationForbidden) Code() int { } func (o *SendTestNotificationForbidden) Error() string { - return fmt.Sprintf("[PUT /subscription/{subscriptionID}/test][%d] sendTestNotificationForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /subscription/{subscriptionID}/test][%d] sendTestNotificationForbidden %s", 403, payload) } func (o *SendTestNotificationForbidden) String() string { - return fmt.Sprintf("[PUT /subscription/{subscriptionID}/test][%d] sendTestNotificationForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /subscription/{subscriptionID}/test][%d] sendTestNotificationForbidden %s", 403, payload) } func (o *SendTestNotificationForbidden) GetPayload() *models.APIErrorForbiddenExample { @@ -221,11 +224,13 @@ func (o *SendTestNotificationNotFound) Code() int { } func (o *SendTestNotificationNotFound) Error() string { - return fmt.Sprintf("[PUT /subscription/{subscriptionID}/test][%d] sendTestNotificationNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /subscription/{subscriptionID}/test][%d] sendTestNotificationNotFound %s", 404, payload) } func (o *SendTestNotificationNotFound) String() string { - return fmt.Sprintf("[PUT /subscription/{subscriptionID}/test][%d] sendTestNotificationNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /subscription/{subscriptionID}/test][%d] sendTestNotificationNotFound %s", 404, payload) } func (o *SendTestNotificationNotFound) GetPayload() *models.APIErrorNotFoundExample { @@ -289,11 +294,13 @@ func (o *SendTestNotificationInternalServerError) Code() int { } func (o *SendTestNotificationInternalServerError) Error() string { - return fmt.Sprintf("[PUT /subscription/{subscriptionID}/test][%d] sendTestNotificationInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /subscription/{subscriptionID}/test][%d] sendTestNotificationInternalServerError %s", 500, payload) } func (o *SendTestNotificationInternalServerError) String() string { - return fmt.Sprintf("[PUT /subscription/{subscriptionID}/test][%d] sendTestNotificationInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /subscription/{subscriptionID}/test][%d] sendTestNotificationInternalServerError %s", 500, payload) } func (o *SendTestNotificationInternalServerError) GetPayload() *models.APIErrorInternalServerExample { diff --git a/pkg/client/subscription/subscription_client.go b/pkg/client/subscription/subscription_client.go index 35c0993..45f5026 100644 --- a/pkg/client/subscription/subscription_client.go +++ b/pkg/client/subscription/subscription_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new subscription 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 subscription 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 subscription API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/pkg/client/subscription/update_subscription_responses.go b/pkg/client/subscription/update_subscription_responses.go index 167acf7..2c8d208 100644 --- a/pkg/client/subscription/update_subscription_responses.go +++ b/pkg/client/subscription/update_subscription_responses.go @@ -6,6 +6,7 @@ package subscription // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *UpdateSubscriptionOK) Code() int { } func (o *UpdateSubscriptionOK) Error() string { - return fmt.Sprintf("[PUT /subscription/{subscriptionID}][%d] updateSubscriptionOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /subscription/{subscriptionID}][%d] updateSubscriptionOK %s", 200, payload) } func (o *UpdateSubscriptionOK) String() string { - return fmt.Sprintf("[PUT /subscription/{subscriptionID}][%d] updateSubscriptionOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /subscription/{subscriptionID}][%d] updateSubscriptionOK %s", 200, payload) } func (o *UpdateSubscriptionOK) GetPayload() *models.DtoSubscription { @@ -177,11 +180,13 @@ func (o *UpdateSubscriptionBadRequest) Code() int { } func (o *UpdateSubscriptionBadRequest) Error() string { - return fmt.Sprintf("[PUT /subscription/{subscriptionID}][%d] updateSubscriptionBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /subscription/{subscriptionID}][%d] updateSubscriptionBadRequest %s", 400, payload) } func (o *UpdateSubscriptionBadRequest) String() string { - return fmt.Sprintf("[PUT /subscription/{subscriptionID}][%d] updateSubscriptionBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /subscription/{subscriptionID}][%d] updateSubscriptionBadRequest %s", 400, payload) } func (o *UpdateSubscriptionBadRequest) GetPayload() *models.APIErrorInvalidRequestExample { @@ -245,11 +250,13 @@ func (o *UpdateSubscriptionForbidden) Code() int { } func (o *UpdateSubscriptionForbidden) Error() string { - return fmt.Sprintf("[PUT /subscription/{subscriptionID}][%d] updateSubscriptionForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /subscription/{subscriptionID}][%d] updateSubscriptionForbidden %s", 403, payload) } func (o *UpdateSubscriptionForbidden) String() string { - return fmt.Sprintf("[PUT /subscription/{subscriptionID}][%d] updateSubscriptionForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /subscription/{subscriptionID}][%d] updateSubscriptionForbidden %s", 403, payload) } func (o *UpdateSubscriptionForbidden) GetPayload() *models.APIErrorForbiddenExample { @@ -313,11 +320,13 @@ func (o *UpdateSubscriptionNotFound) Code() int { } func (o *UpdateSubscriptionNotFound) Error() string { - return fmt.Sprintf("[PUT /subscription/{subscriptionID}][%d] updateSubscriptionNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /subscription/{subscriptionID}][%d] updateSubscriptionNotFound %s", 404, payload) } func (o *UpdateSubscriptionNotFound) String() string { - return fmt.Sprintf("[PUT /subscription/{subscriptionID}][%d] updateSubscriptionNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /subscription/{subscriptionID}][%d] updateSubscriptionNotFound %s", 404, payload) } func (o *UpdateSubscriptionNotFound) GetPayload() *models.APIErrorNotFoundExample { @@ -381,11 +390,13 @@ func (o *UpdateSubscriptionUnprocessableEntity) Code() int { } func (o *UpdateSubscriptionUnprocessableEntity) Error() string { - return fmt.Sprintf("[PUT /subscription/{subscriptionID}][%d] updateSubscriptionUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /subscription/{subscriptionID}][%d] updateSubscriptionUnprocessableEntity %s", 422, payload) } func (o *UpdateSubscriptionUnprocessableEntity) String() string { - return fmt.Sprintf("[PUT /subscription/{subscriptionID}][%d] updateSubscriptionUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /subscription/{subscriptionID}][%d] updateSubscriptionUnprocessableEntity %s", 422, payload) } func (o *UpdateSubscriptionUnprocessableEntity) GetPayload() *models.APIErrorRenderExample { @@ -449,11 +460,13 @@ func (o *UpdateSubscriptionInternalServerError) Code() int { } func (o *UpdateSubscriptionInternalServerError) Error() string { - return fmt.Sprintf("[PUT /subscription/{subscriptionID}][%d] updateSubscriptionInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /subscription/{subscriptionID}][%d] updateSubscriptionInternalServerError %s", 500, payload) } func (o *UpdateSubscriptionInternalServerError) String() string { - return fmt.Sprintf("[PUT /subscription/{subscriptionID}][%d] updateSubscriptionInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /subscription/{subscriptionID}][%d] updateSubscriptionInternalServerError %s", 500, payload) } func (o *UpdateSubscriptionInternalServerError) GetPayload() *models.APIErrorInternalServerExample { diff --git a/pkg/client/tag/create_tags_responses.go b/pkg/client/tag/create_tags_responses.go index fddcade..6eb6927 100644 --- a/pkg/client/tag/create_tags_responses.go +++ b/pkg/client/tag/create_tags_responses.go @@ -6,6 +6,7 @@ package tag // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -96,11 +97,11 @@ func (o *CreateTagsOK) Code() int { } func (o *CreateTagsOK) Error() string { - return fmt.Sprintf("[POST /tag][%d] createTagsOK ", 200) + return fmt.Sprintf("[POST /tag][%d] createTagsOK", 200) } func (o *CreateTagsOK) String() string { - return fmt.Sprintf("[POST /tag][%d] createTagsOK ", 200) + return fmt.Sprintf("[POST /tag][%d] createTagsOK", 200) } func (o *CreateTagsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -153,11 +154,13 @@ func (o *CreateTagsBadRequest) Code() int { } func (o *CreateTagsBadRequest) Error() string { - return fmt.Sprintf("[POST /tag][%d] createTagsBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /tag][%d] createTagsBadRequest %s", 400, payload) } func (o *CreateTagsBadRequest) String() string { - return fmt.Sprintf("[POST /tag][%d] createTagsBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /tag][%d] createTagsBadRequest %s", 400, payload) } func (o *CreateTagsBadRequest) GetPayload() *models.APIErrorInvalidRequestExample { @@ -221,11 +224,13 @@ func (o *CreateTagsUnprocessableEntity) Code() int { } func (o *CreateTagsUnprocessableEntity) Error() string { - return fmt.Sprintf("[POST /tag][%d] createTagsUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /tag][%d] createTagsUnprocessableEntity %s", 422, payload) } func (o *CreateTagsUnprocessableEntity) String() string { - return fmt.Sprintf("[POST /tag][%d] createTagsUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /tag][%d] createTagsUnprocessableEntity %s", 422, payload) } func (o *CreateTagsUnprocessableEntity) GetPayload() *models.APIErrorRenderExample { @@ -289,11 +294,13 @@ func (o *CreateTagsInternalServerError) Code() int { } func (o *CreateTagsInternalServerError) Error() string { - return fmt.Sprintf("[POST /tag][%d] createTagsInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /tag][%d] createTagsInternalServerError %s", 500, payload) } func (o *CreateTagsInternalServerError) String() string { - return fmt.Sprintf("[POST /tag][%d] createTagsInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /tag][%d] createTagsInternalServerError %s", 500, payload) } func (o *CreateTagsInternalServerError) GetPayload() *models.APIErrorInternalServerExample { diff --git a/pkg/client/tag/get_all_tags_and_subscriptions_responses.go b/pkg/client/tag/get_all_tags_and_subscriptions_responses.go index b7d1381..00c429f 100644 --- a/pkg/client/tag/get_all_tags_and_subscriptions_responses.go +++ b/pkg/client/tag/get_all_tags_and_subscriptions_responses.go @@ -6,6 +6,7 @@ package tag // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -91,11 +92,13 @@ func (o *GetAllTagsAndSubscriptionsOK) Code() int { } func (o *GetAllTagsAndSubscriptionsOK) Error() string { - return fmt.Sprintf("[GET /tag/stats][%d] getAllTagsAndSubscriptionsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /tag/stats][%d] getAllTagsAndSubscriptionsOK %s", 200, payload) } func (o *GetAllTagsAndSubscriptionsOK) String() string { - return fmt.Sprintf("[GET /tag/stats][%d] getAllTagsAndSubscriptionsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /tag/stats][%d] getAllTagsAndSubscriptionsOK %s", 200, payload) } func (o *GetAllTagsAndSubscriptionsOK) GetPayload() *models.DtoTagsStatistics { @@ -159,11 +162,13 @@ func (o *GetAllTagsAndSubscriptionsUnprocessableEntity) Code() int { } func (o *GetAllTagsAndSubscriptionsUnprocessableEntity) Error() string { - return fmt.Sprintf("[GET /tag/stats][%d] getAllTagsAndSubscriptionsUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /tag/stats][%d] getAllTagsAndSubscriptionsUnprocessableEntity %s", 422, payload) } func (o *GetAllTagsAndSubscriptionsUnprocessableEntity) String() string { - return fmt.Sprintf("[GET /tag/stats][%d] getAllTagsAndSubscriptionsUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /tag/stats][%d] getAllTagsAndSubscriptionsUnprocessableEntity %s", 422, payload) } func (o *GetAllTagsAndSubscriptionsUnprocessableEntity) GetPayload() *models.APIErrorRenderExample { @@ -227,11 +232,13 @@ func (o *GetAllTagsAndSubscriptionsInternalServerError) Code() int { } func (o *GetAllTagsAndSubscriptionsInternalServerError) Error() string { - return fmt.Sprintf("[GET /tag/stats][%d] getAllTagsAndSubscriptionsInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /tag/stats][%d] getAllTagsAndSubscriptionsInternalServerError %s", 500, payload) } func (o *GetAllTagsAndSubscriptionsInternalServerError) String() string { - return fmt.Sprintf("[GET /tag/stats][%d] getAllTagsAndSubscriptionsInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /tag/stats][%d] getAllTagsAndSubscriptionsInternalServerError %s", 500, payload) } func (o *GetAllTagsAndSubscriptionsInternalServerError) GetPayload() *models.APIErrorInternalServerExample { diff --git a/pkg/client/tag/get_all_tags_responses.go b/pkg/client/tag/get_all_tags_responses.go index ca462c7..c1a3b2b 100644 --- a/pkg/client/tag/get_all_tags_responses.go +++ b/pkg/client/tag/get_all_tags_responses.go @@ -6,6 +6,7 @@ package tag // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -91,11 +92,13 @@ func (o *GetAllTagsOK) Code() int { } func (o *GetAllTagsOK) Error() string { - return fmt.Sprintf("[GET /tag][%d] getAllTagsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /tag][%d] getAllTagsOK %s", 200, payload) } func (o *GetAllTagsOK) String() string { - return fmt.Sprintf("[GET /tag][%d] getAllTagsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /tag][%d] getAllTagsOK %s", 200, payload) } func (o *GetAllTagsOK) GetPayload() *models.DtoTagsData { @@ -159,11 +162,13 @@ func (o *GetAllTagsUnprocessableEntity) Code() int { } func (o *GetAllTagsUnprocessableEntity) Error() string { - return fmt.Sprintf("[GET /tag][%d] getAllTagsUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /tag][%d] getAllTagsUnprocessableEntity %s", 422, payload) } func (o *GetAllTagsUnprocessableEntity) String() string { - return fmt.Sprintf("[GET /tag][%d] getAllTagsUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /tag][%d] getAllTagsUnprocessableEntity %s", 422, payload) } func (o *GetAllTagsUnprocessableEntity) GetPayload() *models.APIErrorRenderExample { @@ -227,11 +232,13 @@ func (o *GetAllTagsInternalServerError) Code() int { } func (o *GetAllTagsInternalServerError) Error() string { - return fmt.Sprintf("[GET /tag][%d] getAllTagsInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /tag][%d] getAllTagsInternalServerError %s", 500, payload) } func (o *GetAllTagsInternalServerError) String() string { - return fmt.Sprintf("[GET /tag][%d] getAllTagsInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /tag][%d] getAllTagsInternalServerError %s", 500, payload) } func (o *GetAllTagsInternalServerError) GetPayload() *models.APIErrorInternalServerExample { diff --git a/pkg/client/tag/remove_tag_responses.go b/pkg/client/tag/remove_tag_responses.go index 86c9863..b73a035 100644 --- a/pkg/client/tag/remove_tag_responses.go +++ b/pkg/client/tag/remove_tag_responses.go @@ -6,6 +6,7 @@ package tag // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -97,11 +98,13 @@ func (o *RemoveTagOK) Code() int { } func (o *RemoveTagOK) Error() string { - return fmt.Sprintf("[DELETE /tag/{tag}][%d] removeTagOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /tag/{tag}][%d] removeTagOK %s", 200, payload) } func (o *RemoveTagOK) String() string { - return fmt.Sprintf("[DELETE /tag/{tag}][%d] removeTagOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /tag/{tag}][%d] removeTagOK %s", 200, payload) } func (o *RemoveTagOK) GetPayload() *models.DtoMessageResponse { @@ -165,11 +168,13 @@ func (o *RemoveTagBadRequest) Code() int { } func (o *RemoveTagBadRequest) Error() string { - return fmt.Sprintf("[DELETE /tag/{tag}][%d] removeTagBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /tag/{tag}][%d] removeTagBadRequest %s", 400, payload) } func (o *RemoveTagBadRequest) String() string { - return fmt.Sprintf("[DELETE /tag/{tag}][%d] removeTagBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /tag/{tag}][%d] removeTagBadRequest %s", 400, payload) } func (o *RemoveTagBadRequest) GetPayload() *models.APIErrorInvalidRequestExample { @@ -233,11 +238,13 @@ func (o *RemoveTagUnprocessableEntity) Code() int { } func (o *RemoveTagUnprocessableEntity) Error() string { - return fmt.Sprintf("[DELETE /tag/{tag}][%d] removeTagUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /tag/{tag}][%d] removeTagUnprocessableEntity %s", 422, payload) } func (o *RemoveTagUnprocessableEntity) String() string { - return fmt.Sprintf("[DELETE /tag/{tag}][%d] removeTagUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /tag/{tag}][%d] removeTagUnprocessableEntity %s", 422, payload) } func (o *RemoveTagUnprocessableEntity) GetPayload() *models.APIErrorRenderExample { @@ -301,11 +308,13 @@ func (o *RemoveTagInternalServerError) Code() int { } func (o *RemoveTagInternalServerError) Error() string { - return fmt.Sprintf("[DELETE /tag/{tag}][%d] removeTagInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /tag/{tag}][%d] removeTagInternalServerError %s", 500, payload) } func (o *RemoveTagInternalServerError) String() string { - return fmt.Sprintf("[DELETE /tag/{tag}][%d] removeTagInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /tag/{tag}][%d] removeTagInternalServerError %s", 500, payload) } func (o *RemoveTagInternalServerError) GetPayload() *models.APIErrorInternalServerExample { diff --git a/pkg/client/tag/tag_client.go b/pkg/client/tag/tag_client.go index be195ed..6bdb4ea 100644 --- a/pkg/client/tag/tag_client.go +++ b/pkg/client/tag/tag_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new tag 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 tag 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 tag API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/pkg/client/team/add_team_users_responses.go b/pkg/client/team/add_team_users_responses.go index cfe0e4f..6afad30 100644 --- a/pkg/client/team/add_team_users_responses.go +++ b/pkg/client/team/add_team_users_responses.go @@ -6,6 +6,7 @@ package team // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *AddTeamUsersOK) Code() int { } func (o *AddTeamUsersOK) Error() string { - return fmt.Sprintf("[POST /teams/{teamID}/users][%d] addTeamUsersOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /teams/{teamID}/users][%d] addTeamUsersOK %s", 200, payload) } func (o *AddTeamUsersOK) String() string { - return fmt.Sprintf("[POST /teams/{teamID}/users][%d] addTeamUsersOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /teams/{teamID}/users][%d] addTeamUsersOK %s", 200, payload) } func (o *AddTeamUsersOK) GetPayload() *models.DtoTeamMembers { @@ -177,11 +180,13 @@ func (o *AddTeamUsersBadRequest) Code() int { } func (o *AddTeamUsersBadRequest) Error() string { - return fmt.Sprintf("[POST /teams/{teamID}/users][%d] addTeamUsersBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /teams/{teamID}/users][%d] addTeamUsersBadRequest %s", 400, payload) } func (o *AddTeamUsersBadRequest) String() string { - return fmt.Sprintf("[POST /teams/{teamID}/users][%d] addTeamUsersBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /teams/{teamID}/users][%d] addTeamUsersBadRequest %s", 400, payload) } func (o *AddTeamUsersBadRequest) GetPayload() *models.APIErrorInvalidRequestExample { @@ -245,11 +250,13 @@ func (o *AddTeamUsersForbidden) Code() int { } func (o *AddTeamUsersForbidden) Error() string { - return fmt.Sprintf("[POST /teams/{teamID}/users][%d] addTeamUsersForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /teams/{teamID}/users][%d] addTeamUsersForbidden %s", 403, payload) } func (o *AddTeamUsersForbidden) String() string { - return fmt.Sprintf("[POST /teams/{teamID}/users][%d] addTeamUsersForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /teams/{teamID}/users][%d] addTeamUsersForbidden %s", 403, payload) } func (o *AddTeamUsersForbidden) GetPayload() *models.APIErrorForbiddenExample { @@ -313,11 +320,13 @@ func (o *AddTeamUsersNotFound) Code() int { } func (o *AddTeamUsersNotFound) Error() string { - return fmt.Sprintf("[POST /teams/{teamID}/users][%d] addTeamUsersNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /teams/{teamID}/users][%d] addTeamUsersNotFound %s", 404, payload) } func (o *AddTeamUsersNotFound) String() string { - return fmt.Sprintf("[POST /teams/{teamID}/users][%d] addTeamUsersNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /teams/{teamID}/users][%d] addTeamUsersNotFound %s", 404, payload) } func (o *AddTeamUsersNotFound) GetPayload() *models.APIErrorNotFoundExample { @@ -381,11 +390,13 @@ func (o *AddTeamUsersUnprocessableEntity) Code() int { } func (o *AddTeamUsersUnprocessableEntity) Error() string { - return fmt.Sprintf("[POST /teams/{teamID}/users][%d] addTeamUsersUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /teams/{teamID}/users][%d] addTeamUsersUnprocessableEntity %s", 422, payload) } func (o *AddTeamUsersUnprocessableEntity) String() string { - return fmt.Sprintf("[POST /teams/{teamID}/users][%d] addTeamUsersUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /teams/{teamID}/users][%d] addTeamUsersUnprocessableEntity %s", 422, payload) } func (o *AddTeamUsersUnprocessableEntity) GetPayload() *models.APIErrorRenderExample { @@ -449,11 +460,13 @@ func (o *AddTeamUsersInternalServerError) Code() int { } func (o *AddTeamUsersInternalServerError) Error() string { - return fmt.Sprintf("[POST /teams/{teamID}/users][%d] addTeamUsersInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /teams/{teamID}/users][%d] addTeamUsersInternalServerError %s", 500, payload) } func (o *AddTeamUsersInternalServerError) String() string { - return fmt.Sprintf("[POST /teams/{teamID}/users][%d] addTeamUsersInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /teams/{teamID}/users][%d] addTeamUsersInternalServerError %s", 500, payload) } func (o *AddTeamUsersInternalServerError) GetPayload() *models.APIErrorInternalServerExample { diff --git a/pkg/client/team/create_team_responses.go b/pkg/client/team/create_team_responses.go index 5057850..7e5de78 100644 --- a/pkg/client/team/create_team_responses.go +++ b/pkg/client/team/create_team_responses.go @@ -6,6 +6,7 @@ package team // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -97,11 +98,13 @@ func (o *CreateTeamOK) Code() int { } func (o *CreateTeamOK) Error() string { - return fmt.Sprintf("[POST /teams][%d] createTeamOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /teams][%d] createTeamOK %s", 200, payload) } func (o *CreateTeamOK) String() string { - return fmt.Sprintf("[POST /teams][%d] createTeamOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /teams][%d] createTeamOK %s", 200, payload) } func (o *CreateTeamOK) GetPayload() *models.DtoSaveTeamResponse { @@ -165,11 +168,13 @@ func (o *CreateTeamBadRequest) Code() int { } func (o *CreateTeamBadRequest) Error() string { - return fmt.Sprintf("[POST /teams][%d] createTeamBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /teams][%d] createTeamBadRequest %s", 400, payload) } func (o *CreateTeamBadRequest) String() string { - return fmt.Sprintf("[POST /teams][%d] createTeamBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /teams][%d] createTeamBadRequest %s", 400, payload) } func (o *CreateTeamBadRequest) GetPayload() *models.APIErrorInvalidRequestExample { @@ -233,11 +238,13 @@ func (o *CreateTeamUnprocessableEntity) Code() int { } func (o *CreateTeamUnprocessableEntity) Error() string { - return fmt.Sprintf("[POST /teams][%d] createTeamUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /teams][%d] createTeamUnprocessableEntity %s", 422, payload) } func (o *CreateTeamUnprocessableEntity) String() string { - return fmt.Sprintf("[POST /teams][%d] createTeamUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /teams][%d] createTeamUnprocessableEntity %s", 422, payload) } func (o *CreateTeamUnprocessableEntity) GetPayload() *models.APIErrorRenderExample { @@ -301,11 +308,13 @@ func (o *CreateTeamInternalServerError) Code() int { } func (o *CreateTeamInternalServerError) Error() string { - return fmt.Sprintf("[POST /teams][%d] createTeamInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /teams][%d] createTeamInternalServerError %s", 500, payload) } func (o *CreateTeamInternalServerError) String() string { - return fmt.Sprintf("[POST /teams][%d] createTeamInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /teams][%d] createTeamInternalServerError %s", 500, payload) } func (o *CreateTeamInternalServerError) GetPayload() *models.APIErrorInternalServerExample { diff --git a/pkg/client/team/delete_team_responses.go b/pkg/client/team/delete_team_responses.go index 84f54a8..604740c 100644 --- a/pkg/client/team/delete_team_responses.go +++ b/pkg/client/team/delete_team_responses.go @@ -6,6 +6,7 @@ package team // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *DeleteTeamOK) Code() int { } func (o *DeleteTeamOK) Error() string { - return fmt.Sprintf("[DELETE /teams/{teamID}][%d] deleteTeamOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /teams/{teamID}][%d] deleteTeamOK %s", 200, payload) } func (o *DeleteTeamOK) String() string { - return fmt.Sprintf("[DELETE /teams/{teamID}][%d] deleteTeamOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /teams/{teamID}][%d] deleteTeamOK %s", 200, payload) } func (o *DeleteTeamOK) GetPayload() *models.DtoSaveTeamResponse { @@ -177,11 +180,13 @@ func (o *DeleteTeamBadRequest) Code() int { } func (o *DeleteTeamBadRequest) Error() string { - return fmt.Sprintf("[DELETE /teams/{teamID}][%d] deleteTeamBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /teams/{teamID}][%d] deleteTeamBadRequest %s", 400, payload) } func (o *DeleteTeamBadRequest) String() string { - return fmt.Sprintf("[DELETE /teams/{teamID}][%d] deleteTeamBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /teams/{teamID}][%d] deleteTeamBadRequest %s", 400, payload) } func (o *DeleteTeamBadRequest) GetPayload() *models.APIErrorInvalidRequestExample { @@ -245,11 +250,13 @@ func (o *DeleteTeamForbidden) Code() int { } func (o *DeleteTeamForbidden) Error() string { - return fmt.Sprintf("[DELETE /teams/{teamID}][%d] deleteTeamForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /teams/{teamID}][%d] deleteTeamForbidden %s", 403, payload) } func (o *DeleteTeamForbidden) String() string { - return fmt.Sprintf("[DELETE /teams/{teamID}][%d] deleteTeamForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /teams/{teamID}][%d] deleteTeamForbidden %s", 403, payload) } func (o *DeleteTeamForbidden) GetPayload() *models.APIErrorForbiddenExample { @@ -313,11 +320,13 @@ func (o *DeleteTeamNotFound) Code() int { } func (o *DeleteTeamNotFound) Error() string { - return fmt.Sprintf("[DELETE /teams/{teamID}][%d] deleteTeamNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /teams/{teamID}][%d] deleteTeamNotFound %s", 404, payload) } func (o *DeleteTeamNotFound) String() string { - return fmt.Sprintf("[DELETE /teams/{teamID}][%d] deleteTeamNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /teams/{teamID}][%d] deleteTeamNotFound %s", 404, payload) } func (o *DeleteTeamNotFound) GetPayload() *models.APIErrorNotFoundExample { @@ -381,11 +390,13 @@ func (o *DeleteTeamUnprocessableEntity) Code() int { } func (o *DeleteTeamUnprocessableEntity) Error() string { - return fmt.Sprintf("[DELETE /teams/{teamID}][%d] deleteTeamUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /teams/{teamID}][%d] deleteTeamUnprocessableEntity %s", 422, payload) } func (o *DeleteTeamUnprocessableEntity) String() string { - return fmt.Sprintf("[DELETE /teams/{teamID}][%d] deleteTeamUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /teams/{teamID}][%d] deleteTeamUnprocessableEntity %s", 422, payload) } func (o *DeleteTeamUnprocessableEntity) GetPayload() *models.APIErrorRenderExample { @@ -449,11 +460,13 @@ func (o *DeleteTeamInternalServerError) Code() int { } func (o *DeleteTeamInternalServerError) Error() string { - return fmt.Sprintf("[DELETE /teams/{teamID}][%d] deleteTeamInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /teams/{teamID}][%d] deleteTeamInternalServerError %s", 500, payload) } func (o *DeleteTeamInternalServerError) String() string { - return fmt.Sprintf("[DELETE /teams/{teamID}][%d] deleteTeamInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /teams/{teamID}][%d] deleteTeamInternalServerError %s", 500, payload) } func (o *DeleteTeamInternalServerError) GetPayload() *models.APIErrorInternalServerExample { diff --git a/pkg/client/team/delete_team_user_responses.go b/pkg/client/team/delete_team_user_responses.go index 0c89923..64b0c82 100644 --- a/pkg/client/team/delete_team_user_responses.go +++ b/pkg/client/team/delete_team_user_responses.go @@ -6,6 +6,7 @@ package team // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *DeleteTeamUserOK) Code() int { } func (o *DeleteTeamUserOK) Error() string { - return fmt.Sprintf("[DELETE /teams/{teamID}/users/{teamUserID}][%d] deleteTeamUserOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /teams/{teamID}/users/{teamUserID}][%d] deleteTeamUserOK %s", 200, payload) } func (o *DeleteTeamUserOK) String() string { - return fmt.Sprintf("[DELETE /teams/{teamID}/users/{teamUserID}][%d] deleteTeamUserOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /teams/{teamID}/users/{teamUserID}][%d] deleteTeamUserOK %s", 200, payload) } func (o *DeleteTeamUserOK) GetPayload() *models.DtoTeamMembers { @@ -177,11 +180,13 @@ func (o *DeleteTeamUserBadRequest) Code() int { } func (o *DeleteTeamUserBadRequest) Error() string { - return fmt.Sprintf("[DELETE /teams/{teamID}/users/{teamUserID}][%d] deleteTeamUserBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /teams/{teamID}/users/{teamUserID}][%d] deleteTeamUserBadRequest %s", 400, payload) } func (o *DeleteTeamUserBadRequest) String() string { - return fmt.Sprintf("[DELETE /teams/{teamID}/users/{teamUserID}][%d] deleteTeamUserBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /teams/{teamID}/users/{teamUserID}][%d] deleteTeamUserBadRequest %s", 400, payload) } func (o *DeleteTeamUserBadRequest) GetPayload() *models.APIErrorInvalidRequestExample { @@ -245,11 +250,13 @@ func (o *DeleteTeamUserForbidden) Code() int { } func (o *DeleteTeamUserForbidden) Error() string { - return fmt.Sprintf("[DELETE /teams/{teamID}/users/{teamUserID}][%d] deleteTeamUserForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /teams/{teamID}/users/{teamUserID}][%d] deleteTeamUserForbidden %s", 403, payload) } func (o *DeleteTeamUserForbidden) String() string { - return fmt.Sprintf("[DELETE /teams/{teamID}/users/{teamUserID}][%d] deleteTeamUserForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /teams/{teamID}/users/{teamUserID}][%d] deleteTeamUserForbidden %s", 403, payload) } func (o *DeleteTeamUserForbidden) GetPayload() *models.APIErrorForbiddenExample { @@ -313,11 +320,13 @@ func (o *DeleteTeamUserNotFound) Code() int { } func (o *DeleteTeamUserNotFound) Error() string { - return fmt.Sprintf("[DELETE /teams/{teamID}/users/{teamUserID}][%d] deleteTeamUserNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /teams/{teamID}/users/{teamUserID}][%d] deleteTeamUserNotFound %s", 404, payload) } func (o *DeleteTeamUserNotFound) String() string { - return fmt.Sprintf("[DELETE /teams/{teamID}/users/{teamUserID}][%d] deleteTeamUserNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /teams/{teamID}/users/{teamUserID}][%d] deleteTeamUserNotFound %s", 404, payload) } func (o *DeleteTeamUserNotFound) GetPayload() *models.APIErrorNotFoundExample { @@ -381,11 +390,13 @@ func (o *DeleteTeamUserUnprocessableEntity) Code() int { } func (o *DeleteTeamUserUnprocessableEntity) Error() string { - return fmt.Sprintf("[DELETE /teams/{teamID}/users/{teamUserID}][%d] deleteTeamUserUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /teams/{teamID}/users/{teamUserID}][%d] deleteTeamUserUnprocessableEntity %s", 422, payload) } func (o *DeleteTeamUserUnprocessableEntity) String() string { - return fmt.Sprintf("[DELETE /teams/{teamID}/users/{teamUserID}][%d] deleteTeamUserUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /teams/{teamID}/users/{teamUserID}][%d] deleteTeamUserUnprocessableEntity %s", 422, payload) } func (o *DeleteTeamUserUnprocessableEntity) GetPayload() *models.APIErrorRenderExample { @@ -449,11 +460,13 @@ func (o *DeleteTeamUserInternalServerError) Code() int { } func (o *DeleteTeamUserInternalServerError) Error() string { - return fmt.Sprintf("[DELETE /teams/{teamID}/users/{teamUserID}][%d] deleteTeamUserInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /teams/{teamID}/users/{teamUserID}][%d] deleteTeamUserInternalServerError %s", 500, payload) } func (o *DeleteTeamUserInternalServerError) String() string { - return fmt.Sprintf("[DELETE /teams/{teamID}/users/{teamUserID}][%d] deleteTeamUserInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /teams/{teamID}/users/{teamUserID}][%d] deleteTeamUserInternalServerError %s", 500, payload) } func (o *DeleteTeamUserInternalServerError) GetPayload() *models.APIErrorInternalServerExample { diff --git a/pkg/client/team/get_all_teams_responses.go b/pkg/client/team/get_all_teams_responses.go index 5f536b4..ab4cdf1 100644 --- a/pkg/client/team/get_all_teams_responses.go +++ b/pkg/client/team/get_all_teams_responses.go @@ -6,6 +6,7 @@ package team // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -91,11 +92,13 @@ func (o *GetAllTeamsOK) Code() int { } func (o *GetAllTeamsOK) Error() string { - return fmt.Sprintf("[GET /teams][%d] getAllTeamsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /teams][%d] getAllTeamsOK %s", 200, payload) } func (o *GetAllTeamsOK) String() string { - return fmt.Sprintf("[GET /teams][%d] getAllTeamsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /teams][%d] getAllTeamsOK %s", 200, payload) } func (o *GetAllTeamsOK) GetPayload() *models.DtoUserTeams { @@ -159,11 +162,13 @@ func (o *GetAllTeamsUnprocessableEntity) Code() int { } func (o *GetAllTeamsUnprocessableEntity) Error() string { - return fmt.Sprintf("[GET /teams][%d] getAllTeamsUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /teams][%d] getAllTeamsUnprocessableEntity %s", 422, payload) } func (o *GetAllTeamsUnprocessableEntity) String() string { - return fmt.Sprintf("[GET /teams][%d] getAllTeamsUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /teams][%d] getAllTeamsUnprocessableEntity %s", 422, payload) } func (o *GetAllTeamsUnprocessableEntity) GetPayload() *models.APIErrorRenderExample { @@ -227,11 +232,13 @@ func (o *GetAllTeamsInternalServerError) Code() int { } func (o *GetAllTeamsInternalServerError) Error() string { - return fmt.Sprintf("[GET /teams][%d] getAllTeamsInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /teams][%d] getAllTeamsInternalServerError %s", 500, payload) } func (o *GetAllTeamsInternalServerError) String() string { - return fmt.Sprintf("[GET /teams][%d] getAllTeamsInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /teams][%d] getAllTeamsInternalServerError %s", 500, payload) } func (o *GetAllTeamsInternalServerError) GetPayload() *models.APIErrorInternalServerExample { diff --git a/pkg/client/team/get_team_responses.go b/pkg/client/team/get_team_responses.go index 833d058..edae82c 100644 --- a/pkg/client/team/get_team_responses.go +++ b/pkg/client/team/get_team_responses.go @@ -6,6 +6,7 @@ package team // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -103,11 +104,13 @@ func (o *GetTeamOK) Code() int { } func (o *GetTeamOK) Error() string { - return fmt.Sprintf("[GET /teams/{teamID}][%d] getTeamOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /teams/{teamID}][%d] getTeamOK %s", 200, payload) } func (o *GetTeamOK) String() string { - return fmt.Sprintf("[GET /teams/{teamID}][%d] getTeamOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /teams/{teamID}][%d] getTeamOK %s", 200, payload) } func (o *GetTeamOK) GetPayload() *models.DtoTeamModel { @@ -171,11 +174,13 @@ func (o *GetTeamForbidden) Code() int { } func (o *GetTeamForbidden) Error() string { - return fmt.Sprintf("[GET /teams/{teamID}][%d] getTeamForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /teams/{teamID}][%d] getTeamForbidden %s", 403, payload) } func (o *GetTeamForbidden) String() string { - return fmt.Sprintf("[GET /teams/{teamID}][%d] getTeamForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /teams/{teamID}][%d] getTeamForbidden %s", 403, payload) } func (o *GetTeamForbidden) GetPayload() *models.APIErrorForbiddenExample { @@ -239,11 +244,13 @@ func (o *GetTeamNotFound) Code() int { } func (o *GetTeamNotFound) Error() string { - return fmt.Sprintf("[GET /teams/{teamID}][%d] getTeamNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /teams/{teamID}][%d] getTeamNotFound %s", 404, payload) } func (o *GetTeamNotFound) String() string { - return fmt.Sprintf("[GET /teams/{teamID}][%d] getTeamNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /teams/{teamID}][%d] getTeamNotFound %s", 404, payload) } func (o *GetTeamNotFound) GetPayload() *models.APIErrorNotFoundExample { @@ -307,11 +314,13 @@ func (o *GetTeamUnprocessableEntity) Code() int { } func (o *GetTeamUnprocessableEntity) Error() string { - return fmt.Sprintf("[GET /teams/{teamID}][%d] getTeamUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /teams/{teamID}][%d] getTeamUnprocessableEntity %s", 422, payload) } func (o *GetTeamUnprocessableEntity) String() string { - return fmt.Sprintf("[GET /teams/{teamID}][%d] getTeamUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /teams/{teamID}][%d] getTeamUnprocessableEntity %s", 422, payload) } func (o *GetTeamUnprocessableEntity) GetPayload() *models.APIErrorRenderExample { @@ -375,11 +384,13 @@ func (o *GetTeamInternalServerError) Code() int { } func (o *GetTeamInternalServerError) Error() string { - return fmt.Sprintf("[GET /teams/{teamID}][%d] getTeamInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /teams/{teamID}][%d] getTeamInternalServerError %s", 500, payload) } func (o *GetTeamInternalServerError) String() string { - return fmt.Sprintf("[GET /teams/{teamID}][%d] getTeamInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /teams/{teamID}][%d] getTeamInternalServerError %s", 500, payload) } func (o *GetTeamInternalServerError) GetPayload() *models.APIErrorInternalServerExample { diff --git a/pkg/client/team/get_team_settings_responses.go b/pkg/client/team/get_team_settings_responses.go index 93ec50d..e036532 100644 --- a/pkg/client/team/get_team_settings_responses.go +++ b/pkg/client/team/get_team_settings_responses.go @@ -6,6 +6,7 @@ package team // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -103,11 +104,13 @@ func (o *GetTeamSettingsOK) Code() int { } func (o *GetTeamSettingsOK) Error() string { - return fmt.Sprintf("[GET /teams/{teamID}/settings][%d] getTeamSettingsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /teams/{teamID}/settings][%d] getTeamSettingsOK %s", 200, payload) } func (o *GetTeamSettingsOK) String() string { - return fmt.Sprintf("[GET /teams/{teamID}/settings][%d] getTeamSettingsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /teams/{teamID}/settings][%d] getTeamSettingsOK %s", 200, payload) } func (o *GetTeamSettingsOK) GetPayload() *models.DtoTeamSettings { @@ -171,11 +174,13 @@ func (o *GetTeamSettingsForbidden) Code() int { } func (o *GetTeamSettingsForbidden) Error() string { - return fmt.Sprintf("[GET /teams/{teamID}/settings][%d] getTeamSettingsForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /teams/{teamID}/settings][%d] getTeamSettingsForbidden %s", 403, payload) } func (o *GetTeamSettingsForbidden) String() string { - return fmt.Sprintf("[GET /teams/{teamID}/settings][%d] getTeamSettingsForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /teams/{teamID}/settings][%d] getTeamSettingsForbidden %s", 403, payload) } func (o *GetTeamSettingsForbidden) GetPayload() *models.APIErrorForbiddenExample { @@ -239,11 +244,13 @@ func (o *GetTeamSettingsNotFound) Code() int { } func (o *GetTeamSettingsNotFound) Error() string { - return fmt.Sprintf("[GET /teams/{teamID}/settings][%d] getTeamSettingsNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /teams/{teamID}/settings][%d] getTeamSettingsNotFound %s", 404, payload) } func (o *GetTeamSettingsNotFound) String() string { - return fmt.Sprintf("[GET /teams/{teamID}/settings][%d] getTeamSettingsNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /teams/{teamID}/settings][%d] getTeamSettingsNotFound %s", 404, payload) } func (o *GetTeamSettingsNotFound) GetPayload() *models.APIErrorNotFoundExample { @@ -307,11 +314,13 @@ func (o *GetTeamSettingsUnprocessableEntity) Code() int { } func (o *GetTeamSettingsUnprocessableEntity) Error() string { - return fmt.Sprintf("[GET /teams/{teamID}/settings][%d] getTeamSettingsUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /teams/{teamID}/settings][%d] getTeamSettingsUnprocessableEntity %s", 422, payload) } func (o *GetTeamSettingsUnprocessableEntity) String() string { - return fmt.Sprintf("[GET /teams/{teamID}/settings][%d] getTeamSettingsUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /teams/{teamID}/settings][%d] getTeamSettingsUnprocessableEntity %s", 422, payload) } func (o *GetTeamSettingsUnprocessableEntity) GetPayload() *models.APIErrorRenderExample { @@ -375,11 +384,13 @@ func (o *GetTeamSettingsInternalServerError) Code() int { } func (o *GetTeamSettingsInternalServerError) Error() string { - return fmt.Sprintf("[GET /teams/{teamID}/settings][%d] getTeamSettingsInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /teams/{teamID}/settings][%d] getTeamSettingsInternalServerError %s", 500, payload) } func (o *GetTeamSettingsInternalServerError) String() string { - return fmt.Sprintf("[GET /teams/{teamID}/settings][%d] getTeamSettingsInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /teams/{teamID}/settings][%d] getTeamSettingsInternalServerError %s", 500, payload) } func (o *GetTeamSettingsInternalServerError) GetPayload() *models.APIErrorInternalServerExample { diff --git a/pkg/client/team/get_team_users_responses.go b/pkg/client/team/get_team_users_responses.go index ea44654..5bcebba 100644 --- a/pkg/client/team/get_team_users_responses.go +++ b/pkg/client/team/get_team_users_responses.go @@ -6,6 +6,7 @@ package team // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -103,11 +104,13 @@ func (o *GetTeamUsersOK) Code() int { } func (o *GetTeamUsersOK) Error() string { - return fmt.Sprintf("[GET /teams/{teamID}/users][%d] getTeamUsersOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /teams/{teamID}/users][%d] getTeamUsersOK %s", 200, payload) } func (o *GetTeamUsersOK) String() string { - return fmt.Sprintf("[GET /teams/{teamID}/users][%d] getTeamUsersOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /teams/{teamID}/users][%d] getTeamUsersOK %s", 200, payload) } func (o *GetTeamUsersOK) GetPayload() *models.DtoTeamMembers { @@ -171,11 +174,13 @@ func (o *GetTeamUsersForbidden) Code() int { } func (o *GetTeamUsersForbidden) Error() string { - return fmt.Sprintf("[GET /teams/{teamID}/users][%d] getTeamUsersForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /teams/{teamID}/users][%d] getTeamUsersForbidden %s", 403, payload) } func (o *GetTeamUsersForbidden) String() string { - return fmt.Sprintf("[GET /teams/{teamID}/users][%d] getTeamUsersForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /teams/{teamID}/users][%d] getTeamUsersForbidden %s", 403, payload) } func (o *GetTeamUsersForbidden) GetPayload() *models.APIErrorForbiddenExample { @@ -239,11 +244,13 @@ func (o *GetTeamUsersNotFound) Code() int { } func (o *GetTeamUsersNotFound) Error() string { - return fmt.Sprintf("[GET /teams/{teamID}/users][%d] getTeamUsersNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /teams/{teamID}/users][%d] getTeamUsersNotFound %s", 404, payload) } func (o *GetTeamUsersNotFound) String() string { - return fmt.Sprintf("[GET /teams/{teamID}/users][%d] getTeamUsersNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /teams/{teamID}/users][%d] getTeamUsersNotFound %s", 404, payload) } func (o *GetTeamUsersNotFound) GetPayload() *models.APIErrorNotFoundExample { @@ -307,11 +314,13 @@ func (o *GetTeamUsersUnprocessableEntity) Code() int { } func (o *GetTeamUsersUnprocessableEntity) Error() string { - return fmt.Sprintf("[GET /teams/{teamID}/users][%d] getTeamUsersUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /teams/{teamID}/users][%d] getTeamUsersUnprocessableEntity %s", 422, payload) } func (o *GetTeamUsersUnprocessableEntity) String() string { - return fmt.Sprintf("[GET /teams/{teamID}/users][%d] getTeamUsersUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /teams/{teamID}/users][%d] getTeamUsersUnprocessableEntity %s", 422, payload) } func (o *GetTeamUsersUnprocessableEntity) GetPayload() *models.APIErrorRenderExample { @@ -375,11 +384,13 @@ func (o *GetTeamUsersInternalServerError) Code() int { } func (o *GetTeamUsersInternalServerError) Error() string { - return fmt.Sprintf("[GET /teams/{teamID}/users][%d] getTeamUsersInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /teams/{teamID}/users][%d] getTeamUsersInternalServerError %s", 500, payload) } func (o *GetTeamUsersInternalServerError) String() string { - return fmt.Sprintf("[GET /teams/{teamID}/users][%d] getTeamUsersInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /teams/{teamID}/users][%d] getTeamUsersInternalServerError %s", 500, payload) } func (o *GetTeamUsersInternalServerError) GetPayload() *models.APIErrorInternalServerExample { diff --git a/pkg/client/team/set_team_users_responses.go b/pkg/client/team/set_team_users_responses.go index 2211bad..84f1a0a 100644 --- a/pkg/client/team/set_team_users_responses.go +++ b/pkg/client/team/set_team_users_responses.go @@ -6,6 +6,7 @@ package team // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *SetTeamUsersOK) Code() int { } func (o *SetTeamUsersOK) Error() string { - return fmt.Sprintf("[PUT /teams/{teamID}/users][%d] setTeamUsersOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /teams/{teamID}/users][%d] setTeamUsersOK %s", 200, payload) } func (o *SetTeamUsersOK) String() string { - return fmt.Sprintf("[PUT /teams/{teamID}/users][%d] setTeamUsersOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /teams/{teamID}/users][%d] setTeamUsersOK %s", 200, payload) } func (o *SetTeamUsersOK) GetPayload() *models.DtoTeamMembers { @@ -177,11 +180,13 @@ func (o *SetTeamUsersBadRequest) Code() int { } func (o *SetTeamUsersBadRequest) Error() string { - return fmt.Sprintf("[PUT /teams/{teamID}/users][%d] setTeamUsersBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /teams/{teamID}/users][%d] setTeamUsersBadRequest %s", 400, payload) } func (o *SetTeamUsersBadRequest) String() string { - return fmt.Sprintf("[PUT /teams/{teamID}/users][%d] setTeamUsersBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /teams/{teamID}/users][%d] setTeamUsersBadRequest %s", 400, payload) } func (o *SetTeamUsersBadRequest) GetPayload() *models.APIErrorInvalidRequestExample { @@ -245,11 +250,13 @@ func (o *SetTeamUsersForbidden) Code() int { } func (o *SetTeamUsersForbidden) Error() string { - return fmt.Sprintf("[PUT /teams/{teamID}/users][%d] setTeamUsersForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /teams/{teamID}/users][%d] setTeamUsersForbidden %s", 403, payload) } func (o *SetTeamUsersForbidden) String() string { - return fmt.Sprintf("[PUT /teams/{teamID}/users][%d] setTeamUsersForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /teams/{teamID}/users][%d] setTeamUsersForbidden %s", 403, payload) } func (o *SetTeamUsersForbidden) GetPayload() *models.APIErrorForbiddenExample { @@ -313,11 +320,13 @@ func (o *SetTeamUsersNotFound) Code() int { } func (o *SetTeamUsersNotFound) Error() string { - return fmt.Sprintf("[PUT /teams/{teamID}/users][%d] setTeamUsersNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /teams/{teamID}/users][%d] setTeamUsersNotFound %s", 404, payload) } func (o *SetTeamUsersNotFound) String() string { - return fmt.Sprintf("[PUT /teams/{teamID}/users][%d] setTeamUsersNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /teams/{teamID}/users][%d] setTeamUsersNotFound %s", 404, payload) } func (o *SetTeamUsersNotFound) GetPayload() *models.APIErrorNotFoundExample { @@ -381,11 +390,13 @@ func (o *SetTeamUsersUnprocessableEntity) Code() int { } func (o *SetTeamUsersUnprocessableEntity) Error() string { - return fmt.Sprintf("[PUT /teams/{teamID}/users][%d] setTeamUsersUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /teams/{teamID}/users][%d] setTeamUsersUnprocessableEntity %s", 422, payload) } func (o *SetTeamUsersUnprocessableEntity) String() string { - return fmt.Sprintf("[PUT /teams/{teamID}/users][%d] setTeamUsersUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /teams/{teamID}/users][%d] setTeamUsersUnprocessableEntity %s", 422, payload) } func (o *SetTeamUsersUnprocessableEntity) GetPayload() *models.APIErrorRenderExample { @@ -449,11 +460,13 @@ func (o *SetTeamUsersInternalServerError) Code() int { } func (o *SetTeamUsersInternalServerError) Error() string { - return fmt.Sprintf("[PUT /teams/{teamID}/users][%d] setTeamUsersInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /teams/{teamID}/users][%d] setTeamUsersInternalServerError %s", 500, payload) } func (o *SetTeamUsersInternalServerError) String() string { - return fmt.Sprintf("[PUT /teams/{teamID}/users][%d] setTeamUsersInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /teams/{teamID}/users][%d] setTeamUsersInternalServerError %s", 500, payload) } func (o *SetTeamUsersInternalServerError) GetPayload() *models.APIErrorInternalServerExample { diff --git a/pkg/client/team/team_client.go b/pkg/client/team/team_client.go index 42621e8..c62dbfb 100644 --- a/pkg/client/team/team_client.go +++ b/pkg/client/team/team_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new team 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 team 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 team API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/pkg/client/team/update_team_responses.go b/pkg/client/team/update_team_responses.go index 9a85c59..7cf6c1e 100644 --- a/pkg/client/team/update_team_responses.go +++ b/pkg/client/team/update_team_responses.go @@ -6,6 +6,7 @@ package team // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *UpdateTeamOK) Code() int { } func (o *UpdateTeamOK) Error() string { - return fmt.Sprintf("[PATCH /teams/{teamID}][%d] updateTeamOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PATCH /teams/{teamID}][%d] updateTeamOK %s", 200, payload) } func (o *UpdateTeamOK) String() string { - return fmt.Sprintf("[PATCH /teams/{teamID}][%d] updateTeamOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PATCH /teams/{teamID}][%d] updateTeamOK %s", 200, payload) } func (o *UpdateTeamOK) GetPayload() *models.DtoSaveTeamResponse { @@ -177,11 +180,13 @@ func (o *UpdateTeamBadRequest) Code() int { } func (o *UpdateTeamBadRequest) Error() string { - return fmt.Sprintf("[PATCH /teams/{teamID}][%d] updateTeamBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PATCH /teams/{teamID}][%d] updateTeamBadRequest %s", 400, payload) } func (o *UpdateTeamBadRequest) String() string { - return fmt.Sprintf("[PATCH /teams/{teamID}][%d] updateTeamBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PATCH /teams/{teamID}][%d] updateTeamBadRequest %s", 400, payload) } func (o *UpdateTeamBadRequest) GetPayload() *models.APIErrorInvalidRequestExample { @@ -245,11 +250,13 @@ func (o *UpdateTeamForbidden) Code() int { } func (o *UpdateTeamForbidden) Error() string { - return fmt.Sprintf("[PATCH /teams/{teamID}][%d] updateTeamForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PATCH /teams/{teamID}][%d] updateTeamForbidden %s", 403, payload) } func (o *UpdateTeamForbidden) String() string { - return fmt.Sprintf("[PATCH /teams/{teamID}][%d] updateTeamForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PATCH /teams/{teamID}][%d] updateTeamForbidden %s", 403, payload) } func (o *UpdateTeamForbidden) GetPayload() *models.APIErrorForbiddenExample { @@ -313,11 +320,13 @@ func (o *UpdateTeamNotFound) Code() int { } func (o *UpdateTeamNotFound) Error() string { - return fmt.Sprintf("[PATCH /teams/{teamID}][%d] updateTeamNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PATCH /teams/{teamID}][%d] updateTeamNotFound %s", 404, payload) } func (o *UpdateTeamNotFound) String() string { - return fmt.Sprintf("[PATCH /teams/{teamID}][%d] updateTeamNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PATCH /teams/{teamID}][%d] updateTeamNotFound %s", 404, payload) } func (o *UpdateTeamNotFound) GetPayload() *models.APIErrorNotFoundExample { @@ -381,11 +390,13 @@ func (o *UpdateTeamUnprocessableEntity) Code() int { } func (o *UpdateTeamUnprocessableEntity) Error() string { - return fmt.Sprintf("[PATCH /teams/{teamID}][%d] updateTeamUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PATCH /teams/{teamID}][%d] updateTeamUnprocessableEntity %s", 422, payload) } func (o *UpdateTeamUnprocessableEntity) String() string { - return fmt.Sprintf("[PATCH /teams/{teamID}][%d] updateTeamUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PATCH /teams/{teamID}][%d] updateTeamUnprocessableEntity %s", 422, payload) } func (o *UpdateTeamUnprocessableEntity) GetPayload() *models.APIErrorRenderExample { @@ -449,11 +460,13 @@ func (o *UpdateTeamInternalServerError) Code() int { } func (o *UpdateTeamInternalServerError) Error() string { - return fmt.Sprintf("[PATCH /teams/{teamID}][%d] updateTeamInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PATCH /teams/{teamID}][%d] updateTeamInternalServerError %s", 500, payload) } func (o *UpdateTeamInternalServerError) String() string { - return fmt.Sprintf("[PATCH /teams/{teamID}][%d] updateTeamInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PATCH /teams/{teamID}][%d] updateTeamInternalServerError %s", 500, payload) } func (o *UpdateTeamInternalServerError) GetPayload() *models.APIErrorInternalServerExample { diff --git a/pkg/client/team_contact/create_new_team_contact_responses.go b/pkg/client/team_contact/create_new_team_contact_responses.go index 4baeaa8..5bd4063 100644 --- a/pkg/client/team_contact/create_new_team_contact_responses.go +++ b/pkg/client/team_contact/create_new_team_contact_responses.go @@ -6,6 +6,7 @@ package team_contact // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *CreateNewTeamContactOK) Code() int { } func (o *CreateNewTeamContactOK) Error() string { - return fmt.Sprintf("[POST /teams/{teamID}/contacts][%d] createNewTeamContactOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /teams/{teamID}/contacts][%d] createNewTeamContactOK %s", 200, payload) } func (o *CreateNewTeamContactOK) String() string { - return fmt.Sprintf("[POST /teams/{teamID}/contacts][%d] createNewTeamContactOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /teams/{teamID}/contacts][%d] createNewTeamContactOK %s", 200, payload) } func (o *CreateNewTeamContactOK) GetPayload() *models.DtoContact { @@ -177,11 +180,13 @@ func (o *CreateNewTeamContactBadRequest) Code() int { } func (o *CreateNewTeamContactBadRequest) Error() string { - return fmt.Sprintf("[POST /teams/{teamID}/contacts][%d] createNewTeamContactBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /teams/{teamID}/contacts][%d] createNewTeamContactBadRequest %s", 400, payload) } func (o *CreateNewTeamContactBadRequest) String() string { - return fmt.Sprintf("[POST /teams/{teamID}/contacts][%d] createNewTeamContactBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /teams/{teamID}/contacts][%d] createNewTeamContactBadRequest %s", 400, payload) } func (o *CreateNewTeamContactBadRequest) GetPayload() *models.APIErrorInvalidRequestExample { @@ -245,11 +250,13 @@ func (o *CreateNewTeamContactForbidden) Code() int { } func (o *CreateNewTeamContactForbidden) Error() string { - return fmt.Sprintf("[POST /teams/{teamID}/contacts][%d] createNewTeamContactForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /teams/{teamID}/contacts][%d] createNewTeamContactForbidden %s", 403, payload) } func (o *CreateNewTeamContactForbidden) String() string { - return fmt.Sprintf("[POST /teams/{teamID}/contacts][%d] createNewTeamContactForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /teams/{teamID}/contacts][%d] createNewTeamContactForbidden %s", 403, payload) } func (o *CreateNewTeamContactForbidden) GetPayload() *models.APIErrorForbiddenExample { @@ -313,11 +320,13 @@ func (o *CreateNewTeamContactNotFound) Code() int { } func (o *CreateNewTeamContactNotFound) Error() string { - return fmt.Sprintf("[POST /teams/{teamID}/contacts][%d] createNewTeamContactNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /teams/{teamID}/contacts][%d] createNewTeamContactNotFound %s", 404, payload) } func (o *CreateNewTeamContactNotFound) String() string { - return fmt.Sprintf("[POST /teams/{teamID}/contacts][%d] createNewTeamContactNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /teams/{teamID}/contacts][%d] createNewTeamContactNotFound %s", 404, payload) } func (o *CreateNewTeamContactNotFound) GetPayload() *models.APIErrorNotFoundExample { @@ -381,11 +390,13 @@ func (o *CreateNewTeamContactUnprocessableEntity) Code() int { } func (o *CreateNewTeamContactUnprocessableEntity) Error() string { - return fmt.Sprintf("[POST /teams/{teamID}/contacts][%d] createNewTeamContactUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /teams/{teamID}/contacts][%d] createNewTeamContactUnprocessableEntity %s", 422, payload) } func (o *CreateNewTeamContactUnprocessableEntity) String() string { - return fmt.Sprintf("[POST /teams/{teamID}/contacts][%d] createNewTeamContactUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /teams/{teamID}/contacts][%d] createNewTeamContactUnprocessableEntity %s", 422, payload) } func (o *CreateNewTeamContactUnprocessableEntity) GetPayload() *models.APIErrorRenderExample { @@ -449,11 +460,13 @@ func (o *CreateNewTeamContactInternalServerError) Code() int { } func (o *CreateNewTeamContactInternalServerError) Error() string { - return fmt.Sprintf("[POST /teams/{teamID}/contacts][%d] createNewTeamContactInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /teams/{teamID}/contacts][%d] createNewTeamContactInternalServerError %s", 500, payload) } func (o *CreateNewTeamContactInternalServerError) String() string { - return fmt.Sprintf("[POST /teams/{teamID}/contacts][%d] createNewTeamContactInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /teams/{teamID}/contacts][%d] createNewTeamContactInternalServerError %s", 500, payload) } func (o *CreateNewTeamContactInternalServerError) GetPayload() *models.APIErrorInternalServerExample { diff --git a/pkg/client/team_contact/team_contact_client.go b/pkg/client/team_contact/team_contact_client.go index 8de43a7..00c194a 100644 --- a/pkg/client/team_contact/team_contact_client.go +++ b/pkg/client/team_contact/team_contact_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new team contact 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 team contact 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 team contact API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/pkg/client/team_subscription/create_new_team_subscription_responses.go b/pkg/client/team_subscription/create_new_team_subscription_responses.go index 28721a7..83ab2ec 100644 --- a/pkg/client/team_subscription/create_new_team_subscription_responses.go +++ b/pkg/client/team_subscription/create_new_team_subscription_responses.go @@ -6,6 +6,7 @@ package team_subscription // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *CreateNewTeamSubscriptionOK) Code() int { } func (o *CreateNewTeamSubscriptionOK) Error() string { - return fmt.Sprintf("[POST /teams/{teamID}/subscriptions][%d] createNewTeamSubscriptionOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /teams/{teamID}/subscriptions][%d] createNewTeamSubscriptionOK %s", 200, payload) } func (o *CreateNewTeamSubscriptionOK) String() string { - return fmt.Sprintf("[POST /teams/{teamID}/subscriptions][%d] createNewTeamSubscriptionOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /teams/{teamID}/subscriptions][%d] createNewTeamSubscriptionOK %s", 200, payload) } func (o *CreateNewTeamSubscriptionOK) GetPayload() *models.DtoSubscription { @@ -177,11 +180,13 @@ func (o *CreateNewTeamSubscriptionBadRequest) Code() int { } func (o *CreateNewTeamSubscriptionBadRequest) Error() string { - return fmt.Sprintf("[POST /teams/{teamID}/subscriptions][%d] createNewTeamSubscriptionBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /teams/{teamID}/subscriptions][%d] createNewTeamSubscriptionBadRequest %s", 400, payload) } func (o *CreateNewTeamSubscriptionBadRequest) String() string { - return fmt.Sprintf("[POST /teams/{teamID}/subscriptions][%d] createNewTeamSubscriptionBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /teams/{teamID}/subscriptions][%d] createNewTeamSubscriptionBadRequest %s", 400, payload) } func (o *CreateNewTeamSubscriptionBadRequest) GetPayload() *models.APIErrorInvalidRequestExample { @@ -245,11 +250,13 @@ func (o *CreateNewTeamSubscriptionForbidden) Code() int { } func (o *CreateNewTeamSubscriptionForbidden) Error() string { - return fmt.Sprintf("[POST /teams/{teamID}/subscriptions][%d] createNewTeamSubscriptionForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /teams/{teamID}/subscriptions][%d] createNewTeamSubscriptionForbidden %s", 403, payload) } func (o *CreateNewTeamSubscriptionForbidden) String() string { - return fmt.Sprintf("[POST /teams/{teamID}/subscriptions][%d] createNewTeamSubscriptionForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /teams/{teamID}/subscriptions][%d] createNewTeamSubscriptionForbidden %s", 403, payload) } func (o *CreateNewTeamSubscriptionForbidden) GetPayload() *models.APIErrorForbiddenExample { @@ -313,11 +320,13 @@ func (o *CreateNewTeamSubscriptionNotFound) Code() int { } func (o *CreateNewTeamSubscriptionNotFound) Error() string { - return fmt.Sprintf("[POST /teams/{teamID}/subscriptions][%d] createNewTeamSubscriptionNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /teams/{teamID}/subscriptions][%d] createNewTeamSubscriptionNotFound %s", 404, payload) } func (o *CreateNewTeamSubscriptionNotFound) String() string { - return fmt.Sprintf("[POST /teams/{teamID}/subscriptions][%d] createNewTeamSubscriptionNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /teams/{teamID}/subscriptions][%d] createNewTeamSubscriptionNotFound %s", 404, payload) } func (o *CreateNewTeamSubscriptionNotFound) GetPayload() *models.APIErrorNotFoundExample { @@ -381,11 +390,13 @@ func (o *CreateNewTeamSubscriptionUnprocessableEntity) Code() int { } func (o *CreateNewTeamSubscriptionUnprocessableEntity) Error() string { - return fmt.Sprintf("[POST /teams/{teamID}/subscriptions][%d] createNewTeamSubscriptionUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /teams/{teamID}/subscriptions][%d] createNewTeamSubscriptionUnprocessableEntity %s", 422, payload) } func (o *CreateNewTeamSubscriptionUnprocessableEntity) String() string { - return fmt.Sprintf("[POST /teams/{teamID}/subscriptions][%d] createNewTeamSubscriptionUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /teams/{teamID}/subscriptions][%d] createNewTeamSubscriptionUnprocessableEntity %s", 422, payload) } func (o *CreateNewTeamSubscriptionUnprocessableEntity) GetPayload() *models.APIErrorRenderExample { @@ -449,11 +460,13 @@ func (o *CreateNewTeamSubscriptionInternalServerError) Code() int { } func (o *CreateNewTeamSubscriptionInternalServerError) Error() string { - return fmt.Sprintf("[POST /teams/{teamID}/subscriptions][%d] createNewTeamSubscriptionInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /teams/{teamID}/subscriptions][%d] createNewTeamSubscriptionInternalServerError %s", 500, payload) } func (o *CreateNewTeamSubscriptionInternalServerError) String() string { - return fmt.Sprintf("[POST /teams/{teamID}/subscriptions][%d] createNewTeamSubscriptionInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /teams/{teamID}/subscriptions][%d] createNewTeamSubscriptionInternalServerError %s", 500, payload) } func (o *CreateNewTeamSubscriptionInternalServerError) GetPayload() *models.APIErrorInternalServerExample { diff --git a/pkg/client/team_subscription/team_subscription_client.go b/pkg/client/team_subscription/team_subscription_client.go index 7d9340d..40dac7a 100644 --- a/pkg/client/team_subscription/team_subscription_client.go +++ b/pkg/client/team_subscription/team_subscription_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new team subscription 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 team subscription 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 team subscription API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods diff --git a/pkg/client/trigger/create_trigger_responses.go b/pkg/client/trigger/create_trigger_responses.go index a104d03..09428fd 100644 --- a/pkg/client/trigger/create_trigger_responses.go +++ b/pkg/client/trigger/create_trigger_responses.go @@ -6,6 +6,7 @@ package trigger // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -103,11 +104,13 @@ func (o *CreateTriggerOK) Code() int { } func (o *CreateTriggerOK) Error() string { - return fmt.Sprintf("[PUT /trigger][%d] createTriggerOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /trigger][%d] createTriggerOK %s", 200, payload) } func (o *CreateTriggerOK) String() string { - return fmt.Sprintf("[PUT /trigger][%d] createTriggerOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /trigger][%d] createTriggerOK %s", 200, payload) } func (o *CreateTriggerOK) GetPayload() *models.DtoSaveTriggerResponse { @@ -171,11 +174,13 @@ func (o *CreateTriggerBadRequest) Code() int { } func (o *CreateTriggerBadRequest) Error() string { - return fmt.Sprintf("[PUT /trigger][%d] createTriggerBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /trigger][%d] createTriggerBadRequest %s", 400, payload) } func (o *CreateTriggerBadRequest) String() string { - return fmt.Sprintf("[PUT /trigger][%d] createTriggerBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /trigger][%d] createTriggerBadRequest %s", 400, payload) } func (o *CreateTriggerBadRequest) GetPayload() *models.APIErrorInvalidRequestExample { @@ -239,11 +244,13 @@ func (o *CreateTriggerUnprocessableEntity) Code() int { } func (o *CreateTriggerUnprocessableEntity) Error() string { - return fmt.Sprintf("[PUT /trigger][%d] createTriggerUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /trigger][%d] createTriggerUnprocessableEntity %s", 422, payload) } func (o *CreateTriggerUnprocessableEntity) String() string { - return fmt.Sprintf("[PUT /trigger][%d] createTriggerUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /trigger][%d] createTriggerUnprocessableEntity %s", 422, payload) } func (o *CreateTriggerUnprocessableEntity) GetPayload() *models.APIErrorRenderExample { @@ -307,11 +314,13 @@ func (o *CreateTriggerInternalServerError) Code() int { } func (o *CreateTriggerInternalServerError) Error() string { - return fmt.Sprintf("[PUT /trigger][%d] createTriggerInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /trigger][%d] createTriggerInternalServerError %s", 500, payload) } func (o *CreateTriggerInternalServerError) String() string { - return fmt.Sprintf("[PUT /trigger][%d] createTriggerInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /trigger][%d] createTriggerInternalServerError %s", 500, payload) } func (o *CreateTriggerInternalServerError) GetPayload() *models.APIErrorInternalServerExample { @@ -375,11 +384,13 @@ func (o *CreateTriggerServiceUnavailable) Code() int { } func (o *CreateTriggerServiceUnavailable) Error() string { - return fmt.Sprintf("[PUT /trigger][%d] createTriggerServiceUnavailable %+v", 503, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /trigger][%d] createTriggerServiceUnavailable %s", 503, payload) } func (o *CreateTriggerServiceUnavailable) String() string { - return fmt.Sprintf("[PUT /trigger][%d] createTriggerServiceUnavailable %+v", 503, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /trigger][%d] createTriggerServiceUnavailable %s", 503, payload) } func (o *CreateTriggerServiceUnavailable) GetPayload() *models.APIErrorRemoteServerUnavailableExample { diff --git a/pkg/client/trigger/delete_pager_responses.go b/pkg/client/trigger/delete_pager_responses.go index 1de7b47..3932efb 100644 --- a/pkg/client/trigger/delete_pager_responses.go +++ b/pkg/client/trigger/delete_pager_responses.go @@ -6,6 +6,7 @@ package trigger // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -97,11 +98,13 @@ func (o *DeletePagerOK) Code() int { } func (o *DeletePagerOK) Error() string { - return fmt.Sprintf("[DELETE /trigger/search/pager][%d] deletePagerOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /trigger/search/pager][%d] deletePagerOK %s", 200, payload) } func (o *DeletePagerOK) String() string { - return fmt.Sprintf("[DELETE /trigger/search/pager][%d] deletePagerOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /trigger/search/pager][%d] deletePagerOK %s", 200, payload) } func (o *DeletePagerOK) GetPayload() *models.DtoTriggersSearchResultDeleteResponse { @@ -165,11 +168,13 @@ func (o *DeletePagerNotFound) Code() int { } func (o *DeletePagerNotFound) Error() string { - return fmt.Sprintf("[DELETE /trigger/search/pager][%d] deletePagerNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /trigger/search/pager][%d] deletePagerNotFound %s", 404, payload) } func (o *DeletePagerNotFound) String() string { - return fmt.Sprintf("[DELETE /trigger/search/pager][%d] deletePagerNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /trigger/search/pager][%d] deletePagerNotFound %s", 404, payload) } func (o *DeletePagerNotFound) GetPayload() *models.APIErrorNotFoundExample { @@ -233,11 +238,13 @@ func (o *DeletePagerUnprocessableEntity) Code() int { } func (o *DeletePagerUnprocessableEntity) Error() string { - return fmt.Sprintf("[DELETE /trigger/search/pager][%d] deletePagerUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /trigger/search/pager][%d] deletePagerUnprocessableEntity %s", 422, payload) } func (o *DeletePagerUnprocessableEntity) String() string { - return fmt.Sprintf("[DELETE /trigger/search/pager][%d] deletePagerUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /trigger/search/pager][%d] deletePagerUnprocessableEntity %s", 422, payload) } func (o *DeletePagerUnprocessableEntity) GetPayload() *models.APIErrorRenderExample { @@ -301,11 +308,13 @@ func (o *DeletePagerInternalServerError) Code() int { } func (o *DeletePagerInternalServerError) Error() string { - return fmt.Sprintf("[DELETE /trigger/search/pager][%d] deletePagerInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /trigger/search/pager][%d] deletePagerInternalServerError %s", 500, payload) } func (o *DeletePagerInternalServerError) String() string { - return fmt.Sprintf("[DELETE /trigger/search/pager][%d] deletePagerInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /trigger/search/pager][%d] deletePagerInternalServerError %s", 500, payload) } func (o *DeletePagerInternalServerError) GetPayload() *models.APIErrorInternalServerExample { diff --git a/pkg/client/trigger/delete_trigger_metric_responses.go b/pkg/client/trigger/delete_trigger_metric_responses.go index b04e5cf..391cf27 100644 --- a/pkg/client/trigger/delete_trigger_metric_responses.go +++ b/pkg/client/trigger/delete_trigger_metric_responses.go @@ -6,6 +6,7 @@ package trigger // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -96,11 +97,11 @@ func (o *DeleteTriggerMetricOK) Code() int { } func (o *DeleteTriggerMetricOK) Error() string { - return fmt.Sprintf("[DELETE /trigger/{triggerID}/metrics][%d] deleteTriggerMetricOK ", 200) + return fmt.Sprintf("[DELETE /trigger/{triggerID}/metrics][%d] deleteTriggerMetricOK", 200) } func (o *DeleteTriggerMetricOK) String() string { - return fmt.Sprintf("[DELETE /trigger/{triggerID}/metrics][%d] deleteTriggerMetricOK ", 200) + return fmt.Sprintf("[DELETE /trigger/{triggerID}/metrics][%d] deleteTriggerMetricOK", 200) } func (o *DeleteTriggerMetricOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -153,11 +154,13 @@ func (o *DeleteTriggerMetricBadRequest) Code() int { } func (o *DeleteTriggerMetricBadRequest) Error() string { - return fmt.Sprintf("[DELETE /trigger/{triggerID}/metrics][%d] deleteTriggerMetricBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /trigger/{triggerID}/metrics][%d] deleteTriggerMetricBadRequest %s", 400, payload) } func (o *DeleteTriggerMetricBadRequest) String() string { - return fmt.Sprintf("[DELETE /trigger/{triggerID}/metrics][%d] deleteTriggerMetricBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /trigger/{triggerID}/metrics][%d] deleteTriggerMetricBadRequest %s", 400, payload) } func (o *DeleteTriggerMetricBadRequest) GetPayload() *models.APIErrorInvalidRequestExample { @@ -221,11 +224,13 @@ func (o *DeleteTriggerMetricNotFound) Code() int { } func (o *DeleteTriggerMetricNotFound) Error() string { - return fmt.Sprintf("[DELETE /trigger/{triggerID}/metrics][%d] deleteTriggerMetricNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /trigger/{triggerID}/metrics][%d] deleteTriggerMetricNotFound %s", 404, payload) } func (o *DeleteTriggerMetricNotFound) String() string { - return fmt.Sprintf("[DELETE /trigger/{triggerID}/metrics][%d] deleteTriggerMetricNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /trigger/{triggerID}/metrics][%d] deleteTriggerMetricNotFound %s", 404, payload) } func (o *DeleteTriggerMetricNotFound) GetPayload() *models.APIErrorNotFoundExample { @@ -289,11 +294,13 @@ func (o *DeleteTriggerMetricInternalServerError) Code() int { } func (o *DeleteTriggerMetricInternalServerError) Error() string { - return fmt.Sprintf("[DELETE /trigger/{triggerID}/metrics][%d] deleteTriggerMetricInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /trigger/{triggerID}/metrics][%d] deleteTriggerMetricInternalServerError %s", 500, payload) } func (o *DeleteTriggerMetricInternalServerError) String() string { - return fmt.Sprintf("[DELETE /trigger/{triggerID}/metrics][%d] deleteTriggerMetricInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /trigger/{triggerID}/metrics][%d] deleteTriggerMetricInternalServerError %s", 500, payload) } func (o *DeleteTriggerMetricInternalServerError) GetPayload() *models.APIErrorInternalServerExample { diff --git a/pkg/client/trigger/delete_trigger_nodata_metrics_responses.go b/pkg/client/trigger/delete_trigger_nodata_metrics_responses.go index 6b783b5..85cdb01 100644 --- a/pkg/client/trigger/delete_trigger_nodata_metrics_responses.go +++ b/pkg/client/trigger/delete_trigger_nodata_metrics_responses.go @@ -6,6 +6,7 @@ package trigger // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -96,11 +97,11 @@ func (o *DeleteTriggerNodataMetricsOK) Code() int { } func (o *DeleteTriggerNodataMetricsOK) Error() string { - return fmt.Sprintf("[DELETE /trigger/{triggerID}/metrics/nodata][%d] deleteTriggerNodataMetricsOK ", 200) + return fmt.Sprintf("[DELETE /trigger/{triggerID}/metrics/nodata][%d] deleteTriggerNodataMetricsOK", 200) } func (o *DeleteTriggerNodataMetricsOK) String() string { - return fmt.Sprintf("[DELETE /trigger/{triggerID}/metrics/nodata][%d] deleteTriggerNodataMetricsOK ", 200) + return fmt.Sprintf("[DELETE /trigger/{triggerID}/metrics/nodata][%d] deleteTriggerNodataMetricsOK", 200) } func (o *DeleteTriggerNodataMetricsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -153,11 +154,13 @@ func (o *DeleteTriggerNodataMetricsBadRequest) Code() int { } func (o *DeleteTriggerNodataMetricsBadRequest) Error() string { - return fmt.Sprintf("[DELETE /trigger/{triggerID}/metrics/nodata][%d] deleteTriggerNodataMetricsBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /trigger/{triggerID}/metrics/nodata][%d] deleteTriggerNodataMetricsBadRequest %s", 400, payload) } func (o *DeleteTriggerNodataMetricsBadRequest) String() string { - return fmt.Sprintf("[DELETE /trigger/{triggerID}/metrics/nodata][%d] deleteTriggerNodataMetricsBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /trigger/{triggerID}/metrics/nodata][%d] deleteTriggerNodataMetricsBadRequest %s", 400, payload) } func (o *DeleteTriggerNodataMetricsBadRequest) GetPayload() *models.APIErrorInvalidRequestExample { @@ -221,11 +224,13 @@ func (o *DeleteTriggerNodataMetricsNotFound) Code() int { } func (o *DeleteTriggerNodataMetricsNotFound) Error() string { - return fmt.Sprintf("[DELETE /trigger/{triggerID}/metrics/nodata][%d] deleteTriggerNodataMetricsNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /trigger/{triggerID}/metrics/nodata][%d] deleteTriggerNodataMetricsNotFound %s", 404, payload) } func (o *DeleteTriggerNodataMetricsNotFound) String() string { - return fmt.Sprintf("[DELETE /trigger/{triggerID}/metrics/nodata][%d] deleteTriggerNodataMetricsNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /trigger/{triggerID}/metrics/nodata][%d] deleteTriggerNodataMetricsNotFound %s", 404, payload) } func (o *DeleteTriggerNodataMetricsNotFound) GetPayload() *models.APIErrorNotFoundExample { @@ -289,11 +294,13 @@ func (o *DeleteTriggerNodataMetricsInternalServerError) Code() int { } func (o *DeleteTriggerNodataMetricsInternalServerError) Error() string { - return fmt.Sprintf("[DELETE /trigger/{triggerID}/metrics/nodata][%d] deleteTriggerNodataMetricsInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /trigger/{triggerID}/metrics/nodata][%d] deleteTriggerNodataMetricsInternalServerError %s", 500, payload) } func (o *DeleteTriggerNodataMetricsInternalServerError) String() string { - return fmt.Sprintf("[DELETE /trigger/{triggerID}/metrics/nodata][%d] deleteTriggerNodataMetricsInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /trigger/{triggerID}/metrics/nodata][%d] deleteTriggerNodataMetricsInternalServerError %s", 500, payload) } func (o *DeleteTriggerNodataMetricsInternalServerError) GetPayload() *models.APIErrorInternalServerExample { diff --git a/pkg/client/trigger/delete_trigger_throttling_responses.go b/pkg/client/trigger/delete_trigger_throttling_responses.go index 091e04c..73d991e 100644 --- a/pkg/client/trigger/delete_trigger_throttling_responses.go +++ b/pkg/client/trigger/delete_trigger_throttling_responses.go @@ -6,6 +6,7 @@ package trigger // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -90,11 +91,11 @@ func (o *DeleteTriggerThrottlingOK) Code() int { } func (o *DeleteTriggerThrottlingOK) Error() string { - return fmt.Sprintf("[DELETE /trigger/{triggerID}/throttling][%d] deleteTriggerThrottlingOK ", 200) + return fmt.Sprintf("[DELETE /trigger/{triggerID}/throttling][%d] deleteTriggerThrottlingOK", 200) } func (o *DeleteTriggerThrottlingOK) String() string { - return fmt.Sprintf("[DELETE /trigger/{triggerID}/throttling][%d] deleteTriggerThrottlingOK ", 200) + return fmt.Sprintf("[DELETE /trigger/{triggerID}/throttling][%d] deleteTriggerThrottlingOK", 200) } func (o *DeleteTriggerThrottlingOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -147,11 +148,13 @@ func (o *DeleteTriggerThrottlingNotFound) Code() int { } func (o *DeleteTriggerThrottlingNotFound) Error() string { - return fmt.Sprintf("[DELETE /trigger/{triggerID}/throttling][%d] deleteTriggerThrottlingNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /trigger/{triggerID}/throttling][%d] deleteTriggerThrottlingNotFound %s", 404, payload) } func (o *DeleteTriggerThrottlingNotFound) String() string { - return fmt.Sprintf("[DELETE /trigger/{triggerID}/throttling][%d] deleteTriggerThrottlingNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /trigger/{triggerID}/throttling][%d] deleteTriggerThrottlingNotFound %s", 404, payload) } func (o *DeleteTriggerThrottlingNotFound) GetPayload() *models.APIErrorNotFoundExample { @@ -215,11 +218,13 @@ func (o *DeleteTriggerThrottlingInternalServerError) Code() int { } func (o *DeleteTriggerThrottlingInternalServerError) Error() string { - return fmt.Sprintf("[DELETE /trigger/{triggerID}/throttling][%d] deleteTriggerThrottlingInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /trigger/{triggerID}/throttling][%d] deleteTriggerThrottlingInternalServerError %s", 500, payload) } func (o *DeleteTriggerThrottlingInternalServerError) String() string { - return fmt.Sprintf("[DELETE /trigger/{triggerID}/throttling][%d] deleteTriggerThrottlingInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /trigger/{triggerID}/throttling][%d] deleteTriggerThrottlingInternalServerError %s", 500, payload) } func (o *DeleteTriggerThrottlingInternalServerError) GetPayload() *models.APIErrorInternalServerExample { diff --git a/pkg/client/trigger/get_all_triggers_responses.go b/pkg/client/trigger/get_all_triggers_responses.go index 2a444d8..ccbba82 100644 --- a/pkg/client/trigger/get_all_triggers_responses.go +++ b/pkg/client/trigger/get_all_triggers_responses.go @@ -6,6 +6,7 @@ package trigger // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -91,11 +92,13 @@ func (o *GetAllTriggersOK) Code() int { } func (o *GetAllTriggersOK) Error() string { - return fmt.Sprintf("[GET /trigger][%d] getAllTriggersOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger][%d] getAllTriggersOK %s", 200, payload) } func (o *GetAllTriggersOK) String() string { - return fmt.Sprintf("[GET /trigger][%d] getAllTriggersOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger][%d] getAllTriggersOK %s", 200, payload) } func (o *GetAllTriggersOK) GetPayload() *models.DtoTriggersList { @@ -159,11 +162,13 @@ func (o *GetAllTriggersUnprocessableEntity) Code() int { } func (o *GetAllTriggersUnprocessableEntity) Error() string { - return fmt.Sprintf("[GET /trigger][%d] getAllTriggersUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger][%d] getAllTriggersUnprocessableEntity %s", 422, payload) } func (o *GetAllTriggersUnprocessableEntity) String() string { - return fmt.Sprintf("[GET /trigger][%d] getAllTriggersUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger][%d] getAllTriggersUnprocessableEntity %s", 422, payload) } func (o *GetAllTriggersUnprocessableEntity) GetPayload() *models.APIErrorRenderExample { @@ -227,11 +232,13 @@ func (o *GetAllTriggersInternalServerError) Code() int { } func (o *GetAllTriggersInternalServerError) Error() string { - return fmt.Sprintf("[GET /trigger][%d] getAllTriggersInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger][%d] getAllTriggersInternalServerError %s", 500, payload) } func (o *GetAllTriggersInternalServerError) String() string { - return fmt.Sprintf("[GET /trigger][%d] getAllTriggersInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger][%d] getAllTriggersInternalServerError %s", 500, payload) } func (o *GetAllTriggersInternalServerError) GetPayload() *models.APIErrorInternalServerExample { diff --git a/pkg/client/trigger/get_trigger_dump_responses.go b/pkg/client/trigger/get_trigger_dump_responses.go index 4058c33..0c7a1fd 100644 --- a/pkg/client/trigger/get_trigger_dump_responses.go +++ b/pkg/client/trigger/get_trigger_dump_responses.go @@ -6,6 +6,7 @@ package trigger // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -91,11 +92,13 @@ func (o *GetTriggerDumpOK) Code() int { } func (o *GetTriggerDumpOK) Error() string { - return fmt.Sprintf("[GET /trigger/{triggerID}/dump][%d] getTriggerDumpOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger/{triggerID}/dump][%d] getTriggerDumpOK %s", 200, payload) } func (o *GetTriggerDumpOK) String() string { - return fmt.Sprintf("[GET /trigger/{triggerID}/dump][%d] getTriggerDumpOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger/{triggerID}/dump][%d] getTriggerDumpOK %s", 200, payload) } func (o *GetTriggerDumpOK) GetPayload() *models.DtoTriggerDump { @@ -159,11 +162,13 @@ func (o *GetTriggerDumpNotFound) Code() int { } func (o *GetTriggerDumpNotFound) Error() string { - return fmt.Sprintf("[GET /trigger/{triggerID}/dump][%d] getTriggerDumpNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger/{triggerID}/dump][%d] getTriggerDumpNotFound %s", 404, payload) } func (o *GetTriggerDumpNotFound) String() string { - return fmt.Sprintf("[GET /trigger/{triggerID}/dump][%d] getTriggerDumpNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger/{triggerID}/dump][%d] getTriggerDumpNotFound %s", 404, payload) } func (o *GetTriggerDumpNotFound) GetPayload() *models.APIErrorNotFoundExample { @@ -227,11 +232,13 @@ func (o *GetTriggerDumpInternalServerError) Code() int { } func (o *GetTriggerDumpInternalServerError) Error() string { - return fmt.Sprintf("[GET /trigger/{triggerID}/dump][%d] getTriggerDumpInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger/{triggerID}/dump][%d] getTriggerDumpInternalServerError %s", 500, payload) } func (o *GetTriggerDumpInternalServerError) String() string { - return fmt.Sprintf("[GET /trigger/{triggerID}/dump][%d] getTriggerDumpInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger/{triggerID}/dump][%d] getTriggerDumpInternalServerError %s", 500, payload) } func (o *GetTriggerDumpInternalServerError) GetPayload() *models.APIErrorInternalServerExample { diff --git a/pkg/client/trigger/get_trigger_metrics_responses.go b/pkg/client/trigger/get_trigger_metrics_responses.go index a27b431..6539eaa 100644 --- a/pkg/client/trigger/get_trigger_metrics_responses.go +++ b/pkg/client/trigger/get_trigger_metrics_responses.go @@ -6,6 +6,7 @@ package trigger // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -103,11 +104,13 @@ func (o *GetTriggerMetricsOK) Code() int { } func (o *GetTriggerMetricsOK) Error() string { - return fmt.Sprintf("[GET /trigger/{triggerID}/metrics][%d] getTriggerMetricsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger/{triggerID}/metrics][%d] getTriggerMetricsOK %s", 200, payload) } func (o *GetTriggerMetricsOK) String() string { - return fmt.Sprintf("[GET /trigger/{triggerID}/metrics][%d] getTriggerMetricsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger/{triggerID}/metrics][%d] getTriggerMetricsOK %s", 200, payload) } func (o *GetTriggerMetricsOK) GetPayload() models.DtoTriggerMetrics { @@ -169,11 +172,13 @@ func (o *GetTriggerMetricsBadRequest) Code() int { } func (o *GetTriggerMetricsBadRequest) Error() string { - return fmt.Sprintf("[GET /trigger/{triggerID}/metrics][%d] getTriggerMetricsBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger/{triggerID}/metrics][%d] getTriggerMetricsBadRequest %s", 400, payload) } func (o *GetTriggerMetricsBadRequest) String() string { - return fmt.Sprintf("[GET /trigger/{triggerID}/metrics][%d] getTriggerMetricsBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger/{triggerID}/metrics][%d] getTriggerMetricsBadRequest %s", 400, payload) } func (o *GetTriggerMetricsBadRequest) GetPayload() *models.APIErrorInvalidRequestExample { @@ -237,11 +242,13 @@ func (o *GetTriggerMetricsNotFound) Code() int { } func (o *GetTriggerMetricsNotFound) Error() string { - return fmt.Sprintf("[GET /trigger/{triggerID}/metrics][%d] getTriggerMetricsNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger/{triggerID}/metrics][%d] getTriggerMetricsNotFound %s", 404, payload) } func (o *GetTriggerMetricsNotFound) String() string { - return fmt.Sprintf("[GET /trigger/{triggerID}/metrics][%d] getTriggerMetricsNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger/{triggerID}/metrics][%d] getTriggerMetricsNotFound %s", 404, payload) } func (o *GetTriggerMetricsNotFound) GetPayload() *models.APIErrorNotFoundExample { @@ -305,11 +312,13 @@ func (o *GetTriggerMetricsUnprocessableEntity) Code() int { } func (o *GetTriggerMetricsUnprocessableEntity) Error() string { - return fmt.Sprintf("[GET /trigger/{triggerID}/metrics][%d] getTriggerMetricsUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger/{triggerID}/metrics][%d] getTriggerMetricsUnprocessableEntity %s", 422, payload) } func (o *GetTriggerMetricsUnprocessableEntity) String() string { - return fmt.Sprintf("[GET /trigger/{triggerID}/metrics][%d] getTriggerMetricsUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger/{triggerID}/metrics][%d] getTriggerMetricsUnprocessableEntity %s", 422, payload) } func (o *GetTriggerMetricsUnprocessableEntity) GetPayload() *models.APIErrorRenderExample { @@ -373,11 +382,13 @@ func (o *GetTriggerMetricsInternalServerError) Code() int { } func (o *GetTriggerMetricsInternalServerError) Error() string { - return fmt.Sprintf("[GET /trigger/{triggerID}/metrics][%d] getTriggerMetricsInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger/{triggerID}/metrics][%d] getTriggerMetricsInternalServerError %s", 500, payload) } func (o *GetTriggerMetricsInternalServerError) String() string { - return fmt.Sprintf("[GET /trigger/{triggerID}/metrics][%d] getTriggerMetricsInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger/{triggerID}/metrics][%d] getTriggerMetricsInternalServerError %s", 500, payload) } func (o *GetTriggerMetricsInternalServerError) GetPayload() *models.APIErrorInternalServerExample { diff --git a/pkg/client/trigger/get_trigger_responses.go b/pkg/client/trigger/get_trigger_responses.go index 6fbab8a..17b5afd 100644 --- a/pkg/client/trigger/get_trigger_responses.go +++ b/pkg/client/trigger/get_trigger_responses.go @@ -6,6 +6,7 @@ package trigger // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -97,11 +98,13 @@ func (o *GetTriggerOK) Code() int { } func (o *GetTriggerOK) Error() string { - return fmt.Sprintf("[GET /trigger/{triggerID}][%d] getTriggerOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger/{triggerID}][%d] getTriggerOK %s", 200, payload) } func (o *GetTriggerOK) String() string { - return fmt.Sprintf("[GET /trigger/{triggerID}][%d] getTriggerOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger/{triggerID}][%d] getTriggerOK %s", 200, payload) } func (o *GetTriggerOK) GetPayload() *models.DtoTrigger { @@ -165,11 +168,13 @@ func (o *GetTriggerNotFound) Code() int { } func (o *GetTriggerNotFound) Error() string { - return fmt.Sprintf("[GET /trigger/{triggerID}][%d] getTriggerNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger/{triggerID}][%d] getTriggerNotFound %s", 404, payload) } func (o *GetTriggerNotFound) String() string { - return fmt.Sprintf("[GET /trigger/{triggerID}][%d] getTriggerNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger/{triggerID}][%d] getTriggerNotFound %s", 404, payload) } func (o *GetTriggerNotFound) GetPayload() *models.APIErrorNotFoundExample { @@ -233,11 +238,13 @@ func (o *GetTriggerUnprocessableEntity) Code() int { } func (o *GetTriggerUnprocessableEntity) Error() string { - return fmt.Sprintf("[GET /trigger/{triggerID}][%d] getTriggerUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger/{triggerID}][%d] getTriggerUnprocessableEntity %s", 422, payload) } func (o *GetTriggerUnprocessableEntity) String() string { - return fmt.Sprintf("[GET /trigger/{triggerID}][%d] getTriggerUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger/{triggerID}][%d] getTriggerUnprocessableEntity %s", 422, payload) } func (o *GetTriggerUnprocessableEntity) GetPayload() *models.APIErrorRenderExample { @@ -301,11 +308,13 @@ func (o *GetTriggerInternalServerError) Code() int { } func (o *GetTriggerInternalServerError) Error() string { - return fmt.Sprintf("[GET /trigger/{triggerID}][%d] getTriggerInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger/{triggerID}][%d] getTriggerInternalServerError %s", 500, payload) } func (o *GetTriggerInternalServerError) String() string { - return fmt.Sprintf("[GET /trigger/{triggerID}][%d] getTriggerInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger/{triggerID}][%d] getTriggerInternalServerError %s", 500, payload) } func (o *GetTriggerInternalServerError) GetPayload() *models.APIErrorInternalServerExample { diff --git a/pkg/client/trigger/get_trigger_state_responses.go b/pkg/client/trigger/get_trigger_state_responses.go index 95b52a8..915525c 100644 --- a/pkg/client/trigger/get_trigger_state_responses.go +++ b/pkg/client/trigger/get_trigger_state_responses.go @@ -6,6 +6,7 @@ package trigger // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -97,11 +98,13 @@ func (o *GetTriggerStateOK) Code() int { } func (o *GetTriggerStateOK) Error() string { - return fmt.Sprintf("[GET /trigger/{triggerID}/state][%d] getTriggerStateOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger/{triggerID}/state][%d] getTriggerStateOK %s", 200, payload) } func (o *GetTriggerStateOK) String() string { - return fmt.Sprintf("[GET /trigger/{triggerID}/state][%d] getTriggerStateOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger/{triggerID}/state][%d] getTriggerStateOK %s", 200, payload) } func (o *GetTriggerStateOK) GetPayload() *models.DtoTriggerCheck { @@ -165,11 +168,13 @@ func (o *GetTriggerStateNotFound) Code() int { } func (o *GetTriggerStateNotFound) Error() string { - return fmt.Sprintf("[GET /trigger/{triggerID}/state][%d] getTriggerStateNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger/{triggerID}/state][%d] getTriggerStateNotFound %s", 404, payload) } func (o *GetTriggerStateNotFound) String() string { - return fmt.Sprintf("[GET /trigger/{triggerID}/state][%d] getTriggerStateNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger/{triggerID}/state][%d] getTriggerStateNotFound %s", 404, payload) } func (o *GetTriggerStateNotFound) GetPayload() *models.APIErrorNotFoundExample { @@ -233,11 +238,13 @@ func (o *GetTriggerStateUnprocessableEntity) Code() int { } func (o *GetTriggerStateUnprocessableEntity) Error() string { - return fmt.Sprintf("[GET /trigger/{triggerID}/state][%d] getTriggerStateUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger/{triggerID}/state][%d] getTriggerStateUnprocessableEntity %s", 422, payload) } func (o *GetTriggerStateUnprocessableEntity) String() string { - return fmt.Sprintf("[GET /trigger/{triggerID}/state][%d] getTriggerStateUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger/{triggerID}/state][%d] getTriggerStateUnprocessableEntity %s", 422, payload) } func (o *GetTriggerStateUnprocessableEntity) GetPayload() *models.APIErrorRenderExample { @@ -301,11 +308,13 @@ func (o *GetTriggerStateInternalServerError) Code() int { } func (o *GetTriggerStateInternalServerError) Error() string { - return fmt.Sprintf("[GET /trigger/{triggerID}/state][%d] getTriggerStateInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger/{triggerID}/state][%d] getTriggerStateInternalServerError %s", 500, payload) } func (o *GetTriggerStateInternalServerError) String() string { - return fmt.Sprintf("[GET /trigger/{triggerID}/state][%d] getTriggerStateInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger/{triggerID}/state][%d] getTriggerStateInternalServerError %s", 500, payload) } func (o *GetTriggerStateInternalServerError) GetPayload() *models.APIErrorInternalServerExample { diff --git a/pkg/client/trigger/get_trigger_throttling_responses.go b/pkg/client/trigger/get_trigger_throttling_responses.go index 87b2582..f00d9b0 100644 --- a/pkg/client/trigger/get_trigger_throttling_responses.go +++ b/pkg/client/trigger/get_trigger_throttling_responses.go @@ -6,6 +6,7 @@ package trigger // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -91,11 +92,13 @@ func (o *GetTriggerThrottlingOK) Code() int { } func (o *GetTriggerThrottlingOK) Error() string { - return fmt.Sprintf("[GET /trigger/{triggerID}/throttling][%d] getTriggerThrottlingOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger/{triggerID}/throttling][%d] getTriggerThrottlingOK %s", 200, payload) } func (o *GetTriggerThrottlingOK) String() string { - return fmt.Sprintf("[GET /trigger/{triggerID}/throttling][%d] getTriggerThrottlingOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger/{triggerID}/throttling][%d] getTriggerThrottlingOK %s", 200, payload) } func (o *GetTriggerThrottlingOK) GetPayload() *models.DtoThrottlingResponse { @@ -159,11 +162,13 @@ func (o *GetTriggerThrottlingNotFound) Code() int { } func (o *GetTriggerThrottlingNotFound) Error() string { - return fmt.Sprintf("[GET /trigger/{triggerID}/throttling][%d] getTriggerThrottlingNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger/{triggerID}/throttling][%d] getTriggerThrottlingNotFound %s", 404, payload) } func (o *GetTriggerThrottlingNotFound) String() string { - return fmt.Sprintf("[GET /trigger/{triggerID}/throttling][%d] getTriggerThrottlingNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger/{triggerID}/throttling][%d] getTriggerThrottlingNotFound %s", 404, payload) } func (o *GetTriggerThrottlingNotFound) GetPayload() *models.APIErrorNotFoundExample { @@ -227,11 +232,13 @@ func (o *GetTriggerThrottlingUnprocessableEntity) Code() int { } func (o *GetTriggerThrottlingUnprocessableEntity) Error() string { - return fmt.Sprintf("[GET /trigger/{triggerID}/throttling][%d] getTriggerThrottlingUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger/{triggerID}/throttling][%d] getTriggerThrottlingUnprocessableEntity %s", 422, payload) } func (o *GetTriggerThrottlingUnprocessableEntity) String() string { - return fmt.Sprintf("[GET /trigger/{triggerID}/throttling][%d] getTriggerThrottlingUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger/{triggerID}/throttling][%d] getTriggerThrottlingUnprocessableEntity %s", 422, payload) } func (o *GetTriggerThrottlingUnprocessableEntity) GetPayload() *models.APIErrorRenderExample { diff --git a/pkg/client/trigger/get_unused_triggers_responses.go b/pkg/client/trigger/get_unused_triggers_responses.go index bb2cf95..707d9b8 100644 --- a/pkg/client/trigger/get_unused_triggers_responses.go +++ b/pkg/client/trigger/get_unused_triggers_responses.go @@ -6,6 +6,7 @@ package trigger // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -91,11 +92,13 @@ func (o *GetUnusedTriggersOK) Code() int { } func (o *GetUnusedTriggersOK) Error() string { - return fmt.Sprintf("[GET /trigger/unused][%d] getUnusedTriggersOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger/unused][%d] getUnusedTriggersOK %s", 200, payload) } func (o *GetUnusedTriggersOK) String() string { - return fmt.Sprintf("[GET /trigger/unused][%d] getUnusedTriggersOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger/unused][%d] getUnusedTriggersOK %s", 200, payload) } func (o *GetUnusedTriggersOK) GetPayload() *models.DtoTriggersList { @@ -159,11 +162,13 @@ func (o *GetUnusedTriggersUnprocessableEntity) Code() int { } func (o *GetUnusedTriggersUnprocessableEntity) Error() string { - return fmt.Sprintf("[GET /trigger/unused][%d] getUnusedTriggersUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger/unused][%d] getUnusedTriggersUnprocessableEntity %s", 422, payload) } func (o *GetUnusedTriggersUnprocessableEntity) String() string { - return fmt.Sprintf("[GET /trigger/unused][%d] getUnusedTriggersUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger/unused][%d] getUnusedTriggersUnprocessableEntity %s", 422, payload) } func (o *GetUnusedTriggersUnprocessableEntity) GetPayload() *models.APIErrorRenderExample { @@ -227,11 +232,13 @@ func (o *GetUnusedTriggersInternalServerError) Code() int { } func (o *GetUnusedTriggersInternalServerError) Error() string { - return fmt.Sprintf("[GET /trigger/unused][%d] getUnusedTriggersInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger/unused][%d] getUnusedTriggersInternalServerError %s", 500, payload) } func (o *GetUnusedTriggersInternalServerError) String() string { - return fmt.Sprintf("[GET /trigger/unused][%d] getUnusedTriggersInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger/unused][%d] getUnusedTriggersInternalServerError %s", 500, payload) } func (o *GetUnusedTriggersInternalServerError) GetPayload() *models.APIErrorInternalServerExample { diff --git a/pkg/client/trigger/remove_trigger_responses.go b/pkg/client/trigger/remove_trigger_responses.go index f1a5b49..b7b5aec 100644 --- a/pkg/client/trigger/remove_trigger_responses.go +++ b/pkg/client/trigger/remove_trigger_responses.go @@ -6,6 +6,7 @@ package trigger // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -90,11 +91,11 @@ func (o *RemoveTriggerOK) Code() int { } func (o *RemoveTriggerOK) Error() string { - return fmt.Sprintf("[DELETE /trigger/{triggerID}][%d] removeTriggerOK ", 200) + return fmt.Sprintf("[DELETE /trigger/{triggerID}][%d] removeTriggerOK", 200) } func (o *RemoveTriggerOK) String() string { - return fmt.Sprintf("[DELETE /trigger/{triggerID}][%d] removeTriggerOK ", 200) + return fmt.Sprintf("[DELETE /trigger/{triggerID}][%d] removeTriggerOK", 200) } func (o *RemoveTriggerOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -147,11 +148,13 @@ func (o *RemoveTriggerNotFound) Code() int { } func (o *RemoveTriggerNotFound) Error() string { - return fmt.Sprintf("[DELETE /trigger/{triggerID}][%d] removeTriggerNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /trigger/{triggerID}][%d] removeTriggerNotFound %s", 404, payload) } func (o *RemoveTriggerNotFound) String() string { - return fmt.Sprintf("[DELETE /trigger/{triggerID}][%d] removeTriggerNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /trigger/{triggerID}][%d] removeTriggerNotFound %s", 404, payload) } func (o *RemoveTriggerNotFound) GetPayload() *models.APIErrorNotFoundExample { @@ -215,11 +218,13 @@ func (o *RemoveTriggerInternalServerError) Code() int { } func (o *RemoveTriggerInternalServerError) Error() string { - return fmt.Sprintf("[DELETE /trigger/{triggerID}][%d] removeTriggerInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /trigger/{triggerID}][%d] removeTriggerInternalServerError %s", 500, payload) } func (o *RemoveTriggerInternalServerError) String() string { - return fmt.Sprintf("[DELETE /trigger/{triggerID}][%d] removeTriggerInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /trigger/{triggerID}][%d] removeTriggerInternalServerError %s", 500, payload) } func (o *RemoveTriggerInternalServerError) GetPayload() *models.APIErrorInternalServerExample { diff --git a/pkg/client/trigger/render_trigger_metrics_responses.go b/pkg/client/trigger/render_trigger_metrics_responses.go index b4121f5..6e448ca 100644 --- a/pkg/client/trigger/render_trigger_metrics_responses.go +++ b/pkg/client/trigger/render_trigger_metrics_responses.go @@ -6,6 +6,7 @@ package trigger // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -96,11 +97,11 @@ func (o *RenderTriggerMetricsOK) Code() int { } func (o *RenderTriggerMetricsOK) Error() string { - return fmt.Sprintf("[GET /trigger/{triggerID}/render][%d] renderTriggerMetricsOK ", 200) + return fmt.Sprintf("[GET /trigger/{triggerID}/render][%d] renderTriggerMetricsOK", 200) } func (o *RenderTriggerMetricsOK) String() string { - return fmt.Sprintf("[GET /trigger/{triggerID}/render][%d] renderTriggerMetricsOK ", 200) + return fmt.Sprintf("[GET /trigger/{triggerID}/render][%d] renderTriggerMetricsOK", 200) } func (o *RenderTriggerMetricsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -153,11 +154,13 @@ func (o *RenderTriggerMetricsBadRequest) Code() int { } func (o *RenderTriggerMetricsBadRequest) Error() string { - return fmt.Sprintf("[GET /trigger/{triggerID}/render][%d] renderTriggerMetricsBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger/{triggerID}/render][%d] renderTriggerMetricsBadRequest %s", 400, payload) } func (o *RenderTriggerMetricsBadRequest) String() string { - return fmt.Sprintf("[GET /trigger/{triggerID}/render][%d] renderTriggerMetricsBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger/{triggerID}/render][%d] renderTriggerMetricsBadRequest %s", 400, payload) } func (o *RenderTriggerMetricsBadRequest) GetPayload() *models.APIErrorInvalidRequestExample { @@ -221,11 +224,13 @@ func (o *RenderTriggerMetricsNotFound) Code() int { } func (o *RenderTriggerMetricsNotFound) Error() string { - return fmt.Sprintf("[GET /trigger/{triggerID}/render][%d] renderTriggerMetricsNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger/{triggerID}/render][%d] renderTriggerMetricsNotFound %s", 404, payload) } func (o *RenderTriggerMetricsNotFound) String() string { - return fmt.Sprintf("[GET /trigger/{triggerID}/render][%d] renderTriggerMetricsNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger/{triggerID}/render][%d] renderTriggerMetricsNotFound %s", 404, payload) } func (o *RenderTriggerMetricsNotFound) GetPayload() *models.APIErrorNotFoundExample { @@ -289,11 +294,13 @@ func (o *RenderTriggerMetricsInternalServerError) Code() int { } func (o *RenderTriggerMetricsInternalServerError) Error() string { - return fmt.Sprintf("[GET /trigger/{triggerID}/render][%d] renderTriggerMetricsInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger/{triggerID}/render][%d] renderTriggerMetricsInternalServerError %s", 500, payload) } func (o *RenderTriggerMetricsInternalServerError) String() string { - return fmt.Sprintf("[GET /trigger/{triggerID}/render][%d] renderTriggerMetricsInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger/{triggerID}/render][%d] renderTriggerMetricsInternalServerError %s", 500, payload) } func (o *RenderTriggerMetricsInternalServerError) GetPayload() *models.APIErrorInternalServerExample { diff --git a/pkg/client/trigger/search_triggers_responses.go b/pkg/client/trigger/search_triggers_responses.go index 752bf03..625170c 100644 --- a/pkg/client/trigger/search_triggers_responses.go +++ b/pkg/client/trigger/search_triggers_responses.go @@ -6,6 +6,7 @@ package trigger // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -103,11 +104,13 @@ func (o *SearchTriggersOK) Code() int { } func (o *SearchTriggersOK) Error() string { - return fmt.Sprintf("[GET /trigger/search][%d] searchTriggersOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger/search][%d] searchTriggersOK %s", 200, payload) } func (o *SearchTriggersOK) String() string { - return fmt.Sprintf("[GET /trigger/search][%d] searchTriggersOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger/search][%d] searchTriggersOK %s", 200, payload) } func (o *SearchTriggersOK) GetPayload() *models.DtoTriggersList { @@ -171,11 +174,13 @@ func (o *SearchTriggersBadRequest) Code() int { } func (o *SearchTriggersBadRequest) Error() string { - return fmt.Sprintf("[GET /trigger/search][%d] searchTriggersBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger/search][%d] searchTriggersBadRequest %s", 400, payload) } func (o *SearchTriggersBadRequest) String() string { - return fmt.Sprintf("[GET /trigger/search][%d] searchTriggersBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger/search][%d] searchTriggersBadRequest %s", 400, payload) } func (o *SearchTriggersBadRequest) GetPayload() *models.APIErrorInvalidRequestExample { @@ -239,11 +244,13 @@ func (o *SearchTriggersNotFound) Code() int { } func (o *SearchTriggersNotFound) Error() string { - return fmt.Sprintf("[GET /trigger/search][%d] searchTriggersNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger/search][%d] searchTriggersNotFound %s", 404, payload) } func (o *SearchTriggersNotFound) String() string { - return fmt.Sprintf("[GET /trigger/search][%d] searchTriggersNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger/search][%d] searchTriggersNotFound %s", 404, payload) } func (o *SearchTriggersNotFound) GetPayload() *models.APIErrorNotFoundExample { @@ -307,11 +314,13 @@ func (o *SearchTriggersUnprocessableEntity) Code() int { } func (o *SearchTriggersUnprocessableEntity) Error() string { - return fmt.Sprintf("[GET /trigger/search][%d] searchTriggersUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger/search][%d] searchTriggersUnprocessableEntity %s", 422, payload) } func (o *SearchTriggersUnprocessableEntity) String() string { - return fmt.Sprintf("[GET /trigger/search][%d] searchTriggersUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger/search][%d] searchTriggersUnprocessableEntity %s", 422, payload) } func (o *SearchTriggersUnprocessableEntity) GetPayload() *models.APIErrorRenderExample { @@ -375,11 +384,13 @@ func (o *SearchTriggersInternalServerError) Code() int { } func (o *SearchTriggersInternalServerError) Error() string { - return fmt.Sprintf("[GET /trigger/search][%d] searchTriggersInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger/search][%d] searchTriggersInternalServerError %s", 500, payload) } func (o *SearchTriggersInternalServerError) String() string { - return fmt.Sprintf("[GET /trigger/search][%d] searchTriggersInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /trigger/search][%d] searchTriggersInternalServerError %s", 500, payload) } func (o *SearchTriggersInternalServerError) GetPayload() *models.APIErrorInternalServerExample { diff --git a/pkg/client/trigger/set_trigger_maintenance_responses.go b/pkg/client/trigger/set_trigger_maintenance_responses.go index 3b6455b..ac47fdc 100644 --- a/pkg/client/trigger/set_trigger_maintenance_responses.go +++ b/pkg/client/trigger/set_trigger_maintenance_responses.go @@ -6,6 +6,7 @@ package trigger // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -96,11 +97,11 @@ func (o *SetTriggerMaintenanceOK) Code() int { } func (o *SetTriggerMaintenanceOK) Error() string { - return fmt.Sprintf("[PUT /trigger/{triggerID}/setMaintenance][%d] setTriggerMaintenanceOK ", 200) + return fmt.Sprintf("[PUT /trigger/{triggerID}/setMaintenance][%d] setTriggerMaintenanceOK", 200) } func (o *SetTriggerMaintenanceOK) String() string { - return fmt.Sprintf("[PUT /trigger/{triggerID}/setMaintenance][%d] setTriggerMaintenanceOK ", 200) + return fmt.Sprintf("[PUT /trigger/{triggerID}/setMaintenance][%d] setTriggerMaintenanceOK", 200) } func (o *SetTriggerMaintenanceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -153,11 +154,13 @@ func (o *SetTriggerMaintenanceBadRequest) Code() int { } func (o *SetTriggerMaintenanceBadRequest) Error() string { - return fmt.Sprintf("[PUT /trigger/{triggerID}/setMaintenance][%d] setTriggerMaintenanceBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /trigger/{triggerID}/setMaintenance][%d] setTriggerMaintenanceBadRequest %s", 400, payload) } func (o *SetTriggerMaintenanceBadRequest) String() string { - return fmt.Sprintf("[PUT /trigger/{triggerID}/setMaintenance][%d] setTriggerMaintenanceBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /trigger/{triggerID}/setMaintenance][%d] setTriggerMaintenanceBadRequest %s", 400, payload) } func (o *SetTriggerMaintenanceBadRequest) GetPayload() *models.APIErrorInvalidRequestExample { @@ -221,11 +224,13 @@ func (o *SetTriggerMaintenanceNotFound) Code() int { } func (o *SetTriggerMaintenanceNotFound) Error() string { - return fmt.Sprintf("[PUT /trigger/{triggerID}/setMaintenance][%d] setTriggerMaintenanceNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /trigger/{triggerID}/setMaintenance][%d] setTriggerMaintenanceNotFound %s", 404, payload) } func (o *SetTriggerMaintenanceNotFound) String() string { - return fmt.Sprintf("[PUT /trigger/{triggerID}/setMaintenance][%d] setTriggerMaintenanceNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /trigger/{triggerID}/setMaintenance][%d] setTriggerMaintenanceNotFound %s", 404, payload) } func (o *SetTriggerMaintenanceNotFound) GetPayload() *models.APIErrorNotFoundExample { @@ -289,11 +294,13 @@ func (o *SetTriggerMaintenanceInternalServerError) Code() int { } func (o *SetTriggerMaintenanceInternalServerError) Error() string { - return fmt.Sprintf("[PUT /trigger/{triggerID}/setMaintenance][%d] setTriggerMaintenanceInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /trigger/{triggerID}/setMaintenance][%d] setTriggerMaintenanceInternalServerError %s", 500, payload) } func (o *SetTriggerMaintenanceInternalServerError) String() string { - return fmt.Sprintf("[PUT /trigger/{triggerID}/setMaintenance][%d] setTriggerMaintenanceInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /trigger/{triggerID}/setMaintenance][%d] setTriggerMaintenanceInternalServerError %s", 500, payload) } func (o *SetTriggerMaintenanceInternalServerError) GetPayload() *models.APIErrorInternalServerExample { diff --git a/pkg/client/trigger/trigger_check_responses.go b/pkg/client/trigger/trigger_check_responses.go index 770ae52..a00e78e 100644 --- a/pkg/client/trigger/trigger_check_responses.go +++ b/pkg/client/trigger/trigger_check_responses.go @@ -6,6 +6,7 @@ package trigger // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -91,11 +92,13 @@ func (o *TriggerCheckOK) Code() int { } func (o *TriggerCheckOK) Error() string { - return fmt.Sprintf("[PUT /trigger/check][%d] triggerCheckOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /trigger/check][%d] triggerCheckOK %s", 200, payload) } func (o *TriggerCheckOK) String() string { - return fmt.Sprintf("[PUT /trigger/check][%d] triggerCheckOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /trigger/check][%d] triggerCheckOK %s", 200, payload) } func (o *TriggerCheckOK) GetPayload() *models.DtoTriggerCheckResponse { @@ -159,11 +162,13 @@ func (o *TriggerCheckBadRequest) Code() int { } func (o *TriggerCheckBadRequest) Error() string { - return fmt.Sprintf("[PUT /trigger/check][%d] triggerCheckBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /trigger/check][%d] triggerCheckBadRequest %s", 400, payload) } func (o *TriggerCheckBadRequest) String() string { - return fmt.Sprintf("[PUT /trigger/check][%d] triggerCheckBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /trigger/check][%d] triggerCheckBadRequest %s", 400, payload) } func (o *TriggerCheckBadRequest) GetPayload() *models.APIErrorInvalidRequestExample { @@ -227,11 +232,13 @@ func (o *TriggerCheckInternalServerError) Code() int { } func (o *TriggerCheckInternalServerError) Error() string { - return fmt.Sprintf("[PUT /trigger/check][%d] triggerCheckInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /trigger/check][%d] triggerCheckInternalServerError %s", 500, payload) } func (o *TriggerCheckInternalServerError) String() string { - return fmt.Sprintf("[PUT /trigger/check][%d] triggerCheckInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /trigger/check][%d] triggerCheckInternalServerError %s", 500, payload) } func (o *TriggerCheckInternalServerError) GetPayload() *models.APIErrorInternalServerExample { diff --git a/pkg/client/trigger/trigger_client.go b/pkg/client/trigger/trigger_client.go index 663d697..f9518be 100644 --- a/pkg/client/trigger/trigger_client.go +++ b/pkg/client/trigger/trigger_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new trigger 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 trigger 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 trigger API */ @@ -25,9 +51,33 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// 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. + +// 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"} +} + +// WithAcceptImagePng sets the Accept header to "image/png". +func WithAcceptImagePng(r *runtime.ClientOperation) { + r.ProducesMediaTypes = []string{"image/png"} +} + // ClientService is the interface for Client methods type ClientService interface { CreateTrigger(params *CreateTriggerParams, opts ...ClientOption) (*CreateTriggerOK, error) diff --git a/pkg/client/trigger/update_trigger_responses.go b/pkg/client/trigger/update_trigger_responses.go index 5dbdeb9..77b065e 100644 --- a/pkg/client/trigger/update_trigger_responses.go +++ b/pkg/client/trigger/update_trigger_responses.go @@ -6,6 +6,7 @@ package trigger // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *UpdateTriggerOK) Code() int { } func (o *UpdateTriggerOK) Error() string { - return fmt.Sprintf("[PUT /trigger/{triggerID}][%d] updateTriggerOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /trigger/{triggerID}][%d] updateTriggerOK %s", 200, payload) } func (o *UpdateTriggerOK) String() string { - return fmt.Sprintf("[PUT /trigger/{triggerID}][%d] updateTriggerOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /trigger/{triggerID}][%d] updateTriggerOK %s", 200, payload) } func (o *UpdateTriggerOK) GetPayload() *models.DtoSaveTriggerResponse { @@ -177,11 +180,13 @@ func (o *UpdateTriggerBadRequest) Code() int { } func (o *UpdateTriggerBadRequest) Error() string { - return fmt.Sprintf("[PUT /trigger/{triggerID}][%d] updateTriggerBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /trigger/{triggerID}][%d] updateTriggerBadRequest %s", 400, payload) } func (o *UpdateTriggerBadRequest) String() string { - return fmt.Sprintf("[PUT /trigger/{triggerID}][%d] updateTriggerBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /trigger/{triggerID}][%d] updateTriggerBadRequest %s", 400, payload) } func (o *UpdateTriggerBadRequest) GetPayload() *models.APIErrorInvalidRequestExample { @@ -245,11 +250,13 @@ func (o *UpdateTriggerNotFound) Code() int { } func (o *UpdateTriggerNotFound) Error() string { - return fmt.Sprintf("[PUT /trigger/{triggerID}][%d] updateTriggerNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /trigger/{triggerID}][%d] updateTriggerNotFound %s", 404, payload) } func (o *UpdateTriggerNotFound) String() string { - return fmt.Sprintf("[PUT /trigger/{triggerID}][%d] updateTriggerNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /trigger/{triggerID}][%d] updateTriggerNotFound %s", 404, payload) } func (o *UpdateTriggerNotFound) GetPayload() *models.APIErrorNotFoundExample { @@ -313,11 +320,13 @@ func (o *UpdateTriggerUnprocessableEntity) Code() int { } func (o *UpdateTriggerUnprocessableEntity) Error() string { - return fmt.Sprintf("[PUT /trigger/{triggerID}][%d] updateTriggerUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /trigger/{triggerID}][%d] updateTriggerUnprocessableEntity %s", 422, payload) } func (o *UpdateTriggerUnprocessableEntity) String() string { - return fmt.Sprintf("[PUT /trigger/{triggerID}][%d] updateTriggerUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /trigger/{triggerID}][%d] updateTriggerUnprocessableEntity %s", 422, payload) } func (o *UpdateTriggerUnprocessableEntity) GetPayload() *models.APIErrorRenderExample { @@ -381,11 +390,13 @@ func (o *UpdateTriggerInternalServerError) Code() int { } func (o *UpdateTriggerInternalServerError) Error() string { - return fmt.Sprintf("[PUT /trigger/{triggerID}][%d] updateTriggerInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /trigger/{triggerID}][%d] updateTriggerInternalServerError %s", 500, payload) } func (o *UpdateTriggerInternalServerError) String() string { - return fmt.Sprintf("[PUT /trigger/{triggerID}][%d] updateTriggerInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /trigger/{triggerID}][%d] updateTriggerInternalServerError %s", 500, payload) } func (o *UpdateTriggerInternalServerError) GetPayload() *models.APIErrorInternalServerExample { @@ -449,11 +460,13 @@ func (o *UpdateTriggerServiceUnavailable) Code() int { } func (o *UpdateTriggerServiceUnavailable) Error() string { - return fmt.Sprintf("[PUT /trigger/{triggerID}][%d] updateTriggerServiceUnavailable %+v", 503, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /trigger/{triggerID}][%d] updateTriggerServiceUnavailable %s", 503, payload) } func (o *UpdateTriggerServiceUnavailable) String() string { - return fmt.Sprintf("[PUT /trigger/{triggerID}][%d] updateTriggerServiceUnavailable %+v", 503, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /trigger/{triggerID}][%d] updateTriggerServiceUnavailable %s", 503, payload) } func (o *UpdateTriggerServiceUnavailable) GetPayload() *models.APIErrorRemoteServerUnavailableExample { diff --git a/pkg/client/user/get_user_name_responses.go b/pkg/client/user/get_user_name_responses.go index dc77229..0508bf5 100644 --- a/pkg/client/user/get_user_name_responses.go +++ b/pkg/client/user/get_user_name_responses.go @@ -6,6 +6,7 @@ package user // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -85,11 +86,13 @@ func (o *GetUserNameOK) Code() int { } func (o *GetUserNameOK) Error() string { - return fmt.Sprintf("[GET /user][%d] getUserNameOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /user][%d] getUserNameOK %s", 200, payload) } func (o *GetUserNameOK) String() string { - return fmt.Sprintf("[GET /user][%d] getUserNameOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /user][%d] getUserNameOK %s", 200, payload) } func (o *GetUserNameOK) GetPayload() *models.DtoUser { @@ -153,11 +156,13 @@ func (o *GetUserNameUnprocessableEntity) Code() int { } func (o *GetUserNameUnprocessableEntity) Error() string { - return fmt.Sprintf("[GET /user][%d] getUserNameUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /user][%d] getUserNameUnprocessableEntity %s", 422, payload) } func (o *GetUserNameUnprocessableEntity) String() string { - return fmt.Sprintf("[GET /user][%d] getUserNameUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /user][%d] getUserNameUnprocessableEntity %s", 422, payload) } func (o *GetUserNameUnprocessableEntity) GetPayload() *models.APIErrorRenderExample { diff --git a/pkg/client/user/get_user_settings_responses.go b/pkg/client/user/get_user_settings_responses.go index 10ea7da..0546894 100644 --- a/pkg/client/user/get_user_settings_responses.go +++ b/pkg/client/user/get_user_settings_responses.go @@ -6,6 +6,7 @@ package user // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" @@ -91,11 +92,13 @@ func (o *GetUserSettingsOK) Code() int { } func (o *GetUserSettingsOK) Error() string { - return fmt.Sprintf("[GET /user/settings][%d] getUserSettingsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /user/settings][%d] getUserSettingsOK %s", 200, payload) } func (o *GetUserSettingsOK) String() string { - return fmt.Sprintf("[GET /user/settings][%d] getUserSettingsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /user/settings][%d] getUserSettingsOK %s", 200, payload) } func (o *GetUserSettingsOK) GetPayload() *models.DtoUserSettings { @@ -159,11 +162,13 @@ func (o *GetUserSettingsUnprocessableEntity) Code() int { } func (o *GetUserSettingsUnprocessableEntity) Error() string { - return fmt.Sprintf("[GET /user/settings][%d] getUserSettingsUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /user/settings][%d] getUserSettingsUnprocessableEntity %s", 422, payload) } func (o *GetUserSettingsUnprocessableEntity) String() string { - return fmt.Sprintf("[GET /user/settings][%d] getUserSettingsUnprocessableEntity %+v", 422, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /user/settings][%d] getUserSettingsUnprocessableEntity %s", 422, payload) } func (o *GetUserSettingsUnprocessableEntity) GetPayload() *models.APIErrorRenderExample { @@ -227,11 +232,13 @@ func (o *GetUserSettingsInternalServerError) Code() int { } func (o *GetUserSettingsInternalServerError) Error() string { - return fmt.Sprintf("[GET /user/settings][%d] getUserSettingsInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /user/settings][%d] getUserSettingsInternalServerError %s", 500, payload) } func (o *GetUserSettingsInternalServerError) String() string { - return fmt.Sprintf("[GET /user/settings][%d] getUserSettingsInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /user/settings][%d] getUserSettingsInternalServerError %s", 500, payload) } func (o *GetUserSettingsInternalServerError) GetPayload() *models.APIErrorInternalServerExample { diff --git a/pkg/client/user/user_client.go b/pkg/client/user/user_client.go index 0be3566..0dc0263 100644 --- a/pkg/client/user/user_client.go +++ b/pkg/client/user/user_client.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -17,6 +18,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new user 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 user 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 user API */ @@ -25,7 +51,7 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods