github.com/sap/cf-mta-plugin@v2.6.3+incompatible/clients/cfrestclient/operations/get_shared_domains_responses.go (about) 1 // Code generated by go-swagger; DO NOT EDIT. 2 3 package operations 4 5 // This file was generated by the swagger tool. 6 // Editing this file might prove futile when you re-run the swagger generate command 7 8 import ( 9 "fmt" 10 "io" 11 12 "github.com/go-openapi/runtime" 13 14 strfmt "github.com/go-openapi/strfmt" 15 16 "github.com/cloudfoundry-incubator/multiapps-cli-plugin/clients/models" 17 18 baseclient "github.com/cloudfoundry-incubator/multiapps-cli-plugin/clients/baseclient" 19 ) 20 21 // GetSharedDomainsReader is a Reader for the GetSharedDomains structure. 22 type GetSharedDomainsReader struct { 23 formats strfmt.Registry 24 } 25 26 // ReadResponse reads a server response into the received o. 27 func (o *GetSharedDomainsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { 28 switch response.Code() { 29 30 case 200: 31 result := NewGetSharedDomainsOK() 32 if err := result.readResponse(response, consumer, o.formats); err != nil { 33 return nil, err 34 } 35 return result, nil 36 37 default: 38 return nil, baseclient.BuildErrorResponse(response, consumer, o.formats) 39 } 40 } 41 42 // NewGetSharedDomainsOK creates a GetSharedDomainsOK with default headers values 43 func NewGetSharedDomainsOK() *GetSharedDomainsOK { 44 return &GetSharedDomainsOK{} 45 } 46 47 /*GetSharedDomainsOK handles this case with default header values. 48 49 OK 50 */ 51 type GetSharedDomainsOK struct { 52 Payload *models.CloudFoundryResponse 53 } 54 55 func (o *GetSharedDomainsOK) Error() string { 56 return fmt.Sprintf("[GET /shared_domains][%d] getSharedDomainsOK %+v", 200, o.Payload) 57 } 58 59 func (o *GetSharedDomainsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { 60 61 o.Payload = new(models.CloudFoundryResponse) 62 63 // response payload 64 if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { 65 return err 66 } 67 68 return nil 69 }