Github user jtstorck commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/1636#discussion_r109962882
  
    --- Diff: 
nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/storage/utils/BlobInfo.java
 ---
    @@ -0,0 +1,188 @@
    +/*
    + * 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.nifi.processors.azure.storage.utils;
    +
    +import java.io.Serializable;
    +
    +import org.apache.nifi.processors.standard.util.ListableEntity;
    +
    +public class BlobInfo implements Comparable<BlobInfo>, Serializable, 
ListableEntity {
    +    private static final long serialVersionUID = 1L;
    +
    +    private final String primaryUri;
    +    private final String secondaryUri;
    +    private final String contentType;
    +    private final String contentLanguage;
    +    private final String etag;
    +    private final long lastModifiedTime;
    +    private final long length;
    +    private final String blobType;
    +
    +    public static long getSerialversionuid() {
    +        return serialVersionUID;
    +    }
    +
    +    public String getPrimaryUri() {
    +        return primaryUri;
    +    }
    +
    +    public String getSecondaryUri() {
    +        return secondaryUri;
    +    }
    +
    +    public String getContentType() {
    +        return contentType;
    +    }
    +
    +    public String getContentLanguage() {
    +        return contentLanguage;
    +    }
    +
    +    public String getEtag() {
    +        return etag;
    +    }
    +
    +    public long getLastModifiedTime() {
    +        return lastModifiedTime;
    +    }
    +
    +    public long getLength() {
    +        return length;
    +    }
    +
    +    public String getBlobType() {
    +        return blobType;
    +    }
    +
    +    public static final class Builder {
    +        private String primaryUri;
    +        private String secondaryUri;
    +        private String contentType;
    +        private String contentLanguage;
    +        private String etag;
    +        private long lastModifiedTime;
    +        private long length;
    +        private String blobType;
    +
    +        public Builder primaryUri(String primaryUri) {
    +            this.primaryUri = primaryUri;
    +            return this;
    +        }
    +
    +        public Builder secondaryUri(String secondaryUri) {
    +            this.secondaryUri = secondaryUri;
    +            return this;
    +        }
    +
    +        public Builder contentType(String contentType) {
    +            this.contentType = contentType;
    +            return this;
    +        }
    +
    +        public Builder contentLanguage(String contentLanguage) {
    +            this.contentLanguage = contentLanguage;
    +            return this;
    +        }
    +
    +        public Builder etag(String etag) {
    +            this.etag = etag;
    +            return this;
    +        }
    +
    +        public Builder lastModifiedTime(long lastModifiedTime) {
    +            this.lastModifiedTime = lastModifiedTime;
    +            return this;
    +        }
    +
    +        public Builder length(long length) {
    +            this.length = length;
    +            return this;
    +        }
    +
    +        public Builder blobType(String blobType) {
    +            this.blobType = blobType;
    +            return this;
    +        }
    +
    +        public BlobInfo build() {
    +            return new BlobInfo(this);
    +        }
    +
    +    }
    +
    +    @Override
    +    public int hashCode() {
    +        final int prime = 31;
    +        int result = 1;
    +        result = prime * result + ((etag == null) ? 0 : etag.hashCode());
    +        return result;
    +    }
    +
    +    @Override
    +    public boolean equals(Object obj) {
    +        if (this == obj) {
    +            return true;
    +        }
    +        if (obj == null) {
    +            return false;
    +        }
    +        if (getClass() != obj.getClass()) {
    +            return false;
    +        }
    +        BlobInfo other = (BlobInfo) obj;
    +        if (etag == null) {
    +            if (other.etag != null) {
    +                return false;
    +            }
    +        } else if (!etag.equals(other.etag)) {
    +            return false;
    +        }
    +        return true;
    +    }
    +
    +    @Override
    +    public int compareTo(BlobInfo o) {
    +        return etag.compareTo(o.etag);
    +    }
    +
    +    protected BlobInfo(final Builder builder) {
    --- End diff --
    
    With the builder being available for constructing this class, typically 
this constructor should be private.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to