jkawamoto/roadie

View on GitHub
cloud/azure/resource/client/resources/resources_check_existence_responses.go

Summary

Maintainability
C
7 hrs
Test Coverage
package resources

// 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"
)

// ResourcesCheckExistenceReader is a Reader for the ResourcesCheckExistence structure.
type ResourcesCheckExistenceReader struct {
    formats strfmt.Registry
}

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

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

    case 404:
        result := NewResourcesCheckExistenceNotFound()
        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())
    }
}

// NewResourcesCheckExistenceNoContent creates a ResourcesCheckExistenceNoContent with default headers values
func NewResourcesCheckExistenceNoContent() *ResourcesCheckExistenceNoContent {
    return &ResourcesCheckExistenceNoContent{}
}

/*ResourcesCheckExistenceNoContent handles this case with default header values.

No Content
*/
type ResourcesCheckExistenceNoContent struct {
}

func (o *ResourcesCheckExistenceNoContent) Error() string {
    return fmt.Sprintf("[HEAD /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}][%d] resourcesCheckExistenceNoContent ", 204)
}

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

    return nil
}

// NewResourcesCheckExistenceNotFound creates a ResourcesCheckExistenceNotFound with default headers values
func NewResourcesCheckExistenceNotFound() *ResourcesCheckExistenceNotFound {
    return &ResourcesCheckExistenceNotFound{}
}

/*ResourcesCheckExistenceNotFound handles this case with default header values.

Not Found
*/
type ResourcesCheckExistenceNotFound struct {
}

func (o *ResourcesCheckExistenceNotFound) Error() string {
    return fmt.Sprintf("[HEAD /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}][%d] resourcesCheckExistenceNotFound ", 404)
}

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

    return nil
}