// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.6
// 	protoc        v3.21.12
// source: yandex/cloud/marketplace/metering/v1/usage_record.proto

package metering

import (
	_ "github.com/yandex-cloud/go-genproto/yandex/cloud"
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	timestamppb "google.golang.org/protobuf/types/known/timestamppb"
	reflect "reflect"
	sync "sync"
	unsafe "unsafe"
)

const (
	// Verify that this generated code is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
	// Verify that runtime/protoimpl is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)

type RejectedUsageRecord_Reason int32

const (
	RejectedUsageRecord_REASON_UNSPECIFIED RejectedUsageRecord_Reason = 0
	RejectedUsageRecord_DUPLICATE          RejectedUsageRecord_Reason = 1
	RejectedUsageRecord_EXPIRED            RejectedUsageRecord_Reason = 2
	RejectedUsageRecord_INVALID_TIMESTAMP  RejectedUsageRecord_Reason = 3
	RejectedUsageRecord_INVALID_SKU_ID     RejectedUsageRecord_Reason = 4
	RejectedUsageRecord_INVALID_PRODUCT_ID RejectedUsageRecord_Reason = 5
	RejectedUsageRecord_INVALID_QUANTITY   RejectedUsageRecord_Reason = 6
	RejectedUsageRecord_INVALID_ID         RejectedUsageRecord_Reason = 7
)

// Enum value maps for RejectedUsageRecord_Reason.
var (
	RejectedUsageRecord_Reason_name = map[int32]string{
		0: "REASON_UNSPECIFIED",
		1: "DUPLICATE",
		2: "EXPIRED",
		3: "INVALID_TIMESTAMP",
		4: "INVALID_SKU_ID",
		5: "INVALID_PRODUCT_ID",
		6: "INVALID_QUANTITY",
		7: "INVALID_ID",
	}
	RejectedUsageRecord_Reason_value = map[string]int32{
		"REASON_UNSPECIFIED": 0,
		"DUPLICATE":          1,
		"EXPIRED":            2,
		"INVALID_TIMESTAMP":  3,
		"INVALID_SKU_ID":     4,
		"INVALID_PRODUCT_ID": 5,
		"INVALID_QUANTITY":   6,
		"INVALID_ID":         7,
	}
)

func (x RejectedUsageRecord_Reason) Enum() *RejectedUsageRecord_Reason {
	p := new(RejectedUsageRecord_Reason)
	*p = x
	return p
}

func (x RejectedUsageRecord_Reason) String() string {
	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}

func (RejectedUsageRecord_Reason) Descriptor() protoreflect.EnumDescriptor {
	return file_yandex_cloud_marketplace_metering_v1_usage_record_proto_enumTypes[0].Descriptor()
}

func (RejectedUsageRecord_Reason) Type() protoreflect.EnumType {
	return &file_yandex_cloud_marketplace_metering_v1_usage_record_proto_enumTypes[0]
}

func (x RejectedUsageRecord_Reason) Number() protoreflect.EnumNumber {
	return protoreflect.EnumNumber(x)
}

// Deprecated: Use RejectedUsageRecord_Reason.Descriptor instead.
func (RejectedUsageRecord_Reason) EnumDescriptor() ([]byte, []int) {
	return file_yandex_cloud_marketplace_metering_v1_usage_record_proto_rawDescGZIP(), []int{2, 0}
}

type UsageRecord struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Unique identifier of the usage record (UUID format).
	Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
	// Consumed Marketplace SKU ID, linked to `UsageRecord.product_id`.
	SkuId string `protobuf:"bytes,2,opt,name=sku_id,json=skuId,proto3" json:"sku_id,omitempty"`
	// Quantity of SKU consumed, measured in `sku.usage_unit` units (e.g. bytes).
	Quantity int64 `protobuf:"varint,3,opt,name=quantity,proto3" json:"quantity,omitempty"`
	// Timestamp in UTC for which the usage is being reported.
	Timestamp     *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *UsageRecord) Reset() {
	*x = UsageRecord{}
	mi := &file_yandex_cloud_marketplace_metering_v1_usage_record_proto_msgTypes[0]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *UsageRecord) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*UsageRecord) ProtoMessage() {}

