1 // Package publishserviceapi provides primitives to interact with the openapi HTTP API.
3 // Code generated by github.com/deepmap/oapi-codegen version v1.10.1 DO NOT EDIT.
4 package publishserviceapi
17 "github.com/deepmap/oapi-codegen/pkg/runtime"
20 // RequestEditorFn is the function signature for the RequestEditor callback function
21 type RequestEditorFn func(ctx context.Context, req *http.Request) error
23 // Doer performs HTTP requests.
25 // The standard http.Client implements this interface.
26 type HttpRequestDoer interface {
27 Do(req *http.Request) (*http.Response, error)
30 // Client which conforms to the OpenAPI3 specification for this service.
32 // The endpoint of the server conforming to this interface, with scheme,
33 // https://api.deepmap.com for example. This can contain a path relative
34 // to the server, such as https://api.deepmap.com/dev-test, and all the
35 // paths in the swagger spec will be appended to the server.
38 // Doer for performing requests, typically a *http.Client with any
39 // customized settings, such as certificate chains.
40 Client HttpRequestDoer
42 // A list of callbacks for modifying requests which are generated before sending over
44 RequestEditors []RequestEditorFn
47 // ClientOption allows setting custom parameters during construction
48 type ClientOption func(*Client) error
50 // Creates a new Client, with reasonable defaults
51 func NewClient(server string, opts ...ClientOption) (*Client, error) {
52 // create a client with sane default values
56 // mutate client and add all optional params
57 for _, o := range opts {
58 if err := o(&client); err != nil {
62 // ensure the server URL always has a trailing slash
63 if !strings.HasSuffix(client.Server, "/") {
66 // create httpClient, if not already present
67 if client.Client == nil {
68 client.Client = &http.Client{}
73 // WithHTTPClient allows overriding the default Doer, which is
74 // automatically created using http.Client. This is useful for tests.
75 func WithHTTPClient(doer HttpRequestDoer) ClientOption {
76 return func(c *Client) error {
82 // WithRequestEditorFn allows setting up a callback function, which will be
83 // called right before sending the request. This can be used to mutate the request.
84 func WithRequestEditorFn(fn RequestEditorFn) ClientOption {
85 return func(c *Client) error {
86 c.RequestEditors = append(c.RequestEditors, fn)
91 // The interface specification for the client above.
92 type ClientInterface interface {
93 // GetApfIdServiceApis request
94 GetApfIdServiceApis(ctx context.Context, apfId string, reqEditors ...RequestEditorFn) (*http.Response, error)
96 // PostApfIdServiceApis request with any body
97 PostApfIdServiceApisWithBody(ctx context.Context, apfId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
99 PostApfIdServiceApis(ctx context.Context, apfId string, body PostApfIdServiceApisJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
101 // DeleteApfIdServiceApisServiceApiId request
102 DeleteApfIdServiceApisServiceApiId(ctx context.Context, apfId string, serviceApiId string, reqEditors ...RequestEditorFn) (*http.Response, error)
104 // GetApfIdServiceApisServiceApiId request
105 GetApfIdServiceApisServiceApiId(ctx context.Context, apfId string, serviceApiId string, reqEditors ...RequestEditorFn) (*http.Response, error)
107 // ModifyIndAPFPubAPI request with any body
108 ModifyIndAPFPubAPIWithBody(ctx context.Context, apfId string, serviceApiId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
110 // PutApfIdServiceApisServiceApiId request with any body
111 PutApfIdServiceApisServiceApiIdWithBody(ctx context.Context, apfId string, serviceApiId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
113 PutApfIdServiceApisServiceApiId(ctx context.Context, apfId string, serviceApiId string, body PutApfIdServiceApisServiceApiIdJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
116 func (c *Client) GetApfIdServiceApis(ctx context.Context, apfId string, reqEditors ...RequestEditorFn) (*http.Response, error) {
117 req, err := NewGetApfIdServiceApisRequest(c.Server, apfId)
121 req = req.WithContext(ctx)
122 if err := c.applyEditors(ctx, req, reqEditors); err != nil {
125 return c.Client.Do(req)
128 func (c *Client) PostApfIdServiceApisWithBody(ctx context.Context, apfId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
129 req, err := NewPostApfIdServiceApisRequestWithBody(c.Server, apfId, contentType, body)
133 req = req.WithContext(ctx)
134 if err := c.applyEditors(ctx, req, reqEditors); err != nil {
137 return c.Client.Do(req)
140 func (c *Client) PostApfIdServiceApis(ctx context.Context, apfId string, body PostApfIdServiceApisJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
141 req, err := NewPostApfIdServiceApisRequest(c.Server, apfId, body)
145 req = req.WithContext(ctx)
146 if err := c.applyEditors(ctx, req, reqEditors); err != nil {
149 return c.Client.Do(req)
152 func (c *Client) DeleteApfIdServiceApisServiceApiId(ctx context.Context, apfId string, serviceApiId string, reqEditors ...RequestEditorFn) (*http.Response, error) {
153 req, err := NewDeleteApfIdServiceApisServiceApiIdRequest(c.Server, apfId, serviceApiId)
157 req = req.WithContext(ctx)
158 if err := c.applyEditors(ctx, req, reqEditors); err != nil {
161 return c.Client.Do(req)
164 func (c *Client) GetApfIdServiceApisServiceApiId(ctx context.Context, apfId string, serviceApiId string, reqEditors ...RequestEditorFn) (*http.Response, error) {
165 req, err := NewGetApfIdServiceApisServiceApiIdRequest(c.Server, apfId, serviceApiId)
169 req = req.WithContext(ctx)
170 if err := c.applyEditors(ctx, req, reqEditors); err != nil {
173 return c.Client.Do(req)
176 func (c *Client) ModifyIndAPFPubAPIWithBody(ctx context.Context, apfId string, serviceApiId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
177 req, err := NewModifyIndAPFPubAPIRequestWithBody(c.Server, apfId, serviceApiId, contentType, body)
181 req = req.WithContext(ctx)
182 if err := c.applyEditors(ctx, req, reqEditors); err != nil {
185 return c.Client.Do(req)
188 func (c *Client) PutApfIdServiceApisServiceApiIdWithBody(ctx context.Context, apfId string, serviceApiId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
189 req, err := NewPutApfIdServiceApisServiceApiIdRequestWithBody(c.Server, apfId, serviceApiId, contentType, body)
193 req = req.WithContext(ctx)
194 if err := c.applyEditors(ctx, req, reqEditors); err != nil {
197 return c.Client.Do(req)
200 func (c *Client) PutApfIdServiceApisServiceApiId(ctx context.Context, apfId string, serviceApiId string, body PutApfIdServiceApisServiceApiIdJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
201 req, err := NewPutApfIdServiceApisServiceApiIdRequest(c.Server, apfId, serviceApiId, body)
205 req = req.WithContext(ctx)
206 if err := c.applyEditors(ctx, req, reqEditors); err != nil {
209 return c.Client.Do(req)
212 // NewGetApfIdServiceApisRequest generates requests for GetApfIdServiceApis
213 func NewGetApfIdServiceApisRequest(server string, apfId string) (*http.Request, error) {
216 var pathParam0 string
218 pathParam0, err = runtime.StyleParamWithLocation("simple", false, "apfId", runtime.ParamLocationPath, apfId)
223 serverURL, err := url.Parse(server)
228 operationPath := fmt.Sprintf("/%s/service-apis", pathParam0)
229 if operationPath[0] == '/' {
230 operationPath = "." + operationPath
233 queryURL, err := serverURL.Parse(operationPath)
238 req, err := http.NewRequest("GET", queryURL.String(), nil)
246 // NewPostApfIdServiceApisRequest calls the generic PostApfIdServiceApis builder with application/json body
247 func NewPostApfIdServiceApisRequest(server string, apfId string, body PostApfIdServiceApisJSONRequestBody) (*http.Request, error) {
248 var bodyReader io.Reader
249 buf, err := json.Marshal(body)
253 bodyReader = bytes.NewReader(buf)
254 return NewPostApfIdServiceApisRequestWithBody(server, apfId, "application/json", bodyReader)
257 // NewPostApfIdServiceApisRequestWithBody generates requests for PostApfIdServiceApis with any type of body
258 func NewPostApfIdServiceApisRequestWithBody(server string, apfId string, contentType string, body io.Reader) (*http.Request, error) {
261 var pathParam0 string
263 pathParam0, err = runtime.StyleParamWithLocation("simple", false, "apfId", runtime.ParamLocationPath, apfId)
268 serverURL, err := url.Parse(server)
273 operationPath := fmt.Sprintf("/%s/service-apis", pathParam0)
274 if operationPath[0] == '/' {
275 operationPath = "." + operationPath
278 queryURL, err := serverURL.Parse(operationPath)
283 req, err := http.NewRequest("POST", queryURL.String(), body)
288 req.Header.Add("Content-Type", contentType)
293 // NewDeleteApfIdServiceApisServiceApiIdRequest generates requests for DeleteApfIdServiceApisServiceApiId
294 func NewDeleteApfIdServiceApisServiceApiIdRequest(server string, apfId string, serviceApiId string) (*http.Request, error) {
297 var pathParam0 string
299 pathParam0, err = runtime.StyleParamWithLocation("simple", false, "apfId", runtime.ParamLocationPath, apfId)
304 var pathParam1 string
306 pathParam1, err = runtime.StyleParamWithLocation("simple", false, "serviceApiId", runtime.ParamLocationPath, serviceApiId)
311 serverURL, err := url.Parse(server)
316 operationPath := fmt.Sprintf("/%s/service-apis/%s", pathParam0, pathParam1)
317 if operationPath[0] == '/' {
318 operationPath = "." + operationPath
321 queryURL, err := serverURL.Parse(operationPath)
326 req, err := http.NewRequest("DELETE", queryURL.String(), nil)
334 // NewGetApfIdServiceApisServiceApiIdRequest generates requests for GetApfIdServiceApisServiceApiId
335 func NewGetApfIdServiceApisServiceApiIdRequest(server string, apfId string, serviceApiId string) (*http.Request, error) {
338 var pathParam0 string
340 pathParam0, err = runtime.StyleParamWithLocation("simple", false, "apfId", runtime.ParamLocationPath, apfId)
345 var pathParam1 string
347 pathParam1, err = runtime.StyleParamWithLocation("simple", false, "serviceApiId", runtime.ParamLocationPath, serviceApiId)
352 serverURL, err := url.Parse(server)
357 operationPath := fmt.Sprintf("/%s/service-apis/%s", pathParam0, pathParam1)
358 if operationPath[0] == '/' {
359 operationPath = "." + operationPath
362 queryURL, err := serverURL.Parse(operationPath)
367 req, err := http.NewRequest("GET", queryURL.String(), nil)
375 // NewModifyIndAPFPubAPIRequestWithBody generates requests for ModifyIndAPFPubAPI with any type of body
376 func NewModifyIndAPFPubAPIRequestWithBody(server string, apfId string, serviceApiId string, contentType string, body io.Reader) (*http.Request, error) {
379 var pathParam0 string
381 pathParam0, err = runtime.StyleParamWithLocation("simple", false, "apfId", runtime.ParamLocationPath, apfId)
386 var pathParam1 string
388 pathParam1, err = runtime.StyleParamWithLocation("simple", false, "serviceApiId", runtime.ParamLocationPath, serviceApiId)
393 serverURL, err := url.Parse(server)
398 operationPath := fmt.Sprintf("/%s/service-apis/%s", pathParam0, pathParam1)
399 if operationPath[0] == '/' {
400 operationPath = "." + operationPath
403 queryURL, err := serverURL.Parse(operationPath)
408 req, err := http.NewRequest("PATCH", queryURL.String(), body)
413 req.Header.Add("Content-Type", contentType)
418 // NewPutApfIdServiceApisServiceApiIdRequest calls the generic PutApfIdServiceApisServiceApiId builder with application/json body
419 func NewPutApfIdServiceApisServiceApiIdRequest(server string, apfId string, serviceApiId string, body PutApfIdServiceApisServiceApiIdJSONRequestBody) (*http.Request, error) {
420 var bodyReader io.Reader
421 buf, err := json.Marshal(body)
425 bodyReader = bytes.NewReader(buf)
426 return NewPutApfIdServiceApisServiceApiIdRequestWithBody(server, apfId, serviceApiId, "application/json", bodyReader)
429 // NewPutApfIdServiceApisServiceApiIdRequestWithBody generates requests for PutApfIdServiceApisServiceApiId with any type of body
430 func NewPutApfIdServiceApisServiceApiIdRequestWithBody(server string, apfId string, serviceApiId string, contentType string, body io.Reader) (*http.Request, error) {
433 var pathParam0 string
435 pathParam0, err = runtime.StyleParamWithLocation("simple", false, "apfId", runtime.ParamLocationPath, apfId)
440 var pathParam1 string
442 pathParam1, err = runtime.StyleParamWithLocation("simple", false, "serviceApiId", runtime.ParamLocationPath, serviceApiId)
447 serverURL, err := url.Parse(server)
452 operationPath := fmt.Sprintf("/%s/service-apis/%s", pathParam0, pathParam1)
453 if operationPath[0] == '/' {
454 operationPath = "." + operationPath
457 queryURL, err := serverURL.Parse(operationPath)
462 req, err := http.NewRequest("PUT", queryURL.String(), body)
467 req.Header.Add("Content-Type", contentType)
472 func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error {
473 for _, r := range c.RequestEditors {
474 if err := r(ctx, req); err != nil {
478 for _, r := range additionalEditors {
479 if err := r(ctx, req); err != nil {
486 // ClientWithResponses builds on ClientInterface to offer response payloads
487 type ClientWithResponses struct {
491 // NewClientWithResponses creates a new ClientWithResponses, which wraps
492 // Client with return type handling
493 func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) {
494 client, err := NewClient(server, opts...)
498 return &ClientWithResponses{client}, nil
501 // WithBaseURL overrides the baseURL.
502 func WithBaseURL(baseURL string) ClientOption {
503 return func(c *Client) error {
504 newBaseURL, err := url.Parse(baseURL)
508 c.Server = newBaseURL.String()
513 // ClientWithResponsesInterface is the interface specification for the client with responses above.
514 type ClientWithResponsesInterface interface {
515 // GetApfIdServiceApis request
516 GetApfIdServiceApisWithResponse(ctx context.Context, apfId string, reqEditors ...RequestEditorFn) (*GetApfIdServiceApisResponse, error)
518 // PostApfIdServiceApis request with any body
519 PostApfIdServiceApisWithBodyWithResponse(ctx context.Context, apfId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApfIdServiceApisResponse, error)
521 PostApfIdServiceApisWithResponse(ctx context.Context, apfId string, body PostApfIdServiceApisJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApfIdServiceApisResponse, error)
523 // DeleteApfIdServiceApisServiceApiId request
524 DeleteApfIdServiceApisServiceApiIdWithResponse(ctx context.Context, apfId string, serviceApiId string, reqEditors ...RequestEditorFn) (*DeleteApfIdServiceApisServiceApiIdResponse, error)
526 // GetApfIdServiceApisServiceApiId request
527 GetApfIdServiceApisServiceApiIdWithResponse(ctx context.Context, apfId string, serviceApiId string, reqEditors ...RequestEditorFn) (*GetApfIdServiceApisServiceApiIdResponse, error)
529 // ModifyIndAPFPubAPI request with any body
530 ModifyIndAPFPubAPIWithBodyWithResponse(ctx context.Context, apfId string, serviceApiId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ModifyIndAPFPubAPIResponse, error)
532 // PutApfIdServiceApisServiceApiId request with any body
533 PutApfIdServiceApisServiceApiIdWithBodyWithResponse(ctx context.Context, apfId string, serviceApiId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutApfIdServiceApisServiceApiIdResponse, error)
535 PutApfIdServiceApisServiceApiIdWithResponse(ctx context.Context, apfId string, serviceApiId string, body PutApfIdServiceApisServiceApiIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PutApfIdServiceApisServiceApiIdResponse, error)
538 type GetApfIdServiceApisResponse struct {
540 HTTPResponse *http.Response
541 JSON200 *[]ServiceAPIDescription
544 // Status returns HTTPResponse.Status
545 func (r GetApfIdServiceApisResponse) Status() string {
546 if r.HTTPResponse != nil {
547 return r.HTTPResponse.Status
549 return http.StatusText(0)
552 // StatusCode returns HTTPResponse.StatusCode
553 func (r GetApfIdServiceApisResponse) StatusCode() int {
554 if r.HTTPResponse != nil {
555 return r.HTTPResponse.StatusCode
560 type PostApfIdServiceApisResponse struct {
562 HTTPResponse *http.Response
563 JSON201 *ServiceAPIDescription
566 // Status returns HTTPResponse.Status
567 func (r PostApfIdServiceApisResponse) Status() string {
568 if r.HTTPResponse != nil {
569 return r.HTTPResponse.Status
571 return http.StatusText(0)
574 // StatusCode returns HTTPResponse.StatusCode
575 func (r PostApfIdServiceApisResponse) StatusCode() int {
576 if r.HTTPResponse != nil {
577 return r.HTTPResponse.StatusCode
582 type DeleteApfIdServiceApisServiceApiIdResponse struct {
584 HTTPResponse *http.Response
587 // Status returns HTTPResponse.Status
588 func (r DeleteApfIdServiceApisServiceApiIdResponse) Status() string {
589 if r.HTTPResponse != nil {
590 return r.HTTPResponse.Status
592 return http.StatusText(0)
595 // StatusCode returns HTTPResponse.StatusCode
596 func (r DeleteApfIdServiceApisServiceApiIdResponse) StatusCode() int {
597 if r.HTTPResponse != nil {
598 return r.HTTPResponse.StatusCode
603 type GetApfIdServiceApisServiceApiIdResponse struct {
605 HTTPResponse *http.Response
606 JSON200 *ServiceAPIDescription
609 // Status returns HTTPResponse.Status
610 func (r GetApfIdServiceApisServiceApiIdResponse) Status() string {
611 if r.HTTPResponse != nil {
612 return r.HTTPResponse.Status
614 return http.StatusText(0)
617 // StatusCode returns HTTPResponse.StatusCode
618 func (r GetApfIdServiceApisServiceApiIdResponse) StatusCode() int {
619 if r.HTTPResponse != nil {
620 return r.HTTPResponse.StatusCode
625 type ModifyIndAPFPubAPIResponse struct {
627 HTTPResponse *http.Response
628 JSON200 *ServiceAPIDescription
631 // Status returns HTTPResponse.Status
632 func (r ModifyIndAPFPubAPIResponse) Status() string {
633 if r.HTTPResponse != nil {
634 return r.HTTPResponse.Status
636 return http.StatusText(0)
639 // StatusCode returns HTTPResponse.StatusCode
640 func (r ModifyIndAPFPubAPIResponse) StatusCode() int {
641 if r.HTTPResponse != nil {
642 return r.HTTPResponse.StatusCode
647 type PutApfIdServiceApisServiceApiIdResponse struct {
649 HTTPResponse *http.Response
650 JSON200 *ServiceAPIDescription
653 // Status returns HTTPResponse.Status
654 func (r PutApfIdServiceApisServiceApiIdResponse) Status() string {
655 if r.HTTPResponse != nil {
656 return r.HTTPResponse.Status
658 return http.StatusText(0)
661 // StatusCode returns HTTPResponse.StatusCode
662 func (r PutApfIdServiceApisServiceApiIdResponse) StatusCode() int {
663 if r.HTTPResponse != nil {
664 return r.HTTPResponse.StatusCode
669 // GetApfIdServiceApisWithResponse request returning *GetApfIdServiceApisResponse
670 func (c *ClientWithResponses) GetApfIdServiceApisWithResponse(ctx context.Context, apfId string, reqEditors ...RequestEditorFn) (*GetApfIdServiceApisResponse, error) {
671 rsp, err := c.GetApfIdServiceApis(ctx, apfId, reqEditors...)
675 return ParseGetApfIdServiceApisResponse(rsp)
678 // PostApfIdServiceApisWithBodyWithResponse request with arbitrary body returning *PostApfIdServiceApisResponse
679 func (c *ClientWithResponses) PostApfIdServiceApisWithBodyWithResponse(ctx context.Context, apfId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApfIdServiceApisResponse, error) {
680 rsp, err := c.PostApfIdServiceApisWithBody(ctx, apfId, contentType, body, reqEditors...)
684 return ParsePostApfIdServiceApisResponse(rsp)
687 func (c *ClientWithResponses) PostApfIdServiceApisWithResponse(ctx context.Context, apfId string, body PostApfIdServiceApisJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApfIdServiceApisResponse, error) {
688 rsp, err := c.PostApfIdServiceApis(ctx, apfId, body, reqEditors...)
692 return ParsePostApfIdServiceApisResponse(rsp)
695 // DeleteApfIdServiceApisServiceApiIdWithResponse request returning *DeleteApfIdServiceApisServiceApiIdResponse
696 func (c *ClientWithResponses) DeleteApfIdServiceApisServiceApiIdWithResponse(ctx context.Context, apfId string, serviceApiId string, reqEditors ...RequestEditorFn) (*DeleteApfIdServiceApisServiceApiIdResponse, error) {
697 rsp, err := c.DeleteApfIdServiceApisServiceApiId(ctx, apfId, serviceApiId, reqEditors...)
701 return ParseDeleteApfIdServiceApisServiceApiIdResponse(rsp)
704 // GetApfIdServiceApisServiceApiIdWithResponse request returning *GetApfIdServiceApisServiceApiIdResponse
705 func (c *ClientWithResponses) GetApfIdServiceApisServiceApiIdWithResponse(ctx context.Context, apfId string, serviceApiId string, reqEditors ...RequestEditorFn) (*GetApfIdServiceApisServiceApiIdResponse, error) {
706 rsp, err := c.GetApfIdServiceApisServiceApiId(ctx, apfId, serviceApiId, reqEditors...)
710 return ParseGetApfIdServiceApisServiceApiIdResponse(rsp)
713 // ModifyIndAPFPubAPIWithBodyWithResponse request with arbitrary body returning *ModifyIndAPFPubAPIResponse
714 func (c *ClientWithResponses) ModifyIndAPFPubAPIWithBodyWithResponse(ctx context.Context, apfId string, serviceApiId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ModifyIndAPFPubAPIResponse, error) {
715 rsp, err := c.ModifyIndAPFPubAPIWithBody(ctx, apfId, serviceApiId, contentType, body, reqEditors...)
719 return ParseModifyIndAPFPubAPIResponse(rsp)
722 // PutApfIdServiceApisServiceApiIdWithBodyWithResponse request with arbitrary body returning *PutApfIdServiceApisServiceApiIdResponse
723 func (c *ClientWithResponses) PutApfIdServiceApisServiceApiIdWithBodyWithResponse(ctx context.Context, apfId string, serviceApiId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutApfIdServiceApisServiceApiIdResponse, error) {
724 rsp, err := c.PutApfIdServiceApisServiceApiIdWithBody(ctx, apfId, serviceApiId, contentType, body, reqEditors...)
728 return ParsePutApfIdServiceApisServiceApiIdResponse(rsp)
731 func (c *ClientWithResponses) PutApfIdServiceApisServiceApiIdWithResponse(ctx context.Context, apfId string, serviceApiId string, body PutApfIdServiceApisServiceApiIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PutApfIdServiceApisServiceApiIdResponse, error) {
732 rsp, err := c.PutApfIdServiceApisServiceApiId(ctx, apfId, serviceApiId, body, reqEditors...)
736 return ParsePutApfIdServiceApisServiceApiIdResponse(rsp)
739 // ParseGetApfIdServiceApisResponse parses an HTTP response from a GetApfIdServiceApisWithResponse call
740 func ParseGetApfIdServiceApisResponse(rsp *http.Response) (*GetApfIdServiceApisResponse, error) {
741 bodyBytes, err := ioutil.ReadAll(rsp.Body)
742 defer func() { _ = rsp.Body.Close() }()
747 response := &GetApfIdServiceApisResponse{
753 case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
754 var dest []ServiceAPIDescription
755 if err := json.Unmarshal(bodyBytes, &dest); err != nil {
758 response.JSON200 = &dest
765 // ParsePostApfIdServiceApisResponse parses an HTTP response from a PostApfIdServiceApisWithResponse call
766 func ParsePostApfIdServiceApisResponse(rsp *http.Response) (*PostApfIdServiceApisResponse, error) {
767 bodyBytes, err := ioutil.ReadAll(rsp.Body)
768 defer func() { _ = rsp.Body.Close() }()
773 response := &PostApfIdServiceApisResponse{
779 case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201:
780 var dest ServiceAPIDescription
781 if err := json.Unmarshal(bodyBytes, &dest); err != nil {
784 response.JSON201 = &dest
791 // ParseDeleteApfIdServiceApisServiceApiIdResponse parses an HTTP response from a DeleteApfIdServiceApisServiceApiIdWithResponse call
792 func ParseDeleteApfIdServiceApisServiceApiIdResponse(rsp *http.Response) (*DeleteApfIdServiceApisServiceApiIdResponse, error) {
793 bodyBytes, err := ioutil.ReadAll(rsp.Body)
794 defer func() { _ = rsp.Body.Close() }()
799 response := &DeleteApfIdServiceApisServiceApiIdResponse{
807 // ParseGetApfIdServiceApisServiceApiIdResponse parses an HTTP response from a GetApfIdServiceApisServiceApiIdWithResponse call
808 func ParseGetApfIdServiceApisServiceApiIdResponse(rsp *http.Response) (*GetApfIdServiceApisServiceApiIdResponse, error) {
809 bodyBytes, err := ioutil.ReadAll(rsp.Body)
810 defer func() { _ = rsp.Body.Close() }()
815 response := &GetApfIdServiceApisServiceApiIdResponse{
821 case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
822 var dest ServiceAPIDescription
823 if err := json.Unmarshal(bodyBytes, &dest); err != nil {
826 response.JSON200 = &dest
833 // ParseModifyIndAPFPubAPIResponse parses an HTTP response from a ModifyIndAPFPubAPIWithResponse call
834 func ParseModifyIndAPFPubAPIResponse(rsp *http.Response) (*ModifyIndAPFPubAPIResponse, error) {
835 bodyBytes, err := ioutil.ReadAll(rsp.Body)
836 defer func() { _ = rsp.Body.Close() }()
841 response := &ModifyIndAPFPubAPIResponse{
847 case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
848 var dest ServiceAPIDescription
849 if err := json.Unmarshal(bodyBytes, &dest); err != nil {
852 response.JSON200 = &dest
859 // ParsePutApfIdServiceApisServiceApiIdResponse parses an HTTP response from a PutApfIdServiceApisServiceApiIdWithResponse call
860 func ParsePutApfIdServiceApisServiceApiIdResponse(rsp *http.Response) (*PutApfIdServiceApisServiceApiIdResponse, error) {
861 bodyBytes, err := ioutil.ReadAll(rsp.Body)
862 defer func() { _ = rsp.Body.Close() }()
867 response := &PutApfIdServiceApisServiceApiIdResponse{
873 case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
874 var dest ServiceAPIDescription
875 if err := json.Unmarshal(bodyBytes, &dest); err != nil {
878 response.JSON200 = &dest