syntax = "proto3";

package yandex.cloud.logging.v1;

import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";
import "yandex/cloud/validation.proto";

option go_package = "github.com/yandex-cloud/go-genproto/yandex/cloud/logging/v1;logging";
option java_package = "yandex.cloud.api.logging.v1";

// Log entry resource specification.
//
// May be used either by services and by user.
message LogEntryResource {
  // Resource type, i.e., `serverless.function`
  string type = 1 [(pattern) = "([a-zA-Z][-a-zA-Z0-9_.]{0,63})?"];

  // Resource ID, i.e., ID of the function producing logs.
  string id = 2 [(pattern) = "([a-zA-Z0-9][-a-zA-Z0-9_.]{0,63})?"];
}

// Log group resource.
message LogGroupResource {
  // Resource type.
  //
  // Collected from log entries inside log group.
  string type = 1;

  // List of resource IDs with the same resource type.
  repeated string ids = 2;
}
