subscriber_event.proto 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  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. syntax = "proto3";
  15. package google.cloud.channel.v1;
  16. import "google/api/resource.proto";
  17. option go_package = "google.golang.org/genproto/googleapis/cloud/channel/v1;channel";
  18. option java_multiple_files = true;
  19. option java_outer_classname = "SubscriberEventProto";
  20. option java_package = "com.google.cloud.channel.v1";
  21. // Represents Pub/Sub message content describing customer update.
  22. message CustomerEvent {
  23. // Type of customer event.
  24. enum Type {
  25. // Not used.
  26. TYPE_UNSPECIFIED = 0;
  27. // Primary domain for customer was changed.
  28. PRIMARY_DOMAIN_CHANGED = 1;
  29. // Primary domain of the customer has been verified.
  30. PRIMARY_DOMAIN_VERIFIED = 2;
  31. }
  32. // Resource name of the customer.
  33. // Format: accounts/{account_id}/customers/{customer_id}
  34. string customer = 1 [(google.api.resource_reference) = {
  35. type: "cloudchannel.googleapis.com/Customer"
  36. }];
  37. // Type of event which happened on the customer.
  38. Type event_type = 2;
  39. }
  40. // Represents Pub/Sub message content describing entitlement update.
  41. message EntitlementEvent {
  42. // Type of entitlement event.
  43. enum Type {
  44. // Not used.
  45. TYPE_UNSPECIFIED = 0;
  46. // A new entitlement was created.
  47. CREATED = 1;
  48. // The offer type associated with an entitlement was changed.
  49. // This is not triggered if an entitlement converts from a commit offer to a
  50. // flexible offer as part of a renewal.
  51. PRICE_PLAN_SWITCHED = 3;
  52. // Annual commitment for a commit plan was changed.
  53. COMMITMENT_CHANGED = 4;
  54. // An annual entitlement was renewed.
  55. RENEWED = 5;
  56. // Entitlement was suspended.
  57. SUSPENDED = 6;
  58. // Entitlement was unsuspended.
  59. ACTIVATED = 7;
  60. // Entitlement was cancelled.
  61. CANCELLED = 8;
  62. // Entitlement was upgraded or downgraded (e.g. from Google Workspace
  63. // Business Standard to Google Workspace Business Plus).
  64. SKU_CHANGED = 9;
  65. // The renewal settings of an entitlement has changed.
  66. RENEWAL_SETTING_CHANGED = 10;
  67. // Paid service has started on trial entitlement.
  68. PAID_SERVICE_STARTED = 11;
  69. // License was assigned to or revoked from a user.
  70. LICENSE_ASSIGNMENT_CHANGED = 12;
  71. // License cap was changed for the entitlement.
  72. LICENSE_CAP_CHANGED = 13;
  73. }
  74. // Resource name of an entitlement of the form:
  75. // accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
  76. string entitlement = 1 [(google.api.resource_reference) = {
  77. type: "cloudchannel.googleapis.com/Entitlement"
  78. }];
  79. // Type of event which happened on the entitlement.
  80. Type event_type = 2;
  81. }
  82. // Represents information which resellers will get as part of notification from
  83. // Pub/Sub.
  84. message SubscriberEvent {
  85. // Specifies the Pub/Sub event provided to the partners.
  86. // This is a required field.
  87. oneof event {
  88. // Customer event sent as part of Pub/Sub event to partners.
  89. CustomerEvent customer_event = 1;
  90. // Entitlement event sent as part of Pub/Sub event to partners.
  91. EntitlementEvent entitlement_event = 2;
  92. }
  93. }