func (a *Client) CreateEnvironment(params *CreateEnvironmentParams, authInfo runtime.ClientAuthInfoWriter) (*CreateEnvironmentCreated, error) {
	if params == nil {
		params = NewCreateEnvironmentParams()
	}
	result, err := a.transport.Submit(&runtime.ClientOperation{
		ID:                 "createEnvironment",
		Method:             "POST",
		PathPattern:        "/environments",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"https"},
		Params:             params,
		Reader:             &CreateEnvironmentReader{formats: a.formats},
		AuthInfo:           authInfo,
		Context:            params.Context,
		Client:             params.HTTPClient,
	})
	if err != nil {
		return nil, err
	}
	success, ok := result.(*CreateEnvironmentCreated)
	if ok {
		return success, nil
	}
	msg := fmt.Sprintf("unexpected success response for createEnvironment: API contract not enforced by server. Client expected to get an error, but got: %T", result)
	panic(msg)
}
/*
CreateEnvironment creates a new environment

Creates a new environment.
package environments
import (
	"fmt"
	"github.com/go-openapi/runtime"
	"github.com/go-openapi/strfmt"
)
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
	return &Client{transport: transport, formats: formats}
}
type Client struct {
	transport runtime.ClientTransport
	formats   strfmt.Registry
}
type ClientService interface {
	CreateEnvironment(params *CreateEnvironmentParams, authInfo runtime.ClientAuthInfoWriter) (*CreateEnvironmentCreated, error)
	DeleteEnvironment(params *DeleteEnvironmentParams, authInfo runtime.ClientAuthInfoWriter) (*DeleteEnvironmentNoContent, error)
	GetEnvironment(params *GetEnvironmentParams, authInfo runtime.ClientAuthInfoWriter) (*GetEnvironmentOK, error)
	ListEnvironments(params *ListEnvironmentsParams, authInfo runtime.ClientAuthInfoWriter) (*ListEnvironmentsOK, error)
	UpdateEnvironment(params *UpdateEnvironmentParams, authInfo runtime.ClientAuthInfoWriter) (*UpdateEnvironmentOK, error)
	SetTransport(transport runtime.ClientTransport)
}