- 2.59.0 (latest)
 - 2.58.1
 - 2.57.0
 - 2.56.0
 - 2.55.0
 - 2.54.0
 - 2.53.3
 - 2.52.3
 - 2.50.0
 - 2.49.0
 - 2.48.2
 - 2.47.0
 - 2.46.0
 - 2.45.0
 - 2.44.1
 - 2.43.2
 - 2.42.0
 - 2.41.0
 - 2.40.1
 - 2.39.0
 - 2.38.0
 - 2.37.0
 - 2.36.1
 - 2.34.0
 - 2.33.0
 - 2.32.1
 - 2.30.1
 - 2.29.1
 - 2.28.0
 - 2.27.1
 - 2.24.0
 - 2.23.0
 - 2.22.6
 - 2.21.0
 - 2.20.2
 - 2.19.0
 - 2.18.0
 - 2.17.2
 - 2.16.0
 - 2.15.1
 - 2.14.0
 - 2.13.1
 - 2.12.0
 - 2.11.3
 - 2.10.0
 - 2.9.3
 - 2.8.1
 - 2.7.1
 - 2.6.1
 - 2.5.1
 - 2.4.5
 - 2.3.0
 - 2.2.3
 - 2.1.10
 
public static final class Bucket.Cors.Builder extends GeneratedMessageV3.Builder<Bucket.Cors.Builder> implements Bucket.CorsOrBuilderCross-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.CorsOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description | 
Descriptor | 
        |
Methods
addAllMethod(Iterable<String> values)
public Bucket.Cors.Builder addAllMethod(Iterable<String> values) Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description | 
values | 
        Iterable<String>The method to add.  | 
      
| Returns | |
|---|---|
| Type | Description | 
Bucket.Cors.Builder | 
        This builder for chaining.  | 
      
addAllOrigin(Iterable<String> values)
public Bucket.Cors.Builder addAllOrigin(Iterable<String> values)Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description | 
values | 
        Iterable<String>The origin to add.  | 
      
| Returns | |
|---|---|
| Type | Description | 
Bucket.Cors.Builder | 
        This builder for chaining.  | 
      
addAllResponseHeader(Iterable<String> values)
public Bucket.Cors.Builder addAllResponseHeader(Iterable<String> values)Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description | 
values | 
        Iterable<String>The responseHeader to add.  | 
      
| Returns | |
|---|---|
| Type | Description | 
Bucket.Cors.Builder | 
        This builder for chaining.  | 
      
addMethod(String value)
public Bucket.Cors.Builder addMethod(String value) Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description | 
value | 
        StringThe method to add.  | 
      
| Returns | |
|---|---|
| Type | Description | 
Bucket.Cors.Builder | 
        This builder for chaining.  | 
      
addMethodBytes(ByteString value)
public Bucket.Cors.Builder addMethodBytes(ByteString value) Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description | 
value | 
        ByteStringThe bytes of the method to add.  | 
      
| Returns | |
|---|---|
| Type | Description | 
Bucket.Cors.Builder | 
        This builder for chaining.  | 
      
addOrigin(String value)
public Bucket.Cors.Builder addOrigin(String value)Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description | 
value | 
        StringThe origin to add.  | 
      
| Returns | |
|---|---|
| Type | Description | 
Bucket.Cors.Builder | 
        This builder for chaining.  | 
      
addOriginBytes(ByteString value)
public Bucket.Cors.Builder addOriginBytes(ByteString value)Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description | 
value | 
        ByteStringThe bytes of the origin to add.  | 
      
| Returns | |
|---|---|
| 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)| Parameters | |
|---|---|
| Name | Description | 
field | 
        FieldDescriptor | 
      
value | 
        Object | 
      
| Returns | |
|---|---|
| Type | Description | 
Bucket.Cors.Builder | 
        |
addResponseHeader(String value)
public Bucket.Cors.Builder addResponseHeader(String value)Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description | 
value | 
        StringThe responseHeader to add.  | 
      
| Returns | |
|---|---|
| Type | Description | 
Bucket.Cors.Builder | 
        This builder for chaining.  | 
      
addResponseHeaderBytes(ByteString value)
public Bucket.Cors.Builder addResponseHeaderBytes(ByteString value)Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description | 
value | 
        ByteStringThe bytes of the responseHeader to add.  | 
      
