2023-05-13 16:46:48 +00:00
// 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 )
2023-05-29 15:13:02 +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 )
2023-05-28 16:22:37 +00:00
GetResearchProjectServices ( params * GetResearchProjectServicesParams , authInfo runtime . ClientAuthInfoWriter , opts ... ClientOption ) ( * GetResearchProjectServicesOK , error )
2023-05-13 16:46:48 +00:00
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 )
2023-05-29 15:13:02 +00:00
PostResearchProjectDocuments ( params * PostResearchProjectDocumentsParams , authInfo runtime . ClientAuthInfoWriter , opts ... ClientOption ) ( * PostResearchProjectDocumentsOK , * PostResearchProjectDocumentsCreated , error )
2023-05-13 16:46:48 +00:00
PostResearchProjectProducts ( params * PostResearchProjectProductsParams , authInfo runtime . ClientAuthInfoWriter , opts ... ClientOption ) ( * PostResearchProjectProductsOK , error )
2023-05-28 16:22:37 +00:00
PostResearchProjectServices ( params * PostResearchProjectServicesParams , authInfo runtime . ClientAuthInfoWriter , opts ... ClientOption ) ( * PostResearchProjectServicesOK , * PostResearchProjectServicesCreated , error )
2023-05-13 16:46:48 +00:00
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 )
2023-05-29 15:13:02 +00:00
PutResearchProjectDocuments ( params * PutResearchProjectDocumentsParams , authInfo runtime . ClientAuthInfoWriter , opts ... ClientOption ) ( * PutResearchProjectDocumentsOK , * PutResearchProjectDocumentsCreated , 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 )
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 )
}
2023-05-29 15:13:02 +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" ,
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 )
}
2023-05-28 16:22:37 +00:00
/ *
GetResearchProjectServices gets a list of research project services
Return a list of ResearchProjectService records from the datastore
* /
func ( a * Client ) GetResearchProjectServices ( params * GetResearchProjectServicesParams , authInfo runtime . ClientAuthInfoWriter , opts ... ClientOption ) ( * GetResearchProjectServicesOK , error ) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetResearchProjectServicesParams ( )
}
op := & runtime . ClientOperation {
ID : "getResearchProjectServices" ,
Method : "GET" ,
PathPattern : "/researchprojectservices" ,
ProducesMediaTypes : [ ] string { "application/json" } ,
ConsumesMediaTypes : [ ] string { "application/json" } ,
Schemes : [ ] string { "http" } ,
Params : params ,
Reader : & GetResearchProjectServicesReader { 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 . ( * GetResearchProjectServicesOK )
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 getResearchProjectServices: 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
/ *
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 )
}
2023-05-29 15:13:02 +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 , * PostResearchProjectDocumentsCreated , 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 , nil , err
}
switch value := result . ( type ) {
case * PostResearchProjectDocumentsOK :
return value , nil , nil
case * PostResearchProjectDocumentsCreated :
return nil , value , nil
}
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
msg := fmt . Sprintf ( "unexpected success response for research_projects: 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 )
}
2023-05-28 16:22:37 +00:00
/ *
PostResearchProjectServices creates new research project services
Create ResearchProjectServices in the system
* /
func ( a * Client ) PostResearchProjectServices ( params * PostResearchProjectServicesParams , authInfo runtime . ClientAuthInfoWriter , opts ... ClientOption ) ( * PostResearchProjectServicesOK , * PostResearchProjectServicesCreated , error ) {
// TODO: Validate the params before sending
if params == nil {
params = NewPostResearchProjectServicesParams ( )
}
op := & runtime . ClientOperation {
ID : "postResearchProjectServices" ,
Method : "POST" ,
PathPattern : "/researchprojectservices" ,
ProducesMediaTypes : [ ] string { "application/json" } ,
ConsumesMediaTypes : [ ] string { "application/json" } ,
Schemes : [ ] string { "http" } ,
Params : params ,
Reader : & PostResearchProjectServicesReader { formats : a . formats } ,
AuthInfo : authInfo ,
Context : params . Context ,
Client : params . HTTPClient ,
}
for _ , opt := range opts {
opt ( op )
}
result , err := a . transport . Submit ( op )
if err != nil {
return nil , nil , err
}
switch value := result . ( type ) {
case * PostResearchProjectServicesOK :
return value , nil , nil
case * PostResearchProjectServicesCreated :
return nil , value , nil
}
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
msg := fmt . Sprintf ( "unexpected success response for research_projects: 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
/ *
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 )
}
2023-05-29 15:13:02 +00:00
/ *
PutResearchProjectDocuments updates research project documents
Update ResearchProjectDocument in the system
* /
func ( a * Client ) PutResearchProjectDocuments ( params * PutResearchProjectDocumentsParams , authInfo runtime . ClientAuthInfoWriter , opts ... ClientOption ) ( * PutResearchProjectDocumentsOK , * PutResearchProjectDocumentsCreated , 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 , nil , err
}
switch value := result . ( type ) {
case * PutResearchProjectDocumentsOK :
return value , nil , nil
case * PutResearchProjectDocumentsCreated :
return nil , value , nil
}
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
msg := fmt . Sprintf ( "unexpected success response for research_projects: 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
* /
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
}