feat: Add API definitions for Cloud Channel API.
PiperOrigin-RevId: 345351310
This commit is contained in:
parent
c1cef1acd2
commit
59c2e24501
|
|
@ -0,0 +1,398 @@
|
|||
# This file was automatically generated by BuildFileGenerator
|
||||
# https://github.com/googleapis/gapic-generator/tree/master/rules_gapic/bazel
|
||||
|
||||
# Most of the manual changes to this file will be overwritten.
|
||||
# It's **only** allowed to change the following rule attribute values:
|
||||
# - names of *_gapic_assembly_* rules
|
||||
# - certain parameters of *_gapic_library rules, including but not limited to:
|
||||
# * extra_protoc_parameters
|
||||
# * extra_protoc_file_parameters
|
||||
# The complete list of preserved parameters can be found in the source code.
|
||||
|
||||
# This is an API workspace, having public visibility by default makes perfect sense.
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
##############################################################################
|
||||
# Common
|
||||
##############################################################################
|
||||
load("@rules_proto//proto:defs.bzl", "proto_library")
|
||||
load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info")
|
||||
|
||||
proto_library(
|
||||
name = "channel_proto",
|
||||
srcs = [
|
||||
"channel_partner_links.proto",
|
||||
"common.proto",
|
||||
"customers.proto",
|
||||
"entitlements.proto",
|
||||
"offers.proto",
|
||||
"operations.proto",
|
||||
"products.proto",
|
||||
"service.proto",
|
||||
],
|
||||
deps = [
|
||||
"//google/api:annotations_proto",
|
||||
"//google/api:client_proto",
|
||||
"//google/api:field_behavior_proto",
|
||||
"//google/api:resource_proto",
|
||||
"//google/longrunning:operations_proto",
|
||||
"//google/type:money_proto",
|
||||
"//google/type:postal_address_proto",
|
||||
"@com_google_protobuf//:any_proto",
|
||||
"@com_google_protobuf//:empty_proto",
|
||||
"@com_google_protobuf//:field_mask_proto",
|
||||
"@com_google_protobuf//:timestamp_proto",
|
||||
"@com_google_protobuf//:wrappers_proto",
|
||||
],
|
||||
)
|
||||
|
||||
proto_library_with_info(
|
||||
name = "channel_proto_with_info",
|
||||
deps = [
|
||||
":channel_proto",
|
||||
"//google/cloud:common_resources_proto",
|
||||
],
|
||||
)
|
||||
|
||||
##############################################################################
|
||||
# Java
|
||||
##############################################################################
|
||||
load(
|
||||
"@com_google_googleapis_imports//:imports.bzl",
|
||||
"java_gapic_assembly_gradle_pkg",
|
||||
"java_gapic_library",
|
||||
"java_gapic_test",
|
||||
"java_grpc_library",
|
||||
"java_proto_library",
|
||||
)
|
||||
|
||||
java_proto_library(
|
||||
name = "channel_java_proto",
|
||||
deps = [":channel_proto"],
|
||||
)
|
||||
|
||||
java_grpc_library(
|
||||
name = "channel_java_grpc",
|
||||
srcs = [":channel_proto"],
|
||||
deps = [":channel_java_proto"],
|
||||
)
|
||||
|
||||
java_gapic_library(
|
||||
name = "channel_java_gapic",
|
||||
src = ":channel_proto_with_info",
|
||||
gapic_yaml = "cloudchannel_gapic.yaml",
|
||||
grpc_service_config = "cloudchannel_grpc_service_config.json",
|
||||
package = "google.cloud.channel.v1",
|
||||
service_yaml = "cloudchannel_v1.yaml",
|
||||
test_deps = [
|
||||
":channel_java_grpc",
|
||||
],
|
||||
deps = [
|
||||
":channel_java_proto",
|
||||
],
|
||||
)
|
||||
|
||||
java_gapic_test(
|
||||
name = "channel_java_gapic_test_suite",
|
||||
test_classes = [
|
||||
"com.google.cloud.channel.v1.CloudChannelServiceClientTest",
|
||||
],
|
||||
runtime_deps = [":channel_java_gapic_test"],
|
||||
)
|
||||
|
||||
# Open Source Packages
|
||||
java_gapic_assembly_gradle_pkg(
|
||||
name = "google-cloud-channel-v1-java",
|
||||
deps = [
|
||||
":channel_java_gapic",
|
||||
":channel_java_grpc",
|
||||
":channel_java_proto",
|
||||
":channel_proto",
|
||||
],
|
||||
)
|
||||
|
||||
##############################################################################
|
||||
# Go
|
||||
##############################################################################
|
||||
load(
|
||||
"@com_google_googleapis_imports//:imports.bzl",
|
||||
"go_gapic_assembly_pkg",
|
||||
"go_gapic_library",
|
||||
"go_proto_library",
|
||||
"go_test",
|
||||
)
|
||||
|
||||
go_proto_library(
|
||||
name = "channel_go_proto",
|
||||
compilers = ["@io_bazel_rules_go//proto:go_grpc"],
|
||||
importpath = "google.golang.org/genproto/googleapis/cloud/channel/v1",
|
||||
protos = [":channel_proto"],
|
||||
deps = [
|
||||
"//google/api:annotations_go_proto",
|
||||
"//google/longrunning:longrunning_go_proto",
|
||||
"//google/type:money_go_proto",
|
||||
"//google/type:postaladdress_go_proto",
|
||||
],
|
||||
)
|
||||
|
||||
go_gapic_library(
|
||||
name = "channel_go_gapic",
|
||||
srcs = [":channel_proto_with_info"],
|
||||
grpc_service_config = "cloudchannel_grpc_service_config.json",
|
||||
importpath = "cloud.google.com/go/channel/apiv1;channel",
|
||||
service_yaml = "cloudchannel_v1.yaml",
|
||||
deps = [
|
||||
":channel_go_proto",
|
||||
"//google/longrunning:longrunning_go_proto",
|
||||
"@com_google_cloud_go//longrunning/autogen:go_default_library",
|
||||
"@com_google_cloud_go//longrunning:go_default_library",
|
||||
"@io_bazel_rules_go//proto/wkt:any_go_proto",
|
||||
],
|
||||
)
|
||||
|
||||
go_test(
|
||||
name = "channel_go_gapic_test",
|
||||
srcs = [":channel_go_gapic_srcjar_test"],
|
||||
embed = [":channel_go_gapic"],
|
||||
importpath = "cloud.google.com/go/channel/apiv1",
|
||||
)
|
||||
|
||||
# Open Source Packages
|
||||
go_gapic_assembly_pkg(
|
||||
name = "gapi-cloud-channel-v1-go",
|
||||
deps = [
|
||||
":channel_go_gapic",
|
||||
":channel_go_gapic_srcjar-test.srcjar",
|
||||
":channel_go_proto",
|
||||
],
|
||||
)
|
||||
|
||||
##############################################################################
|
||||
# Python
|
||||
##############################################################################
|
||||
load(
|
||||
"@com_google_googleapis_imports//:imports.bzl",
|
||||
"moved_proto_library",
|
||||
"py_gapic_assembly_pkg",
|
||||
"py_gapic_library",
|
||||
"py_grpc_library",
|
||||
"py_proto_library",
|
||||
)
|
||||
|
||||
moved_proto_library(
|
||||
name = "channel_moved_proto",
|
||||
srcs = [":channel_proto"],
|
||||
deps = [
|
||||
"//google/api:annotations_proto",
|
||||
"//google/api:client_proto",
|
||||
"//google/api:field_behavior_proto",
|
||||
"//google/api:resource_proto",
|
||||
"//google/longrunning:operations_proto",
|
||||
"//google/type:money_proto",
|
||||
"//google/type:postal_address_proto",
|
||||
"@com_google_protobuf//:any_proto",
|
||||
"@com_google_protobuf//:empty_proto",
|
||||
"@com_google_protobuf//:field_mask_proto",
|
||||
"@com_google_protobuf//:timestamp_proto",
|
||||
"@com_google_protobuf//:wrappers_proto",
|
||||
],
|
||||
)
|
||||
|
||||
py_proto_library(
|
||||
name = "channel_py_proto",
|
||||
plugin = "@protoc_docs_plugin//:docs_plugin",
|
||||
deps = [":channel_moved_proto"],
|
||||
)
|
||||
|
||||
py_grpc_library(
|
||||
name = "channel_py_grpc",
|
||||
srcs = [":channel_moved_proto"],
|
||||
deps = [":channel_py_proto"],
|
||||
)
|
||||
|
||||
py_gapic_library(
|
||||
name = "channel_py_gapic",
|
||||
src = ":channel_proto_with_info",
|
||||
gapic_yaml = "cloudchannel_gapic.yaml",
|
||||
grpc_service_config = "cloudchannel_grpc_service_config.json",
|
||||
package = "google.cloud.channel.v1",
|
||||
service_yaml = "cloudchannel_v1.yaml",
|
||||
deps = [
|
||||
":channel_py_grpc",
|
||||
":channel_py_proto",
|
||||
],
|
||||
)
|
||||
|
||||
# Open Source Packages
|
||||
py_gapic_assembly_pkg(
|
||||
name = "channel-v1-py",
|
||||
deps = [
|
||||
":channel_py_gapic",
|
||||
":channel_py_grpc",
|
||||
":channel_py_proto",
|
||||
],
|
||||
)
|
||||
|
||||
##############################################################################
|
||||
# PHP
|
||||
##############################################################################
|
||||
load(
|
||||
"@com_google_googleapis_imports//:imports.bzl",
|
||||
"php_gapic_assembly_pkg",
|
||||
"php_gapic_library",
|
||||
"php_grpc_library",
|
||||
"php_proto_library",
|
||||
)
|
||||
|
||||
php_proto_library(
|
||||
name = "channel_php_proto",
|
||||
deps = [":channel_proto"],
|
||||
)
|
||||
|
||||
php_grpc_library(
|
||||
name = "channel_php_grpc",
|
||||
srcs = [":channel_proto"],
|
||||
deps = [":channel_php_proto"],
|
||||
)
|
||||
|
||||
php_gapic_library(
|
||||
name = "channel_php_gapic",
|
||||
src = ":channel_proto_with_info",
|
||||
gapic_yaml = "cloudchannel_gapic.yaml",
|
||||
grpc_service_config = "cloudchannel_grpc_service_config.json",
|
||||
package = "google.cloud.channel.v1",
|
||||
service_yaml = "cloudchannel_v1.yaml",
|
||||
deps = [
|
||||
":channel_php_grpc",
|
||||
":channel_php_proto",
|
||||
],
|
||||
)
|
||||
|
||||
# Open Source Packages
|
||||
php_gapic_assembly_pkg(
|
||||
name = "google-cloud-channel-v1-php",
|
||||
deps = [
|
||||
":channel_php_gapic",
|
||||
":channel_php_grpc",
|
||||
":channel_php_proto",
|
||||
],
|
||||
)
|
||||
|
||||
##############################################################################
|
||||
# Node.js
|
||||
##############################################################################
|
||||
load(
|
||||
"@com_google_googleapis_imports//:imports.bzl",
|
||||
"nodejs_gapic_assembly_pkg",
|
||||
"nodejs_gapic_library",
|
||||
)
|
||||
|
||||
nodejs_gapic_library(
|
||||
name = "channel_nodejs_gapic",
|
||||
src = ":channel_proto_with_info",
|
||||
grpc_service_config = "cloudchannel_grpc_service_config.json",
|
||||
package = "google.cloud.channel.v1",
|
||||
service_yaml = "cloudchannel_v1.yaml",
|
||||
deps = [],
|
||||
)
|
||||
|
||||
nodejs_gapic_assembly_pkg(
|
||||
name = "channel-v1-nodejs",
|
||||
deps = [
|
||||
":channel_nodejs_gapic",
|
||||
":channel_proto",
|
||||
],
|
||||
)
|
||||
|
||||
##############################################################################
|
||||
# Ruby
|
||||
##############################################################################
|
||||
load(
|
||||
"@com_google_googleapis_imports//:imports.bzl",
|
||||
"ruby_gapic_assembly_pkg",
|
||||
"ruby_gapic_library",
|
||||
"ruby_grpc_library",
|
||||
"ruby_proto_library",
|
||||
)
|
||||
|
||||
ruby_proto_library(
|
||||
name = "channel_ruby_proto",
|
||||
deps = [":channel_proto"],
|
||||
)
|
||||
|
||||
ruby_grpc_library(
|
||||
name = "channel_ruby_grpc",
|
||||
srcs = [":channel_proto"],
|
||||
deps = [":channel_ruby_proto"],
|
||||
)
|
||||
|
||||
ruby_gapic_library(
|
||||
name = "channel_ruby_gapic",
|
||||
src = ":channel_proto_with_info",
|
||||
gapic_yaml = "cloudchannel_gapic.yaml",
|
||||
grpc_service_config = "cloudchannel_grpc_service_config.json",
|
||||
package = "google.cloud.channel.v1",
|
||||
service_yaml = "cloudchannel_v1.yaml",
|
||||
deps = [
|
||||
":channel_ruby_grpc",
|
||||
":channel_ruby_proto",
|
||||
],
|
||||
)
|
||||
|
||||
# Open Source Packages
|
||||
ruby_gapic_assembly_pkg(
|
||||
name = "google-cloud-channel-v1-ruby",
|
||||
deps = [
|
||||
":channel_ruby_gapic",
|
||||
":channel_ruby_grpc",
|
||||
":channel_ruby_proto",
|
||||
],
|
||||
)
|
||||
|
||||
##############################################################################
|
||||
# C#
|
||||
##############################################################################
|
||||
load(
|
||||
"@com_google_googleapis_imports//:imports.bzl",
|
||||
"csharp_gapic_assembly_pkg",
|
||||
"csharp_gapic_library",
|
||||
"csharp_grpc_library",
|
||||
"csharp_proto_library",
|
||||
)
|
||||
|
||||
csharp_proto_library(
|
||||
name = "channel_csharp_proto",
|
||||
deps = [":channel_proto"],
|
||||
)
|
||||
|
||||
csharp_grpc_library(
|
||||
name = "channel_csharp_grpc",
|
||||
srcs = [":channel_proto"],
|
||||
deps = [":channel_csharp_proto"],
|
||||
)
|
||||
|
||||
csharp_gapic_library(
|
||||
name = "channel_csharp_gapic",
|
||||
srcs = [":channel_proto_with_info"],
|
||||
grpc_service_config = "cloudchannel_grpc_service_config.json",
|
||||
common_resources_config = "@gax_dotnet//:Google.Api.Gax/ResourceNames/CommonResourcesConfig.json",
|
||||
deps = [
|
||||
":channel_csharp_grpc",
|
||||
":channel_csharp_proto",
|
||||
],
|
||||
)
|
||||
|
||||
# Open Source Packages
|
||||
csharp_gapic_assembly_pkg(
|
||||
name = "google-cloud-channel-v1-csharp",
|
||||
deps = [
|
||||
":channel_csharp_gapic",
|
||||
":channel_csharp_grpc",
|
||||
":channel_csharp_proto",
|
||||
],
|
||||
)
|
||||
|
||||
##############################################################################
|
||||
# C++
|
||||
##############################################################################
|
||||
# Put your C++ rules here
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
// Copyright 2020 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/cloud/channel/v1/common.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "google/api/annotations.proto";
|
||||
|
||||
option go_package = "google.golang.org/genproto/googleapis/cloud/channel/v1;channel";
|
||||
option java_multiple_files = true;
|
||||
option java_outer_classname = "ChannelPartnerLinksProto";
|
||||
option java_package = "com.google.cloud.channel.v1";
|
||||
|
||||
// Entity representing a link between distributors and their indirect
|
||||
// resellers in an n-tier resale channel.
|
||||
message ChannelPartnerLink {
|
||||
// Output only. Resource name for the channel partner link, in the format
|
||||
// accounts/{account_id}/channelPartnerLinks/{id}.
|
||||
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
|
||||
|
||||
// Required. Cloud Identity ID of the linked reseller.
|
||||
string reseller_cloud_identity_id = 2 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// Required. State of the channel partner link.
|
||||
ChannelPartnerLinkState link_state = 3 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// Output only. URI of the web page where partner accepts the link invitation.
|
||||
string invite_link_uri = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
|
||||
|
||||
// Output only. Timestamp of when the channel partner link is created.
|
||||
google.protobuf.Timestamp create_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
|
||||
|
||||
// Output only. Timestamp of when the channel partner link is updated.
|
||||
google.protobuf.Timestamp update_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
|
||||
|
||||
// Output only. Public identifier that a customer must use to generate a transfer token
|
||||
// to move to this distributor-reseller combination.
|
||||
string public_id = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
type: com.google.api.codegen.ConfigProto
|
||||
config_schema_version: 2.0.0
|
||||
language_settings:
|
||||
java:
|
||||
package_name: com.google.cloud.channel.v1
|
||||
python:
|
||||
package_name: google.cloud.channel_v1.gapic
|
||||
go:
|
||||
package_name: cloud.google.com/go/channel/apiv1
|
||||
csharp:
|
||||
package_name: Google.Cloud.Channel.V1
|
||||
ruby:
|
||||
package_name: Google::Cloud::Channel::V1
|
||||
php:
|
||||
package_name: Google\Cloud\Channel\V1
|
||||
nodejs:
|
||||
package_name: channel.v1
|
||||
domain_layer_location: google-cloud
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
"methodConfig": [{
|
||||
"name": [{ "service": "google.cloud.channel.v1.CloudChannelService" }],
|
||||
"timeout": "60s",
|
||||
"retryPolicy": {
|
||||
"maxAttempts": 5,
|
||||
"initialBackoff": "1s",
|
||||
"maxBackoff": "10s",
|
||||
"backoffMultiplier": 1.3,
|
||||
"retryableStatusCodes": ["UNAVAILABLE"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": [
|
||||
{ "service": "google.cloud.channel.v1.CloudChannelService", "method": "ProvisionCloudIdentity" },
|
||||
{ "service": "google.cloud.channel.v1.CloudChannelService", "method": "CreateEntitlement" },
|
||||
{ "service": "google.cloud.channel.v1.CloudChannelService", "method": "ChangeParameters" },
|
||||
{ "service": "google.cloud.channel.v1.CloudChannelService", "method": "ChangeRenewalSettings" },
|
||||
{ "service": "google.cloud.channel.v1.CloudChannelService", "method": "ChangeOffer" },
|
||||
{ "service": "google.cloud.channel.v1.CloudChannelService", "method": "StartPaidService" },
|
||||
{ "service": "google.cloud.channel.v1.CloudChannelService", "method": "SuspendEntitlement" },
|
||||
{ "service": "google.cloud.channel.v1.CloudChannelService", "method": "CancelEntitlement" },
|
||||
{ "service": "google.cloud.channel.v1.CloudChannelService", "method": "ActivateEntitlement" },
|
||||
{ "service": "google.cloud.channel.v1.CloudChannelService", "method": "TransferEntitlements" },
|
||||
{ "service": "google.cloud.channel.v1.CloudChannelService", "method": "TransferEntitlementsToGoogle" }
|
||||
],
|
||||
"timeout": "60s"
|
||||
}]
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
type: google.api.Service
|
||||
config_version: 3
|
||||
name: cloudchannel.googleapis.com
|
||||
title: Cloud Channel API
|
||||
|
||||
apis:
|
||||
- name: google.cloud.channel.v1.CloudChannelService
|
||||
|
||||
types:
|
||||
- name: google.cloud.channel.v1.OperationMetadata
|
||||
- name: google.cloud.channel.v1.TransferEntitlementsResponse
|
||||
|
||||
http:
|
||||
rules:
|
||||
- selector: google.longrunning.Operations.CancelOperation
|
||||
post: '/v1/{name=operations/**}:cancel'
|
||||
body: '*'
|
||||
- selector: google.longrunning.Operations.DeleteOperation
|
||||
delete: '/v1/{name=operations/**}'
|
||||
- selector: google.longrunning.Operations.GetOperation
|
||||
get: '/v1/{name=operations/**}'
|
||||
- selector: google.longrunning.Operations.ListOperations
|
||||
get: '/v1/{name=operations}'
|
||||
|
||||
authentication:
|
||||
rules:
|
||||
- selector: 'google.cloud.channel.v1.CloudChannelService.*'
|
||||
oauth:
|
||||
canonical_scopes: |-
|
||||
https://www.googleapis.com/auth/apps.order
|
||||
- selector: 'google.longrunning.Operations.*'
|
||||
oauth:
|
||||
canonical_scopes: |-
|
||||
https://www.googleapis.com/auth/apps.order
|
||||
|
|
@ -0,0 +1,131 @@
|
|||
// Copyright 2020 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/protobuf/any.proto";
|
||||
import "google/api/annotations.proto";
|
||||
|
||||
option go_package = "google.golang.org/genproto/googleapis/cloud/channel/v1;channel";
|
||||
option java_multiple_files = true;
|
||||
option java_outer_classname = "CommonProto";
|
||||
option java_package = "com.google.cloud.channel.v1";
|
||||
|
||||
// Required Edu Attributes
|
||||
message EduData {
|
||||
// Enum to specify the institute type.
|
||||
enum InstituteType {
|
||||
// Default value. This state is never returned unless an error occurs.
|
||||
INSTITUTE_TYPE_UNSPECIFIED = 0;
|
||||
|
||||
// Elementary/ Secondary Schools & Districts
|
||||
K12 = 1;
|
||||
|
||||
// Higher Education Universities & Colleges
|
||||
UNIVERSITY = 2;
|
||||
}
|
||||
|
||||
// Number of students/staff the institute has.
|
||||
enum InstituteSize {
|
||||
// Default value. This state is never returned unless an error occurs.
|
||||
INSTITUTE_SIZE_UNSPECIFIED = 0;
|
||||
|
||||
// 1 - 100
|
||||
SIZE_1_100 = 1;
|
||||
|
||||
// 101 - 500
|
||||
SIZE_101_500 = 2;
|
||||
|
||||
// 501 - 1,000
|
||||
SIZE_501_1000 = 3;
|
||||
|
||||
// 1,001 - 2,000
|
||||
SIZE_1001_2000 = 4;
|
||||
|
||||
// 2,001 - 5,000
|
||||
SIZE_2001_5000 = 5;
|
||||
|
||||
// 5,001 - 10,000
|
||||
SIZE_5001_10000 = 6;
|
||||
|
||||
// 10,001 +
|
||||
SIZE_10001_OR_MORE = 7;
|
||||
}
|
||||
|
||||
// Designated institute type of customer.
|
||||
InstituteType institute_type = 1;
|
||||
|
||||
// Size of the institute.
|
||||
InstituteSize institute_size = 2;
|
||||
|
||||
// Web address for the edu customer's institution.
|
||||
string website = 3;
|
||||
}
|
||||
|
||||
// Cloud Identity information for the Cloud Channel Customer.
|
||||
message CloudIdentityInfo {
|
||||
// CustomerType of the customer
|
||||
enum CustomerType {
|
||||
// Default value. This state is never returned unless an error occurs.
|
||||
CUSTOMER_TYPE_UNSPECIFIED = 0;
|
||||
|
||||
// Domain-owning customer which needs domain verification to use services.
|
||||
DOMAIN = 1;
|
||||
|
||||
// Team customer which needs email verification to use services.
|
||||
TEAM = 2;
|
||||
}
|
||||
|
||||
// CustomerType indicates verification type needed for using services.
|
||||
CustomerType customer_type = 1;
|
||||
|
||||
// Output only. The primary domain name.
|
||||
string primary_domain = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
|
||||
|
||||
// The alternate email.
|
||||
string alternate_email = 6;
|
||||
|
||||
// Phone number associated with the Cloud Identity.
|
||||
string phone_number = 7;
|
||||
|
||||
// Language code.
|
||||
string language_code = 8;
|
||||
|
||||
// Output only. URI of Customer's Admin console dashboard.
|
||||
string admin_console_uri = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
|
||||
|
||||
// Edu information about the customer.
|
||||
EduData edu_data = 22;
|
||||
}
|
||||
|
||||
// Data type and value of a parameter.
|
||||
message Value {
|
||||
// The kind of value.
|
||||
oneof kind {
|
||||
// Represents an int64 value.
|
||||
int64 int64_value = 1;
|
||||
|
||||
// Represents a string value.
|
||||
string string_value = 2;
|
||||
|
||||
// Represents a double value.
|
||||
double double_value = 3;
|
||||
|
||||
// Represents an 'Any' proto value.
|
||||
google.protobuf.Any proto_value = 4;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,113 @@
|
|||
// Copyright 2020 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/cloud/channel/v1/common.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "google/type/postal_address.proto";
|
||||
import "google/api/annotations.proto";
|
||||
|
||||
option go_package = "google.golang.org/genproto/googleapis/cloud/channel/v1;channel";
|
||||
option java_multiple_files = true;
|
||||
option java_outer_classname = "CustomersProto";
|
||||
option java_package = "com.google.cloud.channel.v1";
|
||||
|
||||
// Entity representing a customer of a reseller or distributor.
|
||||
message Customer {
|
||||
option (google.api.resource) = {
|
||||
type: "cloudchannel.googleapis.com/Customer"
|
||||
pattern: "accounts/{account}/customers/{customer}"
|
||||
};
|
||||
|
||||
// Output only. Resource name of the customer.
|
||||
// Format: accounts/{account_id}/customers/{customer_id}
|
||||
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
|
||||
|
||||
// Required. Name of the organization that the customer entity represents.
|
||||
string org_display_name = 2 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// Required. Address of the organization of the customer entity.
|
||||
// Region and zip codes are required to enforce US laws and embargoes.
|
||||
// Language code is discarded. Use the Customer-level language code to set the
|
||||
// customer's language.
|
||||
google.type.PostalAddress org_postal_address = 3 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// Primary contact info.
|
||||
ContactInfo primary_contact_info = 4;
|
||||
|
||||
// Secondary contact email.
|
||||
// Alternate email and primary contact email are required to have different
|
||||
// domains if primary contact email is present.
|
||||
// When creating admin.google.com accounts, users get notified credentials at
|
||||
// this email. This email address is also used as a recovery email.
|
||||
string alternate_email = 5;
|
||||
|
||||
// Required. Primary domain used by the customer.
|
||||
// Domain of primary contact email is required to be same as the provided
|
||||
// domain.
|
||||
string domain = 6 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// Output only. The time at which the customer is created.
|
||||
google.protobuf.Timestamp create_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
|
||||
|
||||
// Output only. The time at which the customer is updated.
|
||||
google.protobuf.Timestamp update_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
|
||||
|
||||
// Output only. Customer's cloud_identity_id.
|
||||
// Populated only if a Cloud Identity resource exists for this customer.
|
||||
string cloud_identity_id = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
|
||||
|
||||
// Optional. The BCP-47 language code, such as "en-US" or "sr-Latn". For more
|
||||
// information, see
|
||||
// https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
|
||||
string language_code = 10 [(google.api.field_behavior) = OPTIONAL];
|
||||
|
||||
// Output only. Cloud Identity information for the customer.
|
||||
// Populated only if a Cloud Identity account exists for this customer.
|
||||
CloudIdentityInfo cloud_identity_info = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
|
||||
|
||||
// Cloud Identity ID of the customer's channel partner.
|
||||
// Populated only if a channel partner exists for this customer.
|
||||
string channel_partner_id = 13;
|
||||
}
|
||||
|
||||
// Contact information for a customer account.
|
||||
message ContactInfo {
|
||||
// First name of the contact in the customer account.
|
||||
string first_name = 1;
|
||||
|
||||
// Last name of the contact in the customer account.
|
||||
string last_name = 2;
|
||||
|
||||
// Output only. Display name of the contact in the customer account.
|
||||
// Populated by combining customer first name and last name.
|
||||
string display_name = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
|
||||
|
||||
// Email of the contact in the customer account.
|
||||
// Email is required for entitlements that need creation of admin.google.com
|
||||
// accounts. The email will be the username used in credentials to access the
|
||||
// admin.google.com account.
|
||||
string email = 5;
|
||||
|
||||
// Optional. Job title of the contact in the customer account.
|
||||
string title = 6 [(google.api.field_behavior) = OPTIONAL];
|
||||
|
||||
// Phone number of the contact in the customer account.
|
||||
string phone = 7;
|
||||
}
|
||||
|
|
@ -0,0 +1,247 @@
|
|||
// Copyright 2020 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/cloud/channel/v1/common.proto";
|
||||
import "google/cloud/channel/v1/offers.proto";
|
||||
import "google/cloud/channel/v1/products.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "google/protobuf/wrappers.proto";
|
||||
import "google/api/annotations.proto";
|
||||
|
||||
option go_package = "google.golang.org/genproto/googleapis/cloud/channel/v1;channel";
|
||||
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.
|
||||
message Entitlement {
|
||||
option (google.api.resource) = {
|
||||
type: "cloudchannel.googleapis.com/Entitlement"
|
||||
pattern: "accounts/{account}/customers/{customer}/entitlements/{entitlement}"
|
||||
};
|
||||
|
||||
// Indicates the current provisioning state of the entitlement.
|
||||
enum ProvisioningState {
|
||||
// Default value. This state is never returned unless an error occurs.
|
||||
PROVISIONING_STATE_UNSPECIFIED = 0;
|
||||
|
||||
// The entitlement is currently active.
|
||||
ACTIVE = 1;
|
||||
|
||||
// The entitlement is currently suspended.
|
||||
SUSPENDED = 5;
|
||||
}
|
||||
|
||||
// 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.
|
||||
SUSPENSION_REASON_UNSPECIFIED = 0;
|
||||
|
||||
// Entitlement was manually suspended by the Reseller.
|
||||
RESELLER_INITIATED = 1;
|
||||
|
||||
// Trial ended.
|
||||
TRIAL_ENDED = 2;
|
||||
|
||||
// Entitlement renewal was canceled.
|
||||
RENEWAL_WITH_TYPE_CANCEL = 3;
|
||||
|
||||
// Entitlement was automatically suspended on creation for pending ToS
|
||||
// acceptance on customer.
|
||||
PENDING_TOS_ACCEPTANCE = 4;
|
||||
|
||||
// Other reasons (internal reasons, abuse, etc.).
|
||||
OTHER = 100;
|
||||
}
|
||||
|
||||
// Output only. Resource name of an entitlement in the form:
|
||||
//
|
||||
// accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}.
|
||||
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
|
||||
|
||||
// Output only. The time at which the entitlement is created.
|
||||
google.protobuf.Timestamp create_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
|
||||
|
||||
// Output only. The time at which the entitlement is updated.
|
||||
google.protobuf.Timestamp update_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
|
||||
|
||||
// Required. The offer resource name for which the entitlement is to be
|
||||
// created. Takes the form: accounts/{account_id}/offers/{offer_id}.
|
||||
string offer = 8 [
|
||||
(google.api.field_behavior) = REQUIRED,
|
||||
(google.api.resource_reference) = {
|
||||
type: "cloudchannel.googleapis.com/Offer"
|
||||
}
|
||||
];
|
||||
|
||||
// Commitment settings for a commitment-based Offer.
|
||||
// Required for commitment based offers.
|
||||
CommitmentSettings commitment_settings = 12;
|
||||
|
||||
// Output only. Current provisioning state of the entitlement.
|
||||
ProvisioningState provisioning_state = 13 [(google.api.field_behavior) = OUTPUT_ONLY];
|
||||
|
||||
// Output only. Service provisioning details for the entitlement.
|
||||
ProvisionedService provisioned_service = 16 [(google.api.field_behavior) = OUTPUT_ONLY];
|
||||
|
||||
// Output only. Enumerable of all current suspension reasons for an entitlement.
|
||||
repeated SuspensionReason suspension_reasons = 18 [(google.api.field_behavior) = OUTPUT_ONLY];
|
||||
|
||||
// Optional. This purchase order (PO) information is for resellers to use for their
|
||||
// company tracking usage. If a purchaseOrderId value is given, it appears in
|
||||
// the API responses and shows up in the invoice. The property accepts up to
|
||||
// 80 plain text characters.
|
||||
string purchase_order_id = 19 [(google.api.field_behavior) = OPTIONAL];
|
||||
|
||||
// Output only. Settings for trial offers.
|
||||
TrialSettings trial_settings = 21 [(google.api.field_behavior) = OUTPUT_ONLY];
|
||||
|
||||
// Association information to other entitlements.
|
||||
AssociationInfo association_info = 23;
|
||||
|
||||
// Extended entitlement parameters. When creating an entitlement, valid
|
||||
// parameters' names and values are defined in the offer's parameter
|
||||
// definitions.
|
||||
repeated Parameter parameters = 26;
|
||||
}
|
||||
|
||||
// Definition for extended entitlement parameters.
|
||||
message Parameter {
|
||||
// Name of the parameter.
|
||||
string name = 1;
|
||||
|
||||
// Value of the parameter.
|
||||
Value value = 2;
|
||||
|
||||
// Output only. Specifies whether this parameter is allowed to be changed. For example, for
|
||||
// a Google Workspace Business Starter entitlement in commitment plan,
|
||||
// num_units is editable when entitlement is active.
|
||||
bool editable = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
|
||||
}
|
||||
|
||||
// Association links that an entitlement has to other entitlements.
|
||||
message AssociationInfo {
|
||||
// The name of the base entitlement, for which this entitlement is an add-on.
|
||||
string base_entitlement = 1 [(google.api.resource_reference) = {
|
||||
type: "cloudchannel.googleapis.com/Entitlement"
|
||||
}];
|
||||
}
|
||||
|
||||
// Service provisioned for an entitlement.
|
||||
message ProvisionedService {
|
||||
// Output only. Provisioning ID of the entitlement. For Google Workspace, this would be the
|
||||
// underlying Subscription ID.
|
||||
string provisioning_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
|
||||
|
||||
// Output only. The product pertaining to the provisioning resource as specified in the
|
||||
// Offer.
|
||||
string product_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
|
||||
|
||||
// Output only. The SKU pertaining to the provisioning resource as specified in the Offer.
|
||||
string sku_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
|
||||
}
|
||||
|
||||
// Commitment settings for commitment-based offers.
|
||||
message CommitmentSettings {
|
||||
// Output only. Commitment start timestamp.
|
||||
google.protobuf.Timestamp start_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
|
||||
|
||||
// Output only. Commitment end timestamp.
|
||||
google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
|
||||
|
||||
// Optional. Renewal settings applicable for a commitment-based Offer.
|
||||
RenewalSettings renewal_settings = 4 [(google.api.field_behavior) = OPTIONAL];
|
||||
}
|
||||
|
||||
// Renewal settings for renewable Offers.
|
||||
message RenewalSettings {
|
||||
// If false, the plan will be completed at the end date.
|
||||
bool enable_renewal = 1;
|
||||
|
||||
// If true and enable_renewal = true, the unit (for example seats or licenses)
|
||||
// will be set to the number of active units at renewal time.
|
||||
bool resize_unit_count = 2;
|
||||
|
||||
// Describes how a reseller will be billed.
|
||||
PaymentPlan payment_plan = 5;
|
||||
|
||||
// Describes how frequently the reseller will be billed, such as
|
||||
// once per month.
|
||||
Period payment_cycle = 6;
|
||||
}
|
||||
|
||||
// Settings for trial offers.
|
||||
message TrialSettings {
|
||||
// Determines if the entitlement is in a trial or not:
|
||||
//
|
||||
// * `true` - The entitlement is in trial.
|
||||
// * `false` - The entitlement is not in trial.
|
||||
bool trial = 1;
|
||||
|
||||
// Date when the trial ends. The value is in milliseconds
|
||||
// using the UNIX Epoch format. See an example [Epoch
|
||||
// converter](https://www.epochconverter.com).
|
||||
google.protobuf.Timestamp end_time = 2;
|
||||
}
|
||||
|
||||
// TransferableSku represents information a reseller needs to view existing
|
||||
// provisioned services for a customer that they do not own.
|
||||
// Read-only.
|
||||
message TransferableSku {
|
||||
// Whether a transferable SKU is commitment-based or not.
|
||||
google.protobuf.BoolValue is_commitment = 6;
|
||||
|
||||
// Commitment end timestamp.
|
||||
google.protobuf.Timestamp commitment_end_timestamp = 7;
|
||||
|
||||
// Describes the transfer eligibility of a SKU.
|
||||
TransferEligibility transfer_eligibility = 9;
|
||||
|
||||
// The SKU pertaining to the provisioning resource as specified in the Offer.
|
||||
Sku sku = 11;
|
||||
}
|
||||
|
||||
// Specifies transfer eligibility of a SKU.
|
||||
message TransferEligibility {
|
||||
// Reason of ineligibility.
|
||||
enum Reason {
|
||||
// Reason is not available.
|
||||
REASON_UNSPECIFIED = 0;
|
||||
|
||||
// Reseller needs to accept TOS before transferring the SKU.
|
||||
PENDING_TOS_ACCEPTANCE = 1;
|
||||
|
||||
// Reseller not eligible to sell the SKU.
|
||||
SKU_NOT_ELIGIBLE = 2;
|
||||
|
||||
// SKU subscription is suspended
|
||||
SKU_SUSPENDED = 3;
|
||||
}
|
||||
|
||||
// Whether reseller is eligible to transfer the SKU.
|
||||
bool is_eligible = 1;
|
||||
|
||||
// Localized description if reseller is not eligible to transfer the SKU.
|
||||
string description = 2;
|
||||
|
||||
// Specified the reason for ineligibility.
|
||||
Reason ineligibility_reason = 3;
|
||||
}
|
||||
|
|
@ -0,0 +1,325 @@
|
|||
// Copyright 2020 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/cloud/channel/v1/common.proto";
|
||||
import "google/cloud/channel/v1/products.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "google/type/money.proto";
|
||||
import "google/api/annotations.proto";
|
||||
|
||||
option go_package = "google.golang.org/genproto/googleapis/cloud/channel/v1;channel";
|
||||
option java_multiple_files = true;
|
||||
option java_outer_classname = "OffersProto";
|
||||
option java_package = "com.google.cloud.channel.v1";
|
||||
|
||||
// Constraints type for Promotional offers.
|
||||
enum PromotionalOrderType {
|
||||
// Not used.
|
||||
PROMOTIONAL_TYPE_UNSPECIFIED = 0;
|
||||
|
||||
// Order used for net new customers, trial conversions and upgrades.
|
||||
NEW_UPGRADE = 1;
|
||||
|
||||
// All orders for an existing customer transferring to the reseller.
|
||||
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.
|
||||
PROMOTION_SWITCH = 3;
|
||||
}
|
||||
|
||||
// Describes how the reseller will be billed.
|
||||
enum PaymentPlan {
|
||||
// Not used.
|
||||
PAYMENT_PLAN_UNSPECIFIED = 0;
|
||||
|
||||
// Commitment.
|
||||
COMMITMENT = 1;
|
||||
|
||||
// No commitment.
|
||||
FLEXIBLE = 2;
|
||||
|
||||
// Free.
|
||||
FREE = 3;
|
||||
|
||||
// Trial.
|
||||
TRIAL = 4;
|
||||
|
||||
// Price and ordering not available through API.
|
||||
OFFLINE = 5;
|
||||
}
|
||||
|
||||
// Specifies when the payment needs to happen.
|
||||
enum PaymentType {
|
||||
// Not used.
|
||||
PAYMENT_TYPE_UNSPECIFIED = 0;
|
||||
|
||||
// Prepay. Amount has to be paid before service is rendered.
|
||||
PREPAY = 1;
|
||||
|
||||
// Postpay. Reseller is charged at the end of the Payment cycle.
|
||||
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.
|
||||
enum ResourceType {
|
||||
// Not used.
|
||||
RESOURCE_TYPE_UNSPECIFIED = 0;
|
||||
|
||||
// Seat.
|
||||
SEAT = 1;
|
||||
|
||||
// Monthly active user.
|
||||
MAU = 2;
|
||||
|
||||
// GB (used for storage SKUs).
|
||||
GB = 3;
|
||||
|
||||
// Active licensed users(for Voice SKUs).
|
||||
LICENSED_USER = 4;
|
||||
|
||||
// Voice usage.
|
||||
MINUTES = 5;
|
||||
|
||||
// For IaaS SKUs like Google Cloud Platform, monetization is based on usage
|
||||
// accrued on your billing account irrespective of the type of monetizable
|
||||
// resource. This enum represents an aggregated resource/container for all
|
||||
// usage SKUs on a billing account. Currently, only applicable to Google Cloud
|
||||
// Platform.
|
||||
IAAS_USAGE = 6;
|
||||
|
||||
// For Google Cloud Platform subscriptions like Anthos or SAP.
|
||||
SUBSCRIPTION = 7;
|
||||
}
|
||||
|
||||
// Period Type.
|
||||
enum PeriodType {
|
||||
// Not used.
|
||||
PERIOD_TYPE_UNSPECIFIED = 0;
|
||||
|
||||
// Day.
|
||||
DAY = 1;
|
||||
|
||||
// Month.
|
||||
MONTH = 2;
|
||||
|
||||
// Year.
|
||||
YEAR = 3;
|
||||
}
|
||||
|
||||
// Represents an offer made to resellers for purchase.
|
||||
// An offer is associated with a [Sku][google.cloud.channel.v1.Sku], has a plan for payment, a price, and
|
||||
// defines the constraints for buying.
|
||||
message Offer {
|
||||
option (google.api.resource) = {
|
||||
type: "cloudchannel.googleapis.com/Offer"
|
||||
pattern: "accounts/{account}/offers/{offer}"
|
||||
};
|
||||
|
||||
// Resource Name of the Offer.
|
||||
// Format: accounts/{account_id}/offers/{offer_id}
|
||||
string name = 1;
|
||||
|
||||
// Marketing information for the Offer.
|
||||
MarketingInfo marketing_info = 2;
|
||||
|
||||
// SKU the offer is associated with.
|
||||
Sku sku = 3;
|
||||
|
||||
// Describes the payment plan for the Offer.
|
||||
Plan plan = 4;
|
||||
|
||||
// Constraints on transacting the Offer.
|
||||
Constraints constraints = 5;
|
||||
|
||||
// Price for each monetizable resource type.
|
||||
repeated PriceByResource price_by_resources = 6;
|
||||
|
||||
// Start of the Offer validity time.
|
||||
google.protobuf.Timestamp start_time = 7;
|
||||
|
||||
// Output only. End of the Offer validity time.
|
||||
google.protobuf.Timestamp end_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
|
||||
|
||||
// Parameters required to use current Offer to purchase.
|
||||
repeated ParameterDefinition parameter_definitions = 9;
|
||||
}
|
||||
|
||||
// Parameter's definition. Specifies what parameter is required to use the
|
||||
// current Offer to purchase.
|
||||
message ParameterDefinition {
|
||||
// Data type of the parameter.
|
||||
enum ParameterType {
|
||||
// Not used.
|
||||
PARAMETER_TYPE_UNSPECIFIED = 0;
|
||||
|
||||
// Int64 type.
|
||||
INT64 = 1;
|
||||
|
||||
// String type.
|
||||
STRING = 2;
|
||||
|
||||
// Double type.
|
||||
DOUBLE = 3;
|
||||
}
|
||||
|
||||
// Name of the parameter.
|
||||
string name = 1;
|
||||
|
||||
// Data type of the parameter. Minimal value, Maximum value and allowed values
|
||||
// will use specified data type here.
|
||||
ParameterType parameter_type = 2;
|
||||
|
||||
// Minimal value of the parameter, if applicable. Inclusive. For example,
|
||||
// minimal commitment when purchasing Anthos is 0.01.
|
||||
// Applicable to INT64 and DOUBLE parameter types.
|
||||
Value min_value = 3;
|
||||
|
||||
// Maximum value of the parameter, if applicable. Inclusive. For example,
|
||||
// maximum seats when purchasing Google Workspace Business Standard.
|
||||
// Applicable to INT64 and DOUBLE parameter types.
|
||||
Value max_value = 4;
|
||||
|
||||
// If not empty, parameter values must be drawn from this list.
|
||||
// For example, [us-west1, us-west2, ...]
|
||||
// Applicable to STRING parameter type.
|
||||
repeated Value allowed_values = 5;
|
||||
|
||||
// If set to true, parameter is optional to purchase this Offer.
|
||||
bool optional = 6;
|
||||
}
|
||||
|
||||
// Represents the constraints for buying the Offer.
|
||||
message Constraints {
|
||||
// Represents constraints on a customer required for purchasing this Offer
|
||||
// for that customer.
|
||||
CustomerConstraints customer_constraints = 1;
|
||||
}
|
||||
|
||||
// Represents constraints on a customer required for purchasing this Offer for
|
||||
// that customer.
|
||||
message CustomerConstraints {
|
||||
// Allowed geographical regions of the customer.
|
||||
repeated string allowed_regions = 1;
|
||||
|
||||
// Allowed Customer Type.
|
||||
repeated CloudIdentityInfo.CustomerType allowed_customer_types = 2;
|
||||
|
||||
// Allowed Promotional Order Type. Present for Promotional offers.
|
||||
repeated PromotionalOrderType promotional_order_types = 3;
|
||||
}
|
||||
|
||||
// The payment plan for the Offer, describing how a payment is made.
|
||||
message Plan {
|
||||
// Describes how a reseller will be billed.
|
||||
PaymentPlan payment_plan = 1;
|
||||
|
||||
// Specifies when the payment needs to happen.
|
||||
PaymentType payment_type = 2;
|
||||
|
||||
// Describes how frequently the reseller will be billed, such as
|
||||
// once per month.
|
||||
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
|
||||
// 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.
|
||||
Period trial_period = 4;
|
||||
}
|
||||
|
||||
// Represents price by resource type.
|
||||
message PriceByResource {
|
||||
// Resource Type. Example: SEAT
|
||||
ResourceType resource_type = 1;
|
||||
|
||||
// Price of the Offer. Present if there are no price phases.
|
||||
Price price = 2;
|
||||
|
||||
// Specifies the price by time range.
|
||||
repeated PricePhase price_phases = 3;
|
||||
}
|
||||
|
||||
// Represents the price of the Offer.
|
||||
message Price {
|
||||
// Base price.
|
||||
google.type.Money base_price = 1;
|
||||
|
||||
// Discount percentage, represented as decimal.
|
||||
// For example, a 20% discount will be represent as 0.2.
|
||||
double discount = 2;
|
||||
|
||||
// Effective Price after applying the discounts.
|
||||
google.type.Money effective_price = 3;
|
||||
|
||||
// Link to external price list, such as link to Google Voice rate card.
|
||||
string external_price_uri = 4;
|
||||
}
|
||||
|
||||
// Specifies the price by the duration of months.
|
||||
// For example, for the first 6 months, 20% discount. From the seventh month,
|
||||
// 10% discount.
|
||||
message PricePhase {
|
||||
// Defines the phase period type.
|
||||
PeriodType period_type = 1;
|
||||
|
||||
// Defines first period for the phase.
|
||||
int32 first_period = 2;
|
||||
|
||||
// Defines first period for the phase.
|
||||
int32 last_period = 3;
|
||||
|
||||
// Price of the phase. Present if there are no price tiers.
|
||||
Price price = 4;
|
||||
|
||||
// Price by the resource tiers.
|
||||
repeated PriceTier price_tiers = 5;
|
||||
}
|
||||
|
||||
// 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.
|
||||
// Each of these tiers is represented as a PriceTier.
|
||||
message PriceTier {
|
||||
// First resource for which the tier price applies.
|
||||
int32 first_resource = 1;
|
||||
|
||||
// Last resource for which the tier price applies.
|
||||
int32 last_resource = 2;
|
||||
|
||||
// Price of the tier.
|
||||
Price price = 3;
|
||||
}
|
||||
|
||||
// Represents period in days/months/years.
|
||||
message Period {
|
||||
// Total duration of Period Type defined.
|
||||
int32 duration = 1;
|
||||
|
||||
// Period Type.
|
||||
PeriodType period_type = 2;
|
||||
}
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
// Copyright 2020 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/annotations.proto";
|
||||
|
||||
option go_package = "google.golang.org/genproto/googleapis/cloud/channel/v1;channel";
|
||||
option java_multiple_files = true;
|
||||
option java_outer_classname = "OperationsProto";
|
||||
option java_package = "com.google.cloud.channel.v1";
|
||||
|
||||
// Provides contextual information about a [google.longrunning.Operation][google.longrunning.Operation].
|
||||
message OperationMetadata {
|
||||
// RPCs that return a Long Running Operation.
|
||||
enum OperationType {
|
||||
// Default value. This state is never returned unless an error occurs.
|
||||
OPERATION_TYPE_UNSPECIFIED = 0;
|
||||
|
||||
// Long Running Operation was triggered by CreateEntitlement.
|
||||
CREATE_ENTITLEMENT = 1;
|
||||
|
||||
// Long Running Operation was triggered by ChangeRenewalSettings.
|
||||
CHANGE_RENEWAL_SETTINGS = 3;
|
||||
|
||||
// Long Running Operation was triggered by StartPaidService.
|
||||
START_PAID_SERVICE = 5;
|
||||
|
||||
// Long Running Operation was triggered by ActivateEntitlement.
|
||||
ACTIVATE_ENTITLEMENT = 7;
|
||||
|
||||
// Long Running Operation was triggered by SuspendEntitlement.
|
||||
SUSPEND_ENTITLEMENT = 8;
|
||||
|
||||
// Long Running Operation was triggered by CancelEntitlement.
|
||||
CANCEL_ENTITLEMENT = 9;
|
||||
|
||||
// Long Running Operation was triggered by TransferEntitlements.
|
||||
TRANSFER_ENTITLEMENTS = 10;
|
||||
|
||||
// Long Running Operation was triggered by TransferEntitlementsToGoogle.
|
||||
TRANSFER_ENTITLEMENTS_TO_GOOGLE = 11;
|
||||
|
||||
// Long Running Operation was triggered by ChangeOffer.
|
||||
CHANGE_OFFER = 14;
|
||||
|
||||
// Long Running Operation was triggered by ChangeParameters.
|
||||
CHANGE_PARAMETERS = 15;
|
||||
|
||||
// Long Running Operation was triggered by ProvisionCloudIdentity.
|
||||
PROVISION_CLOUD_IDENTITY = 16;
|
||||
}
|
||||
|
||||
// The RPC that initiated this Long Running Operation.
|
||||
OperationType operation_type = 1;
|
||||
}
|
||||
|
|
@ -0,0 +1,96 @@
|
|||
// Copyright 2020 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/resource.proto";
|
||||
import "google/api/annotations.proto";
|
||||
|
||||
option go_package = "google.golang.org/genproto/googleapis/cloud/channel/v1;channel";
|
||||
option java_multiple_files = true;
|
||||
option java_outer_classname = "ProductsProto";
|
||||
option java_package = "com.google.cloud.channel.v1";
|
||||
|
||||
// Type of media used.
|
||||
enum MediaType {
|
||||
// Not used.
|
||||
MEDIA_TYPE_UNSPECIFIED = 0;
|
||||
|
||||
// Type of image.
|
||||
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.
|
||||
message Product {
|
||||
option (google.api.resource) = {
|
||||
type: "cloudchannel.googleapis.com/Product"
|
||||
pattern: "products/{product}"
|
||||
};
|
||||
|
||||
// Resource Name of the Product.
|
||||
// Format: products/{product_id}
|
||||
string name = 1;
|
||||
|
||||
// Marketing information for the product.
|
||||
MarketingInfo marketing_info = 2;
|
||||
}
|
||||
|
||||
// Represents a purchasable Stock Keeping Unit (SKU) under a product.
|
||||
// SKUs represent the different variations of the product. For example, Google
|
||||
// Workspace Business Standard, Google Workspace Business Plus are SKUs of
|
||||
// Google Workspace product.
|
||||
message Sku {
|
||||
option (google.api.resource) = {
|
||||
type: "cloudchannel.googleapis.com/Sku"
|
||||
pattern: "products/{product}/skus/{sku}"
|
||||
};
|
||||
|
||||
// Resource Name of the SKU.
|
||||
// Format: products/{product_id}/skus/{sku_id}
|
||||
string name = 1;
|
||||
|
||||
// Marketing information for the SKU.
|
||||
MarketingInfo marketing_info = 2;
|
||||
|
||||
// Product the SKU is associated with.
|
||||
Product product = 3;
|
||||
}
|
||||
|
||||
// Represents a Product/SKU/Offer’s marketing information.
|
||||
message MarketingInfo {
|
||||
// Human readable name.
|
||||
string display_name = 1;
|
||||
|
||||
// Human readable description. Description can contain HTML.
|
||||
string description = 2;
|
||||
|
||||
// Default logo.
|
||||
Media default_logo = 3;
|
||||
}
|
||||
|
||||
// Represents media information.
|
||||
message Media {
|
||||
// Title of the media.
|
||||
string title = 1;
|
||||
|
||||
// URL of the media.
|
||||
string content = 2;
|
||||
|
||||
// Type of the media.
|
||||
MediaType type = 3;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue