Class Operation (1.48.0)

public final class Operation extends GeneratedMessageV3 implements OperationOrBuilder

Represents information regarding an operation.

Protobuf type google.api.servicecontrol.v1.Operation

Implements

OperationOrBuilder

Static Fields

CONSUMER_ID_FIELD_NUMBER

public static final int CONSUMER_ID_FIELD_NUMBER
Field Value
Type Description
int

END_TIME_FIELD_NUMBER

public static final int END_TIME_FIELD_NUMBER
Field Value
Type Description
int

EXTENSIONS_FIELD_NUMBER

public static final int EXTENSIONS_FIELD_NUMBER
Field Value
Type Description
int

IMPORTANCE_FIELD_NUMBER

public static final int IMPORTANCE_FIELD_NUMBER
Field Value
Type Description
int

LABELS_FIELD_NUMBER

public static final int LABELS_FIELD_NUMBER
Field Value
Type Description
int

LOG_ENTRIES_FIELD_NUMBER

public static final int LOG_ENTRIES_FIELD_NUMBER
Field Value
Type Description
int

METRIC_VALUE_SETS_FIELD_NUMBER

public static final int METRIC_VALUE_SETS_FIELD_NUMBER
Field Value
Type Description
int

OPERATION_ID_FIELD_NUMBER

public static final int OPERATION_ID_FIELD_NUMBER
Field Value
Type Description
int

OPERATION_NAME_FIELD_NUMBER

public static final int OPERATION_NAME_FIELD_NUMBER
Field Value
Type Description
int

START_TIME_FIELD_NUMBER

public static final int START_TIME_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static Operation getDefaultInstance()
Returns
Type Description
Operation

getDescriptor()

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

newBuilder()

public static Operation.Builder newBuilder()
Returns
Type Description
Operation.Builder

newBuilder(Operation prototype)

public static Operation.Builder newBuilder(Operation prototype)
Parameter
Name Description
prototype Operation
Returns
Type Description
Operation.Builder

parseDelimitedFrom(InputStream input)

public static Operation parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Operation
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Operation parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Operation
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static Operation parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
Operation
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Operation parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Operation
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Operation parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
Operation
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Operation parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Operation
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Operation parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Operation
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Operation parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Operation
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static Operation parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Operation
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Operation parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Operation
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static Operation parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Operation
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Operation parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Operation
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<Operation> parser()
Returns
Type Description
Parser<Operation>

Methods

containsLabels(String key)

public boolean containsLabels(String key)

Labels describing the operation. Only the following labels are allowed:

  • Labels describing monitored resources as defined in the service configuration.
  • Default labels of metric values. When specified, labels defined in the metric value override these default.
  • The following labels defined by Google Cloud Platform:
    • cloud.googleapis.com/location describing the location where the operation happened,
    • servicecontrol.googleapis.com/user_agent describing the user agent of the API request,
    • servicecontrol.googleapis.com/service_agent describing the service used to handle the API request (e.g. ESP),
    • servicecontrol.googleapis.com/platform describing the platform where the API is served, such as App Engine, Compute Engine, or Kubernetes Engine.

map<string, string> labels = 6;

Parameter
Name Description
key String
Returns
Type Description
boolean

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getConsumerId()

public String getConsumerId()

Identity of the consumer who is using the service. This field should be filled in for the operations initiated by a consumer, but not for service-initiated operations that are not related to a specific consumer.

  • This can be in one of the following formats:
    • project:PROJECT_ID,
    • project_number:PROJECT_NUMBER,
    • projects/PROJECT_ID or PROJECT_NUMBER,
    • folders/FOLDER_NUMBER,
    • organizations/ORGANIZATION_NUMBER,
    • api_key:API_KEY.

string consumer_id = 3;

Returns
Type Description
String

The consumerId.

getConsumerIdBytes()

public ByteString getConsumerIdBytes()

Identity of the consumer who is using the service. This field should be filled in for the operations initiated by a consumer, but not for service-initiated operations that are not related to a specific consumer.

  • This can be in one of the following formats:
    • project:PROJECT_ID,
    • project_number:PROJECT_NUMBER,
    • projects/PROJECT_ID or PROJECT_NUMBER,
    • folders/FOLDER_NUMBER,
    • organizations/ORGANIZATION_NUMBER,
    • api_key:API_KEY.

