blob: 301bb6cfc9a038301996a7e78bd5c5e8827b93ab [file] [edit]
// Copyright 2025 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.11
// protoc v6.33.2
// source: google/appengine/v1/service.proto
package appenginepb
import (
reflect "reflect"
sync "sync"
unsafe "unsafe"
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)
)
// Available sharding mechanisms.
type TrafficSplit_ShardBy int32
const (
// Diversion method unspecified.
TrafficSplit_UNSPECIFIED TrafficSplit_ShardBy = 0
// Diversion based on a specially named cookie, "GOOGAPPUID." The cookie
// must be set by the application itself or no diversion will occur.
TrafficSplit_COOKIE TrafficSplit_ShardBy = 1
// Diversion based on applying the modulus operation to a fingerprint
// of the IP address.
TrafficSplit_IP TrafficSplit_ShardBy = 2
// Diversion based on weighted random assignment. An incoming request is
// randomly routed to a version in the traffic split, with probability
// proportional to the version's traffic share.
TrafficSplit_RANDOM TrafficSplit_ShardBy = 3
)
// Enum value maps for TrafficSplit_ShardBy.
var (
TrafficSplit_ShardBy_name = map[int32]string{
0: "UNSPECIFIED",
1: "COOKIE",
2: "IP",
3: "RANDOM",
}
TrafficSplit_ShardBy_value = map[string]int32{
"UNSPECIFIED": 0,
"COOKIE": 1,
"IP": 2,
"RANDOM": 3,
}
)
func (x TrafficSplit_ShardBy) Enum() *TrafficSplit_ShardBy {
p := new(TrafficSplit_ShardBy)
*p = x
return p
}
func (x TrafficSplit_ShardBy) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (TrafficSplit_ShardBy) Descriptor() protoreflect.EnumDescriptor {
return file_google_appengine_v1_service_proto_enumTypes[0].Descriptor()
}
func (TrafficSplit_ShardBy) Type() protoreflect.EnumType {
return &file_google_appengine_v1_service_proto_enumTypes[0]
}
func (x TrafficSplit_ShardBy) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use TrafficSplit_ShardBy.Descriptor instead.
func (TrafficSplit_ShardBy) EnumDescriptor() ([]byte, []int) {
return file_google_appengine_v1_service_proto_rawDescGZIP(), []int{1, 0}
}
// A Service resource is a logical component of an application that can share
// state and communicate in a secure fashion with other services.
// For example, an application that handles customer requests might
// include separate services to handle tasks such as backend data
// analysis or API requests from mobile devices. Each service has a
// collection of versions that define a specific set of code used to
// implement the functionality of that service.
type Service struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Full path to the Service resource in the API.
// Example: `apps/myapp/services/default`.
//
// @OutputOnly
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Relative name of the service within the application.
// Example: `default`.
//
// @OutputOnly
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
// Mapping that defines fractional HTTP traffic diversion to
// different versions within the service.
Split *TrafficSplit `protobuf:"bytes,3,opt,name=split,proto3" json:"split,omitempty"`
// A set of labels to apply to this service. Labels are key/value pairs that
// describe the service and all resources that belong to it (e.g.,
// versions). The labels can be used to search and group resources, and are
// propagated to the usage and billing reports, enabling fine-grain analysis
// of costs. An example of using labels is to tag resources belonging to
// different environments (e.g., "env=prod", "env=qa").
//
// <p>Label keys and values can be no longer than 63 characters and can only
// contain lowercase letters, numeric characters, underscores, dashes, and
// international characters. Label keys must start with a lowercase letter
// or an international character. Each service can have at most 32 labels.
Labels map[string]string `protobuf:"bytes,4,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
// Ingress settings for this service. Will apply to all versions.
NetworkSettings *NetworkSettings `protobuf:"bytes,6,opt,name=network_settings,json=networkSettings,proto3" json:"network_settings,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *Service) Reset() {
*x = Service{}
mi := &file_google_appengine_v1_service_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *Service) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Service) ProtoMessage() {}
func (x *Service) ProtoReflect() protoreflect.Message {
mi := &file_google_appengine_v1_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 Service.ProtoReflect.Descriptor instead.
func (*Service) Descriptor() ([]byte, []int) {
return file_google_appengine_v1_service_proto_rawDescGZIP(), []int{0}
}
func (x *Service) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Service) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *Service) GetSplit() *TrafficSplit {
if x != nil {
return x.Split
}
return nil
}
func (x *Service) GetLabels() map[string]string {
if x != nil {
return x.Labels
}
return nil
}
func (x *Service) GetNetworkSettings() *NetworkSettings {
if x != nil {
return x.NetworkSettings
}
return nil
}
// Traffic routing configuration for versions within a single service. Traffic
// splits define how traffic directed to the service is assigned to versions.
type TrafficSplit struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Mechanism used to determine which version a request is sent to.
// The traffic selection algorithm will
// be stable for either type until allocations are changed.
ShardBy TrafficSplit_ShardBy `protobuf:"varint,1,opt,name=shard_by,json=shardBy,proto3,enum=google.appengine.v1.TrafficSplit_ShardBy" json:"shard_by,omitempty"`
// Mapping from version IDs within the service to fractional
// (0.000, 1] allocations of traffic for that version. Each version can
// be specified only once, but some versions in the service may not
// have any traffic allocation. Services that have traffic allocated
// cannot be deleted until either the service is deleted or
// their traffic allocation is removed. Allocations must sum to 1.
// Up to two decimal place precision is supported for IP-based splits and
// up to three decimal places is supported for cookie-based splits.
Allocations map[string]float64 `protobuf:"bytes,2,rep,name=allocations,proto3" json:"allocations,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *TrafficSplit) Reset() {
*x = TrafficSplit{}
mi := &file_google_appengine_v1_service_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *TrafficSplit) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TrafficSplit) ProtoMessage() {}
func (x *TrafficSplit) ProtoReflect() protoreflect.Message {
mi := &file_google_appengine_v1_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 TrafficSplit.ProtoReflect.Descriptor instead.
func (*TrafficSplit) Descriptor() ([]byte, []int) {
return file_google_appengine_v1_service_proto_rawDescGZIP(), []int{1}
}
func (x *TrafficSplit) GetShardBy() TrafficSplit_ShardBy {
if x != nil {
return x.ShardBy
}
return TrafficSplit_UNSPECIFIED
}
func (x *TrafficSplit) GetAllocations() map[string]float64 {
if x != nil {
return x.Allocations
}
return nil
}
var File_google_appengine_v1_service_proto protoreflect.FileDescriptor
const file_google_appengine_v1_service_proto_rawDesc = "" +
"\n" +
"!google/appengine/v1/service.proto\x12\x13google.appengine.v1\x1a*google/appengine/v1/network_settings.proto\"\xb4\x02\n" +
"\aService\x12\x12\n" +
"\x04name\x18\x01 \x01(\tR\x04name\x12\x0e\n" +
"\x02id\x18\x02 \x01(\tR\x02id\x127\n" +
"\x05split\x18\x03 \x01(\v2!.google.appengine.v1.TrafficSplitR\x05split\x12@\n" +
"\x06labels\x18\x04 \x03(\v2(.google.appengine.v1.Service.LabelsEntryR\x06labels\x12O\n" +
"\x10network_settings\x18\x06 \x01(\v2$.google.appengine.v1.NetworkSettingsR\x0fnetworkSettings\x1a9\n" +
"\vLabelsEntry\x12\x10\n" +
"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
"\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xa6\x02\n" +
"\fTrafficSplit\x12D\n" +
"\bshard_by\x18\x01 \x01(\x0e2).google.appengine.v1.TrafficSplit.ShardByR\ashardBy\x12T\n" +
"\vallocations\x18\x02 \x03(\v22.google.appengine.v1.TrafficSplit.AllocationsEntryR\vallocations\x1a>\n" +
"\x10AllocationsEntry\x12\x10\n" +
"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
"\x05value\x18\x02 \x01(\x01R\x05value:\x028\x01\":\n" +
"\aShardBy\x12\x0f\n" +
"\vUNSPECIFIED\x10\x00\x12\n" +
"\n" +
"\x06COOKIE\x10\x01\x12\x06\n" +
"\x02IP\x10\x02\x12\n" +
"\n" +
"\x06RANDOM\x10\x03B\xbd\x01\n" +
"\x17com.google.appengine.v1B\fServiceProtoP\x01Z;cloud.google.com/go/appengine/apiv1/appenginepb;appenginepb\xaa\x02\x19Google.Cloud.AppEngine.V1\xca\x02\x19Google\\Cloud\\AppEngine\\V1\xea\x02\x1cGoogle::Cloud::AppEngine::V1b\x06proto3"
var (
file_google_appengine_v1_service_proto_rawDescOnce sync.Once
file_google_appengine_v1_service_proto_rawDescData []byte
)
func file_google_appengine_v1_service_proto_rawDescGZIP() []byte {
file_google_appengine_v1_service_proto_rawDescOnce.Do(func() {
file_google_appengine_v1_service_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_google_appengine_v1_service_proto_rawDesc), len(file_google_appengine_v1_service_proto_rawDesc)))
})
return file_google_appengine_v1_service_proto_rawDescData
}
var file_google_appengine_v1_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_google_appengine_v1_service_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_google_appengine_v1_service_proto_goTypes = []any{
(TrafficSplit_ShardBy)(0), // 0: google.appengine.v1.TrafficSplit.ShardBy
(*Service)(nil), // 1: google.appengine.v1.Service
(*TrafficSplit)(nil), // 2: google.appengine.v1.TrafficSplit
nil, // 3: google.appengine.v1.Service.LabelsEntry
nil, // 4: google.appengine.v1.TrafficSplit.AllocationsEntry
(*NetworkSettings)(nil), // 5: google.appengine.v1.NetworkSettings
}
var file_google_appengine_v1_service_proto_depIdxs = []int32{
2, // 0: google.appengine.v1.Service.split:type_name -> google.appengine.v1.TrafficSplit
3, // 1: google.appengine.v1.Service.labels:type_name -> google.appengine.v1.Service.LabelsEntry
5, // 2: google.appengine.v1.Service.network_settings:type_name -> google.appengine.v1.NetworkSettings
0, // 3: google.appengine.v1.TrafficSplit.shard_by:type_name -> google.appengine.v1.TrafficSplit.ShardBy
4, // 4: google.appengine.v1.TrafficSplit.allocations:type_name -> google.appengine.v1.TrafficSplit.AllocationsEntry
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_google_appengine_v1_service_proto_init() }
func file_google_appengine_v1_service_proto_init() {
if File_google_appengine_v1_service_proto != nil {
return
}
file_google_appengine_v1_network_settings_proto_init()
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_google_appengine_v1_service_proto_rawDesc), len(file_google_appengine_v1_service_proto_rawDesc)),
NumEnums: 1,
NumMessages: 4,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_google_appengine_v1_service_proto_goTypes,
DependencyIndexes: file_google_appengine_v1_service_proto_depIdxs,
EnumInfos: file_google_appengine_v1_service_proto_enumTypes,
MessageInfos: file_google_appengine_v1_service_proto_msgTypes,
}.Build()
File_google_appengine_v1_service_proto = out.File
file_google_appengine_v1_service_proto_goTypes = nil
file_google_appengine_v1_service_proto_depIdxs = nil
}