func (x *UsageRecord) ProtoReflect() protoreflect.Message {
	mi := &file_yandex_cloud_marketplace_metering_v1_usage_record_proto_msgTypes[0]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use UsageRecord.ProtoReflect.Descriptor instead.
func (*UsageRecord) Descriptor() ([]byte, []int) {
	return file_yandex_cloud_marketplace_metering_v1_usage_record_proto_rawDescGZIP(), []int{0}
}

func (x *UsageRecord) GetUuid() string {
	if x != nil {
		return x.Uuid
	}
	return ""
}

func (x *UsageRecord) GetSkuId() string {
	if x != nil {
		return x.SkuId
	}
	return ""
}

func (x *UsageRecord) GetQuantity() int64 {
	if x != nil {
		return x.Quantity
	}
	return 0
}

func (x *UsageRecord) GetTimestamp() *timestamppb.Timestamp {
	if x != nil {
		return x.Timestamp
	}
	return nil
}

type AcceptedUsageRecord struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Unique identifier of the usage record (UUID format).
	Uuid          string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *AcceptedUsageRecord) Reset() {
	*x = AcceptedUsageRecord{}
	mi := &file_yandex_cloud_marketplace_metering_v1_usage_record_proto_msgTypes[1]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *AcceptedUsageRecord) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*AcceptedUsageRecord) ProtoMessage() {}

