Class Profile.Builder (2.45.0)

public static final class Profile.Builder extends GeneratedMessageV3.Builder<Profile.Builder> implements ProfileOrBuilder

Profile resource.

Protobuf type google.devtools.cloudprofiler.v2.Profile

Implements

ProfileOrBuilder

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Profile build()
Returns
Type Description
Profile

buildPartial()

public Profile buildPartial()
Returns
Type Description
Profile

clear()

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

clearDeployment()

public Profile.Builder clearDeployment()

Deployment this profile corresponds to.

.google.devtools.cloudprofiler.v2.Deployment deployment = 3;

Returns
Type Description
Profile.Builder

clearDuration()

public Profile.Builder clearDuration()

Duration of the profiling session. Input (for the offline mode) or output (for the online mode). The field represents requested profiling duration. It may slightly differ from the effective profiling duration, which is recorded in the profile data, in case the profiling can't be stopped immediately (e.g. in case stopping the profiling is handled asynchronously).

.google.protobuf.Duration duration = 4;

Returns
Type Description
Profile.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearLabels()

public Profile.Builder clearLabels()
Returns
Type Description
Profile.Builder

clearName()

public Profile.Builder clearName()

Output only. Opaque, server-assigned, unique ID for this profile.

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Profile.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearProfileBytes()

public Profile.Builder clearProfileBytes()

Input only. Profile bytes, as a gzip compressed serialized proto, the format is https://github.com/google/pprof/blob/master/proto/profile.proto.

bytes profile_bytes = 5 [(.google.api.field_behavior) = INPUT_ONLY];

Returns
Type Description
Profile.Builder

This builder for chaining.

clearProfileType()

public Profile.Builder clearProfileType()

Type of profile. For offline mode, this must be specified when creating the profile. For online mode it is assigned and returned by the server.

.google.devtools.cloudprofiler.v2.ProfileType profile_type = 2;

Returns
Type Description
Profile.Builder

This builder for chaining.

clearStartTime()

public Profile.Builder clearStartTime()

Output only. Start time for the profile. This output is only present in response from the ListProfiles method.

.google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Profile.Builder

clone()

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

containsLabels(String key)

public boolean containsLabels(String key)

Input only. Labels associated to this specific profile. These labels will get merged with the deployment labels for the final data set. See documentation on deployment labels for validation rules and limits.

map<string, string> labels = 6 [(.google.api.field_behavior) = INPUT_ONLY];

Parameter
Name Description
key String
Returns
Type Description
boolean

getDefaultInstanceForType()

public Profile getDefaultInstanceForType()
Returns
Type Description
Profile

getDeployment()

public Deployment getDeployment()

Deployment this profile corresponds to.

.google.devtools.cloudprofiler.v2.Deployment deployment = 3;

Returns
Type Description
Deployment

The deployment.

getDeploymentBuilder()

public Deployment.Builder getDeploymentBuilder()

Deployment this profile corresponds to.

.google.devtools.cloudprofiler.v2.Deployment deployment = 3;

Returns
Type Description
Deployment.Builder

getDeploymentOrBuilder()

public DeploymentOrBuilder getDeploymentOrBuilder()

Deployment this profile corresponds to.

.google.devtools.cloudprofiler.v2.Deployment deployment = 3;

Returns
Type Description
DeploymentOrBuilder

getDescriptorForType()

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

getDuration()

public Duration getDuration()

Duration of the profiling session. Input (for the offline mode) or output (for the online mode). The field represents requested profiling duration. It may slightly differ from the effective profiling duration, which is recorded in the profile data, in case the profiling can't be stopped immediately (e.g. in case stopping the profiling is handled asynchronously).

.google.protobuf.Duration duration = 4;

Returns
Type Description
Duration

The duration.

getDurationBuilder()

public Duration.Builder getDurationBuilder()

Duration of the profiling session. Input (for the offline mode) or output (for the online mode). The field represents requested profiling duration. It may slightly differ from the effective profiling duration, which is recorded in the profile data, in case the profiling can't be stopped immediately (e.g. in case stopping the profiling is handled asynchronously).

.google.protobuf.Duration duration = 4;

Returns
Type Description
Builder

getDurationOrBuilder()

public DurationOrBuilder getDurationOrBuilder()

Duration of the profiling session. Input (for the offline mode) or output (for the online mode). The field represents requested profiling duration. It may slightly differ from the effective profiling duration, which is recorded in the profile data, in case the profiling can't be stopped immediately (e.g. in case stopping the profiling is handled asynchronously).

.google.protobuf.Duration duration = 4;

Returns
Type Description
DurationOrBuilder

getLabels() (deprecated)

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
Type Description
Map<String,String>

getLabelsCount()

public int getLabelsCount()

Input only. Labels associated to this specific profile. These labels will get merged with the deployment labels for the final data set. See documentation on deployment labels for validation rules and limits.

