Class ServiceProjectAttachment.Builder

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

public static final class ServiceProjectAttachment.Builder extends com.google.protobuf.GeneratedMessage.Builder<ServiceProjectAttachment.Builder> implements ServiceProjectAttachmentOrBuilder
 ServiceProjectAttachment represents an attachment from a service project to a
 host project. Service projects contain the underlying cloud
 infrastructure resources, and expose these resources to the host project
 through a ServiceProjectAttachment. With the attachments, the host project
 can provide an aggregated view of resources across all service projects.
 
Protobuf type google.cloud.apphub.v1.ServiceProjectAttachment
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<ServiceProjectAttachment.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<ServiceProjectAttachment.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<ServiceProjectAttachment.Builder>
    • getDefaultInstanceForType

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

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

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

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

    • isInitialized

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

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

      public String getName()
       Identifier. The resource name of a ServiceProjectAttachment. Format:
       `"projects/{host-project-id}/locations/global/serviceProjectAttachments/{service-project-id}."`
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Specified by:
      getName in interface ServiceProjectAttachmentOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Identifier. The resource name of a ServiceProjectAttachment. Format:
       `"projects/{host-project-id}/locations/global/serviceProjectAttachments/{service-project-id}."`
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Specified by:
      getNameBytes in interface ServiceProjectAttachmentOrBuilder
      Returns:
      The bytes for name.
    • setName

      public ServiceProjectAttachment.Builder setName(String value)
       Identifier. The resource name of a ServiceProjectAttachment. Format:
       `"projects/{host-project-id}/locations/global/serviceProjectAttachments/{service-project-id}."`
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

       Identifier. The resource name of a ServiceProjectAttachment. Format:
       `"projects/{host-project-id}/locations/global/serviceProjectAttachments/{service-project-id}."`
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Returns:
      This builder for chaining.
    • setNameBytes

      public ServiceProjectAttachment.Builder setNameBytes(com.google.protobuf.ByteString value)
       Identifier. The resource name of a ServiceProjectAttachment. Format:
       `"projects/{host-project-id}/locations/global/serviceProjectAttachments/{service-project-id}."`
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • getServiceProject

      public String getServiceProject()
       Required. Immutable. Service project name in the format: `"projects/abc"`
       or `"projects/123"`. As input, project name with either project id or
       number are accepted. As output, this field will contain project number.
       
      string service_project = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
      Specified by:
      getServiceProject in interface ServiceProjectAttachmentOrBuilder
      Returns:
      The serviceProject.
    • getServiceProjectBytes

      public com.google.protobuf.ByteString getServiceProjectBytes()
       Required. Immutable. Service project name in the format: `"projects/abc"`
       or `"projects/123"`. As input, project name with either project id or
       number are accepted. As output, this field will contain project number.
       
      string service_project = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
      Specified by:
      getServiceProjectBytes in interface ServiceProjectAttachmentOrBuilder
      Returns:
      The bytes for serviceProject.
    • setServiceProject

      public ServiceProjectAttachment.Builder setServiceProject(String value)
       Required. Immutable. Service project name in the format: `"projects/abc"`
       or `"projects/123"`. As input, project name with either project id or
       number are accepted. As output, this field will contain project number.
       
      string service_project = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The serviceProject to set.
      Returns:
      This builder for chaining.
    • clearServiceProject

      public ServiceProjectAttachment.Builder clearServiceProject()
       Required. Immutable. Service project name in the format: `"projects/abc"`
       or `"projects/123"`. As input, project name with either project id or
       number are accepted. As output, this field will contain project number.
       
      string service_project = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
      Returns:
      This builder for chaining.
    • setServiceProjectBytes

      public ServiceProjectAttachment.Builder setServiceProjectBytes(com.google.protobuf.ByteString value)
       Required. Immutable. Service project name in the format: `"projects/abc"`
       or `"projects/123"`. As input, project name with either project id or
       number are accepted. As output, this field will contain project number.
       
      string service_project = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The bytes for serviceProject to set.
      Returns:
      This builder for chaining.
    • hasCreateTime

      public boolean hasCreateTime()
       Output only. Create time.
       
      .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasCreateTime in interface ServiceProjectAttachmentOrBuilder
      Returns:
      Whether the createTime field is set.
    • getCreateTime

      public com.google.protobuf.Timestamp getCreateTime()
       Output only. Create time.
       
      .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCreateTime in interface ServiceProjectAttachmentOrBuilder
      Returns:
      The createTime.
    • setCreateTime

      public ServiceProjectAttachment.Builder setCreateTime(com.google.protobuf.Timestamp value)
       Output only. Create time.
       
      .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • setCreateTime

      public ServiceProjectAttachment.Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue)
       Output only. Create time.
       
      .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • mergeCreateTime

      public ServiceProjectAttachment.Builder mergeCreateTime(com.google.protobuf.Timestamp value)
       Output only. Create time.
       
      .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • clearCreateTime

      public ServiceProjectAttachment.Builder clearCreateTime()
       Output only. Create time.
       
      .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getCreateTimeBuilder

      public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder()
       Output only. Create time.
       
      .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getCreateTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder()
       Output only. Create time.
       
      .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCreateTimeOrBuilder in interface ServiceProjectAttachmentOrBuilder
    • getUid

      public String getUid()
       Output only. A globally unique identifier (in UUID4 format) for the
       `ServiceProjectAttachment`.
       
      string uid = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... }
      Specified by:
      getUid in interface ServiceProjectAttachmentOrBuilder
      Returns:
      The uid.
    • getUidBytes

      public com.google.protobuf.ByteString getUidBytes()
       Output only. A globally unique identifier (in UUID4 format) for the
       `ServiceProjectAttachment`.
       
      string uid = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... }
      Specified by:
      getUidBytes in interface ServiceProjectAttachmentOrBuilder
      Returns:
      The bytes for uid.
    • setUid

       Output only. A globally unique identifier (in UUID4 format) for the
       `ServiceProjectAttachment`.
       
      string uid = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... }
      Parameters:
      value - The uid to set.
      Returns:
      This builder for chaining.
    • clearUid

       Output only. A globally unique identifier (in UUID4 format) for the
       `ServiceProjectAttachment`.
       
      string uid = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... }
      Returns:
      This builder for chaining.
    • setUidBytes

      public ServiceProjectAttachment.Builder setUidBytes(com.google.protobuf.ByteString value)
       Output only. A globally unique identifier (in UUID4 format) for the
       `ServiceProjectAttachment`.
       
      string uid = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... }
      Parameters:
      value - The bytes for uid to set.
      Returns:
      This builder for chaining.
    • getStateValue

      public int getStateValue()
       Output only. ServiceProjectAttachment state.
       
      .google.cloud.apphub.v1.ServiceProjectAttachment.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getStateValue in interface ServiceProjectAttachmentOrBuilder
      Returns:
      The enum numeric value on the wire for state.
    • setStateValue

      public ServiceProjectAttachment.Builder setStateValue(int value)
       Output only. ServiceProjectAttachment state.
       
      .google.cloud.apphub.v1.ServiceProjectAttachment.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The enum numeric value on the wire for state to set.
      Returns:
      This builder for chaining.
    • getState

      public ServiceProjectAttachment.State getState()
       Output only. ServiceProjectAttachment state.
       
      .google.cloud.apphub.v1.ServiceProjectAttachment.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getState in interface ServiceProjectAttachmentOrBuilder
      Returns:
      The state.
    • setState

       Output only. ServiceProjectAttachment state.
       
      .google.cloud.apphub.v1.ServiceProjectAttachment.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The state to set.
      Returns:
      This builder for chaining.
    • clearState

      public ServiceProjectAttachment.Builder clearState()
       Output only. ServiceProjectAttachment state.
       
      .google.cloud.apphub.v1.ServiceProjectAttachment.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.