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// UpdateBucketDetails 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 UpdateBucketDetails struct {
19
20	// The Object Storage namespace in which the bucket lives.
21	Namespace *string `mandatory:"false" json:"namespace"`
22
23	// The compartmentId for the compartment to move the bucket to.
24	CompartmentId *string `mandatory:"false" json:"compartmentId"`
25
26	// The name of the bucket. Avoid entering confidential information.
27	// Example: my-new-bucket1
28	Name *string `mandatory:"false" json:"name"`
29
30	// Arbitrary string, up to 4KB, of keys and values for user-defined metadata.
31	Metadata map[string]string `mandatory:"false" json:"metadata"`
32
33	// The type of public access enabled on this bucket. A bucket is set to `NoPublicAccess` by default, which only allows an
34	// authenticated caller to access the bucket and its contents. When `ObjectRead` is enabled on the bucket, public access
35	// is allowed for the `GetObject`, `HeadObject`, and `ListObjects` operations. When `ObjectReadWithoutList` is enabled
36	// on the bucket, public access is allowed for the `GetObject` and `HeadObject` operations.
37	PublicAccessType UpdateBucketDetailsPublicAccessTypeEnum `mandatory:"false" json:"publicAccessType,omitempty"`
38
39	// A property that determines whether events will be generated for operations on objects in this bucket.
40	// This is false by default.
41	ObjectEventsEnabled *bool `mandatory:"false" json:"objectEventsEnabled"`
42
43	// Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.
44	// For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
45	// Example: `{"Department": "Finance"}`
46	FreeformTags map[string]string `mandatory:"false" json:"freeformTags"`
47
48	// Defined tags for this resource. Each key is predefined and scoped to a namespace.
49	// For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
50	// Example: `{"Operations": {"CostCenter": "42"}}
51	DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"`
52
53	// A KMS key OCID that will be associated with the given bucket. If it is empty the Update operation will
54	// actually remove the KMS key, if there is one, from the given bucket. Note that the old kms key should
55	// still be enbaled in KMS otherwise all the objects in the bucket encrypted with the old KMS key will no
56	// longer be accessible.
57	KmsKeyId *string `mandatory:"false" json:"kmsKeyId"`
58}
59
60func (m UpdateBucketDetails) String() string {
61	return common.PointerString(m)
62}
63
64// UpdateBucketDetailsPublicAccessTypeEnum Enum with underlying type: string
65type UpdateBucketDetailsPublicAccessTypeEnum string
66
67// Set of constants representing the allowable values for UpdateBucketDetailsPublicAccessTypeEnum
68const (
69	UpdateBucketDetailsPublicAccessTypeNopublicaccess        UpdateBucketDetailsPublicAccessTypeEnum = "NoPublicAccess"
70	UpdateBucketDetailsPublicAccessTypeObjectread            UpdateBucketDetailsPublicAccessTypeEnum = "ObjectRead"
71	UpdateBucketDetailsPublicAccessTypeObjectreadwithoutlist UpdateBucketDetailsPublicAccessTypeEnum = "ObjectReadWithoutList"
72)
73
74var mappingUpdateBucketDetailsPublicAccessType = map[string]UpdateBucketDetailsPublicAccessTypeEnum{
75	"NoPublicAccess":        UpdateBucketDetailsPublicAccessTypeNopublicaccess,
76	"ObjectRead":            UpdateBucketDetailsPublicAccessTypeObjectread,
77	"ObjectReadWithoutList": UpdateBucketDetailsPublicAccessTypeObjectreadwithoutlist,
78}
79
80// GetUpdateBucketDetailsPublicAccessTypeEnumValues Enumerates the set of values for UpdateBucketDetailsPublicAccessTypeEnum
81func GetUpdateBucketDetailsPublicAccessTypeEnumValues() []UpdateBucketDetailsPublicAccessTypeEnum {
82	values := make([]UpdateBucketDetailsPublicAccessTypeEnum, 0)
83	for _, v := range mappingUpdateBucketDetailsPublicAccessType {
84		values = append(values, v)
85	}
86	return values
87}
88