blob: 7cc2f26072c132048901d232307791eb34d12b27 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
|
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package google.cloud.channel.v1;
import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/protobuf/timestamp.proto";
import "google/type/date.proto";
import "google/type/decimal.proto";
option go_package = "google.golang.org/genproto/googleapis/cloud/channel/v1;channel";
option java_multiple_files = true;
option java_outer_classname = "RepricingProto";
option java_package = "com.google.cloud.channel.v1";
// Specifies the different costs that the modified bill can be based on.
enum RebillingBasis {
// Not used.
REBILLING_BASIS_UNSPECIFIED = 0;
// Use the list cost, also known as the MSRP.
COST_AT_LIST = 1;
// Pass through all discounts except the Reseller Program Discount. If this is
// the default cost base and no adjustments are specified, the output cost
// will be exactly what the customer would see if they viewed the bill in the
// Google Cloud Console.
DIRECT_CUSTOMER_COST = 2;
}
// Configuration for how a reseller will reprice a Customer.
message CustomerRepricingConfig {
option (google.api.resource) = {
type: "cloudchannel.googleapis.com/CustomerRepricingConfig"
pattern: "accounts/{account}/customers/{customer}/customerRepricingConfigs/{customer_repricing_config}"
};
// Output only. Resource name of the CustomerRepricingConfig.
// Format:
// accounts/{account_id}/customers/{customer_id}/customerRepricingConfigs/{id}.
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
// Required. The configuration for bill modifications made by a reseller before
// sending it to customers.
RepricingConfig repricing_config = 2 [(google.api.field_behavior) = REQUIRED];
// Output only. Timestamp of an update to the repricing rule. If `update_time` is after
// [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month] then it indicates this was set
// mid-month.
google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
}
// Configuration for how a distributor will rebill a channel partner
// (also known as a distributor-authorized reseller).
message ChannelPartnerRepricingConfig {
option (google.api.resource) = {
type: "cloudchannel.googleapis.com/ChannelPartnerRepricingConfig"
pattern: "accounts/{account}/channelPartnerLinks/{channel_partner}/channelPartnerRepricingConfigs/{channel_partner_repricing_config}"
};
// Output only. Resource name of the ChannelPartnerRepricingConfig.
// Format:
// accounts/{account_id}/channelPartnerLinks/{channel_partner_id}/channelPartnerRepricingConfigs/{id}.
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
// Required. The configuration for bill modifications made by a reseller before
// sending it to ChannelPartner.
RepricingConfig repricing_config = 2 [(google.api.field_behavior) = REQUIRED];
// Output only. Timestamp of an update to the repricing rule. If `update_time` is after
// [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month] then it indicates this was set
// mid-month.
google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
}
// Configuration for repricing a Google bill over a period of time.
message RepricingConfig {
// Applies the repricing configuration at the entitlement level.
message EntitlementGranularity {
// Resource name of the entitlement.
// Format:
// accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
string entitlement = 1 [(google.api.resource_reference) = {
type: "cloudchannel.googleapis.com/Entitlement"
}];
}
// Applies the repricing configuration at the channel partner level.
// The channel partner value is derived from the resource name. Takes an
// empty json object.
message ChannelPartnerGranularity {
}
// Required. Defines the granularity for repricing.
oneof granularity {
// Applies the repricing configuration at the entitlement level. This is
// the only supported value for CustomerRepricingConfig.
EntitlementGranularity entitlement_granularity = 4;
// Applies the repricing configuration at the channel partner level.
// This is the only supported value for ChannelPartnerRepricingConfig.
ChannelPartnerGranularity channel_partner_granularity = 5;
}
// Required. The YearMonth when these adjustments activate. The Day field needs to be
// "0" since we only accept YearMonth repricing boundaries.
google.type.Date effective_invoice_month = 1 [(google.api.field_behavior) = REQUIRED];
// Required. Information about the adjustment.
RepricingAdjustment adjustment = 2 [(google.api.field_behavior) = REQUIRED];
// Required. The [RebillingBasis][google.cloud.channel.v1.RebillingBasis] to use for this bill. Specifies the relative cost
// based on repricing costs you will apply.
RebillingBasis rebilling_basis = 3 [(google.api.field_behavior) = REQUIRED];
}
// A type that represents the various adjustments you can apply to a bill.
message RepricingAdjustment {
// A oneof that represents the different types for this adjustment.
oneof adjustment {
// Flat markup or markdown on an entire bill.
PercentageAdjustment percentage_adjustment = 2;
}
}
// An adjustment that applies a flat markup or markdown to an entire bill.
message PercentageAdjustment {
// The percentage of the bill to adjust.
// For example:
// Mark down by 1% => "-1.00"
// Mark up by 1% => "1.00"
// Pass-Through => "0.00"
google.type.Decimal percentage = 2;
}
|