d378825a2af8dd65a8ab1929e382f2a0749d2298
[nonrtric.git] / dmaap-adaptor-java / src / main / java / org / oran / dmaapadapter / r1 / ProducerJobInfo.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 = "producer_info_job_request",
32         description = "The body of the Information Producer callbacks for Information Job creation and deletion")
33 public class ProducerJobInfo {
34
35     @Schema(name = "info_job_identity", description = "Identity of the Information Job", required = true)
36     @SerializedName("info_job_identity")
37     @JsonProperty("info_job_identity")
38     public String id = "";
39
40     @Schema(name = "info_type_identity", description = "Type identity for the job")
41     @SerializedName("info_type_identity")
42     @JsonProperty("info_type_identity")
43     public String typeId = "";
44
45     @Schema(name = "info_job_data", description = "Json for the job data")
46     @SerializedName("info_job_data")
47     @JsonProperty("info_job_data")
48     public Object jobData;
49
50     @Schema(name = "target_uri", description = "URI for the target of the produced Information")
51     @SerializedName("target_uri")
52     @JsonProperty("target_uri")
53     public String targetUri = "";
54
55     @Schema(name = "owner", description = "The owner of the job")
56     @SerializedName("owner")
57     @JsonProperty("owner")
58     public String owner = "";
59
60     @Schema(name = "last_updated", description = "The time when the job was last updated or created (ISO-8601)")
61     @SerializedName("last_updated")
62     @JsonProperty("last_updated")
63     public String lastUpdated = "";
64
65     public ProducerJobInfo(Object jobData, String id, String typeId, String targetUri, String owner,
66             String lastUpdated) {
67         this.id = id;
68         this.jobData = jobData;
69         this.typeId = typeId;
70         this.targetUri = targetUri;
71         this.owner = owner;
72         this.lastUpdated = lastUpdated;
73     }
74
75     public ProducerJobInfo() {}
76
77 }