2 * ========================LICENSE_START=================================
5 * Copyright (C) 2020 Nordix Foundation
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ========================LICENSE_END===================================
21 package org.oransc.enrichment.controllers.r1consumer;
23 import com.fasterxml.jackson.annotation.JsonProperty;
24 import com.google.gson.annotations.SerializedName;
26 import io.swagger.v3.oas.annotations.media.Schema;
28 import org.immutables.gson.Gson;
31 @Schema(name = "consumer_job", description = "Information for an Enrichment Information Job")
32 public class ConsumerJobInfo {
35 name = "info_type_id",
36 description = "Information type Idenitifier of the subscription job",
38 @SerializedName("info_type_id")
39 @JsonProperty(value = "info_type_id", required = true)
40 public String infoTypeId = "";
42 @Schema(name = "job_owner", description = "Identity of the owner of the job", required = true)
43 @SerializedName("job_owner")
44 @JsonProperty(value = "job_owner", required = true)
45 public String owner = "";
47 @Schema(name = "job_definition", description = "Information type specific job data", required = true)
48 @SerializedName("job_definition")
49 @JsonProperty(value = "job_definition", required = true)
50 public Object jobDefinition;
52 @Schema(name = "job_result_uri", description = "The target URI of the subscribed information", required = true)
53 @SerializedName("job_result_uri")
54 @JsonProperty(value = "job_result_uri", required = true)
55 public String jobResultUri = "";
58 name = "status_notification_uri",
59 description = "The target of Information subscription job status notifications",
61 @SerializedName("status_notification_uri")
62 @JsonProperty(value = "status_notification_uri", required = false)
63 public String statusNotificationUri = "";
65 public ConsumerJobInfo() {
68 public ConsumerJobInfo(String infoTypeId, Object jobData, String owner, String targetUri,
69 String statusNotificationUri) {
70 this.infoTypeId = infoTypeId;
71 this.jobDefinition = jobData;
73 this.jobResultUri = targetUri;
74 this.statusNotificationUri = statusNotificationUri;