// Copyright 2026 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.commerceproducer.v1beta;

import "google/api/annotations.proto";
import "google/api/client.proto";
import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/cloud/commerceproducer/v1beta/private_offer.proto";
import "google/cloud/commerceproducer/v1beta/service.proto";
import "google/cloud/commerceproducer/v1beta/sku.proto";
import "google/cloud/commerceproducer/v1beta/sku_group.proto";
import "google/cloud/commerceproducer/v1beta/standard_offer.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";

option csharp_namespace = "Google.Cloud.CommerceProducer.V1Beta";
option go_package = "cloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb;commerceproducerpb";
option java_multiple_files = true;
option java_outer_classname = "CommerceTransactionProto";
option java_package = "com.google.cloud.commerceproducer.v1beta";
option php_namespace = "Google\\Cloud\\CommerceProducer\\V1beta";
option ruby_package = "Google::Cloud::CommerceProducer::V1beta";

// APIs related to managing resources that model commercial transactions.
service CommerceTransaction {
  option (google.api.default_host) = "commerceproducer.googleapis.com";
  option (google.api.oauth_scopes) =
      "https://www.googleapis.com/auth/cloud-platform";

  // Lists Services in a given project and location.
  rpc ListServices(ListServicesRequest) returns (ListServicesResponse) {
    option (google.api.http) = {
      get: "/v1beta/{parent=projects/*/locations/*}/services"
    };
    option (google.api.method_signature) = "parent";
  }

  // Gets details of a single Service.
  rpc GetService(GetServiceRequest) returns (Service) {
    option (google.api.http) = {
      get: "/v1beta/{name=projects/*/locations/*/services/*}"
    };
    option (google.api.method_signature) = "name";
  }

  // Lists PrivateOffers for the given parent.
  rpc ListPrivateOffers(ListPrivateOffersRequest)
      returns (ListPrivateOffersResponse) {
    option (google.api.http) = {
      get: "/v1beta/{parent=projects/*/locations/*}/privateOffers"
    };
    option (google.api.method_signature) = "parent";
  }

  // Gets details of a single PrivateOffer.
  rpc GetPrivateOffer(GetPrivateOfferRequest) returns (PrivateOffer) {
    option (google.api.http) = {
      get: "/v1beta/{name=projects/*/locations/*/privateOffers/*}"
    };
    option (google.api.method_signature) = "name";
  }

  // Resolves the existing offer that must be amended when creating a new
  // PrivateOffer. Use this method to determine the correct amendment target
  // before creating or publishing an offer.
  rpc ResolveAmendmentTarget(ResolveAmendmentTargetRequest)
      returns (ResolveAmendmentTargetResponse) {
    option (google.api.http) = {
      get: "/v1beta/{parent=projects/*/locations/*}/privateOffers:resolveAmendmentTarget"
    };
    option (google.api.method_signature) =
        "parent,target_billing_account,base_standard_offer";
  }

  // Creates a new PrivateOffer in a given project and location.
  rpc CreatePrivateOffer(CreatePrivateOfferRequest) returns (PrivateOffer) {
    option (google.api.http) = {
      post: "/v1beta/{parent=projects/*/locations/*}/privateOffers"
      body: "private_offer"
    };
  }

  // Updates the target PrivateOffer.
  rpc UpdatePrivateOffer(UpdatePrivateOfferRequest) returns (PrivateOffer) {
    option (google.api.http) = {
      patch: "/v1beta/{private_offer.name=projects/*/locations/*/privateOffers/*}"
      body: "private_offer"
    };
    option (google.api.method_signature) = "private_offer,update_mask";
  }

  // Publishes the target PrivateOffer.
  rpc PublishPrivateOffer(PublishPrivateOfferRequest) returns (PrivateOffer) {
    option (google.api.http) = {
      post: "/v1beta/{name=projects/*/locations/*/privateOffers/*}:publish"
      body: "*"
    };
    option (google.api.method_signature) = "name";
  }

  // Cancels the target PrivateOffer.
  rpc CancelPrivateOffer(CancelPrivateOfferRequest) returns (PrivateOffer) {
    option (google.api.http) = {
      post: "/v1beta/{name=projects/*/locations/*/privateOffers/*}:cancel"
      body: "*"
    };
    option (google.api.method_signature) = "name";
  }

  // Deletes the target PrivateOffer.
  rpc DeletePrivateOffer(DeletePrivateOfferRequest)
      returns (google.protobuf.Empty) {
    option (google.api.http) = {
      delete: "/v1beta/{name=projects/*/locations/*/privateOffers/*}"
    };
    option (google.api.method_signature) = "name";
  }

  // Lists PrivateOfferDocuments for the given parent.
  rpc ListPrivateOfferDocuments(ListPrivateOfferDocumentsRequest)
      returns (ListPrivateOfferDocumentsResponse) {
    option (google.api.http) = {
      get: "/v1beta/{parent=projects/*/locations/*/privateOffers/*}/documents"
    };
    option (google.api.method_signature) = "parent";
  }

  // Gets details of a single PrivateOfferDocument.
  rpc GetPrivateOfferDocument(GetPrivateOfferDocumentRequest)
      returns (PrivateOfferDocument) {
    option (google.api.http) = {
      get: "/v1beta/{name=projects/*/locations/*/privateOffers/*/documents/*}"
    };
    option (google.api.method_signature) = "name";
  }

  // Creates a new PrivateOfferDocument in a given project and location.
  rpc CreatePrivateOfferDocument(CreatePrivateOfferDocumentRequest)
      returns (PrivateOfferDocument) {
    option (google.api.http) = {
      post: "/v1beta/{parent=projects/*/locations/*/privateOffers/*}/documents"
      body: "private_offer_document"
    };
  }

  // Updates the target PrivateOfferDocument.
  rpc UpdatePrivateOfferDocument(UpdatePrivateOfferDocumentRequest)
      returns (PrivateOfferDocument) {
    option (google.api.http) = {
      patch: "/v1beta/{private_offer_document.name=projects/*/locations/*/privateOffers/*/documents/*}"
      body: "private_offer_document"
    };
    option (google.api.method_signature) = "private_offer_document,update_mask";
  }

  // Deletes the target PrivateOfferDocument.
  rpc DeletePrivateOfferDocument(DeletePrivateOfferDocumentRequest)
      returns (google.protobuf.Empty) {
    option (google.api.http) = {
      delete: "/v1beta/{name=projects/*/locations/*/privateOffers/*/documents/*}"
    };
    option (google.api.method_signature) = "name";
  }

  // Lists StandardOffers for the given parent.
  rpc ListStandardOffers(ListStandardOffersRequest)
      returns (ListStandardOffersResponse) {
    option (google.api.http) = {
      get: "/v1beta/{parent=projects/*/locations/*/services/*}/standardOffers"
    };
    option (google.api.method_signature) = "parent";
  }

  // Gets details of a single StandardOffer.
  rpc GetStandardOffer(GetStandardOfferRequest) returns (StandardOffer) {
    option (google.api.http) = {
      get: "/v1beta/{name=projects/*/locations/*/services/*/standardOffers/*}"
    };
    option (google.api.method_signature) = "name";
  }

  // Gets details of a single Sku.
  rpc GetSku(GetSkuRequest) returns (Sku) {
    option (google.api.http) = {
      get: "/v1beta/{name=projects/*/locations/*/services/*/skus/*}"
    };
    option (google.api.method_signature) = "name";
  }

  // Lists Skus for the given parent.
  rpc ListSkus(ListSkusRequest) returns (ListSkusResponse) {
    option (google.api.http) = {
      get: "/v1beta/{parent=projects/*/locations/*/services/*}/skus"
    };
    option (google.api.method_signature) = "parent";
  }

  // Gets details of a single SkuGroup.
  rpc GetSkuGroup(GetSkuGroupRequest) returns (SkuGroup) {
    option (google.api.http) = {
      get: "/v1beta/{name=projects/*/locations/*/skuGroups/*}"
    };
    option (google.api.method_signature) = "name";
  }

  // Lists SkuGroups for the given parent.
  rpc ListSkuGroups(ListSkuGroupsRequest) returns (ListSkuGroupsResponse) {
    option (google.api.http) = {
      get: "/v1beta/{parent=projects/*/locations/*}/skuGroups"
    };
    option (google.api.method_signature) = "parent";
  }
}

