Class CreateSpecRequest.Builder (0.4.0)

public static final class CreateSpecRequest.Builder extends GeneratedMessageV3.Builder<CreateSpecRequest.Builder> implements CreateSpecRequestOrBuilder

The CreateSpec method's request.

Protobuf type google.cloud.apihub.v1.CreateSpecRequest

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public CreateSpecRequest.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
CreateSpecRequest.Builder
Overrides

build()

public CreateSpecRequest build()
Returns
Type Description
CreateSpecRequest

buildPartial()

public CreateSpecRequest buildPartial()
Returns
Type Description
CreateSpecRequest

clear()

public CreateSpecRequest.Builder clear()
Returns
Type Description
CreateSpecRequest.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public CreateSpecRequest.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
CreateSpecRequest.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public CreateSpecRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
CreateSpecRequest.Builder
Overrides

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
Type Description
CreateSpecRequest.Builder

This builder for chaining.

clearSpec()

public CreateSpecRequest.Builder clearSpec()

Required. The spec to create.

.google.cloud.apihub.v1.Spec spec = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
CreateSpecRequest.Builder

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, and valid characters are /a-z[0-9]-_/.

string spec_id = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CreateSpecRequest.Builder

This builder for chaining.

clone()

public CreateSpecRequest.Builder clone()
Returns
Type Description
CreateSpecRequest.Builder
Overrides

getDefaultInstanceForType()

public CreateSpecRequest getDefaultInstanceForType()
Returns
Type Description
CreateSpecRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

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) = { ... }

Returns
Type Description
String

The parent.

getParentBytes()

public 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) = { ... }

Returns
Type Description
ByteString

The bytes for parent.

getSpec()

public Spec getSpec()

Required. The spec to create.

.google.cloud.apihub.v1.Spec spec = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Spec

The spec.

getSpecBuilder()

public Spec.Builder getSpecBuilder()

Required. The spec to create.

.google.cloud.apihub.v1.Spec spec = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Spec.Builder

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, and valid characters are /a-z[0-9]-_/.

string spec_id = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The specId.

getSpecIdBytes()

public 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, and valid characters are /a-z[0-9]-_/.

string spec_id = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for specId.

getSpecOrBuilder()

public SpecOrBuilder getSpecOrBuilder()

Required. The spec to create.

.google.cloud.apihub.v1.Spec spec = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
SpecOrBuilder

hasSpec()

public boolean hasSpec()

Required. The spec to create.

.google.cloud.apihub.v1.Spec spec = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the spec field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(CreateSpecRequest other)

public CreateSpecRequest.Builder mergeFrom(CreateSpecRequest other)
Parameter
Name Description
other CreateSpecRequest
Returns
Type Description
CreateSpecRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public CreateSpecRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CreateSpecRequest.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public CreateSpecRequest.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
CreateSpecRequest.Builder
Overrides

mergeSpec(Spec value)

public CreateSpecRequest.Builder mergeSpec(Spec value)

Required. The spec to create.

.google.cloud.apihub.v1.Spec spec = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value Spec
Returns
Type Description
CreateSpecRequest.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final CreateSpecRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
CreateSpecRequest.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public CreateSpecRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
CreateSpecRequest.Builder
Overrides

setParent(String value)

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) = { ... }

Parameter
Name Description
value String

The parent to set.

Returns
Type Description
CreateSpecRequest.Builder

This builder for chaining.

setParentBytes(ByteString value)

public CreateSpecRequest.Builder setParentBytes(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) = { ... }

Parameter
Name Description
value ByteString

The bytes for parent to set.

Returns
Type Description
CreateSpecRequest.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public CreateSpecRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
CreateSpecRequest.Builder
Overrides

setSpec(Spec value)

public CreateSpecRequest.Builder setSpec(Spec value)

Required. The spec to create.

.google.cloud.apihub.v1.Spec spec = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value Spec
Returns
Type Description
CreateSpecRequest.Builder

setSpec(Spec.Builder builderForValue)

public CreateSpecRequest.Builder setSpec(Spec.Builder builderForValue)

Required. The spec to create.

.google.cloud.apihub.v1.Spec spec = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
builderForValue Spec.Builder
Returns
Type Description
CreateSpecRequest.Builder

setSpecId(String value)

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, and valid characters are /a-z[0-9]-_/.

string spec_id = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The specId to set.

Returns
Type Description
CreateSpecRequest.Builder

This builder for chaining.

setSpecIdBytes(ByteString value)

public CreateSpecRequest.Builder setSpecIdBytes(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, and valid characters are /a-z[0-9]-_/.

string spec_id = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for specId to set.

Returns
Type Description
CreateSpecRequest.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final CreateSpecRequest.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
CreateSpecRequest.Builder
Overrides