// Code generated by go-swagger; DO NOT EDIT.

// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed

package cors

// 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"
	"github.com/go-openapi/strfmt"
)

// GetCoordinatesOptionsReader is a Reader for the GetCoordinatesOptions structure.
type GetCoordinatesOptionsReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *GetCoordinatesOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewGetCoordinatesOptionsOK()
		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())
	}
}

// NewGetCoordinatesOptionsOK creates a GetCoordinatesOptionsOK with default headers values
func NewGetCoordinatesOptionsOK() *GetCoordinatesOptionsOK {
	return &GetCoordinatesOptionsOK{}
}

/*GetCoordinatesOptionsOK handles this case with default header values.

CORS OPTIONS response
*/
type GetCoordinatesOptionsOK struct {
	AccessControlAllowCredentials string

	AccessControlAllowHeaders string

	AccessControlAllowMethods string

	AccessControlAllowOrigin string

	AccessControlExposeHeaders string

	AccessControlMaxAge string

	CacheControl string
}

func (o *GetCoordinatesOptionsOK) Error() string {
	return fmt.Sprintf("[OPTIONS /coordinates][%d] getCoordinatesOptionsOK ", 200)
}

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

	// response header Access-Control-Allow-Credentials
	o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials")

	// response header Access-Control-Allow-Headers
	o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers")

	// response header Access-Control-Allow-Methods
	o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods")

	// response header Access-Control-Allow-Origin
	o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")

	// response header Access-Control-Expose-Headers
	o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers")

	// response header Access-Control-Max-Age
	o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age")

	// response header Cache-Control
	o.CacheControl = response.GetHeader("Cache-Control")

	return nil
}