// Controls which fields are returned in a PrivateOffer returned by the API.
// https://google.aip.dev/157
enum PrivateOfferView {
  // The default / unset value.
  // The API will default to the BASIC view.
  PRIVATE_OFFER_VIEW_UNSPECIFIED = 0;

  // Include basic metadata about the PrivateOffer, but not the full contents.
  // This is the default value (for both List and Get requests).
  PRIVATE_OFFER_VIEW_BASIC = 1;

  // Include everything.
  PRIVATE_OFFER_VIEW_FULL = 2;
}

// Controls which fields are returned in a StandardOffer returned by the API.
// https://google.aip.dev/157
enum StandardOfferView {
  // The default / unset value.
  // The API will default to the BASIC view.
  STANDARD_OFFER_VIEW_UNSPECIFIED = 0;

  // Include basic metadata about the StandardOffer, but not the full contents.
  // This is the default value (for both List and Get requests).
  STANDARD_OFFER_VIEW_BASIC = 1;

  // Include everything.
  STANDARD_OFFER_VIEW_FULL = 2;
}

// Controls which fields are returned in a Service returned by the API.
// https://google.aip.dev/157
enum ServiceView {
  // The default / unset value.
  // The API will default to the BASIC view.
  SERVICE_VIEW_UNSPECIFIED = 0;

