// Path: kcbq-connector/src/main/java/com/wepay/kafka/connect/bigquery/exception/GCSConnectException.java
// public class GCSConnectException extends ConnectException {
//   public GCSConnectException(String msg) {
//     super(msg);
//   }
// 
//   public GCSConnectException(String msg, Throwable thr) {
//     super(msg, thr);
//   }
// }


import com.google.auth.oauth2.GoogleCredentials;
import com.google.cloud.storage.Storage;
import com.google.cloud.storage.StorageOptions;
import com.wepay.kafka.connect.bigquery.exception.GCSConnectException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.ByteArrayInputStream;
import java.nio.charset.StandardCharsets;
package com.wepay.kafka.connect.bigquery;

/*
 * Copyright 2016 WePay, Inc.
 *
 * Licensed 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.
 */




/**
 * Convenience class for creating a {@link com.google.cloud.storage.Storage} instance
 */
public class GCSBuilder {
    private static final Logger logger = LoggerFactory.getLogger(GCSBuilder.class);

    private final String projectName;
    private String key;
    private String keySource;

    public GCSBuilder(String projectName) {
        this.projectName = projectName;
// Path: kcbq-connector/src/main/java/com/wepay/kafka/connect/bigquery/exception/GCSConnectException.java
// public class GCSConnectException extends ConnectException {
//   public GCSConnectException(String msg) {
//     super(msg);
//   }
// 
//   public GCSConnectException(String msg, Throwable thr) {
//     super(msg, thr);
//   }
// }


// Path: kcbq-connector/src/main/java/com/wepay/kafka/connect/bigquery/GCSBuilder.java
import com.google.auth.oauth2.GoogleCredentials;
import com.google.cloud.storage.Storage;
import com.google.cloud.storage.StorageOptions;
import com.wepay.kafka.connect.bigquery.exception.GCSConnectException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.ByteArrayInputStream;
import java.nio.charset.StandardCharsets;

package com.wepay.kafka.connect.bigquery;

/*
 * Copyright 2016 WePay, Inc.
 *
 * Licensed 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.
 */




/**
 * Convenience class for creating a {@link com.google.cloud.storage.Storage} instance
 */
public class GCSBuilder {
    private static final Logger logger = LoggerFactory.getLogger(GCSBuilder.class);

    private final String projectName;
    private String key;
    private String keySource;

    public GCSBuilder(String projectName) {
        this.projectName = projectName;
        this.key = null;