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=a28a4ad261601976c345425692116e5d7250b810;hp=b3ef96af152a0f9d34ecefdb3464f672d42e6a8c;hpb=6c468636c3790e3420da97dab19057892988fa11;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 b3ef96af..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() {