// 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/product_usage_service.proto

package metering

import (
	_ "github.com/yandex-cloud/go-genproto/yandex/cloud"
	_ "google.golang.org/genproto/googleapis/api/annotations"
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	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 WriteUsageRequest struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Do not write usage, only validate
	DryRun bool `protobuf:"varint,1,opt,name=dry_run,json=dryRun,proto3" json:"dry_run,omitempty"`
	// Marketplace Product Instance's ID
	ProductInstanceId string `protobuf:"bytes,2,opt,name=product_instance_id,json=productInstanceId,proto3" json:"product_instance_id,omitempty"`
	// List of product usage records (up to 25 per request)
	UsageRecords  []*UsageRecord `protobuf:"bytes,3,rep,name=usage_records,json=usageRecords,proto3" json:"usage_records,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*WriteUsageRequest) ProtoMessage() {}

func (x *WriteUsageRequest) ProtoReflect() protoreflect.Message {
	mi := &file_yandex_cloud_marketplace_metering_v1_product_usage_service_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 WriteUsageRequest.ProtoReflect.Descriptor instead.
func (*WriteUsageRequest) Descriptor() ([]byte, []int) {
	return file_yandex_cloud_marketplace_metering_v1_product_usage_service_proto_rawDescGZIP(), []int{0}
}

func (x *WriteUsageRequest) GetDryRun() bool {
	if x != nil {
		return x.DryRun
	}
	return false
}

func (x *WriteUsageRequest) GetProductInstanceId() string {
	if x != nil {
		return x.ProductInstanceId
	}
	return ""
}

func (x *WriteUsageRequest) GetUsageRecords() []*UsageRecord {
	if x != nil {
		return x.UsageRecords
	}
	return nil
}

type WriteUsageResponse struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// List of accepted product usage records
	Accepted []*AcceptedUsageRecord `protobuf:"bytes,1,rep,name=accepted,proto3" json:"accepted,omitempty"`
	// List of rejected product usage records (with reason)
	Rejected      []*RejectedUsageRecord `protobuf:"bytes,2,rep,name=rejected,proto3" json:"rejected,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*WriteUsageResponse) ProtoMessage() {}

func (x *WriteUsageResponse) ProtoReflect() protoreflect.Message {
	mi := &file_yandex_cloud_marketplace_metering_v1_product_usage_service_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 WriteUsageResponse.ProtoReflect.Descriptor instead.
func (*WriteUsageResponse) Descriptor() ([]byte, []int) {
	return file_yandex_cloud_marketplace_metering_v1_product_usage_service_proto_rawDescGZIP(), []int{1}
}

func (x *WriteUsageResponse) GetAccepted() []*AcceptedUsageRecord {
	if x != nil {
		return x.Accepted
	}
	return nil
}

func (x *WriteUsageResponse) GetRejected() []*RejectedUsageRecord {
	if x != nil {
		return x.Rejected
	}
	return nil
}

var File_yandex_cloud_marketplace_metering_v1_product_usage_service_proto protoreflect.FileDescriptor

const file_yandex_cloud_marketplace_metering_v1_product_usage_service_proto_rawDesc = "" +
	"\n" +
	"@yandex/cloud/marketplace/metering/v1/product_usage_service.proto\x12$yandex.cloud.marketplace.metering.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x1dyandex/cloud/validation.proto\x1a7yandex/cloud/marketplace/metering/v1/usage_record.proto\"\xcc\x01\n" +
	"\x11WriteUsageRequest\x12\x17\n" +
	"\adry_run\x18\x01 \x01(\bR\x06dryRun\x12<\n" +
	"\x13product_instance_id\x18\x02 \x01(\tB\f\xe8\xc71\x01\x8a\xc81\x04<=50R\x11productInstanceId\x12`\n" +
	"\rusage_records\x18\x03 \x03(\v21.yandex.cloud.marketplace.metering.v1.UsageRecordB\b\x82\xc81\x041-25R\fusageRecords\"\xc2\x01\n" +
	"\x12WriteUsageResponse\x12U\n" +
	"\baccepted\x18\x01 \x03(\v29.yandex.cloud.marketplace.metering.v1.AcceptedUsageRecordR\baccepted\x12U\n" +
	"\brejected\x18\x02 \x03(\v29.yandex.cloud.marketplace.metering.v1.RejectedUsageRecordR\brejected2\xca\x01\n" +
	"\x13ProductUsageService\x12\xb2\x01\n" +
	"\x05Write\x127.yandex.cloud.marketplace.metering.v1.WriteUsageRequest\x1a8.yandex.cloud.marketplace.metering.v1.WriteUsageResponse\"6\x82\xd3\xe4\x93\x020:\x01*\"+/marketplace/metering/v1/productUsage/writeB}\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_product_usage_service_proto_rawDescOnce sync.Once
	file_yandex_cloud_marketplace_metering_v1_product_usage_service_proto_rawDescData []byte
)

func file_yandex_cloud_marketplace_metering_v1_product_usage_service_proto_rawDescGZIP() []byte {
	file_yandex_cloud_marketplace_metering_v1_product_usage_service_proto_rawDescOnce.Do(func() {
		file_yandex_cloud_marketplace_metering_v1_product_usage_service_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_yandex_cloud_marketplace_metering_v1_product_usage_service_proto_rawDesc), len(file_yandex_cloud_marketplace_metering_v1_product_usage_service_proto_rawDesc)))
	})
	return file_yandex_cloud_marketplace_metering_v1_product_usage_service_proto_rawDescData
}

