mirror of https://github.com/vernonkeenan/lib
560 lines
20 KiB
Go
560 lines
20 KiB
Go
|
// Code generated by go-swagger; DO NOT EDIT.
|
||
|
|
||
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||
|
// All rights reserved worldwide.
|
||
|
// Proprietary product; unlicensed use is not allowed
|
||
|
|
||
|
package research_projects
|
||
|
|
||
|
// This file was generated by the swagger tool.
|
||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
|
||
|
"github.com/go-openapi/runtime"
|
||
|
"github.com/go-openapi/strfmt"
|
||
|
)
|
||
|
|
||
|
// New creates a new research projects API client.
|
||
|
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
|
||
|
return &Client{transport: transport, formats: formats}
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
Client for research projects API
|
||
|
*/
|
||
|
type Client struct {
|
||
|
transport runtime.ClientTransport
|
||
|
formats strfmt.Registry
|
||
|
}
|
||
|
|
||
|
// ClientOption is the option for Client methods
|
||
|
type ClientOption func(*runtime.ClientOperation)
|
||
|
|
||
|
// ClientService is the interface for Client methods
|
||
|
type ClientService interface {
|
||
|
GetResearchProjectCompanies(params *GetResearchProjectCompaniesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectCompaniesOK, error)
|
||
|
|
||
|
GetResearchProjectProducts(params *GetResearchProjectProductsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectProductsOK, error)
|
||
|
|
||
|
GetResearchProjectTopics(params *GetResearchProjectTopicsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectTopicsOK, error)
|
||
|
|
||
|
GetResearchProjects(params *GetResearchProjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectsOK, error)
|
||
|
|
||
|
PostResearchProjectCompanies(params *PostResearchProjectCompaniesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectCompaniesOK, error)
|
||
|
|
||
|
PostResearchProjectProducts(params *PostResearchProjectProductsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectProductsOK, error)
|
||
|
|
||
|
PostResearchProjectTopics(params *PostResearchProjectTopicsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectTopicsOK, error)
|
||
|
|
||
|
PostResearchProjects(params *PostResearchProjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectsOK, error)
|
||
|
|
||
|
PutResearchProjectCompanies(params *PutResearchProjectCompaniesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutResearchProjectCompaniesOK, error)
|
||
|
|
||
|
PutResearchProjectProducts(params *PutResearchProjectProductsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutResearchProjectProductsOK, error)
|
||
|
|
||
|
PutResearchProjectTopics(params *PutResearchProjectTopicsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutResearchProjectTopicsOK, error)
|
||
|
|
||
|
PutResearchProjects(params *PutResearchProjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutResearchProjectsOK, error)
|
||
|
|
||
|
SetTransport(transport runtime.ClientTransport)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
GetResearchProjectCompanies gets a list of research project companies
|
||
|
|
||
|
Return a list of ResearchProjectCompany records from the datastore
|
||
|
*/
|
||
|
func (a *Client) GetResearchProjectCompanies(params *GetResearchProjectCompaniesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectCompaniesOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewGetResearchProjectCompaniesParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "getResearchProjectCompanies",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/researchprojectcompanies",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json"},
|
||
|
Schemes: []string{"http"},
|
||
|
Params: params,
|
||
|
Reader: &GetResearchProjectCompaniesReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*GetResearchProjectCompaniesOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for getResearchProjectCompanies: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
GetResearchProjectProducts gets a list of research project products
|
||
|
|
||
|
Return a list of ResearchProjectProduct records from the datastore
|
||
|
*/
|
||
|
func (a *Client) GetResearchProjectProducts(params *GetResearchProjectProductsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectProductsOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewGetResearchProjectProductsParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "getResearchProjectProducts",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/researchprojectproducts",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json"},
|
||
|
Schemes: []string{"http"},
|
||
|
Params: params,
|
||
|
Reader: &GetResearchProjectProductsReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*GetResearchProjectProductsOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for getResearchProjectProducts: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
GetResearchProjectTopics gets a list of research project topics
|
||
|
|
||
|
Return a list of ResearchProjectTopic records from the datastore
|
||
|
*/
|
||
|
func (a *Client) GetResearchProjectTopics(params *GetResearchProjectTopicsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectTopicsOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewGetResearchProjectTopicsParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "getResearchProjectTopics",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/researchprojecttopics",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json"},
|
||
|
Schemes: []string{"http"},
|
||
|
Params: params,
|
||
|
Reader: &GetResearchProjectTopicsReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*GetResearchProjectTopicsOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for getResearchProjectTopics: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
GetResearchProjects gets a list of research projects
|
||
|
|
||
|
Return a list of ResearchProject records from the datastore
|
||
|
*/
|
||
|
func (a *Client) GetResearchProjects(params *GetResearchProjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectsOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewGetResearchProjectsParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "getResearchProjects",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/researchprojects",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json"},
|
||
|
Schemes: []string{"http"},
|
||
|
Params: params,
|
||
|
Reader: &GetResearchProjectsReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*GetResearchProjectsOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for getResearchProjects: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
PostResearchProjectCompanies creates new research project companies
|
||
|
|
||
|
Create ResearchProjectCompanies in the system
|
||
|
*/
|
||
|
func (a *Client) PostResearchProjectCompanies(params *PostResearchProjectCompaniesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectCompaniesOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewPostResearchProjectCompaniesParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "postResearchProjectCompanies",
|
||
|
Method: "POST",
|
||
|
PathPattern: "/researchprojectcompanies",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json"},
|
||
|
Schemes: []string{"http"},
|
||
|
Params: params,
|
||
|
Reader: &PostResearchProjectCompaniesReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*PostResearchProjectCompaniesOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for postResearchProjectCompanies: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
PostResearchProjectProducts creates new research project products
|
||
|
|
||
|
Create ResearchProjectProducts in the system
|
||
|
*/
|
||
|
func (a *Client) PostResearchProjectProducts(params *PostResearchProjectProductsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectProductsOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewPostResearchProjectProductsParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "postResearchProjectProducts",
|
||
|
Method: "POST",
|
||
|
PathPattern: "/researchprojectproducts",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json"},
|
||
|
Schemes: []string{"http"},
|
||
|
Params: params,
|
||
|
Reader: &PostResearchProjectProductsReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*PostResearchProjectProductsOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for postResearchProjectProducts: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
PostResearchProjectTopics creates new research project topics
|
||
|
|
||
|
Create ResearchProjectTopics in the system
|
||
|
*/
|
||
|
func (a *Client) PostResearchProjectTopics(params *PostResearchProjectTopicsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectTopicsOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewPostResearchProjectTopicsParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "postResearchProjectTopics",
|
||
|
Method: "POST",
|
||
|
PathPattern: "/researchprojecttopics",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json"},
|
||
|
Schemes: []string{"http"},
|
||
|
Params: params,
|
||
|
Reader: &PostResearchProjectTopicsReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*PostResearchProjectTopicsOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for postResearchProjectTopics: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
PostResearchProjects creates new research projects
|
||
|
|
||
|
Create ResearchProjects in the system
|
||
|
*/
|
||
|
func (a *Client) PostResearchProjects(params *PostResearchProjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectsOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewPostResearchProjectsParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "postResearchProjects",
|
||
|
Method: "POST",
|
||
|
PathPattern: "/researchprojects",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json"},
|
||
|
Schemes: []string{"http"},
|
||
|
Params: params,
|
||
|
Reader: &PostResearchProjectsReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*PostResearchProjectsOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for postResearchProjects: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
PutResearchProjectCompanies updates research project companies
|
||
|
|
||
|
Update ResearchProjectCompany in the system
|
||
|
*/
|
||
|
func (a *Client) PutResearchProjectCompanies(params *PutResearchProjectCompaniesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutResearchProjectCompaniesOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewPutResearchProjectCompaniesParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "putResearchProjectCompanies",
|
||
|
Method: "PUT",
|
||
|
PathPattern: "/researchprojectcompanies",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json"},
|
||
|
Schemes: []string{"http"},
|
||
|
Params: params,
|
||
|
Reader: &PutResearchProjectCompaniesReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*PutResearchProjectCompaniesOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for putResearchProjectCompanies: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
PutResearchProjectProducts updates research project products
|
||
|
|
||
|
Update ResearchProjectProduct in the system
|
||
|
*/
|
||
|
func (a *Client) PutResearchProjectProducts(params *PutResearchProjectProductsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutResearchProjectProductsOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewPutResearchProjectProductsParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "putResearchProjectProducts",
|
||
|
Method: "PUT",
|
||
|
PathPattern: "/researchprojectproducts",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json"},
|
||
|
Schemes: []string{"http"},
|
||
|
Params: params,
|
||
|
Reader: &PutResearchProjectProductsReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*PutResearchProjectProductsOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for putResearchProjectProducts: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
PutResearchProjectTopics updates research project topics
|
||
|
|
||
|
Update ResearchProjectTopic in the system
|
||
|
*/
|
||
|
func (a *Client) PutResearchProjectTopics(params *PutResearchProjectTopicsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutResearchProjectTopicsOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewPutResearchProjectTopicsParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "putResearchProjectTopics",
|
||
|
Method: "PUT",
|
||
|
PathPattern: "/researchprojecttopics",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json"},
|
||
|
Schemes: []string{"http"},
|
||
|
Params: params,
|
||
|
Reader: &PutResearchProjectTopicsReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*PutResearchProjectTopicsOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for putResearchProjectTopics: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
PutResearchProjects updates research projects
|
||
|
|
||
|
Update ResearchProject in the system
|
||
|
*/
|
||
|
func (a *Client) PutResearchProjects(params *PutResearchProjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutResearchProjectsOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewPutResearchProjectsParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "putResearchProjects",
|
||
|
Method: "PUT",
|
||
|
PathPattern: "/researchprojects",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json"},
|
||
|
Schemes: []string{"http"},
|
||
|
Params: params,
|
||
|
Reader: &PutResearchProjectsReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*PutResearchProjectsOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for putResearchProjects: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
// SetTransport changes the transport on the client
|
||
|
func (a *Client) SetTransport(transport runtime.ClientTransport) {
|
||
|
a.transport = transport
|
||
|
}
|