map<string, string> labels = 6 [(.google.api.field_behavior) = INPUT_ONLY];

Returns
Type Description
int

getLabelsMap()

public Map<String,String> getLabelsMap()

Input only. Labels associated to this specific profile. These labels will get merged with the deployment labels for the final data set. See documentation on deployment labels for validation rules and limits.

map<string, string> labels = 6 [(.google.api.field_behavior) = INPUT_ONLY];

Returns
Type Description
Map<String,String>

getLabelsOrDefault(String key, String defaultValue)

public String getLabelsOrDefault(String key, String defaultValue)

Input only. Labels associated to this specific profile. These labels will get merged with the deployment labels for the final data set. See documentation on deployment labels for validation rules and limits.

map<string, string> labels = 6 [(.google.api.field_behavior) = INPUT_ONLY];

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getLabelsOrThrow(String key)

public String getLabelsOrThrow(String key)

Input only. Labels associated to this specific profile. These labels will get merged with the deployment labels for the final data set. See documentation on deployment labels for validation rules and limits.

map<string, string> labels = 6 [(.google.api.field_behavior) = INPUT_ONLY];

Parameter
Name Description
key String
Returns
Type Description
String

getMutableLabels() (deprecated)

public Map<String,String> getMutableLabels()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,String>

getName()

public String getName()

Output only. Opaque, server-assigned, unique ID for this profile.

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Output only. Opaque, server-assigned, unique ID for this profile.

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for name.

getProfileBytes()

public ByteString getProfileBytes()

Input only. Profile bytes, as a gzip compressed serialized proto, the format is https://github.com/google/pprof/blob/master/proto/profile.proto.

bytes profile_bytes = 5 [(.google.api.field_behavior) = INPUT_ONLY];

Returns
Type Description
ByteString

The profileBytes.

getProfileType()

public ProfileType getProfileType()

Type of profile. For offline mode, this must be specified when creating the profile. For online mode it is assigned and returned by the server.

.google.devtools.cloudprofiler.v2.ProfileType profile_type = 2;

Returns
Type Description
ProfileType

The profileType.

getProfileTypeValue()

public int getProfileTypeValue()

Type of profile. For offline mode, this must be specified when creating the profile. For online mode it is assigned and returned by the server.

.google.devtools.cloudprofiler.v2.ProfileType profile_type = 2;

Returns
Type Description
int

The enum numeric value on the wire for profileType.

getStartTime()

public Timestamp getStartTime()

Output only. Start time for the profile. This output is only present in response from the ListProfiles method.

.google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The startTime.

getStartTimeBuilder()

public Timestamp.Builder getStartTimeBuilder()

Output only. Start time for the profile. This output is only present in response from the ListProfiles method.

.google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getStartTimeOrBuilder()

public TimestampOrBuilder getStartTimeOrBuilder()

Output only. Start time for the profile. This output is only present in response from the ListProfiles method.

.google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

hasDeployment()

public boolean hasDeployment()

Deployment this profile corresponds to.

.google.devtools.cloudprofiler.v2.Deployment deployment = 3;

Returns
Type Description
boolean

Whether the deployment field is set.

hasDuration()

public boolean hasDuration()

Duration of the profiling session. Input (for the offline mode) or output (for the online mode). The field represents requested profiling duration. It may slightly differ from the effective profiling duration, which is recorded in the profile data, in case the profiling can't be stopped immediately (e.g. in case stopping the profiling is handled asynchronously).

.google.protobuf.Duration duration = 4;

Returns
Type Description
boolean

Whether the duration field is set.

hasStartTime()

public boolean hasStartTime()

Output only. Start time for the profile. This output is only present in response from the ListProfiles method.

.google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the startTime field is set.

internalGetFieldAccessorTable()

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

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)

internalGetMutableMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeDeployment(Deployment value)

public Profile.Builder mergeDeployment(Deployment value)

Deployment this profile corresponds to.

.google.devtools.cloudprofiler.v2.Deployment deployment = 3;

Parameter
Name Description
value Deployment
Returns
Type Description
Profile.Builder

mergeDuration(Duration value)

public Profile.Builder mergeDuration(Duration value)

Duration of the profiling session. Input (for the offline mode) or output (for the online mode). The field represents requested profiling duration. It may slightly differ from the effective profiling duration, which is recorded in the profile data, in case the profiling can't be stopped immediately (e.g. in case stopping the profiling is handled asynchronously).

.google.protobuf.Duration duration = 4;

Parameter
Name Description
value Duration
Returns
Type Description
Profile.Builder

