/**
 * Copyright 2016, RadiantBlue Technologies, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 **/
package model.response;

import io.swagger.annotations.ApiModelProperty;
import model.job.type.ExecuteServiceJob;
import model.service.taskmanaged.ServiceJob;

/**
 * Response containing a Service Job, and the input data for execution
 * 
 * @author Patrick.Doody
 *
 */
public class ServiceJobResponse extends PiazzaResponse {
	@ApiModelProperty(value = "The Service Job Metadata.", required = true)
	public ServiceJobData data = new ServiceJobData();

	public ServiceJobResponse(ServiceJob serviceJob, ExecuteServiceJob serviceData) {
		data.setServiceJob(serviceJob);
		data.setServiceData(serviceData);
	}

	public ServiceJobResponse() {
	}

	/**
	 * Used to wrap the Service Job in an annotatable class.
	 */
	public class ServiceJobData {
		@ApiModelProperty(value = "The Service Job Metadata.", required = true)
		private ServiceJob serviceJob;
		@ApiModelProperty(value = "The Service Job Execution Metadata", required = true)
		private ExecuteServiceJob serviceData;

		public ServiceJob getServiceJob() {
			return this.serviceJob;
		}

		public void setServiceJob(ServiceJob serviceJob) {
			this.serviceJob = serviceJob;
		}

		public ExecuteServiceJob getServiceData() {
			return serviceData;
		}

		public void setServiceData(ExecuteServiceJob serviceData) {
			this.serviceData = serviceData;
		}
	}
}

@@ -1093,31 +1093,8 @@
 nse(
-ServiceJob serviceJob, 
 Exec
@@ -1126,42 +1126,8 @@
 ) %7B%0A
-%09%09data.setServiceJob(serviceJob);%0A
 %09%09da
@@ -1345,354 +1345,86 @@
 Job 
-Metadata.%22, required = true)%0A%09%09private ServiceJob serviceJob;%0A%09%09@ApiModelProperty(value = %22The Service Job Execution Metadata%22, required = true)%0A%09%09private ExecuteServiceJob serviceData;%0A%0A%09%09public ServiceJob getServiceJob() %7B%0A%09%09%09return this.serviceJob;%0A%09%09%7D%0A%0A%09%09public void setServiceJob(ServiceJob serviceJob) %7B%0A%09%09%09this.serviceJob = serviceJob;%0A%09%09%7D
+Execution Metadata%22, required = true)%0A%09%09private ExecuteServiceJob serviceData;
 %0A%0A%09%09

Remove ServiceJob from Metadata