// Copyright 2021 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";
import "google/api/client.proto";
import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/cloud/channel/v1/channel_partner_links.proto";
import "google/cloud/channel/v1/common.proto";
import "google/cloud/channel/v1/customers.proto";
import "google/cloud/channel/v1/entitlements.proto";
import "google/cloud/channel/v1/offers.proto";
import "google/cloud/channel/v1/products.proto";
import "google/longrunning/operations.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";

option go_package = "google.golang.org/genproto/googleapis/cloud/channel/v1;channel";
option java_multiple_files = true;
option java_outer_classname = "ServiceProto";
option java_package = "com.google.cloud.channel.v1";

// CloudChannelService lets Google cloud resellers and distributors manage
// their customers, channel partners, entitlements, and reports.
//
// Using this service:
// 1. Resellers and distributors can manage a customer entity.
// 2. Distributors can register an authorized reseller in their channel and
//    provide them with delegated admin access.
// 3. Resellers and distributors can manage customer entitlements.
//
// CloudChannelService exposes the following resources:
// - [Customer][google.cloud.channel.v1.Customer]s: An entity—usually an enterprise—managed by a reseller or
// distributor.
//
// - [Entitlement][google.cloud.channel.v1.Entitlement]s: An entity that provides a customer with the means to use
// a service. Entitlements are created or updated as a result of a successful
// fulfillment.
//
// - [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink]s: An entity that identifies links between
// distributors and their indirect resellers in a channel.
service CloudChannelService {
  option (google.api.default_host) = "cloudchannel.googleapis.com";
  option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/apps.order";

  // List [Customer][google.cloud.channel.v1.Customer]s.
  //
  // Possible error codes:
  //
  // * PERMISSION_DENIED: The reseller account making the request is different
  // from the reseller account in the API request.
  // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  //
  // Return value:
  // List of [Customer][google.cloud.channel.v1.Customer]s, or an empty list if there are no customers.
  rpc ListCustomers(ListCustomersRequest) returns (ListCustomersResponse) {
    option (google.api.http) = {
      get: "/v1/{parent=accounts/*}/customers"
      additional_bindings {
        get: "/v1/{parent=accounts/*/channelPartnerLinks/*}/customers"
      }
    };
  }

  // Returns the requested [Customer][google.cloud.channel.v1.Customer] resource.
  //
  // Possible error codes:
  //
  // * PERMISSION_DENIED: The reseller account making the request is different
  // from the reseller account in the API request.
  // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  // * NOT_FOUND: The customer resource doesn't exist. Usually the result of an
  // invalid name parameter.
  //
  // Return value:
  // The [Customer][google.cloud.channel.v1.Customer] resource.
  rpc GetCustomer(GetCustomerRequest) returns (Customer) {
    option (google.api.http) = {
      get: "/v1/{name=accounts/*/customers/*}"
      additional_bindings {
        get: "/v1/{name=accounts/*/channelPartnerLinks/*/customers/*}"
      }
    };
    option (google.api.method_signature) = "name";
  }

  // Confirms the existence of Cloud Identity accounts based on the domain and
  // if the Cloud Identity accounts are owned by the reseller.
  //
  // Possible error codes:
  //
  // * PERMISSION_DENIED: The reseller account making the request is different
  // from the reseller account in the API request.
  // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  // * INVALID_VALUE: Invalid domain value in the request.
  //
  // Return value:
  // A list of [CloudIdentityCustomerAccount][google.cloud.channel.v1.CloudIdentityCustomerAccount] resources for the domain (may be
  // empty)
  //
  // Note: in the v1alpha1 version of the API, a NOT_FOUND error returns if
  // no [CloudIdentityCustomerAccount][google.cloud.channel.v1.CloudIdentityCustomerAccount] resources match the domain.
  rpc CheckCloudIdentityAccountsExist(CheckCloudIdentityAccountsExistRequest) returns (CheckCloudIdentityAccountsExistResponse) {
    option (google.api.http) = {
      post: "/v1/{parent=accounts/*}:checkCloudIdentityAccountsExist"
      body: "*"
    };
  }

  // Creates a new [Customer][google.cloud.channel.v1.Customer] resource under the reseller or distributor
  // account.
  //
  // Possible error codes:
  //
  // * PERMISSION_DENIED: The reseller account making the request is different
  // from the reseller account in the API request.
  // * INVALID_ARGUMENT:
  //     * Required request parameters are missing or invalid.
  //     * Domain field value doesn't match the primary email domain.
  //
  // Return value:
  // The newly created [Customer][google.cloud.channel.v1.Customer] resource.
  rpc CreateCustomer(CreateCustomerRequest) returns (Customer) {
    option (google.api.http) = {
      post: "/v1/{parent=accounts/*}/customers"
      body: "customer"
      additional_bindings {
        post: "/v1/{parent=accounts/*/channelPartnerLinks/*}/customers"
        body: "customer"
      }
    };
  }

  // Updates an existing [Customer][google.cloud.channel.v1.Customer] resource for the reseller or
  // distributor.
  //
  // Possible error codes:
  //
  // * PERMISSION_DENIED: The reseller account making the request is different
  // from the reseller account in the API request.
  // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  // * NOT_FOUND: No [Customer][google.cloud.channel.v1.Customer] resource found for the name in the request.
  //
  // Return value:
  // The updated [Customer][google.cloud.channel.v1.Customer] resource.
  rpc UpdateCustomer(UpdateCustomerRequest) returns (Customer) {
    option (google.api.http) = {
      patch: "/v1/{customer.name=accounts/*/customers/*}"
      body: "customer"
      additional_bindings {
        patch: "/v1/{customer.name=accounts/*/channelPartnerLinks/*/customers/*}"
        body: "customer"
      }
    };
  }

  // Deletes the given [Customer][google.cloud.channel.v1.Customer] permanently.
  //
  // Possible error codes:
  //
  // * PERMISSION_DENIED: The account making the request does not own
  // this customer.
  // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  // * FAILED_PRECONDITION: The customer has existing entitlements.
  // * NOT_FOUND: No [Customer][google.cloud.channel.v1.Customer] resource found for the name in the request.
  rpc DeleteCustomer(DeleteCustomerRequest) returns (google.protobuf.Empty) {
    option (google.api.http) = {
      delete: "/v1/{name=accounts/*/customers/*}"
      additional_bindings {
        delete: "/v1/{name=accounts/*/channelPartnerLinks/*/customers/*}"
      }
    };
    option (google.api.method_signature) = "name";
  }

  // Creates a Cloud Identity for the given customer using the customer's
  // information, or the information provided here.
  //
  // Possible error codes:
  //
  // *  PERMISSION_DENIED: The customer doesn't belong to the reseller.
  // *  INVALID_ARGUMENT: Required request parameters are missing or invalid.
  // *  NOT_FOUND: The customer was not found.
  // *  ALREADY_EXISTS: The customer's primary email already exists. Retry
  //    after changing the customer's primary contact email.
  // * INTERNAL: Any non-user error related to a technical issue in the
  // backend. Contact Cloud Channel support.
  // * UNKNOWN: Any non-user error related to a technical issue in the backend.
  // Contact Cloud Channel support.
  //
  // Return value:
  // The ID of a long-running operation.
  //
  // To get the results of the operation, call the GetOperation method of
  // CloudChannelOperationsService. The Operation metadata contains an
  // instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
  rpc ProvisionCloudIdentity(ProvisionCloudIdentityRequest) returns (google.longrunning.Operation) {
    option (google.api.http) = {
      post: "/v1/{customer=accounts/*/customers/*}:provisionCloudIdentity"
      body: "*"
    };
    option (google.longrunning.operation_info) = {
      response_type: "Customer"
      metadata_type: "OperationMetadata"
    };
  }

  // Lists [Entitlement][google.cloud.channel.v1.Entitlement]s belonging to a customer.
  //
  // Possible error codes:
  //
  // * PERMISSION_DENIED: The customer doesn't belong to the reseller.
  // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  //
  // Return value:
  // A list of the customer's [Entitlement][google.cloud.channel.v1.Entitlement]s.
  rpc ListEntitlements(ListEntitlementsRequest) returns (ListEntitlementsResponse) {
    option (google.api.http) = {
      get: "/v1/{parent=accounts/*/customers/*}/entitlements"
    };
  }

  // List [TransferableSku][google.cloud.channel.v1.TransferableSku]s of a customer based on the Cloud Identity ID or
  // Customer Name in the request.
  //
  // Use this method to list the entitlements information of an
  // unowned customer. You should provide the customer's
  // Cloud Identity ID or Customer Name.
  //
  // Possible error codes:
  //
  // * PERMISSION_DENIED:
  //     * The customer doesn't belong to the reseller and has no auth token.
  //     * The supplied auth token is invalid.
  //     * The reseller account making the request is different
  //     from the reseller account in the query.
  // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  //
  // Return value:
  // A list of the customer's [TransferableSku][google.cloud.channel.v1.TransferableSku].
  rpc ListTransferableSkus(ListTransferableSkusRequest) returns (ListTransferableSkusResponse) {
    option (google.api.http) = {
      post: "/v1/{parent=accounts/*}:listTransferableSkus"
      body: "*"
    };
  }

  // List [TransferableOffer][google.cloud.channel.v1.TransferableOffer]s of a customer based on Cloud Identity ID or
  // Customer Name in the request.
  //
  // Use this method when a reseller gets the entitlement information of an
  // unowned customer. The reseller should provide the customer's
  // Cloud Identity ID or Customer Name.
  //
  // Possible error codes:
  //
  // * PERMISSION_DENIED:
  //     * The customer doesn't belong to the reseller and has no auth token.
  //     * The supplied auth token is invalid.
  //     * The reseller account making the request is different
  //     from the reseller account in the query.
  // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  //
  // Return value:
  // List of [TransferableOffer][google.cloud.channel.v1.TransferableOffer] for the given customer and SKU.
  rpc ListTransferableOffers(ListTransferableOffersRequest) returns (ListTransferableOffersResponse) {
    option (google.api.http) = {
      post: "/v1/{parent=accounts/*}:listTransferableOffers"
      body: "*"
    };
  }

  // Returns the requested [Entitlement][google.cloud.channel.v1.Entitlement] resource.
  //
  // Possible error codes:
  //
  // * PERMISSION_DENIED: The customer doesn't belong to the reseller.
  // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  // * NOT_FOUND: The customer entitlement was not found.
  //
  // Return value:
  // The requested [Entitlement][google.cloud.channel.v1.Entitlement] resource.
  rpc GetEntitlement(GetEntitlementRequest) returns (Entitlement) {
    option (google.api.http) = {
      get: "/v1/{name=accounts/*/customers/*/entitlements/*}"
    };
  }

  // Creates an entitlement for a customer.
  //
  // Possible error codes:
  //
  // * PERMISSION_DENIED: The customer doesn't belong to the reseller.
  // * INVALID_ARGUMENT:
  //     * Required request parameters are missing or invalid.
  //     * There is already a customer entitlement for a SKU from the same
  //     product family.
  // * INVALID_VALUE: Make sure the OfferId is valid. If it is, contact
  // Google Channel support for further troubleshooting.
  // * NOT_FOUND: The customer or offer resource was not found.
  // * ALREADY_EXISTS:
  //     * The SKU was already purchased for the customer.
  //     * The customer's primary email already exists. Retry
  //     after changing the customer's primary contact email.
  // * CONDITION_NOT_MET or FAILED_PRECONDITION:
  //     * The domain required for purchasing a SKU has not been verified.
  //     * A pre-requisite SKU required to purchase an Add-On SKU is missing.
  //     For example, Google Workspace Business Starter is required to purchase
  //     Vault or Drive.
  //     * (Developer accounts only) Reseller and resold domain must meet the
  //     following naming requirements:
  //         * Domain names must start with goog-test.
  //         * Domain names must include the reseller domain.
  // * INTERNAL: Any non-user error related to a technical issue in the
  // backend. Contact Cloud Channel support.
  // * UNKNOWN: Any non-user error related to a technical issue in the backend.
  // Contact Cloud Channel support.
  //
  // Return value:
  // The ID of a long-running operation.
  //
  // To get the results of the operation, call the GetOperation method of
  // CloudChannelOperationsService. The Operation metadata will contain an
  // instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
  rpc CreateEntitlement(CreateEntitlementRequest) returns (google.longrunning.Operation) {
    option (google.api.http) = {
      post: "/v1/{parent=accounts/*/customers/*}/entitlements"
      body: "*"
    };
    option (google.longrunning.operation_info) = {
      response_type: "Entitlement"
      metadata_type: "OperationMetadata"
    };
  }

  // Change parameters of the entitlement.
  //
  // An entitlement update is a long-running operation and it updates the
  // entitlement as a result of fulfillment.
  //
  // Possible error codes:
  //
  // * PERMISSION_DENIED: The customer doesn't belong to the reseller.
  // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  // For example, the number of seats being changed is greater than the allowed
  // number of max seats, or decreasing seats for a commitment based plan.
  // * NOT_FOUND: Entitlement resource not found.
  // * INTERNAL: Any non-user error related to a technical issue in the
  // backend. Contact Cloud Channel support.
  // * UNKNOWN: Any non-user error related to a technical issue in the backend.
  // Contact Cloud Channel support.
  //
  // Return value:
  // The ID of a long-running operation.
  //
  // To get the results of the operation, call the GetOperation method of
  // CloudChannelOperationsService. The Operation metadata will contain an
  // instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
  rpc ChangeParameters(ChangeParametersRequest) returns (google.longrunning.Operation) {
    option (google.api.http) = {
      post: "/v1/{name=accounts/*/customers/*/entitlements/*}:changeParameters"
      body: "*"
    };
    option (google.longrunning.operation_info) = {
      response_type: "Entitlement"
      metadata_type: "OperationMetadata"
    };
  }

  // Updates the renewal settings for an existing customer entitlement.
  //
  // An entitlement update is a long-running operation and it updates the
  // entitlement as a result of fulfillment.
  //
  // Possible error codes:
  //
  // * PERMISSION_DENIED: The customer doesn't belong to the reseller.
  // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  // * NOT_FOUND: Entitlement resource not found.
  // * NOT_COMMITMENT_PLAN: Renewal Settings are only applicable for a
  // commitment plan. Can't enable or disable renewals for non-commitment plans.
  // * INTERNAL: Any non-user error related to a technical issue in the
  // backend. Contact Cloud Channel support.
  // * UNKNOWN: Any non-user error related to a technical issue in the backend.
  //   Contact Cloud Channel support.
  //
  // Return value:
  // The ID of a long-running operation.
  //
  // To get the results of the operation, call the GetOperation method of
  // CloudChannelOperationsService. The Operation metadata will contain an
  // instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
  rpc ChangeRenewalSettings(ChangeRenewalSettingsRequest) returns (google.longrunning.Operation) {
    option (google.api.http) = {
      post: "/v1/{name=accounts/*/customers/*/entitlements/*}:changeRenewalSettings"
      body: "*"
    };
    option (google.longrunning.operation_info) = {
      response_type: "Entitlement"
      metadata_type: "OperationMetadata"
    };
  }

  // Updates the Offer for an existing customer entitlement.
  //
  // An entitlement update is a long-running operation and it updates the
  // entitlement as a result of fulfillment.
  //
  // Possible error codes:
  //
  // * PERMISSION_DENIED: The customer doesn't belong to the reseller.
  // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  // * NOT_FOUND: Offer or Entitlement resource not found.
  // * INTERNAL: Any non-user error related to a technical issue in the
  // backend. Contact Cloud Channel support.
  // * UNKNOWN: Any non-user error related to a technical issue in the backend.
  // Contact Cloud Channel support.
  //
  // Return value:
  // The ID of a long-running operation.
  //
  // To get the results of the operation, call the GetOperation method of
  // CloudChannelOperationsService. The Operation metadata will contain an
  // instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
  rpc ChangeOffer(ChangeOfferRequest) returns (google.longrunning.Operation) {
    option (google.api.http) = {
      post: "/v1/{name=accounts/*/customers/*/entitlements/*}:changeOffer"
      body: "*"
    };
    option (google.longrunning.operation_info) = {
      response_type: "Entitlement"
      metadata_type: "OperationMetadata"
    };
  }

  // Starts paid service for a trial entitlement.
  //
  // Starts paid service for a trial entitlement immediately. This method is
  // only applicable if a plan is set up for a trial entitlement but has some
  // trial days remaining.
  //
  // Possible error codes:
  //
  // * PERMISSION_DENIED: The customer doesn't belong to the reseller.
  // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  // * NOT_FOUND: Entitlement resource not found.
  // * FAILED_PRECONDITION/NOT_IN_TRIAL: This method only works for
  // entitlement on trial plans.
  // * INTERNAL: Any non-user error related to a technical issue in the
  // backend. Contact Cloud Channel support.
  // * UNKNOWN: Any non-user error related to a technical issue in the backend.
  // Contact Cloud Channel support.
  //
  // Return value:
  // The ID of a long-running operation.
  //
  // To get the results of the operation, call the GetOperation method of
  // CloudChannelOperationsService. The Operation metadata will contain an
  // instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
  rpc StartPaidService(StartPaidServiceRequest) returns (google.longrunning.Operation) {
    option (google.api.http) = {
      post: "/v1/{name=accounts/*/customers/*/entitlements/*}:startPaidService"
      body: "*"
    };
    option (google.longrunning.operation_info) = {
      response_type: "Entitlement"
      metadata_type: "OperationMetadata"
    };
  }

  // Suspends a previously fulfilled entitlement.
  //
  // An entitlement suspension is a long-running operation.
  //
  // Possible error codes:
  //
  // * PERMISSION_DENIED: The customer doesn't belong to the reseller.
  // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  // * NOT_FOUND: Entitlement resource not found.
  // * NOT_ACTIVE: Entitlement is not active.
  // * INTERNAL: Any non-user error related to a technical issue in the
  // backend. Contact Cloud Channel support.
  // * UNKNOWN: Any non-user error related to a technical issue in the backend.
  // Contact Cloud Channel support.
  //
  // Return value:
  // The ID of a long-running operation.
  //
  // To get the results of the operation, call the GetOperation method of
  // CloudChannelOperationsService. The Operation metadata will contain an
  // instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
  rpc SuspendEntitlement(SuspendEntitlementRequest) returns (google.longrunning.Operation) {
    option (google.api.http) = {
      post: "/v1/{name=accounts/*/customers/*/entitlements/*}:suspend"
      body: "*"
    };
    option (google.longrunning.operation_info) = {
      response_type: "Entitlement"
      metadata_type: "OperationMetadata"
    };
  }

  // Cancels a previously fulfilled entitlement.
  //
  // An entitlement cancellation is a long-running operation.
  //
  // Possible error codes:
  //
  // * PERMISSION_DENIED: The reseller account making the request is different
  // from the reseller account in the API request.
  // * FAILED_PRECONDITION: There are Google Cloud projects linked to the
  // Google Cloud entitlement's Cloud Billing subaccount.
  // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  // * NOT_FOUND: Entitlement resource not found.
  // * DELETION_TYPE_NOT_ALLOWED: Cancel is only allowed for Google Workspace
  // add-ons, or entitlements for Google Cloud's development platform.
  // * INTERNAL: Any non-user error related to a technical issue in the
  // backend. Contact Cloud Channel support.
  // * UNKNOWN: Any non-user error related to a technical issue in the backend.
  // Contact Cloud Channel support.
  //
  // Return value:
  // The ID of a long-running operation.
  //
  // To get the results of the operation, call the GetOperation method of
  // CloudChannelOperationsService. The response will contain
  // google.protobuf.Empty on success. The Operation metadata will contain an
  // instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
  rpc CancelEntitlement(CancelEntitlementRequest) returns (google.longrunning.Operation) {
    option (google.api.http) = {
      post: "/v1/{name=accounts/*/customers/*/entitlements/*}:cancel"
      body: "*"
    };
    option (google.longrunning.operation_info) = {
      response_type: "google.protobuf.Empty"
      metadata_type: "OperationMetadata"
    };
  }

  // Activates a previously suspended entitlement. Entitlements suspended for
  // pending ToS acceptance can't be activated using this method.
  //
  // An entitlement activation is a long-running operation and it updates
  // the state of the customer entitlement.
  //
  // Possible error codes:
  //
  // * PERMISSION_DENIED: The reseller account making the request is different
  // from the reseller account in the API request.
  // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  // * NOT_FOUND: Entitlement resource not found.
  // * SUSPENSION_NOT_RESELLER_INITIATED: Can only activate reseller-initiated
  // suspensions and entitlements that have accepted the TOS.
  // * NOT_SUSPENDED: Can only activate suspended entitlements not in an ACTIVE
  // state.
  // * INTERNAL: Any non-user error related to a technical issue in the
  // backend. Contact Cloud Channel support.
  // * UNKNOWN: Any non-user error related to a technical issue in the backend.
  // Contact Cloud Channel support.
  //
  // Return value:
  // The ID of a long-running operation.
  //
  // To get the results of the operation, call the GetOperation method of
  // CloudChannelOperationsService. The Operation metadata will contain an
  // instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
  rpc ActivateEntitlement(ActivateEntitlementRequest) returns (google.longrunning.Operation) {
    option (google.api.http) = {
      post: "/v1/{name=accounts/*/customers/*/entitlements/*}:activate"
      body: "*"
    };
    option (google.longrunning.operation_info) = {
      response_type: "Entitlement"
      metadata_type: "OperationMetadata"
    };
  }

  // Transfers customer entitlements to new reseller.
  //
  // Possible error codes:
  //
  // * PERMISSION_DENIED: The customer doesn't belong to the reseller.
  // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  // * NOT_FOUND: The customer or offer resource was not found.
  // * ALREADY_EXISTS: The SKU was already transferred for the customer.
  // * CONDITION_NOT_MET or FAILED_PRECONDITION:
  //     * The SKU requires domain verification to transfer, but the domain is
  //     not verified.
  //     * An Add-On SKU (example, Vault or Drive) is missing the
  //     pre-requisite SKU (example, G Suite Basic).
  //     * (Developer accounts only) Reseller and resold domain must meet the
  //     following naming requirements:
  //         * Domain names must start with goog-test.
  //         * Domain names must include the reseller domain.
  //     * Specify all transferring entitlements.
  // * INTERNAL: Any non-user error related to a technical issue in the
  // backend. Contact Cloud Channel support.
  // * UNKNOWN: Any non-user error related to a technical issue in the backend.
  // Contact Cloud Channel support.
  //
  // Return value:
  // The ID of a long-running operation.
  //
  // To get the results of the operation, call the GetOperation method of
  // CloudChannelOperationsService. The Operation metadata will contain an
  // instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
  rpc TransferEntitlements(TransferEntitlementsRequest) returns (google.longrunning.Operation) {
    option (google.api.http) = {
      post: "/v1/{parent=accounts/*/customers/*}:transferEntitlements"
      body: "*"
    };
    option (google.longrunning.operation_info) = {
      response_type: "TransferEntitlementsResponse"
      metadata_type: "OperationMetadata"
    };
  }

  // Transfers customer entitlements from their current reseller to Google.
  //
  // Possible error codes:
  //
  // * PERMISSION_DENIED: The customer doesn't belong to the reseller.
  // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  // * NOT_FOUND: The customer or offer resource was not found.
  // * ALREADY_EXISTS: The SKU was already transferred for the customer.
  // * CONDITION_NOT_MET or FAILED_PRECONDITION:
  //     * The SKU requires domain verification to transfer, but the domain is
  //     not verified.
  //     * An Add-On SKU (example, Vault or Drive) is missing the
  //     pre-requisite SKU (example, G Suite Basic).
  //     * (Developer accounts only) Reseller and resold domain must meet the
  //     following naming requirements:
  //         * Domain names must start with goog-test.
  //         * Domain names must include the reseller domain.
  // * INTERNAL: Any non-user error related to a technical issue in the
  // backend. Contact Cloud Channel support.
  // * UNKNOWN: Any non-user error related to a technical issue in the backend.
  // Contact Cloud Channel support.
  //
  // Return value:
  // The ID of a long-running operation.
  //
  // To get the results of the operation, call the GetOperation method of
  // CloudChannelOperationsService. The response will contain
  // google.protobuf.Empty on success. The Operation metadata will contain an
  // instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
  rpc TransferEntitlementsToGoogle(TransferEntitlementsToGoogleRequest) returns (google.longrunning.Operation) {
    option (google.api.http) = {
      post: "/v1/{parent=accounts/*/customers/*}:transferEntitlementsToGoogle"
      body: "*"
    };
    option (google.longrunning.operation_info) = {
      response_type: "google.protobuf.Empty"
      metadata_type: "OperationMetadata"
    };
  }

  // List [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink]s belonging to a distributor.
  // You must be a distributor to call this method.
  //
  // Possible error codes:
  //
  // * PERMISSION_DENIED: The reseller account making the request is different
  // from the reseller account in the API request.
  // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  //
  // Return value:
  // The list of the distributor account's [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] resources.
  rpc ListChannelPartnerLinks(ListChannelPartnerLinksRequest) returns (ListChannelPartnerLinksResponse) {
    option (google.api.http) = {
      get: "/v1/{parent=accounts/*}/channelPartnerLinks"
    };
  }

  // Returns the requested [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] resource.
  // You must be a distributor to call this method.
  //
  // Possible error codes:
  //
  // * PERMISSION_DENIED: The reseller account making the request is different
  // from the reseller account in the API request.
  // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  // * NOT_FOUND: ChannelPartnerLink resource not found because of an
  // invalid channel partner link name.
  //
  // Return value:
  // The [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] resource.
  rpc GetChannelPartnerLink(GetChannelPartnerLinkRequest) returns (ChannelPartnerLink) {
    option (google.api.http) = {
      get: "/v1/{name=accounts/*/channelPartnerLinks/*}"
    };
  }

  // Initiates a channel partner link between a distributor and a reseller, or
  // between resellers in an n-tier reseller channel.
  // Invited partners need to follow the invite_link_uri provided in the
  // response to accept. After accepting the invitation, a link is set up
  // between the two parties.
  // You must be a distributor to call this method.
  //
  // Possible error codes:
  //
  // * PERMISSION_DENIED: The reseller account making the request is different
  // from the reseller account in the API request.
  // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  // * ALREADY_EXISTS: The ChannelPartnerLink sent in the request already
  // exists.
  // * NOT_FOUND: No Cloud Identity customer exists for provided domain.
  // * INTERNAL: Any non-user error related to a technical issue in the
  // backend. Contact Cloud Channel support.
  // * UNKNOWN: Any non-user error related to a technical issue in the backend.
  // Contact Cloud Channel support.
  //
  // Return value:
  // The new [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] resource.
  rpc CreateChannelPartnerLink(CreateChannelPartnerLinkRequest) returns (ChannelPartnerLink) {
    option (google.api.http) = {
      post: "/v1/{parent=accounts/*}/channelPartnerLinks"
      body: "channel_partner_link"
    };
  }

  // Updates a channel partner link. Distributors call this method to change a
  // link's status. For example, to suspend a partner link.
  // You must be a distributor to call this method.
  //
  // Possible error codes:
  //
  // * PERMISSION_DENIED: The reseller account making the request is different
  // from the reseller account in the API request.
  // * INVALID_ARGUMENT:
  //     * Required request parameters are missing or invalid.
  //     * Link state cannot change from invited to active or suspended.
  //     * Cannot send reseller_cloud_identity_id, invite_url, or name in update
  //     mask.
  // * NOT_FOUND: ChannelPartnerLink resource not found.
  // * INTERNAL: Any non-user error related to a technical issue in the
  // backend. Contact Cloud Channel support.
  // * UNKNOWN: Any non-user error related to a technical issue in the backend.
  // Contact Cloud Channel support.
  //
  // Return value:
  // The updated [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] resource.
  rpc UpdateChannelPartnerLink(UpdateChannelPartnerLinkRequest) returns (ChannelPartnerLink) {
    option (google.api.http) = {
      patch: "/v1/{name=accounts/*/channelPartnerLinks/*}"
      body: "*"
    };
  }

  // Returns the requested [Offer][google.cloud.channel.v1.Offer] resource.
  //
  // Possible error codes:
  //
  // * PERMISSION_DENIED: The entitlement doesn't belong to the reseller.
  // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  // * NOT_FOUND: Entitlement or offer was not found.
  //
  // Return value:
  // The [Offer][google.cloud.channel.v1.Offer] resource.
  rpc LookupOffer(LookupOfferRequest) returns (Offer) {
    option (google.api.http) = {
      get: "/v1/{entitlement=accounts/*/customers/*/entitlements/*}:lookupOffer"
    };
  }

  // Lists the Products the reseller is authorized to sell.
  //
  // Possible error codes:
  //
  // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  rpc ListProducts(ListProductsRequest) returns (ListProductsResponse) {
    option (google.api.http) = {
      get: "/v1/products"
    };
  }

  // Lists the SKUs for a product the reseller is authorized to sell.
  //
  // Possible error codes:
  //
  // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  rpc ListSkus(ListSkusRequest) returns (ListSkusResponse) {
    option (google.api.http) = {
      get: "/v1/{parent=products/*}/skus"
    };
  }

  // Lists the Offers the reseller can sell.
  //
  // Possible error codes:
  //
  // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  rpc ListOffers(ListOffersRequest) returns (ListOffersResponse) {
    option (google.api.http) = {
      get: "/v1/{parent=accounts/*}/offers"
    };
  }

  // Lists the following:
  //
  // * SKUs that you can purchase for a customer
  // * SKUs that you can upgrade or downgrade for an entitlement.
  //
  // Possible error codes:
  //
  // * PERMISSION_DENIED: The customer doesn't belong to the reseller.
  // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  rpc ListPurchasableSkus(ListPurchasableSkusRequest) returns (ListPurchasableSkusResponse) {
    option (google.api.http) = {
      get: "/v1/{customer=accounts/*/customers/*}:listPurchasableSkus"
    };
  }

  // Lists the following:
  //
  // * Offers that you can purchase for a customer.
  // * Offers that you can change for an entitlement.
  //
  // Possible error codes:
  //
  // * PERMISSION_DENIED: The customer doesn't belong to the reseller
  // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  rpc ListPurchasableOffers(ListPurchasableOffersRequest) returns (ListPurchasableOffersResponse) {
    option (google.api.http) = {
      get: "/v1/{customer=accounts/*/customers/*}:listPurchasableOffers"
    };
  }

  // Registers a service account with subscriber privileges on the Cloud Pub/Sub
  // topic for this Channel Services account. After you create a
  // subscriber, you get the events through [SubscriberEvent][google.cloud.channel.v1.SubscriberEvent]
  //
  // Possible error codes:
  //
  // * PERMISSION_DENIED: The reseller account making the request and the
  // provided reseller account are different, or the impersonated user
  // is not a super admin.
  // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  // * INTERNAL: Any non-user error related to a technical issue in the
  // backend. Contact Cloud Channel support.
  // * UNKNOWN: Any non-user error related to a technical issue in the backend.
  // Contact Cloud Channel support.
  //
  // Return value:
  // The topic name with the registered service email address.
  rpc RegisterSubscriber(RegisterSubscriberRequest) returns (RegisterSubscriberResponse) {
    option (google.api.http) = {
      post: "/v1/{account=accounts/*}:register"
      body: "*"
    };
  }

  // Unregisters a service account with subscriber privileges on the Cloud
  // Pub/Sub topic created for this Channel Services account. If there are no
  // service accounts left with subscriber privileges, this deletes the topic.
  // You can call ListSubscribers to check for these accounts.
  //
  // Possible error codes:
  //
  // * PERMISSION_DENIED: The reseller account making the request and the
  // provided reseller account are different, or the impersonated user
  // is not a super admin.
  // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  // * NOT_FOUND: The topic resource doesn't exist.
  // * INTERNAL: Any non-user error related to a technical issue in the
  // backend. Contact Cloud Channel support.
  // * UNKNOWN: Any non-user error related to a technical issue in the backend.
  // Contact Cloud Channel support.
  //
  // Return value:
  // The topic name that unregistered the service email address.
  // Returns a success response if the service email address wasn't registered
  // with the topic.
  rpc UnregisterSubscriber(UnregisterSubscriberRequest) returns (UnregisterSubscriberResponse) {
    option (google.api.http) = {
      post: "/v1/{account=accounts/*}:unregister"
      body: "*"
    };
  }

  // Lists service accounts with subscriber privileges on the Cloud Pub/Sub
  // topic created for this Channel Services account.
  //
  // Possible error codes:
  //
  // * PERMISSION_DENIED: The reseller account making the request and the
  // provided reseller account are different, or the impersonated user
  // is not a super admin.
  // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  // * NOT_FOUND: The topic resource doesn't exist.
  // * INTERNAL: Any non-user error related to a technical issue in the
  // backend. Contact Cloud Channel support.
  // * UNKNOWN: Any non-user error related to a technical issue in the backend.
  // Contact Cloud Channel support.
  //
  // Return value:
  // A list of service email addresses.
  rpc ListSubscribers(ListSubscribersRequest) returns (ListSubscribersResponse) {
    option (google.api.http) = {
      get: "/v1/{account=accounts/*}:listSubscribers"
    };
  }
}

