// Path: services/google/api/src/main/java/eu/hlavki/identity/services/google/config/Configuration.java
// public interface Configuration {
// 
//     String getGSuiteDomain();
// 
// 
//     String getGSuiteImplicitGroup();
// 
// 
//     boolean isSetGSuiteImplicitGroup();
// 
// 
//     String getServiceAccountEmail();
// 
// 
//     String getServiceAccountSubject();
// 
// 
//     Set<String> getServiceAccountScopes();
// 
// 
//     PrivateKey readServiceAccountKey() throws NoPrivateKeyException;
// 
// 
//     void setServiceAccount(String clientEmail, String privateKey, String subject, String tokenUri);
// 
// 
//     void resetServiceAccount();
// 
// 
//     String getServiceAccountTokenUri();
// 
// 
//     long getServiceAccountTokenLifetime();
// 
// 
//     String getPushServiceHostname();
// 
// 
//     void setPushServiceHostname(String hostname);
// 
// 
//     File getPushChannelFile();
// 
// 
//     boolean isPushEnabled();
// 
// 
//     void setPushEnabled(boolean value);
// 
// 
//     Duration getPushRefreshInterval();
// }


import eu.hlavki.identity.services.google.config.Configuration;
import org.apache.karaf.shell.api.action.Action;
import org.apache.karaf.shell.api.action.Argument;
import org.apache.karaf.shell.api.action.Command;
import org.apache.karaf.shell.api.action.lifecycle.Reference;
import org.apache.karaf.shell.api.action.lifecycle.Service;
package eu.hlavki.identity.services.google.client;


@Service
@Command(scope = "google", name = "configure-service-account", description = "Configure service account")
public class ConfigureServiceAccountCommand implements Action {

    @Argument(index = 0, name = "clientEmail", description = "Service account client email", required = true, multiValued = false)
    String clientEmail;

    @Argument(index = 1, name = "privateKey", description = "Base64 encoded private key", required = true, multiValued = false)
    String privateKey;

    @Argument(index = 2, name = "subject", description = "Subject email", required = true, multiValued = false)
    String subject;

    @Argument(index = 3, name = "tokenUri", description = "Uri to obtain security token", required = true, multiValued = false)
    String tokenUri;

    @Reference
// Path: services/google/api/src/main/java/eu/hlavki/identity/services/google/config/Configuration.java
// public interface Configuration {
// 
//     String getGSuiteDomain();
// 
// 
//     String getGSuiteImplicitGroup();
// 
// 
//     boolean isSetGSuiteImplicitGroup();
// 
// 
//     String getServiceAccountEmail();
// 
// 
//     String getServiceAccountSubject();
// 
// 
//     Set<String> getServiceAccountScopes();
// 
// 
//     PrivateKey readServiceAccountKey() throws NoPrivateKeyException;
// 
// 
//     void setServiceAccount(String clientEmail, String privateKey, String subject, String tokenUri);
// 
// 
//     void resetServiceAccount();
// 
// 
//     String getServiceAccountTokenUri();
// 
// 
//     long getServiceAccountTokenLifetime();
// 
// 
//     String getPushServiceHostname();
// 
// 
//     void setPushServiceHostname(String hostname);
// 
// 
//     File getPushChannelFile();
// 
// 
//     boolean isPushEnabled();
// 
// 
//     void setPushEnabled(boolean value);
// 
// 
//     Duration getPushRefreshInterval();
// }


// Path: services/google/client/src/main/java/eu/hlavki/identity/services/google/client/ConfigureServiceAccountCommand.java
import eu.hlavki.identity.services.google.config.Configuration;
import org.apache.karaf.shell.api.action.Action;
import org.apache.karaf.shell.api.action.Argument;
import org.apache.karaf.shell.api.action.Command;
import org.apache.karaf.shell.api.action.lifecycle.Reference;
import org.apache.karaf.shell.api.action.lifecycle.Service;

package eu.hlavki.identity.services.google.client;


@Service
@Command(scope = "google", name = "configure-service-account", description = "Configure service account")
public class ConfigureServiceAccountCommand implements Action {

    @Argument(index = 0, name = "clientEmail", description = "Service account client email", required = true, multiValued = false)
    String clientEmail;

    @Argument(index = 1, name = "privateKey", description = "Base64 encoded private key", required = true, multiValued = false)
    String privateKey;

    @Argument(index = 2, name = "subject", description = "Subject email", required = true, multiValued = false)
    String subject;

    @Argument(index = 3, name = "tokenUri", description = "Uri to obtain security token", required = true, multiValued = false)
    String tokenUri;

    @Reference
    Configuration config;