cloud/azure/resource/client/deployments/deployments_check_existence_responses.go
package deployments
// 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"
strfmt "github.com/go-openapi/strfmt"
)
// DeploymentsCheckExistenceReader is a Reader for the DeploymentsCheckExistence structure.
type DeploymentsCheckExistenceReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *DeploymentsCheckExistenceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 204:
result := NewDeploymentsCheckExistenceNoContent()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 404:
result := NewDeploymentsCheckExistenceNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
default:
return nil, runtime.NewAPIError("unknown error", response, response.Code())
}
}
// NewDeploymentsCheckExistenceNoContent creates a DeploymentsCheckExistenceNoContent with default headers values
func NewDeploymentsCheckExistenceNoContent() *DeploymentsCheckExistenceNoContent {
return &DeploymentsCheckExistenceNoContent{}
}
/*DeploymentsCheckExistenceNoContent handles this case with default header values.
No Content
*/
type DeploymentsCheckExistenceNoContent struct {
}
func (o *DeploymentsCheckExistenceNoContent) Error() string {
return fmt.Sprintf("[HEAD /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}][%d] deploymentsCheckExistenceNoContent ", 204)
}
func (o *DeploymentsCheckExistenceNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewDeploymentsCheckExistenceNotFound creates a DeploymentsCheckExistenceNotFound with default headers values
func NewDeploymentsCheckExistenceNotFound() *DeploymentsCheckExistenceNotFound {
return &DeploymentsCheckExistenceNotFound{}
}
/*DeploymentsCheckExistenceNotFound handles this case with default header values.
Not Found
*/
type DeploymentsCheckExistenceNotFound struct {
}
func (o *DeploymentsCheckExistenceNotFound) Error() string {
return fmt.Sprintf("[HEAD /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}][%d] deploymentsCheckExistenceNotFound ", 404)
}
func (o *DeploymentsCheckExistenceNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}