Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions protos/buf.lock
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
# Generated by buf. DO NOT EDIT.
version: v1
deps:
- remote: buf.build
owner: bufbuild
repository: protovalidate
commit: 50325440f8f24053b047484a6bf60b76
digest: shake256:32560c4bbc1689fcb893d4ea6c26a9c600300c3c7691abdadbbaa9348e16061c9e74dce96ac296fe561b1abb56ca4b5976619a1f0038981d876da7bc02e3c385
- remote: buf.build
owner: googleapis
repository: googleapis
Expand Down
3 changes: 1 addition & 2 deletions protos/buf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@ lint:
- sift/protobuf_descriptors/v2/channel_parsing_options.proto
deps:
- buf.build/googleapis/googleapis
- buf.build/grpc-ecosystem/grpc-gateway
- buf.build/bufbuild/protovalidate
- buf.build/grpc-ecosystem/grpc-gateway
11 changes: 2 additions & 9 deletions protos/sift/api_keys/v2/api_keys.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ syntax = "proto3";

package sift.api_keys.v2;

import "buf/validate/validate.proto";
import "google/api/annotations.proto";
import "google/api/field_behavior.proto";
import "google/protobuf/timestamp.proto";
Expand Down Expand Up @@ -113,18 +112,12 @@ message ListApiKeysResponse {
message CreateApiKeyRequest {
// The name for the new ApiKey. Required.
string name = 1 [(google.api.field_behavior) = REQUIRED];
string user_id = 2 [
(google.api.field_behavior) = REQUIRED,
(buf.validate.field).string.uuid = true
];
string user_id = 2 [(google.api.field_behavior) = REQUIRED];
}

// The request for a call to ApiKeyService.DeleteApiKey.
message DeleteApiKeyRequest {
string api_key_id = 1 [
(google.api.field_behavior) = REQUIRED,
(buf.validate.field).string.uuid = true
];
string api_key_id = 1 [(google.api.field_behavior) = REQUIRED];
}

message DeleteApiKeyResponse {}
Expand Down
6 changes: 1 addition & 5 deletions protos/sift/common/type/v1/calculated_channels.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,10 @@ syntax = "proto3";

package sift.common.type.v1;

import "buf/validate/validate.proto";
import "google/api/field_behavior.proto";


// A dependency on another calculated channel.
message CalculatedChannelDependency {
string calculated_channel_version_id = 1 [
(google.api.field_behavior) = REQUIRED,
(buf.validate.field).string.uuid = true
];
string calculated_channel_version_id = 1 [(google.api.field_behavior) = REQUIRED];
}
6 changes: 1 addition & 5 deletions protos/sift/common/type/v1/user_defined_functions.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ syntax = "proto3";

package sift.common.type.v1;

import "buf/validate/validate.proto";
import "google/api/field_behavior.proto";
import "google/protobuf/timestamp.proto";
import "sift/metadata/v1/metadata.proto";
Expand Down Expand Up @@ -39,10 +38,7 @@ message UserDefinedFunction {
}

message FunctionDependency {
string user_defined_function_version_id = 1 [
(google.api.field_behavior) = REQUIRED,
(buf.validate.field).string.uuid = true
];
string user_defined_function_version_id = 1 [(google.api.field_behavior) = REQUIRED];
}

message FunctionInput {
Expand Down
58 changes: 9 additions & 49 deletions protos/sift/runs/v2/runs.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ syntax = "proto3";

package sift.runs.v2;

import "buf/validate/validate.proto";
import "google/api/annotations.proto";
import "google/api/field_behavior.proto";
import "google/protobuf/duration.proto";
Expand Down Expand Up @@ -144,10 +143,7 @@ message Run {
// The request for a call to `RunService_GetRun` to retrieve run.
message GetRunRequest {
// The ID of the run to retrieve.
string run_id = 1 [
(google.api.field_behavior) = REQUIRED,
(buf.validate.field).string.uuid = true
];
string run_id = 1 [(google.api.field_behavior) = REQUIRED];
}

// The response of a call to `RunService_GetRun` containing the requested run.
Expand Down Expand Up @@ -218,14 +214,7 @@ message CreateRunRequest {
string organization_id = 7 [(google.api.field_behavior) = OPTIONAL];

// An arbitrary user-chosen key that uniquely identifies this run. Optional, though it is recommended to provide.
optional string client_key = 8 [
(google.api.field_behavior) = OPTIONAL,
(buf.validate.field).cel = {
id: "invalid_client_key"
message: "client key must be 3-128 characters, start and end with an alphanumeric, and contain only [a-zA-Z0-9_~.-]."
expression: "this.matches('^[a-zA-Z0-9][a-zA-Z0-9_~.-]{0,126}[a-zA-Z0-9]$')"
}
];
optional string client_key = 8 [(google.api.field_behavior) = OPTIONAL];

// The metadata values associated with this run.
repeated sift.metadata.v1.MetadataValue metadata = 9 [(google.api.field_behavior) = OPTIONAL];
Expand All @@ -242,34 +231,21 @@ message CreateRunResponse {
// The request for a call to `RunService_CreateAdhocRun` to create an adhoc run.
message CreateAdhocRunRequest {
// The name that will be assigned to the new run.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(buf.validate.field).string.min_len = 1
];
string name = 1 [(google.api.field_behavior) = REQUIRED];
// A description about the new run.
string description = 2 [(google.api.field_behavior) = REQUIRED];
// The time at which data ingestion began for this new run. It must be before the `stop_time`
google.protobuf.Timestamp start_time = 3 [(google.api.field_behavior) = REQUIRED];
// The time at which data ingestion concluded for this new run.
google.protobuf.Timestamp stop_time = 4 [(google.api.field_behavior) = REQUIRED];
// A list of asset IDs to associate with the new run.
repeated string asset_ids = 5 [
(google.api.field_behavior) = REQUIRED,
(buf.validate.field).repeated.min_items = 1
];
repeated string asset_ids = 5 [(google.api.field_behavior) = REQUIRED];
// Tags to associate with the new run.
repeated string tags = 6 [(google.api.field_behavior) = OPTIONAL];
// The metadata values associated with this run.
repeated sift.metadata.v1.MetadataValue metadata = 7 [(google.api.field_behavior) = OPTIONAL];
// An arbitrary user-chosen key that uniquely identifies this run. Optional, though it is recommended to provide.
optional string client_key = 8 [
(google.api.field_behavior) = OPTIONAL,
(buf.validate.field).cel = {
id: "invalid_client_key"
message: "client key must be 3-128 characters, start and end with an alphanumeric, and contain only [a-zA-Z0-9_~.-]."
expression: "this.matches('^[a-zA-Z0-9][a-zA-Z0-9_~.-]{0,126}[a-zA-Z0-9]$')"
}
];
optional string client_key = 8 [(google.api.field_behavior) = OPTIONAL];
}

// The response of a call to `RunService_CreateAdhocRun` containing the newly created adhoc run.
Expand All @@ -289,14 +265,7 @@ message UpdateRunRequest {
// commences for this run, the `start_time` will be automatically overwritten and set to the timestamp
// corresponding to the beginning of the latest run. Additionally, `client_key` can only be set once either in run creation or in update.
// Any subsequent attempt to update `client_key` will result in an error.
google.protobuf.FieldMask update_mask = 2 [
(google.api.field_behavior) = REQUIRED,
(buf.validate.field).cel = {
id: "invalid_field_mask_path"
message: "field mask path must be in ['name', 'description', 'start_time', 'startTime', 'stop_time', 'stopTime', 'is_pinned', 'isPinned', 'client_key', 'clientKey', 'tags', 'metadata', 'archived_date', 'is_archived', 'isArchived']"
expression: "this.paths.all(path, path in ['name', 'description', 'start_time', 'startTime', 'stop_time', 'stopTime', 'is_pinned', 'isPinned', 'client_key', 'clientKey', 'tags', 'metadata', 'archived_date', 'is_archived', 'isArchived'])"
}
];
google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
}

// The response of a call to `RunService_UpdateRun` containing the updated run.
Expand All @@ -306,10 +275,7 @@ message UpdateRunResponse {

message CreateAutomaticRunAssociationForAssetsRequest {
// The ID of the run to associate the asset with.
string run_id = 1 [
(google.api.field_behavior) = REQUIRED,
(buf.validate.field).string.uuid = true
];
string run_id = 1 [(google.api.field_behavior) = REQUIRED];

// A list of asset names to automatically associate with the run.
// Any data that is received for these assets will automatically added to the run.
Expand All @@ -325,21 +291,15 @@ message CreateAutomaticRunAssociationForAssetsResponse {}

// The request for a call to `RunService_DeleteRun`.
message DeleteRunRequest {
string run_id = 1 [
(google.api.field_behavior) = REQUIRED,
(buf.validate.field).string.uuid = true
];
string run_id = 1 [(google.api.field_behavior) = REQUIRED];
}

// The response of a call to `RunService_DeleteRun`.
message DeleteRunResponse {}

// The request for a call to `RunService_StopRun` to stop a run.
message StopRunRequest {
string run_id = 1 [
(google.api.field_behavior) = REQUIRED,
(buf.validate.field).string.uuid = true
];
string run_id = 1 [(google.api.field_behavior) = REQUIRED];
}

// The response of a call to `RunService_StopRun` to stop a run.
Expand Down
35 changes: 6 additions & 29 deletions protos/sift/user_defined_functions/v1/user_defined_functions.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ syntax = "proto3";

package sift.user_defined_functions.v1;

import "buf/validate/validate.proto";
import "google/api/annotations.proto";
import "google/api/field_behavior.proto";
import "google/protobuf/field_mask.proto";
Expand Down Expand Up @@ -118,10 +117,7 @@ service UserDefinedFunctionService {
// If `user_defined_function_id` is provided then all other arguments will be ignored. The argument `user_defined_function_id`
// should not be used together with `name`.
message GetUserDefinedFunctionRequest {
string user_defined_function_id = 1 [
(google.api.field_behavior) = OPTIONAL,
(buf.validate.field).string.uuid = true
];
string user_defined_function_id = 1 [(google.api.field_behavior) = OPTIONAL];
string name = 2 [(google.api.field_behavior) = OPTIONAL];
}

Expand All @@ -131,10 +127,7 @@ message GetUserDefinedFunctionResponse {

// The request for a call to `UserDefinedFunctionService_GetUserDefinedFunctionVersion` to retrieve a specific version of a user defined function.
message GetUserDefinedFunctionVersionRequest {
string user_defined_function_version_id = 1 [
(google.api.field_behavior) = REQUIRED,
(buf.validate.field).string.uuid = true
];
string user_defined_function_version_id = 1 [(google.api.field_behavior) = REQUIRED];
}

message GetUserDefinedFunctionVersionResponse {
Expand All @@ -145,15 +138,9 @@ message GetUserDefinedFunctionVersionResponse {
message GetUserDefinedFunctionDependentsRequest {
uint32 page_size = 1 [(google.api.field_behavior) = OPTIONAL];
oneof user_defined_function {
string user_defined_function_id = 2 [
(buf.validate.field).string.uuid = true,
(google.api.field_behavior) = OPTIONAL
];
string user_defined_function_id = 2 [(google.api.field_behavior) = OPTIONAL];
string user_defined_function_name = 3 [(google.api.field_behavior) = OPTIONAL];
string user_defined_function_version_id = 4 [
(buf.validate.field).string.uuid = true,
(google.api.field_behavior) = OPTIONAL
];
string user_defined_function_version_id = 4 [(google.api.field_behavior) = OPTIONAL];
}
}

Expand All @@ -168,25 +155,15 @@ message GetUserDefinedFunctionDependentsResponse {

// The request for a call to `UserDefinedFunctionService_GetUserDefinedFunctionVersions` to retrieve versions of user defined functions.
message GetUserDefinedFunctionVersionsRequest {
repeated string user_defined_function_version_ids = 1 [
(google.api.field_behavior) = REQUIRED,
(buf.validate.field).repeated.items.string.uuid = true
];
repeated string user_defined_function_version_ids = 1 [(google.api.field_behavior) = REQUIRED];
}

message GetUserDefinedFunctionVersionsResponse {
repeated sift.common.type.v1.UserDefinedFunction user_defined_functions = 1 [(google.api.field_behavior) = REQUIRED];
}

message CreateUserDefinedFunctionRequest {
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(buf.validate.field).cel = {
id: "invalid_name"
message: "name must be 3-128 characters, start and end with an alphanumeric, and contain only [a-zA-Z0-9_~.-]."
expression: "this.matches('^[a-zA-Z0-9][a-zA-Z0-9_~.-]{0,126}[a-zA-Z0-9]$')"
}
];
string name = 1 [(google.api.field_behavior) = REQUIRED];
optional string description = 2 [(google.api.field_behavior) = OPTIONAL];
string expression = 3 [(google.api.field_behavior) = REQUIRED];
repeated sift.common.type.v1.FunctionInput function_inputs = 4 [(google.api.field_behavior) = REQUIRED];
Expand Down
Loading
Loading