Class ServiceProjectAttachment.Builder (0.1.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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public ServiceProjectAttachment.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
ServiceProjectAttachment.Builder
Overrides

build()

public ServiceProjectAttachment build()
Returns
TypeDescription
ServiceProjectAttachment

buildPartial()

public ServiceProjectAttachment buildPartial()
Returns
TypeDescription
ServiceProjectAttachment

clear()

public ServiceProjectAttachment.Builder clear()
Returns
TypeDescription
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
TypeDescription
ServiceProjectAttachment.Builder

clearField(Descriptors.FieldDescriptor field)

public ServiceProjectAttachment.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
ServiceProjectAttachment.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public ServiceProjectAttachment.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
ServiceProjectAttachment.Builder

This builder for chaining.

clone()

public ServiceProjectAttachment.Builder clone()
Returns
TypeDescription
ServiceProjectAttachment.Builder
Overrides

getCreateTime()

public Timestamp getCreateTime()

Output only. Create time.

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

Returns
TypeDescription
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
TypeDescription
Builder

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. Create time.

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

Returns
TypeDescription
TimestampOrBuilder

getDefaultInstanceForType()

public ServiceProjectAttachment getDefaultInstanceForType()
Returns
TypeDescription
ServiceProjectAttachment

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the createTime field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
ServiceProjectAttachment.Builder

mergeFrom(ServiceProjectAttachment other)

public ServiceProjectAttachment.Builder mergeFrom(ServiceProjectAttachment other)
Parameter
NameDescription
otherServiceProjectAttachment
Returns
TypeDescription
ServiceProjectAttachment.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public ServiceProjectAttachment.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ServiceProjectAttachment.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public ServiceProjectAttachment.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
ServiceProjectAttachment.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final ServiceProjectAttachment.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
builderForValueBuilder
Returns
TypeDescription
ServiceProjectAttachment.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public ServiceProjectAttachment.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The name to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The serviceProject to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for serviceProject to set.

Returns
TypeDescription
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
NameDescription
valueServiceProjectAttachment.State

The state to set.

Returns
TypeDescription
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
NameDescription
valueint

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

Returns
TypeDescription
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
NameDescription
valueString

The uid to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for uid to set.

Returns
TypeDescription
ServiceProjectAttachment.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final ServiceProjectAttachment.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
ServiceProjectAttachment.Builder
Overrides