syntax = "proto3";

package com.wix.ecommerce.commons.api;

import "google/protobuf/wrappers.proto";
import "wix/api/annotations.proto";
import "wix/common/paging.proto";

option java_multiple_files = true;
option java_package = "com.wix.ecommerce.commons.api";

message PlatformPagingMetadata {
    option (.wix.api.decomposite_of) = "wix.common.PagingMetadataV2";
    option (.wix.api.decomposition_minimum_fields) = {
        field: "count"
        field: "offset"
        field: "cursors"
    };
    // The number of items returned in this response.
    google.protobuf.Int32Value count = 1;
    // The offset which was requested. Returned if offset paging was used.
    google.protobuf.Int32Value offset = 2;
    // The total number of items that match the query. Returned if offset paging was used.
    google.protobuf.Int32Value total = 3;
    // Cursors to navigate through result pages. Returned if cursor paging was used.
    .wix.common.Cursors cursors = 5;
}

message PlatformPagingMetadataV2 {
    option (.wix.api.decomposite_of) = "wix.common.PagingMetadataV2";
    option (.wix.api.decomposition_minimum_fields) = {
        field: "count"
        field: "offset"
    };
    option (.wix.api.decomposition_minimum_fields) = {
        field: "count"
        field: "cursors"
    };
    // The number of items returned in this response.
    google.protobuf.Int32Value count = 1;
    // The offset which was requested. Returned if offset paging was used.
    google.protobuf.Int32Value offset = 2 [(.wix.api.field_exposure) = PRIVATE];
    // The total number of items that match the query. Returned if offset paging was used.
    google.protobuf.Int32Value total = 3 [(.wix.api.field_exposure) = PRIVATE];
    // Cursors to navigate through result pages. Returned if cursor paging was used.
    .wix.common.Cursors cursors = 5;
}