  // Include basic metadata about the Service, but not the full contents.
  // This is the default value (for both List and Get requests).
  SERVICE_VIEW_BASIC = 1;

  // Include everything.
  SERVICE_VIEW_FULL = 2;
}

// Message for requesting list of PrivateOffers
message ListPrivateOffersRequest {
  // Required. Parent value for ListPrivateOffersRequest
  string parent = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      child_type: "commerceproducer.googleapis.com/PrivateOffer"
    }
  ];

  // Optional. Maximum results to return. The service may return fewer than this
  // value. The maximum value is 500; values above 500 will be coerced to 500.
  // If unspecified, the server will default to the maximum.
  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];

  // Optional. A page token, received from a previous list response message.
  // Provide this to retrieve the subsequent page.
  //
  // When paginating, all other parameters of the list request must match the
  // request that returned the page token.
  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];

  // Optional. Filter expression that matches a subset of resources to show.
  // See https://google.aip.dev/160 for more details.
  // Only supports filtering by:
  //
  // * `update_time`. Example: `update_time > "2012-04-21T11:30:00-04:00"`.
  string filter = 4 [(google.api.field_behavior) = OPTIONAL];

  // Optional. Ordering expression for sorting the results.
  // See https://google.aip.dev/132#ordering for more details.
  // If no value is present the default ordering is unspecified.
  // Only supports ordering by:
  //
  // * `update_time`
  string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
}

// Message for response to listing PrivateOffers
message ListPrivateOffersResponse {
  // The list of PrivateOffer
  repeated PrivateOffer private_offers = 1;

  // A token, which 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 = 2;
}

// Message for getting a PrivateOffer
message GetPrivateOfferRequest {
  // Required. Name of the resource
  string name = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "commerceproducer.googleapis.com/PrivateOffer"
    }
  ];

  // Optional. The view of the PrivateOffer to return.
  // If unspecified, the default view is BASIC.
  PrivateOfferView view = 2 [(google.api.field_behavior) = OPTIONAL];
}

