jkawamoto/roadie

View on GitHub
cloud/azure/resource/client/deployments/deployments_delete_responses.go

Summary

Maintainability
C
7 hrs
Test Coverage
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"
)

// DeploymentsDeleteReader is a Reader for the DeploymentsDelete structure.
type DeploymentsDeleteReader struct {
    formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *DeploymentsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
    switch response.Code() {

    case 202:
        result := NewDeploymentsDeleteAccepted()
        if err := result.readResponse(response, consumer, o.formats); err != nil {
            return nil, err
        }
        return result, nil

    case 204:
        result := NewDeploymentsDeleteNoContent()
        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())
    }
}

// NewDeploymentsDeleteAccepted creates a DeploymentsDeleteAccepted with default headers values
func NewDeploymentsDeleteAccepted() *DeploymentsDeleteAccepted {
    return &DeploymentsDeleteAccepted{}
}

/*DeploymentsDeleteAccepted handles this case with default header values.

Accepted - Returns this status until the asynchronous operation has completed.
*/
type DeploymentsDeleteAccepted struct {
}

func (o *DeploymentsDeleteAccepted) Error() string {
    return fmt.Sprintf("[DELETE /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}][%d] deploymentsDeleteAccepted ", 202)
}

func (o *DeploymentsDeleteAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

    return nil
}

// NewDeploymentsDeleteNoContent creates a DeploymentsDeleteNoContent with default headers values
func NewDeploymentsDeleteNoContent() *DeploymentsDeleteNoContent {
    return &DeploymentsDeleteNoContent{}
}

/*DeploymentsDeleteNoContent handles this case with default header values.

No Content
*/
type DeploymentsDeleteNoContent struct {
}

func (o *DeploymentsDeleteNoContent) Error() string {
    return fmt.Sprintf("[DELETE /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}][%d] deploymentsDeleteNoContent ", 204)
}

func (o *DeploymentsDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

    return nil
}