Class ServiceProjectAttachment.Builder (0.18.0)

public static final class ServiceProjectAttachment.Builder extends GeneratedMessageV3.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

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public ServiceProjectAttachment build()
Returns
Type Description
ServiceProjectAttachment

buildPartial()

public ServiceProjectAttachment buildPartial()
Returns
Type Description
ServiceProjectAttachment

clear()

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

clearCreateTime()

public ServiceProjectAttachment.Builder clearCreateTime()

Output only. Create time.

.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ServiceProjectAttachment.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearName()

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

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

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

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

This builder for chaining.

clearUid()

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

This builder for chaining.

clone()

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

getCreateTime()

public Timestamp getCreateTime()

Output only. Create time.

.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The createTime.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

Output only. Create time.

.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. Create time.

.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getDefaultInstanceForType()

public ServiceProjectAttachment getDefaultInstanceForType()
Returns
Type Description
ServiceProjectAttachment

getDescriptorForType()

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

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];

Returns
Type Description
String

The name.

getNameBytes()

public 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];

Returns
Type Description
ByteString

The bytes for name.

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

Returns
Type Description
String

The serviceProject.

getServiceProjectBytes()

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

Returns
Type Description
ByteString

The bytes for serviceProject.

getState()

public ServiceProjectAttachment.State getState()

Output only. ServiceProjectAttachment state.

.google.cloud.apphub.v1.ServiceProjectAttachment.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ServiceProjectAttachment.State

The state.

getStateValue()

public int getStateValue()

Output only. ServiceProjectAttachment state.

.google.cloud.apphub.v1.ServiceProjectAttachment.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The enum numeric value on the wire for state.

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

Returns
Type Description
String

The uid.

getUidBytes()

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

Returns
Type Description
ByteString

The bytes for uid.

hasCreateTime()

public boolean hasCreateTime()

Output only. Create time.

.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the createTime field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeCreateTime(Timestamp value)

public ServiceProjectAttachment.Builder mergeCreateTime(Timestamp value)

Output only. Create time.

.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
ServiceProjectAttachment.Builder

mergeFrom(ServiceProjectAttachment other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setCreateTime(Timestamp value)

public ServiceProjectAttachment.Builder setCreateTime(Timestamp value)

Output only. Create time.

.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
ServiceProjectAttachment.Builder

setCreateTime(Timestamp.Builder builderForValue)

public ServiceProjectAttachment.Builder setCreateTime(Timestamp.Builder builderForValue)

Output only. Create time.

.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
ServiceProjectAttachment.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setName(String value)

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];

Parameter
Name Description
value String

The name to set.

Returns
Type Description
ServiceProjectAttachment.Builder

This builder for chaining.

setNameBytes(ByteString value)

public ServiceProjectAttachment.Builder setNameBytes(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];

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
ServiceProjectAttachment.Builder

This builder for chaining.

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

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

setServiceProject(String value)

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

Parameter
Name Description
value String

The serviceProject to set.

Returns
Type Description
ServiceProjectAttachment.Builder

This builder for chaining.

setServiceProjectBytes(ByteString value)

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

Parameter
Name Description
value ByteString

The bytes for serviceProject to set.

Returns
Type Description
ServiceProjectAttachment.Builder

This builder for chaining.

setState(ServiceProjectAttachment.State value)

public ServiceProjectAttachment.Builder setState(ServiceProjectAttachment.State value)

Output only. ServiceProjectAttachment state.

.google.cloud.apphub.v1.ServiceProjectAttachment.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ServiceProjectAttachment.State

The state to set.

Returns
Type Description
ServiceProjectAttachment.Builder

This builder for chaining.

setStateValue(int value)

public ServiceProjectAttachment.Builder setStateValue(int value)

Output only. ServiceProjectAttachment state.

.google.cloud.apphub.v1.ServiceProjectAttachment.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value int

The enum numeric value on the wire for state to set.

Returns
Type Description
ServiceProjectAttachment.Builder

This builder for chaining.

setUid(String value)

public ServiceProjectAttachment.Builder setUid(String 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) = { ... }

Parameter
Name Description
value String

The uid to set.

Returns
Type Description
ServiceProjectAttachment.Builder

This builder for chaining.

setUidBytes(ByteString value)

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

Parameter
Name Description
value ByteString

The bytes for uid to set.

Returns
Type Description
ServiceProjectAttachment.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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