Reference documentation and code samples for the Network Services V1 API class Google::Cloud::NetworkServices::V1::HttpRoute::HttpDirectResponse.
Static HTTP response object to be returned.
Inherits
Object
Extended By
Google::Protobuf::MessageExts::ClassMethods
Includes
Google::Protobuf::MessageExts
Methods
#bytes_body
defbytes_body()->::String
Returns
(::String) — Optional. Response body as bytes. Maximum body size is 4096B.
Note: The following fields are mutually exclusive: bytes_body, string_body. If a field in that set is populated, all other fields in the set will automatically be cleared.
#bytes_body=
defbytes_body=(value)->::String
Parameter
value (::String) — Optional. Response body as bytes. Maximum body size is 4096B.
Note: The following fields are mutually exclusive: bytes_body, string_body. If a field in that set is populated, all other fields in the set will automatically be cleared.
Returns
(::String) — Optional. Response body as bytes. Maximum body size is 4096B.
Note: The following fields are mutually exclusive: bytes_body, string_body. If a field in that set is populated, all other fields in the set will automatically be cleared.
#status
defstatus()->::Integer
Returns
(::Integer) — Required. Status to return as part of HTTP Response. Must be a positive
integer.
#status=
defstatus=(value)->::Integer
Parameter
value (::Integer) — Required. Status to return as part of HTTP Response. Must be a positive
integer.
Returns
(::Integer) — Required. Status to return as part of HTTP Response. Must be a positive
integer.
#string_body
defstring_body()->::String
Returns
(::String) — Optional. Response body as a string. Maximum body length is 1024
characters.
Note: The following fields are mutually exclusive: string_body, bytes_body. If a field in that set is populated, all other fields in the set will automatically be cleared.
#string_body=
defstring_body=(value)->::String
Parameter
value (::String) — Optional. Response body as a string. Maximum body length is 1024
characters.
Note: The following fields are mutually exclusive: string_body, bytes_body. If a field in that set is populated, all other fields in the set will automatically be cleared.
Returns
(::String) — Optional. Response body as a string. Maximum body length is 1024
characters.
Note: The following fields are mutually exclusive: string_body, bytes_body. If a field in that set is populated, all other fields in the set will automatically be cleared.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Network Services V1 API - Class Google::Cloud::NetworkServices::V1::HttpRoute::HttpDirectResponse (v2.4.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.4.0 (latest)](/ruby/docs/reference/google-cloud-network_services-v1/latest/Google-Cloud-NetworkServices-V1-HttpRoute-HttpDirectResponse)\n- [2.3.0](/ruby/docs/reference/google-cloud-network_services-v1/2.3.0/Google-Cloud-NetworkServices-V1-HttpRoute-HttpDirectResponse)\n- [2.2.0](/ruby/docs/reference/google-cloud-network_services-v1/2.2.0/Google-Cloud-NetworkServices-V1-HttpRoute-HttpDirectResponse)\n- [2.1.0](/ruby/docs/reference/google-cloud-network_services-v1/2.1.0/Google-Cloud-NetworkServices-V1-HttpRoute-HttpDirectResponse)\n- [2.0.1](/ruby/docs/reference/google-cloud-network_services-v1/2.0.1/Google-Cloud-NetworkServices-V1-HttpRoute-HttpDirectResponse)\n- [1.2.0](/ruby/docs/reference/google-cloud-network_services-v1/1.2.0/Google-Cloud-NetworkServices-V1-HttpRoute-HttpDirectResponse)\n- [1.1.0](/ruby/docs/reference/google-cloud-network_services-v1/1.1.0/Google-Cloud-NetworkServices-V1-HttpRoute-HttpDirectResponse)\n- [1.0.1](/ruby/docs/reference/google-cloud-network_services-v1/1.0.1/Google-Cloud-NetworkServices-V1-HttpRoute-HttpDirectResponse)\n- [0.2.0](/ruby/docs/reference/google-cloud-network_services-v1/0.2.0/Google-Cloud-NetworkServices-V1-HttpRoute-HttpDirectResponse)\n- [0.1.0](/ruby/docs/reference/google-cloud-network_services-v1/0.1.0/Google-Cloud-NetworkServices-V1-HttpRoute-HttpDirectResponse) \nReference documentation and code samples for the Network Services V1 API class Google::Cloud::NetworkServices::V1::HttpRoute::HttpDirectResponse.\n\nStatic HTTP response object to be returned. \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #bytes_body\n\n def bytes_body() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Optional. Response body as bytes. Maximum body size is 4096B.\n\n Note: The following fields are mutually exclusive: `bytes_body`, `string_body`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #bytes_body=\n\n def bytes_body=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- Optional. Response body as bytes. Maximum body size is 4096B.\n\n\nNote: The following fields are mutually exclusive: `bytes_body`, `string_body`. If a field in that set is populated, all other fields in the set will automatically be cleared. \n**Returns**\n\n- (::String) --- Optional. Response body as bytes. Maximum body size is 4096B.\n\n Note: The following fields are mutually exclusive: `bytes_body`, `string_body`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #status\n\n def status() -\u003e ::Integer\n\n**Returns**\n\n- (::Integer) --- Required. Status to return as part of HTTP Response. Must be a positive integer.\n\n### #status=\n\n def status=(value) -\u003e ::Integer\n\n**Parameter**\n\n- **value** (::Integer) --- Required. Status to return as part of HTTP Response. Must be a positive integer. \n**Returns**\n\n- (::Integer) --- Required. Status to return as part of HTTP Response. Must be a positive integer.\n\n### #string_body\n\n def string_body() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Optional. Response body as a string. Maximum body length is 1024 characters.\n\n Note: The following fields are mutually exclusive: `string_body`, `bytes_body`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #string_body=\n\n def string_body=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- Optional. Response body as a string. Maximum body length is 1024 characters.\n\n\nNote: The following fields are mutually exclusive: `string_body`, `bytes_body`. If a field in that set is populated, all other fields in the set will automatically be cleared. \n**Returns**\n\n- (::String) --- Optional. Response body as a string. Maximum body length is 1024 characters.\n\n Note: The following fields are mutually exclusive: `string_body`, `bytes_body`. If a field in that set is populated, all other fields in the set will automatically be cleared."]]