| Returns | |
|---|---|
| Type | Description | 
Bucket.Cors.Builder | 
        This builder for chaining.  | 
      
build()
public Bucket.Cors build()| Returns | |
|---|---|
| Type | Description | 
Bucket.Cors | 
        |
buildPartial()
public Bucket.Cors buildPartial()| Returns | |
|---|---|
| Type | Description | 
Bucket.Cors | 
        |
clear()
public Bucket.Cors.Builder clear()| Returns | |
|---|---|
| Type | Description | 
Bucket.Cors.Builder | 
        |
clearField(Descriptors.FieldDescriptor field)
public Bucket.Cors.Builder clearField(Descriptors.FieldDescriptor field)| Parameter | |
|---|---|
| Name | Description | 
field | 
        FieldDescriptor | 
      
| Returns | |
|---|---|
| Type | Description | 
Bucket.Cors.Builder | 
        |
clearMaxAgeSeconds()
public Bucket.Cors.Builder clearMaxAgeSeconds()Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description | 
Bucket.Cors.Builder | 
        This builder for chaining.  | 
      
clearMethod()
public Bucket.Cors.Builder clearMethod() Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description | 
Bucket.Cors.Builder | 
        This builder for chaining.  | 
      
clearOneof(Descriptors.OneofDescriptor oneof)
public Bucket.Cors.Builder clearOneof(Descriptors.OneofDescriptor oneof)| Parameter | |
|---|---|
| Name | Description | 
oneof | 
        OneofDescriptor | 
      
| Returns | |
|---|---|
| Type | Description | 
Bucket.Cors.Builder | 
        |
clearOrigin()
public Bucket.Cors.Builder clearOrigin()Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description | 
Bucket.Cors.Builder | 
        This builder for chaining.  | 
      
clearResponseHeader()
public Bucket.Cors.Builder clearResponseHeader()Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description | 
Bucket.Cors.Builder | 
        This builder for chaining.  | 
      
clone()
public Bucket.Cors.Builder clone()| Returns | |
|---|---|
| Type | Description | 
Bucket.Cors.Builder | 
        |
getDefaultInstanceForType()
public Bucket.Cors getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description | 
Bucket.Cors | 
        |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description | 
Descriptor | 
        |
getMaxAgeSeconds()
public int getMaxAgeSeconds()Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description | 
int | 
        The maxAgeSeconds.  | 
      
getMethod(int index)
public String getMethod(int index) Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description | 
index | 
        intThe index of the element to return.  | 
      
| Returns | |
|---|---|
| Type | Description | 
String | 
        The method at the given index.  | 
      
getMethodBytes(int index)
public ByteString getMethodBytes(int index) Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description | 
index | 
        intThe index of the value to return.  | 
      
| Returns | |
|---|---|
| Type | Description | 
ByteString | 
        The bytes of the method at the given index.  | 
      
getMethodCount()
public int getMethodCount() Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description | 
int | 
        The count of method.  | 
      
getMethodList()
public ProtocolStringList getMethodList() Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description | 
ProtocolStringList | 
        A list containing the method.  | 
      
getOrigin(int index)
public String getOrigin(int index)Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description | 
index | 
        intThe index of the element to return.  | 
      
| Returns | |
|---|---|
| Type | Description | 
String | 
        The origin at the given index.  | 
      
getOriginBytes(int index)
public ByteString getOriginBytes(int index)Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description | 
index | 
        intThe index of the value to return.  | 
      
| Returns | |
|---|---|
| Type | Description | 
ByteString | 
        The bytes of the origin at the given index.  | 
      
getOriginCount()
public int getOriginCount()Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description | 
int | 
        The count of origin.  | 
      
getOriginList()
public ProtocolStringList getOriginList()Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description | 
ProtocolStringList | 
        A list containing the origin.  | 
      
getResponseHeader(int index)
public String getResponseHeader(int index)Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description | 
index | 
        intThe index of the element to return.  | 
      
| Returns | |
|---|---|
| Type | Description | 
String | 
        The responseHeader at the given index.  | 
      
