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 ISO

Author(s):
Richard Downer
 
 public class ISO {

   
 
    public static enum ISOFilter {
 
       featured, self, self_executable, executable, community, UNRECOGNIZED;
 
       public static ISOFilter fromValue(String format) {
          try {
             return valueOf(checkNotNull(format"format"));
          } catch (IllegalArgumentException e) {
             return ;
          }
       }
    }
 
    public static Builder<?> builder() {
       return new ConcreteBuilder();
    }
 
    public Builder<?> toBuilder() {
       return new ConcreteBuilder().fromISO(this);
    }
 
    public abstract static class Builder<T extends Builder<T>> {
       protected abstract T self();
 
       protected String id;
       protected String account;
       protected String accountId;
       protected boolean bootable;
       protected String checksum;
       protected Date created;
       protected boolean crossZones;
       protected String displayText;
       protected String domain;
       protected String domainid;
       protected String format;
       protected String hostId;
       protected String hostName;
       protected String hypervisor;
       protected boolean isExtractable;
       protected boolean isFeatured;
       protected boolean isPublic;
       protected boolean isReady;
       protected String jobId;
       protected String jobStatus;
       protected String name;
       protected String osTypeId;
       protected String osTypeName;
       protected boolean passwordEnabled;
       protected Date removed;
       protected long size;
       protected String sourceTemplateId;
       protected String status;
       protected String templateTag;
       protected String templateType;
       protected String zoneId;
       protected String zoneName;

      

See also:
ISO.getId()
 
       public T id(String id) {
          this. = id;
         return self();
      }

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

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

      
      public T bootable(boolean bootable) {
         this. = bootable;
         return self();
      }

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

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

      
      public T crossZones(boolean crossZones) {
         this. = crossZones;
         return self();
      }

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

      

See also:
ISO.getDomain()
      public T domain(String domain) {
         this. = domain;
         return self();
      }

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

      

See also:
ISO.getFormat()
      public T format(String format) {
         this. = format;
         return self();
      }

      

See also:
ISO.getHostId()
      public T hostId(String hostId) {
         this. = hostId;
         return self();
      }

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

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

      
      public T isExtractable(boolean isExtractable) {
         this. = isExtractable;
         return self();
      }

      
      public T isFeatured(boolean isFeatured) {
         this. = isFeatured;
         return self();
      }

      

See also:
ISO.isPublic()
      public T isPublic(boolean isPublic) {
         this. = isPublic;
         return self();
      }

      

See also:
ISO.isReady()
      public T isReady(boolean isReady) {
         this. = isReady;
         return self();
      }

      

See also:
ISO.getJobId()
      public T jobId(String jobId) {
         this. = jobId;
         return self();
      }

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

      

See also:
ISO.getName()
      public T name(String name) {
         this. = name;
         return self();
      }

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

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

      
      public T passwordEnabled(boolean passwordEnabled) {
         this. = passwordEnabled;
         return self();
      }

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

      

See also:
ISO.getSize()
      public T size(long size) {
         this. = size;
         return self();
      }

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

      

See also:
ISO.getStatus()
      public T status(String status) {
         this. = status;
         return self();
      }

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

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

      

See also:
ISO.getZoneId()
      public T zoneId(String zoneId) {
         this. = zoneId;
         return self();
      }

      
      public T zoneName(String zoneName) {
         this. = zoneName;
         return self();
      }
      public ISO build() {
         return new ISO(,
               ,
               );
      }
      public T fromISO(ISO in) {
         return this
               .id(in.getId())
               .account(in.getAccount())
               .accountId(in.getAccountId())
               .bootable(in.isBootable())
               .checksum(in.getChecksum())
               .created(in.getCreated())
               .crossZones(in.isCrossZones())
               .displayText(in.getDisplayText())
               .domain(in.getDomain())
               .domainid(in.getDomainid())
               .format(in.getFormat())
               .hostId(in.getHostId())
               .hostName(in.getHostName())
               .hypervisor(in.getHypervisor())
               .isExtractable(in.isExtractable())
               .isFeatured(in.isFeatured())
               .isPublic(in.isPublic())
               .isReady(in.isReady())
               .jobId(in.getJobId())
               .jobStatus(in.getJobStatus())
               .name(in.getName())
               .osTypeId(in.getOsTypeId())
               .osTypeName(in.getOsTypeName())
               .passwordEnabled(in.isPasswordEnabled())
               .removed(in.getRemoved())
               .size(in.getSize())
               .sourceTemplateId(in.getSourceTemplateId())
               .status(in.getStatus())
               .templateTag(in.getTemplateTag())
               .templateType(in.getTemplateType())
               .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 account;
   private final String accountId;
   private final boolean bootable;
   private final String checksum;
   private final Date created;
   private final boolean crossZones;
   private final String displayText;
   private final String domain;
   private final String domainid;
   private final String format;
   private final String hostId;
   private final String hostName;
   private final String hypervisor;
   private final boolean isExtractable;
   private final boolean isFeatured;
   private final boolean isPublic;
   private final boolean isReady;
   private final String jobId;
   private final String jobStatus;
   private final String name;
   private final String osTypeId;
   private final String osTypeName;
   private final boolean passwordEnabled;
   private final Date removed;
   private final long size;
   private final String sourceTemplateId;
   private final String status;
   private final String templateTag;
   private final String templateType;
   private final String zoneId;
   private final String zoneName;
         "id""account""accountid""bootable""checksum""created""crossZones""displaytext""domain""domainid""format""hostid""hostname""hypervisor""isextractable""isfeatured""ispublic""isready""jobid""jobstatus""name""ostypeid""ostypename""passwordenabled""removed""size""sourcetemplateid""status""templatetag""templatetype""zoneid""zonename"
   })
   protected ISO(String id, @Nullable String account, @Nullable String accountIdboolean bootable, @Nullable String checksum,
                 @Nullable Date createdboolean crossZones, @Nullable String displayText, @Nullable String domain,
                 @Nullable String domainid, @Nullable String format, @Nullable String hostId, @Nullable String hostName,
                 @Nullable String hypervisorboolean isExtractableboolean isFeaturedboolean isPublicboolean isReady,
                 @Nullable String jobId, @Nullable String jobStatus, @Nullable String name, @Nullable String osTypeId,
                 @Nullable String osTypeNameboolean passwordEnabled, @Nullable Date removedlong size, @Nullable String sourceTemplateId,
                 @Nullable String status, @Nullable String templateTag, @Nullable String templateType, @Nullable String zoneId, @Nullable String zoneName) {
      this. = checkNotNull(id"id");
      this. = account;
      this. = accountId;
      this. = bootable;
      this. = checksum;
      this. = created;
      this. = crossZones;
      this. = displayText;
      this. = domain;
      this. = domainid;
      this. = format;
      this. = hostId;
      this. = hostName;
      this. = hypervisor;
      this. = isExtractable;
      this. = isFeatured;
      this. = isPublic;
      this. = isReady;
      this. = jobId;
      this. = jobStatus;
      this. = name;
      this. = osTypeId;
      this. = osTypeName;
      this. = passwordEnabled;
      this. = removed;
      this. = size;
      this. = sourceTemplateId;
      this. = status;
      this. = templateTag;
      this. = templateType;
      this. = zoneId;
      this. = zoneName;
   }

   

Returns:
the template ID
   public String getId() {
      return this.;
   }

   

Returns:
the account name to which the template belongs
   public String getAccount() {
      return this.;
   }

   

Returns:
the account id to which the template belongs
   public String getAccountId() {
      return this.;
   }
   public boolean isBootable() {
      return this.;
   }

   

Returns:
checksum of the template
   public String getChecksum() {
      return this.;
   }

   

Returns:
the date this template was created
   public Date getCreated() {
      return this.;
   }
   public boolean isCrossZones() {
      return this.;
   }

   

Returns:
the template display text
   public String getDisplayText() {
      return this.;
   }

   

Returns:
the name of the domain to which the template belongs
   public String getDomain() {
      return this.;
   }

   

Returns:
the ID of the domain to which the template belongs
   public String getDomainid() {
      return this.;
   }

   

Returns:
the format of the template.
   public String getFormat() {
      return this.;
   }

   

Returns:
the ID of the secondary storage host for the template
   public String getHostId() {
      return this.;
   }

   

Returns:
the name of the secondary storage host for the template
   public String getHostName() {
      return this.;
   }

   

Returns:
the hypervisor on which the template runs
   public String getHypervisor() {
      return this.;
   }
   public boolean isExtractable() {
      return this.;
   }
   public boolean isFeatured() {
      return this.;
   }
   public boolean isPublic() {
      return this.;
   }
   public boolean isReady() {
      return this.;
   }

   

Returns:
shows the current pending asynchronous job ID. This tag is not returned if no current pending jobs are acting on the template
   public String getJobId() {
      return this.;
   }

   

Returns:
shows the current pending asynchronous job status
   public String getJobStatus() {
      return this.;
   }

   

Returns:
the template name
   public String getName() {
      return this.;
   }

   

Returns:
the ID of the OS type for this template.
   public String getOsTypeId() {
      return this.;
   }

   

Returns:
the name of the OS type for this template.
   public String getOsTypeName() {
      return this.;
   }
   public boolean isPasswordEnabled() {
      return this.;
   }

   

Returns:
the date this template was removed
   public Date getRemoved() {
      return this.;
   }

   

Returns:
the size of the template
   public long getSize() {
      return this.;
   }

   

Returns:
the template ID of the parent template if present
   public String getSourceTemplateId() {
      return this.;
   }

   

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

   

Returns:
the tag of this template
   public String getTemplateTag() {
      return this.;
   }

   

Returns:
the type of the template
   public String getTemplateType() {
      return this.;
   }

   

Returns:
the ID of the zone for this template
   public String getZoneId() {
      return this.;
   }

   

Returns:
the name of the zone for this template
   public String getZoneName() {
      return this.;
   }
   public int hashCode() {
      return Objects.hashCode(,
   }
   public boolean equals(Object obj) {
      if (this == objreturn true;
      if (obj == null || getClass() != obj.getClass()) return false;
      ISO that = ISO.class.cast(obj);
      return Objects.equal(this.that.id)
            && Objects.equal(this.that.account)
            && Objects.equal(this.that.accountId)
            && Objects.equal(this.that.bootable)
            && Objects.equal(this.that.checksum)
            && Objects.equal(this.that.created)
            && Objects.equal(this.that.crossZones)
            && Objects.equal(this.that.displayText)
            && Objects.equal(this.that.domain)
            && Objects.equal(this.that.domainid)
            && Objects.equal(this.that.format)
            && Objects.equal(this.that.hostId)
            && Objects.equal(this.that.hostName)
            && Objects.equal(this.that.hypervisor)
            && Objects.equal(this.that.isExtractable)
            && Objects.equal(this.that.isFeatured)
            && Objects.equal(this.that.isPublic)
            && Objects.equal(this.that.isReady)
            && Objects.equal(this.that.jobId)
            && Objects.equal(this.that.jobStatus)
            && Objects.equal(this.that.name)
            && Objects.equal(this.that.osTypeId)
            && Objects.equal(this.that.osTypeName)
            && Objects.equal(this.that.passwordEnabled)
            && Objects.equal(this.that.removed)
            && Objects.equal(this.that.size)
            && Objects.equal(this.that.sourceTemplateId)
            && Objects.equal(this.that.status)
            && Objects.equal(this.that.templateTag)
            && Objects.equal(this.that.templateType)
            && Objects.equal(this.that.zoneId)
            && Objects.equal(this.that.zoneName);
   }
   protected ToStringHelper string() {
      return Objects.toStringHelper(this)
            .add("id").add("account").add("accountId").add("bootable")
            .add("checksum").add("created").add("crossZones").add("displayText")
            .add("domain").add("domainid").add("format").add("hostId").add("hostName")
            .add("hypervisor").add("isExtractable").add("isFeatured").add("isPublic")
            .add("isReady").add("jobId").add("jobStatus").add("name").add("osTypeId")
            .add("osTypeName").add("passwordEnabled").add("removed").add("size")
            .add("sourceTemplateId").add("status").add("templateTag").add("templateType")
            .add("zoneId").add("zoneName");
   }
   public String toString() {
      return string().toString();
   }
New to GrepCode? Check out our FAQ X