X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=enrichment-coordinator-service%2Fsrc%2Fmain%2Fjava%2Forg%2Foransc%2Fenrichment%2Fcontrollers%2Fr1consumer%2FConsumerInfoTypeInfo.java;h=92ee19bd86f2b06e91cf00538936cb124e6fd656;hb=refs%2Fchanges%2F02%2F6702%2F2;hp=d07356f6f8ed542874a2b31fe2042ef47487ddd5;hpb=367608a9f6c71c2aaae45ed8b1099b9c8e51c0f7;p=nonrtric.git
diff --git a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/r1consumer/ConsumerInfoTypeInfo.java b/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/r1consumer/ConsumerInfoTypeInfo.java
index d07356f6..92ee19bd 100644
--- a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/r1consumer/ConsumerInfoTypeInfo.java
+++ b/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/r1consumer/ConsumerInfoTypeInfo.java
@@ -2,7 +2,7 @@
* ========================LICENSE_START=================================
* O-RAN-SC
* %%
- * Copyright (C) 2020 Nordix Foundation
+ * Copyright (C) 2021 Nordix Foundation
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -28,16 +28,38 @@ import io.swagger.v3.oas.annotations.media.Schema;
import org.immutables.gson.Gson;
@Gson.TypeAdapters
-@Schema(name = "InformationType", description = "Information for an Information type")
+@Schema(name = "consumer_information_type", description = "Information for an Information type")
public class ConsumerInfoTypeInfo {
- @Schema(name = "consumer_job_data_schema", description = "Json schema for the job data", required = true)
- @SerializedName("consumer_job_data_schema")
- @JsonProperty(value = "consumer_job_data_schema", required = true)
+ @Schema(name = "job_data_schema", description = "Json schema for the job data", required = true)
+ @SerializedName("job_data_schema")
+ @JsonProperty(value = "job_data_schema", required = true)
public Object jobDataSchema;
- public ConsumerInfoTypeInfo(Object jobDataSchema) {
+ @Gson.TypeAdapters
+ @Schema(name = "consumer_type_status_values", description = STATUS_DESCRIPTION)
+ public enum ConsumerTypeStatusValues {
+ ENABLED, DISABLED
+ }
+
+ private static final String STATUS_DESCRIPTION = "Allowed values:
" //
+ + "ENABLED: one or several producers for the information type are available
" //
+ + "DISABLED: no producers for the information type are available";
+
+ @Schema(name = "type_status", description = STATUS_DESCRIPTION, required = true)
+ @SerializedName("type_status")
+ @JsonProperty(value = "type_status", required = true)
+ public ConsumerTypeStatusValues state;
+
+ @Schema(name = "no_of_producers", description = "The number of registered producers for the type", required = true)
+ @SerializedName("no_of_producers")
+ @JsonProperty(value = "no_of_producers", required = true)
+ public int noOfProducers;
+
+ public ConsumerInfoTypeInfo(Object jobDataSchema, ConsumerTypeStatusValues state, int noOfProducers) {
this.jobDataSchema = jobDataSchema;
+ this.state = state;
+ this.noOfProducers = noOfProducers;
}
public ConsumerInfoTypeInfo() {