// Request message for [CloudChannelService.CheckCloudIdentityAccountsExist][google.cloud.channel.v1.CloudChannelService.CheckCloudIdentityAccountsExist].
message CheckCloudIdentityAccountsExistRequest {
  // Required. The reseller account's resource name.
  // Parent uses the format: accounts/{account_id}
  string parent = 1 [(google.api.field_behavior) = REQUIRED];

  // Required. Domain to fetch for Cloud Identity account customer.
  string domain = 2 [(google.api.field_behavior) = REQUIRED];
}

// Entity representing a Cloud Identity account that may be
// associated with a Channel Services API partner.
message CloudIdentityCustomerAccount {
  // Returns true if a Cloud Identity account exists for a specific domain.
  bool existing = 1;

  // Returns true if the Cloud Identity account is associated with a customer
  // of the Channel Services partner.
  bool owned = 2;

  // If owned = true, the name of the customer that owns the Cloud Identity
  // account.
  // Customer_name uses the format:
  // accounts/{account_id}/customers/{customer_id}
  string customer_name = 3;

  // If existing = true, the Cloud Identity ID of the customer.
  string customer_cloud_identity_id = 4;
}

// Response message for
// [CloudChannelService.CheckCloudIdentityAccountsExist][google.cloud.channel.v1.CloudChannelService.CheckCloudIdentityAccountsExist].
message CheckCloudIdentityAccountsExistResponse {
  // The Cloud Identity accounts associated with the domain.
  repeated CloudIdentityCustomerAccount cloud_identity_accounts = 1;
}

