Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
   * 
   * Licensed under the Apache License, Version 2.0 (the "License").
   * You may not use this file except in compliance with the License.
   * A copy of the License is located at
   * 
   *  http://aws.amazon.com/apache2.0
   * 
  * or in the "license" file accompanying this file. This file 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 com.amazonaws.services.identitymanagement.model;

Summary Key Type
 
 public enum SummaryKeyType {
     
     Users("Users"),
     UsersQuota("UsersQuota"),
     Groups("Groups"),
     GroupsQuota("GroupsQuota"),
     ServerCertificates("ServerCertificates"),
     ServerCertificatesQuota("ServerCertificatesQuota"),
     UserPolicySizeQuota("UserPolicySizeQuota"),
     GroupPolicySizeQuota("GroupPolicySizeQuota"),
     GroupsPerUserQuota("GroupsPerUserQuota"),
     SigningCertificatesPerUserQuota("SigningCertificatesPerUserQuota"),
     AccessKeysPerUserQuota("AccessKeysPerUserQuota"),
     MFADevices("MFADevices"),
     MFADevicesInUse("MFADevicesInUse"),
     AccountMFAEnabled("AccountMFAEnabled"),
     AccountAccessKeysPresent("AccountAccessKeysPresent"),
     AccountSigningCertificatesPresent("AccountSigningCertificatesPresent"),
     AttachedPoliciesPerGroupQuota("AttachedPoliciesPerGroupQuota"),
     AttachedPoliciesPerRoleQuota("AttachedPoliciesPerRoleQuota"),
     AttachedPoliciesPerUserQuota("AttachedPoliciesPerUserQuota"),
     Policies("Policies"),
     PoliciesQuota("PoliciesQuota"),
     PolicySizeQuota("PolicySizeQuota"),
     PolicyVersionsInUse("PolicyVersionsInUse"),
     PolicyVersionsInUseQuota("PolicyVersionsInUseQuota"),
     VersionsPerPolicyQuota("VersionsPerPolicyQuota");
 
     private String value;
 
     private SummaryKeyType(String value) {
         this. = value;
     }
 
     @Override
     public String toString() {
         return this.;
     }

    
Use this in place of valueOf.

Parameters:
value real value
Returns:
SummaryKeyType corresponding to the value
 
     public static SummaryKeyType fromValue(String value) {
         if (value == null || "".equals(value)) {
             throw new IllegalArgumentException("Value cannot be null or empty!");
         
         } else if ("Users".equals(value)) {
             return .;
         } else if ("UsersQuota".equals(value)) {
             return .;
         } else if ("Groups".equals(value)) {
             return .;
         } else if ("GroupsQuota".equals(value)) {
             return .;
         } else if ("ServerCertificates".equals(value)) {
             return .;
         } else if ("ServerCertificatesQuota".equals(value)) {
             return .;
         } else if ("UserPolicySizeQuota".equals(value)) {
             return .;
         } else if ("GroupPolicySizeQuota".equals(value)) {
             return .;
         } else if ("GroupsPerUserQuota".equals(value)) {
             return .;
         } else if ("SigningCertificatesPerUserQuota".equals(value)) {
             return .;
         } else if ("AccessKeysPerUserQuota".equals(value)) {
             return .;
         } else if ("MFADevices".equals(value)) {
             return .;
         } else if ("MFADevicesInUse".equals(value)) {
             return .;
         } else if ("AccountMFAEnabled".equals(value)) {
             return .;
         } else if ("AccountAccessKeysPresent".equals(value)) {
             return .;
        } else if ("AccountSigningCertificatesPresent".equals(value)) {
            return .;
        } else if ("AttachedPoliciesPerGroupQuota".equals(value)) {
            return .;
        } else if ("AttachedPoliciesPerRoleQuota".equals(value)) {
            return .;
        } else if ("AttachedPoliciesPerUserQuota".equals(value)) {
            return .;
        } else if ("Policies".equals(value)) {
            return .;
        } else if ("PoliciesQuota".equals(value)) {
            return .;
        } else if ("PolicySizeQuota".equals(value)) {
            return .;
        } else if ("PolicyVersionsInUse".equals(value)) {
            return .;
        } else if ("PolicyVersionsInUseQuota".equals(value)) {
            return .;
        } else if ("VersionsPerPolicyQuota".equals(value)) {
            return .;
        } else {
            throw new IllegalArgumentException("Cannot create enum from " + value + " value!");
        }
    }
}
    
New to GrepCode? Check out our FAQ X