Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Licensed to jclouds, Inc. (jclouds) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. jclouds 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.cloudsigma.domain;
 
 import static com.google.common.base.Preconditions.checkNotNull;
 
 import java.util.Set;
 
 

Author(s):
Adrian Cole
 
 public class CreateDriveRequest extends Drive {
    public static class Builder extends Drive.Builder {
 
       private Set<Stringavoid = ImmutableSet.of();
 
       @Nullable
       private String encryptionCipher;
 
       public Builder avoid(Iterable<Stringavoid) {
          this. = ImmutableSet.copyOf(checkNotNull(avoid"avoid"));
          return this;
       }

      
 
       @Override
       public Builder claimType(ClaimType claimType) {
          return Builder.class.cast(super.claimType(claimType));
       }
 
       public Builder encryptionCipher(String encryptionCipher) {
          this. = encryptionCipher;
          return this;
       }

      
 
       @Override
       public Builder name(String name) {
          return Builder.class.cast(super.name(name));
       }

      
 
       @Override
       public Builder readers(Iterable<Stringreaders) {
          return Builder.class.cast(super.readers(readers));
       }

      
 
       @Override
       public Builder size(long size) {
          return Builder.class.cast(super.size(size));
       }

      
 
       @Override
       public Builder use(Iterable<Stringuse) {
          return Builder.class.cast(super.use(use));
       }
 
       public CreateDriveRequest build() {
          return new CreateDriveRequest();
       }
    }
 
    private final Set<Stringavoid;
    @Nullable
    private final String encryptionCipher;
 
   public CreateDriveRequest(String namelong size, @Nullable ClaimType claimTypeIterable<Stringreaders,
         Iterable<Stringuse, @Nullable String encryptionCipherIterable<Stringavoid) {
      super(nullnamesizeclaimTypereadersuse);
      this. = encryptionCipher;
      this. = ImmutableSet.copyOf(checkNotNull(avoid"avoid"));
   }

   

Returns:
list of existing drives to ensure this new drive is created on physical different hardware than those existing drives
   public Set<StringgetAvoid() {
      return ;
   }

   

Returns:
either 'none' or 'aes-xts-plain' (the default)
   public String getEncryptionCipher() {
      return ;
   }
   public int hashCode() {
      final int prime = 31;
      int result = super.hashCode();
      result = prime * result + (( == null) ? 0 : .hashCode());
      result = prime * result + (( == null) ? 0 : .hashCode());
      return result;
   }
   public boolean equals(Object obj) {
      if (this == obj)
         return true;
      if (!super.equals(obj))
         return false;
      if (getClass() != obj.getClass())
         return false;
      CreateDriveRequest other = (CreateDriveRequestobj;
      if ( == null) {
         if (other.avoid != null)
            return false;
      } else if (!.equals(other.avoid))
         return false;
      if ( == null) {
         if (other.encryptionCipher != null)
            return false;
      } else if (!.equals(other.encryptionCipher))
         return false;
      return true;
   }
   public String toString() {
      return "[name=" +  + ", size=" +  + ", claimType=" +  + ", readers=" +  + ", use=" + 
            + ", avoid=" +  + ", encryptionCipher=" +  + "]";
   }
New to GrepCode? Check out our FAQ X