001/*
002 * Copyright 2012-2018 the original author or authors.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 *      http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016
017package org.springframework.boot.autoconfigure.elasticsearch.rest;
018
019import java.util.ArrayList;
020import java.util.Collections;
021import java.util.List;
022
023import org.springframework.boot.context.properties.ConfigurationProperties;
024
025/**
026 * Configuration properties for Elasticsearch REST clients.
027 *
028 * @author Brian Clozel
029 * @since 2.1.0
030 */
031@ConfigurationProperties(prefix = "spring.elasticsearch.rest")
032public class RestClientProperties {
033
034        /**
035         * Comma-separated list of the Elasticsearch instances to use.
036         */
037        private List<String> uris = new ArrayList<>(
038                        Collections.singletonList("http://localhost:9200"));
039
040        /**
041         * Credentials username.
042         */
043        private String username;
044
045        /**
046         * Credentials password.
047         */
048        private String password;
049
050        public List<String> getUris() {
051                return this.uris;
052        }
053
054        public void setUris(List<String> uris) {
055                this.uris = uris;
056        }
057
058        public String getUsername() {
059                return this.username;
060        }
061
062        public void setUsername(String username) {
063                this.username = username;
064        }
065
066        public String getPassword() {
067                return this.password;
068        }
069
070        public void setPassword(String password) {
071                this.password = password;
072        }
073
074}