subscriber_event.proto 3.8 KB

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