// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.6
// 	protoc        v6.31.1
// source: currencyservice.proto

package hipstershop

import (
	reflect "reflect"
	sync "sync"
	unsafe "unsafe"
)

import (
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"

	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)

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 Empty struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*Empty) ProtoMessage() {}

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

// Represents an amount of money with its currency type.
type Money struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The 3-letter currency code defined in ISO 4217.
	CurrencyCode string `protobuf:"bytes,1,opt,name=currency_code,json=currencyCode,proto3" json:"currency_code,omitempty"`
	// The whole units of the amount.
	// For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
	Units int64 `protobuf:"varint,2,opt,name=units,proto3" json:"units,omitempty"`
	// Number of nano (10^-9) units of the amount.
	// The value must be between -999,999,999 and +999,999,999 inclusive.
	// If `units` is positive, `nanos` must be positive or zero.
	// If `units` is zero, `nanos` can be positive, zero, or negative.
	// If `units` is negative, `nanos` must be negative or zero.
	// For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
	Nanos         int32 `protobuf:"varint,3,opt,name=nanos,proto3" json:"nanos,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*Money) ProtoMessage() {}

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

func (x *Money) GetCurrencyCode() string {
	if x != nil {
		return x.CurrencyCode
	}
	return ""
}

func (x *Money) GetUnits() int64 {
	if x != nil {
		return x.Units
	}
	return 0
}

func (x *Money) GetNanos() int32 {
	if x != nil {
		return x.Nanos
	}
	return 0
}

type GetSupportedCurrenciesResponse struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The 3-letter currency code defined in ISO 4217.
	CurrencyCodes []string `protobuf:"bytes,1,rep,name=currency_codes,json=currencyCodes,proto3" json:"currency_codes,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*GetSupportedCurrenciesResponse) ProtoMessage() {}

func (x *GetSupportedCurrenciesResponse) ProtoReflect() protoreflect.Message {
	mi := &file_currencyservice_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 GetSupportedCurrenciesResponse.ProtoReflect.Descriptor instead.
func (*GetSupportedCurrenciesResponse) Descriptor() ([]byte, []int) {
	return file_currencyservice_proto_rawDescGZIP(), []int{2}
}

func (x *GetSupportedCurrenciesResponse) GetCurrencyCodes() []string {
	if x != nil {
		return x.CurrencyCodes
	}
	return nil
}

type CurrencyConversionRequest struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	From  *Money                 `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"`
	// The 3-letter currency code defined in ISO 4217.
	ToCode        string `protobuf:"bytes,2,opt,name=to_code,json=toCode,proto3" json:"to_code,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *CurrencyConversionRequest) Reset() {
	*x = CurrencyConversionRequest{}
	mi := &file_currencyservice_proto_msgTypes[3]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*CurrencyConversionRequest) ProtoMessage() {}

func (x *CurrencyConversionRequest) ProtoReflect() protoreflect.Message {
	mi := &file_currencyservice_proto_msgTypes[3]
	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 CurrencyConversionRequest.ProtoReflect.Descriptor instead.
func (*CurrencyConversionRequest) Descriptor() ([]byte, []int) {
	return file_currencyservice_proto_rawDescGZIP(), []int{3}
}

func (x *CurrencyConversionRequest) GetFrom() *Money {
	if x != nil {
		return x.From
	}
	return nil
}

func (x *CurrencyConversionRequest) GetToCode() string {
	if x != nil {
		return x.ToCode
	}
	return ""
}

var File_currencyservice_proto protoreflect.FileDescriptor

const file_currencyservice_proto_rawDesc = "" +
	"\n" +
	"\x15currencyservice.proto\x12\vhipstershop\"\a\n" +
	"\x05Empty\"X\n" +
	"\x05Money\x12#\n" +
	"\rcurrency_code\x18\x01 \x01(\tR\fcurrencyCode\x12\x14\n" +
	"\x05units\x18\x02 \x01(\x03R\x05units\x12\x14\n" +
	"\x05nanos\x18\x03 \x01(\x05R\x05nanos\"G\n" +
	"\x1eGetSupportedCurrenciesResponse\x12%\n" +
	"\x0ecurrency_codes\x18\x01 \x03(\tR\rcurrencyCodes\"\\\n" +
	"\x19CurrencyConversionRequest\x12&\n" +
	"\x04from\x18\x01 \x01(\v2\x12.hipstershop.MoneyR\x04from\x12\x17\n" +
	"\ato_code\x18\x02 \x01(\tR\x06toCode2\xb7\x01\n" +
	"\x0fCurrencyService\x12[\n" +
	"\x16GetSupportedCurrencies\x12\x12.hipstershop.Empty\x1a+.hipstershop.GetSupportedCurrenciesResponse\"\x00\x12G\n" +
	"\aConvert\x12&.hipstershop.CurrencyConversionRequest\x1a\x12.hipstershop.Money\"\x00B\x15Z\x13./proto;hipstershopb\x06proto3"

var (
	file_currencyservice_proto_rawDescOnce sync.Once
	file_currencyservice_proto_rawDescData []byte
)

func file_currencyservice_proto_rawDescGZIP() []byte {
	file_currencyservice_proto_rawDescOnce.Do(func() {
		file_currencyservice_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_currencyservice_proto_rawDesc), len(file_currencyservice_proto_rawDesc)))
	})
	return file_currencyservice_proto_rawDescData
}

var file_currencyservice_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_currencyservice_proto_goTypes = []any{
	(*Empty)(nil),                          // 0: hipstershop.Empty
	(*Money)(nil),                          // 1: hipstershop.Money
	(*GetSupportedCurrenciesResponse)(nil), // 2: hipstershop.GetSupportedCurrenciesResponse
	(*CurrencyConversionRequest)(nil),      // 3: hipstershop.CurrencyConversionRequest
}
var file_currencyservice_proto_depIdxs = []int32{
	1, // 0: hipstershop.CurrencyConversionRequest.from:type_name -> hipstershop.Money
	0, // 1: hipstershop.CurrencyService.GetSupportedCurrencies:input_type -> hipstershop.Empty
	3, // 2: hipstershop.CurrencyService.Convert:input_type -> hipstershop.CurrencyConversionRequest
	2, // 3: hipstershop.CurrencyService.GetSupportedCurrencies:output_type -> hipstershop.GetSupportedCurrenciesResponse
	1, // 4: hipstershop.CurrencyService.Convert:output_type -> hipstershop.Money
	3, // [3:5] is the sub-list for method output_type
	1, // [1:3] is the sub-list for method input_type
	1, // [1:1] is the sub-list for extension type_name
	1, // [1:1] is the sub-list for extension extendee
	0, // [0:1] is the sub-list for field type_name
}

func init() { file_currencyservice_proto_init() }
func file_currencyservice_proto_init() {
	if File_currencyservice_proto != nil {
		return
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_currencyservice_proto_rawDesc), len(file_currencyservice_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   4,
			NumExtensions: 0,
			NumServices:   1,
		},
		GoTypes:           file_currencyservice_proto_goTypes,
		DependencyIndexes: file_currencyservice_proto_depIdxs,
		MessageInfos:      file_currencyservice_proto_msgTypes,
	}.Build()
	File_currencyservice_proto = out.File
	file_currencyservice_proto_goTypes = nil
	file_currencyservice_proto_depIdxs = nil
}
