// 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: adservice.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 AdRequest struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// List of important key words from the current page describing the context.
	ContextKeys   []string `protobuf:"bytes,1,rep,name=context_keys,json=contextKeys,proto3" json:"context_keys,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*AdRequest) ProtoMessage() {}

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

func (x *AdRequest) GetContextKeys() []string {
	if x != nil {
		return x.ContextKeys
	}
	return nil
}

type AdResponse struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	Ads           []*Ad                  `protobuf:"bytes,1,rep,name=ads,proto3" json:"ads,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*AdResponse) ProtoMessage() {}

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

func (x *AdResponse) GetAds() []*Ad {
	if x != nil {
		return x.Ads
	}
	return nil
}

type Ad struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// url to redirect to when an ad is clicked.
	RedirectUrl string `protobuf:"bytes,1,opt,name=redirect_url,json=redirectUrl,proto3" json:"redirect_url,omitempty"`
	// short advertisement text to display.
	Text          string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*Ad) ProtoMessage() {}

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

func (x *Ad) GetRedirectUrl() string {
	if x != nil {
		return x.RedirectUrl
	}
	return ""
}

func (x *Ad) GetText() string {
	if x != nil {
		return x.Text
	}
	return ""
}

var File_adservice_proto protoreflect.FileDescriptor

const file_adservice_proto_rawDesc = "" +
	"\n" +
	"\x0fadservice.proto\x12\vhipstershop\".\n" +
	"\tAdRequest\x12!\n" +
	"\fcontext_keys\x18\x01 \x03(\tR\vcontextKeys\"/\n" +
	"\n" +
	"AdResponse\x12!\n" +
	"\x03ads\x18\x01 \x03(\v2\x0f.hipstershop.AdR\x03ads\";\n" +
	"\x02Ad\x12!\n" +
	"\fredirect_url\x18\x01 \x01(\tR\vredirectUrl\x12\x12\n" +
	"\x04text\x18\x02 \x01(\tR\x04text2H\n" +
	"\tAdService\x12;\n" +
	"\x06GetAds\x12\x16.hipstershop.AdRequest\x1a\x17.hipstershop.AdResponse\"\x00B\x15Z\x13./proto;hipstershopb\x06proto3"

var (
	file_adservice_proto_rawDescOnce sync.Once
	file_adservice_proto_rawDescData []byte
)

func file_adservice_proto_rawDescGZIP() []byte {
	file_adservice_proto_rawDescOnce.Do(func() {
		file_adservice_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_adservice_proto_rawDesc), len(file_adservice_proto_rawDesc)))
	})
	return file_adservice_proto_rawDescData
}

var file_adservice_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_adservice_proto_goTypes = []any{
	(*AdRequest)(nil),  // 0: hipstershop.AdRequest
	(*AdResponse)(nil), // 1: hipstershop.AdResponse
	(*Ad)(nil),         // 2: hipstershop.Ad
}
var file_adservice_proto_depIdxs = []int32{
	2, // 0: hipstershop.AdResponse.ads:type_name -> hipstershop.Ad
	0, // 1: hipstershop.AdService.GetAds:input_type -> hipstershop.AdRequest
	1, // 2: hipstershop.AdService.GetAds:output_type -> hipstershop.AdResponse
	2, // [2:3] is the sub-list for method output_type
	1, // [1:2] 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_adservice_proto_init() }
func file_adservice_proto_init() {
	if File_adservice_proto != nil {
		return
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_adservice_proto_rawDesc), len(file_adservice_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   3,
			NumExtensions: 0,
			NumServices:   1,
		},
		GoTypes:           file_adservice_proto_goTypes,
		DependencyIndexes: file_adservice_proto_depIdxs,
		MessageInfos:      file_adservice_proto_msgTypes,
	}.Build()
	File_adservice_proto = out.File
	file_adservice_proto_goTypes = nil
	file_adservice_proto_depIdxs = nil
}