string consumer_id = 3;

Returns
Type Description
ByteString

The bytes for consumerId.

getDefaultInstanceForType()

public Operation getDefaultInstanceForType()
Returns
Type Description
Operation

getEndTime()

public Timestamp getEndTime()

End time of the operation. Required when the operation is used in ServiceController.Report, but optional when the operation is used in ServiceController.Check.

.google.protobuf.Timestamp end_time = 5;

Returns
Type Description
Timestamp

The endTime.

getEndTimeOrBuilder()

public TimestampOrBuilder getEndTimeOrBuilder()

End time of the operation. Required when the operation is used in ServiceController.Report, but optional when the operation is used in ServiceController.Check.

.google.protobuf.Timestamp end_time = 5;

Returns
Type Description
TimestampOrBuilder

getExtensions(int index)

public Any getExtensions(int index)

Unimplemented.

repeated .google.protobuf.Any extensions = 16;

Parameter
Name Description
index int
Returns
Type Description
Any

getExtensionsCount()

public int getExtensionsCount()

Unimplemented.

repeated .google.protobuf.Any extensions = 16;

Returns
Type Description
int

getExtensionsList()

public List<Any> getExtensionsList()

Unimplemented.

repeated .google.protobuf.Any extensions = 16;

Returns
Type Description
List<Any>

getExtensionsOrBuilder(int index)

public AnyOrBuilder getExtensionsOrBuilder(int index)

Unimplemented.

repeated .google.protobuf.Any extensions = 16;

Parameter
Name Description
index int
Returns
Type Description
AnyOrBuilder

getExtensionsOrBuilderList()

public List<? extends AnyOrBuilder> getExtensionsOrBuilderList()

Unimplemented.

repeated .google.protobuf.Any extensions = 16;

Returns
Type Description
List<? extends com.google.protobuf.AnyOrBuilder>

getImportance()

public Operation.Importance getImportance()

DO NOT USE. This is an experimental field.

.google.api.servicecontrol.v1.Operation.Importance importance = 11;

Returns
Type Description
Operation.Importance

The importance.

getImportanceValue()

public int getImportanceValue()

DO NOT USE. This is an experimental field.

.google.api.servicecontrol.v1.Operation.Importance importance = 11;

Returns
Type Description
int

The enum numeric value on the wire for importance.

getLabels() (deprecated)

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
Type Description
Map<String,String>

getLabelsCount()

public int getLabelsCount()

Labels describing the operation. Only the following labels are allowed:

  • Labels describing monitored resources as defined in the service configuration.
  • Default labels of metric values. When specified, labels defined in the metric value override these default.
  • The following labels defined by Google Cloud Platform:
    • cloud.googleapis.com/location describing the location where the operation happened,
    • servicecontrol.googleapis.com/user_agent describing the user agent of the API request,
    • servicecontrol.googleapis.com/service_agent describing the service used to handle the API request (e.g. ESP),
    • servicecontrol.googleapis.com/platform describing the platform where the API is served, such as App Engine, Compute Engine, or Kubernetes Engine.

map<string, string> labels = 6;

Returns
Type Description
int

getLabelsMap()

public Map<String,String> getLabelsMap()

Labels describing the operation. Only the following labels are allowed:

  • Labels describing monitored resources as defined in the service configuration.
  • Default labels of metric values. When specified, labels defined in the metric value override these default.
  • The following labels defined by Google Cloud Platform:
    • cloud.googleapis.com/location describing the location where the operation happened,
    • servicecontrol.googleapis.com/user_agent describing the user agent of the API request,
    • servicecontrol.googleapis.com/service_agent describing the service used to handle the API request (e.g. ESP),
    • servicecontrol.googleapis.com/platform describing the platform where the API is served, such as App Engine, Compute Engine, or Kubernetes Engine.

map<string, string> labels = 6;

Returns
Type Description
Map<String,String>

getLabelsOrDefault(String key, String defaultValue)

public String getLabelsOrDefault(String key, String defaultValue)

