aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/yandex-cloud-api-protos/yandex/cloud/billing/v1/sku.proto
blob: d7b268ca5cc57cafc66df1e0bc9937d5b0f8f93f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
syntax = "proto3";
package yandex.cloud.billing.v1;

import "google/protobuf/timestamp.proto";

option go_package = "github.com/yandex-cloud/go-genproto/yandex/cloud/billing/v1;billing";
option java_package = "yandex.cloud.api.billing.v1";


// A Stock keeping unit resource.
message Sku {

    // ID of the SKU.
    string id = 1;

    // Name of the SKU.
    string name = 2;

    // Description of the sku.
    string description = 3;

    // ID of the service that sku belongs to.
    string service_id = 4;

    // Pricing unit of the SKU, e.g. `core*hour`, `gbyte*hour`.
    string pricing_unit = 5;

    // List of pricing versions.
    repeated PricingVersion pricing_versions = 6;
}


// Pricing version of the SKU.
// Defines current and past prices for the sku.
message PricingVersion {

    // Type of the pricing version.
    PricingVersionType type = 1;

    // Timestamp pricing version is active since inclusive.
    // The pricing version is active until next pricing version effective time exclusive.
    google.protobuf.Timestamp effective_time = 2;

    // List of pricing expressions.
    repeated PricingExpression pricing_expressions = 3;
}


// Type of the pricing version.
enum PricingVersionType {

    PRICING_VERSION_TYPE_UNSPECIFIED = 0;

    // Regular price.
    STREET_PRICE = 1;

    // Price is overridden by a contract. Defined in the scope of a billing account.
    CONTRACT_PRICE = 2;
}

// Pricing expression of the pricing version.
// Defines price for the sku.
message PricingExpression {

    // List of rates.
    repeated Rate rates = 2;
}

// Rate of the pricing expression.
// Define unit price for pricing quantity interval.
message Rate {

    // Start of the pricing quantity interval. The end of the interval is the start pricing quantity of the next rate.
    string start_pricing_quantity = 1;

    // Unit price for the pricing quantity interval.
    string unit_price = 2;

    // Currency of the unit price.
    // Can be one of the following:
    // * `RUB`
    // * `USD`
    // * `KZT`
    string currency = 3;
}