1*d5c09012SAndroid Build Coastguard Worker// Copyright 2023 Google LLC 2*d5c09012SAndroid Build Coastguard Worker// 3*d5c09012SAndroid Build Coastguard Worker// Licensed under the Apache License, Version 2.0 (the "License"); 4*d5c09012SAndroid Build Coastguard Worker// you may not use this file except in compliance with the License. 5*d5c09012SAndroid Build Coastguard Worker// You may obtain a copy of the License at 6*d5c09012SAndroid Build Coastguard Worker// 7*d5c09012SAndroid Build Coastguard Worker// http://www.apache.org/licenses/LICENSE-2.0 8*d5c09012SAndroid Build Coastguard Worker// 9*d5c09012SAndroid Build Coastguard Worker// Unless required by applicable law or agreed to in writing, software 10*d5c09012SAndroid Build Coastguard Worker// distributed under the License is distributed on an "AS IS" BASIS, 11*d5c09012SAndroid Build Coastguard Worker// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12*d5c09012SAndroid Build Coastguard Worker// See the License for the specific language governing permissions and 13*d5c09012SAndroid Build Coastguard Worker// limitations under the License. 14*d5c09012SAndroid Build Coastguard Worker 15*d5c09012SAndroid Build Coastguard Workersyntax = "proto3"; 16*d5c09012SAndroid Build Coastguard Worker 17*d5c09012SAndroid Build Coastguard Workerpackage google.monitoring.v3; 18*d5c09012SAndroid Build Coastguard Worker 19*d5c09012SAndroid Build Coastguard Workerimport "google/api/label.proto"; 20*d5c09012SAndroid Build Coastguard Workerimport "google/api/launch_stage.proto"; 21*d5c09012SAndroid Build Coastguard Workerimport "google/api/resource.proto"; 22*d5c09012SAndroid Build Coastguard Workerimport "google/monitoring/v3/common.proto"; 23*d5c09012SAndroid Build Coastguard Workerimport "google/monitoring/v3/mutation_record.proto"; 24*d5c09012SAndroid Build Coastguard Workerimport "google/protobuf/wrappers.proto"; 25*d5c09012SAndroid Build Coastguard Worker 26*d5c09012SAndroid Build Coastguard Workeroption csharp_namespace = "Google.Cloud.Monitoring.V3"; 27*d5c09012SAndroid Build Coastguard Workeroption go_package = "cloud.google.com/go/monitoring/apiv3/v2/monitoringpb;monitoringpb"; 28*d5c09012SAndroid Build Coastguard Workeroption java_multiple_files = true; 29*d5c09012SAndroid Build Coastguard Workeroption java_outer_classname = "NotificationProto"; 30*d5c09012SAndroid Build Coastguard Workeroption java_package = "com.google.monitoring.v3"; 31*d5c09012SAndroid Build Coastguard Workeroption php_namespace = "Google\\Cloud\\Monitoring\\V3"; 32*d5c09012SAndroid Build Coastguard Workeroption ruby_package = "Google::Cloud::Monitoring::V3"; 33*d5c09012SAndroid Build Coastguard Worker 34*d5c09012SAndroid Build Coastguard Worker// A description of a notification channel. The descriptor includes 35*d5c09012SAndroid Build Coastguard Worker// the properties of the channel and the set of labels or fields that 36*d5c09012SAndroid Build Coastguard Worker// must be specified to configure channels of a given type. 37*d5c09012SAndroid Build Coastguard Workermessage NotificationChannelDescriptor { 38*d5c09012SAndroid Build Coastguard Worker option (google.api.resource) = { 39*d5c09012SAndroid Build Coastguard Worker type: "monitoring.googleapis.com/NotificationChannelDescriptor" 40*d5c09012SAndroid Build Coastguard Worker pattern: "projects/{project}/notificationChannelDescriptors/{channel_descriptor}" 41*d5c09012SAndroid Build Coastguard Worker pattern: "organizations/{organization}/notificationChannelDescriptors/{channel_descriptor}" 42*d5c09012SAndroid Build Coastguard Worker pattern: "folders/{folder}/notificationChannelDescriptors/{channel_descriptor}" 43*d5c09012SAndroid Build Coastguard Worker pattern: "*" 44*d5c09012SAndroid Build Coastguard Worker }; 45*d5c09012SAndroid Build Coastguard Worker 46*d5c09012SAndroid Build Coastguard Worker // The full REST resource name for this descriptor. The format is: 47*d5c09012SAndroid Build Coastguard Worker // 48*d5c09012SAndroid Build Coastguard Worker // projects/[PROJECT_ID_OR_NUMBER]/notificationChannelDescriptors/[TYPE] 49*d5c09012SAndroid Build Coastguard Worker // 50*d5c09012SAndroid Build Coastguard Worker // In the above, `[TYPE]` is the value of the `type` field. 51*d5c09012SAndroid Build Coastguard Worker string name = 6; 52*d5c09012SAndroid Build Coastguard Worker 53*d5c09012SAndroid Build Coastguard Worker // The type of notification channel, such as "email" and "sms". To view the 54*d5c09012SAndroid Build Coastguard Worker // full list of channels, see 55*d5c09012SAndroid Build Coastguard Worker // [Channel 56*d5c09012SAndroid Build Coastguard Worker // descriptors](https://cloud.google.com/monitoring/alerts/using-channels-api#ncd). 57*d5c09012SAndroid Build Coastguard Worker // Notification channel types are globally unique. 58*d5c09012SAndroid Build Coastguard Worker string type = 1; 59*d5c09012SAndroid Build Coastguard Worker 60*d5c09012SAndroid Build Coastguard Worker // A human-readable name for the notification channel type. This 61*d5c09012SAndroid Build Coastguard Worker // form of the name is suitable for a user interface. 62*d5c09012SAndroid Build Coastguard Worker string display_name = 2; 63*d5c09012SAndroid Build Coastguard Worker 64*d5c09012SAndroid Build Coastguard Worker // A human-readable description of the notification channel 65*d5c09012SAndroid Build Coastguard Worker // type. The description may include a description of the properties 66*d5c09012SAndroid Build Coastguard Worker // of the channel and pointers to external documentation. 67*d5c09012SAndroid Build Coastguard Worker string description = 3; 68*d5c09012SAndroid Build Coastguard Worker 69*d5c09012SAndroid Build Coastguard Worker // The set of labels that must be defined to identify a particular 70*d5c09012SAndroid Build Coastguard Worker // channel of the corresponding type. Each label includes a 71*d5c09012SAndroid Build Coastguard Worker // description for how that field should be populated. 72*d5c09012SAndroid Build Coastguard Worker repeated google.api.LabelDescriptor labels = 4; 73*d5c09012SAndroid Build Coastguard Worker 74*d5c09012SAndroid Build Coastguard Worker // The tiers that support this notification channel; the project service tier 75*d5c09012SAndroid Build Coastguard Worker // must be one of the supported_tiers. 76*d5c09012SAndroid Build Coastguard Worker repeated ServiceTier supported_tiers = 5 [deprecated = true]; 77*d5c09012SAndroid Build Coastguard Worker 78*d5c09012SAndroid Build Coastguard Worker // The product launch stage for channels of this type. 79*d5c09012SAndroid Build Coastguard Worker google.api.LaunchStage launch_stage = 7; 80*d5c09012SAndroid Build Coastguard Worker} 81*d5c09012SAndroid Build Coastguard Worker 82*d5c09012SAndroid Build Coastguard Worker// A `NotificationChannel` is a medium through which an alert is 83*d5c09012SAndroid Build Coastguard Worker// delivered when a policy violation is detected. Examples of channels 84*d5c09012SAndroid Build Coastguard Worker// include email, SMS, and third-party messaging applications. Fields 85*d5c09012SAndroid Build Coastguard Worker// containing sensitive information like authentication tokens or 86*d5c09012SAndroid Build Coastguard Worker// contact info are only partially populated on retrieval. 87*d5c09012SAndroid Build Coastguard Workermessage NotificationChannel { 88*d5c09012SAndroid Build Coastguard Worker option (google.api.resource) = { 89*d5c09012SAndroid Build Coastguard Worker type: "monitoring.googleapis.com/NotificationChannel" 90*d5c09012SAndroid Build Coastguard Worker pattern: "projects/{project}/notificationChannels/{notification_channel}" 91*d5c09012SAndroid Build Coastguard Worker pattern: "organizations/{organization}/notificationChannels/{notification_channel}" 92*d5c09012SAndroid Build Coastguard Worker pattern: "folders/{folder}/notificationChannels/{notification_channel}" 93*d5c09012SAndroid Build Coastguard Worker pattern: "*" 94*d5c09012SAndroid Build Coastguard Worker }; 95*d5c09012SAndroid Build Coastguard Worker 96*d5c09012SAndroid Build Coastguard Worker // Indicates whether the channel has been verified or not. It is illegal 97*d5c09012SAndroid Build Coastguard Worker // to specify this field in a 98*d5c09012SAndroid Build Coastguard Worker // [`CreateNotificationChannel`][google.monitoring.v3.NotificationChannelService.CreateNotificationChannel] 99*d5c09012SAndroid Build Coastguard Worker // or an 100*d5c09012SAndroid Build Coastguard Worker // [`UpdateNotificationChannel`][google.monitoring.v3.NotificationChannelService.UpdateNotificationChannel] 101*d5c09012SAndroid Build Coastguard Worker // operation. 102*d5c09012SAndroid Build Coastguard Worker enum VerificationStatus { 103*d5c09012SAndroid Build Coastguard Worker // Sentinel value used to indicate that the state is unknown, omitted, or 104*d5c09012SAndroid Build Coastguard Worker // is not applicable (as in the case of channels that neither support 105*d5c09012SAndroid Build Coastguard Worker // nor require verification in order to function). 106*d5c09012SAndroid Build Coastguard Worker VERIFICATION_STATUS_UNSPECIFIED = 0; 107*d5c09012SAndroid Build Coastguard Worker 108*d5c09012SAndroid Build Coastguard Worker // The channel has yet to be verified and requires verification to function. 109*d5c09012SAndroid Build Coastguard Worker // Note that this state also applies to the case where the verification 110*d5c09012SAndroid Build Coastguard Worker // process has been initiated by sending a verification code but where 111*d5c09012SAndroid Build Coastguard Worker // the verification code has not been submitted to complete the process. 112*d5c09012SAndroid Build Coastguard Worker UNVERIFIED = 1; 113*d5c09012SAndroid Build Coastguard Worker 114*d5c09012SAndroid Build Coastguard Worker // It has been proven that notifications can be received on this 115*d5c09012SAndroid Build Coastguard Worker // notification channel and that someone on the project has access 116*d5c09012SAndroid Build Coastguard Worker // to messages that are delivered to that channel. 117*d5c09012SAndroid Build Coastguard Worker VERIFIED = 2; 118*d5c09012SAndroid Build Coastguard Worker } 119*d5c09012SAndroid Build Coastguard Worker 120*d5c09012SAndroid Build Coastguard Worker // The type of the notification channel. This field matches the 121*d5c09012SAndroid Build Coastguard Worker // value of the 122*d5c09012SAndroid Build Coastguard Worker // [NotificationChannelDescriptor.type][google.monitoring.v3.NotificationChannelDescriptor.type] 123*d5c09012SAndroid Build Coastguard Worker // field. 124*d5c09012SAndroid Build Coastguard Worker string type = 1; 125*d5c09012SAndroid Build Coastguard Worker 126*d5c09012SAndroid Build Coastguard Worker // The full REST resource name for this channel. The format is: 127*d5c09012SAndroid Build Coastguard Worker // 128*d5c09012SAndroid Build Coastguard Worker // projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] 129*d5c09012SAndroid Build Coastguard Worker // 130*d5c09012SAndroid Build Coastguard Worker // The `[CHANNEL_ID]` is automatically assigned by the server on creation. 131*d5c09012SAndroid Build Coastguard Worker string name = 6; 132*d5c09012SAndroid Build Coastguard Worker 133*d5c09012SAndroid Build Coastguard Worker // An optional human-readable name for this notification channel. It is 134*d5c09012SAndroid Build Coastguard Worker // recommended that you specify a non-empty and unique name in order to 135*d5c09012SAndroid Build Coastguard Worker // make it easier to identify the channels in your project, though this is 136*d5c09012SAndroid Build Coastguard Worker // not enforced. The display name is limited to 512 Unicode characters. 137*d5c09012SAndroid Build Coastguard Worker string display_name = 3; 138*d5c09012SAndroid Build Coastguard Worker 139*d5c09012SAndroid Build Coastguard Worker // An optional human-readable description of this notification channel. This 140*d5c09012SAndroid Build Coastguard Worker // description may provide additional details, beyond the display 141*d5c09012SAndroid Build Coastguard Worker // name, for the channel. This may not exceed 1024 Unicode characters. 142*d5c09012SAndroid Build Coastguard Worker string description = 4; 143*d5c09012SAndroid Build Coastguard Worker 144*d5c09012SAndroid Build Coastguard Worker // Configuration fields that define the channel and its behavior. The 145*d5c09012SAndroid Build Coastguard Worker // permissible and required labels are specified in the 146*d5c09012SAndroid Build Coastguard Worker // [NotificationChannelDescriptor.labels][google.monitoring.v3.NotificationChannelDescriptor.labels] 147*d5c09012SAndroid Build Coastguard Worker // of the `NotificationChannelDescriptor` corresponding to the `type` field. 148*d5c09012SAndroid Build Coastguard Worker map<string, string> labels = 5; 149*d5c09012SAndroid Build Coastguard Worker 150*d5c09012SAndroid Build Coastguard Worker // User-supplied key/value data that does not need to conform to 151*d5c09012SAndroid Build Coastguard Worker // the corresponding `NotificationChannelDescriptor`'s schema, unlike 152*d5c09012SAndroid Build Coastguard Worker // the `labels` field. This field is intended to be used for organizing 153*d5c09012SAndroid Build Coastguard Worker // and identifying the `NotificationChannel` objects. 154*d5c09012SAndroid Build Coastguard Worker // 155*d5c09012SAndroid Build Coastguard Worker // The field can contain up to 64 entries. Each key and value is limited to 156*d5c09012SAndroid Build Coastguard Worker // 63 Unicode characters or 128 bytes, whichever is smaller. Labels and 157*d5c09012SAndroid Build Coastguard Worker // values can contain only lowercase letters, numerals, underscores, and 158*d5c09012SAndroid Build Coastguard Worker // dashes. Keys must begin with a letter. 159*d5c09012SAndroid Build Coastguard Worker map<string, string> user_labels = 8; 160*d5c09012SAndroid Build Coastguard Worker 161*d5c09012SAndroid Build Coastguard Worker // Indicates whether this channel has been verified or not. On a 162*d5c09012SAndroid Build Coastguard Worker // [`ListNotificationChannels`][google.monitoring.v3.NotificationChannelService.ListNotificationChannels] 163*d5c09012SAndroid Build Coastguard Worker // or 164*d5c09012SAndroid Build Coastguard Worker // [`GetNotificationChannel`][google.monitoring.v3.NotificationChannelService.GetNotificationChannel] 165*d5c09012SAndroid Build Coastguard Worker // operation, this field is expected to be populated. 166*d5c09012SAndroid Build Coastguard Worker // 167*d5c09012SAndroid Build Coastguard Worker // If the value is `UNVERIFIED`, then it indicates that the channel is 168*d5c09012SAndroid Build Coastguard Worker // non-functioning (it both requires verification and lacks verification); 169*d5c09012SAndroid Build Coastguard Worker // otherwise, it is assumed that the channel works. 170*d5c09012SAndroid Build Coastguard Worker // 171*d5c09012SAndroid Build Coastguard Worker // If the channel is neither `VERIFIED` nor `UNVERIFIED`, it implies that 172*d5c09012SAndroid Build Coastguard Worker // the channel is of a type that does not require verification or that 173*d5c09012SAndroid Build Coastguard Worker // this specific channel has been exempted from verification because it was 174*d5c09012SAndroid Build Coastguard Worker // created prior to verification being required for channels of this type. 175*d5c09012SAndroid Build Coastguard Worker // 176*d5c09012SAndroid Build Coastguard Worker // This field cannot be modified using a standard 177*d5c09012SAndroid Build Coastguard Worker // [`UpdateNotificationChannel`][google.monitoring.v3.NotificationChannelService.UpdateNotificationChannel] 178*d5c09012SAndroid Build Coastguard Worker // operation. To change the value of this field, you must call 179*d5c09012SAndroid Build Coastguard Worker // [`VerifyNotificationChannel`][google.monitoring.v3.NotificationChannelService.VerifyNotificationChannel]. 180*d5c09012SAndroid Build Coastguard Worker VerificationStatus verification_status = 9; 181*d5c09012SAndroid Build Coastguard Worker 182*d5c09012SAndroid Build Coastguard Worker // Whether notifications are forwarded to the described channel. This makes 183*d5c09012SAndroid Build Coastguard Worker // it possible to disable delivery of notifications to a particular channel 184*d5c09012SAndroid Build Coastguard Worker // without removing the channel from all alerting policies that reference 185*d5c09012SAndroid Build Coastguard Worker // the channel. This is a more convenient approach when the change is 186*d5c09012SAndroid Build Coastguard Worker // temporary and you want to receive notifications from the same set 187*d5c09012SAndroid Build Coastguard Worker // of alerting policies on the channel at some point in the future. 188*d5c09012SAndroid Build Coastguard Worker google.protobuf.BoolValue enabled = 11; 189*d5c09012SAndroid Build Coastguard Worker 190*d5c09012SAndroid Build Coastguard Worker // Record of the creation of this channel. 191*d5c09012SAndroid Build Coastguard Worker MutationRecord creation_record = 12; 192*d5c09012SAndroid Build Coastguard Worker 193*d5c09012SAndroid Build Coastguard Worker // Records of the modification of this channel. 194*d5c09012SAndroid Build Coastguard Worker repeated MutationRecord mutation_records = 13; 195*d5c09012SAndroid Build Coastguard Worker} 196