Class CreateAttributeRequest.Builder (0.2.0)

public static final class CreateAttributeRequest.Builder extends GeneratedMessageV3.Builder<CreateAttributeRequest.Builder> implements CreateAttributeRequestOrBuilder

The CreateAttribute method's request.

Protobuf type google.cloud.apihub.v1.CreateAttributeRequest

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public CreateAttributeRequest build()
Returns
Type Description
CreateAttributeRequest

buildPartial()

public CreateAttributeRequest buildPartial()
Returns
Type Description
CreateAttributeRequest

clear()

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

clearAttribute()

public CreateAttributeRequest.Builder clearAttribute()

Required. The attribute to create.

.google.cloud.apihub.v1.Attribute attribute = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
CreateAttributeRequest.Builder

clearAttributeId()

public CreateAttributeRequest.Builder clearAttributeId()

Optional. The ID to use for the attribute, which will become the final component of the attribute'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 attribute resource in the API hub.
  • 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 attribute_id = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CreateAttributeRequest.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearParent()

public CreateAttributeRequest.Builder clearParent()

Required. The parent resource for Attribute. Format: projects/{project}/locations/{location}

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
CreateAttributeRequest.Builder

This builder for chaining.

clone()

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

getAttribute()

public Attribute getAttribute()

Required. The attribute to create.

.google.cloud.apihub.v1.Attribute attribute = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Attribute

The attribute.

getAttributeBuilder()

public Attribute.Builder getAttributeBuilder()

Required. The attribute to create.

.google.cloud.apihub.v1.Attribute attribute = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Attribute.Builder

getAttributeId()

public String getAttributeId()

Optional. The ID to use for the attribute, which will become the final component of the attribute'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 attribute resource in the API hub.
  • 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 attribute_id = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The attributeId.

getAttributeIdBytes()

public ByteString getAttributeIdBytes()

Optional. The ID to use for the attribute, which will become the final component of the attribute'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 attribute resource in the API hub.
  • 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 attribute_id = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for attributeId.

getAttributeOrBuilder()

public AttributeOrBuilder getAttributeOrBuilder()

Required. The attribute to create.

.google.cloud.apihub.v1.Attribute attribute = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
AttributeOrBuilder

getDefaultInstanceForType()

public CreateAttributeRequest getDefaultInstanceForType()
Returns
Type Description
CreateAttributeRequest

getDescriptorForType()

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

getParent()

public String getParent()

Required. The parent resource for Attribute. Format: projects/{project}/locations/{location}

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 Attribute. Format: projects/{project}/locations/{location}

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for parent.

hasAttribute()

public boolean hasAttribute()

Required. The attribute to create.

.google.cloud.apihub.v1.Attribute attribute = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the attribute field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeAttribute(Attribute value)

public CreateAttributeRequest.Builder mergeAttribute(Attribute value)

Required. The attribute to create.

.google.cloud.apihub.v1.Attribute attribute = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value Attribute
Returns
Type Description
CreateAttributeRequest.Builder

mergeFrom(CreateAttributeRequest other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setAttribute(Attribute value)

public CreateAttributeRequest.Builder setAttribute(Attribute value)

Required. The attribute to create.

.google.cloud.apihub.v1.Attribute attribute = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value Attribute
Returns
Type Description
CreateAttributeRequest.Builder

setAttribute(Attribute.Builder builderForValue)

public CreateAttributeRequest.Builder setAttribute(Attribute.Builder builderForValue)

Required. The attribute to create.

.google.cloud.apihub.v1.Attribute attribute = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
builderForValue Attribute.Builder
Returns
Type Description
CreateAttributeRequest.Builder

setAttributeId(String value)

public CreateAttributeRequest.Builder setAttributeId(String value)

Optional. The ID to use for the attribute, which will become the final component of the attribute'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 attribute resource in the API hub.
  • 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 attribute_id = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The attributeId to set.

Returns
Type Description
CreateAttributeRequest.Builder

This builder for chaining.

setAttributeIdBytes(ByteString value)

public CreateAttributeRequest.Builder setAttributeIdBytes(ByteString value)

Optional. The ID to use for the attribute, which will become the final component of the attribute'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 attribute resource in the API hub.
  • 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 attribute_id = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for attributeId to set.

Returns
Type Description
CreateAttributeRequest.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setParent(String value)

public CreateAttributeRequest.Builder setParent(String value)

Required. The parent resource for Attribute. Format: projects/{project}/locations/{location}

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The parent to set.

Returns
Type Description
CreateAttributeRequest.Builder

This builder for chaining.

setParentBytes(ByteString value)

public CreateAttributeRequest.Builder setParentBytes(ByteString value)

Required. The parent resource for Attribute. Format: projects/{project}/locations/{location}

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
CreateAttributeRequest.Builder

This builder for chaining.

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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