// Message for resolving an amended offer.
message ResolveAmendmentTargetRequest {
  // Required. Parent value for ResolveAmendmentTargetRequest
  string parent = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      child_type: "commerceproducer.googleapis.com/PrivateOffer"
    }
  ];

  // Required. The customer's billing account targeted by the offer. This is the
  // billing account for which the new private offer will be created on. Format:
  // billingAccounts/{billing_account}.
  string target_billing_account = 2 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "cloudbilling.googleapis.com/BillingAccount"
    }
  ];

  // Required. The base standard offer that the private offer will be based on.
  // Format:
  // projects/{project}/locations/{location}/services/{service}/standardOffers/{standard_offer}.
  string base_standard_offer = 3 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "commerceproducer.googleapis.com/StandardOffer"
    }
  ];
}

// Message in response to ResolveAmendmentTarget.
message ResolveAmendmentTargetResponse {
  // A wrapper message containing offers that can optionally be amended.
  message OptionalOffers {
    // A list of existing private offers that are eligible to be amended.
    //
    // When creating a new private offer, the client may choose to populate the
    // `single_product_offer.amended_private_offer` field with one of these
    // resource names. Alternatively, the client may leave the field unset to
    // create a brand new offer.
    repeated string private_offers = 1 [(google.api.resource_reference) = {
      type: "commerceproducer.googleapis.com/PrivateOffer"
    }];
  }

  // The amendment requirements for the new private offer.
  //
  // If this oneof is empty, the client should create a brand new offer.
  oneof amendment_requirement {
    // The resource name of an existing private offer that MUST be amended.
    //
    // If this is set, the new private offer the client creates must populate
    // the `single_product_offer.amended_private_offer` field with this value.
    string required_private_offer = 1 [(google.api.resource_reference) = {
      type: "commerceproducer.googleapis.com/PrivateOffer"
    }];

    // The resource name of an existing standard offer that MUST be amended.
    //
    // If this is set, the new private offer the client creates must populate
    // the `single_product_offer.amended_standard_offer` field with this value.
    string required_standard_offer = 2 [(google.api.resource_reference) = {
      type: "commerceproducer.googleapis.com/StandardOffer"
    }];

    // A list of existing offers that may optionally be amended.
    OptionalOffers optional_offers = 3;
  }
}

// Message for creating a PrivateOffer
message CreatePrivateOfferRequest {
  // Required. Value for parent.
  string parent = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      child_type: "commerceproducer.googleapis.com/PrivateOffer"
    }
  ];

  // Required. The resource being created
  PrivateOffer private_offer = 3 [(google.api.field_behavior) = REQUIRED];
}

// Message for updating a PrivateOffer
message UpdatePrivateOfferRequest {
  // Optional. The list of fields to update.
  // The fields specified in the update_mask are relative to the resource, not
  // the full request. A field will be overwritten if it is in the mask.
  // The special value "*" means full replacement.
  // If unspecified, all fields present in the request will be overwritten.
  google.protobuf.FieldMask update_mask = 1
      [(google.api.field_behavior) = OPTIONAL];

  // Required. The resource being updated
  PrivateOffer private_offer = 2 [(google.api.field_behavior) = REQUIRED];
}

// Message for publishing a PrivateOffer
message PublishPrivateOfferRequest {
  // Required. Name of the resource
  string name = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "commerceproducer.googleapis.com/PrivateOffer"
    }
  ];

  // Optional. If set to `true`, validates the request but does not execute it.
  bool validate_only = 2 [(google.api.field_behavior) = OPTIONAL];
}

