3 * * ============LICENSE_START=======================================================
5 * * ================================================================================
6 * * Copyright (c) 2021 Nokia Intellectual Property. All rights reserved.
7 * * ================================================================================
8 * * Licensed under the Apache License, Version 2.0 (the "License");
9 * * you may not use this file except in compliance with the License.
10 * * You may obtain a copy of the License at
12 * * http://www.apache.org/licenses/LICENSE-2.0
14 * * Unless required by applicable law or agreed to in writing, software
15 * * distributed under the License is distributed on an "AS IS" BASIS,
16 * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * * See the License for the specific language governing permissions and
18 * * limitations under the License.
19 * * ============LICENSE_END=========================================================
25 package org.onap.blueprintgenerator.service.common.kafka;
27 import static org.onap.blueprintgenerator.service.common.kafka.KafkaCommonConstants.AAF_KAFKA_PASSWORD_INPUT_NAME;
28 import static org.onap.blueprintgenerator.service.common.kafka.KafkaCommonConstants.AFF_KAFKA_USER_INPUT_NAME;
30 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
31 import com.fasterxml.jackson.annotation.JsonInclude;
32 import com.fasterxml.jackson.annotation.JsonProperty;
35 import org.onap.blueprintgenerator.model.common.BaseStream;
39 * @author : Tomasz Wrobel
40 * @date 01/18/2021 Application: DCAE/ONAP - Blueprint Generator
41 * Applications Common Model: A model class which represents Kafka Stream
45 @JsonInclude(value = JsonInclude.Include.NON_NULL)
46 @JsonIgnoreProperties(ignoreUnknown = true)
47 public class KafkaStream implements BaseStream {
49 private final String type = "kafka";
51 @JsonProperty("aaf_credentials")
52 private AafCredential aafCredential;
54 @JsonProperty("kafka_info")
55 private KafkaInfo kafkaInfo;
57 public KafkaStream(String topicName) {
58 this.aafCredential = new AafCredential(AFF_KAFKA_USER_INPUT_NAME, AAF_KAFKA_PASSWORD_INPUT_NAME);
59 this.kafkaInfo = new KafkaInfo(topicName);