/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.apache.camel.component.linkedin.springboot;

import java.util.Map;
import javax.annotation.Generated;
import org.apache.camel.component.linkedin.api.OAuthScope;
import org.apache.camel.component.linkedin.api.OAuthSecureStorage;
import org.apache.camel.component.linkedin.internal.LinkedInApiName;
import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * The linkedin component is used for retrieving LinkedIn user profiles,
 * connections, companies, groups, posts, etc.
 * 
 * Generated by camel-package-maven-plugin - do not edit this file!
 */
@Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
@ConfigurationProperties(prefix = "camel.component.linkedin")
public class LinkedInComponentConfiguration
        extends
            ComponentConfigurationPropertiesCommon {

    /**
     * Whether to enable auto configuration of the linkedin component. This is
     * enabled by default.
     */
    private Boolean enabled;
    /**
     * To use the shared configuration
     */
    private LinkedInConfigurationNestedConfiguration configuration;
    /**
     * Whether the component should use basic property binding (Camel 2.x) or
     * the newer property binding with additional capabilities
     */
    private Boolean basicPropertyBinding = false;

    public LinkedInConfigurationNestedConfiguration getConfiguration() {
        return configuration;
    }

    public void setConfiguration(
            LinkedInConfigurationNestedConfiguration configuration) {
        this.configuration = configuration;
    }

    public Boolean getBasicPropertyBinding() {
        return basicPropertyBinding;
    }

    public void setBasicPropertyBinding(Boolean basicPropertyBinding) {
        this.basicPropertyBinding = basicPropertyBinding;
    }

    public static class LinkedInConfigurationNestedConfiguration {
        public static final Class CAMEL_NESTED_CLASS = org.apache.camel.component.linkedin.LinkedInConfiguration.class;
        /**
         * What kind of operation to perform
         */
        private LinkedInApiName apiName;
        /**
         * What sub operation to use for the selected operation
         */
        private String methodName;
        /**
         * LinkedIn user account name, MUST be provided
         */
        private String userName;
        /**
         * LinkedIn account password
         */
        private String userPassword;
        /**
         * LinkedIn access token to avoid username and password login procedure.
         * LinkedIn responds to login forms by using a CAPTCHA. This makes it
         * impossible for a standalone, headless process to log in to LinkedIn
         * by specifying a username and password. To work around this, obtain a
         * LinkedIn access token and provide the token as the setting of the
         * accessToken parameter. Obtaining a LinkedIn access token is a
         * multi-step procedure. You must configure your LinkedIn application,
         * obtain a LinkedIn authorization code, and exchange that code for the
         * LinkedIn access token. For details, see:
         * https://developer.linkedin.com/docs/oauth2 The default behavior is
         * that the access token expires after 60 days. To change this, specify
         * a value for the expiryTime paramter. If the access token expires, the
         * LinkedIn component tries to log in to LinkedIn by providing a
         * username and password, which results in a CAPTCHA so the login fails.
         * The LinkedIn component cannot refresh the access token. You must
         * manually obtain a new access token each time an access token expires.
         * When you update the access token you must restart the application so
         * that it uses the new token.
         */
        private String accessToken;
        /**
         * A number of milliseconds since the UNIX Epoch. The default is 60
         * days. A LinkedIn access token expires when this amount of time
         * elapses after the token is in use.
         */
        private Long expiryTime;
        /**
         * Callback interface for providing an OAuth token or to store the token
         * generated by the component. The callback should return null on the
         * first call and then save the created token in the saveToken()
         * callback. If the callback returns null the first time, a userPassword
         * MUST be provided.
         */
        private OAuthSecureStorage secureStorage;
        /**
         * LinkedIn application client ID
         */
        private String clientId;
        /**
         * LinkedIn application client secret
         */
        private String clientSecret;
        /**
         * List of LinkedIn scopes as specified at
         * https://developer.linkedin.com/documents/authentication#granting
         */
        private OAuthScope[] scopes;
        /**
         * Application redirect URI, although the component never redirects to
         * this page to avoid having to have a functioning redirect server. For
         * testing, one could use https://localhost.
         */
        private String redirectUri;
        /**
         * Custom HTTP parameters, for example, proxy host and port. Use
         * constants from AllClientPNames.
         */
        private Map httpParams;
        /**
         * Flag to enable/disable lazy OAuth, default is true. When enabled,
         * OAuth token retrieval or generation is not done until the first REST
         * call.
         */
        private Boolean lazyAuth = true;

        public LinkedInApiName getApiName() {
            return apiName;
        }

        public void setApiName(LinkedInApiName apiName) {
            this.apiName = apiName;
        }

        public String getMethodName() {
            return methodName;
        }

        public void setMethodName(String methodName) {
            this.methodName = methodName;
        }

        public String getUserName() {
            return userName;
        }

        public void setUserName(String userName) {
            this.userName = userName;
        }

        public String getUserPassword() {
            return userPassword;
        }

        public void setUserPassword(String userPassword) {
            this.userPassword = userPassword;
        }

        public String getAccessToken() {
            return accessToken;
        }

        public void setAccessToken(String accessToken) {
            this.accessToken = accessToken;
        }

        public Long getExpiryTime() {
            return expiryTime;
        }

        public void setExpiryTime(Long expiryTime) {
            this.expiryTime = expiryTime;
        }

        public OAuthSecureStorage getSecureStorage() {
            return secureStorage;
        }

        public void setSecureStorage(OAuthSecureStorage secureStorage) {
            this.secureStorage = secureStorage;
        }

        public String getClientId() {
            return clientId;
        }

        public void setClientId(String clientId) {
            this.clientId = clientId;
        }

        public String getClientSecret() {
            return clientSecret;
        }

        public void setClientSecret(String clientSecret) {
            this.clientSecret = clientSecret;
        }

        public OAuthScope[] getScopes() {
            return scopes;
        }

        public void setScopes(OAuthScope[] scopes) {
            this.scopes = scopes;
        }

        public String getRedirectUri() {
            return redirectUri;
        }

        public void setRedirectUri(String redirectUri) {
            this.redirectUri = redirectUri;
        }

        public Map getHttpParams() {
            return httpParams;
        }

        public void setHttpParams(Map httpParams) {
            this.httpParams = httpParams;
        }

        public Boolean getLazyAuth() {
            return lazyAuth;
        }

        public void setLazyAuth(Boolean lazyAuth) {
            this.lazyAuth = lazyAuth;
        }
    }
}