cloud/azure/compute/client/images/images_get_responses.go
package images
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"fmt"
"io"
"github.com/go-openapi/runtime"
strfmt "github.com/go-openapi/strfmt"
"github.com/jkawamoto/roadie/cloud/azure/compute/models"
)
// ImagesGetReader is a Reader for the ImagesGet structure.
type ImagesGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *ImagesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewImagesGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
return nil, runtime.NewAPIError("unknown error", response, response.Code())
}
}
// NewImagesGetOK creates a ImagesGetOK with default headers values
func NewImagesGetOK() *ImagesGetOK {
return &ImagesGetOK{}
}
/*ImagesGetOK handles this case with default header values.
OK
*/
type ImagesGetOK struct {
Payload *models.Image
}
func (o *ImagesGetOK) Error() string {
return fmt.Sprintf("[GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}][%d] imagesGetOK %+v", 200, o.Payload)
}
func (o *ImagesGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.Image)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}