// Request message for [CloudChannelService.ListCustomers][google.cloud.channel.v1.CloudChannelService.ListCustomers]
message ListCustomersRequest {
  // Required. The resource name of the reseller account to list customers from.
  // Parent uses the format: accounts/{account_id}.
  string parent = 1 [(google.api.field_behavior) = REQUIRED];

  // Optional. The maximum number of customers to return. The service may return fewer
  // than this value. If unspecified, returns at most 10 customers. The
  // maximum value is 50.
  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];

  // Optional. A token identifying a page of results other than the first page.
  // Obtained through
  // [ListCustomersResponse.next_page_token][google.cloud.channel.v1.ListCustomersResponse.next_page_token] of the previous
  // [CloudChannelService.ListCustomers][google.cloud.channel.v1.CloudChannelService.ListCustomers] call.
  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
}

// Response message for [CloudChannelService.ListCustomers][google.cloud.channel.v1.CloudChannelService.ListCustomers].
message ListCustomersResponse {
  // The customers belonging to a reseller or distributor.
  repeated Customer customers = 1;

  // A token to retrieve the next page of results.
  // Pass to [ListCustomersRequest.page_token][google.cloud.channel.v1.ListCustomersRequest.page_token] to obtain that page.
  string next_page_token = 2;
}

// Request message for [CloudChannelService.GetCustomer][google.cloud.channel.v1.CloudChannelService.GetCustomer].
message GetCustomerRequest {
  // Required. The resource name of the customer to retrieve.
  // Name uses the format: accounts/{account_id}/customers/{customer_id}
  string name = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "cloudchannel.googleapis.com/Customer"
    }
  ];
}

