1*d5c09012SAndroid Build Coastguard Worker// Copyright 2023 Google LLC 2*d5c09012SAndroid Build Coastguard Worker// 3*d5c09012SAndroid Build Coastguard Worker// Licensed under the Apache License, Version 2.0 (the "License"); 4*d5c09012SAndroid Build Coastguard Worker// you may not use this file except in compliance with the License. 5*d5c09012SAndroid Build Coastguard Worker// You may obtain a copy of the License at 6*d5c09012SAndroid Build Coastguard Worker// 7*d5c09012SAndroid Build Coastguard Worker// http://www.apache.org/licenses/LICENSE-2.0 8*d5c09012SAndroid Build Coastguard Worker// 9*d5c09012SAndroid Build Coastguard Worker// Unless required by applicable law or agreed to in writing, software 10*d5c09012SAndroid Build Coastguard Worker// distributed under the License is distributed on an "AS IS" BASIS, 11*d5c09012SAndroid Build Coastguard Worker// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12*d5c09012SAndroid Build Coastguard Worker// See the License for the specific language governing permissions and 13*d5c09012SAndroid Build Coastguard Worker// limitations under the License. 14*d5c09012SAndroid Build Coastguard Worker 15*d5c09012SAndroid Build Coastguard Workersyntax = "proto3"; 16*d5c09012SAndroid Build Coastguard Worker 17*d5c09012SAndroid Build Coastguard Workerpackage google.cloud.channel.v1; 18*d5c09012SAndroid Build Coastguard Worker 19*d5c09012SAndroid Build Coastguard Workerimport "google/api/field_behavior.proto"; 20*d5c09012SAndroid Build Coastguard Workerimport "google/api/resource.proto"; 21*d5c09012SAndroid Build Coastguard Workerimport "google/protobuf/timestamp.proto"; 22*d5c09012SAndroid Build Coastguard Workerimport "google/type/date.proto"; 23*d5c09012SAndroid Build Coastguard Workerimport "google/type/decimal.proto"; 24*d5c09012SAndroid Build Coastguard Worker 25*d5c09012SAndroid Build Coastguard Workeroption go_package = "cloud.google.com/go/channel/apiv1/channelpb;channelpb"; 26*d5c09012SAndroid Build Coastguard Workeroption java_multiple_files = true; 27*d5c09012SAndroid Build Coastguard Workeroption java_outer_classname = "RepricingProto"; 28*d5c09012SAndroid Build Coastguard Workeroption java_package = "com.google.cloud.channel.v1"; 29*d5c09012SAndroid Build Coastguard Worker 30*d5c09012SAndroid Build Coastguard Worker// Specifies the different costs that the modified bill can be based on. 31*d5c09012SAndroid Build Coastguard Workerenum RebillingBasis { 32*d5c09012SAndroid Build Coastguard Worker // Not used. 33*d5c09012SAndroid Build Coastguard Worker REBILLING_BASIS_UNSPECIFIED = 0; 34*d5c09012SAndroid Build Coastguard Worker 35*d5c09012SAndroid Build Coastguard Worker // Use the list cost, also known as the MSRP. 36*d5c09012SAndroid Build Coastguard Worker COST_AT_LIST = 1; 37*d5c09012SAndroid Build Coastguard Worker 38*d5c09012SAndroid Build Coastguard Worker // Pass through all discounts except the Reseller Program Discount. If this is 39*d5c09012SAndroid Build Coastguard Worker // the default cost base and no adjustments are specified, the output cost 40*d5c09012SAndroid Build Coastguard Worker // will be exactly what the customer would see if they viewed the bill in the 41*d5c09012SAndroid Build Coastguard Worker // Google Cloud Console. 42*d5c09012SAndroid Build Coastguard Worker DIRECT_CUSTOMER_COST = 2; 43*d5c09012SAndroid Build Coastguard Worker} 44*d5c09012SAndroid Build Coastguard Worker 45*d5c09012SAndroid Build Coastguard Worker// Configuration for how a reseller will reprice a Customer. 46*d5c09012SAndroid Build Coastguard Workermessage CustomerRepricingConfig { 47*d5c09012SAndroid Build Coastguard Worker option (google.api.resource) = { 48*d5c09012SAndroid Build Coastguard Worker type: "cloudchannel.googleapis.com/CustomerRepricingConfig" 49*d5c09012SAndroid Build Coastguard Worker pattern: "accounts/{account}/customers/{customer}/customerRepricingConfigs/{customer_repricing_config}" 50*d5c09012SAndroid Build Coastguard Worker }; 51*d5c09012SAndroid Build Coastguard Worker 52*d5c09012SAndroid Build Coastguard Worker // Output only. Resource name of the CustomerRepricingConfig. 53*d5c09012SAndroid Build Coastguard Worker // Format: 54*d5c09012SAndroid Build Coastguard Worker // accounts/{account_id}/customers/{customer_id}/customerRepricingConfigs/{id}. 55*d5c09012SAndroid Build Coastguard Worker string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; 56*d5c09012SAndroid Build Coastguard Worker 57*d5c09012SAndroid Build Coastguard Worker // Required. The configuration for bill modifications made by a reseller 58*d5c09012SAndroid Build Coastguard Worker // before sending it to customers. 59*d5c09012SAndroid Build Coastguard Worker RepricingConfig repricing_config = 2 [(google.api.field_behavior) = REQUIRED]; 60*d5c09012SAndroid Build Coastguard Worker 61*d5c09012SAndroid Build Coastguard Worker // Output only. Timestamp of an update to the repricing rule. If `update_time` 62*d5c09012SAndroid Build Coastguard Worker // is after 63*d5c09012SAndroid Build Coastguard Worker // [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month] 64*d5c09012SAndroid Build Coastguard Worker // then it indicates this was set mid-month. 65*d5c09012SAndroid Build Coastguard Worker google.protobuf.Timestamp update_time = 3 66*d5c09012SAndroid Build Coastguard Worker [(google.api.field_behavior) = OUTPUT_ONLY]; 67*d5c09012SAndroid Build Coastguard Worker} 68*d5c09012SAndroid Build Coastguard Worker 69*d5c09012SAndroid Build Coastguard Worker// Configuration for how a distributor will rebill a channel partner 70*d5c09012SAndroid Build Coastguard Worker// (also known as a distributor-authorized reseller). 71*d5c09012SAndroid Build Coastguard Workermessage ChannelPartnerRepricingConfig { 72*d5c09012SAndroid Build Coastguard Worker option (google.api.resource) = { 73*d5c09012SAndroid Build Coastguard Worker type: "cloudchannel.googleapis.com/ChannelPartnerRepricingConfig" 74*d5c09012SAndroid Build Coastguard Worker pattern: "accounts/{account}/channelPartnerLinks/{channel_partner}/channelPartnerRepricingConfigs/{channel_partner_repricing_config}" 75*d5c09012SAndroid Build Coastguard Worker }; 76*d5c09012SAndroid Build Coastguard Worker 77*d5c09012SAndroid Build Coastguard Worker // Output only. Resource name of the ChannelPartnerRepricingConfig. 78*d5c09012SAndroid Build Coastguard Worker // Format: 79*d5c09012SAndroid Build Coastguard Worker // accounts/{account_id}/channelPartnerLinks/{channel_partner_id}/channelPartnerRepricingConfigs/{id}. 80*d5c09012SAndroid Build Coastguard Worker string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; 81*d5c09012SAndroid Build Coastguard Worker 82*d5c09012SAndroid Build Coastguard Worker // Required. The configuration for bill modifications made by a reseller 83*d5c09012SAndroid Build Coastguard Worker // before sending it to ChannelPartner. 84*d5c09012SAndroid Build Coastguard Worker RepricingConfig repricing_config = 2 [(google.api.field_behavior) = REQUIRED]; 85*d5c09012SAndroid Build Coastguard Worker 86*d5c09012SAndroid Build Coastguard Worker // Output only. Timestamp of an update to the repricing rule. If `update_time` 87*d5c09012SAndroid Build Coastguard Worker // is after 88*d5c09012SAndroid Build Coastguard Worker // [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month] 89*d5c09012SAndroid Build Coastguard Worker // then it indicates this was set mid-month. 90*d5c09012SAndroid Build Coastguard Worker google.protobuf.Timestamp update_time = 3 91*d5c09012SAndroid Build Coastguard Worker [(google.api.field_behavior) = OUTPUT_ONLY]; 92*d5c09012SAndroid Build Coastguard Worker} 93*d5c09012SAndroid Build Coastguard Worker 94*d5c09012SAndroid Build Coastguard Worker// Configuration for repricing a Google bill over a period of time. 95*d5c09012SAndroid Build Coastguard Workermessage RepricingConfig { 96*d5c09012SAndroid Build Coastguard Worker // Applies the repricing configuration at the entitlement level. 97*d5c09012SAndroid Build Coastguard Worker message EntitlementGranularity { 98*d5c09012SAndroid Build Coastguard Worker // Resource name of the entitlement. 99*d5c09012SAndroid Build Coastguard Worker // Format: 100*d5c09012SAndroid Build Coastguard Worker // accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id} 101*d5c09012SAndroid Build Coastguard Worker string entitlement = 1 [(google.api.resource_reference) = { 102*d5c09012SAndroid Build Coastguard Worker type: "cloudchannel.googleapis.com/Entitlement" 103*d5c09012SAndroid Build Coastguard Worker }]; 104*d5c09012SAndroid Build Coastguard Worker } 105*d5c09012SAndroid Build Coastguard Worker 106*d5c09012SAndroid Build Coastguard Worker // Applies the repricing configuration at the channel partner level. 107*d5c09012SAndroid Build Coastguard Worker // The channel partner value is derived from the resource name. Takes an 108*d5c09012SAndroid Build Coastguard Worker // empty json object. 109*d5c09012SAndroid Build Coastguard Worker // Deprecated: This is no longer supported. Use 110*d5c09012SAndroid Build Coastguard Worker // [RepricingConfig.EntitlementGranularity][google.cloud.channel.v1.RepricingConfig.EntitlementGranularity] 111*d5c09012SAndroid Build Coastguard Worker // instead. 112*d5c09012SAndroid Build Coastguard Worker message ChannelPartnerGranularity { 113*d5c09012SAndroid Build Coastguard Worker option deprecated = true; 114*d5c09012SAndroid Build Coastguard Worker } 115*d5c09012SAndroid Build Coastguard Worker 116*d5c09012SAndroid Build Coastguard Worker // Required. Defines the granularity for repricing. 117*d5c09012SAndroid Build Coastguard Worker oneof granularity { 118*d5c09012SAndroid Build Coastguard Worker // Applies the repricing configuration at the entitlement level. 119*d5c09012SAndroid Build Coastguard Worker // 120*d5c09012SAndroid Build Coastguard Worker // Note: If a 121*d5c09012SAndroid Build Coastguard Worker // [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig] 122*d5c09012SAndroid Build Coastguard Worker // using 123*d5c09012SAndroid Build Coastguard Worker // [RepricingConfig.EntitlementGranularity][google.cloud.channel.v1.RepricingConfig.EntitlementGranularity] 124*d5c09012SAndroid Build Coastguard Worker // becomes effective, then no existing or future 125*d5c09012SAndroid Build Coastguard Worker // [RepricingConfig.ChannelPartnerGranularity][google.cloud.channel.v1.RepricingConfig.ChannelPartnerGranularity] 126*d5c09012SAndroid Build Coastguard Worker // will apply to the 127*d5c09012SAndroid Build Coastguard Worker // [RepricingConfig.EntitlementGranularity.entitlement][google.cloud.channel.v1.RepricingConfig.EntitlementGranularity.entitlement]. 128*d5c09012SAndroid Build Coastguard Worker // This is the recommended value for both 129*d5c09012SAndroid Build Coastguard Worker // [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] 130*d5c09012SAndroid Build Coastguard Worker // and 131*d5c09012SAndroid Build Coastguard Worker // [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig]. 132*d5c09012SAndroid Build Coastguard Worker EntitlementGranularity entitlement_granularity = 4; 133*d5c09012SAndroid Build Coastguard Worker 134*d5c09012SAndroid Build Coastguard Worker // Applies the repricing configuration at the channel partner level. 135*d5c09012SAndroid Build Coastguard Worker // Only 136*d5c09012SAndroid Build Coastguard Worker // [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig] 137*d5c09012SAndroid Build Coastguard Worker // supports this value. Deprecated: This is no longer supported. Use 138*d5c09012SAndroid Build Coastguard Worker // [RepricingConfig.entitlement_granularity][google.cloud.channel.v1.RepricingConfig.entitlement_granularity] 139*d5c09012SAndroid Build Coastguard Worker // instead. 140*d5c09012SAndroid Build Coastguard Worker ChannelPartnerGranularity channel_partner_granularity = 5 141*d5c09012SAndroid Build Coastguard Worker [deprecated = true]; 142*d5c09012SAndroid Build Coastguard Worker } 143*d5c09012SAndroid Build Coastguard Worker 144*d5c09012SAndroid Build Coastguard Worker // Required. The YearMonth when these adjustments activate. The Day field 145*d5c09012SAndroid Build Coastguard Worker // needs to be "0" since we only accept YearMonth repricing boundaries. 146*d5c09012SAndroid Build Coastguard Worker google.type.Date effective_invoice_month = 1 147*d5c09012SAndroid Build Coastguard Worker [(google.api.field_behavior) = REQUIRED]; 148*d5c09012SAndroid Build Coastguard Worker 149*d5c09012SAndroid Build Coastguard Worker // Required. Information about the adjustment. 150*d5c09012SAndroid Build Coastguard Worker RepricingAdjustment adjustment = 2 [(google.api.field_behavior) = REQUIRED]; 151*d5c09012SAndroid Build Coastguard Worker 152*d5c09012SAndroid Build Coastguard Worker // Required. The [RebillingBasis][google.cloud.channel.v1.RebillingBasis] to 153*d5c09012SAndroid Build Coastguard Worker // use for this bill. Specifies the relative cost based on repricing costs you 154*d5c09012SAndroid Build Coastguard Worker // will apply. 155*d5c09012SAndroid Build Coastguard Worker RebillingBasis rebilling_basis = 3 [(google.api.field_behavior) = REQUIRED]; 156*d5c09012SAndroid Build Coastguard Worker 157*d5c09012SAndroid Build Coastguard Worker // The conditional overrides to apply for this configuration. If you list 158*d5c09012SAndroid Build Coastguard Worker // multiple overrides, only the first valid override is used. If you don't 159*d5c09012SAndroid Build Coastguard Worker // list any overrides, the API uses the normal adjustment and rebilling basis. 160*d5c09012SAndroid Build Coastguard Worker repeated ConditionalOverride conditional_overrides = 6; 161*d5c09012SAndroid Build Coastguard Worker} 162*d5c09012SAndroid Build Coastguard Worker 163*d5c09012SAndroid Build Coastguard Worker// A type that represents the various adjustments you can apply to a bill. 164*d5c09012SAndroid Build Coastguard Workermessage RepricingAdjustment { 165*d5c09012SAndroid Build Coastguard Worker // A oneof that represents the different types for this adjustment. 166*d5c09012SAndroid Build Coastguard Worker oneof adjustment { 167*d5c09012SAndroid Build Coastguard Worker // Flat markup or markdown on an entire bill. 168*d5c09012SAndroid Build Coastguard Worker PercentageAdjustment percentage_adjustment = 2; 169*d5c09012SAndroid Build Coastguard Worker } 170*d5c09012SAndroid Build Coastguard Worker} 171*d5c09012SAndroid Build Coastguard Worker 172*d5c09012SAndroid Build Coastguard Worker// An adjustment that applies a flat markup or markdown to an entire bill. 173*d5c09012SAndroid Build Coastguard Workermessage PercentageAdjustment { 174*d5c09012SAndroid Build Coastguard Worker // The percentage of the bill to adjust. 175*d5c09012SAndroid Build Coastguard Worker // For example: 176*d5c09012SAndroid Build Coastguard Worker // Mark down by 1% => "-1.00" 177*d5c09012SAndroid Build Coastguard Worker // Mark up by 1% => "1.00" 178*d5c09012SAndroid Build Coastguard Worker // Pass-Through => "0.00" 179*d5c09012SAndroid Build Coastguard Worker google.type.Decimal percentage = 2; 180*d5c09012SAndroid Build Coastguard Worker} 181*d5c09012SAndroid Build Coastguard Worker 182*d5c09012SAndroid Build Coastguard Worker// Specifies the override to conditionally apply. 183*d5c09012SAndroid Build Coastguard Workermessage ConditionalOverride { 184*d5c09012SAndroid Build Coastguard Worker // Required. Information about the applied override's adjustment. 185*d5c09012SAndroid Build Coastguard Worker RepricingAdjustment adjustment = 1 [(google.api.field_behavior) = REQUIRED]; 186*d5c09012SAndroid Build Coastguard Worker 187*d5c09012SAndroid Build Coastguard Worker // Required. The [RebillingBasis][google.cloud.channel.v1.RebillingBasis] to 188*d5c09012SAndroid Build Coastguard Worker // use for the applied override. Shows the relative cost based on your 189*d5c09012SAndroid Build Coastguard Worker // repricing costs. 190*d5c09012SAndroid Build Coastguard Worker RebillingBasis rebilling_basis = 2 [(google.api.field_behavior) = REQUIRED]; 191*d5c09012SAndroid Build Coastguard Worker 192*d5c09012SAndroid Build Coastguard Worker // Required. Specifies the condition which, if met, will apply the override. 193*d5c09012SAndroid Build Coastguard Worker RepricingCondition repricing_condition = 3 194*d5c09012SAndroid Build Coastguard Worker [(google.api.field_behavior) = REQUIRED]; 195*d5c09012SAndroid Build Coastguard Worker} 196*d5c09012SAndroid Build Coastguard Worker 197*d5c09012SAndroid Build Coastguard Worker// Represents the various repricing conditions you can use for a conditional 198*d5c09012SAndroid Build Coastguard Worker// override. 199*d5c09012SAndroid Build Coastguard Workermessage RepricingCondition { 200*d5c09012SAndroid Build Coastguard Worker // Represents the types of existing conditional statements. 201*d5c09012SAndroid Build Coastguard Worker oneof condition { 202*d5c09012SAndroid Build Coastguard Worker // SKU Group condition for override. 203*d5c09012SAndroid Build Coastguard Worker SkuGroupCondition sku_group_condition = 1; 204*d5c09012SAndroid Build Coastguard Worker } 205*d5c09012SAndroid Build Coastguard Worker} 206*d5c09012SAndroid Build Coastguard Worker 207*d5c09012SAndroid Build Coastguard Worker// A condition that applies the override if a line item SKU is found in the SKU 208*d5c09012SAndroid Build Coastguard Worker// group. 209*d5c09012SAndroid Build Coastguard Workermessage SkuGroupCondition { 210*d5c09012SAndroid Build Coastguard Worker // Specifies a SKU group (https://cloud.google.com/skus/sku-groups). 211*d5c09012SAndroid Build Coastguard Worker // Resource name of SKU group. Format: 212*d5c09012SAndroid Build Coastguard Worker // accounts/{account}/skuGroups/{sku_group}. 213*d5c09012SAndroid Build Coastguard Worker // Example: 214*d5c09012SAndroid Build Coastguard Worker // "accounts/C01234/skuGroups/3d50fd57-3157-4577-a5a9-a219b8490041". 215*d5c09012SAndroid Build Coastguard Worker string sku_group = 1; 216*d5c09012SAndroid Build Coastguard Worker} 217