var file_yandex_cloud_marketplace_metering_v1_product_usage_service_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_yandex_cloud_marketplace_metering_v1_product_usage_service_proto_goTypes = []any{
	(*WriteUsageRequest)(nil),   // 0: yandex.cloud.marketplace.metering.v1.WriteUsageRequest
	(*WriteUsageResponse)(nil),  // 1: yandex.cloud.marketplace.metering.v1.WriteUsageResponse
	(*UsageRecord)(nil),         // 2: yandex.cloud.marketplace.metering.v1.UsageRecord
	(*AcceptedUsageRecord)(nil), // 3: yandex.cloud.marketplace.metering.v1.AcceptedUsageRecord
	(*RejectedUsageRecord)(nil), // 4: yandex.cloud.marketplace.metering.v1.RejectedUsageRecord
}
var file_yandex_cloud_marketplace_metering_v1_product_usage_service_proto_depIdxs = []int32{
	2, // 0: yandex.cloud.marketplace.metering.v1.WriteUsageRequest.usage_records:type_name -> yandex.cloud.marketplace.metering.v1.UsageRecord
	3, // 1: yandex.cloud.marketplace.metering.v1.WriteUsageResponse.accepted:type_name -> yandex.cloud.marketplace.metering.v1.AcceptedUsageRecord
	4, // 2: yandex.cloud.marketplace.metering.v1.WriteUsageResponse.rejected:type_name -> yandex.cloud.marketplace.metering.v1.RejectedUsageRecord
	0, // 3: yandex.cloud.marketplace.metering.v1.ProductUsageService.Write:input_type -> yandex.cloud.marketplace.metering.v1.WriteUsageRequest
	1, // 4: yandex.cloud.marketplace.metering.v1.ProductUsageService.Write:output_type -> yandex.cloud.marketplace.metering.v1.WriteUsageResponse
	4, // [4:5] is the sub-list for method output_type
	3, // [3:4] is the sub-list for method input_type
	3, // [3:3] is the sub-list for extension type_name
	3, // [3:3] is the sub-list for extension extendee
	0, // [0:3] is the sub-list for field type_name
}

func init() { file_yandex_cloud_marketplace_metering_v1_product_usage_service_proto_init() }
func file_yandex_cloud_marketplace_metering_v1_product_usage_service_proto_init() {
	if File_yandex_cloud_marketplace_metering_v1_product_usage_service_proto != nil {
		return
	}
	file_yandex_cloud_marketplace_metering_v1_usage_record_proto_init()
	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_product_usage_service_proto_rawDesc), len(file_yandex_cloud_marketplace_metering_v1_product_usage_service_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   2,
			NumExtensions: 0,
			NumServices:   1,
		},
		GoTypes:           file_yandex_cloud_marketplace_metering_v1_product_usage_service_proto_goTypes,
		DependencyIndexes: file_yandex_cloud_marketplace_metering_v1_product_usage_service_proto_depIdxs,
		MessageInfos:      file_yandex_cloud_marketplace_metering_v1_product_usage_service_proto_msgTypes,
	}.Build()
	File_yandex_cloud_marketplace_metering_v1_product_usage_service_proto = out.File
	file_yandex_cloud_marketplace_metering_v1_product_usage_service_proto_goTypes = nil
	file_yandex_cloud_marketplace_metering_v1_product_usage_service_proto_depIdxs = nil
}