// Request message for [CloudChannelService.CreateCustomer][google.cloud.channel.v1.CloudChannelService.CreateCustomer]
message CreateCustomerRequest {
  // Required. The resource name of reseller account in which to create the customer.
  // Parent uses the format: accounts/{account_id}
  string parent = 1 [(google.api.field_behavior) = REQUIRED];

  // Required. The customer to create.
  Customer customer = 2 [(google.api.field_behavior) = REQUIRED];
}

// Request message for [CloudChannelService.UpdateCustomer][google.cloud.channel.v1.CloudChannelService.UpdateCustomer].
message UpdateCustomerRequest {
  // Required. New contents of the customer.
  Customer customer = 2 [(google.api.field_behavior) = REQUIRED];

  // The update mask that applies to the resource.
  // Optional.
  google.protobuf.FieldMask update_mask = 3;
}

// Request message for [CloudChannelService.DeleteCustomer][google.cloud.channel.v1.CloudChannelService.DeleteCustomer].
message DeleteCustomerRequest {
  // Required. The resource name of the customer to delete.
  string name = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "cloudchannel.googleapis.com/Customer"
    }
  ];
}

// Request message for [CloudChannelService.ProvisionCloudIdentity][google.cloud.channel.v1.CloudChannelService.ProvisionCloudIdentity]
message ProvisionCloudIdentityRequest {
  // Required. Resource name of the customer.
  // Format: accounts/{account_id}/customers/{customer_id}
  string customer = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "cloudchannel.googleapis.com/Customer"
    }
  ];

  // CloudIdentity-specific customer information.
  CloudIdentityInfo cloud_identity_info = 2;

  // Admin user information.
  AdminUser user = 3;

  // Validate the request and preview the review, but do not post it.
  bool validate_only = 4;
}

