Class ServiceBinding.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<ServiceBinding.Builder>
com.google.cloud.networkservices.v1.ServiceBinding.Builder
All Implemented Interfaces:
ServiceBindingOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
ServiceBinding

public static final class ServiceBinding.Builder extends com.google.protobuf.GeneratedMessage.Builder<ServiceBinding.Builder> implements ServiceBindingOrBuilder
 ServiceBinding can be used to:
 - Bind a Service Directory Service to be used in a BackendService resource.
 This feature will be deprecated soon.
 - Bind a Private Service Connect producer service to be used in consumer
 Cloud Service Mesh or Application Load Balancers.
 - Bind a Cloud Run service to be used in consumer Cloud Service Mesh or
 Application Load Balancers.
 
Protobuf type google.cloud.networkservices.v1.ServiceBinding
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<ServiceBinding.Builder>
    • internalGetMutableMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
      Overrides:
      internalGetMutableMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<ServiceBinding.Builder>
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<ServiceBinding.Builder>
    • clear

      public ServiceBinding.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.GeneratedMessage.Builder<ServiceBinding.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.GeneratedMessage.Builder<ServiceBinding.Builder>
    • getDefaultInstanceForType

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

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

      public ServiceBinding buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public ServiceBinding.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<ServiceBinding.Builder>
    • mergeFrom

      public ServiceBinding.Builder mergeFrom(ServiceBinding other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<ServiceBinding.Builder>
    • mergeFrom

      public ServiceBinding.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<ServiceBinding.Builder>
      Throws:
      IOException
    • getName

      public String getName()
       Identifier. Name of the ServiceBinding resource. It matches pattern
       `projects/*/locations/*/serviceBindings/<service_binding_name>`.
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Specified by:
      getName in interface ServiceBindingOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Identifier. Name of the ServiceBinding resource. It matches pattern
       `projects/*/locations/*/serviceBindings/<service_binding_name>`.
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Specified by:
      getNameBytes in interface ServiceBindingOrBuilder
      Returns:
      The bytes for name.
    • setName

      public ServiceBinding.Builder setName(String value)
       Identifier. Name of the ServiceBinding resource. It matches pattern
       `projects/*/locations/*/serviceBindings/<service_binding_name>`.
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

      public ServiceBinding.Builder clearName()
       Identifier. Name of the ServiceBinding resource. It matches pattern
       `projects/*/locations/*/serviceBindings/<service_binding_name>`.
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Returns:
      This builder for chaining.
    • setNameBytes

      public ServiceBinding.Builder setNameBytes(com.google.protobuf.ByteString value)
       Identifier. Name of the ServiceBinding resource. It matches pattern
       `projects/*/locations/*/serviceBindings/<service_binding_name>`.
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • getDescription

      public String getDescription()
       Optional. A free-text description of the resource. Max length 1024
       characters.
       
      string description = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getDescription in interface ServiceBindingOrBuilder
      Returns:
      The description.
    • getDescriptionBytes

      public com.google.protobuf.ByteString getDescriptionBytes()
       Optional. A free-text description of the resource. Max length 1024
       characters.
       
      string description = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getDescriptionBytes in interface ServiceBindingOrBuilder
      Returns:
      The bytes for description.
    • setDescription

      public ServiceBinding.Builder setDescription(String value)
       Optional. A free-text description of the resource. Max length 1024
       characters.
       
      string description = 2 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The description to set.
      Returns:
      This builder for chaining.
    • clearDescription

      public ServiceBinding.Builder clearDescription()
       Optional. A free-text description of the resource. Max length 1024
       characters.
       
      string description = 2 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • setDescriptionBytes

      public ServiceBinding.Builder setDescriptionBytes(com.google.protobuf.ByteString value)
       Optional. A free-text description of the resource. Max length 1024
       characters.
       
      string description = 2 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes for description to set.
      Returns:
      This builder for chaining.
    • hasCreateTime

      public boolean hasCreateTime()
       Output only. The timestamp when the resource was created.
       
      .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasCreateTime in interface ServiceBindingOrBuilder
      Returns:
      Whether the createTime field is set.
    • getCreateTime

      public com.google.protobuf.Timestamp getCreateTime()
       Output only. The timestamp when the resource was created.
       
      .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCreateTime in interface ServiceBindingOrBuilder
      Returns:
      The createTime.
    • setCreateTime

      public ServiceBinding.Builder setCreateTime(com.google.protobuf.Timestamp value)
       Output only. The timestamp when the resource was created.
       
      .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • setCreateTime

      public ServiceBinding.Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue)
       Output only. The timestamp when the resource was created.
       
      .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • mergeCreateTime

      public ServiceBinding.Builder mergeCreateTime(com.google.protobuf.Timestamp value)
       Output only. The timestamp when the resource was created.
       
      .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • clearCreateTime

      public ServiceBinding.Builder clearCreateTime()
       Output only. The timestamp when the resource was created.
       
      .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getCreateTimeBuilder

      public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder()
       Output only. The timestamp when the resource was created.
       
      .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getCreateTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder()
       Output only. The timestamp when the resource was created.
       
      .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCreateTimeOrBuilder in interface ServiceBindingOrBuilder
    • hasUpdateTime

      public boolean hasUpdateTime()
       Output only. The timestamp when the resource was updated.
       
      .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasUpdateTime in interface ServiceBindingOrBuilder
      Returns:
      Whether the updateTime field is set.
    • getUpdateTime

      public com.google.protobuf.Timestamp getUpdateTime()
       Output only. The timestamp when the resource was updated.
       
      .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getUpdateTime in interface ServiceBindingOrBuilder
      Returns:
      The updateTime.
    • setUpdateTime

      public ServiceBinding.Builder setUpdateTime(com.google.protobuf.Timestamp value)
       Output only. The timestamp when the resource was updated.
       
      .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • setUpdateTime

      public ServiceBinding.Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue)
       Output only. The timestamp when the resource was updated.
       
      .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • mergeUpdateTime

      public ServiceBinding.Builder mergeUpdateTime(com.google.protobuf.Timestamp value)
       Output only. The timestamp when the resource was updated.
       
      .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • clearUpdateTime

      public ServiceBinding.Builder clearUpdateTime()
       Output only. The timestamp when the resource was updated.
       
      .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getUpdateTimeBuilder

      public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder()
       Output only. The timestamp when the resource was updated.
       
      .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getUpdateTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder()
       Output only. The timestamp when the resource was updated.
       
      .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getUpdateTimeOrBuilder in interface ServiceBindingOrBuilder
    • getService

      @Deprecated public String getService()
      Deprecated.
      google.cloud.networkservices.v1.ServiceBinding.service is deprecated. See google/cloud/networkservices/v1/service_binding.proto;l=69
       Optional. The full Service Directory Service name of the format
       `projects/*/locations/*/namespaces/*/services/*`.
       This field is for Service Directory integration which will be deprecated
       soon.
       
      string service = 5 [deprecated = true, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Specified by:
      getService in interface ServiceBindingOrBuilder
      Returns:
      The service.
    • getServiceBytes

      @Deprecated public com.google.protobuf.ByteString getServiceBytes()
      Deprecated.
      google.cloud.networkservices.v1.ServiceBinding.service is deprecated. See google/cloud/networkservices/v1/service_binding.proto;l=69
       Optional. The full Service Directory Service name of the format
       `projects/*/locations/*/namespaces/*/services/*`.
       This field is for Service Directory integration which will be deprecated
       soon.
       
      string service = 5 [deprecated = true, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Specified by:
      getServiceBytes in interface ServiceBindingOrBuilder
      Returns:
      The bytes for service.
    • setService

      @Deprecated public ServiceBinding.Builder setService(String value)
      Deprecated.
      google.cloud.networkservices.v1.ServiceBinding.service is deprecated. See google/cloud/networkservices/v1/service_binding.proto;l=69
       Optional. The full Service Directory Service name of the format
       `projects/*/locations/*/namespaces/*/services/*`.
       This field is for Service Directory integration which will be deprecated
       soon.
       
      string service = 5 [deprecated = true, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The service to set.
      Returns:
      This builder for chaining.
    • clearService

      @Deprecated public ServiceBinding.Builder clearService()
      Deprecated.
      google.cloud.networkservices.v1.ServiceBinding.service is deprecated. See google/cloud/networkservices/v1/service_binding.proto;l=69
       Optional. The full Service Directory Service name of the format
       `projects/*/locations/*/namespaces/*/services/*`.
       This field is for Service Directory integration which will be deprecated
       soon.
       
      string service = 5 [deprecated = true, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Returns:
      This builder for chaining.
    • setServiceBytes

      @Deprecated public ServiceBinding.Builder setServiceBytes(com.google.protobuf.ByteString value)
      Deprecated.
      google.cloud.networkservices.v1.ServiceBinding.service is deprecated. See google/cloud/networkservices/v1/service_binding.proto;l=69
       Optional. The full Service Directory Service name of the format
       `projects/*/locations/*/namespaces/*/services/*`.
       This field is for Service Directory integration which will be deprecated
       soon.
       
      string service = 5 [deprecated = true, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The bytes for service to set.
      Returns:
      This builder for chaining.
    • getServiceId

      @Deprecated public String getServiceId()
      Deprecated.
      google.cloud.networkservices.v1.ServiceBinding.service_id is deprecated. See google/cloud/networkservices/v1/service_binding.proto;l=82
       Output only. The unique identifier of the Service Directory Service against
       which the ServiceBinding resource is validated. This is populated when the
       Service Binding resource is used in another resource (like Backend
       Service). This is of the UUID4 format. This field is for Service Directory
       integration which will be deprecated soon.
       
      string service_id = 8 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getServiceId in interface ServiceBindingOrBuilder
      Returns:
      The serviceId.
    • getServiceIdBytes

      @Deprecated public com.google.protobuf.ByteString getServiceIdBytes()
      Deprecated.
      google.cloud.networkservices.v1.ServiceBinding.service_id is deprecated. See google/cloud/networkservices/v1/service_binding.proto;l=82
       Output only. The unique identifier of the Service Directory Service against
       which the ServiceBinding resource is validated. This is populated when the
       Service Binding resource is used in another resource (like Backend
       Service). This is of the UUID4 format. This field is for Service Directory
       integration which will be deprecated soon.
       
      string service_id = 8 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getServiceIdBytes in interface ServiceBindingOrBuilder
      Returns:
      The bytes for serviceId.
    • setServiceId

      @Deprecated public ServiceBinding.Builder setServiceId(String value)
      Deprecated.
      google.cloud.networkservices.v1.ServiceBinding.service_id is deprecated. See google/cloud/networkservices/v1/service_binding.proto;l=82
       Output only. The unique identifier of the Service Directory Service against
       which the ServiceBinding resource is validated. This is populated when the
       Service Binding resource is used in another resource (like Backend
       Service). This is of the UUID4 format. This field is for Service Directory
       integration which will be deprecated soon.
       
      string service_id = 8 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The serviceId to set.
      Returns:
      This builder for chaining.
    • clearServiceId

      @Deprecated public ServiceBinding.Builder clearServiceId()
      Deprecated.
      google.cloud.networkservices.v1.ServiceBinding.service_id is deprecated. See google/cloud/networkservices/v1/service_binding.proto;l=82
       Output only. The unique identifier of the Service Directory Service against
       which the ServiceBinding resource is validated. This is populated when the
       Service Binding resource is used in another resource (like Backend
       Service). This is of the UUID4 format. This field is for Service Directory
       integration which will be deprecated soon.
       
      string service_id = 8 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • setServiceIdBytes

      @Deprecated public ServiceBinding.Builder setServiceIdBytes(com.google.protobuf.ByteString value)
      Deprecated.
      google.cloud.networkservices.v1.ServiceBinding.service_id is deprecated. See google/cloud/networkservices/v1/service_binding.proto;l=82
       Output only. The unique identifier of the Service Directory Service against
       which the ServiceBinding resource is validated. This is populated when the
       Service Binding resource is used in another resource (like Backend
       Service). This is of the UUID4 format. This field is for Service Directory
       integration which will be deprecated soon.
       
      string service_id = 8 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The bytes for serviceId to set.
      Returns:
      This builder for chaining.
    • getLabelsCount

      public int getLabelsCount()
      Description copied from interface: ServiceBindingOrBuilder
       Optional. Set of label tags associated with the ServiceBinding resource.
       
      map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getLabelsCount in interface ServiceBindingOrBuilder
    • containsLabels

      public boolean containsLabels(String key)
       Optional. Set of label tags associated with the ServiceBinding resource.
       
      map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      containsLabels in interface ServiceBindingOrBuilder
    • getLabels

      @Deprecated public Map<String,String> getLabels()
      Deprecated.
      Use getLabelsMap() instead.
      Specified by:
      getLabels in interface ServiceBindingOrBuilder
    • getLabelsMap

      public Map<String,String> getLabelsMap()
       Optional. Set of label tags associated with the ServiceBinding resource.
       
      map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getLabelsMap in interface ServiceBindingOrBuilder
    • getLabelsOrDefault

      public String getLabelsOrDefault(String key, String defaultValue)
       Optional. Set of label tags associated with the ServiceBinding resource.
       
      map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getLabelsOrDefault in interface ServiceBindingOrBuilder
    • getLabelsOrThrow

      public String getLabelsOrThrow(String key)
       Optional. Set of label tags associated with the ServiceBinding resource.
       
      map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getLabelsOrThrow in interface ServiceBindingOrBuilder
    • clearLabels

      public ServiceBinding.Builder clearLabels()
    • removeLabels

      public ServiceBinding.Builder removeLabels(String key)
       Optional. Set of label tags associated with the ServiceBinding resource.
       
      map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL];
    • getMutableLabels

      @Deprecated public Map<String,String> getMutableLabels()
      Deprecated.
      Use alternate mutation accessors instead.
    • putLabels

      public ServiceBinding.Builder putLabels(String key, String value)
       Optional. Set of label tags associated with the ServiceBinding resource.
       
      map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL];
    • putAllLabels

      public ServiceBinding.Builder putAllLabels(Map<String,String> values)
       Optional. Set of label tags associated with the ServiceBinding resource.
       
      map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL];