From 616437a753d97aab20b397e555c58463241b812c Mon Sep 17 00:00:00 2001 From: Jeff Mendoza Date: Thu, 1 Nov 2018 11:36:57 -0700 Subject: [PATCH 1/4] Merge mixer protos. --- mixer/v1/{check.proto => mixer.proto} | 67 +++++++++++++++++++++++++++ mixer/v1/report.proto | 64 ------------------------- mixer/v1/service.proto | 52 --------------------- 3 files changed, 67 insertions(+), 116 deletions(-) rename mixer/v1/{check.proto => mixer.proto} (69%) delete mode 100644 mixer/v1/report.proto delete mode 100644 mixer/v1/service.proto diff --git a/mixer/v1/check.proto b/mixer/v1/mixer.proto similarity index 69% rename from mixer/v1/check.proto rename to mixer/v1/mixer.proto index 68c89ba6f5..8d95d91ed0 100644 --- a/mixer/v1/check.proto +++ b/mixer/v1/mixer.proto @@ -14,9 +14,12 @@ syntax = "proto3"; +// This package defines the Mixer API that the sidecar proxy uses to perform +// precondition checks, manage quotas, and report telemetry. package istio.mixer.v1; option go_package = "istio.io/api/mixer/v1"; +option cc_generic_services = true; import "gogoproto/gogo.proto"; import "google/protobuf/duration.proto"; @@ -28,6 +31,33 @@ option (gogoproto.equal_all) = false; option (gogoproto.gostring_all) = false; option cc_enable_arenas = true; +// Mixer provides three core features: +// +// - *Precondition Checking*. Enables callers to verify a number of preconditions +// before responding to an incoming request from a service consumer. +// Preconditions can include whether the service consumer is properly +// authenticated, is on the service’s whitelist, passes ACL checks, and more. +// +// - *Quota Management*. Enables services to allocate and free quota on a number +// of dimensions, Quotas are used as a relatively simple resource management tool +// to provide some fairness between service consumers when contending for limited +// resources. Rate limits are examples of quotas. +// +// - *Telemetry Reporting*. Enables services to report logging and monitoring. +// In the future, it will also enable tracing and billing streams intended for +// both the service operator as well as for service consumers. +service Mixer { + // Checks preconditions and allocate quota before performing an operation. + // The preconditions enforced depend on the set of supplied attributes and + // the active configuration. + rpc Check(CheckRequest) returns (CheckResponse) {} + + // Reports telemetry, such as logs and metrics. + // The reported information depends on the set of supplied attributes and the + // active configuration. + rpc Report(ReportRequest) returns (ReportResponse) {} +} + // Used to get a thumbs-up/thumbs-down before performing an action. message CheckRequest { // parameters for a quota allocation @@ -188,3 +218,40 @@ message RouteDirective { // If this setting is omitted, no body is included in the generated response. string direct_response_body = 4; } + +// Used to report telemetry after performing one or more actions. +message ReportRequest { + // The attributes to use for this request. + // + // Each `Attributes` element represents the state of a single action. Multiple actions + // can be provided in a single message in order to improve communication efficiency. The + // client can accumulate a set of actions and send them all in one single message. + // + // Although each `Attributes` message is semantically treated as an independent + // stand-alone entity unrelated to the other attributes within the message, this + // message format leverages delta-encoding between attribute messages in order to + // substantially reduce the request size and improve end-to-end efficiency. Each + // individual set of attributes is used to modify the previous set. This eliminates + // the need to redundantly send the same attributes multiple times over within + // a single request. + // + // If a client is not sophisticated and doesn't want to use delta-encoding, + // a degenerate case is to include all attributes in every individual message. + repeated CompressedAttributes attributes = 1 [(gogoproto.nullable) = false]; + + // The default message-level dictionary for all the attributes. + // Individual attribute messages can have their own dictionaries, but if they don't + // then this set of words, if it is provided, is used instead. + // + // This makes it possible to share the same dictionary for all attributes in this + // request, which can substantially reduce the overall request size. + repeated string default_words = 2; + + // The number of words in the global dictionary. + // To detect global dictionary out of sync between client and server. + uint32 global_word_count = 3; +} + +// Used to carry responses to telemetry reports +message ReportResponse { +} diff --git a/mixer/v1/report.proto b/mixer/v1/report.proto deleted file mode 100644 index f5e0cdbb8a..0000000000 --- a/mixer/v1/report.proto +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright 2016 Istio Authors -// -// 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. - -syntax = "proto3"; - -package istio.mixer.v1; - -option go_package = "istio.io/api/mixer/v1"; - -import "gogoproto/gogo.proto"; -import "mixer/v1/attributes.proto"; - -option (gogoproto.goproto_getters_all) = false; -option (gogoproto.equal_all) = false; -option (gogoproto.gostring_all) = false; -option cc_enable_arenas = true; - -// Used to report telemetry after performing one or more actions. -message ReportRequest { - // The attributes to use for this request. - // - // Each `Attributes` element represents the state of a single action. Multiple actions - // can be provided in a single message in order to improve communication efficiency. The - // client can accumulate a set of actions and send them all in one single message. - // - // Although each `Attributes` message is semantically treated as an independent - // stand-alone entity unrelated to the other attributes within the message, this - // message format leverages delta-encoding between attribute messages in order to - // substantially reduce the request size and improve end-to-end efficiency. Each - // individual set of attributes is used to modify the previous set. This eliminates - // the need to redundantly send the same attributes multiple times over within - // a single request. - // - // If a client is not sophisticated and doesn't want to use delta-encoding, - // a degenerate case is to include all attributes in every individual message. - repeated CompressedAttributes attributes = 1 [(gogoproto.nullable) = false]; - - // The default message-level dictionary for all the attributes. - // Individual attribute messages can have their own dictionaries, but if they don't - // then this set of words, if it is provided, is used instead. - // - // This makes it possible to share the same dictionary for all attributes in this - // request, which can substantially reduce the overall request size. - repeated string default_words = 2; - - // The number of words in the global dictionary. - // To detect global dictionary out of sync between client and server. - uint32 global_word_count = 3; -} - -// Used to carry responses to telemetry reports -message ReportResponse { -} diff --git a/mixer/v1/service.proto b/mixer/v1/service.proto deleted file mode 100644 index 18b78eb9fc..0000000000 --- a/mixer/v1/service.proto +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright 2016 Istio Authors -// -// 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. - -syntax = "proto3"; - -// This package defines the Mixer API that the sidecar proxy uses to perform -// precondition checks, manage quotas, and report telemetry. -package istio.mixer.v1; - -option go_package = "istio.io/api/mixer/v1"; -option cc_generic_services = true; - -import "mixer/v1/check.proto"; -import "mixer/v1/report.proto"; - -// Mixer provides three core features: -// -// - *Precondition Checking*. Enables callers to verify a number of preconditions -// before responding to an incoming request from a service consumer. -// Preconditions can include whether the service consumer is properly -// authenticated, is on the service’s whitelist, passes ACL checks, and more. -// -// - *Quota Management*. Enables services to allocate and free quota on a number -// of dimensions, Quotas are used as a relatively simple resource management tool -// to provide some fairness between service consumers when contending for limited -// resources. Rate limits are examples of quotas. -// -// - *Telemetry Reporting*. Enables services to report logging and monitoring. -// In the future, it will also enable tracing and billing streams intended for -// both the service operator as well as for service consumers. -service Mixer { - // Checks preconditions and allocate quota before performing an operation. - // The preconditions enforced depend on the set of supplied attributes and - // the active configuration. - rpc Check(CheckRequest) returns (CheckResponse) {} - - // Reports telemetry, such as logs and metrics. - // The reported information depends on the set of supplied attributes and the - // active configuration. - rpc Report(ReportRequest) returns (ReportResponse) {} -} From 83eae84e8a99c0516759b6ab3435551bae3df30b Mon Sep 17 00:00:00 2001 From: Jeff Mendoza Date: Thu, 1 Nov 2018 11:37:45 -0700 Subject: [PATCH 2/4] Remove renamed generated files. --- mixer/v1/check.pb.go | 2597 ---------------------------------------- mixer/v1/report.pb.go | 521 -------- mixer/v1/service.pb.go | 153 --- 3 files changed, 3271 deletions(-) delete mode 100644 mixer/v1/check.pb.go delete mode 100644 mixer/v1/report.pb.go delete mode 100644 mixer/v1/service.pb.go diff --git a/mixer/v1/check.pb.go b/mixer/v1/check.pb.go deleted file mode 100644 index 12bdcb5f6a..0000000000 --- a/mixer/v1/check.pb.go +++ /dev/null @@ -1,2597 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: mixer/v1/check.proto - -package v1 - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" -import _ "github.com/gogo/protobuf/types" -import google_rpc "github.com/gogo/googleapis/google/rpc" - -import time "time" - -import strconv "strconv" - -import types "github.com/gogo/protobuf/types" - -import strings "strings" -import reflect "reflect" -import sortkeys "github.com/gogo/protobuf/sortkeys" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf -var _ = time.Kitchen - -// How an attribute's value was matched -type ReferencedAttributes_Condition int32 - -const ( - CONDITION_UNSPECIFIED ReferencedAttributes_Condition = 0 - ABSENCE ReferencedAttributes_Condition = 1 - EXACT ReferencedAttributes_Condition = 2 - REGEX ReferencedAttributes_Condition = 3 -) - -var ReferencedAttributes_Condition_name = map[int32]string{ - 0: "CONDITION_UNSPECIFIED", - 1: "ABSENCE", - 2: "EXACT", - 3: "REGEX", -} -var ReferencedAttributes_Condition_value = map[string]int32{ - "CONDITION_UNSPECIFIED": 0, - "ABSENCE": 1, - "EXACT": 2, - "REGEX": 3, -} - -func (ReferencedAttributes_Condition) EnumDescriptor() ([]byte, []int) { - return fileDescriptorCheck, []int{2, 0} -} - -// Operation type. -type HeaderOperation_Operation int32 - -const ( - REPLACE HeaderOperation_Operation = 0 - REMOVE HeaderOperation_Operation = 1 - APPEND HeaderOperation_Operation = 2 -) - -var HeaderOperation_Operation_name = map[int32]string{ - 0: "REPLACE", - 1: "REMOVE", - 2: "APPEND", -} -var HeaderOperation_Operation_value = map[string]int32{ - "REPLACE": 0, - "REMOVE": 1, - "APPEND": 2, -} - -func (HeaderOperation_Operation) EnumDescriptor() ([]byte, []int) { - return fileDescriptorCheck, []int{3, 0} -} - -// Used to get a thumbs-up/thumbs-down before performing an action. -type CheckRequest struct { - // The attributes to use for this request. - // - // Mixer's configuration determines how these attributes are used to - // establish the result returned in the response. - Attributes CompressedAttributes `protobuf:"bytes,1,opt,name=attributes" json:"attributes"` - // The number of words in the global dictionary, used with to populate the attributes. - // This value is used as a quick way to determine whether the client is using a dictionary that - // the server understands. - GlobalWordCount uint32 `protobuf:"varint,2,opt,name=global_word_count,json=globalWordCount,proto3" json:"global_word_count,omitempty"` - // Used for deduplicating `Check` calls in the case of failed RPCs and retries. This should be a UUID - // per call, where the same UUID is used for retries of the same call. - DeduplicationId string `protobuf:"bytes,3,opt,name=deduplication_id,json=deduplicationId,proto3" json:"deduplication_id,omitempty"` - // The individual quotas to allocate - Quotas map[string]CheckRequest_QuotaParams `protobuf:"bytes,4,rep,name=quotas" json:"quotas" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` -} - -func (m *CheckRequest) Reset() { *m = CheckRequest{} } -func (*CheckRequest) ProtoMessage() {} -func (*CheckRequest) Descriptor() ([]byte, []int) { return fileDescriptorCheck, []int{0} } - -// parameters for a quota allocation -type CheckRequest_QuotaParams struct { - // Amount of quota to allocate - Amount int64 `protobuf:"varint,1,opt,name=amount,proto3" json:"amount,omitempty"` - // When true, supports returning less quota than what was requested. - BestEffort bool `protobuf:"varint,2,opt,name=best_effort,json=bestEffort,proto3" json:"best_effort,omitempty"` -} - -func (m *CheckRequest_QuotaParams) Reset() { *m = CheckRequest_QuotaParams{} } -func (*CheckRequest_QuotaParams) ProtoMessage() {} -func (*CheckRequest_QuotaParams) Descriptor() ([]byte, []int) { return fileDescriptorCheck, []int{0, 0} } - -// The response generated by the Check method. -type CheckResponse struct { - // The precondition check results. - Precondition CheckResponse_PreconditionResult `protobuf:"bytes,2,opt,name=precondition" json:"precondition"` - // The resulting quota, one entry per requested quota. - Quotas map[string]CheckResponse_QuotaResult `protobuf:"bytes,3,rep,name=quotas" json:"quotas" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` -} - -func (m *CheckResponse) Reset() { *m = CheckResponse{} } -func (*CheckResponse) ProtoMessage() {} -func (*CheckResponse) Descriptor() ([]byte, []int) { return fileDescriptorCheck, []int{1} } - -// Expresses the result of a precondition check. -type CheckResponse_PreconditionResult struct { - // A status code of OK indicates all preconditions were satisfied. Any other code indicates not - // all preconditions were satisfied and details describe why. - Status google_rpc.Status `protobuf:"bytes,1,opt,name=status" json:"status"` - // The amount of time for which this result can be considered valid. - ValidDuration time.Duration `protobuf:"bytes,2,opt,name=valid_duration,json=validDuration,stdduration" json:"valid_duration"` - // The number of uses for which this result can be considered valid. - ValidUseCount int32 `protobuf:"varint,3,opt,name=valid_use_count,json=validUseCount,proto3" json:"valid_use_count,omitempty"` - // The total set of attributes that were used in producing the result - // along with matching conditions. - ReferencedAttributes *ReferencedAttributes `protobuf:"bytes,5,opt,name=referenced_attributes,json=referencedAttributes" json:"referenced_attributes,omitempty"` - // An optional routing directive, used to manipulate the traffic metadata - // whenever all preconditions are satisfied. - RouteDirective *RouteDirective `protobuf:"bytes,6,opt,name=route_directive,json=routeDirective" json:"route_directive,omitempty"` -} - -func (m *CheckResponse_PreconditionResult) Reset() { *m = CheckResponse_PreconditionResult{} } -func (*CheckResponse_PreconditionResult) ProtoMessage() {} -func (*CheckResponse_PreconditionResult) Descriptor() ([]byte, []int) { - return fileDescriptorCheck, []int{1, 0} -} - -// Expresses the result of a quota allocation. -type CheckResponse_QuotaResult struct { - // The amount of time for which this result can be considered valid. - ValidDuration time.Duration `protobuf:"bytes,1,opt,name=valid_duration,json=validDuration,stdduration" json:"valid_duration"` - // The amount of granted quota. When `QuotaParams.best_effort` is true, this will be >= 0. - // If `QuotaParams.best_effort` is false, this will be either 0 or >= `QuotaParams.amount`. - GrantedAmount int64 `protobuf:"varint,2,opt,name=granted_amount,json=grantedAmount,proto3" json:"granted_amount,omitempty"` - // The total set of attributes that were used in producing the result - // along with matching conditions. - ReferencedAttributes ReferencedAttributes `protobuf:"bytes,5,opt,name=referenced_attributes,json=referencedAttributes" json:"referenced_attributes"` -} - -func (m *CheckResponse_QuotaResult) Reset() { *m = CheckResponse_QuotaResult{} } -func (*CheckResponse_QuotaResult) ProtoMessage() {} -func (*CheckResponse_QuotaResult) Descriptor() ([]byte, []int) { - return fileDescriptorCheck, []int{1, 1} -} - -// Describes the attributes that were used to determine the response. -// This can be used to construct a response cache. -type ReferencedAttributes struct { - // The message-level dictionary. Refer to [CompressedAttributes][istio.mixer.v1.CompressedAttributes] for information - // on using dictionaries. - Words []string `protobuf:"bytes,1,rep,name=words" json:"words,omitempty"` - // Describes a set of attributes. - AttributeMatches []ReferencedAttributes_AttributeMatch `protobuf:"bytes,2,rep,name=attribute_matches,json=attributeMatches" json:"attribute_matches"` -} - -func (m *ReferencedAttributes) Reset() { *m = ReferencedAttributes{} } -func (*ReferencedAttributes) ProtoMessage() {} -func (*ReferencedAttributes) Descriptor() ([]byte, []int) { return fileDescriptorCheck, []int{2} } - -// Describes a single attribute match. -type ReferencedAttributes_AttributeMatch struct { - // The name of the attribute. This is a dictionary index encoded in a manner identical - // to all strings in the [CompressedAttributes][istio.mixer.v1.CompressedAttributes] message. - Name int32 `protobuf:"zigzag32,1,opt,name=name,proto3" json:"name,omitempty"` - // The kind of match against the attribute value. - Condition ReferencedAttributes_Condition `protobuf:"varint,2,opt,name=condition,proto3,enum=istio.mixer.v1.ReferencedAttributes_Condition" json:"condition,omitempty"` - // If a REGEX condition is provided for a STRING_MAP attribute, - // clients should use the regex value to match against map keys. - Regex string `protobuf:"bytes,3,opt,name=regex,proto3" json:"regex,omitempty"` - // A key in a STRING_MAP. When multiple keys from a STRING_MAP - // attribute were referenced, there will be multiple AttributeMatch - // messages with different map_key values. Values for map_key SHOULD - // be ignored for attributes that are not STRING_MAP. - // - // Indices for the keys are used (taken either from the - // message dictionary from the `words` field or the global dictionary). - // - // If no map_key value is provided for a STRING_MAP attribute, the - // entire STRING_MAP will be used. - MapKey int32 `protobuf:"zigzag32,4,opt,name=map_key,json=mapKey,proto3" json:"map_key,omitempty"` -} - -func (m *ReferencedAttributes_AttributeMatch) Reset() { *m = ReferencedAttributes_AttributeMatch{} } -func (*ReferencedAttributes_AttributeMatch) ProtoMessage() {} -func (*ReferencedAttributes_AttributeMatch) Descriptor() ([]byte, []int) { - return fileDescriptorCheck, []int{2, 0} -} - -// Operation on HTTP headers to replace, append, or remove a header. Header -// names are normalized to lower-case with dashes, e.g. "x-request-id". -// Pseudo-headers ":path", ":authority", and ":method" are supported to modify -// the request headers. -type HeaderOperation struct { - // Header name. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Header value. - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - // Header operation. - Operation HeaderOperation_Operation `protobuf:"varint,3,opt,name=operation,proto3,enum=istio.mixer.v1.HeaderOperation_Operation" json:"operation,omitempty"` -} - -func (m *HeaderOperation) Reset() { *m = HeaderOperation{} } -func (*HeaderOperation) ProtoMessage() {} -func (*HeaderOperation) Descriptor() ([]byte, []int) { return fileDescriptorCheck, []int{3} } - -// Expresses the routing manipulation actions to be performed on behalf of -// Mixer in response to a successful precondition check. -type RouteDirective struct { - // Operations on the request headers. - RequestHeaderOperations []HeaderOperation `protobuf:"bytes,1,rep,name=request_header_operations,json=requestHeaderOperations" json:"request_header_operations"` - // Operations on the response headers. - ResponseHeaderOperations []HeaderOperation `protobuf:"bytes,2,rep,name=response_header_operations,json=responseHeaderOperations" json:"response_header_operations"` - // If set, enables a direct response without proxying the request to the routing - // destination. Required to be a value in the 2xx or 3xx range. - DirectResponseCode uint32 `protobuf:"varint,3,opt,name=direct_response_code,json=directResponseCode,proto3" json:"direct_response_code,omitempty"` - // Supplies the response body for the direct response. - // If this setting is omitted, no body is included in the generated response. - DirectResponseBody string `protobuf:"bytes,4,opt,name=direct_response_body,json=directResponseBody,proto3" json:"direct_response_body,omitempty"` -} - -func (m *RouteDirective) Reset() { *m = RouteDirective{} } -func (*RouteDirective) ProtoMessage() {} -func (*RouteDirective) Descriptor() ([]byte, []int) { return fileDescriptorCheck, []int{4} } - -func init() { - proto.RegisterType((*CheckRequest)(nil), "istio.mixer.v1.CheckRequest") - proto.RegisterType((*CheckRequest_QuotaParams)(nil), "istio.mixer.v1.CheckRequest.QuotaParams") - proto.RegisterType((*CheckResponse)(nil), "istio.mixer.v1.CheckResponse") - proto.RegisterType((*CheckResponse_PreconditionResult)(nil), "istio.mixer.v1.CheckResponse.PreconditionResult") - proto.RegisterType((*CheckResponse_QuotaResult)(nil), "istio.mixer.v1.CheckResponse.QuotaResult") - proto.RegisterType((*ReferencedAttributes)(nil), "istio.mixer.v1.ReferencedAttributes") - proto.RegisterType((*ReferencedAttributes_AttributeMatch)(nil), "istio.mixer.v1.ReferencedAttributes.AttributeMatch") - proto.RegisterType((*HeaderOperation)(nil), "istio.mixer.v1.HeaderOperation") - proto.RegisterType((*RouteDirective)(nil), "istio.mixer.v1.RouteDirective") - proto.RegisterEnum("istio.mixer.v1.ReferencedAttributes_Condition", ReferencedAttributes_Condition_name, ReferencedAttributes_Condition_value) - proto.RegisterEnum("istio.mixer.v1.HeaderOperation_Operation", HeaderOperation_Operation_name, HeaderOperation_Operation_value) -} -func (x ReferencedAttributes_Condition) String() string { - s, ok := ReferencedAttributes_Condition_name[int32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} -func (x HeaderOperation_Operation) String() string { - s, ok := HeaderOperation_Operation_name[int32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} -func (m *CheckRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CheckRequest) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintCheck(dAtA, i, uint64(m.Attributes.Size())) - n1, err := m.Attributes.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - if m.GlobalWordCount != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintCheck(dAtA, i, uint64(m.GlobalWordCount)) - } - if len(m.DeduplicationId) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintCheck(dAtA, i, uint64(len(m.DeduplicationId))) - i += copy(dAtA[i:], m.DeduplicationId) - } - if len(m.Quotas) > 0 { - for k, _ := range m.Quotas { - dAtA[i] = 0x22 - i++ - v := m.Quotas[k] - msgSize := 0 - if (&v) != nil { - msgSize = (&v).Size() - msgSize += 1 + sovCheck(uint64(msgSize)) - } - mapSize := 1 + len(k) + sovCheck(uint64(len(k))) + msgSize - i = encodeVarintCheck(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintCheck(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - dAtA[i] = 0x12 - i++ - i = encodeVarintCheck(dAtA, i, uint64((&v).Size())) - n2, err := (&v).MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 - } - } - return i, nil -} - -func (m *CheckRequest_QuotaParams) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CheckRequest_QuotaParams) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Amount != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintCheck(dAtA, i, uint64(m.Amount)) - } - if m.BestEffort { - dAtA[i] = 0x10 - i++ - if m.BestEffort { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - return i, nil -} - -func (m *CheckResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CheckResponse) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0x12 - i++ - i = encodeVarintCheck(dAtA, i, uint64(m.Precondition.Size())) - n3, err := m.Precondition.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 - if len(m.Quotas) > 0 { - for k, _ := range m.Quotas { - dAtA[i] = 0x1a - i++ - v := m.Quotas[k] - msgSize := 0 - if (&v) != nil { - msgSize = (&v).Size() - msgSize += 1 + sovCheck(uint64(msgSize)) - } - mapSize := 1 + len(k) + sovCheck(uint64(len(k))) + msgSize - i = encodeVarintCheck(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintCheck(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - dAtA[i] = 0x12 - i++ - i = encodeVarintCheck(dAtA, i, uint64((&v).Size())) - n4, err := (&v).MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n4 - } - } - return i, nil -} - -func (m *CheckResponse_PreconditionResult) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CheckResponse_PreconditionResult) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintCheck(dAtA, i, uint64(m.Status.Size())) - n5, err := m.Status.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n5 - dAtA[i] = 0x12 - i++ - i = encodeVarintCheck(dAtA, i, uint64(types.SizeOfStdDuration(m.ValidDuration))) - n6, err := types.StdDurationMarshalTo(m.ValidDuration, dAtA[i:]) - if err != nil { - return 0, err - } - i += n6 - if m.ValidUseCount != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintCheck(dAtA, i, uint64(m.ValidUseCount)) - } - if m.ReferencedAttributes != nil { - dAtA[i] = 0x2a - i++ - i = encodeVarintCheck(dAtA, i, uint64(m.ReferencedAttributes.Size())) - n7, err := m.ReferencedAttributes.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n7 - } - if m.RouteDirective != nil { - dAtA[i] = 0x32 - i++ - i = encodeVarintCheck(dAtA, i, uint64(m.RouteDirective.Size())) - n8, err := m.RouteDirective.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n8 - } - return i, nil -} - -func (m *CheckResponse_QuotaResult) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CheckResponse_QuotaResult) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintCheck(dAtA, i, uint64(types.SizeOfStdDuration(m.ValidDuration))) - n9, err := types.StdDurationMarshalTo(m.ValidDuration, dAtA[i:]) - if err != nil { - return 0, err - } - i += n9 - if m.GrantedAmount != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintCheck(dAtA, i, uint64(m.GrantedAmount)) - } - dAtA[i] = 0x2a - i++ - i = encodeVarintCheck(dAtA, i, uint64(m.ReferencedAttributes.Size())) - n10, err := m.ReferencedAttributes.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n10 - return i, nil -} - -func (m *ReferencedAttributes) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ReferencedAttributes) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Words) > 0 { - for _, s := range m.Words { - dAtA[i] = 0xa - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if len(m.AttributeMatches) > 0 { - for _, msg := range m.AttributeMatches { - dAtA[i] = 0x12 - i++ - i = encodeVarintCheck(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - return i, nil -} - -func (m *ReferencedAttributes_AttributeMatch) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ReferencedAttributes_AttributeMatch) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Name != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintCheck(dAtA, i, uint64((uint32(m.Name)<<1)^uint32((m.Name>>31)))) - } - if m.Condition != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintCheck(dAtA, i, uint64(m.Condition)) - } - if len(m.Regex) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintCheck(dAtA, i, uint64(len(m.Regex))) - i += copy(dAtA[i:], m.Regex) - } - if m.MapKey != 0 { - dAtA[i] = 0x20 - i++ - i = encodeVarintCheck(dAtA, i, uint64((uint32(m.MapKey)<<1)^uint32((m.MapKey>>31)))) - } - return i, nil -} - -func (m *HeaderOperation) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *HeaderOperation) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintCheck(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - } - if len(m.Value) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintCheck(dAtA, i, uint64(len(m.Value))) - i += copy(dAtA[i:], m.Value) - } - if m.Operation != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintCheck(dAtA, i, uint64(m.Operation)) - } - return i, nil -} - -func (m *RouteDirective) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RouteDirective) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.RequestHeaderOperations) > 0 { - for _, msg := range m.RequestHeaderOperations { - dAtA[i] = 0xa - i++ - i = encodeVarintCheck(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.ResponseHeaderOperations) > 0 { - for _, msg := range m.ResponseHeaderOperations { - dAtA[i] = 0x12 - i++ - i = encodeVarintCheck(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.DirectResponseCode != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintCheck(dAtA, i, uint64(m.DirectResponseCode)) - } - if len(m.DirectResponseBody) > 0 { - dAtA[i] = 0x22 - i++ - i = encodeVarintCheck(dAtA, i, uint64(len(m.DirectResponseBody))) - i += copy(dAtA[i:], m.DirectResponseBody) - } - return i, nil -} - -func encodeVarintCheck(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func (m *CheckRequest) Size() (n int) { - var l int - _ = l - l = m.Attributes.Size() - n += 1 + l + sovCheck(uint64(l)) - if m.GlobalWordCount != 0 { - n += 1 + sovCheck(uint64(m.GlobalWordCount)) - } - l = len(m.DeduplicationId) - if l > 0 { - n += 1 + l + sovCheck(uint64(l)) - } - if len(m.Quotas) > 0 { - for k, v := range m.Quotas { - _ = k - _ = v - l = v.Size() - mapEntrySize := 1 + len(k) + sovCheck(uint64(len(k))) + 1 + l + sovCheck(uint64(l)) - n += mapEntrySize + 1 + sovCheck(uint64(mapEntrySize)) - } - } - return n -} - -func (m *CheckRequest_QuotaParams) Size() (n int) { - var l int - _ = l - if m.Amount != 0 { - n += 1 + sovCheck(uint64(m.Amount)) - } - if m.BestEffort { - n += 2 - } - return n -} - -func (m *CheckResponse) Size() (n int) { - var l int - _ = l - l = m.Precondition.Size() - n += 1 + l + sovCheck(uint64(l)) - if len(m.Quotas) > 0 { - for k, v := range m.Quotas { - _ = k - _ = v - l = v.Size() - mapEntrySize := 1 + len(k) + sovCheck(uint64(len(k))) + 1 + l + sovCheck(uint64(l)) - n += mapEntrySize + 1 + sovCheck(uint64(mapEntrySize)) - } - } - return n -} - -func (m *CheckResponse_PreconditionResult) Size() (n int) { - var l int - _ = l - l = m.Status.Size() - n += 1 + l + sovCheck(uint64(l)) - l = types.SizeOfStdDuration(m.ValidDuration) - n += 1 + l + sovCheck(uint64(l)) - if m.ValidUseCount != 0 { - n += 1 + sovCheck(uint64(m.ValidUseCount)) - } - if m.ReferencedAttributes != nil { - l = m.ReferencedAttributes.Size() - n += 1 + l + sovCheck(uint64(l)) - } - if m.RouteDirective != nil { - l = m.RouteDirective.Size() - n += 1 + l + sovCheck(uint64(l)) - } - return n -} - -func (m *CheckResponse_QuotaResult) Size() (n int) { - var l int - _ = l - l = types.SizeOfStdDuration(m.ValidDuration) - n += 1 + l + sovCheck(uint64(l)) - if m.GrantedAmount != 0 { - n += 1 + sovCheck(uint64(m.GrantedAmount)) - } - l = m.ReferencedAttributes.Size() - n += 1 + l + sovCheck(uint64(l)) - return n -} - -func (m *ReferencedAttributes) Size() (n int) { - var l int - _ = l - if len(m.Words) > 0 { - for _, s := range m.Words { - l = len(s) - n += 1 + l + sovCheck(uint64(l)) - } - } - if len(m.AttributeMatches) > 0 { - for _, e := range m.AttributeMatches { - l = e.Size() - n += 1 + l + sovCheck(uint64(l)) - } - } - return n -} - -func (m *ReferencedAttributes_AttributeMatch) Size() (n int) { - var l int - _ = l - if m.Name != 0 { - n += 1 + sozCheck(uint64(m.Name)) - } - if m.Condition != 0 { - n += 1 + sovCheck(uint64(m.Condition)) - } - l = len(m.Regex) - if l > 0 { - n += 1 + l + sovCheck(uint64(l)) - } - if m.MapKey != 0 { - n += 1 + sozCheck(uint64(m.MapKey)) - } - return n -} - -func (m *HeaderOperation) Size() (n int) { - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovCheck(uint64(l)) - } - l = len(m.Value) - if l > 0 { - n += 1 + l + sovCheck(uint64(l)) - } - if m.Operation != 0 { - n += 1 + sovCheck(uint64(m.Operation)) - } - return n -} - -func (m *RouteDirective) Size() (n int) { - var l int - _ = l - if len(m.RequestHeaderOperations) > 0 { - for _, e := range m.RequestHeaderOperations { - l = e.Size() - n += 1 + l + sovCheck(uint64(l)) - } - } - if len(m.ResponseHeaderOperations) > 0 { - for _, e := range m.ResponseHeaderOperations { - l = e.Size() - n += 1 + l + sovCheck(uint64(l)) - } - } - if m.DirectResponseCode != 0 { - n += 1 + sovCheck(uint64(m.DirectResponseCode)) - } - l = len(m.DirectResponseBody) - if l > 0 { - n += 1 + l + sovCheck(uint64(l)) - } - return n -} - -func sovCheck(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozCheck(x uint64) (n int) { - return sovCheck(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *CheckRequest) String() string { - if this == nil { - return "nil" - } - keysForQuotas := make([]string, 0, len(this.Quotas)) - for k, _ := range this.Quotas { - keysForQuotas = append(keysForQuotas, k) - } - sortkeys.Strings(keysForQuotas) - mapStringForQuotas := "map[string]CheckRequest_QuotaParams{" - for _, k := range keysForQuotas { - mapStringForQuotas += fmt.Sprintf("%v: %v,", k, this.Quotas[k]) - } - mapStringForQuotas += "}" - s := strings.Join([]string{`&CheckRequest{`, - `Attributes:` + strings.Replace(strings.Replace(this.Attributes.String(), "CompressedAttributes", "CompressedAttributes", 1), `&`, ``, 1) + `,`, - `GlobalWordCount:` + fmt.Sprintf("%v", this.GlobalWordCount) + `,`, - `DeduplicationId:` + fmt.Sprintf("%v", this.DeduplicationId) + `,`, - `Quotas:` + mapStringForQuotas + `,`, - `}`, - }, "") - return s -} -func (this *CheckRequest_QuotaParams) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CheckRequest_QuotaParams{`, - `Amount:` + fmt.Sprintf("%v", this.Amount) + `,`, - `BestEffort:` + fmt.Sprintf("%v", this.BestEffort) + `,`, - `}`, - }, "") - return s -} -func (this *CheckResponse) String() string { - if this == nil { - return "nil" - } - keysForQuotas := make([]string, 0, len(this.Quotas)) - for k, _ := range this.Quotas { - keysForQuotas = append(keysForQuotas, k) - } - sortkeys.Strings(keysForQuotas) - mapStringForQuotas := "map[string]CheckResponse_QuotaResult{" - for _, k := range keysForQuotas { - mapStringForQuotas += fmt.Sprintf("%v: %v,", k, this.Quotas[k]) - } - mapStringForQuotas += "}" - s := strings.Join([]string{`&CheckResponse{`, - `Precondition:` + strings.Replace(strings.Replace(this.Precondition.String(), "CheckResponse_PreconditionResult", "CheckResponse_PreconditionResult", 1), `&`, ``, 1) + `,`, - `Quotas:` + mapStringForQuotas + `,`, - `}`, - }, "") - return s -} -func (this *CheckResponse_PreconditionResult) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CheckResponse_PreconditionResult{`, - `Status:` + strings.Replace(strings.Replace(this.Status.String(), "Status", "google_rpc.Status", 1), `&`, ``, 1) + `,`, - `ValidDuration:` + strings.Replace(strings.Replace(this.ValidDuration.String(), "Duration", "google_protobuf1.Duration", 1), `&`, ``, 1) + `,`, - `ValidUseCount:` + fmt.Sprintf("%v", this.ValidUseCount) + `,`, - `ReferencedAttributes:` + strings.Replace(fmt.Sprintf("%v", this.ReferencedAttributes), "ReferencedAttributes", "ReferencedAttributes", 1) + `,`, - `RouteDirective:` + strings.Replace(fmt.Sprintf("%v", this.RouteDirective), "RouteDirective", "RouteDirective", 1) + `,`, - `}`, - }, "") - return s -} -func (this *CheckResponse_QuotaResult) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CheckResponse_QuotaResult{`, - `ValidDuration:` + strings.Replace(strings.Replace(this.ValidDuration.String(), "Duration", "google_protobuf1.Duration", 1), `&`, ``, 1) + `,`, - `GrantedAmount:` + fmt.Sprintf("%v", this.GrantedAmount) + `,`, - `ReferencedAttributes:` + strings.Replace(strings.Replace(this.ReferencedAttributes.String(), "ReferencedAttributes", "ReferencedAttributes", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *ReferencedAttributes) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ReferencedAttributes{`, - `Words:` + fmt.Sprintf("%v", this.Words) + `,`, - `AttributeMatches:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.AttributeMatches), "ReferencedAttributes_AttributeMatch", "ReferencedAttributes_AttributeMatch", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *ReferencedAttributes_AttributeMatch) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ReferencedAttributes_AttributeMatch{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Condition:` + fmt.Sprintf("%v", this.Condition) + `,`, - `Regex:` + fmt.Sprintf("%v", this.Regex) + `,`, - `MapKey:` + fmt.Sprintf("%v", this.MapKey) + `,`, - `}`, - }, "") - return s -} -func (this *HeaderOperation) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&HeaderOperation{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Value:` + fmt.Sprintf("%v", this.Value) + `,`, - `Operation:` + fmt.Sprintf("%v", this.Operation) + `,`, - `}`, - }, "") - return s -} -func (this *RouteDirective) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&RouteDirective{`, - `RequestHeaderOperations:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.RequestHeaderOperations), "HeaderOperation", "HeaderOperation", 1), `&`, ``, 1) + `,`, - `ResponseHeaderOperations:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ResponseHeaderOperations), "HeaderOperation", "HeaderOperation", 1), `&`, ``, 1) + `,`, - `DirectResponseCode:` + fmt.Sprintf("%v", this.DirectResponseCode) + `,`, - `DirectResponseBody:` + fmt.Sprintf("%v", this.DirectResponseBody) + `,`, - `}`, - }, "") - return s -} -func valueToStringCheck(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *CheckRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CheckRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CheckRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Attributes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field GlobalWordCount", wireType) - } - m.GlobalWordCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.GlobalWordCount |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeduplicationId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DeduplicationId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Quotas", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Quotas == nil { - m.Quotas = make(map[string]CheckRequest_QuotaParams) - } - var mapkey string - mapvalue := &CheckRequest_QuotaParams{} - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthCheck - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthCheck - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthCheck - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &CheckRequest_QuotaParams{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipCheck(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCheck - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Quotas[mapkey] = *mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCheck(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCheck - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CheckRequest_QuotaParams) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QuotaParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QuotaParams: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - m.Amount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Amount |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BestEffort", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.BestEffort = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipCheck(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCheck - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CheckResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CheckResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CheckResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Precondition", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Precondition.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Quotas", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Quotas == nil { - m.Quotas = make(map[string]CheckResponse_QuotaResult) - } - var mapkey string - mapvalue := &CheckResponse_QuotaResult{} - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthCheck - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthCheck - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthCheck - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &CheckResponse_QuotaResult{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipCheck(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCheck - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Quotas[mapkey] = *mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCheck(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCheck - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CheckResponse_PreconditionResult) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: PreconditionResult: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PreconditionResult: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidDuration", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := types.StdDurationUnmarshal(&m.ValidDuration, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidUseCount", wireType) - } - m.ValidUseCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ValidUseCount |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ReferencedAttributes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ReferencedAttributes == nil { - m.ReferencedAttributes = &ReferencedAttributes{} - } - if err := m.ReferencedAttributes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RouteDirective", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RouteDirective == nil { - m.RouteDirective = &RouteDirective{} - } - if err := m.RouteDirective.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCheck(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCheck - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CheckResponse_QuotaResult) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QuotaResult: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QuotaResult: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidDuration", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := types.StdDurationUnmarshal(&m.ValidDuration, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field GrantedAmount", wireType) - } - m.GrantedAmount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.GrantedAmount |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ReferencedAttributes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ReferencedAttributes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCheck(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCheck - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ReferencedAttributes) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ReferencedAttributes: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ReferencedAttributes: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Words", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Words = append(m.Words, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AttributeMatches", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AttributeMatches = append(m.AttributeMatches, ReferencedAttributes_AttributeMatch{}) - if err := m.AttributeMatches[len(m.AttributeMatches)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCheck(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCheck - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ReferencedAttributes_AttributeMatch) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AttributeMatch: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AttributeMatch: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Name = v - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Condition", wireType) - } - m.Condition = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Condition |= (ReferencedAttributes_Condition(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Regex", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Regex = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MapKey", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.MapKey = v - default: - iNdEx = preIndex - skippy, err := skipCheck(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCheck - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *HeaderOperation) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HeaderOperation: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HeaderOperation: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Operation", wireType) - } - m.Operation = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Operation |= (HeaderOperation_Operation(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipCheck(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCheck - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RouteDirective) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RouteDirective: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RouteDirective: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestHeaderOperations", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RequestHeaderOperations = append(m.RequestHeaderOperations, HeaderOperation{}) - if err := m.RequestHeaderOperations[len(m.RequestHeaderOperations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResponseHeaderOperations", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResponseHeaderOperations = append(m.ResponseHeaderOperations, HeaderOperation{}) - if err := m.ResponseHeaderOperations[len(m.ResponseHeaderOperations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DirectResponseCode", wireType) - } - m.DirectResponseCode = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DirectResponseCode |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DirectResponseBody", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DirectResponseBody = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCheck(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCheck - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipCheck(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCheck - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCheck - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCheck - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthCheck - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCheck - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipCheck(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthCheck = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowCheck = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("mixer/v1/check.proto", fileDescriptorCheck) } - -var fileDescriptorCheck = []byte{ - // 1039 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xbf, 0x73, 0xe3, 0xc4, - 0x17, 0xb7, 0xfc, 0x2b, 0xd1, 0xf3, 0xc5, 0x71, 0x76, 0x9c, 0x6f, 0x1c, 0x17, 0x4a, 0xc6, 0xf3, - 0x85, 0xf1, 0x51, 0xc8, 0xb9, 0x5c, 0xc3, 0x50, 0xc0, 0x38, 0x8a, 0x12, 0x1c, 0xee, 0x12, 0xb3, - 0xb9, 0x83, 0xe3, 0x1a, 0x8d, 0x2c, 0x6d, 0x1c, 0xcd, 0xd9, 0x5e, 0xdd, 0x4a, 0x0a, 0x97, 0x8e, - 0x19, 0xfe, 0x01, 0x4a, 0x5a, 0x1a, 0x86, 0xbf, 0x80, 0x8a, 0x3f, 0x20, 0xe5, 0x95, 0x54, 0x40, - 0x0c, 0xcc, 0x50, 0x5e, 0x49, 0xc9, 0x68, 0x77, 0x25, 0xdb, 0xb1, 0x8f, 0x0b, 0x0c, 0xdd, 0xee, - 0xfb, 0xf1, 0x79, 0xef, 0x7d, 0xf4, 0x79, 0x3b, 0x82, 0xea, 0xd0, 0x7b, 0x41, 0x58, 0xeb, 0xe2, - 0x5e, 0xcb, 0x39, 0x27, 0xce, 0x33, 0xdd, 0x67, 0x34, 0xa4, 0xa8, 0xec, 0x05, 0xa1, 0x47, 0x75, - 0xee, 0xd3, 0x2f, 0xee, 0xd5, 0xab, 0x7d, 0xda, 0xa7, 0xdc, 0xd5, 0x8a, 0x4f, 0x22, 0xaa, 0xae, - 0xf5, 0x29, 0xed, 0x0f, 0x48, 0x8b, 0xdf, 0x7a, 0xd1, 0x59, 0xcb, 0x8d, 0x98, 0x1d, 0x7a, 0x74, - 0x24, 0xfd, 0x1b, 0xd2, 0xcf, 0x7c, 0xa7, 0x15, 0x84, 0x76, 0x18, 0x05, 0xd2, 0xb1, 0x99, 0x16, - 0xb5, 0xc3, 0x90, 0x79, 0xbd, 0x28, 0x24, 0xd2, 0xd5, 0xf8, 0x36, 0x07, 0x77, 0x8c, 0xb8, 0x13, - 0x4c, 0x9e, 0x47, 0x24, 0x08, 0xd1, 0x11, 0xc0, 0x24, 0xa8, 0xa6, 0x6c, 0x2b, 0xcd, 0xd2, 0xee, - 0xff, 0xf5, 0xd9, 0xfe, 0x74, 0x83, 0x0e, 0x7d, 0x46, 0x82, 0x80, 0xb8, 0xed, 0x34, 0x76, 0x2f, - 0x7f, 0xf5, 0xd3, 0x56, 0x06, 0x4f, 0x65, 0xa3, 0x77, 0x60, 0xad, 0x3f, 0xa0, 0x3d, 0x7b, 0x60, - 0x7d, 0x4e, 0x99, 0x6b, 0x39, 0x34, 0x1a, 0x85, 0xb5, 0xec, 0xb6, 0xd2, 0x5c, 0xc1, 0xab, 0xc2, - 0xf1, 0x29, 0x65, 0xae, 0x11, 0x9b, 0xd1, 0x5d, 0xa8, 0xb8, 0xc4, 0x8d, 0xfc, 0x81, 0xe7, 0xf0, - 0x99, 0x2c, 0xcf, 0xad, 0xe5, 0xb6, 0x95, 0xa6, 0x8a, 0x57, 0x67, 0xec, 0x1d, 0x17, 0x1d, 0x40, - 0xf1, 0x79, 0x44, 0x43, 0x3b, 0xa8, 0xe5, 0xb7, 0x73, 0xcd, 0xd2, 0x6e, 0x73, 0xae, 0xbd, 0xa9, - 0x81, 0xf4, 0x8f, 0x79, 0xa8, 0x39, 0x0a, 0xd9, 0xa5, 0x6c, 0x51, 0x66, 0xd7, 0x0f, 0xa0, 0xc4, - 0x9d, 0x5d, 0x9b, 0xd9, 0xc3, 0x00, 0xfd, 0x0f, 0x8a, 0xf6, 0x90, 0xb7, 0x18, 0x4f, 0x9d, 0xc3, - 0xf2, 0x86, 0xb6, 0xa0, 0xd4, 0x23, 0x41, 0x68, 0x91, 0xb3, 0x33, 0xca, 0x44, 0xff, 0xcb, 0x18, - 0x62, 0x93, 0xc9, 0x2d, 0x75, 0x47, 0xe2, 0x88, 0x22, 0xa8, 0x02, 0xb9, 0x67, 0xe4, 0x92, 0x83, - 0xa8, 0x38, 0x3e, 0xa2, 0xf7, 0xa1, 0x70, 0x61, 0x0f, 0x22, 0xc2, 0x73, 0x6f, 0xd5, 0xaf, 0x68, - 0x09, 0x8b, 0xb4, 0xf7, 0xb2, 0xef, 0x2a, 0x8d, 0xdf, 0x8b, 0xb0, 0x22, 0xe3, 0x02, 0x9f, 0x8e, - 0x02, 0x82, 0x9e, 0xc2, 0x1d, 0x9f, 0x11, 0x87, 0x8e, 0x5c, 0x2f, 0x26, 0x46, 0x82, 0xef, 0xbc, - 0x06, 0x5c, 0x24, 0xe9, 0xdd, 0xa9, 0x0c, 0x4c, 0x82, 0x68, 0x10, 0x4a, 0x52, 0x66, 0xb0, 0xd0, - 0x61, 0x4a, 0x71, 0x8e, 0x53, 0x7c, 0xf7, 0xef, 0x51, 0x5f, 0xcf, 0xf1, 0x6f, 0x59, 0x40, 0xf3, - 0x35, 0xd1, 0x0e, 0x14, 0x85, 0x42, 0xa5, 0xc2, 0x90, 0x2e, 0xb4, 0xab, 0x33, 0xdf, 0xd1, 0x4f, - 0xb9, 0x27, 0x01, 0x12, 0x71, 0xe8, 0x08, 0xca, 0x17, 0xf6, 0xc0, 0x73, 0xad, 0x44, 0xf4, 0x72, - 0xde, 0xcd, 0x24, 0x33, 0xd9, 0x0a, 0x7d, 0x5f, 0x06, 0xec, 0x2d, 0xc7, 0x00, 0x5f, 0xff, 0xbc, - 0xa5, 0xe0, 0x15, 0x9e, 0x9a, 0x38, 0xd0, 0xdb, 0xb0, 0x2a, 0xb0, 0xa2, 0x80, 0x48, 0x55, 0xc6, - 0x52, 0x2b, 0xc8, 0xb8, 0xc7, 0x01, 0x11, 0x9a, 0xfc, 0x0c, 0xd6, 0x19, 0x39, 0x23, 0x8c, 0x8c, - 0x1c, 0xe2, 0x5a, 0x53, 0x6b, 0x51, 0x58, 0xbc, 0x16, 0x38, 0x0d, 0x9e, 0xac, 0x05, 0xae, 0xb2, - 0x05, 0x56, 0x74, 0x08, 0xab, 0x8c, 0x46, 0x21, 0xb1, 0x5c, 0x8f, 0x11, 0x27, 0xf4, 0x2e, 0x48, - 0xad, 0xc8, 0x41, 0xb5, 0x39, 0xd0, 0x38, 0x6c, 0x3f, 0x89, 0xc2, 0x65, 0x36, 0x73, 0x3f, 0xca, - 0x2f, 0xe7, 0x2b, 0x85, 0xfa, 0xb5, 0x22, 0x35, 0x28, 0xf9, 0x9d, 0x67, 0x4b, 0xf9, 0xd7, 0x6c, - 0xbd, 0x05, 0xe5, 0x3e, 0xb3, 0x47, 0x61, 0x4c, 0xc1, 0x30, 0x5d, 0xe1, 0x1c, 0x5e, 0x91, 0xd6, - 0xb6, 0x58, 0x13, 0xeb, 0x3f, 0x20, 0x4b, 0x7e, 0xf3, 0x85, 0x94, 0xd5, 0xdd, 0x37, 0xad, 0xd9, - 0x07, 0xb3, 0x6b, 0x76, 0x1b, 0xcd, 0x0a, 0xba, 0xa6, 0xf7, 0xec, 0xcb, 0x1c, 0x54, 0x17, 0xb5, - 0x86, 0xaa, 0x50, 0x88, 0x5f, 0xb1, 0x58, 0xb1, 0xb9, 0xa6, 0x8a, 0xc5, 0x05, 0x9d, 0xc1, 0x5a, - 0x3a, 0xaa, 0x35, 0xb4, 0x43, 0xe7, 0x9c, 0x04, 0xb5, 0x2c, 0xdf, 0x99, 0xfb, 0xb7, 0x99, 0x58, - 0x4f, 0x8f, 0x0f, 0xe3, 0x64, 0x49, 0x40, 0xc5, 0x9e, 0xb1, 0x92, 0xa0, 0xfe, 0x8d, 0x02, 0xe5, - 0xd9, 0x50, 0x84, 0x20, 0x3f, 0xb2, 0x87, 0x84, 0x33, 0xb0, 0x86, 0xf9, 0x19, 0x3d, 0x00, 0x75, - 0xf6, 0x41, 0x28, 0xef, 0xea, 0xb7, 0x6a, 0xc3, 0x48, 0x17, 0x74, 0x02, 0x10, 0x8f, 0xcc, 0x48, - 0x9f, 0xbc, 0x90, 0x0f, 0xb1, 0xb8, 0xa0, 0x0d, 0x58, 0x1a, 0xda, 0xbe, 0x15, 0x93, 0x9f, 0xe7, - 0xa5, 0x8b, 0x43, 0xdb, 0xff, 0x88, 0x5c, 0x36, 0x3a, 0xa0, 0xa6, 0x30, 0x68, 0x13, 0xd6, 0x8d, - 0x93, 0xe3, 0xfd, 0xce, 0xa3, 0xce, 0xc9, 0xb1, 0xf5, 0xf8, 0xf8, 0xb4, 0x6b, 0x1a, 0x9d, 0x83, - 0x8e, 0xb9, 0x5f, 0xc9, 0xa0, 0x12, 0x2c, 0xb5, 0xf7, 0x4e, 0xcd, 0x63, 0xc3, 0xac, 0x28, 0x48, - 0x85, 0x82, 0xf9, 0xa4, 0x6d, 0x3c, 0xaa, 0x64, 0xe3, 0x23, 0x36, 0x0f, 0xcd, 0x27, 0x95, 0x5c, - 0xe3, 0x7b, 0x05, 0x56, 0x3f, 0x24, 0xb6, 0x4b, 0xd8, 0x89, 0x4f, 0xa4, 0x0e, 0xa7, 0xe7, 0x55, - 0xe5, 0xbc, 0xd5, 0xe9, 0x4f, 0xae, 0xca, 0xef, 0x88, 0x0e, 0x41, 0xa5, 0x49, 0x1a, 0xef, 0xbd, - 0x3c, 0x2f, 0x86, 0x1b, 0xe8, 0x7a, 0x7a, 0xc2, 0x93, 0xdc, 0xc6, 0x0e, 0xa8, 0x93, 0xfa, 0x25, - 0x58, 0xc2, 0x66, 0xf7, 0x41, 0xdb, 0x30, 0x2b, 0x19, 0x04, 0x50, 0xc4, 0xe6, 0xc3, 0x93, 0x4f, - 0xe2, 0x11, 0x00, 0x8a, 0xed, 0x6e, 0xd7, 0x3c, 0xde, 0xaf, 0x64, 0x1b, 0x3f, 0x64, 0xa1, 0x3c, - 0xbb, 0xb1, 0xc8, 0x86, 0x4d, 0x26, 0xde, 0x76, 0xeb, 0x9c, 0x17, 0xb5, 0xd2, 0x02, 0x42, 0x4c, - 0xa5, 0xdd, 0xad, 0x37, 0x74, 0x27, 0x65, 0xb1, 0x21, 0x71, 0x6e, 0x78, 0x03, 0xe4, 0x40, 0x9d, - 0x49, 0x5d, 0x2f, 0xa8, 0x91, 0xfd, 0x27, 0x35, 0x6a, 0x09, 0xd0, 0x5c, 0x91, 0x1d, 0xa8, 0x8a, - 0xc7, 0xca, 0x4a, 0x6b, 0x39, 0xd4, 0x25, 0x9c, 0xe0, 0x15, 0x8c, 0x84, 0x2f, 0x59, 0x2f, 0x83, - 0xba, 0x64, 0x51, 0x46, 0x8f, 0xba, 0x42, 0x36, 0xea, 0xcd, 0x8c, 0x3d, 0xea, 0x5e, 0xee, 0x1d, - 0x5d, 0x5d, 0x6b, 0x99, 0x97, 0xd7, 0x5a, 0xe6, 0xc7, 0x6b, 0x2d, 0xf3, 0xea, 0x5a, 0xcb, 0x7c, - 0x31, 0xd6, 0x94, 0xef, 0xc6, 0x5a, 0xe6, 0x6a, 0xac, 0x29, 0x2f, 0xc7, 0x9a, 0xf2, 0xcb, 0x58, - 0x53, 0xfe, 0x18, 0x6b, 0x99, 0x57, 0x63, 0x4d, 0xf9, 0xea, 0x57, 0x2d, 0xf3, 0x74, 0x5d, 0x4c, - 0xe5, 0xd1, 0x96, 0xed, 0x7b, 0xad, 0xe4, 0x47, 0xe7, 0x4f, 0x45, 0xe9, 0x15, 0xf9, 0x1b, 0x77, - 0xff, 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x12, 0xef, 0x74, 0xf2, 0x73, 0x09, 0x00, 0x00, -} diff --git a/mixer/v1/report.pb.go b/mixer/v1/report.pb.go deleted file mode 100644 index d1383edf20..0000000000 --- a/mixer/v1/report.pb.go +++ /dev/null @@ -1,521 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: mixer/v1/report.proto - -package v1 - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import strings "strings" -import reflect "reflect" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// Used to report telemetry after performing one or more actions. -type ReportRequest struct { - // The attributes to use for this request. - // - // Each `Attributes` element represents the state of a single action. Multiple actions - // can be provided in a single message in order to improve communication efficiency. The - // client can accumulate a set of actions and send them all in one single message. - // - // Although each `Attributes` message is semantically treated as an independent - // stand-alone entity unrelated to the other attributes within the message, this - // message format leverages delta-encoding between attribute messages in order to - // substantially reduce the request size and improve end-to-end efficiency. Each - // individual set of attributes is used to modify the previous set. This eliminates - // the need to redundantly send the same attributes multiple times over within - // a single request. - // - // If a client is not sophisticated and doesn't want to use delta-encoding, - // a degenerate case is to include all attributes in every individual message. - Attributes []CompressedAttributes `protobuf:"bytes,1,rep,name=attributes" json:"attributes"` - // The default message-level dictionary for all the attributes. - // Individual attribute messages can have their own dictionaries, but if they don't - // then this set of words, if it is provided, is used instead. - // - // This makes it possible to share the same dictionary for all attributes in this - // request, which can substantially reduce the overall request size. - DefaultWords []string `protobuf:"bytes,2,rep,name=default_words,json=defaultWords" json:"default_words,omitempty"` - // The number of words in the global dictionary. - // To detect global dictionary out of sync between client and server. - GlobalWordCount uint32 `protobuf:"varint,3,opt,name=global_word_count,json=globalWordCount,proto3" json:"global_word_count,omitempty"` -} - -func (m *ReportRequest) Reset() { *m = ReportRequest{} } -func (*ReportRequest) ProtoMessage() {} -func (*ReportRequest) Descriptor() ([]byte, []int) { return fileDescriptorReport, []int{0} } - -// Used to carry responses to telemetry reports -type ReportResponse struct { -} - -func (m *ReportResponse) Reset() { *m = ReportResponse{} } -func (*ReportResponse) ProtoMessage() {} -func (*ReportResponse) Descriptor() ([]byte, []int) { return fileDescriptorReport, []int{1} } - -func init() { - proto.RegisterType((*ReportRequest)(nil), "istio.mixer.v1.ReportRequest") - proto.RegisterType((*ReportResponse)(nil), "istio.mixer.v1.ReportResponse") -} -func (m *ReportRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ReportRequest) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Attributes) > 0 { - for _, msg := range m.Attributes { - dAtA[i] = 0xa - i++ - i = encodeVarintReport(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.DefaultWords) > 0 { - for _, s := range m.DefaultWords { - dAtA[i] = 0x12 - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if m.GlobalWordCount != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintReport(dAtA, i, uint64(m.GlobalWordCount)) - } - return i, nil -} - -func (m *ReportResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ReportResponse) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - return i, nil -} - -func encodeVarintReport(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func (m *ReportRequest) Size() (n int) { - var l int - _ = l - if len(m.Attributes) > 0 { - for _, e := range m.Attributes { - l = e.Size() - n += 1 + l + sovReport(uint64(l)) - } - } - if len(m.DefaultWords) > 0 { - for _, s := range m.DefaultWords { - l = len(s) - n += 1 + l + sovReport(uint64(l)) - } - } - if m.GlobalWordCount != 0 { - n += 1 + sovReport(uint64(m.GlobalWordCount)) - } - return n -} - -func (m *ReportResponse) Size() (n int) { - var l int - _ = l - return n -} - -func sovReport(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozReport(x uint64) (n int) { - return sovReport(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *ReportRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ReportRequest{`, - `Attributes:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Attributes), "CompressedAttributes", "CompressedAttributes", 1), `&`, ``, 1) + `,`, - `DefaultWords:` + fmt.Sprintf("%v", this.DefaultWords) + `,`, - `GlobalWordCount:` + fmt.Sprintf("%v", this.GlobalWordCount) + `,`, - `}`, - }, "") - return s -} -func (this *ReportResponse) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ReportResponse{`, - `}`, - }, "") - return s -} -func valueToStringReport(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *ReportRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReport - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ReportRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ReportRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReport - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthReport - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Attributes = append(m.Attributes, CompressedAttributes{}) - if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DefaultWords", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReport - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthReport - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DefaultWords = append(m.DefaultWords, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field GlobalWordCount", wireType) - } - m.GlobalWordCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReport - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.GlobalWordCount |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipReport(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthReport - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ReportResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReport - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ReportResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ReportResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipReport(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthReport - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipReport(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowReport - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowReport - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowReport - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthReport - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowReport - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipReport(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthReport = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowReport = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("mixer/v1/report.proto", fileDescriptorReport) } - -var fileDescriptorReport = []byte{ - // 294 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x90, 0x31, 0x4e, 0xc3, 0x30, - 0x14, 0x86, 0x6d, 0x8a, 0x90, 0x30, 0xb4, 0x40, 0x44, 0xa5, 0xd0, 0xe1, 0x11, 0x15, 0x86, 0x88, - 0x21, 0x51, 0xe1, 0x04, 0xb4, 0x5b, 0xc7, 0x2c, 0x48, 0x2c, 0x55, 0x42, 0x4c, 0x64, 0x29, 0xed, - 0x0b, 0xb6, 0x53, 0x18, 0x39, 0x02, 0xc7, 0x60, 0xe0, 0x20, 0x19, 0x3b, 0x32, 0x21, 0x62, 0x16, - 0xc6, 0x8e, 0x8c, 0x28, 0x09, 0x2d, 0xb0, 0x59, 0xff, 0xf7, 0x3d, 0xdb, 0xef, 0x67, 0xdd, 0xa9, - 0x78, 0xe0, 0xd2, 0x9f, 0x0f, 0x7c, 0xc9, 0x33, 0x94, 0xda, 0xcb, 0x24, 0x6a, 0xb4, 0x3a, 0x42, - 0x69, 0x81, 0x5e, 0x0d, 0xbd, 0xf9, 0xa0, 0x77, 0x98, 0x60, 0x82, 0x35, 0xf2, 0xab, 0x53, 0x63, - 0xf5, 0x8e, 0xd6, 0xc3, 0xa1, 0xd6, 0x52, 0x44, 0xb9, 0xe6, 0xaa, 0x41, 0xfd, 0x17, 0xca, 0xda, - 0x41, 0x7d, 0x63, 0xc0, 0xef, 0x72, 0xae, 0xb4, 0x35, 0x66, 0xec, 0xd7, 0xb2, 0xa9, 0xd3, 0x72, - 0x77, 0xce, 0x4f, 0xbd, 0xff, 0xef, 0x78, 0x23, 0x9c, 0x66, 0x92, 0x2b, 0xc5, 0xe3, 0xcb, 0xb5, - 0x3b, 0xdc, 0x2c, 0xde, 0x8e, 0x49, 0xf0, 0x67, 0xda, 0x3a, 0x61, 0xed, 0x98, 0xdf, 0x86, 0x79, - 0xaa, 0x27, 0xf7, 0x28, 0x63, 0x65, 0x6f, 0x38, 0x2d, 0x77, 0x3b, 0xd8, 0xfd, 0x09, 0xaf, 0xaa, - 0xcc, 0x3a, 0x63, 0x07, 0x49, 0x8a, 0x51, 0x98, 0xd6, 0xce, 0xe4, 0x06, 0xf3, 0x99, 0xb6, 0x5b, - 0x0e, 0x75, 0xdb, 0xc1, 0x5e, 0x03, 0x2a, 0x6f, 0x54, 0xc5, 0xfd, 0x7d, 0xd6, 0x59, 0xfd, 0x56, - 0x65, 0x38, 0x53, 0x7c, 0x38, 0x2e, 0x4a, 0x20, 0x8b, 0x12, 0xc8, 0x6b, 0x09, 0x64, 0x59, 0x02, - 0x79, 0x34, 0x40, 0x9f, 0x0d, 0x90, 0xc2, 0x00, 0x5d, 0x18, 0xa0, 0xef, 0x06, 0xe8, 0xa7, 0x01, - 0xb2, 0x34, 0x40, 0x9f, 0x3e, 0x80, 0x5c, 0x77, 0x9b, 0x5d, 0x04, 0xfa, 0x61, 0x26, 0xfc, 0x55, - 0x35, 0x5f, 0x94, 0x46, 0x5b, 0x75, 0x27, 0x17, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x09, 0xd3, - 0xb7, 0xd0, 0x6d, 0x01, 0x00, 0x00, -} diff --git a/mixer/v1/service.pb.go b/mixer/v1/service.pb.go deleted file mode 100644 index 40fa3b078d..0000000000 --- a/mixer/v1/service.pb.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: mixer/v1/service.proto - -package v1 - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" - -import context "golang.org/x/net/context" -import grpc "google.golang.org/grpc" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// Client API for Mixer service - -type MixerClient interface { - // Checks preconditions and allocate quota before performing an operation. - // The preconditions enforced depend on the set of supplied attributes and - // the active configuration. - Check(ctx context.Context, in *CheckRequest, opts ...grpc.CallOption) (*CheckResponse, error) - // Reports telemetry, such as logs and metrics. - // The reported information depends on the set of supplied attributes and the - // active configuration. - Report(ctx context.Context, in *ReportRequest, opts ...grpc.CallOption) (*ReportResponse, error) -} - -type mixerClient struct { - cc *grpc.ClientConn -} - -func NewMixerClient(cc *grpc.ClientConn) MixerClient { - return &mixerClient{cc} -} - -func (c *mixerClient) Check(ctx context.Context, in *CheckRequest, opts ...grpc.CallOption) (*CheckResponse, error) { - out := new(CheckResponse) - err := grpc.Invoke(ctx, "/istio.mixer.v1.Mixer/Check", in, out, c.cc, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *mixerClient) Report(ctx context.Context, in *ReportRequest, opts ...grpc.CallOption) (*ReportResponse, error) { - out := new(ReportResponse) - err := grpc.Invoke(ctx, "/istio.mixer.v1.Mixer/Report", in, out, c.cc, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// Server API for Mixer service - -type MixerServer interface { - // Checks preconditions and allocate quota before performing an operation. - // The preconditions enforced depend on the set of supplied attributes and - // the active configuration. - Check(context.Context, *CheckRequest) (*CheckResponse, error) - // Reports telemetry, such as logs and metrics. - // The reported information depends on the set of supplied attributes and the - // active configuration. - Report(context.Context, *ReportRequest) (*ReportResponse, error) -} - -func RegisterMixerServer(s *grpc.Server, srv MixerServer) { - s.RegisterService(&_Mixer_serviceDesc, srv) -} - -func _Mixer_Check_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CheckRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MixerServer).Check(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/istio.mixer.v1.Mixer/Check", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MixerServer).Check(ctx, req.(*CheckRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Mixer_Report_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ReportRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MixerServer).Report(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/istio.mixer.v1.Mixer/Report", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MixerServer).Report(ctx, req.(*ReportRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _Mixer_serviceDesc = grpc.ServiceDesc{ - ServiceName: "istio.mixer.v1.Mixer", - HandlerType: (*MixerServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Check", - Handler: _Mixer_Check_Handler, - }, - { - MethodName: "Report", - Handler: _Mixer_Report_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "mixer/v1/service.proto", -} - -func init() { proto.RegisterFile("mixer/v1/service.proto", fileDescriptorService) } - -var fileDescriptorService = []byte{ - // 216 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xcb, 0xcd, 0xac, 0x48, - 0x2d, 0xd2, 0x2f, 0x33, 0xd4, 0x2f, 0x4e, 0x2d, 0x2a, 0xcb, 0x4c, 0x4e, 0xd5, 0x2b, 0x28, 0xca, - 0x2f, 0xc9, 0x17, 0xe2, 0xcb, 0x2c, 0x2e, 0xc9, 0xcc, 0xd7, 0x03, 0xcb, 0xea, 0x95, 0x19, 0x4a, - 0x89, 0xc0, 0xd5, 0x25, 0x67, 0xa4, 0x26, 0x67, 0x43, 0x54, 0x49, 0x89, 0xc2, 0x45, 0x8b, 0x52, - 0x0b, 0xf2, 0x8b, 0x4a, 0x20, 0xc2, 0x46, 0xb3, 0x18, 0xb9, 0x58, 0x7d, 0x41, 0x32, 0x42, 0x6e, - 0x5c, 0xac, 0xce, 0x20, 0xf5, 0x42, 0x32, 0x7a, 0xa8, 0x06, 0xea, 0x81, 0x85, 0x83, 0x52, 0x0b, - 0x4b, 0x53, 0x8b, 0x4b, 0xa4, 0x64, 0x71, 0xc8, 0x16, 0x17, 0xe4, 0xe7, 0x15, 0xa7, 0x2a, 0x31, - 0x08, 0x79, 0x72, 0xb1, 0x05, 0x81, 0x6d, 0x10, 0xc2, 0x50, 0x0a, 0x11, 0x87, 0x99, 0x24, 0x87, - 0x4b, 0x1a, 0x66, 0x94, 0x93, 0xdb, 0x85, 0x87, 0x72, 0x0c, 0x37, 0x1e, 0xca, 0x31, 0x7c, 0x78, - 0x28, 0xc7, 0xd8, 0xf0, 0x48, 0x8e, 0x71, 0xc5, 0x23, 0x39, 0xc6, 0x13, 0x8f, 0xe4, 0x18, 0x2f, - 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0xf1, 0xc5, 0x23, 0x39, 0x86, 0x0f, 0x8f, 0xe4, 0x18, - 0x27, 0x3c, 0x96, 0x63, 0x88, 0x12, 0x85, 0x18, 0x97, 0x99, 0xaf, 0x9f, 0x58, 0x90, 0xa9, 0x0f, - 0xf3, 0x6e, 0x03, 0x23, 0x63, 0x12, 0x1b, 0xd8, 0xaf, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xd8, 0x38, 0xef, 0x37, 0x42, 0x01, 0x00, 0x00, -} From 676a2549c8e704ac27634ef8dccd2f51cf81308d Mon Sep 17 00:00:00 2001 From: Jeff Mendoza Date: Thu, 1 Nov 2018 11:45:05 -0700 Subject: [PATCH 3/4] Regen mixer files --- mixer/v1/attributes.pb.go | 4 +- mixer/v1/mixer.pb.go | 3064 +++++++++++++++++ proto.lock | 676 ++-- .../mixer/v1/{check_pb2.py => mixer_pb2.py} | 151 +- python/istio_api/mixer/v1/report_pb2.py | 123 - python/istio_api/mixer/v1/service_pb2.py | 68 - 6 files changed, 3533 insertions(+), 553 deletions(-) create mode 100644 mixer/v1/mixer.pb.go rename python/istio_api/mixer/v1/{check_pb2.py => mixer_pb2.py} (86%) delete mode 100644 python/istio_api/mixer/v1/report_pb2.py delete mode 100644 python/istio_api/mixer/v1/service_pb2.py diff --git a/mixer/v1/attributes.pb.go b/mixer/v1/attributes.pb.go index 3d0fa8a1cb..67c8b71078 100644 --- a/mixer/v1/attributes.pb.go +++ b/mixer/v1/attributes.pb.go @@ -6,9 +6,7 @@ It is generated from these files: mixer/v1/attributes.proto - mixer/v1/check.proto - mixer/v1/report.proto - mixer/v1/service.proto + mixer/v1/mixer.proto It has these top-level messages: Attributes diff --git a/mixer/v1/mixer.pb.go b/mixer/v1/mixer.pb.go new file mode 100644 index 0000000000..0f6c334879 --- /dev/null +++ b/mixer/v1/mixer.pb.go @@ -0,0 +1,3064 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: mixer/v1/mixer.proto + +package v1 + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import _ "github.com/gogo/protobuf/types" +import google_rpc "github.com/gogo/googleapis/google/rpc" + +import time "time" + +import strconv "strconv" + +import context "golang.org/x/net/context" +import grpc "google.golang.org/grpc" + +import types "github.com/gogo/protobuf/types" + +import strings "strings" +import reflect "reflect" +import sortkeys "github.com/gogo/protobuf/sortkeys" + +import io "io" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf +var _ = time.Kitchen + +// How an attribute's value was matched +type ReferencedAttributes_Condition int32 + +const ( + CONDITION_UNSPECIFIED ReferencedAttributes_Condition = 0 + ABSENCE ReferencedAttributes_Condition = 1 + EXACT ReferencedAttributes_Condition = 2 + REGEX ReferencedAttributes_Condition = 3 +) + +var ReferencedAttributes_Condition_name = map[int32]string{ + 0: "CONDITION_UNSPECIFIED", + 1: "ABSENCE", + 2: "EXACT", + 3: "REGEX", +} +var ReferencedAttributes_Condition_value = map[string]int32{ + "CONDITION_UNSPECIFIED": 0, + "ABSENCE": 1, + "EXACT": 2, + "REGEX": 3, +} + +func (ReferencedAttributes_Condition) EnumDescriptor() ([]byte, []int) { + return fileDescriptorMixer, []int{2, 0} +} + +// Operation type. +type HeaderOperation_Operation int32 + +const ( + REPLACE HeaderOperation_Operation = 0 + REMOVE HeaderOperation_Operation = 1 + APPEND HeaderOperation_Operation = 2 +) + +var HeaderOperation_Operation_name = map[int32]string{ + 0: "REPLACE", + 1: "REMOVE", + 2: "APPEND", +} +var HeaderOperation_Operation_value = map[string]int32{ + "REPLACE": 0, + "REMOVE": 1, + "APPEND": 2, +} + +func (HeaderOperation_Operation) EnumDescriptor() ([]byte, []int) { + return fileDescriptorMixer, []int{3, 0} +} + +// Used to get a thumbs-up/thumbs-down before performing an action. +type CheckRequest struct { + // The attributes to use for this request. + // + // Mixer's configuration determines how these attributes are used to + // establish the result returned in the response. + Attributes CompressedAttributes `protobuf:"bytes,1,opt,name=attributes" json:"attributes"` + // The number of words in the global dictionary, used with to populate the attributes. + // This value is used as a quick way to determine whether the client is using a dictionary that + // the server understands. + GlobalWordCount uint32 `protobuf:"varint,2,opt,name=global_word_count,json=globalWordCount,proto3" json:"global_word_count,omitempty"` + // Used for deduplicating `Check` calls in the case of failed RPCs and retries. This should be a UUID + // per call, where the same UUID is used for retries of the same call. + DeduplicationId string `protobuf:"bytes,3,opt,name=deduplication_id,json=deduplicationId,proto3" json:"deduplication_id,omitempty"` + // The individual quotas to allocate + Quotas map[string]CheckRequest_QuotaParams `protobuf:"bytes,4,rep,name=quotas" json:"quotas" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` +} + +func (m *CheckRequest) Reset() { *m = CheckRequest{} } +func (*CheckRequest) ProtoMessage() {} +func (*CheckRequest) Descriptor() ([]byte, []int) { return fileDescriptorMixer, []int{0} } + +// parameters for a quota allocation +type CheckRequest_QuotaParams struct { + // Amount of quota to allocate + Amount int64 `protobuf:"varint,1,opt,name=amount,proto3" json:"amount,omitempty"` + // When true, supports returning less quota than what was requested. + BestEffort bool `protobuf:"varint,2,opt,name=best_effort,json=bestEffort,proto3" json:"best_effort,omitempty"` +} + +func (m *CheckRequest_QuotaParams) Reset() { *m = CheckRequest_QuotaParams{} } +func (*CheckRequest_QuotaParams) ProtoMessage() {} +func (*CheckRequest_QuotaParams) Descriptor() ([]byte, []int) { return fileDescriptorMixer, []int{0, 0} } + +// The response generated by the Check method. +type CheckResponse struct { + // The precondition check results. + Precondition CheckResponse_PreconditionResult `protobuf:"bytes,2,opt,name=precondition" json:"precondition"` + // The resulting quota, one entry per requested quota. + Quotas map[string]CheckResponse_QuotaResult `protobuf:"bytes,3,rep,name=quotas" json:"quotas" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` +} + +func (m *CheckResponse) Reset() { *m = CheckResponse{} } +func (*CheckResponse) ProtoMessage() {} +func (*CheckResponse) Descriptor() ([]byte, []int) { return fileDescriptorMixer, []int{1} } + +// Expresses the result of a precondition check. +type CheckResponse_PreconditionResult struct { + // A status code of OK indicates all preconditions were satisfied. Any other code indicates not + // all preconditions were satisfied and details describe why. + Status google_rpc.Status `protobuf:"bytes,1,opt,name=status" json:"status"` + // The amount of time for which this result can be considered valid. + ValidDuration time.Duration `protobuf:"bytes,2,opt,name=valid_duration,json=validDuration,stdduration" json:"valid_duration"` + // The number of uses for which this result can be considered valid. + ValidUseCount int32 `protobuf:"varint,3,opt,name=valid_use_count,json=validUseCount,proto3" json:"valid_use_count,omitempty"` + // The total set of attributes that were used in producing the result + // along with matching conditions. + ReferencedAttributes *ReferencedAttributes `protobuf:"bytes,5,opt,name=referenced_attributes,json=referencedAttributes" json:"referenced_attributes,omitempty"` + // An optional routing directive, used to manipulate the traffic metadata + // whenever all preconditions are satisfied. + RouteDirective *RouteDirective `protobuf:"bytes,6,opt,name=route_directive,json=routeDirective" json:"route_directive,omitempty"` +} + +func (m *CheckResponse_PreconditionResult) Reset() { *m = CheckResponse_PreconditionResult{} } +func (*CheckResponse_PreconditionResult) ProtoMessage() {} +func (*CheckResponse_PreconditionResult) Descriptor() ([]byte, []int) { + return fileDescriptorMixer, []int{1, 0} +} + +// Expresses the result of a quota allocation. +type CheckResponse_QuotaResult struct { + // The amount of time for which this result can be considered valid. + ValidDuration time.Duration `protobuf:"bytes,1,opt,name=valid_duration,json=validDuration,stdduration" json:"valid_duration"` + // The amount of granted quota. When `QuotaParams.best_effort` is true, this will be >= 0. + // If `QuotaParams.best_effort` is false, this will be either 0 or >= `QuotaParams.amount`. + GrantedAmount int64 `protobuf:"varint,2,opt,name=granted_amount,json=grantedAmount,proto3" json:"granted_amount,omitempty"` + // The total set of attributes that were used in producing the result + // along with matching conditions. + ReferencedAttributes ReferencedAttributes `protobuf:"bytes,5,opt,name=referenced_attributes,json=referencedAttributes" json:"referenced_attributes"` +} + +func (m *CheckResponse_QuotaResult) Reset() { *m = CheckResponse_QuotaResult{} } +func (*CheckResponse_QuotaResult) ProtoMessage() {} +func (*CheckResponse_QuotaResult) Descriptor() ([]byte, []int) { + return fileDescriptorMixer, []int{1, 1} +} + +// Describes the attributes that were used to determine the response. +// This can be used to construct a response cache. +type ReferencedAttributes struct { + // The message-level dictionary. Refer to [CompressedAttributes][istio.mixer.v1.CompressedAttributes] for information + // on using dictionaries. + Words []string `protobuf:"bytes,1,rep,name=words" json:"words,omitempty"` + // Describes a set of attributes. + AttributeMatches []ReferencedAttributes_AttributeMatch `protobuf:"bytes,2,rep,name=attribute_matches,json=attributeMatches" json:"attribute_matches"` +} + +func (m *ReferencedAttributes) Reset() { *m = ReferencedAttributes{} } +func (*ReferencedAttributes) ProtoMessage() {} +func (*ReferencedAttributes) Descriptor() ([]byte, []int) { return fileDescriptorMixer, []int{2} } + +// Describes a single attribute match. +type ReferencedAttributes_AttributeMatch struct { + // The name of the attribute. This is a dictionary index encoded in a manner identical + // to all strings in the [CompressedAttributes][istio.mixer.v1.CompressedAttributes] message. + Name int32 `protobuf:"zigzag32,1,opt,name=name,proto3" json:"name,omitempty"` + // The kind of match against the attribute value. + Condition ReferencedAttributes_Condition `protobuf:"varint,2,opt,name=condition,proto3,enum=istio.mixer.v1.ReferencedAttributes_Condition" json:"condition,omitempty"` + // If a REGEX condition is provided for a STRING_MAP attribute, + // clients should use the regex value to match against map keys. + Regex string `protobuf:"bytes,3,opt,name=regex,proto3" json:"regex,omitempty"` + // A key in a STRING_MAP. When multiple keys from a STRING_MAP + // attribute were referenced, there will be multiple AttributeMatch + // messages with different map_key values. Values for map_key SHOULD + // be ignored for attributes that are not STRING_MAP. + // + // Indices for the keys are used (taken either from the + // message dictionary from the `words` field or the global dictionary). + // + // If no map_key value is provided for a STRING_MAP attribute, the + // entire STRING_MAP will be used. + MapKey int32 `protobuf:"zigzag32,4,opt,name=map_key,json=mapKey,proto3" json:"map_key,omitempty"` +} + +func (m *ReferencedAttributes_AttributeMatch) Reset() { *m = ReferencedAttributes_AttributeMatch{} } +func (*ReferencedAttributes_AttributeMatch) ProtoMessage() {} +func (*ReferencedAttributes_AttributeMatch) Descriptor() ([]byte, []int) { + return fileDescriptorMixer, []int{2, 0} +} + +// Operation on HTTP headers to replace, append, or remove a header. Header +// names are normalized to lower-case with dashes, e.g. "x-request-id". +// Pseudo-headers ":path", ":authority", and ":method" are supported to modify +// the request headers. +type HeaderOperation struct { + // Header name. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Header value. + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + // Header operation. + Operation HeaderOperation_Operation `protobuf:"varint,3,opt,name=operation,proto3,enum=istio.mixer.v1.HeaderOperation_Operation" json:"operation,omitempty"` +} + +func (m *HeaderOperation) Reset() { *m = HeaderOperation{} } +func (*HeaderOperation) ProtoMessage() {} +func (*HeaderOperation) Descriptor() ([]byte, []int) { return fileDescriptorMixer, []int{3} } + +// Expresses the routing manipulation actions to be performed on behalf of +// Mixer in response to a successful precondition check. +type RouteDirective struct { + // Operations on the request headers. + RequestHeaderOperations []HeaderOperation `protobuf:"bytes,1,rep,name=request_header_operations,json=requestHeaderOperations" json:"request_header_operations"` + // Operations on the response headers. + ResponseHeaderOperations []HeaderOperation `protobuf:"bytes,2,rep,name=response_header_operations,json=responseHeaderOperations" json:"response_header_operations"` + // If set, enables a direct response without proxying the request to the routing + // destination. Required to be a value in the 2xx or 3xx range. + DirectResponseCode uint32 `protobuf:"varint,3,opt,name=direct_response_code,json=directResponseCode,proto3" json:"direct_response_code,omitempty"` + // Supplies the response body for the direct response. + // If this setting is omitted, no body is included in the generated response. + DirectResponseBody string `protobuf:"bytes,4,opt,name=direct_response_body,json=directResponseBody,proto3" json:"direct_response_body,omitempty"` +} + +func (m *RouteDirective) Reset() { *m = RouteDirective{} } +func (*RouteDirective) ProtoMessage() {} +func (*RouteDirective) Descriptor() ([]byte, []int) { return fileDescriptorMixer, []int{4} } + +// Used to report telemetry after performing one or more actions. +type ReportRequest struct { + // The attributes to use for this request. + // + // Each `Attributes` element represents the state of a single action. Multiple actions + // can be provided in a single message in order to improve communication efficiency. The + // client can accumulate a set of actions and send them all in one single message. + // + // Although each `Attributes` message is semantically treated as an independent + // stand-alone entity unrelated to the other attributes within the message, this + // message format leverages delta-encoding between attribute messages in order to + // substantially reduce the request size and improve end-to-end efficiency. Each + // individual set of attributes is used to modify the previous set. This eliminates + // the need to redundantly send the same attributes multiple times over within + // a single request. + // + // If a client is not sophisticated and doesn't want to use delta-encoding, + // a degenerate case is to include all attributes in every individual message. + Attributes []CompressedAttributes `protobuf:"bytes,1,rep,name=attributes" json:"attributes"` + // The default message-level dictionary for all the attributes. + // Individual attribute messages can have their own dictionaries, but if they don't + // then this set of words, if it is provided, is used instead. + // + // This makes it possible to share the same dictionary for all attributes in this + // request, which can substantially reduce the overall request size. + DefaultWords []string `protobuf:"bytes,2,rep,name=default_words,json=defaultWords" json:"default_words,omitempty"` + // The number of words in the global dictionary. + // To detect global dictionary out of sync between client and server. + GlobalWordCount uint32 `protobuf:"varint,3,opt,name=global_word_count,json=globalWordCount,proto3" json:"global_word_count,omitempty"` +} + +func (m *ReportRequest) Reset() { *m = ReportRequest{} } +func (*ReportRequest) ProtoMessage() {} +func (*ReportRequest) Descriptor() ([]byte, []int) { return fileDescriptorMixer, []int{5} } + +// Used to carry responses to telemetry reports +type ReportResponse struct { +} + +func (m *ReportResponse) Reset() { *m = ReportResponse{} } +func (*ReportResponse) ProtoMessage() {} +func (*ReportResponse) Descriptor() ([]byte, []int) { return fileDescriptorMixer, []int{6} } + +func init() { + proto.RegisterType((*CheckRequest)(nil), "istio.mixer.v1.CheckRequest") + proto.RegisterType((*CheckRequest_QuotaParams)(nil), "istio.mixer.v1.CheckRequest.QuotaParams") + proto.RegisterType((*CheckResponse)(nil), "istio.mixer.v1.CheckResponse") + proto.RegisterType((*CheckResponse_PreconditionResult)(nil), "istio.mixer.v1.CheckResponse.PreconditionResult") + proto.RegisterType((*CheckResponse_QuotaResult)(nil), "istio.mixer.v1.CheckResponse.QuotaResult") + proto.RegisterType((*ReferencedAttributes)(nil), "istio.mixer.v1.ReferencedAttributes") + proto.RegisterType((*ReferencedAttributes_AttributeMatch)(nil), "istio.mixer.v1.ReferencedAttributes.AttributeMatch") + proto.RegisterType((*HeaderOperation)(nil), "istio.mixer.v1.HeaderOperation") + proto.RegisterType((*RouteDirective)(nil), "istio.mixer.v1.RouteDirective") + proto.RegisterType((*ReportRequest)(nil), "istio.mixer.v1.ReportRequest") + proto.RegisterType((*ReportResponse)(nil), "istio.mixer.v1.ReportResponse") + proto.RegisterEnum("istio.mixer.v1.ReferencedAttributes_Condition", ReferencedAttributes_Condition_name, ReferencedAttributes_Condition_value) + proto.RegisterEnum("istio.mixer.v1.HeaderOperation_Operation", HeaderOperation_Operation_name, HeaderOperation_Operation_value) +} +func (x ReferencedAttributes_Condition) String() string { + s, ok := ReferencedAttributes_Condition_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x HeaderOperation_Operation) String() string { + s, ok := HeaderOperation_Operation_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// Client API for Mixer service + +type MixerClient interface { + // Checks preconditions and allocate quota before performing an operation. + // The preconditions enforced depend on the set of supplied attributes and + // the active configuration. + Check(ctx context.Context, in *CheckRequest, opts ...grpc.CallOption) (*CheckResponse, error) + // Reports telemetry, such as logs and metrics. + // The reported information depends on the set of supplied attributes and the + // active configuration. + Report(ctx context.Context, in *ReportRequest, opts ...grpc.CallOption) (*ReportResponse, error) +} + +type mixerClient struct { + cc *grpc.ClientConn +} + +func NewMixerClient(cc *grpc.ClientConn) MixerClient { + return &mixerClient{cc} +} + +func (c *mixerClient) Check(ctx context.Context, in *CheckRequest, opts ...grpc.CallOption) (*CheckResponse, error) { + out := new(CheckResponse) + err := grpc.Invoke(ctx, "/istio.mixer.v1.Mixer/Check", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *mixerClient) Report(ctx context.Context, in *ReportRequest, opts ...grpc.CallOption) (*ReportResponse, error) { + out := new(ReportResponse) + err := grpc.Invoke(ctx, "/istio.mixer.v1.Mixer/Report", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Server API for Mixer service + +type MixerServer interface { + // Checks preconditions and allocate quota before performing an operation. + // The preconditions enforced depend on the set of supplied attributes and + // the active configuration. + Check(context.Context, *CheckRequest) (*CheckResponse, error) + // Reports telemetry, such as logs and metrics. + // The reported information depends on the set of supplied attributes and the + // active configuration. + Report(context.Context, *ReportRequest) (*ReportResponse, error) +} + +func RegisterMixerServer(s *grpc.Server, srv MixerServer) { + s.RegisterService(&_Mixer_serviceDesc, srv) +} + +func _Mixer_Check_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CheckRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MixerServer).Check(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/istio.mixer.v1.Mixer/Check", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MixerServer).Check(ctx, req.(*CheckRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Mixer_Report_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ReportRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MixerServer).Report(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/istio.mixer.v1.Mixer/Report", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MixerServer).Report(ctx, req.(*ReportRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Mixer_serviceDesc = grpc.ServiceDesc{ + ServiceName: "istio.mixer.v1.Mixer", + HandlerType: (*MixerServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Check", + Handler: _Mixer_Check_Handler, + }, + { + MethodName: "Report", + Handler: _Mixer_Report_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "mixer/v1/mixer.proto", +} + +func (m *CheckRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CheckRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintMixer(dAtA, i, uint64(m.Attributes.Size())) + n1, err := m.Attributes.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + if m.GlobalWordCount != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintMixer(dAtA, i, uint64(m.GlobalWordCount)) + } + if len(m.DeduplicationId) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintMixer(dAtA, i, uint64(len(m.DeduplicationId))) + i += copy(dAtA[i:], m.DeduplicationId) + } + if len(m.Quotas) > 0 { + for k, _ := range m.Quotas { + dAtA[i] = 0x22 + i++ + v := m.Quotas[k] + msgSize := 0 + if (&v) != nil { + msgSize = (&v).Size() + msgSize += 1 + sovMixer(uint64(msgSize)) + } + mapSize := 1 + len(k) + sovMixer(uint64(len(k))) + msgSize + i = encodeVarintMixer(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMixer(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintMixer(dAtA, i, uint64((&v).Size())) + n2, err := (&v).MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + } + } + return i, nil +} + +func (m *CheckRequest_QuotaParams) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CheckRequest_QuotaParams) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Amount != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintMixer(dAtA, i, uint64(m.Amount)) + } + if m.BestEffort { + dAtA[i] = 0x10 + i++ + if m.BestEffort { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + return i, nil +} + +func (m *CheckResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CheckResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x12 + i++ + i = encodeVarintMixer(dAtA, i, uint64(m.Precondition.Size())) + n3, err := m.Precondition.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n3 + if len(m.Quotas) > 0 { + for k, _ := range m.Quotas { + dAtA[i] = 0x1a + i++ + v := m.Quotas[k] + msgSize := 0 + if (&v) != nil { + msgSize = (&v).Size() + msgSize += 1 + sovMixer(uint64(msgSize)) + } + mapSize := 1 + len(k) + sovMixer(uint64(len(k))) + msgSize + i = encodeVarintMixer(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMixer(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintMixer(dAtA, i, uint64((&v).Size())) + n4, err := (&v).MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n4 + } + } + return i, nil +} + +func (m *CheckResponse_PreconditionResult) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CheckResponse_PreconditionResult) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintMixer(dAtA, i, uint64(m.Status.Size())) + n5, err := m.Status.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n5 + dAtA[i] = 0x12 + i++ + i = encodeVarintMixer(dAtA, i, uint64(types.SizeOfStdDuration(m.ValidDuration))) + n6, err := types.StdDurationMarshalTo(m.ValidDuration, dAtA[i:]) + if err != nil { + return 0, err + } + i += n6 + if m.ValidUseCount != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintMixer(dAtA, i, uint64(m.ValidUseCount)) + } + if m.ReferencedAttributes != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintMixer(dAtA, i, uint64(m.ReferencedAttributes.Size())) + n7, err := m.ReferencedAttributes.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n7 + } + if m.RouteDirective != nil { + dAtA[i] = 0x32 + i++ + i = encodeVarintMixer(dAtA, i, uint64(m.RouteDirective.Size())) + n8, err := m.RouteDirective.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n8 + } + return i, nil +} + +func (m *CheckResponse_QuotaResult) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CheckResponse_QuotaResult) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintMixer(dAtA, i, uint64(types.SizeOfStdDuration(m.ValidDuration))) + n9, err := types.StdDurationMarshalTo(m.ValidDuration, dAtA[i:]) + if err != nil { + return 0, err + } + i += n9 + if m.GrantedAmount != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintMixer(dAtA, i, uint64(m.GrantedAmount)) + } + dAtA[i] = 0x2a + i++ + i = encodeVarintMixer(dAtA, i, uint64(m.ReferencedAttributes.Size())) + n10, err := m.ReferencedAttributes.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n10 + return i, nil +} + +func (m *ReferencedAttributes) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ReferencedAttributes) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Words) > 0 { + for _, s := range m.Words { + dAtA[i] = 0xa + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + if len(m.AttributeMatches) > 0 { + for _, msg := range m.AttributeMatches { + dAtA[i] = 0x12 + i++ + i = encodeVarintMixer(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *ReferencedAttributes_AttributeMatch) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ReferencedAttributes_AttributeMatch) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Name != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintMixer(dAtA, i, uint64((uint32(m.Name)<<1)^uint32((m.Name>>31)))) + } + if m.Condition != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintMixer(dAtA, i, uint64(m.Condition)) + } + if len(m.Regex) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintMixer(dAtA, i, uint64(len(m.Regex))) + i += copy(dAtA[i:], m.Regex) + } + if m.MapKey != 0 { + dAtA[i] = 0x20 + i++ + i = encodeVarintMixer(dAtA, i, uint64((uint32(m.MapKey)<<1)^uint32((m.MapKey>>31)))) + } + return i, nil +} + +func (m *HeaderOperation) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *HeaderOperation) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Name) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintMixer(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + } + if len(m.Value) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintMixer(dAtA, i, uint64(len(m.Value))) + i += copy(dAtA[i:], m.Value) + } + if m.Operation != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintMixer(dAtA, i, uint64(m.Operation)) + } + return i, nil +} + +func (m *RouteDirective) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RouteDirective) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.RequestHeaderOperations) > 0 { + for _, msg := range m.RequestHeaderOperations { + dAtA[i] = 0xa + i++ + i = encodeVarintMixer(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.ResponseHeaderOperations) > 0 { + for _, msg := range m.ResponseHeaderOperations { + dAtA[i] = 0x12 + i++ + i = encodeVarintMixer(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.DirectResponseCode != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintMixer(dAtA, i, uint64(m.DirectResponseCode)) + } + if len(m.DirectResponseBody) > 0 { + dAtA[i] = 0x22 + i++ + i = encodeVarintMixer(dAtA, i, uint64(len(m.DirectResponseBody))) + i += copy(dAtA[i:], m.DirectResponseBody) + } + return i, nil +} + +func (m *ReportRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ReportRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Attributes) > 0 { + for _, msg := range m.Attributes { + dAtA[i] = 0xa + i++ + i = encodeVarintMixer(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.DefaultWords) > 0 { + for _, s := range m.DefaultWords { + dAtA[i] = 0x12 + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + if m.GlobalWordCount != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintMixer(dAtA, i, uint64(m.GlobalWordCount)) + } + return i, nil +} + +func (m *ReportResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ReportResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + return i, nil +} + +func encodeVarintMixer(dAtA []byte, offset int, v uint64) int { + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return offset + 1 +} +func (m *CheckRequest) Size() (n int) { + var l int + _ = l + l = m.Attributes.Size() + n += 1 + l + sovMixer(uint64(l)) + if m.GlobalWordCount != 0 { + n += 1 + sovMixer(uint64(m.GlobalWordCount)) + } + l = len(m.DeduplicationId) + if l > 0 { + n += 1 + l + sovMixer(uint64(l)) + } + if len(m.Quotas) > 0 { + for k, v := range m.Quotas { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + len(k) + sovMixer(uint64(len(k))) + 1 + l + sovMixer(uint64(l)) + n += mapEntrySize + 1 + sovMixer(uint64(mapEntrySize)) + } + } + return n +} + +func (m *CheckRequest_QuotaParams) Size() (n int) { + var l int + _ = l + if m.Amount != 0 { + n += 1 + sovMixer(uint64(m.Amount)) + } + if m.BestEffort { + n += 2 + } + return n +} + +func (m *CheckResponse) Size() (n int) { + var l int + _ = l + l = m.Precondition.Size() + n += 1 + l + sovMixer(uint64(l)) + if len(m.Quotas) > 0 { + for k, v := range m.Quotas { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + len(k) + sovMixer(uint64(len(k))) + 1 + l + sovMixer(uint64(l)) + n += mapEntrySize + 1 + sovMixer(uint64(mapEntrySize)) + } + } + return n +} + +func (m *CheckResponse_PreconditionResult) Size() (n int) { + var l int + _ = l + l = m.Status.Size() + n += 1 + l + sovMixer(uint64(l)) + l = types.SizeOfStdDuration(m.ValidDuration) + n += 1 + l + sovMixer(uint64(l)) + if m.ValidUseCount != 0 { + n += 1 + sovMixer(uint64(m.ValidUseCount)) + } + if m.ReferencedAttributes != nil { + l = m.ReferencedAttributes.Size() + n += 1 + l + sovMixer(uint64(l)) + } + if m.RouteDirective != nil { + l = m.RouteDirective.Size() + n += 1 + l + sovMixer(uint64(l)) + } + return n +} + +func (m *CheckResponse_QuotaResult) Size() (n int) { + var l int + _ = l + l = types.SizeOfStdDuration(m.ValidDuration) + n += 1 + l + sovMixer(uint64(l)) + if m.GrantedAmount != 0 { + n += 1 + sovMixer(uint64(m.GrantedAmount)) + } + l = m.ReferencedAttributes.Size() + n += 1 + l + sovMixer(uint64(l)) + return n +} + +func (m *ReferencedAttributes) Size() (n int) { + var l int + _ = l + if len(m.Words) > 0 { + for _, s := range m.Words { + l = len(s) + n += 1 + l + sovMixer(uint64(l)) + } + } + if len(m.AttributeMatches) > 0 { + for _, e := range m.AttributeMatches { + l = e.Size() + n += 1 + l + sovMixer(uint64(l)) + } + } + return n +} + +func (m *ReferencedAttributes_AttributeMatch) Size() (n int) { + var l int + _ = l + if m.Name != 0 { + n += 1 + sozMixer(uint64(m.Name)) + } + if m.Condition != 0 { + n += 1 + sovMixer(uint64(m.Condition)) + } + l = len(m.Regex) + if l > 0 { + n += 1 + l + sovMixer(uint64(l)) + } + if m.MapKey != 0 { + n += 1 + sozMixer(uint64(m.MapKey)) + } + return n +} + +func (m *HeaderOperation) Size() (n int) { + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovMixer(uint64(l)) + } + l = len(m.Value) + if l > 0 { + n += 1 + l + sovMixer(uint64(l)) + } + if m.Operation != 0 { + n += 1 + sovMixer(uint64(m.Operation)) + } + return n +} + +func (m *RouteDirective) Size() (n int) { + var l int + _ = l + if len(m.RequestHeaderOperations) > 0 { + for _, e := range m.RequestHeaderOperations { + l = e.Size() + n += 1 + l + sovMixer(uint64(l)) + } + } + if len(m.ResponseHeaderOperations) > 0 { + for _, e := range m.ResponseHeaderOperations { + l = e.Size() + n += 1 + l + sovMixer(uint64(l)) + } + } + if m.DirectResponseCode != 0 { + n += 1 + sovMixer(uint64(m.DirectResponseCode)) + } + l = len(m.DirectResponseBody) + if l > 0 { + n += 1 + l + sovMixer(uint64(l)) + } + return n +} + +func (m *ReportRequest) Size() (n int) { + var l int + _ = l + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.Size() + n += 1 + l + sovMixer(uint64(l)) + } + } + if len(m.DefaultWords) > 0 { + for _, s := range m.DefaultWords { + l = len(s) + n += 1 + l + sovMixer(uint64(l)) + } + } + if m.GlobalWordCount != 0 { + n += 1 + sovMixer(uint64(m.GlobalWordCount)) + } + return n +} + +func (m *ReportResponse) Size() (n int) { + var l int + _ = l + return n +} + +func sovMixer(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozMixer(x uint64) (n int) { + return sovMixer(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *CheckRequest) String() string { + if this == nil { + return "nil" + } + keysForQuotas := make([]string, 0, len(this.Quotas)) + for k, _ := range this.Quotas { + keysForQuotas = append(keysForQuotas, k) + } + sortkeys.Strings(keysForQuotas) + mapStringForQuotas := "map[string]CheckRequest_QuotaParams{" + for _, k := range keysForQuotas { + mapStringForQuotas += fmt.Sprintf("%v: %v,", k, this.Quotas[k]) + } + mapStringForQuotas += "}" + s := strings.Join([]string{`&CheckRequest{`, + `Attributes:` + strings.Replace(strings.Replace(this.Attributes.String(), "CompressedAttributes", "CompressedAttributes", 1), `&`, ``, 1) + `,`, + `GlobalWordCount:` + fmt.Sprintf("%v", this.GlobalWordCount) + `,`, + `DeduplicationId:` + fmt.Sprintf("%v", this.DeduplicationId) + `,`, + `Quotas:` + mapStringForQuotas + `,`, + `}`, + }, "") + return s +} +func (this *CheckRequest_QuotaParams) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CheckRequest_QuotaParams{`, + `Amount:` + fmt.Sprintf("%v", this.Amount) + `,`, + `BestEffort:` + fmt.Sprintf("%v", this.BestEffort) + `,`, + `}`, + }, "") + return s +} +func (this *CheckResponse) String() string { + if this == nil { + return "nil" + } + keysForQuotas := make([]string, 0, len(this.Quotas)) + for k, _ := range this.Quotas { + keysForQuotas = append(keysForQuotas, k) + } + sortkeys.Strings(keysForQuotas) + mapStringForQuotas := "map[string]CheckResponse_QuotaResult{" + for _, k := range keysForQuotas { + mapStringForQuotas += fmt.Sprintf("%v: %v,", k, this.Quotas[k]) + } + mapStringForQuotas += "}" + s := strings.Join([]string{`&CheckResponse{`, + `Precondition:` + strings.Replace(strings.Replace(this.Precondition.String(), "CheckResponse_PreconditionResult", "CheckResponse_PreconditionResult", 1), `&`, ``, 1) + `,`, + `Quotas:` + mapStringForQuotas + `,`, + `}`, + }, "") + return s +} +func (this *CheckResponse_PreconditionResult) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CheckResponse_PreconditionResult{`, + `Status:` + strings.Replace(strings.Replace(this.Status.String(), "Status", "google_rpc.Status", 1), `&`, ``, 1) + `,`, + `ValidDuration:` + strings.Replace(strings.Replace(this.ValidDuration.String(), "Duration", "google_protobuf1.Duration", 1), `&`, ``, 1) + `,`, + `ValidUseCount:` + fmt.Sprintf("%v", this.ValidUseCount) + `,`, + `ReferencedAttributes:` + strings.Replace(fmt.Sprintf("%v", this.ReferencedAttributes), "ReferencedAttributes", "ReferencedAttributes", 1) + `,`, + `RouteDirective:` + strings.Replace(fmt.Sprintf("%v", this.RouteDirective), "RouteDirective", "RouteDirective", 1) + `,`, + `}`, + }, "") + return s +} +func (this *CheckResponse_QuotaResult) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CheckResponse_QuotaResult{`, + `ValidDuration:` + strings.Replace(strings.Replace(this.ValidDuration.String(), "Duration", "google_protobuf1.Duration", 1), `&`, ``, 1) + `,`, + `GrantedAmount:` + fmt.Sprintf("%v", this.GrantedAmount) + `,`, + `ReferencedAttributes:` + strings.Replace(strings.Replace(this.ReferencedAttributes.String(), "ReferencedAttributes", "ReferencedAttributes", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ReferencedAttributes) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ReferencedAttributes{`, + `Words:` + fmt.Sprintf("%v", this.Words) + `,`, + `AttributeMatches:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.AttributeMatches), "ReferencedAttributes_AttributeMatch", "ReferencedAttributes_AttributeMatch", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ReferencedAttributes_AttributeMatch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ReferencedAttributes_AttributeMatch{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Condition:` + fmt.Sprintf("%v", this.Condition) + `,`, + `Regex:` + fmt.Sprintf("%v", this.Regex) + `,`, + `MapKey:` + fmt.Sprintf("%v", this.MapKey) + `,`, + `}`, + }, "") + return s +} +func (this *HeaderOperation) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&HeaderOperation{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `Operation:` + fmt.Sprintf("%v", this.Operation) + `,`, + `}`, + }, "") + return s +} +func (this *RouteDirective) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RouteDirective{`, + `RequestHeaderOperations:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.RequestHeaderOperations), "HeaderOperation", "HeaderOperation", 1), `&`, ``, 1) + `,`, + `ResponseHeaderOperations:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ResponseHeaderOperations), "HeaderOperation", "HeaderOperation", 1), `&`, ``, 1) + `,`, + `DirectResponseCode:` + fmt.Sprintf("%v", this.DirectResponseCode) + `,`, + `DirectResponseBody:` + fmt.Sprintf("%v", this.DirectResponseBody) + `,`, + `}`, + }, "") + return s +} +func (this *ReportRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ReportRequest{`, + `Attributes:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Attributes), "CompressedAttributes", "CompressedAttributes", 1), `&`, ``, 1) + `,`, + `DefaultWords:` + fmt.Sprintf("%v", this.DefaultWords) + `,`, + `GlobalWordCount:` + fmt.Sprintf("%v", this.GlobalWordCount) + `,`, + `}`, + }, "") + return s +} +func (this *ReportResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ReportResponse{`, + `}`, + }, "") + return s +} +func valueToStringMixer(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *CheckRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMixer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CheckRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CheckRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMixer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMixer + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Attributes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GlobalWordCount", wireType) + } + m.GlobalWordCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMixer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GlobalWordCount |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeduplicationId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMixer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMixer + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DeduplicationId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Quotas", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMixer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMixer + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Quotas == nil { + m.Quotas = make(map[string]CheckRequest_QuotaParams) + } + var mapkey string + mapvalue := &CheckRequest_QuotaParams{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMixer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMixer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMixer + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMixer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthMixer + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthMixer + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &CheckRequest_QuotaParams{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipMixer(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMixer + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Quotas[mapkey] = *mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMixer(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMixer + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CheckRequest_QuotaParams) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMixer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QuotaParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuotaParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + m.Amount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMixer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Amount |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BestEffort", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMixer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.BestEffort = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipMixer(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMixer + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CheckResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMixer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CheckResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CheckResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Precondition", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMixer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMixer + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Precondition.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Quotas", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMixer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMixer + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Quotas == nil { + m.Quotas = make(map[string]CheckResponse_QuotaResult) + } + var mapkey string + mapvalue := &CheckResponse_QuotaResult{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMixer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMixer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMixer + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMixer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthMixer + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthMixer + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &CheckResponse_QuotaResult{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipMixer(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMixer + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Quotas[mapkey] = *mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMixer(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMixer + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CheckResponse_PreconditionResult) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMixer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PreconditionResult: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PreconditionResult: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMixer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMixer + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidDuration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMixer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMixer + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := types.StdDurationUnmarshal(&m.ValidDuration, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidUseCount", wireType) + } + m.ValidUseCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMixer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ValidUseCount |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ReferencedAttributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMixer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMixer + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ReferencedAttributes == nil { + m.ReferencedAttributes = &ReferencedAttributes{} + } + if err := m.ReferencedAttributes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RouteDirective", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMixer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMixer + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.RouteDirective == nil { + m.RouteDirective = &RouteDirective{} + } + if err := m.RouteDirective.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMixer(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMixer + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CheckResponse_QuotaResult) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMixer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QuotaResult: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuotaResult: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidDuration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMixer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMixer + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := types.StdDurationUnmarshal(&m.ValidDuration, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GrantedAmount", wireType) + } + m.GrantedAmount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMixer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GrantedAmount |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ReferencedAttributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMixer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMixer + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ReferencedAttributes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMixer(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMixer + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ReferencedAttributes) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMixer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ReferencedAttributes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ReferencedAttributes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Words", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMixer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMixer + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Words = append(m.Words, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AttributeMatches", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMixer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMixer + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AttributeMatches = append(m.AttributeMatches, ReferencedAttributes_AttributeMatch{}) + if err := m.AttributeMatches[len(m.AttributeMatches)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMixer(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMixer + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ReferencedAttributes_AttributeMatch) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMixer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AttributeMatch: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AttributeMatch: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMixer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Name = v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Condition", wireType) + } + m.Condition = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMixer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Condition |= (ReferencedAttributes_Condition(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Regex", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMixer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMixer + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Regex = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MapKey", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMixer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.MapKey = v + default: + iNdEx = preIndex + skippy, err := skipMixer(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMixer + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HeaderOperation) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMixer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: HeaderOperation: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HeaderOperation: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMixer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMixer + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMixer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMixer + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Operation", wireType) + } + m.Operation = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMixer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Operation |= (HeaderOperation_Operation(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipMixer(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMixer + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RouteDirective) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMixer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RouteDirective: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RouteDirective: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestHeaderOperations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMixer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMixer + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RequestHeaderOperations = append(m.RequestHeaderOperations, HeaderOperation{}) + if err := m.RequestHeaderOperations[len(m.RequestHeaderOperations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResponseHeaderOperations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMixer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMixer + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ResponseHeaderOperations = append(m.ResponseHeaderOperations, HeaderOperation{}) + if err := m.ResponseHeaderOperations[len(m.ResponseHeaderOperations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DirectResponseCode", wireType) + } + m.DirectResponseCode = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMixer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DirectResponseCode |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DirectResponseBody", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMixer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMixer + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DirectResponseBody = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMixer(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMixer + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ReportRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMixer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ReportRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ReportRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMixer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMixer + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, CompressedAttributes{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DefaultWords", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMixer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMixer + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DefaultWords = append(m.DefaultWords, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GlobalWordCount", wireType) + } + m.GlobalWordCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMixer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GlobalWordCount |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipMixer(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMixer + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ReportResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMixer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ReportResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ReportResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipMixer(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMixer + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipMixer(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMixer + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMixer + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + return iNdEx, nil + case 1: + iNdEx += 8 + return iNdEx, nil + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMixer + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + iNdEx += length + if length < 0 { + return 0, ErrInvalidLengthMixer + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMixer + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipMixer(dAtA[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + } + return iNdEx, nil + case 4: + return iNdEx, nil + case 5: + iNdEx += 4 + return iNdEx, nil + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + } + panic("unreachable") +} + +var ( + ErrInvalidLengthMixer = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowMixer = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("mixer/v1/mixer.proto", fileDescriptorMixer) } + +var fileDescriptorMixer = []byte{ + // 1133 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xbf, 0x73, 0xe3, 0x44, + 0x14, 0xb6, 0x2c, 0xdb, 0x89, 0x9f, 0x63, 0xc7, 0xd9, 0x71, 0x88, 0xe3, 0xe1, 0x94, 0x8c, 0xf9, + 0x31, 0x3e, 0x0a, 0x39, 0x97, 0x6b, 0x18, 0x0a, 0x18, 0xc7, 0x51, 0x82, 0xc3, 0x25, 0x31, 0xca, + 0x1d, 0x77, 0x5c, 0xa3, 0x91, 0xa5, 0xb5, 0xa3, 0x39, 0xdb, 0xab, 0x5b, 0x49, 0xe1, 0xd2, 0xdd, + 0x0c, 0xff, 0x00, 0x25, 0x43, 0x47, 0xc3, 0x50, 0x50, 0x53, 0xf1, 0x07, 0xa4, 0xbc, 0x92, 0x0a, + 0x88, 0x81, 0x19, 0xca, 0x2b, 0x29, 0x19, 0xed, 0xae, 0x14, 0x3b, 0x76, 0x72, 0x01, 0xae, 0xdb, + 0xdd, 0xf7, 0xde, 0xf7, 0xde, 0xfb, 0xf4, 0xbe, 0xd5, 0x42, 0x69, 0xe0, 0x3c, 0xc3, 0xb4, 0x7e, + 0x72, 0xa7, 0xce, 0x16, 0xaa, 0x4b, 0x89, 0x4f, 0x50, 0xc1, 0xf1, 0x7c, 0x87, 0xa8, 0xfc, 0xe8, + 0xe4, 0x4e, 0xa5, 0xd4, 0x23, 0x3d, 0xc2, 0x4c, 0xf5, 0x70, 0xc5, 0xbd, 0x2a, 0x4a, 0x8f, 0x90, + 0x5e, 0x1f, 0xd7, 0xd9, 0xae, 0x13, 0x74, 0xeb, 0x76, 0x40, 0x4d, 0xdf, 0x21, 0x43, 0x61, 0x5f, + 0x11, 0x76, 0xea, 0x5a, 0x75, 0xcf, 0x37, 0xfd, 0xc0, 0x13, 0x86, 0xd5, 0x38, 0xa9, 0xe9, 0xfb, + 0xd4, 0xe9, 0x04, 0x3e, 0x16, 0xa6, 0xea, 0x77, 0x32, 0x2c, 0x34, 0x8f, 0xb1, 0xf5, 0x44, 0xc7, + 0x4f, 0x03, 0xec, 0xf9, 0x68, 0x0f, 0xe0, 0xc2, 0xa9, 0x2c, 0xad, 0x4b, 0xb5, 0xdc, 0xe6, 0xdb, + 0xea, 0x64, 0x7d, 0x6a, 0x93, 0x0c, 0x5c, 0x8a, 0x3d, 0x0f, 0xdb, 0x8d, 0xd8, 0x77, 0x2b, 0x75, + 0xf6, 0xcb, 0x5a, 0x42, 0x1f, 0x8b, 0x46, 0xef, 0xc1, 0x52, 0xaf, 0x4f, 0x3a, 0x66, 0xdf, 0xf8, + 0x82, 0x50, 0xdb, 0xb0, 0x48, 0x30, 0xf4, 0xcb, 0xc9, 0x75, 0xa9, 0x96, 0xd7, 0x17, 0xb9, 0xe1, + 0x21, 0xa1, 0x76, 0x33, 0x3c, 0x46, 0xb7, 0xa1, 0x68, 0x63, 0x3b, 0x70, 0xfb, 0x8e, 0xc5, 0x7a, + 0x32, 0x1c, 0xbb, 0x2c, 0xaf, 0x4b, 0xb5, 0xac, 0xbe, 0x38, 0x71, 0xde, 0xb2, 0xd1, 0x0e, 0x64, + 0x9e, 0x06, 0xc4, 0x37, 0xbd, 0x72, 0x6a, 0x5d, 0xae, 0xe5, 0x36, 0x6b, 0x53, 0xe5, 0x8d, 0x35, + 0xa4, 0x7e, 0xca, 0x5c, 0xb5, 0xa1, 0x4f, 0x4f, 0x45, 0x89, 0x22, 0xba, 0xb2, 0x03, 0x39, 0x66, + 0x6c, 0x9b, 0xd4, 0x1c, 0x78, 0xe8, 0x0d, 0xc8, 0x98, 0x03, 0x56, 0x62, 0xd8, 0xb5, 0xac, 0x8b, + 0x1d, 0x5a, 0x83, 0x5c, 0x07, 0x7b, 0xbe, 0x81, 0xbb, 0x5d, 0x42, 0x79, 0xfd, 0xf3, 0x3a, 0x84, + 0x47, 0x1a, 0x3b, 0xa9, 0x58, 0x02, 0x87, 0x27, 0x41, 0x45, 0x90, 0x9f, 0xe0, 0x53, 0x06, 0x92, + 0xd5, 0xc3, 0x25, 0xfa, 0x10, 0xd2, 0x27, 0x66, 0x3f, 0xc0, 0x2c, 0xf6, 0x46, 0xf5, 0xf2, 0x92, + 0x74, 0x1e, 0xf6, 0x41, 0xf2, 0x7d, 0xa9, 0xfa, 0x67, 0x06, 0xf2, 0xc2, 0xcf, 0x73, 0xc9, 0xd0, + 0xc3, 0xe8, 0x31, 0x2c, 0xb8, 0x14, 0x5b, 0x64, 0x68, 0x3b, 0x21, 0x31, 0x02, 0x7c, 0xe3, 0x0a, + 0x70, 0x1e, 0xa4, 0xb6, 0xc7, 0x22, 0x74, 0xec, 0x05, 0x7d, 0x5f, 0x90, 0x32, 0x81, 0x85, 0x76, + 0x63, 0x8a, 0x65, 0x46, 0xf1, 0xed, 0xeb, 0x51, 0xaf, 0xe6, 0xf8, 0x8f, 0x24, 0xa0, 0xe9, 0x9c, + 0x68, 0x03, 0x32, 0x7c, 0x42, 0xc5, 0x84, 0x21, 0x95, 0xcf, 0xae, 0x4a, 0x5d, 0x4b, 0x3d, 0x62, + 0x96, 0x08, 0x88, 0xfb, 0xa1, 0x3d, 0x28, 0x9c, 0x98, 0x7d, 0xc7, 0x36, 0xa2, 0xa1, 0x17, 0xfd, + 0xae, 0x46, 0x91, 0x91, 0x2a, 0xd4, 0x6d, 0xe1, 0xb0, 0x35, 0x1f, 0x02, 0x7c, 0xfd, 0xeb, 0x9a, + 0xa4, 0xe7, 0x59, 0x68, 0x64, 0x40, 0xef, 0xc2, 0x22, 0xc7, 0x0a, 0x3c, 0x2c, 0xa6, 0x32, 0x1c, + 0xb5, 0xb4, 0xf0, 0x7b, 0xe0, 0x61, 0x3e, 0x93, 0x9f, 0xc3, 0x32, 0xc5, 0x5d, 0x4c, 0xf1, 0xd0, + 0xc2, 0xb6, 0x31, 0x26, 0x8b, 0xf4, 0x6c, 0x59, 0xe8, 0xb1, 0xf3, 0x85, 0x2c, 0xf4, 0x12, 0x9d, + 0x71, 0x8a, 0x76, 0x61, 0x91, 0x92, 0xc0, 0xc7, 0x86, 0xed, 0x50, 0x6c, 0xf9, 0xce, 0x09, 0x2e, + 0x67, 0x18, 0xa8, 0x32, 0x05, 0x1a, 0xba, 0x6d, 0x47, 0x5e, 0x7a, 0x81, 0x4e, 0xec, 0xf7, 0x52, + 0xf3, 0xa9, 0x62, 0xba, 0x72, 0x2e, 0x89, 0x19, 0x14, 0xfc, 0x4e, 0xb3, 0x25, 0xfd, 0x67, 0xb6, + 0xde, 0x81, 0x42, 0x8f, 0x9a, 0x43, 0x3f, 0xa4, 0x60, 0x10, 0x4b, 0x58, 0xd6, 0xf3, 0xe2, 0xb4, + 0xc1, 0x65, 0x62, 0xbc, 0x06, 0xb2, 0xc4, 0x37, 0x9f, 0x49, 0x59, 0xc5, 0x7e, 0x95, 0xcc, 0x3e, + 0x9a, 0x94, 0xd9, 0x4d, 0x66, 0x96, 0xd3, 0x35, 0xae, 0xb3, 0x2f, 0x65, 0x28, 0xcd, 0x2a, 0x0d, + 0x95, 0x20, 0x1d, 0xde, 0x62, 0xe1, 0xc4, 0xca, 0xb5, 0xac, 0xce, 0x37, 0xa8, 0x0b, 0x4b, 0x71, + 0xab, 0xc6, 0xc0, 0xf4, 0xad, 0x63, 0xec, 0x95, 0x93, 0x4c, 0x33, 0x77, 0x6f, 0xd2, 0xb1, 0x1a, + 0x2f, 0xf7, 0xc3, 0x60, 0x41, 0x40, 0xd1, 0x9c, 0x38, 0xc5, 0x5e, 0xe5, 0x5b, 0x09, 0x0a, 0x93, + 0xae, 0x08, 0x41, 0x6a, 0x68, 0x0e, 0x30, 0x63, 0x60, 0x49, 0x67, 0x6b, 0x74, 0x0f, 0xb2, 0x93, + 0x17, 0x42, 0x61, 0x53, 0xbd, 0x51, 0x19, 0xcd, 0x58, 0xa0, 0x17, 0x00, 0x61, 0xcb, 0x14, 0xf7, + 0xf0, 0x33, 0x71, 0x11, 0xf3, 0x0d, 0x5a, 0x81, 0xb9, 0x81, 0xe9, 0x1a, 0x21, 0xf9, 0x29, 0x96, + 0x3a, 0x33, 0x30, 0xdd, 0x4f, 0xf0, 0x69, 0xb5, 0x05, 0xd9, 0x18, 0x06, 0xad, 0xc2, 0x72, 0xf3, + 0xf0, 0x60, 0xbb, 0x75, 0xbf, 0x75, 0x78, 0x60, 0x3c, 0x38, 0x38, 0x6a, 0x6b, 0xcd, 0xd6, 0x4e, + 0x4b, 0xdb, 0x2e, 0x26, 0x50, 0x0e, 0xe6, 0x1a, 0x5b, 0x47, 0xda, 0x41, 0x53, 0x2b, 0x4a, 0x28, + 0x0b, 0x69, 0xed, 0x51, 0xa3, 0x79, 0xbf, 0x98, 0x0c, 0x97, 0xba, 0xb6, 0xab, 0x3d, 0x2a, 0xca, + 0xd5, 0x1f, 0x25, 0x58, 0xfc, 0x18, 0x9b, 0x36, 0xa6, 0x87, 0x2e, 0x16, 0x73, 0x38, 0xde, 0x6f, + 0x56, 0xf4, 0x5b, 0x1a, 0xff, 0xe4, 0x59, 0xf1, 0x1d, 0xd1, 0x2e, 0x64, 0x49, 0x14, 0xc6, 0x6a, + 0x2f, 0x4c, 0x0f, 0xc3, 0x25, 0x74, 0x35, 0x5e, 0xe9, 0x17, 0xb1, 0xd5, 0x0d, 0xc8, 0x5e, 0xe4, + 0xcf, 0xc1, 0x9c, 0xae, 0xb5, 0xef, 0x35, 0x9a, 0x5a, 0x31, 0x81, 0x00, 0x32, 0xba, 0xb6, 0x7f, + 0xf8, 0x59, 0xd8, 0x02, 0x40, 0xa6, 0xd1, 0x6e, 0x6b, 0x07, 0xdb, 0xc5, 0x64, 0xf5, 0xa7, 0x24, + 0x14, 0x26, 0x15, 0x8b, 0x4c, 0x58, 0xa5, 0xfc, 0x6e, 0x37, 0x8e, 0x59, 0x52, 0x23, 0x4e, 0xc0, + 0x87, 0x29, 0xb7, 0xb9, 0xf6, 0x8a, 0xea, 0xc4, 0x58, 0xac, 0x08, 0x9c, 0x4b, 0x56, 0x0f, 0x59, + 0x50, 0xa1, 0x62, 0xae, 0x67, 0xe4, 0x48, 0xfe, 0x9b, 0x1c, 0xe5, 0x08, 0x68, 0x2a, 0xc9, 0x06, + 0x94, 0xf8, 0x65, 0x65, 0xc4, 0xb9, 0x2c, 0x62, 0x63, 0x46, 0x70, 0x5e, 0x47, 0xdc, 0x16, 0xc9, + 0xab, 0x49, 0x6c, 0x3c, 0x2b, 0xa2, 0x43, 0x6c, 0x3e, 0x36, 0xd9, 0xcb, 0x11, 0x5b, 0xc4, 0x3e, + 0xad, 0xfe, 0x20, 0x41, 0x5e, 0xc7, 0x2e, 0xa1, 0xfe, 0x55, 0xef, 0x11, 0xf9, 0x7f, 0xbc, 0x47, + 0xde, 0x82, 0xbc, 0x8d, 0xbb, 0x66, 0xd0, 0xf7, 0x0d, 0x2e, 0xe5, 0x24, 0x93, 0xf2, 0x82, 0x38, + 0x7c, 0xc8, 0x14, 0x3d, 0xf3, 0xd1, 0x22, 0xcf, 0x7c, 0xb4, 0x54, 0x8b, 0x50, 0x88, 0xaa, 0xe5, + 0x4d, 0x6c, 0x7e, 0x23, 0x41, 0x7a, 0x3f, 0x2c, 0x0b, 0xed, 0x40, 0x9a, 0x5d, 0x38, 0xe8, 0xcd, + 0xeb, 0x7e, 0xf7, 0x95, 0x5b, 0xd7, 0xde, 0x52, 0xd5, 0x04, 0x6a, 0x41, 0x86, 0xe7, 0x40, 0xb7, + 0xa6, 0x95, 0x3c, 0xc6, 0x54, 0x45, 0xb9, 0xca, 0x1c, 0x41, 0x6d, 0xed, 0x9f, 0x9d, 0x2b, 0x89, + 0x17, 0xe7, 0x4a, 0xe2, 0xe7, 0x73, 0x25, 0xf1, 0xf2, 0x5c, 0x49, 0x3c, 0x1f, 0x29, 0xd2, 0xf7, + 0x23, 0x25, 0x71, 0x36, 0x52, 0xa4, 0x17, 0x23, 0x45, 0xfa, 0x6d, 0xa4, 0x48, 0x7f, 0x8d, 0x94, + 0xc4, 0xcb, 0x91, 0x22, 0x7d, 0xf5, 0xbb, 0x92, 0x78, 0xbc, 0xcc, 0x21, 0x1d, 0x52, 0x37, 0x5d, + 0xa7, 0x1e, 0x3d, 0x23, 0x9f, 0x4b, 0xd2, 0xdf, 0x92, 0xd4, 0xc9, 0xb0, 0x9f, 0xc8, 0xdd, 0x7f, + 0x02, 0x00, 0x00, 0xff, 0xff, 0x06, 0x71, 0x2e, 0x4b, 0xd4, 0x0a, 0x00, 0x00, +} diff --git a/proto.lock b/proto.lock index f16673fcf3..49cbaad84e 100644 --- a/proto.lock +++ b/proto.lock @@ -1524,266 +1524,6 @@ ] } }, - { - "protopath": "mixer:/:v1:/:check.proto", - "def": { - "enums": [ - { - "name": "ReferencedAttributes.Condition", - "enum_fields": [ - { - "name": "CONDITION_UNSPECIFIED", - "integer": 0 - }, - { - "name": "ABSENCE", - "integer": 1 - }, - { - "name": "EXACT", - "integer": 2 - }, - { - "name": "REGEX", - "integer": 3 - } - ] - }, - { - "name": "HeaderOperation.Operation", - "enum_fields": [ - { - "name": "REPLACE", - "integer": 0 - }, - { - "name": "REMOVE", - "integer": 1 - }, - { - "name": "APPEND", - "integer": 2 - } - ] - } - ], - "messages": [ - { - "name": "CheckRequest", - "fields": [ - { - "id": 1, - "name": "attributes", - "type": "CompressedAttributes" - }, - { - "id": 2, - "name": "global_word_count", - "type": "uint32" - }, - { - "id": 3, - "name": "deduplication_id", - "type": "string" - } - ], - "maps": [ - { - "key_type": "string", - "field": { - "id": 4, - "name": "quotas", - "type": "QuotaParams" - } - } - ], - "messages": [ - { - "name": "QuotaParams", - "fields": [ - { - "id": 1, - "name": "amount", - "type": "int64" - }, - { - "id": 2, - "name": "best_effort", - "type": "bool" - } - ] - } - ] - }, - { - "name": "CheckResponse", - "fields": [ - { - "id": 2, - "name": "precondition", - "type": "PreconditionResult" - } - ], - "maps": [ - { - "key_type": "string", - "field": { - "id": 3, - "name": "quotas", - "type": "QuotaResult" - } - } - ], - "messages": [ - { - "name": "PreconditionResult", - "fields": [ - { - "id": 1, - "name": "status", - "type": "google.rpc.Status" - }, - { - "id": 2, - "name": "valid_duration", - "type": "google.protobuf.Duration" - }, - { - "id": 3, - "name": "valid_use_count", - "type": "int32" - }, - { - "id": 5, - "name": "referenced_attributes", - "type": "ReferencedAttributes" - }, - { - "id": 6, - "name": "route_directive", - "type": "RouteDirective" - } - ], - "reserved_ids": [ - 4 - ] - }, - { - "name": "QuotaResult", - "fields": [ - { - "id": 1, - "name": "valid_duration", - "type": "google.protobuf.Duration" - }, - { - "id": 2, - "name": "granted_amount", - "type": "int64" - }, - { - "id": 5, - "name": "referenced_attributes", - "type": "ReferencedAttributes" - } - ] - } - ] - }, - { - "name": "ReferencedAttributes", - "fields": [ - { - "id": 1, - "name": "words", - "type": "string", - "is_repeated": true - }, - { - "id": 2, - "name": "attribute_matches", - "type": "AttributeMatch", - "is_repeated": true - } - ], - "messages": [ - { - "name": "AttributeMatch", - "fields": [ - { - "id": 1, - "name": "name", - "type": "sint32" - }, - { - "id": 2, - "name": "condition", - "type": "Condition" - }, - { - "id": 3, - "name": "regex", - "type": "string" - }, - { - "id": 4, - "name": "map_key", - "type": "sint32" - } - ] - } - ] - }, - { - "name": "HeaderOperation", - "fields": [ - { - "id": 1, - "name": "name", - "type": "string" - }, - { - "id": 2, - "name": "value", - "type": "string" - }, - { - "id": 3, - "name": "operation", - "type": "Operation" - } - ] - }, - { - "name": "RouteDirective", - "fields": [ - { - "id": 1, - "name": "request_header_operations", - "type": "HeaderOperation", - "is_repeated": true - }, - { - "id": 2, - "name": "response_header_operations", - "type": "HeaderOperation", - "is_repeated": true - }, - { - "id": 3, - "name": "direct_response_code", - "type": "uint32" - }, - { - "id": 4, - "name": "direct_response_body", - "type": "string" - } - ] - } - ] - } - }, { "protopath": "mixer:/:v1:/:config:/:client:/:api_spec.proto", "def": { @@ -2080,128 +1820,376 @@ } }, { - "protopath": "mixer:/:v1:/:config:/:client:/:quota.proto", + "protopath": "mixer:/:v1:/:config:/:client:/:quota.proto", + "def": { + "messages": [ + { + "name": "QuotaSpec", + "fields": [ + { + "id": 1, + "name": "rules", + "type": "QuotaRule", + "is_repeated": true + } + ] + }, + { + "name": "QuotaRule", + "fields": [ + { + "id": 1, + "name": "match", + "type": "AttributeMatch", + "is_repeated": true + }, + { + "id": 2, + "name": "quotas", + "type": "Quota", + "is_repeated": true + } + ] + }, + { + "name": "StringMatch", + "fields": [ + { + "id": 1, + "name": "exact", + "type": "string" + }, + { + "id": 2, + "name": "prefix", + "type": "string" + }, + { + "id": 3, + "name": "regex", + "type": "string" + } + ] + }, + { + "name": "AttributeMatch", + "maps": [ + { + "key_type": "string", + "field": { + "id": 1, + "name": "clause", + "type": "StringMatch" + } + } + ] + }, + { + "name": "Quota", + "fields": [ + { + "id": 1, + "name": "quota", + "type": "string" + }, + { + "id": 2, + "name": "charge", + "type": "int64" + } + ] + }, + { + "name": "QuotaSpecBinding", + "fields": [ + { + "id": 1, + "name": "services", + "type": "IstioService", + "is_repeated": true + }, + { + "id": 2, + "name": "quota_specs", + "type": "QuotaSpecReference", + "is_repeated": true + } + ], + "messages": [ + { + "name": "QuotaSpecReference", + "fields": [ + { + "id": 1, + "name": "name", + "type": "string" + }, + { + "id": 2, + "name": "namespace", + "type": "string" + } + ] + } + ] + } + ] + } + }, + { + "protopath": "mixer:/:v1:/:config:/:client:/:service.proto", + "def": { + "messages": [ + { + "name": "IstioService", + "fields": [ + { + "id": 1, + "name": "name", + "type": "string" + }, + { + "id": 2, + "name": "namespace", + "type": "string" + }, + { + "id": 3, + "name": "domain", + "type": "string" + }, + { + "id": 4, + "name": "service", + "type": "string" + } + ], + "maps": [ + { + "key_type": "string", + "field": { + "id": 5, + "name": "labels", + "type": "string" + } + } + ] + } + ] + } + }, + { + "protopath": "mixer:/:v1:/:mixer.proto", "def": { - "messages": [ + "enums": [ { - "name": "QuotaSpec", - "fields": [ + "name": "ReferencedAttributes.Condition", + "enum_fields": [ { - "id": 1, - "name": "rules", - "type": "QuotaRule", - "is_repeated": true + "name": "CONDITION_UNSPECIFIED", + "integer": 0 + }, + { + "name": "ABSENCE", + "integer": 1 + }, + { + "name": "EXACT", + "integer": 2 + }, + { + "name": "REGEX", + "integer": 3 } ] }, { - "name": "QuotaRule", - "fields": [ + "name": "HeaderOperation.Operation", + "enum_fields": [ { - "id": 1, - "name": "match", - "type": "AttributeMatch", - "is_repeated": true + "name": "REPLACE", + "integer": 0 }, { - "id": 2, - "name": "quotas", - "type": "Quota", - "is_repeated": true + "name": "REMOVE", + "integer": 1 + }, + { + "name": "APPEND", + "integer": 2 } ] - }, + } + ], + "messages": [ { - "name": "StringMatch", + "name": "CheckRequest", "fields": [ { "id": 1, - "name": "exact", - "type": "string" + "name": "attributes", + "type": "CompressedAttributes" }, { "id": 2, - "name": "prefix", - "type": "string" + "name": "global_word_count", + "type": "uint32" }, { "id": 3, - "name": "regex", + "name": "deduplication_id", "type": "string" } - ] - }, - { - "name": "AttributeMatch", + ], "maps": [ { "key_type": "string", "field": { - "id": 1, - "name": "clause", - "type": "StringMatch" + "id": 4, + "name": "quotas", + "type": "QuotaParams" } } + ], + "messages": [ + { + "name": "QuotaParams", + "fields": [ + { + "id": 1, + "name": "amount", + "type": "int64" + }, + { + "id": 2, + "name": "best_effort", + "type": "bool" + } + ] + } ] }, { - "name": "Quota", + "name": "CheckResponse", "fields": [ { - "id": 1, - "name": "quota", - "type": "string" + "id": 2, + "name": "precondition", + "type": "PreconditionResult" + } + ], + "maps": [ + { + "key_type": "string", + "field": { + "id": 3, + "name": "quotas", + "type": "QuotaResult" + } + } + ], + "messages": [ + { + "name": "PreconditionResult", + "fields": [ + { + "id": 1, + "name": "status", + "type": "google.rpc.Status" + }, + { + "id": 2, + "name": "valid_duration", + "type": "google.protobuf.Duration" + }, + { + "id": 3, + "name": "valid_use_count", + "type": "int32" + }, + { + "id": 5, + "name": "referenced_attributes", + "type": "ReferencedAttributes" + }, + { + "id": 6, + "name": "route_directive", + "type": "RouteDirective" + } + ], + "reserved_ids": [ + 4 + ] }, { - "id": 2, - "name": "charge", - "type": "int64" + "name": "QuotaResult", + "fields": [ + { + "id": 1, + "name": "valid_duration", + "type": "google.protobuf.Duration" + }, + { + "id": 2, + "name": "granted_amount", + "type": "int64" + }, + { + "id": 5, + "name": "referenced_attributes", + "type": "ReferencedAttributes" + } + ] } ] }, { - "name": "QuotaSpecBinding", + "name": "ReferencedAttributes", "fields": [ { "id": 1, - "name": "services", - "type": "IstioService", + "name": "words", + "type": "string", "is_repeated": true }, { "id": 2, - "name": "quota_specs", - "type": "QuotaSpecReference", + "name": "attribute_matches", + "type": "AttributeMatch", "is_repeated": true } ], "messages": [ { - "name": "QuotaSpecReference", + "name": "AttributeMatch", "fields": [ { "id": 1, "name": "name", - "type": "string" + "type": "sint32" }, { "id": 2, - "name": "namespace", + "name": "condition", + "type": "Condition" + }, + { + "id": 3, + "name": "regex", "type": "string" + }, + { + "id": 4, + "name": "map_key", + "type": "sint32" } ] } ] - } - ] - } - }, - { - "protopath": "mixer:/:v1:/:config:/:client:/:service.proto", - "def": { - "messages": [ + }, { - "name": "IstioService", + "name": "HeaderOperation", "fields": [ { "id": 1, @@ -2210,38 +2198,43 @@ }, { "id": 2, - "name": "namespace", + "name": "value", "type": "string" }, { "id": 3, - "name": "domain", - "type": "string" + "name": "operation", + "type": "Operation" + } + ] + }, + { + "name": "RouteDirective", + "fields": [ + { + "id": 1, + "name": "request_header_operations", + "type": "HeaderOperation", + "is_repeated": true + }, + { + "id": 2, + "name": "response_header_operations", + "type": "HeaderOperation", + "is_repeated": true + }, + { + "id": 3, + "name": "direct_response_code", + "type": "uint32" }, { "id": 4, - "name": "service", + "name": "direct_response_body", "type": "string" } - ], - "maps": [ - { - "key_type": "string", - "field": { - "id": 5, - "name": "labels", - "type": "string" - } - } ] - } - ] - } - }, - { - "protopath": "mixer:/:v1:/:report.proto", - "def": { - "messages": [ + }, { "name": "ReportRequest", "fields": [ @@ -2267,12 +2260,7 @@ { "name": "ReportResponse" } - ] - } - }, - { - "protopath": "mixer:/:v1:/:service.proto", - "def": { + ], "services": [ { "name": "Mixer", diff --git a/python/istio_api/mixer/v1/check_pb2.py b/python/istio_api/mixer/v1/mixer_pb2.py similarity index 86% rename from python/istio_api/mixer/v1/check_pb2.py rename to python/istio_api/mixer/v1/mixer_pb2.py index d4fbbd9c57..1741dfbdb7 100644 --- a/python/istio_api/mixer/v1/check_pb2.py +++ b/python/istio_api/mixer/v1/mixer_pb2.py @@ -1,5 +1,5 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! -# source: mixer/v1/check.proto +# source: mixer/v1/mixer.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) @@ -20,10 +20,10 @@ DESCRIPTOR = _descriptor.FileDescriptor( - name='mixer/v1/check.proto', + name='mixer/v1/mixer.proto', package='istio.mixer.v1', syntax='proto3', - serialized_pb=_b('\n\x14mixer/v1/check.proto\x12\x0eistio.mixer.v1\x1a\x14gogoproto/gogo.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x17google/rpc/status.proto\x1a\x19mixer/v1/attributes.proto\"\xd0\x02\n\x0c\x43heckRequest\x12>\n\nattributes\x18\x01 \x01(\x0b\x32$.istio.mixer.v1.CompressedAttributesB\x04\xc8\xde\x1f\x00\x12\x19\n\x11global_word_count\x18\x02 \x01(\r\x12\x18\n\x10\x64\x65\x64uplication_id\x18\x03 \x01(\t\x12>\n\x06quotas\x18\x04 \x03(\x0b\x32(.istio.mixer.v1.CheckRequest.QuotasEntryB\x04\xc8\xde\x1f\x00\x1a\x32\n\x0bQuotaParams\x12\x0e\n\x06\x61mount\x18\x01 \x01(\x03\x12\x13\n\x0b\x62\x65st_effort\x18\x02 \x01(\x08\x1aW\n\x0bQuotasEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x37\n\x05value\x18\x02 \x01(\x0b\x32(.istio.mixer.v1.CheckRequest.QuotaParams:\x02\x38\x01\"\xc3\x05\n\rCheckResponse\x12L\n\x0cprecondition\x18\x02 \x01(\x0b\x32\x30.istio.mixer.v1.CheckResponse.PreconditionResultB\x04\xc8\xde\x1f\x00\x12?\n\x06quotas\x18\x03 \x03(\x0b\x32).istio.mixer.v1.CheckResponse.QuotasEntryB\x04\xc8\xde\x1f\x00\x1a\x98\x02\n\x12PreconditionResult\x12(\n\x06status\x18\x01 \x01(\x0b\x32\x12.google.rpc.StatusB\x04\xc8\xde\x1f\x00\x12;\n\x0evalid_duration\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x08\xc8\xde\x1f\x00\x98\xdf\x1f\x01\x12\x17\n\x0fvalid_use_count\x18\x03 \x01(\x05\x12\x43\n\x15referenced_attributes\x18\x05 \x01(\x0b\x32$.istio.mixer.v1.ReferencedAttributes\x12\x37\n\x0froute_directive\x18\x06 \x01(\x0b\x32\x1e.istio.mixer.v1.RouteDirectiveJ\x04\x08\x04\x10\x05\x1a\xad\x01\n\x0bQuotaResult\x12;\n\x0evalid_duration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x08\xc8\xde\x1f\x00\x98\xdf\x1f\x01\x12\x16\n\x0egranted_amount\x18\x02 \x01(\x03\x12I\n\x15referenced_attributes\x18\x05 \x01(\x0b\x32$.istio.mixer.v1.ReferencedAttributesB\x04\xc8\xde\x1f\x00\x1aX\n\x0bQuotasEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x38\n\x05value\x18\x02 \x01(\x0b\x32).istio.mixer.v1.CheckResponse.QuotaResult:\x02\x38\x01\"\xca\x02\n\x14ReferencedAttributes\x12\r\n\x05words\x18\x01 \x03(\t\x12T\n\x11\x61ttribute_matches\x18\x02 \x03(\x0b\x32\x33.istio.mixer.v1.ReferencedAttributes.AttributeMatchB\x04\xc8\xde\x1f\x00\x1a\x81\x01\n\x0e\x41ttributeMatch\x12\x0c\n\x04name\x18\x01 \x01(\x11\x12\x41\n\tcondition\x18\x02 \x01(\x0e\x32..istio.mixer.v1.ReferencedAttributes.Condition\x12\r\n\x05regex\x18\x03 \x01(\t\x12\x0f\n\x07map_key\x18\x04 \x01(\x11\"I\n\tCondition\x12\x19\n\x15\x43ONDITION_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x41\x42SENCE\x10\x01\x12\t\n\x05\x45XACT\x10\x02\x12\t\n\x05REGEX\x10\x03\"\x9e\x01\n\x0fHeaderOperation\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x12<\n\toperation\x18\x03 \x01(\x0e\x32).istio.mixer.v1.HeaderOperation.Operation\"0\n\tOperation\x12\x0b\n\x07REPLACE\x10\x00\x12\n\n\x06REMOVE\x10\x01\x12\n\n\x06\x41PPEND\x10\x02\"\xe1\x01\n\x0eRouteDirective\x12H\n\x19request_header_operations\x18\x01 \x03(\x0b\x32\x1f.istio.mixer.v1.HeaderOperationB\x04\xc8\xde\x1f\x00\x12I\n\x1aresponse_header_operations\x18\x02 \x03(\x0b\x32\x1f.istio.mixer.v1.HeaderOperationB\x04\xc8\xde\x1f\x00\x12\x1c\n\x14\x64irect_response_code\x18\x03 \x01(\r\x12\x1c\n\x14\x64irect_response_body\x18\x04 \x01(\tB&Z\x15istio.io/api/mixer/v1\xf8\x01\x01\xc8\xe1\x1e\x00\xa8\xe2\x1e\x00\xf0\xe1\x1e\x00\x62\x06proto3') + serialized_pb=_b('\n\x14mixer/v1/mixer.proto\x12\x0eistio.mixer.v1\x1a\x14gogoproto/gogo.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x17google/rpc/status.proto\x1a\x19mixer/v1/attributes.proto\"\xd0\x02\n\x0c\x43heckRequest\x12>\n\nattributes\x18\x01 \x01(\x0b\x32$.istio.mixer.v1.CompressedAttributesB\x04\xc8\xde\x1f\x00\x12\x19\n\x11global_word_count\x18\x02 \x01(\r\x12\x18\n\x10\x64\x65\x64uplication_id\x18\x03 \x01(\t\x12>\n\x06quotas\x18\x04 \x03(\x0b\x32(.istio.mixer.v1.CheckRequest.QuotasEntryB\x04\xc8\xde\x1f\x00\x1a\x32\n\x0bQuotaParams\x12\x0e\n\x06\x61mount\x18\x01 \x01(\x03\x12\x13\n\x0b\x62\x65st_effort\x18\x02 \x01(\x08\x1aW\n\x0bQuotasEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x37\n\x05value\x18\x02 \x01(\x0b\x32(.istio.mixer.v1.CheckRequest.QuotaParams:\x02\x38\x01\"\xc3\x05\n\rCheckResponse\x12L\n\x0cprecondition\x18\x02 \x01(\x0b\x32\x30.istio.mixer.v1.CheckResponse.PreconditionResultB\x04\xc8\xde\x1f\x00\x12?\n\x06quotas\x18\x03 \x03(\x0b\x32).istio.mixer.v1.CheckResponse.QuotasEntryB\x04\xc8\xde\x1f\x00\x1a\x98\x02\n\x12PreconditionResult\x12(\n\x06status\x18\x01 \x01(\x0b\x32\x12.google.rpc.StatusB\x04\xc8\xde\x1f\x00\x12;\n\x0evalid_duration\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x08\xc8\xde\x1f\x00\x98\xdf\x1f\x01\x12\x17\n\x0fvalid_use_count\x18\x03 \x01(\x05\x12\x43\n\x15referenced_attributes\x18\x05 \x01(\x0b\x32$.istio.mixer.v1.ReferencedAttributes\x12\x37\n\x0froute_directive\x18\x06 \x01(\x0b\x32\x1e.istio.mixer.v1.RouteDirectiveJ\x04\x08\x04\x10\x05\x1a\xad\x01\n\x0bQuotaResult\x12;\n\x0evalid_duration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x08\xc8\xde\x1f\x00\x98\xdf\x1f\x01\x12\x16\n\x0egranted_amount\x18\x02 \x01(\x03\x12I\n\x15referenced_attributes\x18\x05 \x01(\x0b\x32$.istio.mixer.v1.ReferencedAttributesB\x04\xc8\xde\x1f\x00\x1aX\n\x0bQuotasEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x38\n\x05value\x18\x02 \x01(\x0b\x32).istio.mixer.v1.CheckResponse.QuotaResult:\x02\x38\x01\"\xca\x02\n\x14ReferencedAttributes\x12\r\n\x05words\x18\x01 \x03(\t\x12T\n\x11\x61ttribute_matches\x18\x02 \x03(\x0b\x32\x33.istio.mixer.v1.ReferencedAttributes.AttributeMatchB\x04\xc8\xde\x1f\x00\x1a\x81\x01\n\x0e\x41ttributeMatch\x12\x0c\n\x04name\x18\x01 \x01(\x11\x12\x41\n\tcondition\x18\x02 \x01(\x0e\x32..istio.mixer.v1.ReferencedAttributes.Condition\x12\r\n\x05regex\x18\x03 \x01(\t\x12\x0f\n\x07map_key\x18\x04 \x01(\x11\"I\n\tCondition\x12\x19\n\x15\x43ONDITION_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x41\x42SENCE\x10\x01\x12\t\n\x05\x45XACT\x10\x02\x12\t\n\x05REGEX\x10\x03\"\x9e\x01\n\x0fHeaderOperation\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x12<\n\toperation\x18\x03 \x01(\x0e\x32).istio.mixer.v1.HeaderOperation.Operation\"0\n\tOperation\x12\x0b\n\x07REPLACE\x10\x00\x12\n\n\x06REMOVE\x10\x01\x12\n\n\x06\x41PPEND\x10\x02\"\xe1\x01\n\x0eRouteDirective\x12H\n\x19request_header_operations\x18\x01 \x03(\x0b\x32\x1f.istio.mixer.v1.HeaderOperationB\x04\xc8\xde\x1f\x00\x12I\n\x1aresponse_header_operations\x18\x02 \x03(\x0b\x32\x1f.istio.mixer.v1.HeaderOperationB\x04\xc8\xde\x1f\x00\x12\x1c\n\x14\x64irect_response_code\x18\x03 \x01(\r\x12\x1c\n\x14\x64irect_response_body\x18\x04 \x01(\t\"\x81\x01\n\rReportRequest\x12>\n\nattributes\x18\x01 \x03(\x0b\x32$.istio.mixer.v1.CompressedAttributesB\x04\xc8\xde\x1f\x00\x12\x15\n\rdefault_words\x18\x02 \x03(\t\x12\x19\n\x11global_word_count\x18\x03 \x01(\r\"\x10\n\x0eReportResponse2\x9a\x01\n\x05Mixer\x12\x46\n\x05\x43heck\x12\x1c.istio.mixer.v1.CheckRequest\x1a\x1d.istio.mixer.v1.CheckResponse\"\x00\x12I\n\x06Report\x12\x1d.istio.mixer.v1.ReportRequest\x1a\x1e.istio.mixer.v1.ReportResponse\"\x00\x42)Z\x15istio.io/api/mixer/v1\x80\x01\x01\xf8\x01\x01\xc8\xe1\x1e\x00\xa8\xe2\x1e\x00\xf0\xe1\x1e\x00\x62\x06proto3') , dependencies=[gogoproto_dot_gogo__pb2.DESCRIPTOR,google_dot_protobuf_dot_duration__pb2.DESCRIPTOR,google_dot_rpc_dot_status__pb2.DESCRIPTOR,mixer_dot_v1_dot_attributes__pb2.DESCRIPTOR,]) @@ -576,6 +576,75 @@ serialized_end=1915, ) + +_REPORTREQUEST = _descriptor.Descriptor( + name='ReportRequest', + full_name='istio.mixer.v1.ReportRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='attributes', full_name='istio.mixer.v1.ReportRequest.attributes', index=0, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=_descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\310\336\037\000')), file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='default_words', full_name='istio.mixer.v1.ReportRequest.default_words', index=1, + number=2, type=9, cpp_type=9, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='global_word_count', full_name='istio.mixer.v1.ReportRequest.global_word_count', index=2, + number=3, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1918, + serialized_end=2047, +) + + +_REPORTRESPONSE = _descriptor.Descriptor( + name='ReportResponse', + full_name='istio.mixer.v1.ReportResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=2049, + serialized_end=2065, +) + _CHECKREQUEST_QUOTAPARAMS.containing_type = _CHECKREQUEST _CHECKREQUEST_QUOTASENTRY.fields_by_name['value'].message_type = _CHECKREQUEST_QUOTAPARAMS _CHECKREQUEST_QUOTASENTRY.containing_type = _CHECKREQUEST @@ -601,30 +670,33 @@ _HEADEROPERATION_OPERATION.containing_type = _HEADEROPERATION _ROUTEDIRECTIVE.fields_by_name['request_header_operations'].message_type = _HEADEROPERATION _ROUTEDIRECTIVE.fields_by_name['response_header_operations'].message_type = _HEADEROPERATION +_REPORTREQUEST.fields_by_name['attributes'].message_type = mixer_dot_v1_dot_attributes__pb2._COMPRESSEDATTRIBUTES DESCRIPTOR.message_types_by_name['CheckRequest'] = _CHECKREQUEST DESCRIPTOR.message_types_by_name['CheckResponse'] = _CHECKRESPONSE DESCRIPTOR.message_types_by_name['ReferencedAttributes'] = _REFERENCEDATTRIBUTES DESCRIPTOR.message_types_by_name['HeaderOperation'] = _HEADEROPERATION DESCRIPTOR.message_types_by_name['RouteDirective'] = _ROUTEDIRECTIVE +DESCRIPTOR.message_types_by_name['ReportRequest'] = _REPORTREQUEST +DESCRIPTOR.message_types_by_name['ReportResponse'] = _REPORTRESPONSE _sym_db.RegisterFileDescriptor(DESCRIPTOR) CheckRequest = _reflection.GeneratedProtocolMessageType('CheckRequest', (_message.Message,), dict( QuotaParams = _reflection.GeneratedProtocolMessageType('QuotaParams', (_message.Message,), dict( DESCRIPTOR = _CHECKREQUEST_QUOTAPARAMS, - __module__ = 'mixer.v1.check_pb2' + __module__ = 'mixer.v1.mixer_pb2' # @@protoc_insertion_point(class_scope:istio.mixer.v1.CheckRequest.QuotaParams) )) , QuotasEntry = _reflection.GeneratedProtocolMessageType('QuotasEntry', (_message.Message,), dict( DESCRIPTOR = _CHECKREQUEST_QUOTASENTRY, - __module__ = 'mixer.v1.check_pb2' + __module__ = 'mixer.v1.mixer_pb2' # @@protoc_insertion_point(class_scope:istio.mixer.v1.CheckRequest.QuotasEntry) )) , DESCRIPTOR = _CHECKREQUEST, - __module__ = 'mixer.v1.check_pb2' + __module__ = 'mixer.v1.mixer_pb2' # @@protoc_insertion_point(class_scope:istio.mixer.v1.CheckRequest) )) _sym_db.RegisterMessage(CheckRequest) @@ -635,26 +707,26 @@ PreconditionResult = _reflection.GeneratedProtocolMessageType('PreconditionResult', (_message.Message,), dict( DESCRIPTOR = _CHECKRESPONSE_PRECONDITIONRESULT, - __module__ = 'mixer.v1.check_pb2' + __module__ = 'mixer.v1.mixer_pb2' # @@protoc_insertion_point(class_scope:istio.mixer.v1.CheckResponse.PreconditionResult) )) , QuotaResult = _reflection.GeneratedProtocolMessageType('QuotaResult', (_message.Message,), dict( DESCRIPTOR = _CHECKRESPONSE_QUOTARESULT, - __module__ = 'mixer.v1.check_pb2' + __module__ = 'mixer.v1.mixer_pb2' # @@protoc_insertion_point(class_scope:istio.mixer.v1.CheckResponse.QuotaResult) )) , QuotasEntry = _reflection.GeneratedProtocolMessageType('QuotasEntry', (_message.Message,), dict( DESCRIPTOR = _CHECKRESPONSE_QUOTASENTRY, - __module__ = 'mixer.v1.check_pb2' + __module__ = 'mixer.v1.mixer_pb2' # @@protoc_insertion_point(class_scope:istio.mixer.v1.CheckResponse.QuotasEntry) )) , DESCRIPTOR = _CHECKRESPONSE, - __module__ = 'mixer.v1.check_pb2' + __module__ = 'mixer.v1.mixer_pb2' # @@protoc_insertion_point(class_scope:istio.mixer.v1.CheckResponse) )) _sym_db.RegisterMessage(CheckResponse) @@ -666,12 +738,12 @@ AttributeMatch = _reflection.GeneratedProtocolMessageType('AttributeMatch', (_message.Message,), dict( DESCRIPTOR = _REFERENCEDATTRIBUTES_ATTRIBUTEMATCH, - __module__ = 'mixer.v1.check_pb2' + __module__ = 'mixer.v1.mixer_pb2' # @@protoc_insertion_point(class_scope:istio.mixer.v1.ReferencedAttributes.AttributeMatch) )) , DESCRIPTOR = _REFERENCEDATTRIBUTES, - __module__ = 'mixer.v1.check_pb2' + __module__ = 'mixer.v1.mixer_pb2' # @@protoc_insertion_point(class_scope:istio.mixer.v1.ReferencedAttributes) )) _sym_db.RegisterMessage(ReferencedAttributes) @@ -679,21 +751,35 @@ HeaderOperation = _reflection.GeneratedProtocolMessageType('HeaderOperation', (_message.Message,), dict( DESCRIPTOR = _HEADEROPERATION, - __module__ = 'mixer.v1.check_pb2' + __module__ = 'mixer.v1.mixer_pb2' # @@protoc_insertion_point(class_scope:istio.mixer.v1.HeaderOperation) )) _sym_db.RegisterMessage(HeaderOperation) RouteDirective = _reflection.GeneratedProtocolMessageType('RouteDirective', (_message.Message,), dict( DESCRIPTOR = _ROUTEDIRECTIVE, - __module__ = 'mixer.v1.check_pb2' + __module__ = 'mixer.v1.mixer_pb2' # @@protoc_insertion_point(class_scope:istio.mixer.v1.RouteDirective) )) _sym_db.RegisterMessage(RouteDirective) +ReportRequest = _reflection.GeneratedProtocolMessageType('ReportRequest', (_message.Message,), dict( + DESCRIPTOR = _REPORTREQUEST, + __module__ = 'mixer.v1.mixer_pb2' + # @@protoc_insertion_point(class_scope:istio.mixer.v1.ReportRequest) + )) +_sym_db.RegisterMessage(ReportRequest) + +ReportResponse = _reflection.GeneratedProtocolMessageType('ReportResponse', (_message.Message,), dict( + DESCRIPTOR = _REPORTRESPONSE, + __module__ = 'mixer.v1.mixer_pb2' + # @@protoc_insertion_point(class_scope:istio.mixer.v1.ReportResponse) + )) +_sym_db.RegisterMessage(ReportResponse) + DESCRIPTOR.has_options = True -DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('Z\025istio.io/api/mixer/v1\370\001\001\310\341\036\000\250\342\036\000\360\341\036\000')) +DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('Z\025istio.io/api/mixer/v1\200\001\001\370\001\001\310\341\036\000\250\342\036\000\360\341\036\000')) _CHECKREQUEST_QUOTASENTRY.has_options = True _CHECKREQUEST_QUOTASENTRY._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')) _CHECKREQUEST.fields_by_name['attributes'].has_options = True @@ -720,4 +806,39 @@ _ROUTEDIRECTIVE.fields_by_name['request_header_operations']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\310\336\037\000')) _ROUTEDIRECTIVE.fields_by_name['response_header_operations'].has_options = True _ROUTEDIRECTIVE.fields_by_name['response_header_operations']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\310\336\037\000')) +_REPORTREQUEST.fields_by_name['attributes'].has_options = True +_REPORTREQUEST.fields_by_name['attributes']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\310\336\037\000')) + +_MIXER = _descriptor.ServiceDescriptor( + name='Mixer', + full_name='istio.mixer.v1.Mixer', + file=DESCRIPTOR, + index=0, + options=None, + serialized_start=2068, + serialized_end=2222, + methods=[ + _descriptor.MethodDescriptor( + name='Check', + full_name='istio.mixer.v1.Mixer.Check', + index=0, + containing_service=None, + input_type=_CHECKREQUEST, + output_type=_CHECKRESPONSE, + options=None, + ), + _descriptor.MethodDescriptor( + name='Report', + full_name='istio.mixer.v1.Mixer.Report', + index=1, + containing_service=None, + input_type=_REPORTREQUEST, + output_type=_REPORTRESPONSE, + options=None, + ), +]) +_sym_db.RegisterServiceDescriptor(_MIXER) + +DESCRIPTOR.services_by_name['Mixer'] = _MIXER + # @@protoc_insertion_point(module_scope) diff --git a/python/istio_api/mixer/v1/report_pb2.py b/python/istio_api/mixer/v1/report_pb2.py deleted file mode 100644 index fa8527dc4a..0000000000 --- a/python/istio_api/mixer/v1/report_pb2.py +++ /dev/null @@ -1,123 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: mixer/v1/report.proto - -import sys -_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection -from google.protobuf import symbol_database as _symbol_database -from google.protobuf import descriptor_pb2 -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - -from gogoproto import gogo_pb2 as gogoproto_dot_gogo__pb2 -from mixer.v1 import attributes_pb2 as mixer_dot_v1_dot_attributes__pb2 - - -DESCRIPTOR = _descriptor.FileDescriptor( - name='mixer/v1/report.proto', - package='istio.mixer.v1', - syntax='proto3', - serialized_pb=_b('\n\x15mixer/v1/report.proto\x12\x0eistio.mixer.v1\x1a\x14gogoproto/gogo.proto\x1a\x19mixer/v1/attributes.proto\"\x81\x01\n\rReportRequest\x12>\n\nattributes\x18\x01 \x03(\x0b\x32$.istio.mixer.v1.CompressedAttributesB\x04\xc8\xde\x1f\x00\x12\x15\n\rdefault_words\x18\x02 \x03(\t\x12\x19\n\x11global_word_count\x18\x03 \x01(\r\"\x10\n\x0eReportResponseB&Z\x15istio.io/api/mixer/v1\xf8\x01\x01\xc8\xe1\x1e\x00\xa8\xe2\x1e\x00\xf0\xe1\x1e\x00\x62\x06proto3') - , - dependencies=[gogoproto_dot_gogo__pb2.DESCRIPTOR,mixer_dot_v1_dot_attributes__pb2.DESCRIPTOR,]) - - - - -_REPORTREQUEST = _descriptor.Descriptor( - name='ReportRequest', - full_name='istio.mixer.v1.ReportRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='attributes', full_name='istio.mixer.v1.ReportRequest.attributes', index=0, - number=1, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=_descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\310\336\037\000')), file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='default_words', full_name='istio.mixer.v1.ReportRequest.default_words', index=1, - number=2, type=9, cpp_type=9, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='global_word_count', full_name='istio.mixer.v1.ReportRequest.global_word_count', index=2, - number=3, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=91, - serialized_end=220, -) - - -_REPORTRESPONSE = _descriptor.Descriptor( - name='ReportResponse', - full_name='istio.mixer.v1.ReportResponse', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=222, - serialized_end=238, -) - -_REPORTREQUEST.fields_by_name['attributes'].message_type = mixer_dot_v1_dot_attributes__pb2._COMPRESSEDATTRIBUTES -DESCRIPTOR.message_types_by_name['ReportRequest'] = _REPORTREQUEST -DESCRIPTOR.message_types_by_name['ReportResponse'] = _REPORTRESPONSE -_sym_db.RegisterFileDescriptor(DESCRIPTOR) - -ReportRequest = _reflection.GeneratedProtocolMessageType('ReportRequest', (_message.Message,), dict( - DESCRIPTOR = _REPORTREQUEST, - __module__ = 'mixer.v1.report_pb2' - # @@protoc_insertion_point(class_scope:istio.mixer.v1.ReportRequest) - )) -_sym_db.RegisterMessage(ReportRequest) - -ReportResponse = _reflection.GeneratedProtocolMessageType('ReportResponse', (_message.Message,), dict( - DESCRIPTOR = _REPORTRESPONSE, - __module__ = 'mixer.v1.report_pb2' - # @@protoc_insertion_point(class_scope:istio.mixer.v1.ReportResponse) - )) -_sym_db.RegisterMessage(ReportResponse) - - -DESCRIPTOR.has_options = True -DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('Z\025istio.io/api/mixer/v1\370\001\001\310\341\036\000\250\342\036\000\360\341\036\000')) -_REPORTREQUEST.fields_by_name['attributes'].has_options = True -_REPORTREQUEST.fields_by_name['attributes']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\310\336\037\000')) -# @@protoc_insertion_point(module_scope) diff --git a/python/istio_api/mixer/v1/service_pb2.py b/python/istio_api/mixer/v1/service_pb2.py deleted file mode 100644 index b58970d080..0000000000 --- a/python/istio_api/mixer/v1/service_pb2.py +++ /dev/null @@ -1,68 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: mixer/v1/service.proto - -import sys -_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection -from google.protobuf import symbol_database as _symbol_database -from google.protobuf import descriptor_pb2 -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - -from mixer.v1 import check_pb2 as mixer_dot_v1_dot_check__pb2 -from mixer.v1 import report_pb2 as mixer_dot_v1_dot_report__pb2 - - -DESCRIPTOR = _descriptor.FileDescriptor( - name='mixer/v1/service.proto', - package='istio.mixer.v1', - syntax='proto3', - serialized_pb=_b('\n\x16mixer/v1/service.proto\x12\x0eistio.mixer.v1\x1a\x14mixer/v1/check.proto\x1a\x15mixer/v1/report.proto2\x9a\x01\n\x05Mixer\x12\x46\n\x05\x43heck\x12\x1c.istio.mixer.v1.CheckRequest\x1a\x1d.istio.mixer.v1.CheckResponse\"\x00\x12I\n\x06Report\x12\x1d.istio.mixer.v1.ReportRequest\x1a\x1e.istio.mixer.v1.ReportResponse\"\x00\x42\x1aZ\x15istio.io/api/mixer/v1\x80\x01\x01\x62\x06proto3') - , - dependencies=[mixer_dot_v1_dot_check__pb2.DESCRIPTOR,mixer_dot_v1_dot_report__pb2.DESCRIPTOR,]) - - - -_sym_db.RegisterFileDescriptor(DESCRIPTOR) - - -DESCRIPTOR.has_options = True -DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('Z\025istio.io/api/mixer/v1\200\001\001')) - -_MIXER = _descriptor.ServiceDescriptor( - name='Mixer', - full_name='istio.mixer.v1.Mixer', - file=DESCRIPTOR, - index=0, - options=None, - serialized_start=88, - serialized_end=242, - methods=[ - _descriptor.MethodDescriptor( - name='Check', - full_name='istio.mixer.v1.Mixer.Check', - index=0, - containing_service=None, - input_type=mixer_dot_v1_dot_check__pb2._CHECKREQUEST, - output_type=mixer_dot_v1_dot_check__pb2._CHECKRESPONSE, - options=None, - ), - _descriptor.MethodDescriptor( - name='Report', - full_name='istio.mixer.v1.Mixer.Report', - index=1, - containing_service=None, - input_type=mixer_dot_v1_dot_report__pb2._REPORTREQUEST, - output_type=mixer_dot_v1_dot_report__pb2._REPORTRESPONSE, - options=None, - ), -]) -_sym_db.RegisterServiceDescriptor(_MIXER) - -DESCRIPTOR.services_by_name['Mixer'] = _MIXER - -# @@protoc_insertion_point(module_scope) From 8f87b9c2435b007b48599b96af784b84d82f57f0 Mon Sep 17 00:00:00 2001 From: Jeff Mendoza Date: Thu, 1 Nov 2018 11:45:34 -0700 Subject: [PATCH 4/4] Remove mixer lint exception. --- prototool.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/prototool.yaml b/prototool.yaml index f46de81d01..57e67aac35 100644 --- a/prototool.yaml +++ b/prototool.yaml @@ -10,9 +10,6 @@ lint: - id: MESSAGE_FIELD_NAMES_LOWER_SNAKE_CASE files: - rbac/v1alpha1/rbac.proto - - id: REQUEST_RESPONSE_TYPES_IN_SAME_FILE - files: - - mixer/v1/service.proto - id: ENUM_FIELD_NAMES_UPPER_SNAKE_CASE files: - networking/v1alpha3/gateway.proto