// Request message for [CloudChannelService.ListEntitlements][google.cloud.channel.v1.CloudChannelService.ListEntitlements]
message ListEntitlementsRequest {
  // Required. The resource name of the reseller's customer account to list
  // entitlements for.
  // Parent uses the format: accounts/{account_id}/customers/{customer_id}
  string parent = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "cloudchannel.googleapis.com/Customer"
    }
  ];

  // Optional. Requested page size. Server might return fewer results than requested.
  // If unspecified, return at most 50 entitlements.
  // The maximum value is 100; the server will coerce values above 100.
  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];

  // Optional. A token for a page of results other than the first page.
  // Obtained using
  // [ListEntitlementsResponse.next_page_token][google.cloud.channel.v1.ListEntitlementsResponse.next_page_token] of the previous
  // [CloudChannelService.ListEntitlements][google.cloud.channel.v1.CloudChannelService.ListEntitlements] call.
  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
}

// Response message for [CloudChannelService.ListEntitlements][google.cloud.channel.v1.CloudChannelService.ListEntitlements].
message ListEntitlementsResponse {
  // The reseller customer's entitlements.
  repeated Entitlement entitlements = 1;

  // A token to list the next page of results.
  // Pass to [ListEntitlementsRequest.page_token][google.cloud.channel.v1.ListEntitlementsRequest.page_token] to obtain that page.
  string next_page_token = 2;
}

// Request message for [CloudChannelService.ListTransferableSkus][google.cloud.channel.v1.CloudChannelService.ListTransferableSkus]
message ListTransferableSkusRequest {
  // Specifies the identity of transferred customer.
  // Either a cloud_identity_id of the customer or the customer name is
  // required to look up transferable SKUs.
  oneof transferred_customer_identity {
    // Customer's Cloud Identity ID
    string cloud_identity_id = 4;

    // A reseller is required to create a customer and use the resource name of
    // the created customer here.
    // Customer_name uses the format:
    // accounts/{account_id}/customers/{customer_id}
    string customer_name = 7;
  }

  // Required. The reseller account's resource name.
  // Parent uses the format: accounts/{account_id}
  string parent = 1 [(google.api.field_behavior) = REQUIRED];

  // The requested page size. Server might return fewer results than requested.
  // If unspecified, returns at most 100 SKUs.
  // The maximum value is 1000; the server will coerce values above 1000.
  // Optional.
  int32 page_size = 2;

  // A token for a page of results other than the first page.
  // Obtained using
  // [ListTransferableSkusResponse.next_page_token][google.cloud.channel.v1.ListTransferableSkusResponse.next_page_token] of the previous
  // [CloudChannelService.ListTransferableSkus][google.cloud.channel.v1.CloudChannelService.ListTransferableSkus] call.
  // Optional.
  string page_token = 3;

  // The super admin of the resold customer generates this token to
  // authorize a reseller to access their Cloud Identity and purchase
  // entitlements on their behalf. You can omit this token after authorization.
  // See https://support.google.com/a/answer/7643790 for more details.
  string auth_token = 5;

  // The BCP-47 language code. For example, "en-US". The
  // response will localize in the corresponding language code, if specified.
  // The default value is "en-US".
  // Optional.
  string language_code = 6;
}

// Response message for [CloudChannelService.ListTransferableSkus][google.cloud.channel.v1.CloudChannelService.ListTransferableSkus].
message ListTransferableSkusResponse {
  // Information about existing SKUs for a customer that needs a transfer.
  repeated TransferableSku transferable_skus = 1;

  // A token to retrieve the next page of results.
  // Pass to [ListTransferableSkusRequest.page_token][google.cloud.channel.v1.ListTransferableSkusRequest.page_token] to obtain
  // that page.
  string next_page_token = 2;
}

// Request message for [CloudChannelService.ListTransferableOffers][google.cloud.channel.v1.CloudChannelService.ListTransferableOffers]
message ListTransferableOffersRequest {
  // Specifies the identity of transferred customer.
  // Either a cloud_identity_id of the customer or the customer name is
  // required to look up transferrable Offers.
  oneof transferred_customer_identity {
    // Customer's Cloud Identity ID
    string cloud_identity_id = 4;

    // A reseller should create a customer and use the resource name of
    // that customer here.
    string customer_name = 5;
  }

  // Required. The resource name of the reseller's account.
  string parent = 1 [(google.api.field_behavior) = REQUIRED];

  // Requested page size. Server might return fewer results than requested.
  // If unspecified, returns at most 100 offers.
  // The maximum value is 1000; the server will coerce values above 1000.
  int32 page_size = 2;

  // A token for a page of results other than the first page.
  // Obtained using
  // [ListTransferableOffersResponse.next_page_token][google.cloud.channel.v1.ListTransferableOffersResponse.next_page_token] of the previous
  // [CloudChannelService.ListTransferableOffers][google.cloud.channel.v1.CloudChannelService.ListTransferableOffers] call.
  string page_token = 3;

  // Required. The SKU to look up Offers for.
  string sku = 6 [(google.api.field_behavior) = REQUIRED];

  // The BCP-47 language code. For example, "en-US". The
  // response will localize in the corresponding language code, if specified.
  // The default value is "en-US".
  string language_code = 7;
}

