Class Operation

  • All Implemented Interfaces:
    OperationOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

    public final class Operation
    extends com.google.protobuf.GeneratedMessageV3
    implements OperationOrBuilder
     Represents information regarding an operation.
     
    Protobuf type google.api.servicecontrol.v1.Operation
    See Also:
    Serialized Form
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetMapField

        protected com.google.protobuf.MapField internalGetMapField​(int number)
        Overrides:
        internalGetMapField in class com.google.protobuf.GeneratedMessageV3
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • 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;
        Specified by:
        getOperationId in interface OperationOrBuilder
        Returns:
        The operationId.
      • getOperationIdBytes

        public com.google.protobuf.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;
        Specified by:
        getOperationIdBytes in interface OperationOrBuilder
        Returns:
        The bytes for operationId.
      • getOperationName

        public String getOperationName()
         Fully qualified name of the operation. Reserved for future use.
         
        string operation_name = 2;
        Specified by:
        getOperationName in interface OperationOrBuilder
        Returns:
        The operationName.
      • getOperationNameBytes

        public com.google.protobuf.ByteString getOperationNameBytes()
         Fully qualified name of the operation. Reserved for future use.
         
        string operation_name = 2;
        Specified by:
        getOperationNameBytes in interface OperationOrBuilder
        Returns:
        The bytes for operationName.
      • 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;
        Specified by:
        getConsumerId in interface OperationOrBuilder
        Returns:
        The consumerId.
      • getConsumerIdBytes

        public com.google.protobuf.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;
        Specified by:
        getConsumerIdBytes in interface OperationOrBuilder
        Returns:
        The bytes for consumerId.
      • hasStartTime

        public boolean hasStartTime()
         Required. Start time of the operation.
         
        .google.protobuf.Timestamp start_time = 4;
        Specified by:
        hasStartTime in interface OperationOrBuilder
        Returns:
        Whether the startTime field is set.
      • getStartTime

        public com.google.protobuf.Timestamp getStartTime()
         Required. Start time of the operation.
         
        .google.protobuf.Timestamp start_time = 4;
        Specified by:
        getStartTime in interface OperationOrBuilder
        Returns:
        The startTime.
      • getStartTimeOrBuilder

        public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder()
         Required. Start time of the operation.
         
        .google.protobuf.Timestamp start_time = 4;
        Specified by:
        getStartTimeOrBuilder in interface OperationOrBuilder
      • hasEndTime

        public boolean hasEndTime()
         End time of the operation.
         Required when the operation is used in
         [ServiceController.Report][google.api.servicecontrol.v1.ServiceController.Report],
         but optional when the operation is used in
         [ServiceController.Check][google.api.servicecontrol.v1.ServiceController.Check].
         
        .google.protobuf.Timestamp end_time = 5;
        Specified by:
        hasEndTime in interface OperationOrBuilder
        Returns:
        Whether the endTime field is set.
      • getEndTime

        public com.google.protobuf.Timestamp getEndTime()
         End time of the operation.
         Required when the operation is used in
         [ServiceController.Report][google.api.servicecontrol.v1.ServiceController.Report],
         but optional when the operation is used in
         [ServiceController.Check][google.api.servicecontrol.v1.ServiceController.Check].
         
        .google.protobuf.Timestamp end_time = 5;
        Specified by:
        getEndTime in interface OperationOrBuilder
        Returns:
        The endTime.
      • getEndTimeOrBuilder

        public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder()
         End time of the operation.
         Required when the operation is used in
         [ServiceController.Report][google.api.servicecontrol.v1.ServiceController.Report],
         but optional when the operation is used in
         [ServiceController.Check][google.api.servicecontrol.v1.ServiceController.Check].
         
        .google.protobuf.Timestamp end_time = 5;
        Specified by:
        getEndTimeOrBuilder in interface OperationOrBuilder
      • getLabelsCount

        public int getLabelsCount()
        Description copied from interface: OperationOrBuilder
         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;
        Specified by:
        getLabelsCount in interface OperationOrBuilder
      • containsLabels

        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;
        Specified by:
        containsLabels in interface OperationOrBuilder
      • 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;
        Specified by:
        getLabelsMap in interface OperationOrBuilder
      • getLabelsOrDefault

        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;
        Specified by:
        getLabelsOrDefault in interface OperationOrBuilder
      • getLabelsOrThrow

        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;
        Specified by:
        getLabelsOrThrow in interface OperationOrBuilder
      • 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;
        Specified by:
        getMetricValueSetsList in interface OperationOrBuilder
      • 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;
        Specified by:
        getMetricValueSetsOrBuilderList in interface OperationOrBuilder
      • 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;
        Specified by:
        getMetricValueSetsCount in interface OperationOrBuilder
      • getMetricValueSets

        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;
        Specified by:
        getMetricValueSets in interface OperationOrBuilder
      • getMetricValueSetsOrBuilder

        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;
        Specified by:
        getMetricValueSetsOrBuilder in interface OperationOrBuilder
      • getLogEntriesCount

        public int getLogEntriesCount()
         Represents information to be logged.
         
        repeated .google.api.servicecontrol.v1.LogEntry log_entries = 8;
        Specified by:
        getLogEntriesCount in interface OperationOrBuilder
      • getLogEntries

        public LogEntry getLogEntries​(int index)
         Represents information to be logged.
         
        repeated .google.api.servicecontrol.v1.LogEntry log_entries = 8;
        Specified by:
        getLogEntries in interface OperationOrBuilder
      • getImportanceValue

        public int getImportanceValue()
         DO NOT USE. This is an experimental field.
         
        .google.api.servicecontrol.v1.Operation.Importance importance = 11;
        Specified by:
        getImportanceValue in interface OperationOrBuilder
        Returns:
        The enum numeric value on the wire for importance.
      • getImportance

        public Operation.Importance getImportance()
         DO NOT USE. This is an experimental field.
         
        .google.api.servicecontrol.v1.Operation.Importance importance = 11;
        Specified by:
        getImportance in interface OperationOrBuilder
        Returns:
        The importance.
      • getExtensionsList

        public List<com.google.protobuf.Any> getExtensionsList()
         Unimplemented.
         
        repeated .google.protobuf.Any extensions = 16;
        Specified by:
        getExtensionsList in interface OperationOrBuilder
      • getExtensionsOrBuilderList

        public List<? extends com.google.protobuf.AnyOrBuilder> getExtensionsOrBuilderList()
         Unimplemented.
         
        repeated .google.protobuf.Any extensions = 16;
        Specified by:
        getExtensionsOrBuilderList in interface OperationOrBuilder
      • getExtensionsCount

        public int getExtensionsCount()
         Unimplemented.
         
        repeated .google.protobuf.Any extensions = 16;
        Specified by:
        getExtensionsCount in interface OperationOrBuilder
      • getExtensions

        public com.google.protobuf.Any getExtensions​(int index)
         Unimplemented.
         
        repeated .google.protobuf.Any extensions = 16;
        Specified by:
        getExtensions in interface OperationOrBuilder
      • getExtensionsOrBuilder

        public com.google.protobuf.AnyOrBuilder getExtensionsOrBuilder​(int index)
         Unimplemented.
         
        repeated .google.protobuf.Any extensions = 16;
        Specified by:
        getExtensionsOrBuilder in interface OperationOrBuilder
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static Operation parseFrom​(ByteBuffer data)
                                   throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Operation parseFrom​(ByteBuffer data,
                                          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                   throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Operation parseFrom​(com.google.protobuf.ByteString data)
                                   throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Operation parseFrom​(com.google.protobuf.ByteString data,
                                          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                   throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Operation parseFrom​(byte[] data)
                                   throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Operation parseFrom​(byte[] data,
                                          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                   throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Operation parseFrom​(com.google.protobuf.CodedInputStream input,
                                          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                   throws IOException
        Throws:
        IOException
      • newBuilderForType

        public Operation.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public Operation.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected Operation.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstance

        public static Operation getDefaultInstance()
      • parser

        public static com.google.protobuf.Parser<Operation> parser()
      • getParserForType

        public com.google.protobuf.Parser<Operation> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public Operation getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder