2 * ========================LICENSE_START=================================
5 * Copyright (C) 2021 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.oran.dmaapadapter.r1;
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 {
34 @Schema(name = "info_type_id", description = "Information type Idenitifier of the subscription job",
36 @SerializedName("info_type_id")
37 @JsonProperty(value = "info_type_id", required = true)
38 public String infoTypeId = "";
40 @Schema(name = "job_owner", description = "Identity of the owner of the job", required = true)
41 @SerializedName("job_owner")
42 @JsonProperty(value = "job_owner", required = true)
43 public String owner = "";
45 @Schema(name = "job_definition", description = "Information type specific job data", required = true)
46 @SerializedName("job_definition")
47 @JsonProperty(value = "job_definition", required = true)
48 public Object jobDefinition;
50 @Schema(name = "job_result_uri", description = "The target URI of the subscribed information", required = true)
51 @SerializedName("job_result_uri")
52 @JsonProperty(value = "job_result_uri", required = true)
53 public String jobResultUri = "";
55 @Schema(name = "status_notification_uri",
56 description = "The target of Information subscription job status notifications", required = false)
57 @SerializedName("status_notification_uri")
58 @JsonProperty(value = "status_notification_uri", required = false)
59 public String statusNotificationUri = "";
61 public ConsumerJobInfo() {}
63 public ConsumerJobInfo(String infoTypeId, Object jobData, String owner, String targetUri,
64 String statusNotificationUri) {
65 this.infoTypeId = infoTypeId;
66 this.jobDefinition = jobData;
68 this.jobResultUri = targetUri;
69 this.statusNotificationUri = statusNotificationUri;