// Response message for [CloudChannelService.ListTransferableOffers][google.cloud.channel.v1.CloudChannelService.ListTransferableOffers].
message ListTransferableOffersResponse {
  // Information about Offers for a customer that can be used for
  // transfer.
  repeated TransferableOffer transferable_offers = 1;

  // A token to retrieve the next page of results.
  // Pass to [ListTransferableOffersRequest.page_token][google.cloud.channel.v1.ListTransferableOffersRequest.page_token] to obtain
  // that page.
  string next_page_token = 2;
}

// TransferableOffer represents an Offer that can be used in Transfer.
// Read-only.
message TransferableOffer {
  // Offer with parameter constraints updated to allow the Transfer.
  Offer offer = 1;
}

// Request message for [CloudChannelService.GetEntitlement][google.cloud.channel.v1.CloudChannelService.GetEntitlement].
message GetEntitlementRequest {
  // Required. The resource name of the entitlement to retrieve.
  // Name uses the format:
  // accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
  string name = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "cloudchannel.googleapis.com/Entitlement"
    }
  ];
}

// Request message for [CloudChannelService.ListChannelPartnerLinks][google.cloud.channel.v1.CloudChannelService.ListChannelPartnerLinks]
message ListChannelPartnerLinksRequest {
  // Required. The resource name of the reseller account for listing channel partner
  // links.
  // Parent uses the format: accounts/{account_id}
  string parent = 1 [(google.api.field_behavior) = REQUIRED];

  // Optional. Requested page size. Server might return fewer results than requested.
  // If unspecified, server will pick a default size (25).
  // The maximum value is 200; the server will coerce values above 200.
  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];

  // Optional. A token for a page of results other than the first page.
  // Obtained using
  // [ListChannelPartnerLinksResponse.next_page_token][google.cloud.channel.v1.ListChannelPartnerLinksResponse.next_page_token] of the previous
  // [CloudChannelService.ListChannelPartnerLinks][google.cloud.channel.v1.CloudChannelService.ListChannelPartnerLinks] call.
  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];

  // Optional. The level of granularity the ChannelPartnerLink will display.
  ChannelPartnerLinkView view = 4 [(google.api.field_behavior) = OPTIONAL];
}

// Response message for [CloudChannelService.ListChannelPartnerLinks][google.cloud.channel.v1.CloudChannelService.ListChannelPartnerLinks].
message ListChannelPartnerLinksResponse {
  // The Channel partner links for a reseller.
  repeated ChannelPartnerLink channel_partner_links = 1;

  // A token to retrieve the next page of results.
  // Pass to [ListChannelPartnerLinksRequest.page_token][google.cloud.channel.v1.ListChannelPartnerLinksRequest.page_token] to obtain that page.
  string next_page_token = 2;
}

// Request message for [CloudChannelService.GetChannelPartnerLink][google.cloud.channel.v1.CloudChannelService.GetChannelPartnerLink].
message GetChannelPartnerLinkRequest {
  // Required. The resource name of the channel partner link to retrieve.
  // Name uses the format: accounts/{account_id}/channelPartnerLinks/{id}
  // where {id} is the Cloud Identity ID of the partner.
  string name = 1 [(google.api.field_behavior) = REQUIRED];

  // Optional. The level of granularity the ChannelPartnerLink will display.
  ChannelPartnerLinkView view = 2 [(google.api.field_behavior) = OPTIONAL];
}

// Request message for [CloudChannelService.CreateChannelPartnerLink][google.cloud.channel.v1.CloudChannelService.CreateChannelPartnerLink]
message CreateChannelPartnerLinkRequest {
  // Required. Create a channel partner link for the provided reseller account's
  // resource name.
  // Parent uses the format: accounts/{account_id}
  string parent = 1 [(google.api.field_behavior) = REQUIRED];

  // Required. The channel partner link to create.
  // Either channel_partner_link.reseller_cloud_identity_id or domain can be
  // used to create a link.
  ChannelPartnerLink channel_partner_link = 2 [(google.api.field_behavior) = REQUIRED];
}

// Request message for [CloudChannelService.UpdateChannelPartnerLink][google.cloud.channel.v1.CloudChannelService.UpdateChannelPartnerLink]
message UpdateChannelPartnerLinkRequest {
  // Required. The resource name of the channel partner link to cancel.
  // Name uses the format: accounts/{account_id}/channelPartnerLinks/{id}
  // where {id} is the Cloud Identity ID of the partner.
  string name = 1 [(google.api.field_behavior) = REQUIRED];

  // Required. The channel partner link to update. Only channel_partner_link.link_state
  // is allowed for updates.
  ChannelPartnerLink channel_partner_link = 2 [(google.api.field_behavior) = REQUIRED];

  // Required. The update mask that applies to the resource.
  // The only allowable value for an update mask is
  // channel_partner_link.link_state.
  google.protobuf.FieldMask update_mask = 3 [(google.api.field_behavior) = REQUIRED];
}

// Request message for [CloudChannelService.CreateEntitlement][google.cloud.channel.v1.CloudChannelService.CreateEntitlement]
message CreateEntitlementRequest {
  // Required. The resource name of the reseller's customer account in which to create the
  // entitlement.
  // Parent uses the format: accounts/{account_id}/customers/{customer_id}
  string parent = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "cloudchannel.googleapis.com/Customer"
    }
  ];

  // Required. The entitlement to create.
  Entitlement entitlement = 2 [(google.api.field_behavior) = REQUIRED];

  // Optional. You can specify an optional unique request ID, and if you need to retry
  // your request, the server will know to ignore the request if it's complete.
  //
  // For example, you make an initial request and the request times out. If you
  // make the request again with the same request ID, the server can check if
  // it received the original operation with the same request ID. If it did, it
  // will ignore the second request.
  //
  // The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
  // with the exception that zero UUID is not supported
  // (`00000000-0000-0000-0000-000000000000`).
  string request_id = 5 [(google.api.field_behavior) = OPTIONAL];
}

// Request message for [CloudChannelService.TransferEntitlements][google.cloud.channel.v1.CloudChannelService.TransferEntitlements].
message TransferEntitlementsRequest {
  // Required. The resource name of the reseller's customer account that will receive
  // transferred entitlements.
  // Parent uses the format: accounts/{account_id}/customers/{customer_id}
  string parent = 1 [(google.api.field_behavior) = REQUIRED];

  // Required. The new entitlements to create or transfer.
  repeated Entitlement entitlements = 2 [(google.api.field_behavior) = REQUIRED];

  // The super admin of the resold customer generates this token to
  // authorize a reseller to access their Cloud Identity and purchase
  // entitlements on their behalf. You can omit this token after authorization.
  // See https://support.google.com/a/answer/7643790 for more details.
  string auth_token = 4;

  // Optional. You can specify an optional unique request ID, and if you need to retry
  // your request, the server will know to ignore the request if it's complete.
  //
  // For example, you make an initial request and the request times out. If you
  // make the request again with the same request ID, the server can check if
  // it received the original operation with the same request ID. If it did, it
  // will ignore the second request.
  //
  // The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
  // with the exception that zero UUID is not supported
  // (`00000000-0000-0000-0000-000000000000`).
  string request_id = 6 [(google.api.field_behavior) = OPTIONAL];
}

// Response message for [CloudChannelService.TransferEntitlements][google.cloud.channel.v1.CloudChannelService.TransferEntitlements].
// This is put in the response field of google.longrunning.Operation.
message TransferEntitlementsResponse {
  // The transferred entitlements.
  repeated Entitlement entitlements = 1;
}

// Request message for [CloudChannelService.TransferEntitlementsToGoogle][google.cloud.channel.v1.CloudChannelService.TransferEntitlementsToGoogle].
message TransferEntitlementsToGoogleRequest {
  // Required. The resource name of the reseller's customer account where the entitlements
  // transfer from.
  // Parent uses the format: accounts/{account_id}/customers/{customer_id}
  string parent = 1 [(google.api.field_behavior) = REQUIRED];

  // Required. The entitlements to transfer to Google.
  repeated Entitlement entitlements = 2 [(google.api.field_behavior) = REQUIRED];

  // Optional. You can specify an optional unique request ID, and if you need to retry
  // your request, the server will know to ignore the request if it's complete.
  //
  // For example, you make an initial request and the request times out. If you
  // make the request again with the same request ID, the server can check if
  // it received the original operation with the same request ID. If it did, it
  // will ignore the second request.
  //
  // The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
  // with the exception that zero UUID is not supported
  // (`00000000-0000-0000-0000-000000000000`).
  string request_id = 3 [(google.api.field_behavior) = OPTIONAL];
}

