Creating PM-producer
[nonrtric/plt/ranpm.git] / pmproducer / src / main / java / org / oran / pmproducer / r1 / ConsumerJobInfo.java
1 /*-
2  * ========================LICENSE_START=================================
3  * O-RAN-SC
4  * %%
5  * Copyright (C) 2023 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.pmproducer.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 @Schema(name = "consumer_job", description = "Information for an Information Job")
29 public class ConsumerJobInfo {
30
31     @Schema(name = "info_type_id", description = "Information type Idenitifier of the subscription job")
32     @SerializedName("info_type_id")
33     @JsonProperty(value = "info_type_id", required = true)
34     public String infoTypeId = "";
35
36     @Schema(name = "job_owner", description = "Identity of the owner of the job")
37     @SerializedName("job_owner")
38     @JsonProperty(value = "job_owner", required = true)
39     public String owner = "";
40
41     @Schema(name = "job_definition", description = "Information type specific job data")
42     @SerializedName("job_definition")
43     @JsonProperty(value = "job_definition", required = true)
44     public Object jobDefinition;
45
46     @Schema(name = "job_result_uri", description = "The target URI of the subscribed information")
47     @SerializedName("job_result_uri")
48     @JsonProperty(value = "job_result_uri", required = true)
49     public String jobResultUri = "";
50
51     @Schema(name = "status_notification_uri",
52             description = "The target of Information subscription job status notifications")
53     @SerializedName("status_notification_uri")
54     @JsonProperty(value = "status_notification_uri", required = false)
55     public String statusNotificationUri = "";
56
57     public ConsumerJobInfo() {}
58
59     public ConsumerJobInfo(String infoTypeId, Object jobData, String owner, String statusNotificationUri) {
60         this.infoTypeId = infoTypeId;
61         this.jobDefinition = jobData;
62         this.owner = owner;
63         this.statusNotificationUri = statusNotificationUri;
64     }
65 }