public static final class Bucket.Cors.Builder extends GeneratedMessageV3.Builder<Bucket.Cors.Builder> implements Bucket.CorsOrBuilder
Cross-Origin Response sharing (CORS) properties for a bucket. For more on Cloud Storage and CORS, see https://cloud.google.com/storage/docs/cross-origin. For more on CORS in general, see https://tools.ietf.org/html/rfc6454.
Protobuf type google.storage.v2.Bucket.Cors
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > Bucket.Cors.BuilderImplements
Bucket.CorsOrBuilderMethods
addAllMethod(Iterable<String> values)
public Bucket.Cors.Builder addAllMethod(Iterable<String> values)
The list of HTTP methods on which to include CORS response headers,
(GET
, OPTIONS
, POST
, etc) Note: "*" is permitted in the list of
methods, and means "any method".
repeated string method = 2;
Name | Description |
values | Iterable<String> The method to add. |
Type | Description |
Bucket.Cors.Builder | This builder for chaining. |
addAllOrigin(Iterable<String> values)
public Bucket.Cors.Builder addAllOrigin(Iterable<String> values)
The list of Origins eligible to receive CORS response headers. See https://tools.ietf.org/html/rfc6454 for more on origins. Note: "*" is permitted in the list of origins, and means "any Origin".
repeated string origin = 1;
Name | Description |
values | Iterable<String> The origin to add. |
Type | Description |
Bucket.Cors.Builder | This builder for chaining. |
addAllResponseHeader(Iterable<String> values)
public Bucket.Cors.Builder addAllResponseHeader(Iterable<String> values)
The list of HTTP headers other than the https://www.w3.org/TR/cors/#simple-response-header to give permission for the user-agent to share across domains.
repeated string response_header = 3;
Name | Description |
values | Iterable<String> The responseHeader to add. |
Type | Description |
Bucket.Cors.Builder | This builder for chaining. |
addMethod(String value)
public Bucket.Cors.Builder addMethod(String value)
The list of HTTP methods on which to include CORS response headers,
(GET
, OPTIONS
, POST
, etc) Note: "*" is permitted in the list of
methods, and means "any method".
repeated string method = 2;
Name | Description |
value | String The method to add. |
Type | Description |
Bucket.Cors.Builder | This builder for chaining. |
addMethodBytes(ByteString value)
public Bucket.Cors.Builder addMethodBytes(ByteString value)
The list of HTTP methods on which to include CORS response headers,
(GET
, OPTIONS
, POST
, etc) Note: "*" is permitted in the list of
methods, and means "any method".
repeated string method = 2;
Name | Description |
value | ByteString The bytes of the method to add. |
Type | Description |
Bucket.Cors.Builder | This builder for chaining. |
addOrigin(String value)
public Bucket.Cors.Builder addOrigin(String value)
The list of Origins eligible to receive CORS response headers. See https://tools.ietf.org/html/rfc6454 for more on origins. Note: "*" is permitted in the list of origins, and means "any Origin".
repeated string origin = 1;
Name | Description |
value | String The origin to add. |
Type | Description |
Bucket.Cors.Builder | This builder for chaining. |
addOriginBytes(ByteString value)
public Bucket.Cors.Builder addOriginBytes(ByteString value)
The list of Origins eligible to receive CORS response headers. See https://tools.ietf.org/html/rfc6454 for more on origins. Note: "*" is permitted in the list of origins, and means "any Origin".
repeated string origin = 1;
Name | Description |
value | ByteString The bytes of the origin to add. |
Type | Description |
Bucket.Cors.Builder | This builder for chaining. |
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public Bucket.Cors.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
Bucket.Cors.Builder |
addResponseHeader(String value)
public Bucket.Cors.Builder addResponseHeader(String value)
The list of HTTP headers other than the https://www.w3.org/TR/cors/#simple-response-header to give permission for the user-agent to share across domains.
repeated string response_header = 3;
Name | Description |
value | String The responseHeader to add. |
Type | Description |
Bucket.Cors.Builder | This builder for chaining. |
addResponseHeaderBytes(ByteString value)
public Bucket.Cors.Builder addResponseHeaderBytes(ByteString value)
The list of HTTP headers other than the https://www.w3.org/TR/cors/#simple-response-header to give permission for the user-agent to share across domains.
repeated string response_header = 3;
Name | Description |
value | ByteString The bytes of the responseHeader to add. |
Type | Description |
Bucket.Cors.Builder | This builder for chaining. |
build()
public Bucket.Cors build()
Type | Description |
Bucket.Cors |
buildPartial()
public Bucket.Cors buildPartial()
Type | Description |
Bucket.Cors |
clear()
public Bucket.Cors.Builder clear()
Type | Description |
Bucket.Cors.Builder |
clearField(Descriptors.FieldDescriptor field)
public Bucket.Cors.Builder clearField(Descriptors.FieldDescriptor field)
Name | Description |
field | FieldDescriptor |
Type | Description |
Bucket.Cors.Builder |
clearMaxAgeSeconds()
public Bucket.Cors.Builder clearMaxAgeSeconds()
The value, in seconds, to return in the https://www.w3.org/TR/cors/#access-control-max-age-response-header used in preflight responses.
int32 max_age_seconds = 4;
Type | Description |
Bucket.Cors.Builder | This builder for chaining. |
clearMethod()
public Bucket.Cors.Builder clearMethod()
The list of HTTP methods on which to include CORS response headers,
(GET
, OPTIONS
, POST
, etc) Note: "*" is permitted in the list of
methods, and means "any method".
repeated string method = 2;
Type | Description |
Bucket.Cors.Builder | This builder for chaining. |
clearOneof(Descriptors.OneofDescriptor oneof)
public Bucket.Cors.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Name | Description |
oneof | OneofDescriptor |
Type | Description |
Bucket.Cors.Builder |
clearOrigin()
public Bucket.Cors.Builder clearOrigin()
The list of Origins eligible to receive CORS response headers. See https://tools.ietf.org/html/rfc6454 for more on origins. Note: "*" is permitted in the list of origins, and means "any Origin".
repeated string origin = 1;
Type | Description |
Bucket.Cors.Builder | This builder for chaining. |
clearResponseHeader()
public Bucket.Cors.Builder clearResponseHeader()
The list of HTTP headers other than the https://www.w3.org/TR/cors/#simple-response-header to give permission for the user-agent to share across domains.
repeated string response_header = 3;
Type | Description |
Bucket.Cors.Builder | This builder for chaining. |
clone()
public Bucket.Cors.Builder clone()
Type | Description |
Bucket.Cors.Builder |
getDefaultInstanceForType()
public Bucket.Cors getDefaultInstanceForType()
Type | Description |
Bucket.Cors |
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Type | Description |
Descriptor |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Type | Description |
Descriptor |
getMaxAgeSeconds()
public int getMaxAgeSeconds()
The value, in seconds, to return in the https://www.w3.org/TR/cors/#access-control-max-age-response-header used in preflight responses.
int32 max_age_seconds = 4;
Type | Description |
int | The maxAgeSeconds. |
getMethod(int index)
public String getMethod(int index)
The list of HTTP methods on which to include CORS response headers,
(GET
, OPTIONS
, POST
, etc) Note: "*" is permitted in the list of
methods, and means "any method".
repeated string method = 2;
Name | Description |
index | int The index of the element to return. |
Type | Description |
String | The method at the given index. |
getMethodBytes(int index)
public ByteString getMethodBytes(int index)
The list of HTTP methods on which to include CORS response headers,
(GET
, OPTIONS
, POST
, etc) Note: "*" is permitted in the list of
methods, and means "any method".
repeated string method = 2;
Name | Description |
index | int The index of the value to return. |
Type | Description |
ByteString | The bytes of the method at the given index. |
getMethodCount()
public int getMethodCount()
The list of HTTP methods on which to include CORS response headers,
(GET
, OPTIONS
, POST
, etc) Note: "*" is permitted in the list of
methods, and means "any method".
repeated string method = 2;
Type | Description |
int | The count of method. |
getMethodList()
public ProtocolStringList getMethodList()
The list of HTTP methods on which to include CORS response headers,
(GET
, OPTIONS
, POST
, etc) Note: "*" is permitted in the list of
methods, and means "any method".
repeated string method = 2;
Type | Description |
ProtocolStringList | A list containing the method. |
getOrigin(int index)
public String getOrigin(int index)
The list of Origins eligible to receive CORS response headers. See https://tools.ietf.org/html/rfc6454 for more on origins. Note: "*" is permitted in the list of origins, and means "any Origin".
repeated string origin = 1;
Name | Description |
index | int The index of the element to return. |
Type | Description |
String | The origin at the given index. |
getOriginBytes(int index)
public ByteString getOriginBytes(int index)
The list of Origins eligible to receive CORS response headers. See https://tools.ietf.org/html/rfc6454 for more on origins. Note: "*" is permitted in the list of origins, and means "any Origin".
repeated string origin = 1;
Name | Description |
index | int The index of the value to return. |
Type | Description |
ByteString | The bytes of the origin at the given index. |
getOriginCount()
public int getOriginCount()
The list of Origins eligible to receive CORS response headers. See https://tools.ietf.org/html/rfc6454 for more on origins. Note: "*" is permitted in the list of origins, and means "any Origin".
repeated string origin = 1;
Type | Description |
int | The count of origin. |
getOriginList()
public ProtocolStringList getOriginList()
The list of Origins eligible to receive CORS response headers. See https://tools.ietf.org/html/rfc6454 for more on origins. Note: "*" is permitted in the list of origins, and means "any Origin".
repeated string origin = 1;
Type | Description |
ProtocolStringList | A list containing the origin. |
getResponseHeader(int index)
public String getResponseHeader(int index)
The list of HTTP headers other than the https://www.w3.org/TR/cors/#simple-response-header to give permission for the user-agent to share across domains.
repeated string response_header = 3;
Name | Description |
index | int The index of the element to return. |
Type | Description |
String | The responseHeader at the given index. |
getResponseHeaderBytes(int index)
public ByteString getResponseHeaderBytes(int index)
The list of HTTP headers other than the https://www.w3.org/TR/cors/#simple-response-header to give permission for the user-agent to share across domains.
repeated string response_header = 3;
Name | Description |
index | int The index of the value to return. |
Type | Description |
ByteString | The bytes of the responseHeader at the given index. |
getResponseHeaderCount()
public int getResponseHeaderCount()
The list of HTTP headers other than the https://www.w3.org/TR/cors/#simple-response-header to give permission for the user-agent to share across domains.
repeated string response_header = 3;
Type | Description |
int | The count of responseHeader. |
getResponseHeaderList()
public ProtocolStringList getResponseHeaderList()
The list of HTTP headers other than the https://www.w3.org/TR/cors/#simple-response-header to give permission for the user-agent to share across domains.
repeated string response_header = 3;
Type | Description |
ProtocolStringList | A list containing the responseHeader. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Type | Description |
boolean |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public Bucket.Cors.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Name | Description |
input | CodedInputStream |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
Bucket.Cors.Builder |
Type | Description |
IOException |
mergeFrom(Message other)
public Bucket.Cors.Builder mergeFrom(Message other)
Name | Description |
other | Message |
Type | Description |
Bucket.Cors.Builder |
mergeFrom(Bucket.Cors other)
public Bucket.Cors.Builder mergeFrom(Bucket.Cors other)
Name | Description |
other | Bucket.Cors |
Type | Description |
Bucket.Cors.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final Bucket.Cors.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields | UnknownFieldSet |
Type | Description |
Bucket.Cors.Builder |
setField(Descriptors.FieldDescriptor field, Object value)
public Bucket.Cors.Builder setField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
Bucket.Cors.Builder |
setMaxAgeSeconds(int value)
public Bucket.Cors.Builder setMaxAgeSeconds(int value)
The value, in seconds, to return in the https://www.w3.org/TR/cors/#access-control-max-age-response-header used in preflight responses.
int32 max_age_seconds = 4;
Name | Description |
value | int The maxAgeSeconds to set. |
Type | Description |
Bucket.Cors.Builder | This builder for chaining. |
setMethod(int index, String value)
public Bucket.Cors.Builder setMethod(int index, String value)
The list of HTTP methods on which to include CORS response headers,
(GET
, OPTIONS
, POST
, etc) Note: "*" is permitted in the list of
methods, and means "any method".
repeated string method = 2;
Name | Description |
index | int The index to set the value at. |
value | String The method to set. |
Type | Description |
Bucket.Cors.Builder | This builder for chaining. |
setOrigin(int index, String value)
public Bucket.Cors.Builder setOrigin(int index, String value)
The list of Origins eligible to receive CORS response headers. See https://tools.ietf.org/html/rfc6454 for more on origins. Note: "*" is permitted in the list of origins, and means "any Origin".
repeated string origin = 1;
Name | Description |
index | int The index to set the value at. |
value | String The origin to set. |
Type | Description |
Bucket.Cors.Builder | This builder for chaining. |
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public Bucket.Cors.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Name | Description |
field | FieldDescriptor |
index | int |
value | Object |
Type | Description |
Bucket.Cors.Builder |
setResponseHeader(int index, String value)
public Bucket.Cors.Builder setResponseHeader(int index, String value)
The list of HTTP headers other than the https://www.w3.org/TR/cors/#simple-response-header to give permission for the user-agent to share across domains.
repeated string response_header = 3;
Name | Description |
index | int The index to set the value at. |
value | String The responseHeader to set. |
Type | Description |
Bucket.Cors.Builder | This builder for chaining. |
setUnknownFields(UnknownFieldSet unknownFields)
public final Bucket.Cors.Builder setUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields | UnknownFieldSet |
Type | Description |
Bucket.Cors.Builder |