// Request message for [CloudChannelService.ChangeParametersRequest][].
message ChangeParametersRequest {
  // Required. The name of the entitlement to update.
  // Name uses the format:
  // accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
  string name = 1 [(google.api.field_behavior) = REQUIRED];

  // Required. Entitlement parameters to update. You can only change editable parameters.
  repeated Parameter parameters = 2 [(google.api.field_behavior) = REQUIRED];

  // Optional. You can specify an optional unique request ID, and if you need to retry
  // your request, the server will know to ignore the request if it's complete.
  //
  // For example, you make an initial request and the request times out. If you
  // make the request again with the same request ID, the server can check if
  // it received the original operation with the same request ID. If it did, it
  // will ignore the second request.
  //
  // The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
  // with the exception that zero UUID is not supported
  // (`00000000-0000-0000-0000-000000000000`).
  string request_id = 4 [(google.api.field_behavior) = OPTIONAL];

  // Optional. Purchase order ID provided by the reseller.
  string purchase_order_id = 5 [(google.api.field_behavior) = OPTIONAL];
}

// Request message for [CloudChannelService.ChangeRenewalSettings][google.cloud.channel.v1.CloudChannelService.ChangeRenewalSettings].
message ChangeRenewalSettingsRequest {
  // Required. The name of the entitlement to update.
  // Name uses the format:
  // accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
  string name = 1 [(google.api.field_behavior) = REQUIRED];

  // Required. New renewal settings.
  RenewalSettings renewal_settings = 4 [(google.api.field_behavior) = REQUIRED];

  // Optional. You can specify an optional unique request ID, and if you need to retry
  // your request, the server will know to ignore the request if it's complete.
  //
  // For example, you make an initial request and the request times out. If you
  // make the request again with the same request ID, the server can check if
  // it received the original operation with the same request ID. If it did, it
  // will ignore the second request.
  //
  // The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
  // with the exception that zero UUID is not supported
  // (`00000000-0000-0000-0000-000000000000`).
  string request_id = 5 [(google.api.field_behavior) = OPTIONAL];
}

// Request message for [CloudChannelService.ChangeOffer][google.cloud.channel.v1.CloudChannelService.ChangeOffer].
message ChangeOfferRequest {
  // Required. The resource name of the entitlement to update.
  // Name uses the format:
  // accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
  string name = 1 [(google.api.field_behavior) = REQUIRED];

  // Required. New Offer.
  // Format: accounts/{account_id}/offers/{offer_id}.
  string offer = 2 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "cloudchannel.googleapis.com/Offer"
    }
  ];

  // Optional. Parameters needed to purchase the Offer.
  repeated Parameter parameters = 3 [(google.api.field_behavior) = OPTIONAL];

  // Optional. Purchase order id provided by the reseller.
  string purchase_order_id = 5 [(google.api.field_behavior) = OPTIONAL];

  // Optional. You can specify an optional unique request ID, and if you need to retry
  // your request, the server will know to ignore the request if it's complete.
  //
  // For example, you make an initial request and the request times out. If you
  // make the request again with the same request ID, the server can check if
  // it received the original operation with the same request ID. If it did, it
  // will ignore the second request.
  //
  // The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
  // with the exception that zero UUID is not supported
  // (`00000000-0000-0000-0000-000000000000`).
  string request_id = 6 [(google.api.field_behavior) = OPTIONAL];
}

// Request message for [CloudChannelService.StartPaidService][google.cloud.channel.v1.CloudChannelService.StartPaidService].
message StartPaidServiceRequest {
  // Required. The name of the entitlement to start a paid service for.
  // Name uses the format:
  // accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
  string name = 1 [(google.api.field_behavior) = REQUIRED];

  // Optional. You can specify an optional unique request ID, and if you need to retry
  // your request, the server will know to ignore the request if it's complete.
  //
  // For example, you make an initial request and the request times out. If you
  // make the request again with the same request ID, the server can check if
  // it received the original operation with the same request ID. If it did, it
  // will ignore the second request.
  //
  // The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
  // with the exception that zero UUID is not supported
  // (`00000000-0000-0000-0000-000000000000`).
  string request_id = 3 [(google.api.field_behavior) = OPTIONAL];
}

// Request message for [CloudChannelService.CancelEntitlement][google.cloud.channel.v1.CloudChannelService.CancelEntitlement].
message CancelEntitlementRequest {
  // Required. The resource name of the entitlement to cancel.
  // Name uses the format:
  // accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
  string name = 1 [(google.api.field_behavior) = REQUIRED];

  // Optional. You can specify an optional unique request ID, and if you need to retry
  // your request, the server will know to ignore the request if it's complete.
  //
  // For example, you make an initial request and the request times out. If you
  // make the request again with the same request ID, the server can check if
  // it received the original operation with the same request ID. If it did, it
  // will ignore the second request.
  //
  // The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
  // with the exception that zero UUID is not supported
  // (`00000000-0000-0000-0000-000000000000`).
  string request_id = 3 [(google.api.field_behavior) = OPTIONAL];
}

// Request message for [CloudChannelService.SuspendEntitlement][google.cloud.channel.v1.CloudChannelService.SuspendEntitlement].
message SuspendEntitlementRequest {
  // Required. The resource name of the entitlement to suspend.
  // Name uses the format:
  // accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
  string name = 1 [(google.api.field_behavior) = REQUIRED];

  // Optional. You can specify an optional unique request ID, and if you need to retry
  // your request, the server will know to ignore the request if it's complete.
  //
  // For example, you make an initial request and the request times out. If you
  // make the request again with the same request ID, the server can check if
  // it received the original operation with the same request ID. If it did, it
  // will ignore the second request.
  //
  // The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
  // with the exception that zero UUID is not supported
  // (`00000000-0000-0000-0000-000000000000`).
  string request_id = 3 [(google.api.field_behavior) = OPTIONAL];
}

// Request message for [CloudChannelService.ActivateEntitlement][google.cloud.channel.v1.CloudChannelService.ActivateEntitlement].
message ActivateEntitlementRequest {
  // Required. The resource name of the entitlement to activate.
  // Name uses the format:
  // accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
  string name = 1 [(google.api.field_behavior) = REQUIRED];

  // Optional. You can specify an optional unique request ID, and if you need to retry
  // your request, the server will know to ignore the request if it's complete.
  //
  // For example, you make an initial request and the request times out. If you
  // make the request again with the same request ID, the server can check if
  // it received the original operation with the same request ID. If it did, it
  // will ignore the second request.
  //
  // The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
  // with the exception that zero UUID is not supported
  // (`00000000-0000-0000-0000-000000000000`).
  string request_id = 3 [(google.api.field_behavior) = OPTIONAL];
}

// Request message for LookupOffer.
message LookupOfferRequest {
  // Required. The resource name of the entitlement to retrieve the Offer.
  // Entitlement uses the format:
  // accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
  string entitlement = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "cloudchannel.googleapis.com/Entitlement"
    }
  ];
}

// Request message for ListProducts.
message ListProductsRequest {
  // Required. The resource name of the reseller account.
  // Format: accounts/{account_id}.
  string account = 1 [(google.api.field_behavior) = REQUIRED];

  // Optional. Requested page size. Server might return fewer results than requested.
  // If unspecified, returns at most 100 Products.
  // The maximum value is 1000; the server will coerce values above 1000.
  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];

  // Optional. A token for a page of results other than the first page.
  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];

  // Optional. The BCP-47 language code. For example, "en-US". The
  // response will localize in the corresponding language code, if specified.
  // The default value is "en-US".
  string language_code = 4 [(google.api.field_behavior) = OPTIONAL];
}

// Response message for ListProducts.
message ListProductsResponse {
  // List of Products requested.
  repeated Product products = 1;

  // A token to retrieve the next page of results.
  string next_page_token = 2;
}

// Request message for ListSkus.
message ListSkusRequest {
  // Required. The resource name of the Product to list SKUs for.
  // Parent uses the format: products/{product_id}.
  // Supports products/- to retrieve SKUs for all products.
  string parent = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "cloudchannel.googleapis.com/Product"
    }
  ];

  // Required. Resource name of the reseller.
  // Format: accounts/{account_id}.
  string account = 2 [(google.api.field_behavior) = REQUIRED];

  // Optional. Requested page size. Server might return fewer results than requested.
  // If unspecified, returns at most 100 SKUs.
  // The maximum value is 1000; the server will coerce values above 1000.
  int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL];

  // Optional. A token for a page of results other than the first page.
  // Optional.
  string page_token = 4 [(google.api.field_behavior) = OPTIONAL];

  // Optional. The BCP-47 language code. For example, "en-US". The
  // response will localize in the corresponding language code, if specified.
  // The default value is "en-US".
  string language_code = 5 [(google.api.field_behavior) = OPTIONAL];
}

