X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=enrichment-coordinator-service%2Fsrc%2Fmain%2Fjava%2Forg%2Foransc%2Fenrichment%2Fcontrollers%2Fr1consumer%2FConsumerInfoTypeInfo.java;fp=enrichment-coordinator-service%2Fsrc%2Fmain%2Fjava%2Forg%2Foransc%2Fenrichment%2Fcontrollers%2Fr1consumer%2FConsumerInfoTypeInfo.java;h=92ee19bd86f2b06e91cf00538936cb124e6fd656;hb=366bc97828bf62e39a41318c1407a2c7c8cb5b74;hp=c227a2031220ce9a23388eb3afabcacf60111a5a;hpb=a893ee0669b7820fdb30af24b213ea69956377e1;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 c227a203..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. @@ -36,8 +36,30 @@ public class ConsumerInfoTypeInfo { @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() {