com.aliyun.oss.model

## 类 Bucket

- java.lang.Object
- - com.aliyun.oss.model.GenericResult
  - - com.aliyun.oss.model.Bucket

-     public class Bucket
      extends GenericResult

  Bucket is the namespace in OSS. You could think it's a folder or container under OSS.

  Bucket name is globally unique in OSS and is immutable. Every object must belong to a bucket. An application such as picture sharing website could be mapped to one or multiple buckets. An OSS account could only create up to 10 bucket. And there's no limit on the files count or size under a bucket.

  Bucket naming rules:
  - Can only contain low case letter, number or dash(-).
  - Can only start with low case letter or number.
  - The length must be between 3 to 63 bytes.

- - ### 构造器概要

    构造器
    构造器和说明
    `Bucket()` Default constructor.
    `Bucket(String name)` Constructor with the bucket name parameter.
    `Bucket(String name, String requestId)`

  - ### 方法概要

    方法
    限定符和类型 | 方法和说明
    --- | ---
    `Date` | `getCreationDate()` Gets the bucket's creation time.
    `String` | `getExtranetEndpoint()` Gets the external endpoint.
    `String` | `getIntranetEndpoint()` Gets the internal endpoint.
    `String` | `getLocation()` Gets the bucket location.
    `String` | `getName()` Gets the bucket name
    `Owner` | `getOwner()` Gets the `Owner`.
    `String` | `getRegion()` Gets the region.
    `StorageClass` | `getStorageClass()` Gets the storage class
    `void` | `setCreationDate(Date creationDate)` Sets teh bucket's creation time.
    `void` | `setExtranetEndpoint(String endpoint)` Sets the external endpoint.
    `void` | `setIntranetEndpoint(String endpoint)` Sets the internal endpoint.
    `void` | `setLocation(String location)` Sets the bucket location.
    `void` | `setName(String name)` Sets the bucket name (should only be used by the SDK itself).
    `void` | `setOwner(Owner owner)` Sets the bucket owner (only used by SDK itself).
    `void` | `setRegion(String region)` Sets the region.
    `void` | `setStorageClass(StorageClass storageClass)` Sets the bucket's storage class
    `String` | `toString()` The override of toString().

    - ### 从类继承的方法 com.aliyun.oss.model.GenericResult

      `getClientCRC, getRequestId, getResponse, getServerCRC, setClientCRC, setRequestId, setResponse, setServerCRC`

    - ### 从类继承的方法 java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### 构造器详细资料

    - #### Bucket

          public Bucket()

      Default constructor.

    - #### Bucket

          public Bucket(String name)

      Constructor with the bucket name parameter.
      参数:
        `name` - Bucket name.

    - #### Bucket

          public Bucket(String name,
                String requestId)

  - ### 方法详细资料

    - #### toString

          public String toString()

      The override of toString(). Returns the bucket name, creation date, owner and location, with optional storage class.
      覆盖:
        `toString` 在类中 `Object`

    - #### getOwner

          public Owner getOwner()

      Gets the `Owner`.
      返回:
        The bucket owner or null if the owner is not known.

    - #### setOwner

          public void setOwner(Owner owner)

      Sets the bucket owner (only used by SDK itself).
      参数:
        `owner` - Bucket owner.

    - #### getCreationDate

          public Date getCreationDate()

      Gets the bucket's creation time.
      返回:
        Bucket's creation time or null if the creation time is unknown.

    - #### setCreationDate

          public void setCreationDate(Date creationDate)

      Sets teh bucket's creation time.(it's only used by SDK itself).
      参数:
        `creationDate` - Bucket's creation time.

    - #### getName

          public String getName()

      Gets the bucket name
      返回:
        Bucket name.

    - #### setName

          public void setName(String name)

      Sets the bucket name (should only be used by the SDK itself).
      参数:
        `name` - Bucket name.

    - #### getLocation

          public String getLocation()

      Gets the bucket location.
      返回:
        Bucket location.

    - #### setLocation

          public void setLocation(String location)

      Sets the bucket location.
      参数:
        `location` -

    - #### getStorageClass

          public StorageClass getStorageClass()

      Gets the storage class
      返回:
        storage class

    - #### setStorageClass

          public void setStorageClass(StorageClass storageClass)

      Sets the bucket's storage class
      参数:
        `storageClass` -

    - #### getExtranetEndpoint

          public String getExtranetEndpoint()

      Gets the external endpoint.
      返回:
        external endpoint

    - #### setExtranetEndpoint

          public void setExtranetEndpoint(String endpoint)

      Sets the external endpoint.
      参数:
        `endpoint` - external endpoint

    - #### getIntranetEndpoint

          public String getIntranetEndpoint()

      Gets the internal endpoint.
      返回:
        Internal endpoint

    - #### setIntranetEndpoint

          public void setIntranetEndpoint(String endpoint)

      Sets the internal endpoint.
      参数:
        `endpoint` - Internal endpoint

    - #### getRegion

          public String getRegion()

      Gets the region.
      返回:
        Region

    - #### setRegion

          public void setRegion(String region)

      Sets the region.
      参数:
        `region` - Region

Copyright © 2020. All Rights Reserved.