Add Native Kafka streams support in bp-generator
[dcaegen2/platform.git] / mod / bpgenerator / onap / src / main / java / org / onap / blueprintgenerator / service / common / kafka / KafkaStream.java
1 /*
2  *
3  *  * ============LICENSE_START=======================================================
4  *  *  org.onap.dcae
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
11  *  *
12  *  *       http://www.apache.org/licenses/LICENSE-2.0
13  *  *
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=========================================================
20  *
21  *
22  */
23
24
25 package org.onap.blueprintgenerator.service.common.kafka;
26
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;
29
30 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
31 import com.fasterxml.jackson.annotation.JsonInclude;
32 import com.fasterxml.jackson.annotation.JsonProperty;
33
34 import lombok.Data;
35 import org.onap.blueprintgenerator.model.common.BaseStream;
36
37
38 /**
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
42  */
43
44 @Data
45 @JsonInclude(value = JsonInclude.Include.NON_NULL)
46 @JsonIgnoreProperties(ignoreUnknown = true)
47 public class KafkaStream implements BaseStream {
48
49     private final String type = "kafka";
50
51     @JsonProperty("aaf_credentials")
52     private AafCredential aafCredential;
53
54     @JsonProperty("kafka_info")
55     private KafkaInfo kafkaInfo;
56
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);
60     }
61 }