Labels describing the operation. Only the following labels are allowed:

  • Labels describing monitored resources as defined in the service configuration.
  • Default labels of metric values. When specified, labels defined in the metric value override these default.
  • The following labels defined by Google Cloud Platform:
    • cloud.googleapis.com/location describing the location where the operation happened,
    • servicecontrol.googleapis.com/user_agent describing the user agent of the API request,
    • servicecontrol.googleapis.com/service_agent describing the service used to handle the API request (e.g. ESP),
    • servicecontrol.googleapis.com/platform describing the platform where the API is served, such as App Engine, Compute Engine, or Kubernetes Engine.

map<string, string> labels = 6;

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getLabelsOrThrow(String key)

public String getLabelsOrThrow(String key)

Labels describing the operation. Only the following labels are allowed:

  • Labels describing monitored resources as defined in the service configuration.
  • Default labels of metric values. When specified, labels defined in the metric value override these default.
  • The following labels defined by Google Cloud Platform:
    • cloud.googleapis.com/location describing the location where the operation happened,
    • servicecontrol.googleapis.com/user_agent describing the user agent of the API request,
    • servicecontrol.googleapis.com/service_agent describing the service used to handle the API request (e.g. ESP),
    • servicecontrol.googleapis.com/platform describing the platform where the API is served, such as App Engine, Compute Engine, or Kubernetes Engine.

map<string, string> labels = 6;

Parameter
Name Description
key String
Returns
Type Description
String

getLogEntries(int index)

public LogEntry getLogEntries(int index)

Represents information to be logged.

repeated .google.api.servicecontrol.v1.LogEntry log_entries = 8;

Parameter
Name Description
index int
Returns
Type Description
LogEntry

getLogEntriesCount()

public int getLogEntriesCount()

Represents information to be logged.

repeated .google.api.servicecontrol.v1.LogEntry log_entries = 8;

Returns
Type Description
int

getLogEntriesList()

public List<LogEntry> getLogEntriesList()

Represents information to be logged.

repeated .google.api.servicecontrol.v1.LogEntry log_entries = 8;

Returns
Type Description
List<LogEntry>

getLogEntriesOrBuilder(int index)

public LogEntryOrBuilder getLogEntriesOrBuilder(int index)

Represents information to be logged.

repeated .google.api.servicecontrol.v1.LogEntry log_entries = 8;

Parameter
Name Description
index int
Returns
Type Description
LogEntryOrBuilder

getLogEntriesOrBuilderList()

public List<? extends LogEntryOrBuilder> getLogEntriesOrBuilderList()

Represents information to be logged.

repeated .google.api.servicecontrol.v1.LogEntry log_entries = 8;

Returns
Type Description
List<? extends com.google.api.servicecontrol.v1.LogEntryOrBuilder>

getMetricValueSets(int index)

public MetricValueSet getMetricValueSets(int index)

Represents information about this operation. Each MetricValueSet corresponds to a metric defined in the service configuration. The data type used in the MetricValueSet must agree with the data type specified in the metric definition.

Within a single operation, it is not allowed to have more than one MetricValue instances that have the same metric names and identical label value combinations. If a request has such duplicated MetricValue instances, the entire request is rejected with an invalid argument error.

repeated .google.api.servicecontrol.v1.MetricValueSet metric_value_sets = 7;

Parameter
Name Description
index int
Returns
Type Description
MetricValueSet

getMetricValueSetsCount()

public int getMetricValueSetsCount()

Represents information about this operation. Each MetricValueSet corresponds to a metric defined in the service configuration. The data type used in the MetricValueSet must agree with the data type specified in the metric definition.

Within a single operation, it is not allowed to have more than one MetricValue instances that have the same metric names and identical label value combinations. If a request has such duplicated MetricValue instances, the entire request is rejected with an invalid argument error.

repeated .google.api.servicecontrol.v1.MetricValueSet metric_value_sets = 7;

Returns
Type Description
int

getMetricValueSetsList()

public List<MetricValueSet> getMetricValueSetsList()

Represents information about this operation. Each MetricValueSet corresponds to a metric defined in the service configuration. The data type used in the MetricValueSet must agree with the data type specified in the metric definition.

