// Path: src/spring-cloud-cloudfoundry-service-broker/src/main/java/org/springframework/cloud/servicebroker/model/Catalog.java
// @Getter
// @ToString
// @EqualsAndHashCode
// @JsonAutoDetect(getterVisibility = JsonAutoDetect.Visibility.NONE)
// @JsonIgnoreProperties(ignoreUnknown = true)
// public class Catalog {
// 
// 	/**
// 	 * A list of service offerings provided by the service broker.
// 	 */
// 	@NotEmpty
// 	@JsonSerialize(nullsUsing = EmptyListSerializer.class)
// 	@JsonProperty("services")
// 	private final List<ServiceDefinition> serviceDefinitions;
// 
// 	public Catalog() {
// 		this.serviceDefinitions = null;
// 	}
// 
// 	public Catalog(List<ServiceDefinition> serviceDefinitions) {
// 		this.serviceDefinitions = serviceDefinitions;
// 	}
// }
// 
// Path: src/spring-cloud-cloudfoundry-service-broker/src/main/java/org/springframework/cloud/servicebroker/service/CatalogService.java
// public interface CatalogService {
// 
// 	/**
// 	 * Return the catalog of services provided by the service broker.
// 	 *
// 	 * @return the catalog of services
// 	 */
// 	Catalog getCatalog();
// 
// 	/**
// 	 * Get a service definition from the catalog by ID.
// 	 *
// 	 * @param serviceId  The ID of the service definition in the catalog
// 	 * @return the service definition, or null if it doesn't exist
// 	 */
// 	ServiceDefinition getServiceDefinition(String serviceId);
// 	
// }


import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.servicebroker.model.Catalog;
import org.springframework.cloud.servicebroker.service.CatalogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
package org.springframework.cloud.servicebroker.controller;


/**
 * See: http://docs.cloudfoundry.org/services/api.html
 *
 * @author sgreenberg@pivotal.io
 * @author Scott Frederick
 */
@RestController
@Slf4j
public class CatalogController extends BaseController {
	@Autowired
	public CatalogController(CatalogService service) {
		super(service);
	}

	@RequestMapping(value = "/v2/catalog", method = RequestMethod.GET)
// Path: src/spring-cloud-cloudfoundry-service-broker/src/main/java/org/springframework/cloud/servicebroker/model/Catalog.java
// @Getter
// @ToString
// @EqualsAndHashCode
// @JsonAutoDetect(getterVisibility = JsonAutoDetect.Visibility.NONE)
// @JsonIgnoreProperties(ignoreUnknown = true)
// public class Catalog {
// 
// 	/**
// 	 * A list of service offerings provided by the service broker.
// 	 */
// 	@NotEmpty
// 	@JsonSerialize(nullsUsing = EmptyListSerializer.class)
// 	@JsonProperty("services")
// 	private final List<ServiceDefinition> serviceDefinitions;
// 
// 	public Catalog() {
// 		this.serviceDefinitions = null;
// 	}
// 
// 	public Catalog(List<ServiceDefinition> serviceDefinitions) {
// 		this.serviceDefinitions = serviceDefinitions;
// 	}
// }
// 
// Path: src/spring-cloud-cloudfoundry-service-broker/src/main/java/org/springframework/cloud/servicebroker/service/CatalogService.java
// public interface CatalogService {
// 
// 	/**
// 	 * Return the catalog of services provided by the service broker.
// 	 *
// 	 * @return the catalog of services
// 	 */
// 	Catalog getCatalog();
// 
// 	/**
// 	 * Get a service definition from the catalog by ID.
// 	 *
// 	 * @param serviceId  The ID of the service definition in the catalog
// 	 * @return the service definition, or null if it doesn't exist
// 	 */
// 	ServiceDefinition getServiceDefinition(String serviceId);
// 	
// }


// Path: src/spring-cloud-cloudfoundry-service-broker/src/main/java/org/springframework/cloud/servicebroker/controller/CatalogController.java
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.servicebroker.model.Catalog;
import org.springframework.cloud.servicebroker.service.CatalogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

package org.springframework.cloud.servicebroker.controller;


/**
 * See: http://docs.cloudfoundry.org/services/api.html
 *
 * @author sgreenberg@pivotal.io
 * @author Scott Frederick
 */
@RestController
@Slf4j
public class CatalogController extends BaseController {
	@Autowired
	public CatalogController(CatalogService service) {
		super(service);
	}

	@RequestMapping(value = "/v2/catalog", method = RequestMethod.GET)
	public Catalog getCatalog() {