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

// GetCoordinatesObservableOptionsReader is a Reader for the GetCoordinatesObservableOptions structure.
type GetCoordinatesObservableOptionsReader struct {
	formats strfmt.Registry
}

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

// NewGetCoordinatesObservableOptionsOK creates a GetCoordinatesObservableOptionsOK with default headers values
func NewGetCoordinatesObservableOptionsOK() *GetCoordinatesObservableOptionsOK {
	return &GetCoordinatesObservableOptionsOK{}
}

/*GetCoordinatesObservableOptionsOK handles this case with default header values.

CORS OPTIONS response
*/
type GetCoordinatesObservableOptionsOK struct {
	AccessControlAllowCredentials string

	AccessControlAllowHeaders string

	AccessControlAllowMethods string

	AccessControlAllowOrigin string

	AccessControlExposeHeaders string

	AccessControlMaxAge string

	CacheControl string
}

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

func (o *GetCoordinatesObservableOptionsOK) 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
}
