jiffysrc commented on a change in pull request #125:
URL: https://github.com/apache/jclouds/pull/125#discussion_r775464229



##########
File path: 
apis/s3/src/main/java/org/jclouds/s3/domain/internal/ListVersionsResponseImpl.java
##########
@@ -0,0 +1,208 @@
+/*
+ * 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.jclouds.s3.domain.internal;
+
+import java.util.LinkedHashSet;
+import java.util.Set;
+
+import com.google.common.collect.Iterables;
+
+import org.jclouds.s3.domain.ListVersionsResponse;
+import org.jclouds.s3.domain.ObjectMetadata;
+
+public class ListVersionsResponseImpl extends LinkedHashSet<ObjectMetadata>
+    implements ListVersionsResponse {
+
+    protected final String name;
+    protected final String prefix;
+    protected final int maxKeys;
+    protected final String delimiter;
+    protected final String marker;
+    protected final String nextMarker;
+    protected final Set<String> commonPrefixes;
+    protected final boolean truncated;
+    protected final String nextVersionIdMarker;
+    protected final String versionIdMarker;
+
+    public ListVersionsResponseImpl(String name,
+                                    Iterable<ObjectMetadata> version,
+                                    String prefix, String marker,
+                                    String nextMarker, int maxKeys,
+                                    String delimiter, boolean truncated,
+                                    Set<String> commonPrefixes
+                                    ) {
+        Iterables.addAll(this, version);
+        this.name = name;
+        this.prefix = prefix;
+        this.maxKeys = maxKeys;
+        this.delimiter = delimiter;
+        this.marker = marker;
+        this.nextMarker = nextMarker;
+        this.commonPrefixes = commonPrefixes;
+        this.truncated = truncated;
+        this.nextVersionIdMarker = null;
+        this.versionIdMarker = null;
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Set<String> getCommonPrefixes() {
+        return commonPrefixes;
+    }
+
+    @Override
+    public String getNextVersionIdMarker() {
+        return null;
+    }
+
+    @Override
+    public String getVersionIdMarker() {
+        return null;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public String getDelimiter() {
+        return delimiter;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public String getMarker() {
+        return marker;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public String getNextMarker() {
+        return nextMarker;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public int getMaxKeys() {
+        return maxKeys;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public String getPrefix() {
+        return prefix;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public boolean isTruncated() {
+        return truncated;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public String getName() {
+        return name;
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = super.hashCode();
+        result = prime * result +
+            ((commonPrefixes == null) ? 0 : commonPrefixes.hashCode());
+        result =
+            prime * result + ((delimiter == null) ? 0 : delimiter.hashCode());
+        result = prime * result + ((marker == null) ? 0 : marker.hashCode());
+        result = prime * result + maxKeys;
+        result = prime * result + ((name == null) ? 0 : name.hashCode());
+        result = prime * result + ((prefix == null) ? 0 : prefix.hashCode());
+        result = prime * result + (truncated ? 1231 : 1237);
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {

Review comment:
       Done as part of bucket configuration PR




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@jclouds.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to