Class CreateSpecRequest.Builder

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

public static final class CreateSpecRequest.Builder extends com.google.protobuf.GeneratedMessage.Builder<CreateSpecRequest.Builder> implements CreateSpecRequestOrBuilder
 The [CreateSpec][google.cloud.apihub.v1.ApiHub.CreateSpec] method's request.
 
Protobuf type google.cloud.apihub.v1.CreateSpecRequest
  • 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<CreateSpecRequest.Builder>
    • clear

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

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

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

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

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

      public CreateSpecRequest.Builder mergeFrom(CreateSpecRequest other)
    • isInitialized

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

      public CreateSpecRequest.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<CreateSpecRequest.Builder>
      Throws:
      IOException
    • getParent

      public String getParent()
       Required. The parent resource for Spec.
       Format:
       `projects/{project}/locations/{location}/apis/{api}/versions/{version}`
       
      string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Specified by:
      getParent in interface CreateSpecRequestOrBuilder
      Returns:
      The parent.
    • getParentBytes

      public com.google.protobuf.ByteString getParentBytes()
       Required. The parent resource for Spec.
       Format:
       `projects/{project}/locations/{location}/apis/{api}/versions/{version}`
       
      string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Specified by:
      getParentBytes in interface CreateSpecRequestOrBuilder
      Returns:
      The bytes for parent.
    • setParent

      public CreateSpecRequest.Builder setParent(String value)
       Required. The parent resource for Spec.
       Format:
       `projects/{project}/locations/{location}/apis/{api}/versions/{version}`
       
      string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The parent to set.
      Returns:
      This builder for chaining.
    • clearParent

      public CreateSpecRequest.Builder clearParent()
       Required. The parent resource for Spec.
       Format:
       `projects/{project}/locations/{location}/apis/{api}/versions/{version}`
       
      string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Returns:
      This builder for chaining.
    • setParentBytes

      public CreateSpecRequest.Builder setParentBytes(com.google.protobuf.ByteString value)
       Required. The parent resource for Spec.
       Format:
       `projects/{project}/locations/{location}/apis/{api}/versions/{version}`
       
      string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The bytes for parent to set.
      Returns:
      This builder for chaining.
    • getSpecId

      public String getSpecId()
       Optional. The ID to use for the spec, which will become the final component
       of the spec's resource name. This field is optional.
      
       * If provided, the same will be used. The service will throw an error if
       the specified id is already used by another spec in the API
       resource.
       * If not provided, a system generated id will be used.
      
       This value should be 4-500 characters, overall resource name which will be
       of format
       `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}`,
       its length is limited to 1000 characters and valid characters are
       /[a-z][A-Z][0-9]-_/.
       
      string spec_id = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getSpecId in interface CreateSpecRequestOrBuilder
      Returns:
      The specId.
    • getSpecIdBytes

      public com.google.protobuf.ByteString getSpecIdBytes()
       Optional. The ID to use for the spec, which will become the final component
       of the spec's resource name. This field is optional.
      
       * If provided, the same will be used. The service will throw an error if
       the specified id is already used by another spec in the API
       resource.
       * If not provided, a system generated id will be used.
      
       This value should be 4-500 characters, overall resource name which will be
       of format
       `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}`,
       its length is limited to 1000 characters and valid characters are
       /[a-z][A-Z][0-9]-_/.
       
      string spec_id = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getSpecIdBytes in interface CreateSpecRequestOrBuilder
      Returns:
      The bytes for specId.
    • setSpecId

      public CreateSpecRequest.Builder setSpecId(String value)
       Optional. The ID to use for the spec, which will become the final component
       of the spec's resource name. This field is optional.
      
       * If provided, the same will be used. The service will throw an error if
       the specified id is already used by another spec in the API
       resource.
       * If not provided, a system generated id will be used.
      
       This value should be 4-500 characters, overall resource name which will be
       of format
       `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}`,
       its length is limited to 1000 characters and valid characters are
       /[a-z][A-Z][0-9]-_/.
       
      string spec_id = 2 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The specId to set.
      Returns:
      This builder for chaining.
    • clearSpecId

      public CreateSpecRequest.Builder clearSpecId()
       Optional. The ID to use for the spec, which will become the final component
       of the spec's resource name. This field is optional.
      
       * If provided, the same will be used. The service will throw an error if
       the specified id is already used by another spec in the API
       resource.
       * If not provided, a system generated id will be used.
      
       This value should be 4-500 characters, overall resource name which will be
       of format
       `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}`,
       its length is limited to 1000 characters and valid characters are
       /[a-z][A-Z][0-9]-_/.
       
      string spec_id = 2 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • setSpecIdBytes

      public CreateSpecRequest.Builder setSpecIdBytes(com.google.protobuf.ByteString value)
       Optional. The ID to use for the spec, which will become the final component
       of the spec's resource name. This field is optional.
      
       * If provided, the same will be used. The service will throw an error if
       the specified id is already used by another spec in the API
       resource.
       * If not provided, a system generated id will be used.
      
       This value should be 4-500 characters, overall resource name which will be
       of format
       `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}`,
       its length is limited to 1000 characters and valid characters are
       /[a-z][A-Z][0-9]-_/.
       
      string spec_id = 2 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes for specId to set.
      Returns:
      This builder for chaining.
    • hasSpec

      public boolean hasSpec()
       Required. The spec to create.
       
      .google.cloud.apihub.v1.Spec spec = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      hasSpec in interface CreateSpecRequestOrBuilder
      Returns:
      Whether the spec field is set.
    • getSpec

      public Spec getSpec()
       Required. The spec to create.
       
      .google.cloud.apihub.v1.Spec spec = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getSpec in interface CreateSpecRequestOrBuilder
      Returns:
      The spec.
    • setSpec

      public CreateSpecRequest.Builder setSpec(Spec value)
       Required. The spec to create.
       
      .google.cloud.apihub.v1.Spec spec = 3 [(.google.api.field_behavior) = REQUIRED];
    • setSpec

      public CreateSpecRequest.Builder setSpec(Spec.Builder builderForValue)
       Required. The spec to create.
       
      .google.cloud.apihub.v1.Spec spec = 3 [(.google.api.field_behavior) = REQUIRED];
    • mergeSpec

      public CreateSpecRequest.Builder mergeSpec(Spec value)
       Required. The spec to create.
       
      .google.cloud.apihub.v1.Spec spec = 3 [(.google.api.field_behavior) = REQUIRED];
    • clearSpec

      public CreateSpecRequest.Builder clearSpec()
       Required. The spec to create.
       
      .google.cloud.apihub.v1.Spec spec = 3 [(.google.api.field_behavior) = REQUIRED];
    • getSpecBuilder

      public Spec.Builder getSpecBuilder()
       Required. The spec to create.
       
      .google.cloud.apihub.v1.Spec spec = 3 [(.google.api.field_behavior) = REQUIRED];
    • getSpecOrBuilder

      public SpecOrBuilder getSpecOrBuilder()
       Required. The spec to create.
       
      .google.cloud.apihub.v1.Spec spec = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getSpecOrBuilder in interface CreateSpecRequestOrBuilder