Merge "ICS tests with istio and JWTs"
[nonrtric.git] / dmaap-adaptor-java / src / main / java / org / oran / dmaapadapter / r1 / ConsumerJobInfo.java
1 /*-
2  * ========================LICENSE_START=================================
3  * O-RAN-SC
4  * %%
5  * Copyright (C) 2021 Nordix Foundation
6  * %%
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
10  *
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  *
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===================================
19  */
20
21 package org.oran.dmaapadapter.r1;
22
23 import com.fasterxml.jackson.annotation.JsonProperty;
24 import com.google.gson.annotations.SerializedName;
25
26 import io.swagger.v3.oas.annotations.media.Schema;
27
28 import org.immutables.gson.Gson;
29
30 @Gson.TypeAdapters
31 @Schema(name = "consumer_job", description = "Information for an Information Job")
32 public class ConsumerJobInfo {
33
34     @Schema(name = "info_type_id", description = "Information type Idenitifier of the subscription job",
35             required = true)
36     @SerializedName("info_type_id")
37     @JsonProperty(value = "info_type_id", required = true)
38     public String infoTypeId = "";
39
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 = "";
44
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;
49
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 = "";
54
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 = "";
60
61     public ConsumerJobInfo() {}
62
63     public ConsumerJobInfo(String infoTypeId, Object jobData, String owner, String targetUri,
64             String statusNotificationUri) {
65         this.infoTypeId = infoTypeId;
66         this.jobDefinition = jobData;
67         this.owner = owner;
68         this.jobResultUri = targetUri;
69         this.statusNotificationUri = statusNotificationUri;
70     }
71 }