syntax = "proto3"; package mgmt.v1beta; // Google API import "google/api/field_behavior.proto"; // Protobuf standard import "google/protobuf/timestamp.proto"; // Mode describes the execution mode of the pipeline (sync or async). enum Mode { // Unspecified. MODE_UNSPECIFIED = 0; // Synchronous (result is returned in the response). MODE_SYNC = 1; // Asynchronous (response only contains acknowledgement). MODE_ASYNC = 2; } // Status describes the output of an execution. enum Status { // Unspecified. STATUS_UNSPECIFIED = 0; // Successfully completed. STATUS_COMPLETED = 1; // Finished with error. STATUS_ERRORED = 2; } // TriggerCount represents a execution count with some // aggregation params (e.g. trigger status). message TriggerCount { // Number of triggers. int32 trigger_count = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // This field will be present when results are grouped by trigger status. optional Status status = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } // GetPipelineTriggerCountRequest represents a request to fetch the trigger // count of a requester over a time period. message GetPipelineTriggerCountRequest { // The ID of the namespace that requested the pipeline triggers. string requester_id = 1 [(google.api.field_behavior) = REQUIRED]; // Beginning of the time range from which the records will be fetched. // The default value is the beginning of the current day, in UTC. optional google.protobuf.Timestamp start = 2; // End of the time range from which the records will be fetched. // The default value is the current timestamp. optional google.protobuf.Timestamp stop = 3; } // GetPipelineTriggerCountResponse contains the trigger count, grouped by // trigger status. message GetPipelineTriggerCountResponse { // The trigger counts, grouped by status. repeated TriggerCount pipeline_trigger_counts = 1; } // GetModelTriggerCountRequest represents a request to fetch the trigger // count of a requester over a time period. message GetModelTriggerCountRequest { // The ID of the requester that triggered the model. string requester_id = 1 [(google.api.field_behavior) = REQUIRED]; // Beginning of the time range from which the records will be fetched. // The default value is the beginning of the current day, in UTC. optional google.protobuf.Timestamp start = 2; // End of the time range from which the records will be fetched. // The default value is the current timestamp. optional google.protobuf.Timestamp stop = 3; } // GetModelTriggerCountResponse contains the trigger count, grouped by // trigger status. message GetModelTriggerCountResponse { // The trigger counts, grouped by status. repeated TriggerCount model_trigger_counts = 1; } // PipelineTriggerChartRecord represents a timeline of pipeline triggers. It // contains a collection of (timestamp, count) pairs that represent the total // pipeline triggers in a given time bucket. message PipelineTriggerChartRecord { // This field will be present when the information is grouped by pipeline. optional string pipeline_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Time buckets. repeated google.protobuf.Timestamp time_buckets = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Aggregated trigger count in each time bucket. repeated int32 trigger_counts = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; // The ID of the namespace that requested the pipeline triggers. string requester_id = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } // ListPipelineTriggerChartRecordsRequest represents a request to list pipeline // trigger chart records for a given requester, grouped by time buckets. message ListPipelineTriggerChartRecordsRequest { // The ID of the namespace that requested the pipeline triggers. string requester_id = 1 [(google.api.field_behavior) = REQUIRED]; // Aggregation window. The value is a positive duration string, i.e. a // sequence of decimal numbers, each with optional fraction and a unit // suffix, such as "300ms", "1.5h" or "2h45m". // The minimum (and default) window is 1h. optional string aggregation_window = 2; // Beginning of the time range from which the records will be fetched. // The default value is the beginning of the current day, in UTC. optional google.protobuf.Timestamp start = 3; // End of the time range from which the records will be fetched. // The default value is the current timestamp. optional google.protobuf.Timestamp stop = 4; } // ListPipelineTriggerChartRecordsResponse contains a list of pipeline trigger // chart records. message ListPipelineTriggerChartRecordsResponse { // Pipeline trigger counts. Until we allow filtering or grouping by fields // like pipeline ID, this list will contain only one element with the // timeline of trigger counts for a given requester, regardless the pipeline // ID, trigger mode, final status or other fields. repeated PipelineTriggerChartRecord pipeline_trigger_chart_records = 1; } // ModelTriggerChartRecord represents a timeline of model triggers. It // contains a collection of (timestamp, count) pairs that represent the total // model triggers in a given time bucket. message ModelTriggerChartRecord { // This field will be present when the information is grouped by model. optional string model_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Time buckets. repeated google.protobuf.Timestamp time_buckets = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Aggregated trigger count in each time bucket. repeated int32 trigger_counts = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; // The ID of the namespace that requested the model triggers. string requester_id = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } // ListModelTriggerChartRecordsRequest represents a request to list model // trigger metrics, aggregated by model ID and time frame. message ListModelTriggerChartRecordsRequest { // The ID of the namespace that requested the model triggers. string requester_id = 1 [(google.api.field_behavior) = REQUIRED]; // Aggregation window. The value is a positive duration string, i.e. a // sequence of decimal numbers, each with optional fraction and a unit // suffix, such as "300ms", "1.5h" or "2h45m". // The minimum (and default) window is 1h. optional string aggregation_window = 2; // Beginning of the time range from which the records will be fetched. // The default value is the beginning of the current day, in UTC. optional google.protobuf.Timestamp start = 3; // End of the time range from which the records will be fetched. // The default value is the current timestamp. optional google.protobuf.Timestamp stop = 4; } // ListModelTriggerChartRecordsResponse contains a list of model trigger // chart records. message ListModelTriggerChartRecordsResponse { // Model trigger counts. Until we allow filtering or grouping by fields // like model ID, this list will contain only one element with the // timeline of trigger counts for a given requester, regardless the model // ID, trigger mode, final status or other fields. repeated ModelTriggerChartRecord model_trigger_chart_records = 1; }