Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * 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.cloudstack.domain;
 
 import static com.google.common.base.Preconditions.checkNotNull;
 
 import java.util.Date;
 
 
Class ISOExtraction

Author(s):
Richard Downer
 
 public class ISOExtraction {
 
    public static Builder<?> builder() {
       return new ConcreteBuilder();
    }
 
    public Builder<?> toBuilder() {
       return new ConcreteBuilder().fromISOExtraction(this);
    }
 
    public abstract static class Builder<T extends Builder<T>> {
       protected abstract T self();
 
       protected String id;
       protected String accountId;
       protected Date created;
       protected String extractId;
       protected ExtractMode extractMode;
       protected String name;
       protected String state;
       protected String status;
       protected String storageType;
       protected int uploadPercentage;
       protected String url;
       protected String zoneId;
       protected String zoneName;

      
 
       public T id(String id) {
          this. = id;
          return self();
       }

      
 
       public T accountId(String accountId) {
          this. = accountId;
          return self();
       }

      
 
       public T created(Date created) {
          this. = created;
          return self();
       }

      
 
       public T extractId(String extractId) {
          this. = extractId;
          return self();
       }

      
 
       public T extractMode(ExtractMode extractMode) {
          this. = extractMode;
          return self();
       }

      
      public T name(String name) {
         this. = name;
         return self();
      }

      
      public T state(String state) {
         this. = state;
         return self();
      }

      
      public T status(String status) {
         this. = status;
         return self();
      }

      
      public T storageType(String storageType) {
         this. = storageType;
         return self();
      }

      
      public T uploadPercentage(int uploadPercentage) {
         this. = uploadPercentage;
         return self();
      }

      
      public T url(String url) {
         this. = url;
         return self();
      }

      
      public T zoneId(String zoneId) {
         this. = zoneId;
         return self();
      }

      
      public T zoneName(String zoneName) {
         this. = zoneName;
         return self();
      }
      public ISOExtraction build() {
      }
      public T fromISOExtraction(ISOExtraction in) {
         return this
               .id(in.getId())
               .accountId(in.getAccountId())
               .created(in.getCreated())
               .extractId(in.getExtractId())
               .extractMode(in.getExtractMode())
               .name(in.getName())
               .state(in.getState())
               .status(in.getStatus())
               .storageType(in.getStorageType())
               .uploadPercentage(in.getUploadPercentage())
               .url(in.getUrl())
               .zoneId(in.getZoneId())
               .zoneName(in.getZoneName());
      }
   }
   private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
      @Override
      protected ConcreteBuilder self() {
         return this;
      }
   }
   private final String id;
   private final String accountId;
   private final Date created;
   private final String extractId;
   private final ExtractMode extractMode;
   private final String name;
   private final String state;
   private final String status;
   private final String storageType;
   private final int uploadPercentage;
   private final String url;
   private final String zoneId;
   private final String zoneName;
         "id""accountid""created""extractId""extractMode""name""state""status""storagetype""uploadpercentage""url""zoneid""zonename"
   })
   protected ISOExtraction(String id, @Nullable String accountId, @Nullable Date created, @Nullable String extractId,
                           @Nullable ExtractMode extractMode, @Nullable String name, @Nullable String state, @Nullable String status,
                           @Nullable String storageTypeint uploadPercentage, @Nullable String url, @Nullable String zoneId,
                           @Nullable String zoneName) {
      this. = checkNotNull(id"id");
      this. = accountId;
      this. = created;
      this. = extractId;
      this. = extractMode;
      this. = name;
      this. = state;
      this. = status;
      this. = storageType;
      this. = uploadPercentage;
      this. = url;
      this. = zoneId;
      this. = zoneName;
   }

   

Returns:
the id of extracted object
   public String getId() {
      return this.;
   }

   

Returns:
the account id to which the extracted object belongs
   public String getAccountId() {
      return this.;
   }

   

Returns:
the time and date the object was created
   public Date getCreated() {
      return this.;
   }

   

Returns:
the upload id of extracted object
   public String getExtractId() {
      return this.;
   }

   

Returns:
the mode of extraction - upload or download
   public ExtractMode getExtractMode() {
      return this.;
   }

   

Returns:
the name of the extracted object
   public String getName() {
      return this.;
   }

   

Returns:
the state of the extracted object
   public String getState() {
      return this.;
   }

   

Returns:
the status of the extraction
   public String getStatus() {
      return this.;
   }

   

Returns:
type of the storage
   public String getStorageType() {
      return this.;
   }

   

Returns:
the percentage of the entity uploaded to the specified location
   public int getUploadPercentage() {
      return this.;
   }

   

Returns:
if mode = upload then url of the uploaded entity. if mode = download the url from which the entity can be downloaded
   public String getUrl() {
      return this.;
   }

   

Returns:
zone ID the object was extracted from
   public String getZoneId() {
      return this.;
   }

   

Returns:
zone name the object was extracted from
   public String getZoneName() {
      return this.;
   }
   public int hashCode() {
   }
   public boolean equals(Object obj) {
      if (this == objreturn true;
      if (obj == null || getClass() != obj.getClass()) return false;
      ISOExtraction that = ISOExtraction.class.cast(obj);
      return Objects.equal(this.that.id)
            && Objects.equal(this.that.accountId)
            && Objects.equal(this.that.created)
            && Objects.equal(this.that.extractId)
            && Objects.equal(this.that.extractMode)
            && Objects.equal(this.that.name)
            && Objects.equal(this.that.state)
            && Objects.equal(this.that.status)
            && Objects.equal(this.that.storageType)
            && Objects.equal(this.that.uploadPercentage)
            && Objects.equal(this.that.url)
            && Objects.equal(this.that.zoneId)
            && Objects.equal(this.that.zoneName);
   }
   protected ToStringHelper string() {
      return Objects.toStringHelper(this)
            .add("id").add("accountId").add("created").add("extractId").add("extractMode")
            .add("name").add("state").add("status").add("storageType").add("uploadPercentage")
            .add("url").add("zoneId").add("zoneName");
   }
   public String toString() {
      return string().toString();
   }
New to GrepCode? Check out our FAQ X