// Message for cancelling a PrivateOffer
message CancelPrivateOfferRequest {
  // Required. Name of the resource
  string name = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "commerceproducer.googleapis.com/PrivateOffer"
    }
  ];

  // Optional. Internal note relating to the cancellation.
  // Stored on the cancelled offer. Not visible to customers.
  string cancellation_note = 2 [(google.api.field_behavior) = OPTIONAL];
}

// Message for deleting a PrivateOffer
message DeletePrivateOfferRequest {
  // Required. Name of the resource
  string name = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "commerceproducer.googleapis.com/PrivateOffer"
    }
  ];

  // Optional. Indicates whether to cascade the delete to child resources.
  // If false, the request fails if child resources exist.
  bool force = 2 [(google.api.field_behavior) = OPTIONAL];
}

// Message for requesting list of PrivateOfferDocuments
message ListPrivateOfferDocumentsRequest {
  // Required. Parent value for ListPrivateOfferDocumentsRequest.
  string parent = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      child_type: "commerceproducer.googleapis.com/PrivateOfferDocument"
    }
  ];

  // Optional. Maximum results to return. The service may return fewer than this
  // value. The maximum value is 500; values above 500 will be coerced to 500.
  // If unspecified, the server will default to the maximum.
  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];

  // Optional. A page token, received from a previous list response message.
  // Provide this to retrieve the subsequent page.
  //
  // When paginating, all other parameters of the list request must match the
  // request that returned the page token.
  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
}

// Message for response to listing PrivateOfferDocuments
message ListPrivateOfferDocumentsResponse {
  // The list of PrivateOfferDocuments.
  repeated PrivateOfferDocument private_offer_documents = 1;

  // A token, which 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 = 2;
}

// Message for getting a PrivateOfferDocument
message GetPrivateOfferDocumentRequest {
  // Required. Name of the resource.
  string name = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "commerceproducer.googleapis.com/PrivateOfferDocument"
    }
  ];
}

// Message for creating a PrivateOfferDocument.
message CreatePrivateOfferDocumentRequest {
  // Required. Value for parent.
  string parent = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      child_type: "commerceproducer.googleapis.com/PrivateOfferDocument"
    }
  ];

  // Required. The resource being created.
  PrivateOfferDocument private_offer_document = 3
      [(google.api.field_behavior) = REQUIRED];
}

// Message for updating a PrivateOfferDocument
message UpdatePrivateOfferDocumentRequest {
  // Required. The resource being updated.
  PrivateOfferDocument private_offer_document = 1
      [(google.api.field_behavior) = REQUIRED];

  // Optional. The list of fields to update.
  // The fields specified in the update_mask are relative to the resource, not
  // the full request. A field will be overwritten if it is in the mask.
  // The special value "*" means full replacement.
  // If unspecified, all fields present in the request will be overwritten.
  google.protobuf.FieldMask update_mask = 2
      [(google.api.field_behavior) = OPTIONAL];
}

// Message for deleting a PrivateOfferDocument
message DeletePrivateOfferDocumentRequest {
  // Required. Name of the resource.
  string name = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "commerceproducer.googleapis.com/PrivateOfferDocument"
    }
  ];
}

// Message for requesting list of Services
message ListServicesRequest {
  // Required. Parent value for ListServicesRequest
  string parent = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      child_type: "commerceproducer.googleapis.com/Service"
    }
  ];

  // Optional. Maximum results to return. The service may return fewer than this
  // value. The maximum value is 500; values above 500 will be coerced to 500.
  // If unspecified, the server will default to the maximum.
  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];

  // Optional. A token identifying a page of results the server should return.
  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
}

// Message for response to listing Services
message ListServicesResponse {
  // The list of Service
  repeated Service services = 1;

  // A token, which 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 = 2;
}

// Message for getting a Service
message GetServiceRequest {
  // Required. Name of the resource
  string name = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "commerceproducer.googleapis.com/Service"
    }
  ];

  // Optional. The view of the Service to return.
  // If unspecified, the default view is BASIC.
  ServiceView view = 2 [(google.api.field_behavior) = OPTIONAL];
}

