Package com.google.storage.v2
Class Bucket.Cors.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<Bucket.Cors.Builder>
com.google.storage.v2.Bucket.Cors.Builder
- All Implemented Interfaces:
com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Bucket.CorsOrBuilder,Cloneable
- Enclosing class:
- Bucket.Cors
public static final class Bucket.Cors.Builder
extends com.google.protobuf.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-
Method Summary
Modifier and TypeMethodDescriptionaddAllMethod(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".addAllOrigin(Iterable<String> values) The list of Origins eligible to receive CORS response headers.addAllResponseHeader(Iterable<String> values) The list of HTTP headers other than the [https://www.w3.org/TR/cors/#simple-response-header][simple response headers] to give permission for the user-agent to share across domains.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".addMethodBytes(com.google.protobuf.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".The list of Origins eligible to receive CORS response headers.addOriginBytes(com.google.protobuf.ByteString value) The list of Origins eligible to receive CORS response headers.addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) addResponseHeader(String value) The list of HTTP headers other than the [https://www.w3.org/TR/cors/#simple-response-header][simple response headers] to give permission for the user-agent to share across domains.addResponseHeaderBytes(com.google.protobuf.ByteString value) The list of HTTP headers other than the [https://www.w3.org/TR/cors/#simple-response-header][simple response headers] to give permission for the user-agent to share across domains.build()clear()clearField(com.google.protobuf.Descriptors.FieldDescriptor field) The value, in seconds, to return in the [https://www.w3.org/TR/cors/#access-control-max-age-response-header][Access-Control-Max-Age header] used in preflight responses.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".clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) The list of Origins eligible to receive CORS response headers.The list of HTTP headers other than the [https://www.w3.org/TR/cors/#simple-response-header][simple response headers] to give permission for the user-agent to share across domains.clone()static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorintThe value, in seconds, to return in the [https://www.w3.org/TR/cors/#access-control-max-age-response-header][Access-Control-Max-Age header] used in preflight responses.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".com.google.protobuf.ByteStringgetMethodBytes(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".intThe 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".com.google.protobuf.ProtocolStringListThe 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".getOrigin(int index) The list of Origins eligible to receive CORS response headers.com.google.protobuf.ByteStringgetOriginBytes(int index) The list of Origins eligible to receive CORS response headers.intThe list of Origins eligible to receive CORS response headers.com.google.protobuf.ProtocolStringListThe list of Origins eligible to receive CORS response headers.getResponseHeader(int index) The list of HTTP headers other than the [https://www.w3.org/TR/cors/#simple-response-header][simple response headers] to give permission for the user-agent to share across domains.com.google.protobuf.ByteStringgetResponseHeaderBytes(int index) The list of HTTP headers other than the [https://www.w3.org/TR/cors/#simple-response-header][simple response headers] to give permission for the user-agent to share across domains.intThe list of HTTP headers other than the [https://www.w3.org/TR/cors/#simple-response-header][simple response headers] to give permission for the user-agent to share across domains.com.google.protobuf.ProtocolStringListThe list of HTTP headers other than the [https://www.w3.org/TR/cors/#simple-response-header][simple response headers] to give permission for the user-agent to share across domains.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) mergeFrom(Bucket.Cors other) final Bucket.Cors.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) setMaxAgeSeconds(int value) The value, in seconds, to return in the [https://www.w3.org/TR/cors/#access-control-max-age-response-header][Access-Control-Max-Age header] used in preflight responses.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".The list of Origins eligible to receive CORS response headers.setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) setResponseHeader(int index, String value) The list of HTTP headers other than the [https://www.w3.org/TR/cors/#simple-response-header][simple response headers] to give permission for the user-agent to share across domains.final Bucket.Cors.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<Bucket.Cors.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<Bucket.Cors.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessageV3.Builder<Bucket.Cors.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<Bucket.Cors.Builder>
-
setField
public Bucket.Cors.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Bucket.Cors.Builder>
-
clearField
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Bucket.Cors.Builder>
-
clearOneof
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<Bucket.Cors.Builder>
-
setRepeatedField
public Bucket.Cors.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) - Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Bucket.Cors.Builder>
-
addRepeatedField
public Bucket.Cors.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Bucket.Cors.Builder>
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Bucket.Cors.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<Bucket.Cors.Builder>
-
mergeFrom
public Bucket.Cors.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Bucket.Cors.Builder>- Throws:
IOException
-
getOriginList
public com.google.protobuf.ProtocolStringList getOriginList()The list of Origins eligible to receive CORS response headers. See [https://tools.ietf.org/html/rfc6454][RFC 6454] for more on origins. Note: "*" is permitted in the list of origins, and means "any Origin".
repeated string origin = 1;- Specified by:
getOriginListin interfaceBucket.CorsOrBuilder- Returns:
- A list containing the origin.
-
getOriginCount
public int getOriginCount()The list of Origins eligible to receive CORS response headers. See [https://tools.ietf.org/html/rfc6454][RFC 6454] for more on origins. Note: "*" is permitted in the list of origins, and means "any Origin".
repeated string origin = 1;- Specified by:
getOriginCountin interfaceBucket.CorsOrBuilder- Returns:
- The count of origin.
-
getOrigin
The list of Origins eligible to receive CORS response headers. See [https://tools.ietf.org/html/rfc6454][RFC 6454] for more on origins. Note: "*" is permitted in the list of origins, and means "any Origin".
repeated string origin = 1;- Specified by:
getOriginin interfaceBucket.CorsOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The origin at the given index.
-
getOriginBytes
public com.google.protobuf.ByteString getOriginBytes(int index) The list of Origins eligible to receive CORS response headers. See [https://tools.ietf.org/html/rfc6454][RFC 6454] for more on origins. Note: "*" is permitted in the list of origins, and means "any Origin".
repeated string origin = 1;- Specified by:
getOriginBytesin interfaceBucket.CorsOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the origin at the given index.
-
setOrigin
The list of Origins eligible to receive CORS response headers. See [https://tools.ietf.org/html/rfc6454][RFC 6454] for more on origins. Note: "*" is permitted in the list of origins, and means "any Origin".
repeated string origin = 1;- Parameters:
index- The index to set the value at.value- The origin to set.- Returns:
- This builder for chaining.
-
addOrigin
The list of Origins eligible to receive CORS response headers. See [https://tools.ietf.org/html/rfc6454][RFC 6454] for more on origins. Note: "*" is permitted in the list of origins, and means "any Origin".
repeated string origin = 1;- Parameters:
value- The origin to add.- Returns:
- This builder for chaining.
-
addAllOrigin
The list of Origins eligible to receive CORS response headers. See [https://tools.ietf.org/html/rfc6454][RFC 6454] for more on origins. Note: "*" is permitted in the list of origins, and means "any Origin".
repeated string origin = 1;- Parameters:
values- The origin to add.- Returns:
- This builder for chaining.
-
clearOrigin
The list of Origins eligible to receive CORS response headers. See [https://tools.ietf.org/html/rfc6454][RFC 6454] for more on origins. Note: "*" is permitted in the list of origins, and means "any Origin".
repeated string origin = 1;- Returns:
- This builder for chaining.
-
addOriginBytes
The list of Origins eligible to receive CORS response headers. See [https://tools.ietf.org/html/rfc6454][RFC 6454] for more on origins. Note: "*" is permitted in the list of origins, and means "any Origin".
repeated string origin = 1;- Parameters:
value- The bytes of the origin to add.- Returns:
- This builder for chaining.
-
getMethodList
public com.google.protobuf.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;- Specified by:
getMethodListin interfaceBucket.CorsOrBuilder- Returns:
- A list containing the method.
-
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;- Specified by:
getMethodCountin interfaceBucket.CorsOrBuilder- Returns:
- The count of method.
-
getMethod
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;- Specified by:
getMethodin interfaceBucket.CorsOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The method at the given index.
-
getMethodBytes
public com.google.protobuf.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;- Specified by:
getMethodBytesin interfaceBucket.CorsOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the method at the given index.
-
setMethod
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;- Parameters:
index- The index to set the value at.value- The method to set.- Returns:
- This builder for chaining.
-
addMethod
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;- Parameters:
value- The method to add.- Returns:
- This builder for chaining.
-
addAllMethod
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;- Parameters:
values- The method to add.- Returns:
- This builder for chaining.
-
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;- Returns:
- This builder for chaining.
-
addMethodBytes
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;- Parameters:
value- The bytes of the method to add.- Returns:
- This builder for chaining.
-
getResponseHeaderList
public com.google.protobuf.ProtocolStringList getResponseHeaderList()The list of HTTP headers other than the [https://www.w3.org/TR/cors/#simple-response-header][simple response headers] to give permission for the user-agent to share across domains.
repeated string response_header = 3;- Specified by:
getResponseHeaderListin interfaceBucket.CorsOrBuilder- Returns:
- A list containing the responseHeader.
-
getResponseHeaderCount
public int getResponseHeaderCount()The list of HTTP headers other than the [https://www.w3.org/TR/cors/#simple-response-header][simple response headers] to give permission for the user-agent to share across domains.
repeated string response_header = 3;- Specified by:
getResponseHeaderCountin interfaceBucket.CorsOrBuilder- Returns:
- The count of responseHeader.
-
getResponseHeader
The list of HTTP headers other than the [https://www.w3.org/TR/cors/#simple-response-header][simple response headers] to give permission for the user-agent to share across domains.
repeated string response_header = 3;- Specified by:
getResponseHeaderin interfaceBucket.CorsOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The responseHeader at the given index.
-
getResponseHeaderBytes
public com.google.protobuf.ByteString getResponseHeaderBytes(int index) The list of HTTP headers other than the [https://www.w3.org/TR/cors/#simple-response-header][simple response headers] to give permission for the user-agent to share across domains.
repeated string response_header = 3;- Specified by:
getResponseHeaderBytesin interfaceBucket.CorsOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the responseHeader at the given index.
-
setResponseHeader
The list of HTTP headers other than the [https://www.w3.org/TR/cors/#simple-response-header][simple response headers] to give permission for the user-agent to share across domains.
repeated string response_header = 3;- Parameters:
index- The index to set the value at.value- The responseHeader to set.- Returns:
- This builder for chaining.
-
addResponseHeader
The list of HTTP headers other than the [https://www.w3.org/TR/cors/#simple-response-header][simple response headers] to give permission for the user-agent to share across domains.
repeated string response_header = 3;- Parameters:
value- The responseHeader to add.- Returns:
- This builder for chaining.
-
addAllResponseHeader
The list of HTTP headers other than the [https://www.w3.org/TR/cors/#simple-response-header][simple response headers] to give permission for the user-agent to share across domains.
repeated string response_header = 3;- Parameters:
values- The responseHeader to add.- Returns:
- This builder for chaining.
-
clearResponseHeader
The list of HTTP headers other than the [https://www.w3.org/TR/cors/#simple-response-header][simple response headers] to give permission for the user-agent to share across domains.
repeated string response_header = 3;- Returns:
- This builder for chaining.
-
addResponseHeaderBytes
The list of HTTP headers other than the [https://www.w3.org/TR/cors/#simple-response-header][simple response headers] to give permission for the user-agent to share across domains.
repeated string response_header = 3;- Parameters:
value- The bytes of the responseHeader to add.- Returns:
- This builder for chaining.
-
getMaxAgeSeconds
public int getMaxAgeSeconds()The value, in seconds, to return in the [https://www.w3.org/TR/cors/#access-control-max-age-response-header][Access-Control-Max-Age header] used in preflight responses.
int32 max_age_seconds = 4;- Specified by:
getMaxAgeSecondsin interfaceBucket.CorsOrBuilder- Returns:
- The maxAgeSeconds.
-
setMaxAgeSeconds
The value, in seconds, to return in the [https://www.w3.org/TR/cors/#access-control-max-age-response-header][Access-Control-Max-Age header] used in preflight responses.
int32 max_age_seconds = 4;- Parameters:
value- The maxAgeSeconds to set.- Returns:
- This builder for chaining.
-
clearMaxAgeSeconds
The value, in seconds, to return in the [https://www.w3.org/TR/cors/#access-control-max-age-response-header][Access-Control-Max-Age header] used in preflight responses.
int32 max_age_seconds = 4;- Returns:
- This builder for chaining.
-
setUnknownFields
public final Bucket.Cors.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<Bucket.Cors.Builder>
-
mergeUnknownFields
public final Bucket.Cors.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<Bucket.Cors.Builder>
-