From e575e62a65454d3400a4f3994431a820a4651150 Mon Sep 17 00:00:00 2001 From: mnito Date: Sun, 29 May 2022 16:44:07 -0400 Subject: [PATCH] Add HEAD, OPTIONS, and TRACE examples to a_bit_of_everything.proto Implement examples in server Regenerate files --- .../internal/clients/abe/api/swagger.yaml | 672 +++++++++++- .../abe/api_a_bit_of_everything_service.go | 704 +++++++++++-- .../proto/examplepb/a_bit_of_everything.pb.go | 338 +++--- .../examplepb/a_bit_of_everything.pb.gw.go | 357 +++++++ .../proto/examplepb/a_bit_of_everything.proto | 27 + .../a_bit_of_everything.swagger.json | 989 ++++++++++++++++++ .../examplepb/a_bit_of_everything_grpc.pb.go | 108 ++ .../internal/server/a_bit_of_everything.go | 22 + 8 files changed, 2978 insertions(+), 239 deletions(-) diff --git a/examples/internal/clients/abe/api/swagger.yaml b/examples/internal/clients/abe/api/swagger.yaml index 6a9cd7617d4..9dffbda0b2d 100644 --- a/examples/internal/clients/abe/api/swagger.yaml +++ b/examples/internal/clients/abe/api/swagger.yaml @@ -1699,10 +1699,10 @@ paths: schema: $ref: "#/definitions/rpcStatus" /v1/example/a_bit_of_everything/{uuidName}: - put: + head: tags: - "ABitOfEverythingService" - operationId: "ABitOfEverythingService_Update" + operationId: "ABitOfEverythingService_Exists" parameters: - name: "uuidName" in: "path" @@ -1710,34 +1710,648 @@ paths: type: "string" x-internal: true x-exportParamName: "UuidName" - - in: "body" - name: "body" + - name: "singleNested.name" + in: "query" + description: "name is nested field." + required: false + type: "string" + x-exportParamName: "SingleNestedName" + x-optionalDataType: "String" + - name: "singleNested.amount" + in: "query" + required: false + type: "integer" + format: "int64" + x-exportParamName: "SingleNestedAmount" + x-optionalDataType: "Int64" + - name: "singleNested.ok" + in: "query" + description: "DeepEnum description.\n\n - FALSE: FALSE is false.\n - TRUE:\ + \ TRUE is true." + required: false + type: "string" + default: "FALSE" + enum: + - "FALSE" + - "TRUE" + x-exportParamName: "SingleNestedOk" + x-optionalDataType: "String" + - name: "floatValue" + in: "query" + description: "Float value field" required: true - schema: - $ref: "#/definitions/A bit of everything" - x-exportParamName: "Body" - responses: - 200: - description: "A successful response." - schema: - type: "object" - 403: - description: "Returned when the user does not have permission to access\ - \ the resource." - schema: {} - 404: - description: "Returned when the resource does not exist." - schema: - type: "string" - format: "string" - 418: - description: "I'm a teapot." - schema: - $ref: "#/definitions/examplepbNumericEnum" - 500: - description: "Server error" - schema: - $ref: "#/definitions/examplepbErrorResponse" + type: "number" + default: 0.2 + format: "float" + x-exportParamName: "FloatValue" + - name: "doubleValue" + in: "query" + required: false + type: "number" + format: "double" + x-exportParamName: "DoubleValue" + x-optionalDataType: "Float64" + - name: "int64Value" + in: "query" + required: false + type: "string" + format: "int64" + x-exportParamName: "Int64Value" + x-optionalDataType: "String" + - name: "uint64Value" + in: "query" + required: false + type: "string" + format: "uint64" + x-exportParamName: "Uint64Value" + x-optionalDataType: "String" + - name: "int32Value" + in: "query" + required: false + type: "integer" + format: "int32" + x-exportParamName: "Int32Value" + x-optionalDataType: "Int32" + - name: "fixed64Value" + in: "query" + required: false + type: "string" + format: "uint64" + x-exportParamName: "Fixed64Value" + x-optionalDataType: "String" + - name: "fixed32Value" + in: "query" + required: false + type: "integer" + format: "int64" + x-exportParamName: "Fixed32Value" + x-optionalDataType: "Int64" + - name: "boolValue" + in: "query" + required: false + type: "boolean" + x-exportParamName: "BoolValue" + x-optionalDataType: "Bool" + - name: "stringValue" + in: "query" + required: false + type: "string" + x-exportParamName: "StringValue" + x-optionalDataType: "String" + - name: "bytesValue" + in: "query" + required: false + type: "string" + format: "byte" + x-exportParamName: "BytesValue" + x-optionalDataType: "String" + - name: "uint32Value" + in: "query" + required: false + type: "integer" + format: "int64" + x-exportParamName: "Uint32Value" + x-optionalDataType: "Int64" + - name: "enumValue" + in: "query" + description: " - ZERO: ZERO means 0\n - ONE: ONE means 1" + required: false + type: "string" + default: "ZERO" + enum: + - "ZERO" + - "ONE" + x-exportParamName: "EnumValue" + x-optionalDataType: "String" + - name: "pathEnumValue" + in: "query" + required: false + type: "string" + default: "ABC" + enum: + - "ABC" + - "DEF" + x-exportParamName: "PathEnumValue" + x-optionalDataType: "String" + - name: "nestedPathEnumValue" + in: "query" + required: false + type: "string" + default: "GHI" + enum: + - "GHI" + - "JKL" + x-exportParamName: "NestedPathEnumValue" + x-optionalDataType: "String" + - name: "sfixed32Value" + in: "query" + required: false + type: "integer" + format: "int32" + x-exportParamName: "Sfixed32Value" + x-optionalDataType: "Int32" + - name: "sfixed64Value" + in: "query" + required: false + type: "string" + format: "int64" + x-exportParamName: "Sfixed64Value" + x-optionalDataType: "String" + - name: "sint32Value" + in: "query" + required: false + type: "integer" + format: "int32" + x-exportParamName: "Sint32Value" + x-optionalDataType: "Int32" + - name: "sint64Value" + in: "query" + required: false + type: "string" + format: "int64" + x-exportParamName: "Sint64Value" + x-optionalDataType: "String" + - name: "repeatedStringValue" + in: "query" + required: false + type: "array" + items: + type: "string" + collectionFormat: "multi" + x-exportParamName: "RepeatedStringValue" + - name: "oneofString" + in: "query" + required: false + type: "string" + x-exportParamName: "OneofString" + x-optionalDataType: "String" + - name: "nonConventionalNameValue" + in: "query" + required: false + type: "string" + x-exportParamName: "NonConventionalNameValue" + x-optionalDataType: "String" + - name: "timestampValue" + in: "query" + required: false + type: "string" + format: "date-time" + x-exportParamName: "TimestampValue" + x-optionalDataType: "Time" + - name: "repeatedEnumValue" + in: "query" + description: "repeated enum value. it is comma-separated in query\n\n - ZERO:\ + \ ZERO means 0\n - ONE: ONE means 1" + required: false + type: "array" + items: + type: "string" + enum: + - "ZERO" + - "ONE" + collectionFormat: "multi" + x-exportParamName: "RepeatedEnumValue" + - name: "repeatedEnumAnnotation" + in: "query" + description: "Repeated numeric enum title\n\nRepeated numeric enum description.\n\ + \n - ZERO: ZERO means 0\n - ONE: ONE means 1" + required: false + type: "array" + items: + type: "string" + enum: + - "ZERO" + - "ONE" + collectionFormat: "multi" + x-exportParamName: "RepeatedEnumAnnotation" + - name: "enumValueAnnotation" + in: "query" + description: "Numeric enum title\n\nNumeric enum description.\n\n - ZERO:\ + \ ZERO means 0\n - ONE: ONE means 1" + required: false + type: "string" + default: "ZERO" + enum: + - "ZERO" + - "ONE" + x-exportParamName: "EnumValueAnnotation" + x-optionalDataType: "String" + - name: "repeatedStringAnnotation" + in: "query" + description: "Repeated string title\n\nRepeated string description." + required: false + type: "array" + items: + type: "string" + collectionFormat: "multi" + x-exportParamName: "RepeatedStringAnnotation" + - name: "nestedAnnotation.name" + in: "query" + description: "name is nested field." + required: false + type: "string" + x-exportParamName: "NestedAnnotationName" + x-optionalDataType: "String" + - name: "nestedAnnotation.amount" + in: "query" + required: false + type: "integer" + format: "int64" + x-exportParamName: "NestedAnnotationAmount" + x-optionalDataType: "Int64" + - name: "nestedAnnotation.ok" + in: "query" + description: "DeepEnum description.\n\n - FALSE: FALSE is false.\n - TRUE:\ + \ TRUE is true." + required: false + type: "string" + default: "FALSE" + enum: + - "FALSE" + - "TRUE" + x-exportParamName: "NestedAnnotationOk" + x-optionalDataType: "String" + - name: "int64OverrideType" + in: "query" + required: false + type: "integer" + format: "int64" + x-exportParamName: "Int64OverrideType" + x-optionalDataType: "Int64" + - name: "requiredStringViaFieldBehaviorAnnotation" + in: "query" + description: "mark a field as required in Open API definition" + required: true + type: "string" + x-exportParamName: "RequiredStringViaFieldBehaviorAnnotation" + - name: "outputOnlyStringViaFieldBehaviorAnnotation" + in: "query" + description: "mark a field as readonly in Open API definition" + required: false + type: "string" + x-exportParamName: "OutputOnlyStringViaFieldBehaviorAnnotation" + x-optionalDataType: "String" + - name: "optionalStringValue" + in: "query" + required: false + type: "string" + x-exportParamName: "OptionalStringValue" + x-optionalDataType: "String" + responses: + 200: + description: "A successful response." + schema: + type: "object" + default: + description: "An unexpected error response." + schema: + $ref: "#/definitions/rpcStatus" + put: + tags: + - "ABitOfEverythingService" + operationId: "ABitOfEverythingService_Update" + parameters: + - name: "uuidName" + in: "path" + required: true + type: "string" + x-internal: true + x-exportParamName: "UuidName" + - in: "body" + name: "body" + required: true + schema: + $ref: "#/definitions/A bit of everything" + x-exportParamName: "Body" + responses: + 200: + description: "A successful response." + schema: + type: "object" + 403: + description: "Returned when the user does not have permission to access\ + \ the resource." + schema: {} + 404: + description: "Returned when the resource does not exist." + schema: + type: "string" + format: "string" + 418: + description: "I'm a teapot." + schema: + $ref: "#/definitions/examplepbNumericEnum" + 500: + description: "Server error" + schema: + $ref: "#/definitions/examplepbErrorResponse" + default: + description: "An unexpected error response." + schema: + $ref: "#/definitions/rpcStatus" + options: + tags: + - "ABitOfEverythingService" + operationId: "ABitOfEverythingService_CustomOptionsRequest" + parameters: + - name: "uuidName" + in: "path" + required: true + type: "string" + x-internal: true + x-exportParamName: "UuidName" + - name: "singleNested.name" + in: "query" + description: "name is nested field." + required: false + type: "string" + x-exportParamName: "SingleNestedName" + x-optionalDataType: "String" + - name: "singleNested.amount" + in: "query" + required: false + type: "integer" + format: "int64" + x-exportParamName: "SingleNestedAmount" + x-optionalDataType: "Int64" + - name: "singleNested.ok" + in: "query" + description: "DeepEnum description.\n\n - FALSE: FALSE is false.\n - TRUE:\ + \ TRUE is true." + required: false + type: "string" + default: "FALSE" + enum: + - "FALSE" + - "TRUE" + x-exportParamName: "SingleNestedOk" + x-optionalDataType: "String" + - name: "floatValue" + in: "query" + description: "Float value field" + required: true + type: "number" + default: 0.2 + format: "float" + x-exportParamName: "FloatValue" + - name: "doubleValue" + in: "query" + required: false + type: "number" + format: "double" + x-exportParamName: "DoubleValue" + x-optionalDataType: "Float64" + - name: "int64Value" + in: "query" + required: false + type: "string" + format: "int64" + x-exportParamName: "Int64Value" + x-optionalDataType: "String" + - name: "uint64Value" + in: "query" + required: false + type: "string" + format: "uint64" + x-exportParamName: "Uint64Value" + x-optionalDataType: "String" + - name: "int32Value" + in: "query" + required: false + type: "integer" + format: "int32" + x-exportParamName: "Int32Value" + x-optionalDataType: "Int32" + - name: "fixed64Value" + in: "query" + required: false + type: "string" + format: "uint64" + x-exportParamName: "Fixed64Value" + x-optionalDataType: "String" + - name: "fixed32Value" + in: "query" + required: false + type: "integer" + format: "int64" + x-exportParamName: "Fixed32Value" + x-optionalDataType: "Int64" + - name: "boolValue" + in: "query" + required: false + type: "boolean" + x-exportParamName: "BoolValue" + x-optionalDataType: "Bool" + - name: "stringValue" + in: "query" + required: false + type: "string" + x-exportParamName: "StringValue" + x-optionalDataType: "String" + - name: "bytesValue" + in: "query" + required: false + type: "string" + format: "byte" + x-exportParamName: "BytesValue" + x-optionalDataType: "String" + - name: "uint32Value" + in: "query" + required: false + type: "integer" + format: "int64" + x-exportParamName: "Uint32Value" + x-optionalDataType: "Int64" + - name: "enumValue" + in: "query" + description: " - ZERO: ZERO means 0\n - ONE: ONE means 1" + required: false + type: "string" + default: "ZERO" + enum: + - "ZERO" + - "ONE" + x-exportParamName: "EnumValue" + x-optionalDataType: "String" + - name: "pathEnumValue" + in: "query" + required: false + type: "string" + default: "ABC" + enum: + - "ABC" + - "DEF" + x-exportParamName: "PathEnumValue" + x-optionalDataType: "String" + - name: "nestedPathEnumValue" + in: "query" + required: false + type: "string" + default: "GHI" + enum: + - "GHI" + - "JKL" + x-exportParamName: "NestedPathEnumValue" + x-optionalDataType: "String" + - name: "sfixed32Value" + in: "query" + required: false + type: "integer" + format: "int32" + x-exportParamName: "Sfixed32Value" + x-optionalDataType: "Int32" + - name: "sfixed64Value" + in: "query" + required: false + type: "string" + format: "int64" + x-exportParamName: "Sfixed64Value" + x-optionalDataType: "String" + - name: "sint32Value" + in: "query" + required: false + type: "integer" + format: "int32" + x-exportParamName: "Sint32Value" + x-optionalDataType: "Int32" + - name: "sint64Value" + in: "query" + required: false + type: "string" + format: "int64" + x-exportParamName: "Sint64Value" + x-optionalDataType: "String" + - name: "repeatedStringValue" + in: "query" + required: false + type: "array" + items: + type: "string" + collectionFormat: "multi" + x-exportParamName: "RepeatedStringValue" + - name: "oneofString" + in: "query" + required: false + type: "string" + x-exportParamName: "OneofString" + x-optionalDataType: "String" + - name: "nonConventionalNameValue" + in: "query" + required: false + type: "string" + x-exportParamName: "NonConventionalNameValue" + x-optionalDataType: "String" + - name: "timestampValue" + in: "query" + required: false + type: "string" + format: "date-time" + x-exportParamName: "TimestampValue" + x-optionalDataType: "Time" + - name: "repeatedEnumValue" + in: "query" + description: "repeated enum value. it is comma-separated in query\n\n - ZERO:\ + \ ZERO means 0\n - ONE: ONE means 1" + required: false + type: "array" + items: + type: "string" + enum: + - "ZERO" + - "ONE" + collectionFormat: "multi" + x-exportParamName: "RepeatedEnumValue" + - name: "repeatedEnumAnnotation" + in: "query" + description: "Repeated numeric enum title\n\nRepeated numeric enum description.\n\ + \n - ZERO: ZERO means 0\n - ONE: ONE means 1" + required: false + type: "array" + items: + type: "string" + enum: + - "ZERO" + - "ONE" + collectionFormat: "multi" + x-exportParamName: "RepeatedEnumAnnotation" + - name: "enumValueAnnotation" + in: "query" + description: "Numeric enum title\n\nNumeric enum description.\n\n - ZERO:\ + \ ZERO means 0\n - ONE: ONE means 1" + required: false + type: "string" + default: "ZERO" + enum: + - "ZERO" + - "ONE" + x-exportParamName: "EnumValueAnnotation" + x-optionalDataType: "String" + - name: "repeatedStringAnnotation" + in: "query" + description: "Repeated string title\n\nRepeated string description." + required: false + type: "array" + items: + type: "string" + collectionFormat: "multi" + x-exportParamName: "RepeatedStringAnnotation" + - name: "nestedAnnotation.name" + in: "query" + description: "name is nested field." + required: false + type: "string" + x-exportParamName: "NestedAnnotationName" + x-optionalDataType: "String" + - name: "nestedAnnotation.amount" + in: "query" + required: false + type: "integer" + format: "int64" + x-exportParamName: "NestedAnnotationAmount" + x-optionalDataType: "Int64" + - name: "nestedAnnotation.ok" + in: "query" + description: "DeepEnum description.\n\n - FALSE: FALSE is false.\n - TRUE:\ + \ TRUE is true." + required: false + type: "string" + default: "FALSE" + enum: + - "FALSE" + - "TRUE" + x-exportParamName: "NestedAnnotationOk" + x-optionalDataType: "String" + - name: "int64OverrideType" + in: "query" + required: false + type: "integer" + format: "int64" + x-exportParamName: "Int64OverrideType" + x-optionalDataType: "Int64" + - name: "requiredStringViaFieldBehaviorAnnotation" + in: "query" + description: "mark a field as required in Open API definition" + required: true + type: "string" + x-exportParamName: "RequiredStringViaFieldBehaviorAnnotation" + - name: "outputOnlyStringViaFieldBehaviorAnnotation" + in: "query" + description: "mark a field as readonly in Open API definition" + required: false + type: "string" + x-exportParamName: "OutputOnlyStringViaFieldBehaviorAnnotation" + x-optionalDataType: "String" + - name: "optionalStringValue" + in: "query" + required: false + type: "string" + x-exportParamName: "OptionalStringValue" + x-optionalDataType: "String" + responses: + 200: + description: "A successful response." + schema: + type: "object" default: description: "An unexpected error response." schema: diff --git a/examples/internal/clients/abe/api_a_bit_of_everything_service.go b/examples/internal/clients/abe/api_a_bit_of_everything_service.go index 2ce645d0e08..9e5321d66b7 100644 --- a/examples/internal/clients/abe/api_a_bit_of_everything_service.go +++ b/examples/internal/clients/abe/api_a_bit_of_everything_service.go @@ -2087,26 +2087,475 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceCreateBook(ct return localVarReturnValue, localVarHttpResponse, nil } +/* +ABitOfEverythingServiceApiService + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param uuidName + * @param floatValue Float value field + * @param requiredStringViaFieldBehaviorAnnotation mark a field as required in Open API definition + * @param optional nil or *ABitOfEverythingServiceCustomOptionsRequestOpts - Optional Parameters: + * @param "SingleNestedName" (optional.String) - name is nested field. + * @param "SingleNestedAmount" (optional.Int64) - + * @param "SingleNestedOk" (optional.String) - DeepEnum description. - FALSE: FALSE is false. - TRUE: TRUE is true. + * @param "DoubleValue" (optional.Float64) - + * @param "Int64Value" (optional.String) - + * @param "Uint64Value" (optional.String) - + * @param "Int32Value" (optional.Int32) - + * @param "Fixed64Value" (optional.String) - + * @param "Fixed32Value" (optional.Int64) - + * @param "BoolValue" (optional.Bool) - + * @param "StringValue" (optional.String) - + * @param "BytesValue" (optional.String) - + * @param "Uint32Value" (optional.Int64) - + * @param "EnumValue" (optional.String) - - ZERO: ZERO means 0 - ONE: ONE means 1 + * @param "PathEnumValue" (optional.String) - + * @param "NestedPathEnumValue" (optional.String) - + * @param "Sfixed32Value" (optional.Int32) - + * @param "Sfixed64Value" (optional.String) - + * @param "Sint32Value" (optional.Int32) - + * @param "Sint64Value" (optional.String) - + * @param "RepeatedStringValue" (optional.Interface of []string) - + * @param "OneofString" (optional.String) - + * @param "NonConventionalNameValue" (optional.String) - + * @param "TimestampValue" (optional.Time) - + * @param "RepeatedEnumValue" (optional.Interface of []string) - repeated enum value. it is comma-separated in query - ZERO: ZERO means 0 - ONE: ONE means 1 + * @param "RepeatedEnumAnnotation" (optional.Interface of []string) - Repeated numeric enum title Repeated numeric enum description. - ZERO: ZERO means 0 - ONE: ONE means 1 + * @param "EnumValueAnnotation" (optional.String) - Numeric enum title Numeric enum description. - ZERO: ZERO means 0 - ONE: ONE means 1 + * @param "RepeatedStringAnnotation" (optional.Interface of []string) - Repeated string title Repeated string description. + * @param "NestedAnnotationName" (optional.String) - name is nested field. + * @param "NestedAnnotationAmount" (optional.Int64) - + * @param "NestedAnnotationOk" (optional.String) - DeepEnum description. - FALSE: FALSE is false. - TRUE: TRUE is true. + * @param "Int64OverrideType" (optional.Int64) - + * @param "OutputOnlyStringViaFieldBehaviorAnnotation" (optional.String) - mark a field as readonly in Open API definition + * @param "OptionalStringValue" (optional.String) - + +@return interface{} +*/ + +type ABitOfEverythingServiceCustomOptionsRequestOpts struct { + SingleNestedName optional.String + SingleNestedAmount optional.Int64 + SingleNestedOk optional.String + DoubleValue optional.Float64 + Int64Value optional.String + Uint64Value optional.String + Int32Value optional.Int32 + Fixed64Value optional.String + Fixed32Value optional.Int64 + BoolValue optional.Bool + StringValue optional.String + BytesValue optional.String + Uint32Value optional.Int64 + EnumValue optional.String + PathEnumValue optional.String + NestedPathEnumValue optional.String + Sfixed32Value optional.Int32 + Sfixed64Value optional.String + Sint32Value optional.Int32 + Sint64Value optional.String + RepeatedStringValue optional.Interface + OneofString optional.String + NonConventionalNameValue optional.String + TimestampValue optional.Time + RepeatedEnumValue optional.Interface + RepeatedEnumAnnotation optional.Interface + EnumValueAnnotation optional.String + RepeatedStringAnnotation optional.Interface + NestedAnnotationName optional.String + NestedAnnotationAmount optional.Int64 + NestedAnnotationOk optional.String + Int64OverrideType optional.Int64 + OutputOnlyStringViaFieldBehaviorAnnotation optional.String + OptionalStringValue optional.String +} + +func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceCustomOptionsRequest(ctx context.Context, uuidName string, floatValue float32, requiredStringViaFieldBehaviorAnnotation string, localVarOptionals *ABitOfEverythingServiceCustomOptionsRequestOpts) (interface{}, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Options") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue interface{} + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v1/example/a_bit_of_everything/{uuidName}" + localVarPath = strings.Replace(localVarPath, "{"+"uuidName"+"}", fmt.Sprintf("%v", uuidName), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if localVarOptionals != nil && localVarOptionals.SingleNestedName.IsSet() { + localVarQueryParams.Add("singleNested.name", parameterToString(localVarOptionals.SingleNestedName.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.SingleNestedAmount.IsSet() { + localVarQueryParams.Add("singleNested.amount", parameterToString(localVarOptionals.SingleNestedAmount.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.SingleNestedOk.IsSet() { + localVarQueryParams.Add("singleNested.ok", parameterToString(localVarOptionals.SingleNestedOk.Value(), "")) + } + localVarQueryParams.Add("floatValue", parameterToString(floatValue, "")) + if localVarOptionals != nil && localVarOptionals.DoubleValue.IsSet() { + localVarQueryParams.Add("doubleValue", parameterToString(localVarOptionals.DoubleValue.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Int64Value.IsSet() { + localVarQueryParams.Add("int64Value", parameterToString(localVarOptionals.Int64Value.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Uint64Value.IsSet() { + localVarQueryParams.Add("uint64Value", parameterToString(localVarOptionals.Uint64Value.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Int32Value.IsSet() { + localVarQueryParams.Add("int32Value", parameterToString(localVarOptionals.Int32Value.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Fixed64Value.IsSet() { + localVarQueryParams.Add("fixed64Value", parameterToString(localVarOptionals.Fixed64Value.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Fixed32Value.IsSet() { + localVarQueryParams.Add("fixed32Value", parameterToString(localVarOptionals.Fixed32Value.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.BoolValue.IsSet() { + localVarQueryParams.Add("boolValue", parameterToString(localVarOptionals.BoolValue.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.StringValue.IsSet() { + localVarQueryParams.Add("stringValue", parameterToString(localVarOptionals.StringValue.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.BytesValue.IsSet() { + localVarQueryParams.Add("bytesValue", parameterToString(localVarOptionals.BytesValue.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Uint32Value.IsSet() { + localVarQueryParams.Add("uint32Value", parameterToString(localVarOptionals.Uint32Value.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.EnumValue.IsSet() { + localVarQueryParams.Add("enumValue", parameterToString(localVarOptionals.EnumValue.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.PathEnumValue.IsSet() { + localVarQueryParams.Add("pathEnumValue", parameterToString(localVarOptionals.PathEnumValue.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.NestedPathEnumValue.IsSet() { + localVarQueryParams.Add("nestedPathEnumValue", parameterToString(localVarOptionals.NestedPathEnumValue.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Sfixed32Value.IsSet() { + localVarQueryParams.Add("sfixed32Value", parameterToString(localVarOptionals.Sfixed32Value.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Sfixed64Value.IsSet() { + localVarQueryParams.Add("sfixed64Value", parameterToString(localVarOptionals.Sfixed64Value.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Sint32Value.IsSet() { + localVarQueryParams.Add("sint32Value", parameterToString(localVarOptionals.Sint32Value.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Sint64Value.IsSet() { + localVarQueryParams.Add("sint64Value", parameterToString(localVarOptionals.Sint64Value.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.RepeatedStringValue.IsSet() { + localVarQueryParams.Add("repeatedStringValue", parameterToString(localVarOptionals.RepeatedStringValue.Value(), "multi")) + } + if localVarOptionals != nil && localVarOptionals.OneofString.IsSet() { + localVarQueryParams.Add("oneofString", parameterToString(localVarOptionals.OneofString.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.NonConventionalNameValue.IsSet() { + localVarQueryParams.Add("nonConventionalNameValue", parameterToString(localVarOptionals.NonConventionalNameValue.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.TimestampValue.IsSet() { + localVarQueryParams.Add("timestampValue", parameterToString(localVarOptionals.TimestampValue.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.RepeatedEnumValue.IsSet() { + localVarQueryParams.Add("repeatedEnumValue", parameterToString(localVarOptionals.RepeatedEnumValue.Value(), "multi")) + } + if localVarOptionals != nil && localVarOptionals.RepeatedEnumAnnotation.IsSet() { + localVarQueryParams.Add("repeatedEnumAnnotation", parameterToString(localVarOptionals.RepeatedEnumAnnotation.Value(), "multi")) + } + if localVarOptionals != nil && localVarOptionals.EnumValueAnnotation.IsSet() { + localVarQueryParams.Add("enumValueAnnotation", parameterToString(localVarOptionals.EnumValueAnnotation.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.RepeatedStringAnnotation.IsSet() { + localVarQueryParams.Add("repeatedStringAnnotation", parameterToString(localVarOptionals.RepeatedStringAnnotation.Value(), "multi")) + } + if localVarOptionals != nil && localVarOptionals.NestedAnnotationName.IsSet() { + localVarQueryParams.Add("nestedAnnotation.name", parameterToString(localVarOptionals.NestedAnnotationName.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.NestedAnnotationAmount.IsSet() { + localVarQueryParams.Add("nestedAnnotation.amount", parameterToString(localVarOptionals.NestedAnnotationAmount.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.NestedAnnotationOk.IsSet() { + localVarQueryParams.Add("nestedAnnotation.ok", parameterToString(localVarOptionals.NestedAnnotationOk.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Int64OverrideType.IsSet() { + localVarQueryParams.Add("int64OverrideType", parameterToString(localVarOptionals.Int64OverrideType.Value(), "")) + } + localVarQueryParams.Add("requiredStringViaFieldBehaviorAnnotation", parameterToString(requiredStringViaFieldBehaviorAnnotation, "")) + if localVarOptionals != nil && localVarOptionals.OutputOnlyStringViaFieldBehaviorAnnotation.IsSet() { + localVarQueryParams.Add("outputOnlyStringViaFieldBehaviorAnnotation", parameterToString(localVarOptionals.OutputOnlyStringViaFieldBehaviorAnnotation.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.OptionalStringValue.IsSet() { + localVarQueryParams.Add("optionalStringValue", parameterToString(localVarOptionals.OptionalStringValue.Value(), "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json", "application/x-foo-mime"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json", "application/x-foo-mime"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["X-API-Key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v interface{} + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 0 { + var v RpcStatus + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + /* ABitOfEverythingServiceApiService * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param singleNestedName name is nested field. * @param body -@return ExamplepbABitOfEverything +@return ExamplepbABitOfEverything +*/ +func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceDeepPathEcho(ctx context.Context, singleNestedName string, body ABitOfEverything1) (ExamplepbABitOfEverything, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ExamplepbABitOfEverything + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v1/example/deep_path/{singleNested.name}" + localVarPath = strings.Replace(localVarPath, "{"+"singleNested.name"+"}", fmt.Sprintf("%v", singleNestedName), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json", "application/x-foo-mime"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json", "application/x-foo-mime"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &body + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["X-API-Key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v ExamplepbABitOfEverything + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 403 { + var v interface{} + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 404 { + var v string + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 418 { + var v ExamplepbNumericEnum + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 500 { + var v ExamplepbErrorResponse + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 0 { + var v RpcStatus + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +ABitOfEverythingServiceApiService + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param uuid + +@return interface{} */ -func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceDeepPathEcho(ctx context.Context, singleNestedName string, body ABitOfEverything1) (ExamplepbABitOfEverything, *http.Response, error) { +func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceDelete(ctx context.Context, uuid string) (interface{}, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") + localVarHttpMethod = strings.ToUpper("Delete") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - localVarReturnValue ExamplepbABitOfEverything + localVarReturnValue interface{} ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/v1/example/deep_path/{singleNested.name}" - localVarPath = strings.Replace(localVarPath, "{"+"singleNested.name"+"}", fmt.Sprintf("%v", singleNestedName), -1) + localVarPath := a.client.cfg.BasePath + "/v1/example/a_bit_of_everything/{uuid}" + localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", fmt.Sprintf("%v", uuid), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2129,8 +2578,6 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceDeepPathEcho( if localVarHttpHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } - // body params - localVarPostBody = &body if ctx != nil { // API Key Authentication if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { @@ -2175,7 +2622,7 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceDeepPathEcho( } if localVarHttpResponse.StatusCode == 200 { - var v ExamplepbABitOfEverything + var v interface{} err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); if err != nil { newErr.error = err.Error() @@ -2249,13 +2696,12 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceDeepPathEcho( /* ABitOfEverythingServiceApiService * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param uuid @return interface{} */ -func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceDelete(ctx context.Context, uuid string) (interface{}, *http.Response, error) { +func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceErrorWithDetails(ctx context.Context) (interface{}, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Delete") + localVarHttpMethod = strings.ToUpper("Get") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte @@ -2263,8 +2709,7 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceDelete(ctx co ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/v1/example/a_bit_of_everything/{uuid}" - localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", fmt.Sprintf("%v", uuid), -1) + localVarPath := a.client.cfg.BasePath + "/v2/example/errorwithdetails" localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2405,12 +2850,88 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceDelete(ctx co /* ABitOfEverythingServiceApiService * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param uuidName + * @param floatValue Float value field + * @param requiredStringViaFieldBehaviorAnnotation mark a field as required in Open API definition + * @param optional nil or *ABitOfEverythingServiceExistsOpts - Optional Parameters: + * @param "SingleNestedName" (optional.String) - name is nested field. + * @param "SingleNestedAmount" (optional.Int64) - + * @param "SingleNestedOk" (optional.String) - DeepEnum description. - FALSE: FALSE is false. - TRUE: TRUE is true. + * @param "DoubleValue" (optional.Float64) - + * @param "Int64Value" (optional.String) - + * @param "Uint64Value" (optional.String) - + * @param "Int32Value" (optional.Int32) - + * @param "Fixed64Value" (optional.String) - + * @param "Fixed32Value" (optional.Int64) - + * @param "BoolValue" (optional.Bool) - + * @param "StringValue" (optional.String) - + * @param "BytesValue" (optional.String) - + * @param "Uint32Value" (optional.Int64) - + * @param "EnumValue" (optional.String) - - ZERO: ZERO means 0 - ONE: ONE means 1 + * @param "PathEnumValue" (optional.String) - + * @param "NestedPathEnumValue" (optional.String) - + * @param "Sfixed32Value" (optional.Int32) - + * @param "Sfixed64Value" (optional.String) - + * @param "Sint32Value" (optional.Int32) - + * @param "Sint64Value" (optional.String) - + * @param "RepeatedStringValue" (optional.Interface of []string) - + * @param "OneofString" (optional.String) - + * @param "NonConventionalNameValue" (optional.String) - + * @param "TimestampValue" (optional.Time) - + * @param "RepeatedEnumValue" (optional.Interface of []string) - repeated enum value. it is comma-separated in query - ZERO: ZERO means 0 - ONE: ONE means 1 + * @param "RepeatedEnumAnnotation" (optional.Interface of []string) - Repeated numeric enum title Repeated numeric enum description. - ZERO: ZERO means 0 - ONE: ONE means 1 + * @param "EnumValueAnnotation" (optional.String) - Numeric enum title Numeric enum description. - ZERO: ZERO means 0 - ONE: ONE means 1 + * @param "RepeatedStringAnnotation" (optional.Interface of []string) - Repeated string title Repeated string description. + * @param "NestedAnnotationName" (optional.String) - name is nested field. + * @param "NestedAnnotationAmount" (optional.Int64) - + * @param "NestedAnnotationOk" (optional.String) - DeepEnum description. - FALSE: FALSE is false. - TRUE: TRUE is true. + * @param "Int64OverrideType" (optional.Int64) - + * @param "OutputOnlyStringViaFieldBehaviorAnnotation" (optional.String) - mark a field as readonly in Open API definition + * @param "OptionalStringValue" (optional.String) - @return interface{} */ -func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceErrorWithDetails(ctx context.Context) (interface{}, *http.Response, error) { + +type ABitOfEverythingServiceExistsOpts struct { + SingleNestedName optional.String + SingleNestedAmount optional.Int64 + SingleNestedOk optional.String + DoubleValue optional.Float64 + Int64Value optional.String + Uint64Value optional.String + Int32Value optional.Int32 + Fixed64Value optional.String + Fixed32Value optional.Int64 + BoolValue optional.Bool + StringValue optional.String + BytesValue optional.String + Uint32Value optional.Int64 + EnumValue optional.String + PathEnumValue optional.String + NestedPathEnumValue optional.String + Sfixed32Value optional.Int32 + Sfixed64Value optional.String + Sint32Value optional.Int32 + Sint64Value optional.String + RepeatedStringValue optional.Interface + OneofString optional.String + NonConventionalNameValue optional.String + TimestampValue optional.Time + RepeatedEnumValue optional.Interface + RepeatedEnumAnnotation optional.Interface + EnumValueAnnotation optional.String + RepeatedStringAnnotation optional.Interface + NestedAnnotationName optional.String + NestedAnnotationAmount optional.Int64 + NestedAnnotationOk optional.String + Int64OverrideType optional.Int64 + OutputOnlyStringViaFieldBehaviorAnnotation optional.String + OptionalStringValue optional.String +} + +func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceExists(ctx context.Context, uuidName string, floatValue float32, requiredStringViaFieldBehaviorAnnotation string, localVarOptionals *ABitOfEverythingServiceExistsOpts) (interface{}, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") + localVarHttpMethod = strings.ToUpper("Head") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte @@ -2418,12 +2939,117 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceErrorWithDeta ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/v2/example/errorwithdetails" + localVarPath := a.client.cfg.BasePath + "/v1/example/a_bit_of_everything/{uuidName}" + localVarPath = strings.Replace(localVarPath, "{"+"uuidName"+"}", fmt.Sprintf("%v", uuidName), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} + if localVarOptionals != nil && localVarOptionals.SingleNestedName.IsSet() { + localVarQueryParams.Add("singleNested.name", parameterToString(localVarOptionals.SingleNestedName.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.SingleNestedAmount.IsSet() { + localVarQueryParams.Add("singleNested.amount", parameterToString(localVarOptionals.SingleNestedAmount.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.SingleNestedOk.IsSet() { + localVarQueryParams.Add("singleNested.ok", parameterToString(localVarOptionals.SingleNestedOk.Value(), "")) + } + localVarQueryParams.Add("floatValue", parameterToString(floatValue, "")) + if localVarOptionals != nil && localVarOptionals.DoubleValue.IsSet() { + localVarQueryParams.Add("doubleValue", parameterToString(localVarOptionals.DoubleValue.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Int64Value.IsSet() { + localVarQueryParams.Add("int64Value", parameterToString(localVarOptionals.Int64Value.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Uint64Value.IsSet() { + localVarQueryParams.Add("uint64Value", parameterToString(localVarOptionals.Uint64Value.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Int32Value.IsSet() { + localVarQueryParams.Add("int32Value", parameterToString(localVarOptionals.Int32Value.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Fixed64Value.IsSet() { + localVarQueryParams.Add("fixed64Value", parameterToString(localVarOptionals.Fixed64Value.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Fixed32Value.IsSet() { + localVarQueryParams.Add("fixed32Value", parameterToString(localVarOptionals.Fixed32Value.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.BoolValue.IsSet() { + localVarQueryParams.Add("boolValue", parameterToString(localVarOptionals.BoolValue.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.StringValue.IsSet() { + localVarQueryParams.Add("stringValue", parameterToString(localVarOptionals.StringValue.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.BytesValue.IsSet() { + localVarQueryParams.Add("bytesValue", parameterToString(localVarOptionals.BytesValue.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Uint32Value.IsSet() { + localVarQueryParams.Add("uint32Value", parameterToString(localVarOptionals.Uint32Value.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.EnumValue.IsSet() { + localVarQueryParams.Add("enumValue", parameterToString(localVarOptionals.EnumValue.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.PathEnumValue.IsSet() { + localVarQueryParams.Add("pathEnumValue", parameterToString(localVarOptionals.PathEnumValue.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.NestedPathEnumValue.IsSet() { + localVarQueryParams.Add("nestedPathEnumValue", parameterToString(localVarOptionals.NestedPathEnumValue.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Sfixed32Value.IsSet() { + localVarQueryParams.Add("sfixed32Value", parameterToString(localVarOptionals.Sfixed32Value.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Sfixed64Value.IsSet() { + localVarQueryParams.Add("sfixed64Value", parameterToString(localVarOptionals.Sfixed64Value.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Sint32Value.IsSet() { + localVarQueryParams.Add("sint32Value", parameterToString(localVarOptionals.Sint32Value.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Sint64Value.IsSet() { + localVarQueryParams.Add("sint64Value", parameterToString(localVarOptionals.Sint64Value.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.RepeatedStringValue.IsSet() { + localVarQueryParams.Add("repeatedStringValue", parameterToString(localVarOptionals.RepeatedStringValue.Value(), "multi")) + } + if localVarOptionals != nil && localVarOptionals.OneofString.IsSet() { + localVarQueryParams.Add("oneofString", parameterToString(localVarOptionals.OneofString.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.NonConventionalNameValue.IsSet() { + localVarQueryParams.Add("nonConventionalNameValue", parameterToString(localVarOptionals.NonConventionalNameValue.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.TimestampValue.IsSet() { + localVarQueryParams.Add("timestampValue", parameterToString(localVarOptionals.TimestampValue.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.RepeatedEnumValue.IsSet() { + localVarQueryParams.Add("repeatedEnumValue", parameterToString(localVarOptionals.RepeatedEnumValue.Value(), "multi")) + } + if localVarOptionals != nil && localVarOptionals.RepeatedEnumAnnotation.IsSet() { + localVarQueryParams.Add("repeatedEnumAnnotation", parameterToString(localVarOptionals.RepeatedEnumAnnotation.Value(), "multi")) + } + if localVarOptionals != nil && localVarOptionals.EnumValueAnnotation.IsSet() { + localVarQueryParams.Add("enumValueAnnotation", parameterToString(localVarOptionals.EnumValueAnnotation.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.RepeatedStringAnnotation.IsSet() { + localVarQueryParams.Add("repeatedStringAnnotation", parameterToString(localVarOptionals.RepeatedStringAnnotation.Value(), "multi")) + } + if localVarOptionals != nil && localVarOptionals.NestedAnnotationName.IsSet() { + localVarQueryParams.Add("nestedAnnotation.name", parameterToString(localVarOptionals.NestedAnnotationName.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.NestedAnnotationAmount.IsSet() { + localVarQueryParams.Add("nestedAnnotation.amount", parameterToString(localVarOptionals.NestedAnnotationAmount.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.NestedAnnotationOk.IsSet() { + localVarQueryParams.Add("nestedAnnotation.ok", parameterToString(localVarOptionals.NestedAnnotationOk.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Int64OverrideType.IsSet() { + localVarQueryParams.Add("int64OverrideType", parameterToString(localVarOptionals.Int64OverrideType.Value(), "")) + } + localVarQueryParams.Add("requiredStringViaFieldBehaviorAnnotation", parameterToString(requiredStringViaFieldBehaviorAnnotation, "")) + if localVarOptionals != nil && localVarOptionals.OutputOnlyStringViaFieldBehaviorAnnotation.IsSet() { + localVarQueryParams.Add("outputOnlyStringViaFieldBehaviorAnnotation", parameterToString(localVarOptionals.OutputOnlyStringViaFieldBehaviorAnnotation.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.OptionalStringValue.IsSet() { + localVarQueryParams.Add("optionalStringValue", parameterToString(localVarOptionals.OptionalStringValue.Value(), "")) + } // to determine the Content-Type header localVarHttpContentTypes := []string{"application/json", "application/x-foo-mime"} @@ -2495,50 +3121,6 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceErrorWithDeta return localVarReturnValue, localVarHttpResponse, newErr } - if localVarHttpResponse.StatusCode == 403 { - var v interface{} - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr - } - - if localVarHttpResponse.StatusCode == 404 { - var v string - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr - } - - if localVarHttpResponse.StatusCode == 418 { - var v ExamplepbNumericEnum - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr - } - - if localVarHttpResponse.StatusCode == 500 { - var v ExamplepbErrorResponse - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr - } - if localVarHttpResponse.StatusCode == 0 { var v RpcStatus err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); diff --git a/examples/internal/proto/examplepb/a_bit_of_everything.pb.go b/examples/internal/proto/examplepb/a_bit_of_everything.pb.go index 22b3a2f2701..a188ba5f129 100644 --- a/examples/internal/proto/examplepb/a_bit_of_everything.pb.go +++ b/examples/internal/proto/examplepb/a_bit_of_everything.pb.go @@ -1740,7 +1740,7 @@ var file_examples_internal_proto_examplepb_a_bit_of_everything_proto_rawDesc = [ 0x08, 0x52, 0x0c, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x2a, 0x20, 0x0a, 0x0b, 0x4e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x08, 0x0a, 0x04, 0x5a, 0x45, 0x52, 0x4f, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x4f, 0x4e, 0x45, 0x10, - 0x01, 0x32, 0xa0, 0x2c, 0x0a, 0x17, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, + 0x01, 0x32, 0xb9, 0x30, 0x0a, 0x17, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x8c, 0x04, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x40, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, @@ -2082,130 +2082,164 @@ var file_examples_internal_proto_examplepb_a_bit_of_everything_proto_rawDesc = [ 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x1a, 0xbf, 0x01, 0x92, 0x41, 0xbb, 0x01, 0x12, 0x66, 0x41, 0x42, 0x69, 0x74, 0x4f, - 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x20, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x2d, - 0x2d, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x6e, - 0x6f, 0x74, 0x20, 0x62, 0x65, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x70, 0x6c, - 0x61, 0x63, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, - 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, - 0x21, 0x1a, 0x51, 0x0a, 0x1f, 0x46, 0x69, 0x6e, 0x64, 0x20, 0x6f, 0x75, 0x74, 0x20, 0x6d, 0x6f, - 0x72, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x75, 0x74, 0x20, 0x45, 0x63, 0x68, 0x6f, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x65, 0x63, - 0x6f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x67, 0x61, 0x74, - 0x65, 0x77, 0x61, 0x79, 0x32, 0x6a, 0x0a, 0x14, 0x63, 0x61, 0x6d, 0x65, 0x6c, 0x43, 0x61, 0x73, - 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x52, 0x0a, 0x05, - 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, - 0x76, 0x32, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, - 0x32, 0x5e, 0x0a, 0x1c, 0x41, 0x6e, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x57, 0x69, 0x74, 0x68, 0x4e, 0x6f, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, - 0x12, 0x3e, 0x0a, 0x0a, 0x4e, 0x6f, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x16, + 0x75, 0x73, 0x12, 0x9a, 0x01, 0x0a, 0x06, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x12, 0x40, 0x2e, + 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x65, 0x78, 0x61, + 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x41, + 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x1a, + 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x36, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x42, + 0x2e, 0x0a, 0x04, 0x48, 0x45, 0x41, 0x44, 0x12, 0x26, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, + 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x61, 0x5f, 0x62, 0x69, 0x74, 0x5f, 0x6f, 0x66, 0x5f, 0x65, 0x76, + 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x7b, 0x75, 0x75, 0x69, 0x64, 0x7d, 0x12, + 0xab, 0x01, 0x0a, 0x14, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, + 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, + 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, + 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x22, 0x39, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x33, 0x42, 0x31, 0x0a, 0x07, 0x4f, 0x50, + 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x12, 0x26, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, + 0x6c, 0x65, 0x2f, 0x61, 0x5f, 0x62, 0x69, 0x74, 0x5f, 0x6f, 0x66, 0x5f, 0x65, 0x76, 0x65, 0x72, + 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x7b, 0x75, 0x75, 0x69, 0x64, 0x7d, 0x12, 0xcb, 0x01, + 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, + 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x65, 0x78, + 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x2e, + 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, + 0x1a, 0x40, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, + 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, + 0x62, 0x2e, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, + 0x6e, 0x67, 0x22, 0x37, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x42, 0x2f, 0x0a, 0x05, 0x54, 0x52, + 0x41, 0x43, 0x45, 0x12, 0x26, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, + 0x2f, 0x61, 0x5f, 0x62, 0x69, 0x74, 0x5f, 0x6f, 0x66, 0x5f, 0x65, 0x76, 0x65, 0x72, 0x79, 0x74, + 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x7b, 0x75, 0x75, 0x69, 0x64, 0x7d, 0x1a, 0xbf, 0x01, 0x92, 0x41, + 0xbb, 0x01, 0x12, 0x66, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, + 0x68, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x2d, 0x2d, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, + 0x20, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x62, 0x65, 0x20, 0x75, + 0x73, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x20, 0x6f, 0x66, 0x20, + 0x74, 0x68, 0x65, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x21, 0x1a, 0x51, 0x0a, 0x1f, 0x46, 0x69, + 0x6e, 0x64, 0x20, 0x6f, 0x75, 0x74, 0x20, 0x6d, 0x6f, 0x72, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x75, + 0x74, 0x20, 0x45, 0x63, 0x68, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x2e, 0x68, + 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x65, 0x63, 0x6f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, + 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x32, 0x6a, 0x0a, + 0x14, 0x63, 0x61, 0x6d, 0x65, 0x6c, 0x43, 0x61, 0x73, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x52, 0x0a, 0x05, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, - 0x42, 0xa1, 0x0c, 0x5a, 0x4b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x67, 0x72, 0x70, 0x63, 0x2d, 0x65, 0x63, 0x6f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2f, 0x67, - 0x72, 0x70, 0x63, 0x2d, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2f, 0x76, 0x32, 0x2f, 0x65, - 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, - 0x92, 0x41, 0xd0, 0x0b, 0x12, 0xf6, 0x01, 0x0a, 0x13, 0x41, 0x20, 0x42, 0x69, 0x74, 0x20, 0x6f, - 0x66, 0x20, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x22, 0x58, 0x0a, 0x14, - 0x67, 0x52, 0x50, 0x43, 0x2d, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x20, 0x70, 0x72, 0x6f, - 0x6a, 0x65, 0x63, 0x74, 0x12, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x19, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x76, 0x32, 0x2f, 0x65, 0x78, 0x61, 0x6d, + 0x70, 0x6c, 0x65, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x32, 0x5e, 0x0a, 0x1c, 0x41, 0x6e, 0x6f, + 0x74, 0x68, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x57, 0x69, 0x74, 0x68, 0x4e, + 0x6f, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3e, 0x0a, 0x0a, 0x4e, 0x6f, 0x42, + 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, + 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x42, 0xa1, 0x0c, 0x5a, 0x4b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x65, 0x63, 0x6f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x67, 0x61, 0x74, - 0x65, 0x77, 0x61, 0x79, 0x1a, 0x10, 0x6e, 0x6f, 0x6e, 0x65, 0x40, 0x65, 0x78, 0x61, 0x6d, 0x70, - 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2a, 0x5e, 0x0a, 0x14, 0x42, 0x53, 0x44, 0x20, 0x33, 0x2d, - 0x43, 0x6c, 0x61, 0x75, 0x73, 0x65, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x12, 0x46, - 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x65, 0x63, 0x6f, 0x73, 0x79, 0x73, 0x74, 0x65, - 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2f, 0x62, - 0x6c, 0x6f, 0x62, 0x2f, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x4c, 0x49, 0x43, 0x45, 0x4e, - 0x53, 0x45, 0x2e, 0x74, 0x78, 0x74, 0x32, 0x03, 0x31, 0x2e, 0x30, 0x3a, 0x20, 0x0a, 0x15, 0x78, - 0x2d, 0x73, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2d, 0x73, 0x6f, 0x6d, 0x65, 0x74, - 0x68, 0x69, 0x6e, 0x67, 0x12, 0x07, 0x1a, 0x05, 0x79, 0x61, 0x64, 0x64, 0x61, 0x2a, 0x03, 0x01, - 0x02, 0x04, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, - 0x6a, 0x73, 0x6f, 0x6e, 0x32, 0x16, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x2f, 0x78, 0x2d, 0x66, 0x6f, 0x6f, 0x2d, 0x6d, 0x69, 0x6d, 0x65, 0x3a, 0x10, 0x61, 0x70, - 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x16, - 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x66, 0x6f, - 0x6f, 0x2d, 0x6d, 0x69, 0x6d, 0x65, 0x52, 0x50, 0x0a, 0x03, 0x34, 0x30, 0x33, 0x12, 0x49, 0x0a, - 0x47, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, - 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, - 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x20, 0x74, 0x6f, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x3b, 0x0a, 0x03, 0x34, 0x30, 0x34, 0x12, - 0x34, 0x0a, 0x2a, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, - 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x64, 0x6f, - 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x2e, 0x12, 0x06, 0x0a, - 0x04, 0x9a, 0x02, 0x01, 0x07, 0x52, 0x57, 0x0a, 0x03, 0x34, 0x31, 0x38, 0x12, 0x50, 0x0a, 0x0d, - 0x49, 0x27, 0x6d, 0x20, 0x61, 0x20, 0x74, 0x65, 0x61, 0x70, 0x6f, 0x74, 0x2e, 0x12, 0x3f, 0x0a, - 0x3d, 0x1a, 0x3b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, - 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, - 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, - 0x70, 0x62, 0x2e, 0x4e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x9b, - 0x02, 0x0a, 0x03, 0x35, 0x30, 0x30, 0x12, 0x93, 0x02, 0x0a, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x41, 0x0a, 0x3f, 0x1a, 0x3d, 0x2e, 0x67, 0x72, - 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, - 0x6c, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x45, 0x72, 0x72, - 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0xbf, 0x01, 0x0a, 0x10, 0x58, - 0x2d, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x49, 0x64, 0x12, - 0xaa, 0x01, 0x0a, 0x2b, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x20, 0x65, 0x76, 0x65, 0x6e, 0x74, - 0x20, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x20, 0x66, 0x6f, 0x72, 0x20, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, - 0x06, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x1a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x32, 0x26, 0x22, - 0x32, 0x34, 0x33, 0x38, 0x61, 0x63, 0x33, 0x63, 0x2d, 0x33, 0x37, 0x65, 0x62, 0x2d, 0x34, 0x39, - 0x30, 0x32, 0x2d, 0x61, 0x64, 0x65, 0x66, 0x2d, 0x65, 0x64, 0x31, 0x36, 0x62, 0x34, 0x34, 0x33, - 0x31, 0x30, 0x33, 0x30, 0x22, 0x6a, 0x45, 0x5e, 0x5b, 0x30, 0x2d, 0x39, 0x41, 0x2d, 0x46, 0x5d, - 0x7b, 0x38, 0x7d, 0x2d, 0x5b, 0x30, 0x2d, 0x39, 0x41, 0x2d, 0x46, 0x5d, 0x7b, 0x34, 0x7d, 0x2d, - 0x34, 0x5b, 0x30, 0x2d, 0x39, 0x41, 0x2d, 0x46, 0x5d, 0x7b, 0x33, 0x7d, 0x2d, 0x5b, 0x38, 0x39, - 0x41, 0x42, 0x5d, 0x5b, 0x30, 0x2d, 0x39, 0x41, 0x2d, 0x46, 0x5d, 0x7b, 0x33, 0x7d, 0x2d, 0x5b, - 0x30, 0x2d, 0x39, 0x41, 0x2d, 0x46, 0x5d, 0x7b, 0x31, 0x32, 0x7d, 0x24, 0x5a, 0x97, 0x03, 0x0a, - 0xaa, 0x01, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x9b, - 0x01, 0x08, 0x02, 0x1a, 0x09, 0x58, 0x2d, 0x41, 0x50, 0x49, 0x2d, 0x4b, 0x65, 0x79, 0x20, 0x02, - 0x4a, 0x60, 0x0a, 0x1e, 0x78, 0x2d, 0x61, 0x6d, 0x61, 0x7a, 0x6f, 0x6e, 0x2d, 0x61, 0x70, 0x69, - 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2d, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, - 0x65, 0x72, 0x12, 0x3e, 0x2a, 0x3c, 0x0a, 0x29, 0x0a, 0x1c, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x7a, 0x65, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x54, 0x74, 0x6c, 0x49, 0x6e, 0x53, - 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x12, 0x09, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4e, - 0x40, 0x0a, 0x0f, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x07, 0x1a, 0x05, 0x74, 0x6f, 0x6b, - 0x65, 0x6e, 0x4a, 0x28, 0x0a, 0x1c, 0x78, 0x2d, 0x61, 0x6d, 0x61, 0x7a, 0x6f, 0x6e, 0x2d, 0x61, - 0x70, 0x69, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2d, 0x61, 0x75, 0x74, 0x68, 0x74, 0x79, - 0x70, 0x65, 0x12, 0x08, 0x1a, 0x06, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x0a, 0x0f, 0x0a, 0x09, - 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, 0x02, 0x08, 0x01, 0x0a, 0xd6, 0x01, - 0x0a, 0x06, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x32, 0x12, 0xcb, 0x01, 0x08, 0x03, 0x28, 0x04, 0x32, - 0x23, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x6f, - 0x72, 0x69, 0x7a, 0x65, 0x3a, 0x1f, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x65, 0x78, - 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x2f, - 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x7f, 0x0a, 0x43, 0x0a, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, - 0x12, 0x3a, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x20, 0x72, 0x65, 0x61, 0x64, 0x20, 0x61, 0x6e, - 0x64, 0x20, 0x77, 0x72, 0x69, 0x74, 0x65, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x20, 0x74, - 0x6f, 0x20, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x76, 0x65, - 0x20, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x1a, 0x0a, 0x04, - 0x72, 0x65, 0x61, 0x64, 0x12, 0x12, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x20, 0x72, 0x65, 0x61, - 0x64, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x0a, 0x1c, 0x0a, 0x05, 0x77, 0x72, 0x69, 0x74, - 0x65, 0x12, 0x13, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x20, 0x77, 0x72, 0x69, 0x74, 0x65, 0x20, - 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x62, 0x1f, 0x0a, 0x0e, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, - 0x65, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x0a, 0x0d, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, - 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x62, 0x29, 0x0a, 0x0e, 0x0a, 0x0a, 0x41, 0x70, 0x69, - 0x4b, 0x65, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x0a, 0x17, 0x0a, 0x06, 0x4f, 0x41, 0x75, - 0x74, 0x68, 0x32, 0x12, 0x0d, 0x0a, 0x04, 0x72, 0x65, 0x61, 0x64, 0x0a, 0x05, 0x77, 0x72, 0x69, - 0x74, 0x65, 0x72, 0x49, 0x0a, 0x17, 0x4d, 0x6f, 0x72, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x75, 0x74, - 0x20, 0x67, 0x52, 0x50, 0x43, 0x2d, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x12, 0x2e, 0x68, + 0x65, 0x77, 0x61, 0x79, 0x2f, 0x76, 0x32, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, + 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, + 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x92, 0x41, 0xd0, 0x0b, 0x12, 0xf6, 0x01, + 0x0a, 0x13, 0x41, 0x20, 0x42, 0x69, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x45, 0x76, 0x65, 0x72, 0x79, + 0x74, 0x68, 0x69, 0x6e, 0x67, 0x22, 0x58, 0x0a, 0x14, 0x67, 0x52, 0x50, 0x43, 0x2d, 0x47, 0x61, + 0x74, 0x65, 0x77, 0x61, 0x79, 0x20, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x65, 0x63, 0x6f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, - 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x7a, 0x28, 0x0a, - 0x17, 0x78, 0x2d, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2d, - 0x62, 0x61, 0x7a, 0x2d, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x0d, 0x32, 0x0b, 0x0a, 0x05, 0x1a, 0x03, - 0x6f, 0x6e, 0x65, 0x0a, 0x02, 0x20, 0x01, 0x7a, 0x1b, 0x0a, 0x12, 0x78, 0x2d, 0x67, 0x72, 0x70, - 0x63, 0x2d, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2d, 0x66, 0x6f, 0x6f, 0x12, 0x05, 0x1a, - 0x03, 0x62, 0x61, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x1a, 0x10, 0x6e, + 0x6f, 0x6e, 0x65, 0x40, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2a, + 0x5e, 0x0a, 0x14, 0x42, 0x53, 0x44, 0x20, 0x33, 0x2d, 0x43, 0x6c, 0x61, 0x75, 0x73, 0x65, 0x20, + 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, + 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, + 0x2d, 0x65, 0x63, 0x6f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, + 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2f, 0x62, 0x6c, 0x6f, 0x62, 0x2f, 0x6d, 0x61, 0x73, + 0x74, 0x65, 0x72, 0x2f, 0x4c, 0x49, 0x43, 0x45, 0x4e, 0x53, 0x45, 0x2e, 0x74, 0x78, 0x74, 0x32, + 0x03, 0x31, 0x2e, 0x30, 0x3a, 0x20, 0x0a, 0x15, 0x78, 0x2d, 0x73, 0x6f, 0x6d, 0x65, 0x74, 0x68, + 0x69, 0x6e, 0x67, 0x2d, 0x73, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x12, 0x07, 0x1a, + 0x05, 0x79, 0x61, 0x64, 0x64, 0x61, 0x2a, 0x03, 0x01, 0x02, 0x04, 0x32, 0x10, 0x61, 0x70, 0x70, + 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x32, 0x16, 0x61, + 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x66, 0x6f, 0x6f, + 0x2d, 0x6d, 0x69, 0x6d, 0x65, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x16, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x66, 0x6f, 0x6f, 0x2d, 0x6d, 0x69, 0x6d, 0x65, 0x52, + 0x50, 0x0a, 0x03, 0x34, 0x30, 0x33, 0x12, 0x49, 0x0a, 0x47, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, + 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, + 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x70, + 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x2e, 0x52, 0x3b, 0x0a, 0x03, 0x34, 0x30, 0x34, 0x12, 0x34, 0x0a, 0x2a, 0x52, 0x65, 0x74, 0x75, + 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, + 0x65, 0x78, 0x69, 0x73, 0x74, 0x2e, 0x12, 0x06, 0x0a, 0x04, 0x9a, 0x02, 0x01, 0x07, 0x52, 0x57, + 0x0a, 0x03, 0x34, 0x31, 0x38, 0x12, 0x50, 0x0a, 0x0d, 0x49, 0x27, 0x6d, 0x20, 0x61, 0x20, 0x74, + 0x65, 0x61, 0x70, 0x6f, 0x74, 0x2e, 0x12, 0x3f, 0x0a, 0x3d, 0x1a, 0x3b, 0x2e, 0x67, 0x72, 0x70, + 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, + 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x4e, 0x75, 0x6d, 0x65, + 0x72, 0x69, 0x63, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x9b, 0x02, 0x0a, 0x03, 0x35, 0x30, 0x30, 0x12, + 0x93, 0x02, 0x0a, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, + 0x12, 0x41, 0x0a, 0x3f, 0x1a, 0x3d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, + 0x77, 0x61, 0x79, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x65, 0x78, 0x61, 0x6d, + 0x70, 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x1a, 0xbf, 0x01, 0x0a, 0x10, 0x58, 0x2d, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x49, 0x64, 0x12, 0xaa, 0x01, 0x0a, 0x2b, 0x55, 0x6e, 0x69, + 0x71, 0x75, 0x65, 0x20, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x20, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x66, 0x69, 0x65, 0x72, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x06, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x1a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x32, 0x26, 0x22, 0x32, 0x34, 0x33, 0x38, 0x61, 0x63, 0x33, + 0x63, 0x2d, 0x33, 0x37, 0x65, 0x62, 0x2d, 0x34, 0x39, 0x30, 0x32, 0x2d, 0x61, 0x64, 0x65, 0x66, + 0x2d, 0x65, 0x64, 0x31, 0x36, 0x62, 0x34, 0x34, 0x33, 0x31, 0x30, 0x33, 0x30, 0x22, 0x6a, 0x45, + 0x5e, 0x5b, 0x30, 0x2d, 0x39, 0x41, 0x2d, 0x46, 0x5d, 0x7b, 0x38, 0x7d, 0x2d, 0x5b, 0x30, 0x2d, + 0x39, 0x41, 0x2d, 0x46, 0x5d, 0x7b, 0x34, 0x7d, 0x2d, 0x34, 0x5b, 0x30, 0x2d, 0x39, 0x41, 0x2d, + 0x46, 0x5d, 0x7b, 0x33, 0x7d, 0x2d, 0x5b, 0x38, 0x39, 0x41, 0x42, 0x5d, 0x5b, 0x30, 0x2d, 0x39, + 0x41, 0x2d, 0x46, 0x5d, 0x7b, 0x33, 0x7d, 0x2d, 0x5b, 0x30, 0x2d, 0x39, 0x41, 0x2d, 0x46, 0x5d, + 0x7b, 0x31, 0x32, 0x7d, 0x24, 0x5a, 0x97, 0x03, 0x0a, 0xaa, 0x01, 0x0a, 0x0a, 0x41, 0x70, 0x69, + 0x4b, 0x65, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x9b, 0x01, 0x08, 0x02, 0x1a, 0x09, 0x58, 0x2d, + 0x41, 0x50, 0x49, 0x2d, 0x4b, 0x65, 0x79, 0x20, 0x02, 0x4a, 0x60, 0x0a, 0x1e, 0x78, 0x2d, 0x61, + 0x6d, 0x61, 0x7a, 0x6f, 0x6e, 0x2d, 0x61, 0x70, 0x69, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, + 0x2d, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x12, 0x3e, 0x2a, 0x3c, 0x0a, + 0x29, 0x0a, 0x1c, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x52, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x54, 0x74, 0x6c, 0x49, 0x6e, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x12, + 0x09, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4e, 0x40, 0x0a, 0x0f, 0x0a, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x12, 0x07, 0x1a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x4a, 0x28, 0x0a, 0x1c, 0x78, + 0x2d, 0x61, 0x6d, 0x61, 0x7a, 0x6f, 0x6e, 0x2d, 0x61, 0x70, 0x69, 0x67, 0x61, 0x74, 0x65, 0x77, + 0x61, 0x79, 0x2d, 0x61, 0x75, 0x74, 0x68, 0x74, 0x79, 0x70, 0x65, 0x12, 0x08, 0x1a, 0x06, 0x6f, + 0x61, 0x75, 0x74, 0x68, 0x32, 0x0a, 0x0f, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, + 0x74, 0x68, 0x12, 0x02, 0x08, 0x01, 0x0a, 0xd6, 0x01, 0x0a, 0x06, 0x4f, 0x41, 0x75, 0x74, 0x68, + 0x32, 0x12, 0xcb, 0x01, 0x08, 0x03, 0x28, 0x04, 0x32, 0x23, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, + 0x2f, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x61, + 0x75, 0x74, 0x68, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x3a, 0x1f, 0x68, + 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x7f, + 0x0a, 0x43, 0x0a, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x3a, 0x47, 0x72, 0x61, 0x6e, 0x74, + 0x73, 0x20, 0x72, 0x65, 0x61, 0x64, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x77, 0x72, 0x69, 0x74, 0x65, + 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x76, 0x65, 0x20, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x1a, 0x0a, 0x04, 0x72, 0x65, 0x61, 0x64, 0x12, 0x12, 0x47, + 0x72, 0x61, 0x6e, 0x74, 0x73, 0x20, 0x72, 0x65, 0x61, 0x64, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x0a, 0x1c, 0x0a, 0x05, 0x77, 0x72, 0x69, 0x74, 0x65, 0x12, 0x13, 0x47, 0x72, 0x61, 0x6e, + 0x74, 0x73, 0x20, 0x77, 0x72, 0x69, 0x74, 0x65, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x62, + 0x1f, 0x0a, 0x0e, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, + 0x00, 0x0a, 0x0d, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, + 0x62, 0x29, 0x0a, 0x0e, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, 0x74, 0x68, + 0x12, 0x00, 0x0a, 0x17, 0x0a, 0x06, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x32, 0x12, 0x0d, 0x0a, 0x04, + 0x72, 0x65, 0x61, 0x64, 0x0a, 0x05, 0x77, 0x72, 0x69, 0x74, 0x65, 0x72, 0x49, 0x0a, 0x17, 0x4d, + 0x6f, 0x72, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x75, 0x74, 0x20, 0x67, 0x52, 0x50, 0x43, 0x2d, 0x47, + 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x12, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, + 0x65, 0x63, 0x6f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x67, + 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x7a, 0x28, 0x0a, 0x17, 0x78, 0x2d, 0x67, 0x72, 0x70, 0x63, + 0x2d, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2d, 0x62, 0x61, 0x7a, 0x2d, 0x6c, 0x69, 0x73, + 0x74, 0x12, 0x0d, 0x32, 0x0b, 0x0a, 0x05, 0x1a, 0x03, 0x6f, 0x6e, 0x65, 0x0a, 0x02, 0x20, 0x01, + 0x7a, 0x1b, 0x0a, 0x12, 0x78, 0x2d, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x67, 0x61, 0x74, 0x65, 0x77, + 0x61, 0x79, 0x2d, 0x66, 0x6f, 0x6f, 0x12, 0x05, 0x1a, 0x03, 0x62, 0x61, 0x72, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2306,36 +2340,42 @@ var file_examples_internal_proto_examplepb_a_bit_of_everything_proto_depIdxs = [ 26, // 49: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.CheckExternalPathEnum:input_type -> grpc.gateway.examples.internal.pathenum.MessageWithPathEnum 27, // 50: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.CheckExternalNestedPathEnum:input_type -> grpc.gateway.examples.internal.pathenum.MessageWithNestedPathEnum 19, // 51: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.CheckStatus:input_type -> google.protobuf.Empty - 19, // 52: grpc.gateway.examples.internal.proto.examplepb.camelCaseServiceName.Empty:input_type -> google.protobuf.Empty - 19, // 53: grpc.gateway.examples.internal.proto.examplepb.AnotherServiceWithNoBindings.NoBindings:input_type -> google.protobuf.Empty - 4, // 54: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.Create:output_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything - 4, // 55: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.CreateBody:output_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything - 10, // 56: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.CreateBook:output_type -> grpc.gateway.examples.internal.proto.examplepb.Book - 10, // 57: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.UpdateBook:output_type -> grpc.gateway.examples.internal.proto.examplepb.Book - 4, // 58: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.Lookup:output_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything - 19, // 59: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.Update:output_type -> google.protobuf.Empty - 19, // 60: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.UpdateV2:output_type -> google.protobuf.Empty - 19, // 61: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.Delete:output_type -> google.protobuf.Empty - 19, // 62: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.GetQuery:output_type -> google.protobuf.Empty - 5, // 63: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.GetRepeatedQuery:output_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingRepeated - 24, // 64: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.Echo:output_type -> grpc.gateway.examples.internal.proto.sub.StringMessage - 4, // 65: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.DeepPathEcho:output_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything - 19, // 66: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.NoBindings:output_type -> google.protobuf.Empty - 19, // 67: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.Timeout:output_type -> google.protobuf.Empty - 19, // 68: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.ErrorWithDetails:output_type -> google.protobuf.Empty - 19, // 69: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.GetMessageWithBody:output_type -> google.protobuf.Empty - 19, // 70: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.PostWithEmptyBody:output_type -> google.protobuf.Empty - 4, // 71: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.CheckGetQueryParams:output_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything - 4, // 72: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.CheckNestedEnumGetQueryParams:output_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything - 4, // 73: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.CheckPostQueryParams:output_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything - 28, // 74: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.OverwriteResponseContentType:output_type -> google.protobuf.StringValue - 19, // 75: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.CheckExternalPathEnum:output_type -> google.protobuf.Empty - 19, // 76: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.CheckExternalNestedPathEnum:output_type -> google.protobuf.Empty - 6, // 77: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.CheckStatus:output_type -> grpc.gateway.examples.internal.proto.examplepb.CheckStatusResponse - 19, // 78: grpc.gateway.examples.internal.proto.examplepb.camelCaseServiceName.Empty:output_type -> google.protobuf.Empty - 19, // 79: grpc.gateway.examples.internal.proto.examplepb.AnotherServiceWithNoBindings.NoBindings:output_type -> google.protobuf.Empty - 54, // [54:80] is the sub-list for method output_type - 28, // [28:54] is the sub-list for method input_type + 4, // 52: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.Exists:input_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything + 4, // 53: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.CustomOptionsRequest:input_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything + 4, // 54: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.TraceRequest:input_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything + 19, // 55: grpc.gateway.examples.internal.proto.examplepb.camelCaseServiceName.Empty:input_type -> google.protobuf.Empty + 19, // 56: grpc.gateway.examples.internal.proto.examplepb.AnotherServiceWithNoBindings.NoBindings:input_type -> google.protobuf.Empty + 4, // 57: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.Create:output_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything + 4, // 58: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.CreateBody:output_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything + 10, // 59: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.CreateBook:output_type -> grpc.gateway.examples.internal.proto.examplepb.Book + 10, // 60: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.UpdateBook:output_type -> grpc.gateway.examples.internal.proto.examplepb.Book + 4, // 61: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.Lookup:output_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything + 19, // 62: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.Update:output_type -> google.protobuf.Empty + 19, // 63: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.UpdateV2:output_type -> google.protobuf.Empty + 19, // 64: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.Delete:output_type -> google.protobuf.Empty + 19, // 65: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.GetQuery:output_type -> google.protobuf.Empty + 5, // 66: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.GetRepeatedQuery:output_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingRepeated + 24, // 67: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.Echo:output_type -> grpc.gateway.examples.internal.proto.sub.StringMessage + 4, // 68: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.DeepPathEcho:output_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything + 19, // 69: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.NoBindings:output_type -> google.protobuf.Empty + 19, // 70: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.Timeout:output_type -> google.protobuf.Empty + 19, // 71: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.ErrorWithDetails:output_type -> google.protobuf.Empty + 19, // 72: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.GetMessageWithBody:output_type -> google.protobuf.Empty + 19, // 73: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.PostWithEmptyBody:output_type -> google.protobuf.Empty + 4, // 74: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.CheckGetQueryParams:output_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything + 4, // 75: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.CheckNestedEnumGetQueryParams:output_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything + 4, // 76: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.CheckPostQueryParams:output_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything + 28, // 77: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.OverwriteResponseContentType:output_type -> google.protobuf.StringValue + 19, // 78: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.CheckExternalPathEnum:output_type -> google.protobuf.Empty + 19, // 79: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.CheckExternalNestedPathEnum:output_type -> google.protobuf.Empty + 6, // 80: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.CheckStatus:output_type -> grpc.gateway.examples.internal.proto.examplepb.CheckStatusResponse + 19, // 81: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.Exists:output_type -> google.protobuf.Empty + 19, // 82: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.CustomOptionsRequest:output_type -> google.protobuf.Empty + 4, // 83: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.TraceRequest:output_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything + 19, // 84: grpc.gateway.examples.internal.proto.examplepb.camelCaseServiceName.Empty:output_type -> google.protobuf.Empty + 19, // 85: grpc.gateway.examples.internal.proto.examplepb.AnotherServiceWithNoBindings.NoBindings:output_type -> google.protobuf.Empty + 57, // [57:86] is the sub-list for method output_type + 28, // [28:57] is the sub-list for method input_type 28, // [28:28] is the sub-list for extension type_name 28, // [28:28] is the sub-list for extension extendee 0, // [0:28] is the sub-list for field type_name diff --git a/examples/internal/proto/examplepb/a_bit_of_everything.pb.gw.go b/examples/internal/proto/examplepb/a_bit_of_everything.pb.gw.go index 254698b4554..36b8fd9652e 100644 --- a/examples/internal/proto/examplepb/a_bit_of_everything.pb.gw.go +++ b/examples/internal/proto/examplepb/a_bit_of_everything.pb.gw.go @@ -2321,6 +2321,216 @@ func local_request_ABitOfEverythingService_CheckStatus_0(ctx context.Context, ma } +var ( + filter_ABitOfEverythingService_Exists_0 = &utilities.DoubleArray{Encoding: map[string]int{"uuid": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_ABitOfEverythingService_Exists_0(ctx context.Context, marshaler runtime.Marshaler, client ABitOfEverythingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ABitOfEverything + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["uuid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uuid") + } + + protoReq.Uuid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uuid", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ABitOfEverythingService_Exists_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Exists(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_ABitOfEverythingService_Exists_0(ctx context.Context, marshaler runtime.Marshaler, server ABitOfEverythingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ABitOfEverything + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["uuid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uuid") + } + + protoReq.Uuid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uuid", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ABitOfEverythingService_Exists_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Exists(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_ABitOfEverythingService_CustomOptionsRequest_0 = &utilities.DoubleArray{Encoding: map[string]int{"uuid": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_ABitOfEverythingService_CustomOptionsRequest_0(ctx context.Context, marshaler runtime.Marshaler, client ABitOfEverythingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ABitOfEverything + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["uuid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uuid") + } + + protoReq.Uuid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uuid", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ABitOfEverythingService_CustomOptionsRequest_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.CustomOptionsRequest(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_ABitOfEverythingService_CustomOptionsRequest_0(ctx context.Context, marshaler runtime.Marshaler, server ABitOfEverythingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ABitOfEverything + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["uuid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uuid") + } + + protoReq.Uuid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uuid", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ABitOfEverythingService_CustomOptionsRequest_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.CustomOptionsRequest(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_ABitOfEverythingService_TraceRequest_0 = &utilities.DoubleArray{Encoding: map[string]int{"uuid": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_ABitOfEverythingService_TraceRequest_0(ctx context.Context, marshaler runtime.Marshaler, client ABitOfEverythingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ABitOfEverything + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["uuid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uuid") + } + + protoReq.Uuid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uuid", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ABitOfEverythingService_TraceRequest_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.TraceRequest(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_ABitOfEverythingService_TraceRequest_0(ctx context.Context, marshaler runtime.Marshaler, server ABitOfEverythingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ABitOfEverything + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["uuid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uuid") + } + + protoReq.Uuid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uuid", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ABitOfEverythingService_TraceRequest_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.TraceRequest(ctx, &protoReq) + return msg, metadata, err + +} + func request_CamelCaseServiceName_Empty_0(ctx context.Context, marshaler runtime.Marshaler, client CamelCaseServiceNameClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq emptypb.Empty var metadata runtime.ServerMetadata @@ -2993,6 +3203,78 @@ func RegisterABitOfEverythingServiceHandlerServer(ctx context.Context, mux *runt }) + mux.Handle("HEAD", pattern_ABitOfEverythingService_Exists_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/Exists", runtime.WithHTTPPathPattern("/v1/example/a_bit_of_everything/{uuid}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ABitOfEverythingService_Exists_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ABitOfEverythingService_Exists_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("OPTIONS", pattern_ABitOfEverythingService_CustomOptionsRequest_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/CustomOptionsRequest", runtime.WithHTTPPathPattern("/v1/example/a_bit_of_everything/{uuid}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ABitOfEverythingService_CustomOptionsRequest_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ABitOfEverythingService_CustomOptionsRequest_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("TRACE", pattern_ABitOfEverythingService_TraceRequest_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/TraceRequest", runtime.WithHTTPPathPattern("/v1/example/a_bit_of_everything/{uuid}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ABitOfEverythingService_TraceRequest_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ABitOfEverythingService_TraceRequest_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -3634,6 +3916,69 @@ func RegisterABitOfEverythingServiceHandlerClient(ctx context.Context, mux *runt }) + mux.Handle("HEAD", pattern_ABitOfEverythingService_Exists_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/Exists", runtime.WithHTTPPathPattern("/v1/example/a_bit_of_everything/{uuid}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ABitOfEverythingService_Exists_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ABitOfEverythingService_Exists_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("OPTIONS", pattern_ABitOfEverythingService_CustomOptionsRequest_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/CustomOptionsRequest", runtime.WithHTTPPathPattern("/v1/example/a_bit_of_everything/{uuid}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ABitOfEverythingService_CustomOptionsRequest_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ABitOfEverythingService_CustomOptionsRequest_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("TRACE", pattern_ABitOfEverythingService_TraceRequest_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/TraceRequest", runtime.WithHTTPPathPattern("/v1/example/a_bit_of_everything/{uuid}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ABitOfEverythingService_TraceRequest_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ABitOfEverythingService_TraceRequest_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -3691,6 +4036,12 @@ var ( pattern_ABitOfEverythingService_CheckExternalNestedPathEnum_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"v3", "value"}, "check")) pattern_ABitOfEverythingService_CheckStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "example", "checkStatus"}, "")) + + pattern_ABitOfEverythingService_Exists_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v1", "example", "a_bit_of_everything", "uuid"}, "")) + + pattern_ABitOfEverythingService_CustomOptionsRequest_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v1", "example", "a_bit_of_everything", "uuid"}, "")) + + pattern_ABitOfEverythingService_TraceRequest_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v1", "example", "a_bit_of_everything", "uuid"}, "")) ) var ( @@ -3747,6 +4098,12 @@ var ( forward_ABitOfEverythingService_CheckExternalNestedPathEnum_0 = runtime.ForwardResponseMessage forward_ABitOfEverythingService_CheckStatus_0 = runtime.ForwardResponseMessage + + forward_ABitOfEverythingService_Exists_0 = runtime.ForwardResponseMessage + + forward_ABitOfEverythingService_CustomOptionsRequest_0 = runtime.ForwardResponseMessage + + forward_ABitOfEverythingService_TraceRequest_0 = runtime.ForwardResponseMessage ) // RegisterCamelCaseServiceNameHandlerFromEndpoint is same as RegisterCamelCaseServiceNameHandler but diff --git a/examples/internal/proto/examplepb/a_bit_of_everything.proto b/examples/internal/proto/examplepb/a_bit_of_everything.proto index b74a23ba25e..0f9deff78ab 100644 --- a/examples/internal/proto/examplepb/a_bit_of_everything.proto +++ b/examples/internal/proto/examplepb/a_bit_of_everything.proto @@ -728,6 +728,33 @@ service ABitOfEverythingService { get: "/v1/example/checkStatus" }; } + + rpc Exists(ABitOfEverything) returns (google.protobuf.Empty) { + option (google.api.http) = { + custom: { + kind: "HEAD", + path: "/v1/example/a_bit_of_everything/{uuid}" + } + }; + } + + rpc CustomOptionsRequest(ABitOfEverything) returns (google.protobuf.Empty) { + option (google.api.http) = { + custom: { + kind: "OPTIONS", + path: "/v1/example/a_bit_of_everything/{uuid}" + } + }; + } + + rpc TraceRequest(ABitOfEverything) returns (ABitOfEverything) { + option (google.api.http) = { + custom: { + kind: "TRACE", + path: "/v1/example/a_bit_of_everything/{uuid}" + } + }; + } } // camelCase and lowercase service names are valid but not recommended (use TitleCase instead) diff --git a/examples/internal/proto/examplepb/a_bit_of_everything.swagger.json b/examples/internal/proto/examplepb/a_bit_of_everything.swagger.json index e70ba263778..140563a0be3 100644 --- a/examples/internal/proto/examplepb/a_bit_of_everything.swagger.json +++ b/examples/internal/proto/examplepb/a_bit_of_everything.swagger.json @@ -2168,6 +2168,995 @@ "tags": [ "ABitOfEverythingService" ] + }, + "head": { + "operationId": "ABitOfEverythingService_Exists", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object", + "properties": {} + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "uuidName", + "in": "path", + "required": true, + "type": "string", + "x-internal": true + }, + { + "name": "singleNested.name", + "description": "name is nested field.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "singleNested.amount", + "in": "query", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "name": "singleNested.ok", + "description": "DeepEnum description.\n\n - FALSE: FALSE is false.\n - TRUE: TRUE is true.", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "FALSE", + "TRUE" + ], + "default": "FALSE" + }, + { + "name": "floatValue", + "description": "Float value field", + "in": "query", + "required": true, + "type": "number", + "format": "float", + "default": "0.2" + }, + { + "name": "doubleValue", + "in": "query", + "required": false, + "type": "number", + "format": "double" + }, + { + "name": "int64Value", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "uint64Value", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + }, + { + "name": "int32Value", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "fixed64Value", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + }, + { + "name": "fixed32Value", + "in": "query", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "name": "boolValue", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "stringValue", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "bytesValue", + "in": "query", + "required": false, + "type": "string", + "format": "byte" + }, + { + "name": "uint32Value", + "in": "query", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "name": "enumValue", + "description": " - ZERO: ZERO means 0\n - ONE: ONE means 1", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "ZERO", + "ONE" + ], + "default": "ZERO" + }, + { + "name": "pathEnumValue", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "ABC", + "DEF" + ], + "default": "ABC" + }, + { + "name": "nestedPathEnumValue", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "GHI", + "JKL" + ], + "default": "GHI" + }, + { + "name": "sfixed32Value", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "sfixed64Value", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "sint32Value", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "sint64Value", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "repeatedStringValue", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "oneofString", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "nonConventionalNameValue", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "timestampValue", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "repeatedEnumValue", + "description": "repeated enum value. it is comma-separated in query\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string", + "enum": [ + "ZERO", + "ONE" + ] + }, + "collectionFormat": "multi" + }, + { + "name": "repeatedEnumAnnotation", + "description": "Repeated numeric enum title\n\nRepeated numeric enum description.\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string", + "enum": [ + "ZERO", + "ONE" + ] + }, + "collectionFormat": "multi" + }, + { + "name": "enumValueAnnotation", + "description": "Numeric enum title\n\nNumeric enum description.\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "ZERO", + "ONE" + ], + "default": "ZERO" + }, + { + "name": "repeatedStringAnnotation", + "description": "Repeated string title\n\nRepeated string description.", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "nestedAnnotation.name", + "description": "name is nested field.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "nestedAnnotation.amount", + "in": "query", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "name": "nestedAnnotation.ok", + "description": "DeepEnum description.\n\n - FALSE: FALSE is false.\n - TRUE: TRUE is true.", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "FALSE", + "TRUE" + ], + "default": "FALSE" + }, + { + "name": "int64OverrideType", + "in": "query", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "name": "requiredStringViaFieldBehaviorAnnotation", + "description": "mark a field as required in Open API definition", + "in": "query", + "required": true, + "type": "string" + }, + { + "name": "outputOnlyStringViaFieldBehaviorAnnotation", + "description": "mark a field as readonly in Open API definition", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "optionalStringValue", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "ABitOfEverythingService" + ] + }, + "options": { + "operationId": "ABitOfEverythingService_CustomOptionsRequest", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object", + "properties": {} + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "uuidName", + "in": "path", + "required": true, + "type": "string", + "x-internal": true + }, + { + "name": "singleNested.name", + "description": "name is nested field.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "singleNested.amount", + "in": "query", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "name": "singleNested.ok", + "description": "DeepEnum description.\n\n - FALSE: FALSE is false.\n - TRUE: TRUE is true.", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "FALSE", + "TRUE" + ], + "default": "FALSE" + }, + { + "name": "floatValue", + "description": "Float value field", + "in": "query", + "required": true, + "type": "number", + "format": "float", + "default": "0.2" + }, + { + "name": "doubleValue", + "in": "query", + "required": false, + "type": "number", + "format": "double" + }, + { + "name": "int64Value", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "uint64Value", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + }, + { + "name": "int32Value", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "fixed64Value", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + }, + { + "name": "fixed32Value", + "in": "query", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "name": "boolValue", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "stringValue", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "bytesValue", + "in": "query", + "required": false, + "type": "string", + "format": "byte" + }, + { + "name": "uint32Value", + "in": "query", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "name": "enumValue", + "description": " - ZERO: ZERO means 0\n - ONE: ONE means 1", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "ZERO", + "ONE" + ], + "default": "ZERO" + }, + { + "name": "pathEnumValue", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "ABC", + "DEF" + ], + "default": "ABC" + }, + { + "name": "nestedPathEnumValue", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "GHI", + "JKL" + ], + "default": "GHI" + }, + { + "name": "sfixed32Value", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "sfixed64Value", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "sint32Value", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "sint64Value", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "repeatedStringValue", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "oneofString", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "nonConventionalNameValue", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "timestampValue", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "repeatedEnumValue", + "description": "repeated enum value. it is comma-separated in query\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string", + "enum": [ + "ZERO", + "ONE" + ] + }, + "collectionFormat": "multi" + }, + { + "name": "repeatedEnumAnnotation", + "description": "Repeated numeric enum title\n\nRepeated numeric enum description.\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string", + "enum": [ + "ZERO", + "ONE" + ] + }, + "collectionFormat": "multi" + }, + { + "name": "enumValueAnnotation", + "description": "Numeric enum title\n\nNumeric enum description.\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "ZERO", + "ONE" + ], + "default": "ZERO" + }, + { + "name": "repeatedStringAnnotation", + "description": "Repeated string title\n\nRepeated string description.", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "nestedAnnotation.name", + "description": "name is nested field.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "nestedAnnotation.amount", + "in": "query", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "name": "nestedAnnotation.ok", + "description": "DeepEnum description.\n\n - FALSE: FALSE is false.\n - TRUE: TRUE is true.", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "FALSE", + "TRUE" + ], + "default": "FALSE" + }, + { + "name": "int64OverrideType", + "in": "query", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "name": "requiredStringViaFieldBehaviorAnnotation", + "description": "mark a field as required in Open API definition", + "in": "query", + "required": true, + "type": "string" + }, + { + "name": "outputOnlyStringViaFieldBehaviorAnnotation", + "description": "mark a field as readonly in Open API definition", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "optionalStringValue", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "ABitOfEverythingService" + ] + }, + "trace": { + "operationId": "ABitOfEverythingService_TraceRequest", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/examplepbABitOfEverything" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "uuidName", + "in": "path", + "required": true, + "type": "string", + "x-internal": true + }, + { + "name": "singleNested.name", + "description": "name is nested field.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "singleNested.amount", + "in": "query", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "name": "singleNested.ok", + "description": "DeepEnum description.\n\n - FALSE: FALSE is false.\n - TRUE: TRUE is true.", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "FALSE", + "TRUE" + ], + "default": "FALSE" + }, + { + "name": "floatValue", + "description": "Float value field", + "in": "query", + "required": true, + "type": "number", + "format": "float", + "default": "0.2" + }, + { + "name": "doubleValue", + "in": "query", + "required": false, + "type": "number", + "format": "double" + }, + { + "name": "int64Value", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "uint64Value", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + }, + { + "name": "int32Value", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "fixed64Value", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + }, + { + "name": "fixed32Value", + "in": "query", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "name": "boolValue", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "stringValue", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "bytesValue", + "in": "query", + "required": false, + "type": "string", + "format": "byte" + }, + { + "name": "uint32Value", + "in": "query", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "name": "enumValue", + "description": " - ZERO: ZERO means 0\n - ONE: ONE means 1", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "ZERO", + "ONE" + ], + "default": "ZERO" + }, + { + "name": "pathEnumValue", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "ABC", + "DEF" + ], + "default": "ABC" + }, + { + "name": "nestedPathEnumValue", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "GHI", + "JKL" + ], + "default": "GHI" + }, + { + "name": "sfixed32Value", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "sfixed64Value", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "sint32Value", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "sint64Value", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "repeatedStringValue", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "oneofString", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "nonConventionalNameValue", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "timestampValue", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "repeatedEnumValue", + "description": "repeated enum value. it is comma-separated in query\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string", + "enum": [ + "ZERO", + "ONE" + ] + }, + "collectionFormat": "multi" + }, + { + "name": "repeatedEnumAnnotation", + "description": "Repeated numeric enum title\n\nRepeated numeric enum description.\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string", + "enum": [ + "ZERO", + "ONE" + ] + }, + "collectionFormat": "multi" + }, + { + "name": "enumValueAnnotation", + "description": "Numeric enum title\n\nNumeric enum description.\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "ZERO", + "ONE" + ], + "default": "ZERO" + }, + { + "name": "repeatedStringAnnotation", + "description": "Repeated string title\n\nRepeated string description.", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "nestedAnnotation.name", + "description": "name is nested field.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "nestedAnnotation.amount", + "in": "query", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "name": "nestedAnnotation.ok", + "description": "DeepEnum description.\n\n - FALSE: FALSE is false.\n - TRUE: TRUE is true.", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "FALSE", + "TRUE" + ], + "default": "FALSE" + }, + { + "name": "int64OverrideType", + "in": "query", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "name": "requiredStringViaFieldBehaviorAnnotation", + "description": "mark a field as required in Open API definition", + "in": "query", + "required": true, + "type": "string" + }, + { + "name": "outputOnlyStringViaFieldBehaviorAnnotation", + "description": "mark a field as readonly in Open API definition", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "optionalStringValue", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "ABitOfEverythingService" + ] } }, "/v1/example/a_bit_of_everything/{uuid}": { diff --git a/examples/internal/proto/examplepb/a_bit_of_everything_grpc.pb.go b/examples/internal/proto/examplepb/a_bit_of_everything_grpc.pb.go index c6c4df94993..b37b772e08d 100644 --- a/examples/internal/proto/examplepb/a_bit_of_everything_grpc.pb.go +++ b/examples/internal/proto/examplepb/a_bit_of_everything_grpc.pb.go @@ -59,6 +59,9 @@ type ABitOfEverythingServiceClient interface { CheckExternalPathEnum(ctx context.Context, in *pathenum.MessageWithPathEnum, opts ...grpc.CallOption) (*emptypb.Empty, error) CheckExternalNestedPathEnum(ctx context.Context, in *pathenum.MessageWithNestedPathEnum, opts ...grpc.CallOption) (*emptypb.Empty, error) CheckStatus(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*CheckStatusResponse, error) + Exists(ctx context.Context, in *ABitOfEverything, opts ...grpc.CallOption) (*emptypb.Empty, error) + CustomOptionsRequest(ctx context.Context, in *ABitOfEverything, opts ...grpc.CallOption) (*emptypb.Empty, error) + TraceRequest(ctx context.Context, in *ABitOfEverything, opts ...grpc.CallOption) (*ABitOfEverything, error) } type aBitOfEverythingServiceClient struct { @@ -285,6 +288,33 @@ func (c *aBitOfEverythingServiceClient) CheckStatus(ctx context.Context, in *emp return out, nil } +func (c *aBitOfEverythingServiceClient) Exists(ctx context.Context, in *ABitOfEverything, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/Exists", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *aBitOfEverythingServiceClient) CustomOptionsRequest(ctx context.Context, in *ABitOfEverything, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/CustomOptionsRequest", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *aBitOfEverythingServiceClient) TraceRequest(ctx context.Context, in *ABitOfEverything, opts ...grpc.CallOption) (*ABitOfEverything, error) { + out := new(ABitOfEverything) + err := c.cc.Invoke(ctx, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/TraceRequest", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // ABitOfEverythingServiceServer is the server API for ABitOfEverythingService service. // All implementations should embed UnimplementedABitOfEverythingServiceServer // for forward compatibility @@ -324,6 +354,9 @@ type ABitOfEverythingServiceServer interface { CheckExternalPathEnum(context.Context, *pathenum.MessageWithPathEnum) (*emptypb.Empty, error) CheckExternalNestedPathEnum(context.Context, *pathenum.MessageWithNestedPathEnum) (*emptypb.Empty, error) CheckStatus(context.Context, *emptypb.Empty) (*CheckStatusResponse, error) + Exists(context.Context, *ABitOfEverything) (*emptypb.Empty, error) + CustomOptionsRequest(context.Context, *ABitOfEverything) (*emptypb.Empty, error) + TraceRequest(context.Context, *ABitOfEverything) (*ABitOfEverything, error) } // UnimplementedABitOfEverythingServiceServer should be embedded to have forward compatible implementations. @@ -402,6 +435,15 @@ func (UnimplementedABitOfEverythingServiceServer) CheckExternalNestedPathEnum(co func (UnimplementedABitOfEverythingServiceServer) CheckStatus(context.Context, *emptypb.Empty) (*CheckStatusResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CheckStatus not implemented") } +func (UnimplementedABitOfEverythingServiceServer) Exists(context.Context, *ABitOfEverything) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method Exists not implemented") +} +func (UnimplementedABitOfEverythingServiceServer) CustomOptionsRequest(context.Context, *ABitOfEverything) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method CustomOptionsRequest not implemented") +} +func (UnimplementedABitOfEverythingServiceServer) TraceRequest(context.Context, *ABitOfEverything) (*ABitOfEverything, error) { + return nil, status.Errorf(codes.Unimplemented, "method TraceRequest not implemented") +} // UnsafeABitOfEverythingServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to ABitOfEverythingServiceServer will @@ -846,6 +888,60 @@ func _ABitOfEverythingService_CheckStatus_Handler(srv interface{}, ctx context.C return interceptor(ctx, in, info, handler) } +func _ABitOfEverythingService_Exists_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ABitOfEverything) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ABitOfEverythingServiceServer).Exists(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/Exists", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ABitOfEverythingServiceServer).Exists(ctx, req.(*ABitOfEverything)) + } + return interceptor(ctx, in, info, handler) +} + +func _ABitOfEverythingService_CustomOptionsRequest_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ABitOfEverything) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ABitOfEverythingServiceServer).CustomOptionsRequest(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/CustomOptionsRequest", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ABitOfEverythingServiceServer).CustomOptionsRequest(ctx, req.(*ABitOfEverything)) + } + return interceptor(ctx, in, info, handler) +} + +func _ABitOfEverythingService_TraceRequest_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ABitOfEverything) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ABitOfEverythingServiceServer).TraceRequest(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/TraceRequest", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ABitOfEverythingServiceServer).TraceRequest(ctx, req.(*ABitOfEverything)) + } + return interceptor(ctx, in, info, handler) +} + // ABitOfEverythingService_ServiceDesc is the grpc.ServiceDesc for ABitOfEverythingService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -949,6 +1045,18 @@ var ABitOfEverythingService_ServiceDesc = grpc.ServiceDesc{ MethodName: "CheckStatus", Handler: _ABitOfEverythingService_CheckStatus_Handler, }, + { + MethodName: "Exists", + Handler: _ABitOfEverythingService_Exists_Handler, + }, + { + MethodName: "CustomOptionsRequest", + Handler: _ABitOfEverythingService_CustomOptionsRequest_Handler, + }, + { + MethodName: "TraceRequest", + Handler: _ABitOfEverythingService_TraceRequest_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "examples/internal/proto/examplepb/a_bit_of_everything.proto", diff --git a/examples/internal/server/a_bit_of_everything.go b/examples/internal/server/a_bit_of_everything.go index aa9efc8a770..7339ddc0766 100644 --- a/examples/internal/server/a_bit_of_everything.go +++ b/examples/internal/server/a_bit_of_everything.go @@ -358,3 +358,25 @@ func (s *_ABitOfEverythingServer) CheckExternalNestedPathEnum(ctx context.Contex func (s *_ABitOfEverythingServer) CheckStatus(ctx context.Context, empty *emptypb.Empty) (*examples.CheckStatusResponse, error) { return &examples.CheckStatusResponse{Status: &statuspb.Status{}}, nil } + +func (s *_ABitOfEverythingServer) Exists(ctx context.Context, msg *examples.ABitOfEverything) (*emptypb.Empty, error) { + if _, ok := s.v[msg.Uuid]; ok { + return new(emptypb.Empty), nil + } + + return nil, status.Errorf(codes.NotFound, "not found") +} + +func (s *_ABitOfEverythingServer) CustomOptionsRequest(ctx context.Context, msg *examples.ABitOfEverything) (*emptypb.Empty, error) { + err := grpc.SendHeader(ctx, metadata.New(map[string]string{ + "Allow": "OPTIONS, GET, HEAD, POST, PUT, TRACE", + })) + if err != nil { + return nil, err + } + return new(emptypb.Empty), nil +} + +func (s *_ABitOfEverythingServer) TraceRequest(ctx context.Context, msg *examples.ABitOfEverything) (*examples.ABitOfEverything, error) { + return msg, nil +}