
package com.amazonaws.services.s3.model;

/**
 * Represents the current accelerate status for a bucket.
 * @see BucketAccelerateConfiguration
 */
public enum BucketAccelerateStatus {

    Enabled("Enabled"),
    Suspended("Suspended");

    public static BucketAccelerateStatus fromValue(String statusString) throws IllegalArgumentException {
        for (BucketAccelerateStatus accelerateStatus : BucketAccelerateStatus.values()) {
            if (accelerateStatus.toString().equals(statusString)) {
                return accelerateStatus;
            }
        }

        throw new IllegalArgumentException("Cannot create enum from " + statusString + " value!");
    }

    private final String accelerateStatus;

    private BucketAccelerateStatus(String status) {
        this.accelerateStatus = status;
    }

    @Override
    public String toString() {
        return accelerateStatus;
    }
}