mergeFrom(Profile other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeStartTime(Timestamp value)

public Profile.Builder mergeStartTime(Timestamp value)

Output only. Start time for the profile. This output is only present in response from the ListProfiles method.

.google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
Profile.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

putAllLabels(Map<String,String> values)

public Profile.Builder putAllLabels(Map<String,String> values)

Input only. Labels associated to this specific profile. These labels will get merged with the deployment labels for the final data set. See documentation on deployment labels for validation rules and limits.

map<string, string> labels = 6 [(.google.api.field_behavior) = INPUT_ONLY];

Parameter
Name Description
values Map<String,String>
Returns
Type Description
Profile.Builder

putLabels(String key, String value)

public Profile.Builder putLabels(String key, String value)

Input only. Labels associated to this specific profile. These labels will get merged with the deployment labels for the final data set. See documentation on deployment labels for validation rules and limits.

map<string, string> labels = 6 [(.google.api.field_behavior) = INPUT_ONLY];

Parameters
Name Description
key String
value String
Returns
Type Description
Profile.Builder

removeLabels(String key)

public Profile.Builder removeLabels(String key)

Input only. Labels associated to this specific profile. These labels will get merged with the deployment labels for the final data set. See documentation on deployment labels for validation rules and limits.

map<string, string> labels = 6 [(.google.api.field_behavior) = INPUT_ONLY];

Parameter
Name Description
key String
Returns
Type Description
Profile.Builder

setDeployment(Deployment value)

public Profile.Builder setDeployment(Deployment value)

Deployment this profile corresponds to.

.google.devtools.cloudprofiler.v2.Deployment deployment = 3;

Parameter
Name Description
value Deployment
Returns
Type Description
Profile.Builder

setDeployment(Deployment.Builder builderForValue)

public Profile.Builder setDeployment(Deployment.Builder builderForValue)

Deployment this profile corresponds to.

.google.devtools.cloudprofiler.v2.Deployment deployment = 3;

Parameter
Name Description
builderForValue Deployment.Builder
Returns
Type Description
Profile.Builder

setDuration(Duration value)

public Profile.Builder setDuration(Duration value)

Duration of the profiling session. Input (for the offline mode) or output (for the online mode). The field represents requested profiling duration. It may slightly differ from the effective profiling duration, which is recorded in the profile data, in case the profiling can't be stopped immediately (e.g. in case stopping the profiling is handled asynchronously).

.google.protobuf.Duration duration = 4;

Parameter
Name Description
value Duration
Returns
Type Description
Profile.Builder

setDuration(Duration.Builder builderForValue)

public Profile.Builder setDuration(Duration.Builder builderForValue)

Duration of the profiling session. Input (for the offline mode) or output (for the online mode). The field represents requested profiling duration. It may slightly differ from the effective profiling duration, which is recorded in the profile data, in case the profiling can't be stopped immediately (e.g. in case stopping the profiling is handled asynchronously).

.google.protobuf.Duration duration = 4;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Profile.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setName(String value)

public Profile.Builder setName(String value)

Output only. Opaque, server-assigned, unique ID for this profile.

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The name to set.

Returns
Type Description
Profile.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Profile.Builder setNameBytes(ByteString value)

Output only. Opaque, server-assigned, unique ID for this profile.

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
Profile.Builder

This builder for chaining.

setProfileBytes(ByteString value)

public Profile.Builder setProfileBytes(ByteString value)

Input only. Profile bytes, as a gzip compressed serialized proto, the format is https://github.com/google/pprof/blob/master/proto/profile.proto.

bytes profile_bytes = 5 [(.google.api.field_behavior) = INPUT_ONLY];

Parameter
Name Description
value ByteString

The profileBytes to set.

Returns
Type Description
Profile.Builder

This builder for chaining.

setProfileType(ProfileType value)

public Profile.Builder setProfileType(ProfileType value)

Type of profile. For offline mode, this must be specified when creating the profile. For online mode it is assigned and returned by the server.

.google.devtools.cloudprofiler.v2.ProfileType profile_type = 2;

Parameter
Name Description
value ProfileType

The profileType to set.

Returns
Type Description
Profile.Builder

This builder for chaining.

setProfileTypeValue(int value)

public Profile.Builder setProfileTypeValue(int value)

Type of profile. For offline mode, this must be specified when creating the profile. For online mode it is assigned and returned by the server.

.google.devtools.cloudprofiler.v2.ProfileType profile_type = 2;

Parameter
Name Description
value int

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

Returns
Type Description
Profile.Builder

This builder for chaining.

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

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

setStartTime(Timestamp value)

public Profile.Builder setStartTime(Timestamp value)

Output only. Start time for the profile. This output is only present in response from the ListProfiles method.

.google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
Profile.Builder

setStartTime(Timestamp.Builder builderForValue)

public Profile.Builder setStartTime(Timestamp.Builder builderForValue)

Output only. Start time for the profile. This output is only present in response from the ListProfiles method.

.google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Profile.Builder

setUnknownFields(UnknownFieldSet unknownFields)

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