func (x *AcceptedUsageRecord) ProtoReflect() protoreflect.Message {
	mi := &file_yandex_cloud_marketplace_metering_v1_usage_record_proto_msgTypes[1]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use AcceptedUsageRecord.ProtoReflect.Descriptor instead.
func (*AcceptedUsageRecord) Descriptor() ([]byte, []int) {
	return file_yandex_cloud_marketplace_metering_v1_usage_record_proto_rawDescGZIP(), []int{1}
}

func (x *AcceptedUsageRecord) GetUuid() string {
	if x != nil {
		return x.Uuid
	}
	return ""
}

type RejectedUsageRecord struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Unique identifier of the usage record (UUID format).
	Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
	// The reason of rejection.
	Reason        RejectedUsageRecord_Reason `protobuf:"varint,2,opt,name=reason,proto3,enum=yandex.cloud.marketplace.metering.v1.RejectedUsageRecord_Reason" json:"reason,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *RejectedUsageRecord) Reset() {
	*x = RejectedUsageRecord{}
	mi := &file_yandex_cloud_marketplace_metering_v1_usage_record_proto_msgTypes[2]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *RejectedUsageRecord) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*RejectedUsageRecord) ProtoMessage() {}

func (x *RejectedUsageRecord) ProtoReflect() protoreflect.Message {
	mi := &file_yandex_cloud_marketplace_metering_v1_usage_record_proto_msgTypes[2]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use RejectedUsageRecord.ProtoReflect.Descriptor instead.
func (*RejectedUsageRecord) Descriptor() ([]byte, []int) {
	return file_yandex_cloud_marketplace_metering_v1_usage_record_proto_rawDescGZIP(), []int{2}
}

func (x *RejectedUsageRecord) GetUuid() string {
	if x != nil {
		return x.Uuid
	}
	return ""
}

func (x *RejectedUsageRecord) GetReason() RejectedUsageRecord_Reason {
	if x != nil {
		return x.Reason
	}
	return RejectedUsageRecord_REASON_UNSPECIFIED
}

var File_yandex_cloud_marketplace_metering_v1_usage_record_proto protoreflect.FileDescriptor

const file_yandex_cloud_marketplace_metering_v1_usage_record_proto_rawDesc = "" +
	"\n" +
	"7yandex/cloud/marketplace/metering/v1/usage_record.proto\x12$yandex.cloud.marketplace.metering.v1\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1dyandex/cloud/validation.proto\"\xb8\x01\n" +
	"\vUsageRecord\x12 \n" +
	"\x04uuid\x18\x01 \x01(\tB\f\xe8\xc71\x01\x8a\xc81\x04<=36R\x04uuid\x12#\n" +
	"\x06sku_id\x18\x02 \x01(\tB\f\xe8\xc71\x01\x8a\xc81\x04<=50R\x05skuId\x12\"\n" +
	"\bquantity\x18\x03 \x01(\x03B\x06\xfa\xc71\x02>0R\bquantity\x12>\n" +
	"\ttimestamp\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampB\x04\xe8\xc71\x01R\ttimestamp\")\n" +
	"\x13AcceptedUsageRecord\x12\x12\n" +
	"\x04uuid\x18\x01 \x01(\tR\x04uuid\"\xab\x02\n" +
	"\x13RejectedUsageRecord\x12\x12\n" +
	"\x04uuid\x18\x01 \x01(\tR\x04uuid\x12X\n" +
	"\x06reason\x18\x02 \x01(\x0e2@.yandex.cloud.marketplace.metering.v1.RejectedUsageRecord.ReasonR\x06reason\"\xa5\x01\n" +
	"\x06Reason\x12\x16\n" +
	"\x12REASON_UNSPECIFIED\x10\x00\x12\r\n" +
	"\tDUPLICATE\x10\x01\x12\v\n" +
	"\aEXPIRED\x10\x02\x12\x15\n" +
	"\x11INVALID_TIMESTAMP\x10\x03\x12\x12\n" +
	"\x0eINVALID_SKU_ID\x10\x04\x12\x16\n" +
	"\x12INVALID_PRODUCT_ID\x10\x05\x12\x14\n" +
	"\x10INVALID_QUANTITY\x10\x06\x12\x0e\n" +
	"\n" +
	"INVALID_ID\x10\aB}\n" +
	"(yandex.cloud.api.marketplace.metering.v1ZQgithub.com/yandex-cloud/go-genproto/yandex/cloud/marketplace/metering/v1;meteringb\x06proto3"

var (
	file_yandex_cloud_marketplace_metering_v1_usage_record_proto_rawDescOnce sync.Once
	file_yandex_cloud_marketplace_metering_v1_usage_record_proto_rawDescData []byte
)

func file_yandex_cloud_marketplace_metering_v1_usage_record_proto_rawDescGZIP() []byte {
	file_yandex_cloud_marketplace_metering_v1_usage_record_proto_rawDescOnce.Do(func() {
		file_yandex_cloud_marketplace_metering_v1_usage_record_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_yandex_cloud_marketplace_metering_v1_usage_record_proto_rawDesc), len(file_yandex_cloud_marketplace_metering_v1_usage_record_proto_rawDesc)))
	})
	return file_yandex_cloud_marketplace_metering_v1_usage_record_proto_rawDescData
}

var file_yandex_cloud_marketplace_metering_v1_usage_record_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_yandex_cloud_marketplace_metering_v1_usage_record_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_yandex_cloud_marketplace_metering_v1_usage_record_proto_goTypes = []any{
	(RejectedUsageRecord_Reason)(0), // 0: yandex.cloud.marketplace.metering.v1.RejectedUsageRecord.Reason
	(*UsageRecord)(nil),             // 1: yandex.cloud.marketplace.metering.v1.UsageRecord
	(*AcceptedUsageRecord)(nil),     // 2: yandex.cloud.marketplace.metering.v1.AcceptedUsageRecord
	(*RejectedUsageRecord)(nil),     // 3: yandex.cloud.marketplace.metering.v1.RejectedUsageRecord
	(*timestamppb.Timestamp)(nil),   // 4: google.protobuf.Timestamp
}
var file_yandex_cloud_marketplace_metering_v1_usage_record_proto_depIdxs = []int32{
	4, // 0: yandex.cloud.marketplace.metering.v1.UsageRecord.timestamp:type_name -> google.protobuf.Timestamp
	0, // 1: yandex.cloud.marketplace.metering.v1.RejectedUsageRecord.reason:type_name -> yandex.cloud.marketplace.metering.v1.RejectedUsageRecord.Reason
	2, // [2:2] is the sub-list for method output_type
	2, // [2:2] is the sub-list for method input_type
	2, // [2:2] is the sub-list for extension type_name
	2, // [2:2] is the sub-list for extension extendee
	0, // [0:2] is the sub-list for field type_name
}

func init() { file_yandex_cloud_marketplace_metering_v1_usage_record_proto_init() }
func file_yandex_cloud_marketplace_metering_v1_usage_record_proto_init() {
	if File_yandex_cloud_marketplace_metering_v1_usage_record_proto != nil {
		return
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_yandex_cloud_marketplace_metering_v1_usage_record_proto_rawDesc), len(file_yandex_cloud_marketplace_metering_v1_usage_record_proto_rawDesc)),
			NumEnums:      1,
			NumMessages:   3,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_yandex_cloud_marketplace_metering_v1_usage_record_proto_goTypes,
		DependencyIndexes: file_yandex_cloud_marketplace_metering_v1_usage_record_proto_depIdxs,
		EnumInfos:         file_yandex_cloud_marketplace_metering_v1_usage_record_proto_enumTypes,
		MessageInfos:      file_yandex_cloud_marketplace_metering_v1_usage_record_proto_msgTypes,
	}.Build()
	File_yandex_cloud_marketplace_metering_v1_usage_record_proto = out.File
	file_yandex_cloud_marketplace_metering_v1_usage_record_proto_goTypes = nil
	file_yandex_cloud_marketplace_metering_v1_usage_record_proto_depIdxs = nil
}
