From 781d34e5c91ca8b745ab653692cde3c42712203f Mon Sep 17 00:00:00 2001 From: Google APIs Date: Tue, 5 Jan 2021 13:37:54 -0800 Subject: [PATCH] feat: Add ProvisionCloudIdentity API definitions for Cloud Channel API. Update documentation for other APIs. PiperOrigin-RevId: 350209421 --- .../channel/v1/channel_partner_links.proto | 52 +++-- google/cloud/channel/v1/common.proto | 25 ++- google/cloud/channel/v1/entitlements.proto | 7 +- google/cloud/channel/v1/offers.proto | 42 ++-- google/cloud/channel/v1/operations.proto | 2 +- google/cloud/channel/v1/products.proto | 13 +- google/cloud/channel/v1/service.proto | 195 ++++++++++-------- 7 files changed, 196 insertions(+), 140 deletions(-) diff --git a/google/cloud/channel/v1/channel_partner_links.proto b/google/cloud/channel/v1/channel_partner_links.proto index 4072e7a6..688af897 100644 --- a/google/cloud/channel/v1/channel_partner_links.proto +++ b/google/cloud/channel/v1/channel_partner_links.proto @@ -26,6 +26,39 @@ option java_multiple_files = true; option java_outer_classname = "ChannelPartnerLinksProto"; option java_package = "com.google.cloud.channel.v1"; +// The level of granularity the [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] will display. +enum ChannelPartnerLinkView { + // The default / unset value. + // The API will default to the BASIC view. + UNSPECIFIED = 0; + + // Includes all fields except the + // [ChannelPartnerLink.channel_partner_cloud_identity_info][google.cloud.channel.v1.ChannelPartnerLink.channel_partner_cloud_identity_info]. + BASIC = 1; + + // Includes all fields. + FULL = 2; +} + +// ChannelPartnerLinkState represents state of a channel partner link. +enum ChannelPartnerLinkState { + // The state is not specified. + CHANNEL_PARTNER_LINK_STATE_UNSPECIFIED = 0; + + // An invitation has been sent to the reseller to create a channel partner + // link. + INVITED = 1; + + // Status when the reseller is active. + ACTIVE = 2; + + // Status when the reseller has been revoked by the distributor. + REVOKED = 3; + + // Status when the reseller is suspended by Google or distributor. + SUSPENDED = 4; +} + // Entity representing a link between distributors and their indirect // resellers in an n-tier resale channel. message ChannelPartnerLink { @@ -55,22 +88,3 @@ message ChannelPartnerLink { // Output only. Cloud Identity info of the channel partner (IR). CloudIdentityInfo channel_partner_cloud_identity_info = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; } - -// ChannelPartnerLinkState represents state of a channel partner link. -enum ChannelPartnerLinkState { - // The state is not specified. - CHANNEL_PARTNER_LINK_STATE_UNSPECIFIED = 0; - - // An invitation has been sent to the reseller to create a channel partner - // link. - INVITED = 1; - - // Status when the reseller is active. - ACTIVE = 2; - - // Status when the reseller has been revoked by the distributor. - REVOKED = 3; - - // Status when the reseller is suspended by Google or distributor. - SUSPENDED = 4; -} diff --git a/google/cloud/channel/v1/common.proto b/google/cloud/channel/v1/common.proto index b75262ea..ec8aef9b 100644 --- a/google/cloud/channel/v1/common.proto +++ b/google/cloud/channel/v1/common.proto @@ -29,19 +29,19 @@ option java_package = "com.google.cloud.channel.v1"; message EduData { // Enum to specify the institute type. enum InstituteType { - // Default value. This state is never returned unless an error occurs. + // Default value. This state doesn't show unless an error occurs. INSTITUTE_TYPE_UNSPECIFIED = 0; - // Elementary/ Secondary Schools & Districts + // Elementary/Secondary Schools & Districts K12 = 1; // Higher Education Universities & Colleges UNIVERSITY = 2; } - // Number of students/staff the institute has. + // Number of students and staff the institute has. enum InstituteSize { - // Default value. This state is never returned unless an error occurs. + // Default value. This state doesn't show unless an error occurs. INSTITUTE_SIZE_UNSPECIFIED = 0; // 1 - 100 @@ -80,7 +80,7 @@ message EduData { message CloudIdentityInfo { // CustomerType of the customer enum CustomerType { - // Default value. This state is never returned unless an error occurs. + // Default value. This state doesn't show unless an error occurs. CUSTOMER_TYPE_UNSPECIFIED = 0; // Domain-owning customer which needs domain verification to use services. @@ -96,6 +96,9 @@ message CloudIdentityInfo { // Output only. The primary domain name. string primary_domain = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Whether the domain is verified. + bool is_domain_verified = 4; + // The alternate email. string alternate_email = 6; @@ -129,3 +132,15 @@ message Value { google.protobuf.Any proto_value = 4; } } + +// Information needed to create an Admin User for Google Workspace. +message AdminUser { + // Primary email of the admin user. + string email = 1; + + // Given name of the admin user. + string given_name = 2; + + // Family name of the admin user. + string family_name = 3; +} diff --git a/google/cloud/channel/v1/entitlements.proto b/google/cloud/channel/v1/entitlements.proto index 1cc5b0dc..b2509daf 100644 --- a/google/cloud/channel/v1/entitlements.proto +++ b/google/cloud/channel/v1/entitlements.proto @@ -30,8 +30,7 @@ option java_multiple_files = true; option java_outer_classname = "EntitlementsProto"; option java_package = "com.google.cloud.channel.v1"; -// An entitlement represents an entity which provides a customer means to start -// using a service. +// An entitlement is a representation of a customer's ability to use a service. message Entitlement { option (google.api.resource) = { type: "cloudchannel.googleapis.com/Entitlement" @@ -40,7 +39,7 @@ message Entitlement { // Indicates the current provisioning state of the entitlement. enum ProvisioningState { - // Default value. This state is never returned unless an error occurs. + // Default value. This state doesn't show unless an error occurs. PROVISIONING_STATE_UNSPECIFIED = 0; // The entitlement is currently active. @@ -52,7 +51,7 @@ message Entitlement { // Suspension reason for an entitlement if [provisioning_state][google.cloud.channel.v1.Entitlement.provisioning_state] = SUSPENDED. enum SuspensionReason { - // Default value. This state is never returned unless an error occurs. + // Default value. This state doesn't show unless an error occurs. SUSPENSION_REASON_UNSPECIFIED = 0; // Entitlement was manually suspended by the Reseller. diff --git a/google/cloud/channel/v1/offers.proto b/google/cloud/channel/v1/offers.proto index c057a3b7..fef7e067 100644 --- a/google/cloud/channel/v1/offers.proto +++ b/google/cloud/channel/v1/offers.proto @@ -34,14 +34,13 @@ enum PromotionalOrderType { // Not used. PROMOTIONAL_TYPE_UNSPECIFIED = 0; - // Order used for net new customers, trial conversions and upgrades. + // Order used for new customers, trial conversions and upgrades. NEW_UPGRADE = 1; - // All orders for an existing customer transferring to the reseller. + // All orders for transferring an existing customer. TRANSFER = 2; - // Orders for an existing customer switching from one promotion to another - // (can be addition/removal of a promotion as well) on the same sku. + // Orders for modifying an existing customer's promotion on the same SKU. PROMOTION_SWITCH = 3; } @@ -78,10 +77,9 @@ enum PaymentType { POSTPAY = 2; } -// Represents monetizable resource's type. -// A monetizable resource is an entity on which billing happens. For example, -// this could be MINUTES for Google Voice and GB for Google Drive. One SKU can -// map to multiple monetizable resources. +// Represents the type for a monetizable resource(any entity on which billing +// happens). For example, this could be MINUTES for Google Voice and GB for +// Google Drive. One SKU can map to multiple monetizable resources. enum ResourceType { // Not used. RESOURCE_TYPE_UNSPECIFIED = 0; @@ -211,13 +209,11 @@ message ParameterDefinition { // Represents the constraints for buying the Offer. message Constraints { - // Represents constraints on a customer required for purchasing this Offer - // for that customer. + // Represents constraints required to purchase the Offer for a customer. CustomerConstraints customer_constraints = 1; } -// Represents constraints on a customer required for purchasing this Offer for -// that customer. +// Represents constraints required to purchase the Offer for a customer. message CustomerConstraints { // Allowed geographical regions of the customer. repeated string allowed_regions = 1; @@ -229,7 +225,7 @@ message CustomerConstraints { repeated PromotionalOrderType promotional_order_types = 3; } -// The payment plan for the Offer, describing how a payment is made. +// The payment plan for the Offer. Describes how to make a payment. message Plan { // Describes how a reseller will be billed. PaymentPlan payment_plan = 1; @@ -242,11 +238,11 @@ message Plan { Period payment_cycle = 3; // Present for Offers with a trial period. - // For trial-only Offers, a paid service needs to be started before the trial + // For trial-only Offers, a paid service needs to start before the trial // period ends for continued service. - // For Regular Offers with an initial trial period, the regular pricing will - // take effect after the trial period ends, or if paid service is started - // before the end of the trial period. + // For Regular Offers with a trial period, the regular pricing goes into + // effect when trial period ends, or if paid service is started before the end + // of the trial period. Period trial_period = 4; } @@ -279,8 +275,8 @@ message Price { } // Specifies the price by the duration of months. -// For example, for the first 6 months, 20% discount. From the seventh month, -// 10% discount. +// For example, a 20% discount for the first six months, then a 10% discount +// starting on the seventh month. message PricePhase { // Defines the phase period type. PeriodType period_type = 1; @@ -300,9 +296,11 @@ message PricePhase { // Defines price at resource tier level. // For example, an offer with following definition : -// Tier 1: Provide 25% discount for all seats between 1 and 25. -// Tier 2: Provide 10% discount for all seats between 26 and 100. -// Tier 3: Provide flat 15% discount for all seats above 100. +// +// * Tier 1: Provide 25% discount for all seats between 1 and 25. +// * Tier 2: Provide 10% discount for all seats between 26 and 100. +// * Tier 3: Provide flat 15% discount for all seats above 100. +// // Each of these tiers is represented as a PriceTier. message PriceTier { // First resource for which the tier price applies. diff --git a/google/cloud/channel/v1/operations.proto b/google/cloud/channel/v1/operations.proto index 239d85f0..46aa5f82 100644 --- a/google/cloud/channel/v1/operations.proto +++ b/google/cloud/channel/v1/operations.proto @@ -27,7 +27,7 @@ option java_package = "com.google.cloud.channel.v1"; message OperationMetadata { // RPCs that return a Long Running Operation. enum OperationType { - // Default value. This state is never returned unless an error occurs. + // Default value. This state doesn't show unless an error occurs. OPERATION_TYPE_UNSPECIFIED = 0; // Long Running Operation was triggered by CreateEntitlement. diff --git a/google/cloud/channel/v1/products.proto b/google/cloud/channel/v1/products.proto index afcf1c66..91422fc6 100644 --- a/google/cloud/channel/v1/products.proto +++ b/google/cloud/channel/v1/products.proto @@ -33,9 +33,8 @@ enum MediaType { MEDIA_TYPE_IMAGE = 1; } -// Product is the entity that the customer is entitled to use when an order is -// placed. -// Example of products are Google Workspace, Google Voice, etc. +// A Product is the entity a customer uses when placing an order. For example, +// Google Workspace, Google Voice, etc. message Product { option (google.api.resource) = { type: "cloudchannel.googleapis.com/Product" @@ -50,10 +49,10 @@ message Product { MarketingInfo marketing_info = 2; } -// Represents a purchasable Stock Keeping Unit (SKU) under a product. +// Represents a product's purchasable Stock Keeping Unit (SKU). // SKUs represent the different variations of the product. For example, Google -// Workspace Business Standard, Google Workspace Business Plus are SKUs of -// Google Workspace product. +// Workspace Business Standard and Google Workspace Business Plus are Google +// Workspace product SKUs. message Sku { option (google.api.resource) = { type: "cloudchannel.googleapis.com/Sku" @@ -71,7 +70,7 @@ message Sku { Product product = 3; } -// Represents a Product/SKU/Offer's marketing information. +// Represents the marketing information for a Product, SKU or Offer. message MarketingInfo { // Human readable name. string display_name = 1; diff --git a/google/cloud/channel/v1/service.proto b/google/cloud/channel/v1/service.proto index de8c2c13..0ea59dba 100644 --- a/google/cloud/channel/v1/service.proto +++ b/google/cloud/channel/v1/service.proto @@ -65,7 +65,7 @@ service CloudChannelService { // Possible Error Codes: // // * PERMISSION_DENIED: If the reseller account making the request and the - // reseller account being queried for, are different. + // reseller account being queried for are different. // * INVALID_ARGUMENT: Missing or invalid required parameters in the // request. // @@ -83,7 +83,7 @@ service CloudChannelService { // Possible Error Codes: // // * PERMISSION_DENIED: If the reseller account making the request and the - // reseller account being queried for, are different. + // reseller account being queried for are different. // * INVALID_ARGUMENT: Missing or invalid required parameters in the // request. // * NOT_FOUND: If the customer resource doesn't exist. Usually @@ -104,7 +104,7 @@ service CloudChannelService { // Possible Error Codes: // // * PERMISSION_DENIED: If the reseller account making the request and the - // reseller account being queried for, are different. + // reseller account being queried for are different. // * INVALID_ARGUMENT: Missing or invalid required parameters in the // request. // * INVALID_VALUE: Invalid domain value in the request. @@ -127,7 +127,7 @@ service CloudChannelService { // Possible Error Codes: //