1// Copyright 2022 Google LLC 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15syntax = "proto3"; 16 17package google.cloud.stream.logging.v1; 18 19import "google/protobuf/timestamp.proto"; 20 21option go_package = "cloud.google.com/go/stream/logging/apiv1/loggingpb;loggingpb"; 22option java_multiple_files = true; 23option java_outer_classname = "LoggingProto"; 24option java_package = "com.google.cloud.stream.logging.v1"; 25 26// OperationEventLog contains the time series data of the operations on the 27// stream resources. Internally, these logs represent events happening in 28// the control plane as result of API invocations against the stream resource 29// entities. 30message OperationEventLog { 31 // Enum for type of event being logged. 32 OperationEventType event_type = 1; 33 34 // Timestamp when the event occurred. 35 google.protobuf.Timestamp event_time = 2; 36 37 // Operation resource identifier. 38 string operation = 3; 39 40 // Artifact created as a result of the operation. 41 repeated OperationArtifact operation_artifacts = 4; 42} 43 44// OperationArtifact contains the information about the artifact created as 45// result of the operation. 46message OperationArtifact { 47 // Type of the artifact. 48 string artifact_type = 1; 49 50 // Location of the artifact. 51 string artifact_uri = 2; 52} 53 54// SessionEventLog contains the time series data regarding the streaming session 55// to serve the end consumer. Internally, these logs represent events in the 56// data plane streamer instance as a result of end consumer interacting with the 57// stream resources. 58message SessionEventLog { 59 // Enum for type of event being logged. 60 SessionEventType event_type = 1; 61 62 // Timestamp when the event occurred. 63 google.protobuf.Timestamp event_time = 2; 64 65 // Session identifier generated from the server. 66 string session_id = 3; 67} 68 69// OperationEventType is the enum value for the state of operation. 70enum OperationEventType { 71 // Unspecified operation event type. 72 OPERATION_EVENT_TYPE_UNSPECIFIED = 0; 73 74 // Operation for create stream content started. 75 OPERATION_EVENT_CREATE_CONTENT_STARTED = 1; 76 77 // Operation for create stream content ended. 78 OPERATION_EVENT_CREATE_CONTENT_ENDED = 2; 79 80 // Operation for build stream content started. 81 OPERATION_EVENT_BUILD_CONTENT_STARTED = 3; 82 83 // Operation for build stream content ended. 84 OPERATION_EVENT_BUILD_CONTENT_ENDED = 4; 85 86 // Operation for update stream content started. 87 OPERATION_EVENT_UPDATE_CONTENT_STARTED = 5; 88 89 // Operation for update stream content ended. 90 OPERATION_EVENT_UPDATE_CONTENT_ENDED = 6; 91 92 // Operation for delete stream content started. 93 OPERATION_EVENT_DELETE_CONTENT_STARTED = 7; 94 95 // Operation for delete stream content ended. 96 OPERATION_EVENT_DELETE_CONTENT_ENDED = 8; 97 98 // Operation for create stream instance started. 99 OPERATION_EVENT_CREATE_INSTANCE_STARTED = 9; 100 101 // Operation for create stream instance ended. 102 OPERATION_EVENT_CREATE_INSTANCE_ENDED = 10; 103 104 // Operation for update stream instance started. 105 OPERATION_EVENT_UPDATE_INSTANCE_STARTED = 11; 106 107 // Operation for update stream instance ended. 108 OPERATION_EVENT_UPDATE_INSTANCE_ENDED = 12; 109 110 // Operation for delete stream instance started. 111 OPERATION_EVENT_DELETE_INSTANCE_STARTED = 13; 112 113 // Operation for delete stream instance ended. 114 OPERATION_EVENT_DELETE_INSTANCE_ENDED = 14; 115} 116 117// SessionEventType is the enum value for the state of session. 118enum SessionEventType { 119 // Unspecified session event type. 120 SESSION_EVENT_TYPE_UNSPECIFIED = 0; 121 122 // Session in streamer shutting down state. 123 SESSION_EVENT_SERVER_STREAMER_SHUTTING_DOWN = 1; 124 125 // Session in streamer ready state. 126 SESSION_EVENT_SERVER_STREAMER_READY = 2; 127 128 // Session in streamer binary started state. 129 SESSION_EVENT_SERVER_STREAMER_BINARY_STARTED = 3; 130 131 // Session in streamer read pod image names state. 132 SESSION_EVENT_SERVER_STREAMER_READ_POD_IMAGE_NAMES = 4; 133 134 // Session in streamer connected to game state. 135 SESSION_EVENT_SERVER_STREAMER_CONNECTED_TO_GAME = 5; 136 137 // Session in streamer connected to client state. 138 SESSION_EVENT_SERVER_STREAMER_CONNECTED_TO_CLIENT = 6; 139 140 // Session in streamer disconnected from client state. 141 SESSION_EVENT_SERVER_STREAMER_DISCONNECTED_FROM_CLIENT = 7; 142 143 // Session in streamer received create session request state. 144 SESSION_EVENT_SERVER_STREAMER_RECEIVED_CREATE_SESSION_REQUEST = 8; 145 146 // Session in streamer game message to stream closed state. 147 SESSION_EVENT_SERVER_STREAMER_GAME_MESSAGE_STREAM_CLOSED = 9; 148 149 // Session in streamer game frame stream closed state. 150 SESSION_EVENT_SERVER_STREAMER_GAME_FRAME_STREAM_CLOSED = 10; 151 152 // Session in streamer game message stream error state. 153 SESSION_EVENT_SERVER_STREAMER_GAME_MESSAGE_STREAM_ERROR = 11; 154 155 // Session in streamer game audio stream error state. 156 SESSION_EVENT_SERVER_STREAMER_GAME_AUDIO_STREAM_ERROR = 12; 157 158 // Session in streamer game audio stream closed state. 159 SESSION_EVENT_SERVER_STREAMER_GAME_AUDIO_STREAM_CLOSED = 13; 160 161 // Session in streamer game frame stream error state. 162 SESSION_EVENT_SERVER_STREAMER_GAME_FRAME_STREAM_ERROR = 14; 163 164 // Session in game disconnecting after paused too long state. 165 SESSION_EVENT_SERVER_GAME_DISCONNECTING_AFTER_PAUSED_TOO_LONG = 15; 166 167 // Session in streamer received experiment configuration state. 168 SESSION_EVENT_SERVER_STREAMER_RECEIVED_EXPERIMENT_CONFIGURATION = 16; 169 170 // Session in game connected to logging service state. 171 SESSION_EVENT_SERVER_GAME_CONNECTED_TO_LOGGING_SERVICE = 17; 172 173 // Session in streamer determined session options state. 174 SESSION_EVENT_SERVER_STREAMER_DETERMINED_SESSION_OPTIONS = 18; 175 176 // Session in streamer killed in middle of session state. 177 SESSION_EVENT_SERVER_STREAMER_KILLED_IN_MIDDLE_OF_SESSION = 19; 178 179 // Session in game updated frame pipeline state. 180 SESSION_EVENT_SERVER_GAME_UPDATED_FRAME_PIPELINE = 20; 181 182 // Session in server error state. 183 SESSION_EVENT_SERVER_ERROR = 21; 184} 185