func (c *mccpService) Spaces() Spaces {
	return newSpacesAPI(c.Client)
}
Spaces implements Spaces APIs
package mccpv2
import (
	gohttp "net/http"
	bluemix "github.com/IBM-Cloud/bluemix-go"
	"github.com/IBM-Cloud/bluemix-go/authentication"
	"github.com/IBM-Cloud/bluemix-go/client"
	"github.com/IBM-Cloud/bluemix-go/http"
	"github.com/IBM-Cloud/bluemix-go/rest"
	"github.com/IBM-Cloud/bluemix-go/session"
)
const ErrCodeAPICreation = "APICreationError"
type MccpServiceAPI interface {
	Organizations() Organizations
	Spaces() Spaces
	ServiceInstances() ServiceInstances
	ServiceKeys() ServiceKeys
	ServicePlans() ServicePlans
	ServiceOfferings() ServiceOfferings
	SpaceQuotas() SpaceQuotas
	OrgQuotas() OrgQuotas
	Apps() Apps
	Routes() Routes
	SharedDomains() SharedDomains
	PrivateDomains() PrivateDomains
	ServiceBindings() ServiceBindings
	Regions() RegionRepository
}
type mccpService struct {
	*client.Client
}
func New(sess *session.Session) (MccpServiceAPI, error) {
	config := sess.Config.Copy()
	err := config.ValidateConfigForService(bluemix.MccpService)
	if err != nil {
		return nil, err
	}
	if config.HTTPClient == nil {
		config.HTTPClient = http.NewHTTPClient(config)
	}
	tokenRefreher, err := authentication.NewUAARepository(config, &rest.Client{
		DefaultHeader: gohttp.Header{
			"User-Agent": []string{http.UserAgent()},
		},
		HTTPClient: config.HTTPClient,
	})
	if err != nil {
		return nil, err
	}
	if config.UAAAccessToken == "" || config.UAARefreshToken == "" {
		err := authentication.PopulateTokens(tokenRefreher, config)
		if err != nil {
			return nil, err
		}
	}
	if config.Endpoint == nil {
		ep, err := config.EndpointLocator.MCCPAPIEndpoint()
		if err != nil {
			return nil, err
		}
		config.Endpoint = &ep
	}
	return &mccpService{
		Client: client.New(config, bluemix.MccpService, tokenRefreher),
	}, nil
}
func (c *mccpService) Organizations() Organizations {
	return newOrganizationAPI(c.Client)
}