// Message for requesting list of StandardOffers
message ListStandardOffersRequest {
  // Required. Parent value for ListStandardOffersRequest
  string parent = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      child_type: "commerceproducer.googleapis.com/StandardOffer"
    }
  ];

  // Optional. Maximum results to return. The service may return fewer than this
  // value. The maximum value is 500; values above 500 will be coerced to 500.
  // If unspecified, the server will default to the maximum.
  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];

  // Optional. A page token, received from a previous list response message.
  // Provide this to retrieve the subsequent page.
  //
  // When paginating, all other parameters of the list request must match the
  // request that returned the page token.
  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];

  // Optional. Filter expression that matches a subset of resources to show.
  // See https://google.aip.dev/160 for more details.
  // Supports filtering by:
  //
  // * `effective_time`.
  //   Example: `effective_time > "2012-04-21T11:30:00-04:00"`.
  // * `expire_time`. Example: `expire_time < "2026-05-06T00:00:00Z"`.
  string filter = 4 [(google.api.field_behavior) = OPTIONAL];

  // Optional. Ordering expression for sorting the results.
  // See https://google.aip.dev/132#ordering for more details.
  // If no value is present the default ordering is unspecified.
  // Supports ordering by:
  //
  // * `effective_time`
  // * `expire_time`
  string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
}

// Message for response to listing StandardOffers
message ListStandardOffersResponse {
  // The list of StandardOffer
  repeated StandardOffer standard_offers = 1;

  // A token, which 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 = 2;
}

// Message for getting a StandardOffer
message GetStandardOfferRequest {
  // Required. Name of the resource
  string name = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "commerceproducer.googleapis.com/StandardOffer"
    }
  ];

  // Optional. The view of the StandardOffer to return.
  // If unspecified, the default view is BASIC.
  StandardOfferView view = 2 [(google.api.field_behavior) = OPTIONAL];
}

// Message for requesting list of Skus
message ListSkusRequest {
  // Required. Parent value for ListSkusRequest
  string parent = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      child_type: "commerceproducer.googleapis.com/Sku"
    }
  ];

  // Optional. Maximum results to return. The service may return fewer than this
  // value. The maximum value is 500; values above 500 will be coerced to 500.
  // If unspecified, the server will default to the maximum.
  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];

  // Optional. A page token, received from a previous list response message.
  // Provide this to retrieve the subsequent page.
  //
  // When paginating, all other parameters of the list request must match the
  // request that returned the page token.
  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
}

// Message for response to listing Skus
message ListSkusResponse {
  // The list of Sku
  repeated Sku skus = 1;

  // A token, which 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 = 2;
}

// Message for getting a Sku
message GetSkuRequest {
  // Required. Name of the resource
  string name = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "commerceproducer.googleapis.com/Sku"
    }
  ];
}

// Message for getting a SkuGroup
message GetSkuGroupRequest {
  // Required. Name of the resource
  string name = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "commerceproducer.googleapis.com/SkuGroup"
    }
  ];
}

// Message for requesting list of SkuGroups
message ListSkuGroupsRequest {
  // Required. Parent value for ListSkuGroupsRequest
  string parent = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      child_type: "commerceproducer.googleapis.com/SkuGroup"
    }
  ];

  // Optional. Maximum results to return. The service may return fewer than this
  // value. The maximum value is 500; values above 500 will be coerced to 500.
  // If unspecified, the server will default to the maximum.
  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];

  // Optional. A page token, received from a previous list response message.
  // Provide this to retrieve the subsequent page.
  //
  // When paginating, all other parameters of the list request must match the
  // request that returned the page token.
  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
}

// Message for response to listing SkuGroups
message ListSkuGroupsResponse {
  // The list of SkuGroup
  repeated SkuGroup sku_groups = 1;

  // A token, which 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 = 2;
}