getResponseHeaderBytes(int index)
public ByteString getResponseHeaderBytes(int index)Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description | 
index | 
        intThe index of the value to return.  | 
      
| Returns | |
|---|---|
| Type | Description | 
ByteString | 
        The bytes of the responseHeader at the given index.  | 
      
getResponseHeaderCount()
public int getResponseHeaderCount()Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description | 
int | 
        The count of responseHeader.  | 
      
getResponseHeaderList()
public ProtocolStringList getResponseHeaderList()Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description | 
ProtocolStringList | 
        A list containing the responseHeader.  | 
      
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description | 
FieldAccessorTable | 
        |
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description | 
boolean | 
        |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public Bucket.Cors.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description | 
input | 
        CodedInputStream | 
      
extensionRegistry | 
        ExtensionRegistryLite | 
      
| Returns | |
|---|---|
| Type | Description | 
Bucket.Cors.Builder | 
        |
| Exceptions | |
|---|---|
| Type | Description | 
IOException | 
        |
mergeFrom(Message other)
public Bucket.Cors.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description | 
other | 
        Message | 
      
| Returns | |
|---|---|
| Type | Description | 
Bucket.Cors.Builder | 
        |
mergeFrom(Bucket.Cors other)
public Bucket.Cors.Builder mergeFrom(Bucket.Cors other)| Parameter | |
|---|---|
| Name | Description | 
other | 
        Bucket.Cors | 
      
| Returns | |
|---|---|
| Type | Description | 
Bucket.Cors.Builder | 
        |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final Bucket.Cors.Builder mergeUnknownFields(UnknownFieldSet unknownFields)| Parameter | |
|---|---|
| Name | Description | 
unknownFields | 
        UnknownFieldSet | 
      
| Returns | |
|---|---|
| Type | Description | 
Bucket.Cors.Builder | 
        |
setField(Descriptors.FieldDescriptor field, Object value)
public Bucket.Cors.Builder setField(Descriptors.FieldDescriptor field, Object value)| Parameters | |
|---|---|
| Name | Description | 
field | 
        FieldDescriptor | 
      
value | 
        Object | 
      
| Returns | |
|---|---|
| Type | Description | 
Bucket.Cors.Builder | 
        |
setMaxAgeSeconds(int value)
public Bucket.Cors.Builder setMaxAgeSeconds(int value)Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description | 
value | 
        intThe maxAgeSeconds to set.  | 
      
| Returns | |
|---|---|
| Type | Description | 
Bucket.Cors.Builder | 
        This builder for chaining.  | 
      
setMethod(int index, String value)
public Bucket.Cors.Builder setMethod(int index, String value) Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
| Parameters | |
|---|---|
| Name | Description | 
index | 
        intThe index to set the value at.  | 
      
value | 
        StringThe method to set.  | 
      
| Returns | |
|---|---|
| Type | Description | 
Bucket.Cors.Builder | 
        This builder for chaining.  | 
      
setOrigin(int index, String value)
public Bucket.Cors.Builder setOrigin(int index, String value)Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
| Parameters | |
|---|---|
| Name | Description | 
index | 
        intThe index to set the value at.  | 
      
value | 
        StringThe origin to set.  | 
      
| Returns | |
|---|---|
| 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)| Parameters | |
|---|---|
| Name | Description | 
field | 
        FieldDescriptor | 
      
index | 
        int | 
      
value | 
        Object | 
      
| Returns | |
|---|---|
| Type | Description | 
Bucket.Cors.Builder | 
        |
setResponseHeader(int index, String value)
public Bucket.Cors.Builder setResponseHeader(int index, String value)Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
| Parameters | |
|---|---|
| Name | Description | 
index | 
        intThe index to set the value at.  | 
      
value | 
        StringThe responseHeader to set.  | 
      
| Returns | |
|---|---|
| Type | Description | 
Bucket.Cors.Builder | 
        This builder for chaining.  | 
      
setUnknownFields(UnknownFieldSet unknownFields)
public final Bucket.Cors.Builder setUnknownFields(UnknownFieldSet unknownFields)| Parameter | |
|---|---|
| Name | Description | 
unknownFields | 
        UnknownFieldSet | 
      
| Returns | |
|---|---|
| Type | Description | 
Bucket.Cors.Builder | 
        |