1// Copyright 2023 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15syntax = "proto3";
16
17package google.cloud.channel.v1;
18
19import "google/api/field_behavior.proto";
20import "google/api/resource.proto";
21import "google/cloud/channel/v1/common.proto";
22import "google/protobuf/timestamp.proto";
23
24option go_package = "cloud.google.com/go/channel/apiv1/channelpb;channelpb";
25option java_multiple_files = true;
26option java_outer_classname = "ChannelPartnerLinksProto";
27option java_package = "com.google.cloud.channel.v1";
28
29// The level of granularity the
30// [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] will
31// display.
32enum ChannelPartnerLinkView {
33  // The default / unset value.
34  // The API will default to the BASIC view.
35  UNSPECIFIED = 0;
36
37  // Includes all fields except the
38  // [ChannelPartnerLink.channel_partner_cloud_identity_info][google.cloud.channel.v1.ChannelPartnerLink.channel_partner_cloud_identity_info].
39  BASIC = 1;
40
41  // Includes all fields.
42  FULL = 2;
43}
44
45// ChannelPartnerLinkState represents state of a channel partner link.
46enum ChannelPartnerLinkState {
47  // Not used.
48  CHANNEL_PARTNER_LINK_STATE_UNSPECIFIED = 0;
49
50  // An invitation has been sent to the reseller to create a channel partner
51  // link.
52  INVITED = 1;
53
54  // Status when the reseller is active.
55  ACTIVE = 2;
56
57  // Status when the reseller has been revoked by the distributor.
58  REVOKED = 3;
59
60  // Status when the reseller is suspended by Google or distributor.
61  SUSPENDED = 4;
62}
63
64// Entity representing a link between distributors and their indirect
65// resellers in an n-tier resale channel.
66message ChannelPartnerLink {
67  option (google.api.resource) = {
68    type: "cloudchannel.googleapis.com/ChannelPartnerLink"
69    pattern: "accounts/{account}/channelPartnerLinks/{channel_partner_link}"
70  };
71
72  // Output only. Resource name for the channel partner link, in the format
73  // accounts/{account_id}/channelPartnerLinks/{id}.
74  string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
75
76  // Required. Cloud Identity ID of the linked reseller.
77  string reseller_cloud_identity_id = 2
78      [(google.api.field_behavior) = REQUIRED];
79
80  // Required. State of the channel partner link.
81  ChannelPartnerLinkState link_state = 3
82      [(google.api.field_behavior) = REQUIRED];
83
84  // Output only. URI of the web page where partner accepts the link invitation.
85  string invite_link_uri = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
86
87  // Output only. Timestamp of when the channel partner link is created.
88  google.protobuf.Timestamp create_time = 5
89      [(google.api.field_behavior) = OUTPUT_ONLY];
90
91  // Output only. Timestamp of when the channel partner link is updated.
92  google.protobuf.Timestamp update_time = 6
93      [(google.api.field_behavior) = OUTPUT_ONLY];
94
95  // Output only. Public identifier that a customer must use to generate a
96  // transfer token to move to this distributor-reseller combination.
97  string public_id = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
98
99  // Output only. Cloud Identity info of the channel partner (IR).
100  CloudIdentityInfo channel_partner_cloud_identity_info = 8
101      [(google.api.field_behavior) = OUTPUT_ONLY];
102}
103