Skip to content

Commit

Permalink
fix: mark fields in Contacts message as REQUIRED
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 542301348
  • Loading branch information
Google APIs authored and Copybara-Service committed Jun 21, 2023
1 parent 1ef8cc2 commit 223fc66
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 21 deletions.
4 changes: 2 additions & 2 deletions google/cloud/essentialcontacts/v1/enums.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -16,11 +16,11 @@ syntax = "proto3";

package google.cloud.essentialcontacts.v1;

option csharp_namespace = "Google.Cloud.EssentialContacts.V1";
option go_package = "cloud.google.com/go/essentialcontacts/apiv1/essentialcontactspb;essentialcontactspb";
option java_multiple_files = true;
option java_outer_classname = "EnumsProto";
option java_package = "com.google.cloud.essentialcontacts.v1";
option csharp_namespace = "Google.Cloud.EssentialContacts.V1";
option php_namespace = "Google\\Cloud\\EssentialContacts\\V1";
option ruby_package = "Google::Cloud::EssentialContacts::V1";

Expand Down
7 changes: 0 additions & 7 deletions google/cloud/essentialcontacts/v1/essentialcontacts_v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,3 @@ title: Essential Contacts API

apis:
- name: google.cloud.essentialcontacts.v1.EssentialContactsService

authentication:
rules:
- selector: 'google.cloud.essentialcontacts.v1.EssentialContactsService.*'
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/cloud-platform
25 changes: 13 additions & 12 deletions google/cloud/essentialcontacts/v1/service.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -25,10 +25,10 @@ import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";
import "google/protobuf/timestamp.proto";

option csharp_namespace = "Google.Cloud.EssentialContacts.V1";
option go_package = "cloud.google.com/go/essentialcontacts/apiv1/essentialcontactspb;essentialcontactspb";
option java_multiple_files = true;
option java_package = "com.google.cloud.essentialcontacts.v1";
option csharp_namespace = "Google.Cloud.EssentialContacts.V1";
option php_namespace = "Google\\Cloud\\EssentialContacts\\V1";
option ruby_package = "Google::Cloud::EssentialContacts::V1";

Expand Down Expand Up @@ -144,23 +144,24 @@ message Contact {
pattern: "organizations/{organization}/contacts/{contact}"
};

// The identifier for the contact.
// Output only. The identifier for the contact.
// Format: {resource_type}/{resource_id}/contacts/{contact_id}
string name = 1;
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];

// Required. The email address to send notifications to. This does not need to
// be a Google account.
string email = 2;
// Required. The email address to send notifications to. The email address
// does not need to be a Google Account.
string email = 2 [(google.api.field_behavior) = REQUIRED];

// The categories of notifications that the contact will receive
// Required. The categories of notifications that the contact will receive
// communications for.
repeated NotificationCategory notification_category_subscriptions = 3;
repeated NotificationCategory notification_category_subscriptions = 3
[(google.api.field_behavior) = REQUIRED];

// The preferred language for notifications, as a ISO 639-1 language code. See
// [Supported
// Required. The preferred language for notifications, as a ISO 639-1 language
// code. See [Supported
// languages](https://cloud.google.com/resource-manager/docs/managing-notification-contacts#supported-languages)
// for a list of supported languages.
string language_tag = 4;
string language_tag = 4 [(google.api.field_behavior) = REQUIRED];

// The validity of the contact. A contact is considered valid if it is the
// correct recipient for notifications for a particular resource.
Expand Down

0 comments on commit 223fc66

Please sign in to comment.