Within a single operation, it is not allowed to have more than one MetricValue instances that have the same metric names and identical label value combinations. If a request has such duplicated MetricValue instances, the entire request is rejected with an invalid argument error.

repeated .google.api.servicecontrol.v1.MetricValueSet metric_value_sets = 7;

Returns
Type Description
List<MetricValueSet>

getMetricValueSetsOrBuilder(int index)

public MetricValueSetOrBuilder getMetricValueSetsOrBuilder(int index)

Represents information about this operation. Each MetricValueSet corresponds to a metric defined in the service configuration. The data type used in the MetricValueSet must agree with the data type specified in the metric definition.

Within a single operation, it is not allowed to have more than one MetricValue instances that have the same metric names and identical label value combinations. If a request has such duplicated MetricValue instances, the entire request is rejected with an invalid argument error.

repeated .google.api.servicecontrol.v1.MetricValueSet metric_value_sets = 7;

Parameter
Name Description
index int
Returns
Type Description
MetricValueSetOrBuilder

getMetricValueSetsOrBuilderList()

public List<? extends MetricValueSetOrBuilder> getMetricValueSetsOrBuilderList()

Represents information about this operation. Each MetricValueSet corresponds to a metric defined in the service configuration. The data type used in the MetricValueSet must agree with the data type specified in the metric definition.

Within a single operation, it is not allowed to have more than one MetricValue instances that have the same metric names and identical label value combinations. If a request has such duplicated MetricValue instances, the entire request is rejected with an invalid argument error.

repeated .google.api.servicecontrol.v1.MetricValueSet metric_value_sets = 7;

Returns
Type Description
List<? extends com.google.api.servicecontrol.v1.MetricValueSetOrBuilder>

getOperationId()

public String getOperationId()

Identity of the operation. This must be unique within the scope of the service that generated the operation. If the service calls Check() and Report() on the same operation, the two calls should carry the same id.

UUID version 4 is recommended, though not required. In scenarios where an operation is computed from existing information and an idempotent id is desirable for deduplication purpose, UUID version 5 is recommended. See RFC 4122 for details.

string operation_id = 1;

Returns
Type Description
String

The operationId.

getOperationIdBytes()

public ByteString getOperationIdBytes()

Identity of the operation. This must be unique within the scope of the service that generated the operation. If the service calls Check() and Report() on the same operation, the two calls should carry the same id.

UUID version 4 is recommended, though not required. In scenarios where an operation is computed from existing information and an idempotent id is desirable for deduplication purpose, UUID version 5 is recommended. See RFC 4122 for details.

string operation_id = 1;

Returns
Type Description
ByteString

The bytes for operationId.

getOperationName()

public String getOperationName()

Fully qualified name of the operation. Reserved for future use.

string operation_name = 2;

Returns
Type Description
String

The operationName.

getOperationNameBytes()

public ByteString getOperationNameBytes()

Fully qualified name of the operation. Reserved for future use.

string operation_name = 2;

Returns
Type Description
ByteString

The bytes for operationName.

getParserForType()

public Parser<Operation> getParserForType()
Returns
Type Description
Parser<Operation>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getStartTime()

public Timestamp getStartTime()

Required. Start time of the operation.

.google.protobuf.Timestamp start_time = 4;

Returns
Type Description
Timestamp

The startTime.

getStartTimeOrBuilder()

public TimestampOrBuilder getStartTimeOrBuilder()

Required. Start time of the operation.

.google.protobuf.Timestamp start_time = 4;

Returns
Type Description
TimestampOrBuilder

hasEndTime()

public boolean hasEndTime()

End time of the operation. Required when the operation is used in ServiceController.Report, but optional when the operation is used in ServiceController.Check.

.google.protobuf.Timestamp end_time = 5;

Returns
Type Description
boolean

Whether the endTime field is set.

hasStartTime()

public boolean hasStartTime()

Required. Start time of the operation.

.google.protobuf.Timestamp start_time = 4;

Returns
Type Description
boolean

Whether the startTime field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

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.internalGetMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public Operation.Builder newBuilderForType()
Returns
Type Description
Operation.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Operation.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Operation.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public Operation.Builder toBuilder()
Returns
Type Description
Operation.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException