lib/api/members/members_client/research_projects/research_projects_client.go

689 lines
26 KiB
Go
Raw Normal View History

2021-07-31 03:05:02 +00:00
// Code generated by go-swagger; DO NOT EDIT.
2021-08-05 19:37:53 +00:00
// (c) 2012-2020 by Taxnexus, Inc.
2021-07-31 03:05:02 +00:00
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
2023-04-07 18:00:15 +00:00
package research_projects
2021-07-31 03:05:02 +00:00
// 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"
)
2023-04-07 18:00:15 +00:00
// New creates a new research projects API client.
2021-07-31 03:05:02 +00:00
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
return &Client{transport: transport, formats: formats}
}
/*
2023-04-07 18:00:15 +00:00
Client for research projects API
2021-07-31 03:05:02 +00:00
*/
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 {
2023-05-13 16:46:48 +00:00
GetResearchProjectCompanies(params *GetResearchProjectCompaniesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectCompaniesOK, error)
2023-05-19 23:55:12 +00:00
GetResearchProjectDocuments(params *GetResearchProjectDocumentsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectDocumentsOK, error)
2023-05-13 16:46:48 +00:00
GetResearchProjectProducts(params *GetResearchProjectProductsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectProductsOK, error)
GetResearchProjectTopics(params *GetResearchProjectTopicsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectTopicsOK, error)
2021-07-31 03:05:02 +00:00
2023-04-30 02:07:31 +00:00
GetResearchProjects(params *GetResearchProjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectsOK, error)
2021-07-31 03:05:02 +00:00
2023-05-13 16:46:48 +00:00
PostResearchProjectCompanies(params *PostResearchProjectCompaniesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectCompaniesOK, error)
2023-05-19 23:55:12 +00:00
PostResearchProjectDocuments(params *PostResearchProjectDocumentsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectDocumentsOK, error)
2023-05-13 16:46:48 +00:00
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)
2021-07-31 03:05:02 +00:00
2023-05-13 16:46:48 +00:00
PutResearchProjectCompanies(params *PutResearchProjectCompaniesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutResearchProjectCompaniesOK, error)
2023-05-19 23:55:12 +00:00
PutResearchProjectDocuments(params *PutResearchProjectDocumentsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutResearchProjectDocumentsOK, error)
2023-05-13 16:46:48 +00:00
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)
2021-07-31 03:05:02 +00:00
SetTransport(transport runtime.ClientTransport)
}
/*
2023-05-13 16:46:48 +00:00
GetResearchProjectCompanies gets a list of research project companies
Return a list of ResearchProjectCompany records from the datastore
2021-07-31 03:05:02 +00:00
*/
2023-05-13 16:46:48 +00:00
func (a *Client) GetResearchProjectCompanies(params *GetResearchProjectCompaniesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectCompaniesOK, error) {
2021-07-31 03:05:02 +00:00
// TODO: Validate the params before sending
if params == nil {
2023-05-13 16:46:48 +00:00
params = NewGetResearchProjectCompaniesParams()
2021-07-31 03:05:02 +00:00
}
op := &runtime.ClientOperation{
2023-05-13 16:46:48 +00:00
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)
}
2023-05-19 23:55:12 +00:00
/*
GetResearchProjectDocuments gets a list of research project documents
Return a list of ResearchProjectDocument records from the datastore
*/
func (a *Client) GetResearchProjectDocuments(params *GetResearchProjectDocumentsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectDocumentsOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetResearchProjectDocumentsParams()
}
op := &runtime.ClientOperation{
ID: "getResearchProjectDocuments",
Method: "GET",
PathPattern: "/researchprojectdocuments",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
Reader: &GetResearchProjectDocumentsReader{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.(*GetResearchProjectDocumentsOK)
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 getResearchProjectDocuments: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
2023-05-13 16:46:48 +00:00
/*
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",
2021-07-31 03:05:02 +00:00
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
2023-05-13 16:46:48 +00:00
Reader: &GetResearchProjectProductsReader{formats: a.formats},
2023-04-30 02:07:31 +00:00
AuthInfo: authInfo,
2021-07-31 03:05:02 +00:00
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
if err != nil {
return nil, err
}
2023-05-13 16:46:48 +00:00
success, ok := result.(*GetResearchProjectProductsOK)
2021-07-31 03:05:02 +00:00
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
2023-05-13 16:46:48 +00:00
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)
2021-07-31 03:05:02 +00:00
panic(msg)
}
/*
2023-04-30 02:07:31 +00:00
GetResearchProjects gets a list of research projects
2023-05-13 16:46:48 +00:00
Return a list of ResearchProject records from the datastore
2021-07-31 03:05:02 +00:00
*/
2023-04-30 02:07:31 +00:00
func (a *Client) GetResearchProjects(params *GetResearchProjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectsOK, error) {
2021-07-31 03:05:02 +00:00
// TODO: Validate the params before sending
if params == nil {
2023-04-30 02:07:31 +00:00
params = NewGetResearchProjectsParams()
2021-07-31 03:05:02 +00:00
}
op := &runtime.ClientOperation{
2023-04-30 02:07:31 +00:00
ID: "getResearchProjects",
Method: "GET",
2023-04-07 18:00:15 +00:00
PathPattern: "/researchprojects",
2021-07-31 03:05:02 +00:00
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
2023-04-30 02:07:31 +00:00
Reader: &GetResearchProjectsReader{formats: a.formats},
AuthInfo: authInfo,
2021-07-31 03:05:02 +00:00
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
if err != nil {
return nil, err
}
2023-04-30 02:07:31 +00:00
success, ok := result.(*GetResearchProjectsOK)
2021-07-31 03:05:02 +00:00
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
2023-04-30 02:07:31 +00:00
msg := fmt.Sprintf("unexpected success response for getResearchProjects: API contract not enforced by server. Client expected to get an error, but got: %T", result)
2021-07-31 03:05:02 +00:00
panic(msg)
}
/*
2023-05-13 16:46:48 +00:00
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)
}
2023-05-19 23:55:12 +00:00
/*
PostResearchProjectDocuments creates new research project documents
Create ResearchProjectDocuments in the system
*/
func (a *Client) PostResearchProjectDocuments(params *PostResearchProjectDocumentsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectDocumentsOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewPostResearchProjectDocumentsParams()
}
op := &runtime.ClientOperation{
ID: "postResearchProjectDocuments",
Method: "POST",
PathPattern: "/researchprojectdocuments",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
Reader: &PostResearchProjectDocumentsReader{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.(*PostResearchProjectDocumentsOK)
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 postResearchProjectDocuments: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
2023-05-13 16:46:48 +00:00
/*
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
2021-07-31 03:05:02 +00:00
*/
2023-05-13 16:46:48 +00:00
func (a *Client) PostResearchProjects(params *PostResearchProjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectsOK, error) {
2021-07-31 03:05:02 +00:00
// TODO: Validate the params before sending
if params == nil {
2023-05-13 16:46:48 +00:00
params = NewPostResearchProjectsParams()
2021-07-31 03:05:02 +00:00
}
op := &runtime.ClientOperation{
2023-05-13 16:46:48 +00:00
ID: "postResearchProjects",
2023-04-30 02:07:31 +00:00
Method: "POST",
2023-04-07 18:00:15 +00:00
PathPattern: "/researchprojects",
2021-07-31 03:05:02 +00:00
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
2023-05-13 16:46:48 +00:00
Reader: &PostResearchProjectsReader{formats: a.formats},
2023-04-30 02:07:31 +00:00
AuthInfo: authInfo,
2021-07-31 03:05:02 +00:00
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
if err != nil {
return nil, err
}
2023-05-13 16:46:48 +00:00
success, ok := result.(*PostResearchProjectsOK)
2021-07-31 03:05:02 +00:00
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
2023-05-13 16:46:48 +00:00
msg := fmt.Sprintf("unexpected success response for postResearchProjects: API contract not enforced by server. Client expected to get an error, but got: %T", result)
2021-07-31 03:05:02 +00:00
panic(msg)
}
/*
2023-05-13 16:46:48 +00:00
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)
}
2023-05-19 23:55:12 +00:00
/*
PutResearchProjectDocuments updates research project documents
Update ResearchProjectDocument in the system
*/
func (a *Client) PutResearchProjectDocuments(params *PutResearchProjectDocumentsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutResearchProjectDocumentsOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewPutResearchProjectDocumentsParams()
}
op := &runtime.ClientOperation{
ID: "putResearchProjectDocuments",
Method: "PUT",
PathPattern: "/researchprojectdocuments",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
Reader: &PutResearchProjectDocumentsReader{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.(*PutResearchProjectDocumentsOK)
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 putResearchProjectDocuments: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
2023-05-13 16:46:48 +00:00
/*
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
2021-07-31 03:05:02 +00:00
*/
2023-05-13 16:46:48 +00:00
func (a *Client) PutResearchProjects(params *PutResearchProjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutResearchProjectsOK, error) {
2021-07-31 03:05:02 +00:00
// TODO: Validate the params before sending
if params == nil {
2023-05-13 16:46:48 +00:00
params = NewPutResearchProjectsParams()
2021-07-31 03:05:02 +00:00
}
op := &runtime.ClientOperation{
2023-05-13 16:46:48 +00:00
ID: "putResearchProjects",
2023-04-07 18:00:15 +00:00
Method: "PUT",
PathPattern: "/researchprojects",
2021-07-31 03:05:02 +00:00
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
2023-05-13 16:46:48 +00:00
Reader: &PutResearchProjectsReader{formats: a.formats},
2023-04-30 02:07:31 +00:00
AuthInfo: authInfo,
2021-07-31 03:05:02 +00:00
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
if err != nil {
return nil, err
}
2023-05-13 16:46:48 +00:00
success, ok := result.(*PutResearchProjectsOK)
2021-07-31 03:05:02 +00:00
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
2023-05-13 16:46:48 +00:00
msg := fmt.Sprintf("unexpected success response for putResearchProjects: API contract not enforced by server. Client expected to get an error, but got: %T", result)
2021-07-31 03:05:02 +00:00
panic(msg)
}
// SetTransport changes the transport on the client
func (a *Client) SetTransport(transport runtime.ClientTransport) {
a.transport = transport
}