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 Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<Bucket.Cors.Builder>
    • clear

      public Bucket.Cors.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessageV3.Builder<Bucket.Cors.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<Bucket.Cors.Builder>
    • getDefaultInstanceForType

      public Bucket.Cors getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public Bucket.Cors build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public Bucket.Cors buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • clone

      public Bucket.Cors.Builder clone()
      Specified by:
      clone in interface com.google.protobuf.Message.Builder
      Specified by:
      clone in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clone in class com.google.protobuf.GeneratedMessageV3.Builder<Bucket.Cors.Builder>
    • setField

      public Bucket.Cors.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      setField in interface com.google.protobuf.Message.Builder
      Overrides:
      setField in class com.google.protobuf.GeneratedMessageV3.Builder<Bucket.Cors.Builder>
    • clearField

      public Bucket.Cors.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
      Specified by:
      clearField in interface com.google.protobuf.Message.Builder
      Overrides:
      clearField in class com.google.protobuf.GeneratedMessageV3.Builder<Bucket.Cors.Builder>
    • clearOneof

      public Bucket.Cors.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
      Specified by:
      clearOneof in interface com.google.protobuf.Message.Builder
      Overrides:
      clearOneof in class com.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:
      setRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Bucket.Cors.Builder>
    • addRepeatedField

      public Bucket.Cors.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      addRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Bucket.Cors.Builder>
    • mergeFrom

      public Bucket.Cors.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Bucket.Cors.Builder>
    • mergeFrom

      public Bucket.Cors.Builder mergeFrom(Bucket.Cors other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.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:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Bucket.Cors.Builder>
      Throws:
      IOException
    • getOriginList

      public com.google.protobuf.ProtocolStringList getOriginList()
       Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getOriginList in interface Bucket.CorsOrBuilder
      Returns:
      A list containing the origin.
    • getOriginCount

      public int getOriginCount()
       Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getOriginCount in interface Bucket.CorsOrBuilder
      Returns:
      The count of origin.
    • getOrigin

      public String getOrigin(int index)
       Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getOrigin in interface Bucket.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)
       Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getOriginBytes in interface Bucket.CorsOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the origin at the given index.
    • setOrigin

      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][RFC 6454] 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:
      index - The index to set the value at.
      value - The origin to set.
      Returns:
      This builder for chaining.
    • addOrigin

      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][RFC 6454] 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:
      value - The origin to add.
      Returns:
      This builder for chaining.
    • addAllOrigin

      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][RFC 6454] 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:
      values - The origin to add.
      Returns:
      This builder for chaining.
    • clearOrigin

      public Bucket.Cors.Builder clearOrigin()
       Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • addOriginBytes

      public Bucket.Cors.Builder addOriginBytes(com.google.protobuf.ByteString value)
       Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes of the origin to add.
      Returns:
      This builder for chaining.
    • getMethodList

      public com.google.protobuf.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];
      Specified by:
      getMethodList in interface Bucket.CorsOrBuilder
      Returns:
      A list containing the method.
    • 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];
      Specified by:
      getMethodCount in interface Bucket.CorsOrBuilder
      Returns:
      The count of method.
    • getMethod

      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];
      Specified by:
      getMethod in interface Bucket.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)
       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];
      Specified by:
      getMethodBytes in interface Bucket.CorsOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the method at the given index.
    • setMethod

      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:
      index - The index to set the value at.
      value - The method to set.
      Returns:
      This builder for chaining.
    • addMethod

      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];
      Parameters:
      value - The method to add.
      Returns:
      This builder for chaining.
    • addAllMethod

      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];
      Parameters:
      values - The method to add.
      Returns:
      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:
      This builder for chaining.
    • addMethodBytes

      public Bucket.Cors.Builder addMethodBytes(com.google.protobuf.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];
      Parameters:
      value - The bytes of the method to add.
      Returns:
      This builder for chaining.
    • getResponseHeaderList

      public com.google.protobuf.ProtocolStringList getResponseHeaderList()
       Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getResponseHeaderList in interface Bucket.CorsOrBuilder
      Returns:
      A list containing the responseHeader.
    • getResponseHeaderCount

      public int getResponseHeaderCount()
       Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getResponseHeaderCount in interface Bucket.CorsOrBuilder
      Returns:
      The count of responseHeader.
    • getResponseHeader

      public String getResponseHeader(int index)
       Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getResponseHeader in interface Bucket.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)
       Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getResponseHeaderBytes in interface Bucket.CorsOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the responseHeader at the given index.
    • setResponseHeader

      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][simple response
       headers] to give permission for the user-agent to share across domains.
       
      repeated string response_header = 3 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      index - The index to set the value at.
      value - The responseHeader to set.
      Returns:
      This builder for chaining.
    • addResponseHeader

      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][simple response
       headers] to give permission for the user-agent to share across domains.
       
      repeated string response_header = 3 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The responseHeader to add.
      Returns:
      This builder for chaining.
    • addAllResponseHeader

      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][simple response
       headers] to give permission for the user-agent to share across domains.
       
      repeated string response_header = 3 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      values - The responseHeader to add.
      Returns:
      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][simple response
       headers] to give permission for the user-agent to share across domains.
       
      repeated string response_header = 3 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • addResponseHeaderBytes

      public Bucket.Cors.Builder addResponseHeaderBytes(com.google.protobuf.ByteString value)
       Optional. 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 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes of the responseHeader to add.
      Returns:
      This builder for chaining.
    • 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][Access-Control-Max-Age
       header] used in preflight responses.
       
      int32 max_age_seconds = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getMaxAgeSeconds in interface Bucket.CorsOrBuilder
      Returns:
      The maxAgeSeconds.
    • setMaxAgeSeconds

      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][Access-Control-Max-Age
       header] used in preflight responses.
       
      int32 max_age_seconds = 4 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The maxAgeSeconds to set.
      Returns:
      This builder for chaining.
    • 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][Access-Control-Max-Age
       header] used in preflight responses.
       
      int32 max_age_seconds = 4 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • setUnknownFields

      public final Bucket.Cors.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      setUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Bucket.Cors.Builder>
    • mergeUnknownFields

      public final Bucket.Cors.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      mergeUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Bucket.Cors.Builder>