// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.6
// 	protoc        v3.21.12
// source: yandex/cloud/billing/usage_records/v1/credit.proto

package usageRecords

import (
	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)
)

// Detailed breakdown of credits (discounts, incentives, grants, etc.) applied to an entity.
// Credits reduce the effective cost that customers pay for cloud resources.
// The 'credit' field is the total amount of credits (the sum of all credit types below).
// This breakdown allows for detailed analysis of different discount types affecting billing.
type CreditDetails struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Total amount of credits (sum of all credit types) applied to the entity.
	// This is the overall discount applied, reducing the cost to arrive at the final expense.
	// Formula: expense = cost + credit
	Credit *StringDecimal `protobuf:"bytes,1,opt,name=credit,proto3" json:"credit,omitempty"`
	// Credits granted as a one-time monetary grant.
	MonetaryGrantCredit *StringDecimal `protobuf:"bytes,2,opt,name=monetary_grant_credit,json=monetaryGrantCredit,proto3" json:"monetary_grant_credit,omitempty"`
	// Credits given as a volume-based incentive.
	VolumeIncentiveCredit *StringDecimal `protobuf:"bytes,3,opt,name=volume_incentive_credit,json=volumeIncentiveCredit,proto3" json:"volume_incentive_credit,omitempty"`
	// Committed Use Discount credits.
	CudCredit *StringDecimal `protobuf:"bytes,4,opt,name=cud_credit,json=cudCredit,proto3" json:"cud_credit,omitempty"`
	// Credits provided as part of a 'free' program.
	FreeCredit    *StringDecimal `protobuf:"bytes,5,opt,name=free_credit,json=freeCredit,proto3" json:"free_credit,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*CreditDetails) ProtoMessage() {}

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

func (x *CreditDetails) GetCredit() *StringDecimal {
	if x != nil {
		return x.Credit
	}
	return nil
}

func (x *CreditDetails) GetMonetaryGrantCredit() *StringDecimal {
	if x != nil {
		return x.MonetaryGrantCredit
	}
	return nil
}

func (x *CreditDetails) GetVolumeIncentiveCredit() *StringDecimal {
	if x != nil {
		return x.VolumeIncentiveCredit
	}
	return nil
}

func (x *CreditDetails) GetCudCredit() *StringDecimal {
	if x != nil {
		return x.CudCredit
	}
	return nil
}

func (x *CreditDetails) GetFreeCredit() *StringDecimal {
	if x != nil {
		return x.FreeCredit
	}
	return nil
}

var File_yandex_cloud_billing_usage_records_v1_credit_proto protoreflect.FileDescriptor

const file_yandex_cloud_billing_usage_records_v1_credit_proto_rawDesc = "" +
	"\n" +
	"2yandex/cloud/billing/usage_records/v1/credit.proto\x12%yandex.cloud.billing.usage_records.v1\x1a8yandex/cloud/billing/usage_records/v1/common_types.proto\"\xe1\x03\n" +
	"\rCreditDetails\x12L\n" +
	"\x06credit\x18\x01 \x01(\v24.yandex.cloud.billing.usage_records.v1.StringDecimalR\x06credit\x12h\n" +
	"\x15monetary_grant_credit\x18\x02 \x01(\v24.yandex.cloud.billing.usage_records.v1.StringDecimalR\x13monetaryGrantCredit\x12l\n" +
	"\x17volume_incentive_credit\x18\x03 \x01(\v24.yandex.cloud.billing.usage_records.v1.StringDecimalR\x15volumeIncentiveCredit\x12S\n" +
	"\n" +
	"cud_credit\x18\x04 \x01(\v24.yandex.cloud.billing.usage_records.v1.StringDecimalR\tcudCredit\x12U\n" +
	"\vfree_credit\x18\x05 \x01(\v24.yandex.cloud.billing.usage_records.v1.StringDecimalR\n" +
	"freeCreditB\x83\x01\n" +
	")yandex.cloud.api.billing.usage_records.v1ZVgithub.com/yandex-cloud/go-genproto/yandex/cloud/billing/usage_records/v1;usageRecordsb\x06proto3"

var (
	file_yandex_cloud_billing_usage_records_v1_credit_proto_rawDescOnce sync.Once
	file_yandex_cloud_billing_usage_records_v1_credit_proto_rawDescData []byte
)

func file_yandex_cloud_billing_usage_records_v1_credit_proto_rawDescGZIP() []byte {
	file_yandex_cloud_billing_usage_records_v1_credit_proto_rawDescOnce.Do(func() {
		file_yandex_cloud_billing_usage_records_v1_credit_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_yandex_cloud_billing_usage_records_v1_credit_proto_rawDesc), len(file_yandex_cloud_billing_usage_records_v1_credit_proto_rawDesc)))
	})
	return file_yandex_cloud_billing_usage_records_v1_credit_proto_rawDescData
}

var file_yandex_cloud_billing_usage_records_v1_credit_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_yandex_cloud_billing_usage_records_v1_credit_proto_goTypes = []any{
	(*CreditDetails)(nil), // 0: yandex.cloud.billing.usage_records.v1.CreditDetails
	(*StringDecimal)(nil), // 1: yandex.cloud.billing.usage_records.v1.StringDecimal
}
var file_yandex_cloud_billing_usage_records_v1_credit_proto_depIdxs = []int32{
	1, // 0: yandex.cloud.billing.usage_records.v1.CreditDetails.credit:type_name -> yandex.cloud.billing.usage_records.v1.StringDecimal
	1, // 1: yandex.cloud.billing.usage_records.v1.CreditDetails.monetary_grant_credit:type_name -> yandex.cloud.billing.usage_records.v1.StringDecimal
	1, // 2: yandex.cloud.billing.usage_records.v1.CreditDetails.volume_incentive_credit:type_name -> yandex.cloud.billing.usage_records.v1.StringDecimal
	1, // 3: yandex.cloud.billing.usage_records.v1.CreditDetails.cud_credit:type_name -> yandex.cloud.billing.usage_records.v1.StringDecimal
	1, // 4: yandex.cloud.billing.usage_records.v1.CreditDetails.free_credit:type_name -> yandex.cloud.billing.usage_records.v1.StringDecimal
	5, // [5:5] is the sub-list for method output_type
	5, // [5:5] is the sub-list for method input_type
	5, // [5:5] is the sub-list for extension type_name
	5, // [5:5] is the sub-list for extension extendee
	0, // [0:5] is the sub-list for field type_name
}

func init() { file_yandex_cloud_billing_usage_records_v1_credit_proto_init() }
func file_yandex_cloud_billing_usage_records_v1_credit_proto_init() {
	if File_yandex_cloud_billing_usage_records_v1_credit_proto != nil {
		return
	}
	file_yandex_cloud_billing_usage_records_v1_common_types_proto_init()
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_yandex_cloud_billing_usage_records_v1_credit_proto_rawDesc), len(file_yandex_cloud_billing_usage_records_v1_credit_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   1,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_yandex_cloud_billing_usage_records_v1_credit_proto_goTypes,
		DependencyIndexes: file_yandex_cloud_billing_usage_records_v1_credit_proto_depIdxs,
		MessageInfos:      file_yandex_cloud_billing_usage_records_v1_credit_proto_msgTypes,
	}.Build()
	File_yandex_cloud_billing_usage_records_v1_credit_proto = out.File
	file_yandex_cloud_billing_usage_records_v1_credit_proto_goTypes = nil
	file_yandex_cloud_billing_usage_records_v1_credit_proto_depIdxs = nil
}
