xref: /aosp_15_r20/external/googleapis/google/cloud/channel/v1/entitlement_changes.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1// Copyright 2023 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.channel.v1;
18
19import "google/api/field_behavior.proto";
20import "google/api/resource.proto";
21import "google/cloud/channel/v1/entitlements.proto";
22import "google/protobuf/timestamp.proto";
23
24option go_package = "cloud.google.com/go/channel/apiv1/channelpb;channelpb";
25option java_multiple_files = true;
26option java_outer_classname = "EntitlementChangesProto";
27option java_package = "com.google.cloud.channel.v1";
28
29// Change event entry for Entitlement order history
30message EntitlementChange {
31  // Specifies the type of change action
32  enum ChangeType {
33    // Not used.
34    CHANGE_TYPE_UNSPECIFIED = 0;
35
36    // New Entitlement was created.
37    CREATED = 1;
38
39    // Price plan associated with an Entitlement was changed.
40    PRICE_PLAN_SWITCHED = 3;
41
42    // Number of seats committed for a commitment Entitlement was changed.
43    COMMITMENT_CHANGED = 4;
44
45    // An annual Entitlement was renewed.
46    RENEWED = 5;
47
48    // Entitlement was suspended.
49    SUSPENDED = 6;
50
51    // Entitlement was activated.
52    ACTIVATED = 7;
53
54    // Entitlement was cancelled.
55    CANCELLED = 8;
56
57    // Entitlement was upgraded or downgraded for ex. from Google Workspace
58    // Business Standard to Google Workspace Business Plus.
59    SKU_CHANGED = 9;
60
61    // The settings for renewal of an Entitlement have changed.
62    RENEWAL_SETTING_CHANGED = 10;
63
64    // Use for Google Workspace subscription.
65    // Either a trial was converted to a paid subscription or a new subscription
66    // with no trial is created.
67    PAID_SUBSCRIPTION_STARTED = 11;
68
69    // License cap was changed for the entitlement.
70    LICENSE_CAP_CHANGED = 12;
71
72    // The suspension details have changed (but it is still suspended).
73    SUSPENSION_DETAILS_CHANGED = 13;
74
75    // The trial end date was extended.
76    TRIAL_END_DATE_EXTENDED = 14;
77
78    // Entitlement started trial.
79    TRIAL_STARTED = 15;
80  }
81
82  // Specifies the type of operator responsible for the change
83  enum OperatorType {
84    // Not used.
85    OPERATOR_TYPE_UNSPECIFIED = 0;
86
87    // Customer service representative.
88    CUSTOMER_SERVICE_REPRESENTATIVE = 1;
89
90    // System auto job.
91    SYSTEM = 2;
92
93    // Customer user.
94    CUSTOMER = 3;
95
96    // Reseller user.
97    RESELLER = 4;
98  }
99
100  // Cancellation reason for the entitlement
101  enum CancellationReason {
102    // Not used.
103    CANCELLATION_REASON_UNSPECIFIED = 0;
104
105    // Reseller triggered a cancellation of the service.
106    SERVICE_TERMINATED = 1;
107
108    // Relationship between the reseller and customer has ended due to a
109    // transfer.
110    RELATIONSHIP_ENDED = 2;
111
112    // Entitlement transferred away from reseller while still keeping other
113    // entitlement(s) with the reseller.
114    PARTIAL_TRANSFER = 3;
115  }
116
117  // The Entitlement's activation reason
118  enum ActivationReason {
119    // Not used.
120    ACTIVATION_REASON_UNSPECIFIED = 0;
121
122    // Reseller reactivated a suspended Entitlement.
123    RESELLER_REVOKED_SUSPENSION = 1;
124
125    // Customer accepted pending terms of service.
126    CUSTOMER_ACCEPTED_PENDING_TOS = 2;
127
128    // Reseller updated the renewal settings on an entitlement that was
129    // suspended due to cancellation, and this update reactivated the
130    // entitlement.
131    RENEWAL_SETTINGS_CHANGED = 3;
132
133    // Other reasons (Activated temporarily for cancellation, added a payment
134    // plan to a trial entitlement, etc.)
135    OTHER_ACTIVATION_REASON = 100;
136  }
137
138  // The reason the change was made
139  oneof change_reason {
140    // Suspension reason for the Entitlement.
141    Entitlement.SuspensionReason suspension_reason = 9;
142
143    // Cancellation reason for the Entitlement.
144    CancellationReason cancellation_reason = 10;
145
146    // The Entitlement's activation reason
147    ActivationReason activation_reason = 11;
148
149    // e.g. purchase_number change reason, entered by CRS.
150    string other_change_reason = 100;
151  }
152
153  // Required. Resource name of an entitlement in the form:
154  // accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
155  string entitlement = 1 [
156    (google.api.field_behavior) = REQUIRED,
157    (google.api.resource_reference) = {
158      type: "cloudchannel.googleapis.com/Entitlement"
159    }
160  ];
161
162  // Required. Resource name of the Offer at the time of change.
163  // Takes the form: accounts/{account_id}/offers/{offer_id}.
164  string offer = 2 [
165    (google.api.field_behavior) = REQUIRED,
166    (google.api.resource_reference) = {
167      type: "cloudchannel.googleapis.com/Offer"
168    }
169  ];
170
171  // Service provisioned for an Entitlement.
172  ProvisionedService provisioned_service = 3;
173
174  // The change action type.
175  ChangeType change_type = 4;
176
177  // The submitted time of the change.
178  google.protobuf.Timestamp create_time = 5;
179
180  // Operator type responsible for the change.
181  OperatorType operator_type = 6;
182
183  // Extended parameters, such as:
184  // purchase_order_number, gcp_details;
185  // internal_correlation_id, long_running_operation_id, order_id;
186  // etc.
187  repeated Parameter parameters = 8;
188
189  // Human-readable identifier that shows what operator made a change.
190  // When the operator_type is RESELLER, this is the user's email address.
191  // For all other operator types, this is empty.
192  string operator = 12;
193}
194