// Path: src/main/java/com/tango/BucketSyncer/ObjectSummaries/GCS_ObjectSummary.java
// public class GCS_ObjectSummary implements ObjectSummary {
//     StorageObject storageObject;
// 
//     public GCS_ObjectSummary(StorageObject storageObject) {
//         this.storageObject = storageObject;
//     }
// 
//     @Override
//     public String getKey() {
//         return storageObject.getName();
//     }
// 
//     @Override
//     public long getSize() {
//         return storageObject.getSize().longValue();
//     }
// 
//     @Override
//     public Date getLastModified() {
//         return new Date(storageObject.getUpdated().getValue());
//     }
// 
//     @Override
//     public String getETag() {
//         return storageObject.getEtag();
//     }
// }
// 
// Path: src/main/java/com/tango/BucketSyncer/ObjectSummaries/ObjectSummary.java
// public interface ObjectSummary {
//     public String getKey();
// 
//     public long getSize();
// 
//     public Date getLastModified();
// 
//     public String getETag();
// }


import com.google.api.services.storage.Storage;
import com.google.api.services.storage.model.Objects;
import com.google.api.services.storage.model.StorageObject;
import com.tango.BucketSyncer.*;
import com.tango.BucketSyncer.ObjectSummaries.GCS_ObjectSummary;
import com.tango.BucketSyncer.ObjectSummaries.ObjectSummary;
import lombok.extern.slf4j.Slf4j;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
            for (StorageObject object : objects.getItems()) {
                // Add to object summaries
                ObjectSummary os = new GCS_ObjectSummary(object);
                summaries.add(os);
            }
            context.getStats().objectsRead.addAndGet(objects.size());
            if (options.isVerbose()) {
                log.info("added initial set of {} keys", objects.size());
            }
        }
    }

    @Override
    public void run() {
        final MirrorOptions options = context.getOptions();
        final boolean verbose = options.isVerbose();
        int counter = 0;
        int fetchSize = options.getMaxThreads();
        log.info("starting...");
        try {
            while (true) {
                while (getSize() < maxQueueCapacity) {
                    if (objects.getNextPageToken() != null) {
                        objects = gcsGetNextBatch(bucket, prefix, Long.valueOf(fetchSize));
                        if (++counter % 100 == 0) {
                            context.getStats().logStats();
                        }
                        synchronized (summaries) {
                            for (StorageObject object : objects.getItems()) {
                                // Add to object summaries
// Path: src/main/java/com/tango/BucketSyncer/ObjectSummaries/GCS_ObjectSummary.java
// public class GCS_ObjectSummary implements ObjectSummary {
//     StorageObject storageObject;
// 
//     public GCS_ObjectSummary(StorageObject storageObject) {
//         this.storageObject = storageObject;
//     }
// 
//     @Override
//     public String getKey() {
//         return storageObject.getName();
//     }
// 
//     @Override
//     public long getSize() {
//         return storageObject.getSize().longValue();
//     }
// 
//     @Override
//     public Date getLastModified() {
//         return new Date(storageObject.getUpdated().getValue());
//     }
// 
//     @Override
//     public String getETag() {
//         return storageObject.getEtag();
//     }
// }
// 
// Path: src/main/java/com/tango/BucketSyncer/ObjectSummaries/ObjectSummary.java
// public interface ObjectSummary {
//     public String getKey();
// 
//     public long getSize();
// 
//     public Date getLastModified();
// 
//     public String getETag();
// }


// Path: src/main/java/com/tango/BucketSyncer/KeyListers/GCSKeyLister.java
import com.google.api.services.storage.Storage;
import com.google.api.services.storage.model.Objects;
import com.google.api.services.storage.model.StorageObject;
import com.tango.BucketSyncer.*;
import com.tango.BucketSyncer.ObjectSummaries.GCS_ObjectSummary;
import com.tango.BucketSyncer.ObjectSummaries.ObjectSummary;
import lombok.extern.slf4j.Slf4j;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

            for (StorageObject object : objects.getItems()) {
                // Add to object summaries
                ObjectSummary os = new GCS_ObjectSummary(object);
                summaries.add(os);
            }
            context.getStats().objectsRead.addAndGet(objects.size());
            if (options.isVerbose()) {
                log.info("added initial set of {} keys", objects.size());
            }
        }
    }

    @Override
    public void run() {
        final MirrorOptions options = context.getOptions();
        final boolean verbose = options.isVerbose();
        int counter = 0;
        int fetchSize = options.getMaxThreads();
        log.info("starting...");
        try {
            while (true) {
                while (getSize() < maxQueueCapacity) {
                    if (objects.getNextPageToken() != null) {
                        objects = gcsGetNextBatch(bucket, prefix, Long.valueOf(fetchSize));
                        if (++counter % 100 == 0) {
                            context.getStats().logStats();
                        }
                        synchronized (summaries) {
                            for (StorageObject object : objects.getItems()) {
                                // Add to object summaries
                                ObjectSummary os = new GCS_ObjectSummary(object);