// Response message for ListSkus.
message ListSkusResponse {
  // The list of SKUs requested.
  repeated Sku skus = 1;

  // A token to retrieve the next page of results.
  string next_page_token = 2;
}

// Request message for ListOffers.
message ListOffersRequest {
  // Required. The resource name of the reseller account from which to list Offers.
  // Parent uses the format: accounts/{account_id}.
  string parent = 1 [(google.api.field_behavior) = REQUIRED];

  // Optional. Requested page size. Server might return fewer results than requested.
  // If unspecified, returns at most 500 Offers.
  // The maximum value is 1000; the server will coerce values above 1000.
  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];

  // Optional. A token for a page of results other than the first page.
  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];

  // Optional. The expression to filter results by name (name of
  // the Offer), sku.name (name of the SKU), or sku.product.name (name of the
  // Product).
  // Example 1: sku.product.name=products/p1 AND sku.name!=products/p1/skus/s1
  // Example 2: name=accounts/a1/offers/o1
  string filter = 4 [(google.api.field_behavior) = OPTIONAL];

  // Optional. The BCP-47 language code. For example, "en-US". The
  // response will localize in the corresponding language code, if specified.
  // The default value is "en-US".
  string language_code = 5 [(google.api.field_behavior) = OPTIONAL];
}

// Response message for ListOffers.
message ListOffersResponse {
  // The list of Offers requested.
  repeated Offer offers = 1;

  // A token to retrieve the next page of results.
  string next_page_token = 2;
}

// Request message for ListPurchasableSkus.
message ListPurchasableSkusRequest {
  // List SKUs for a new entitlement. Make the purchase using
  // [CloudChannelService.CreateEntitlement][google.cloud.channel.v1.CloudChannelService.CreateEntitlement].
  message CreateEntitlementPurchase {
    // Required. List SKUs belonging to this Product.
    // Format: products/{product_id}.
    // Supports products/- to retrieve SKUs for all products.
    string product = 1 [(google.api.field_behavior) = REQUIRED];
  }

  // List SKUs for upgrading or downgrading an entitlement. Make the purchase
  // using [CloudChannelService.ChangeOffer][google.cloud.channel.v1.CloudChannelService.ChangeOffer].
  message ChangeOfferPurchase {
    // Change Type enum.
    enum ChangeType {
      // Not used.
      CHANGE_TYPE_UNSPECIFIED = 0;

      // SKU is an upgrade on the current entitlement.
      UPGRADE = 1;

      // SKU is a downgrade on the current entitlement.
      DOWNGRADE = 2;
    }

    // Required. Resource name of the entitlement.
    // Format:
    // accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
    string entitlement = 1 [(google.api.field_behavior) = REQUIRED];

    // Required. Change Type for the entitlement.
    ChangeType change_type = 2 [(google.api.field_behavior) = REQUIRED];
  }

  // Defines the intended purchase.
  oneof purchase_option {
    // List SKUs for CreateEntitlement purchase.
    CreateEntitlementPurchase create_entitlement_purchase = 2;

    // List SKUs for ChangeOffer purchase with a new SKU.
    ChangeOfferPurchase change_offer_purchase = 3;
  }

  // Required. The resource name of the customer to list SKUs for.
  // Format: accounts/{account_id}/customers/{customer_id}.
  string customer = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "cloudchannel.googleapis.com/Customer"
    }
  ];

  // Optional. Requested page size. Server might return fewer results than requested.
  // If unspecified, returns at most 100 SKUs.
  // The maximum value is 1000; the server will coerce values above 1000.
  int32 page_size = 4 [(google.api.field_behavior) = OPTIONAL];

  // Optional. A token for a page of results other than the first page.
  string page_token = 5 [(google.api.field_behavior) = OPTIONAL];

  // Optional. The BCP-47 language code. For example, "en-US". The
  // response will localize in the corresponding language code, if specified.
  // The default value is "en-US".
  string language_code = 6 [(google.api.field_behavior) = OPTIONAL];
}

// Response message for ListPurchasableSkus.
message ListPurchasableSkusResponse {
  // The list of SKUs requested.
  repeated PurchasableSku purchasable_skus = 1;

  // A token to retrieve the next page of results.
  string next_page_token = 2;
}

// SKU that you can purchase. This is used in ListPurchasableSku API
// response.
message PurchasableSku {
  // SKU
  Sku sku = 1;
}

// Request message for ListPurchasableOffers.
message ListPurchasableOffersRequest {
  // List Offers for CreateEntitlement purchase.
  message CreateEntitlementPurchase {
    // Required. SKU that the result should be restricted to.
    // Format: products/{product_id}/skus/{sku_id}.
    string sku = 1 [(google.api.field_behavior) = REQUIRED];
  }

  // List Offers for ChangeOffer purchase.
  message ChangeOfferPurchase {
    // Required. Resource name of the entitlement.
    // Format:
    // accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
    string entitlement = 1 [(google.api.field_behavior) = REQUIRED];

    // Optional. Resource name of the new target SKU. Provide this SKU when
    // upgrading or downgrading an entitlement. Format:
    // products/{product_id}/skus/{sku_id}
    string new_sku = 2 [(google.api.field_behavior) = OPTIONAL];
  }

  // Defines the intended purchase.
  oneof purchase_option {
    // List Offers for CreateEntitlement purchase.
    CreateEntitlementPurchase create_entitlement_purchase = 2;

    // List Offers for ChangeOffer purchase.
    ChangeOfferPurchase change_offer_purchase = 3;
  }

  // Required. The resource name of the customer to list Offers for.
  // Format: accounts/{account_id}/customers/{customer_id}.
  string customer = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "cloudchannel.googleapis.com/Customer"
    }
  ];

  // Optional. Requested page size. Server might return fewer results than requested.
  // If unspecified, returns at most 100 Offers.
  // The maximum value is 1000; the server will coerce values above 1000.
  int32 page_size = 4 [(google.api.field_behavior) = OPTIONAL];

  // Optional. A token for a page of results other than the first page.
  string page_token = 5 [(google.api.field_behavior) = OPTIONAL];

  // Optional. The BCP-47 language code. For example, "en-US". The
  // response will localize in the corresponding language code, if specified.
  // The default value is "en-US".
  string language_code = 6 [(google.api.field_behavior) = OPTIONAL];
}

// Response message for ListPurchasableOffers.
message ListPurchasableOffersResponse {
  // The list of Offers requested.
  repeated PurchasableOffer purchasable_offers = 1;

  // A token to retrieve the next page of results.
  string next_page_token = 2;
}

// Offer that you can purchase for a customer. This is used in the
// ListPurchasableOffer API response.
message PurchasableOffer {
  // Offer.
  Offer offer = 1;
}

// Request Message for RegisterSubscriber.
message RegisterSubscriberRequest {
  // Required. Resource name of the account.
  string account = 1 [(google.api.field_behavior) = REQUIRED];

  // Required. Service account that provides subscriber access to the registered topic.
  string service_account = 2 [(google.api.field_behavior) = REQUIRED];
}

// Response Message for RegisterSubscriber.
message RegisterSubscriberResponse {
  // Name of the topic the subscriber will listen to.
  string topic = 1;
}

// Request Message for UnregisterSubscriber.
message UnregisterSubscriberRequest {
  // Required. Resource name of the account.
  string account = 1 [(google.api.field_behavior) = REQUIRED];

  // Required. Service account to unregister from subscriber access to the topic.
  string service_account = 2 [(google.api.field_behavior) = REQUIRED];
}

// Response Message for UnregisterSubscriber.
message UnregisterSubscriberResponse {
  // Name of the topic the service account subscriber access was removed from.
  string topic = 1;
}

// Request Message for ListSubscribers.
message ListSubscribersRequest {
  // Required. Resource name of the account.
  string account = 1 [(google.api.field_behavior) = REQUIRED];

  // Optional. The maximum number of service accounts to return. The service may return
  // fewer than this value.
  // If unspecified, returns at most 100 service accounts.
  // The maximum value is 1000; the server will coerce values above 1000.
  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];

  // Optional. A page token, received from a previous `ListSubscribers` call.
  // Provide this to retrieve the subsequent page.
  //
  // When paginating, all other parameters provided to `ListSubscribers` must
  // match the call that provided the page token.
  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
}

// Response Message for ListSubscribers.
message ListSubscribersResponse {
  // Name of the topic registered with the reseller.
  string topic = 1;

  // List of service accounts which have subscriber access to the topic.
  repeated string service_accounts = 2;

  // A token that can be sent as `page_token` to retrieve the next page.
  // If this field is omitted, there are no subsequent pages.
  string next_page_token = 3;
}
