1// Copyright (c) 2016, 2018, 2019, Oracle and/or its affiliates. All rights reserved.
2// Code generated. DO NOT EDIT.
3
4// Object Storage Service API
5//
6// Common set of Object Storage and Archive Storage APIs for managing buckets, objects, and related resources.
7//
8
9package objectstorage
10
11import (
12	"github.com/oracle/oci-go-sdk/common"
13)
14
15// CreateBucketDetails To use any of the API operations, you must be authorized in an IAM policy. If you are not authorized,
16// talk to an administrator. If you are an administrator who needs to write policies to give users access, see
17// Getting Started with Policies (https://docs.cloud.oracle.com/Content/Identity/Concepts/policygetstarted.htm).
18type CreateBucketDetails struct {
19
20	// The name of the bucket. Valid characters are uppercase or lowercase letters, numbers, and dashes.
21	// Bucket names must be unique within an Object Storage namespace. Avoid entering confidential information.
22	// example: Example: my-new-bucket1
23	Name *string `mandatory:"true" json:"name"`
24
25	// The ID of the compartment in which to create the bucket.
26	CompartmentId *string `mandatory:"true" json:"compartmentId"`
27
28	// Arbitrary string, up to 4KB, of keys and values for user-defined metadata.
29	Metadata map[string]string `mandatory:"false" json:"metadata"`
30
31	// The type of public access enabled on this bucket.
32	// A bucket is set to `NoPublicAccess` by default, which only allows an authenticated caller to access the
33	// bucket and its contents. When `ObjectRead` is enabled on the bucket, public access is allowed for the
34	// `GetObject`, `HeadObject`, and `ListObjects` operations. When `ObjectReadWithoutList` is enabled on the bucket,
35	// public access is allowed for the `GetObject` and `HeadObject` operations.
36	PublicAccessType CreateBucketDetailsPublicAccessTypeEnum `mandatory:"false" json:"publicAccessType,omitempty"`
37
38	// The type of storage tier of this bucket.
39	// A bucket is set to 'Standard' tier by default, which means the bucket will be put in the standard storage tier.
40	// When 'Archive' tier type is set explicitly, the bucket is put in the Archive Storage tier. The 'storageTier'
41	// property is immutable after bucket is created.
42	StorageTier CreateBucketDetailsStorageTierEnum `mandatory:"false" json:"storageTier,omitempty"`
43
44	// A property that determines whether events will be generated for operations on objects in this bucket.
45	// This is false by default.
46	ObjectEventsEnabled *bool `mandatory:"false" json:"objectEventsEnabled"`
47
48	// Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.
49	// For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
50	// Example: `{"Department": "Finance"}`
51	FreeformTags map[string]string `mandatory:"false" json:"freeformTags"`
52
53	// Defined tags for this resource. Each key is predefined and scoped to a namespace.
54	// For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
55	// Example: `{"Operations": {"CostCenter": "42"}}`
56	DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"`
57
58	// The OCID of a KMS key id used to call KMS to generate the data key or decrypt the encrypted data key.
59	KmsKeyId *string `mandatory:"false" json:"kmsKeyId"`
60}
61
62func (m CreateBucketDetails) String() string {
63	return common.PointerString(m)
64}
65
66// CreateBucketDetailsPublicAccessTypeEnum Enum with underlying type: string
67type CreateBucketDetailsPublicAccessTypeEnum string
68
69// Set of constants representing the allowable values for CreateBucketDetailsPublicAccessTypeEnum
70const (
71	CreateBucketDetailsPublicAccessTypeNopublicaccess        CreateBucketDetailsPublicAccessTypeEnum = "NoPublicAccess"
72	CreateBucketDetailsPublicAccessTypeObjectread            CreateBucketDetailsPublicAccessTypeEnum = "ObjectRead"
73	CreateBucketDetailsPublicAccessTypeObjectreadwithoutlist CreateBucketDetailsPublicAccessTypeEnum = "ObjectReadWithoutList"
74)
75
76var mappingCreateBucketDetailsPublicAccessType = map[string]CreateBucketDetailsPublicAccessTypeEnum{
77	"NoPublicAccess":        CreateBucketDetailsPublicAccessTypeNopublicaccess,
78	"ObjectRead":            CreateBucketDetailsPublicAccessTypeObjectread,
79	"ObjectReadWithoutList": CreateBucketDetailsPublicAccessTypeObjectreadwithoutlist,
80}
81
82// GetCreateBucketDetailsPublicAccessTypeEnumValues Enumerates the set of values for CreateBucketDetailsPublicAccessTypeEnum
83func GetCreateBucketDetailsPublicAccessTypeEnumValues() []CreateBucketDetailsPublicAccessTypeEnum {
84	values := make([]CreateBucketDetailsPublicAccessTypeEnum, 0)
85	for _, v := range mappingCreateBucketDetailsPublicAccessType {
86		values = append(values, v)
87	}
88	return values
89}
90
91// CreateBucketDetailsStorageTierEnum Enum with underlying type: string
92type CreateBucketDetailsStorageTierEnum string
93
94// Set of constants representing the allowable values for CreateBucketDetailsStorageTierEnum
95const (
96	CreateBucketDetailsStorageTierStandard CreateBucketDetailsStorageTierEnum = "Standard"
97	CreateBucketDetailsStorageTierArchive  CreateBucketDetailsStorageTierEnum = "Archive"
98)
99
100var mappingCreateBucketDetailsStorageTier = map[string]CreateBucketDetailsStorageTierEnum{
101	"Standard": CreateBucketDetailsStorageTierStandard,
102	"Archive":  CreateBucketDetailsStorageTierArchive,
103}
104
105// GetCreateBucketDetailsStorageTierEnumValues Enumerates the set of values for CreateBucketDetailsStorageTierEnum
106func GetCreateBucketDetailsStorageTierEnumValues() []CreateBucketDetailsStorageTierEnum {
107	values := make([]CreateBucketDetailsStorageTierEnum, 0)
108	for _, v := range mappingCreateBucketDetailsStorageTier {
109		values = append(values, v)
110	}
111	return values
112}
113