Class: Google::Apis::LoggingV1beta3::HttpRequest

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable
Defined in:
generated/google/apis/logging_v1beta3/classes.rb,
generated/google/apis/logging_v1beta3/representations.rb,
generated/google/apis/logging_v1beta3/representations.rb

Overview

A common proto for logging HTTP requests.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ HttpRequest

Returns a new instance of HttpRequest



337
338
339
# File 'generated/google/apis/logging_v1beta3/classes.rb', line 337

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#cache_hitBoolean Also known as: cache_hit?

Whether or not an entity was served from cache (with or without validation). Corresponds to the JSON property cacheHit

Returns:

  • (Boolean)


327
328
329
# File 'generated/google/apis/logging_v1beta3/classes.rb', line 327

def cache_hit
  @cache_hit
end

#refererString

Referer (a.k.a. referrer) URL of request, as defined in http://www.w3.org/ Protocols/rfc2616/rfc2616-sec14.html. Corresponds to the JSON property referer

Returns:

  • (String)


322
323
324
# File 'generated/google/apis/logging_v1beta3/classes.rb', line 322

def referer
  @referer
end

#remote_ipString

IP address of the client who issues the HTTP request. Could be either IPv4 or IPv6. Corresponds to the JSON property remoteIp

Returns:

  • (String)


316
317
318
# File 'generated/google/apis/logging_v1beta3/classes.rb', line 316

def remote_ip
  @remote_ip
end

#request_methodString

Request method, such as GET, HEAD, PUT or POST. Corresponds to the JSON property requestMethod

Returns:

  • (String)


281
282
283
# File 'generated/google/apis/logging_v1beta3/classes.rb', line 281

def request_method
  @request_method
end

#request_sizeString

Size of the HTTP request message in bytes, including request headers and the request body. Corresponds to the JSON property requestSize

Returns:

  • (String)


293
294
295
# File 'generated/google/apis/logging_v1beta3/classes.rb', line 293

def request_size
  @request_size
end

#request_urlString

Contains the scheme (http|https), the host name, the path and the query portion of the URL that was requested. Corresponds to the JSON property requestUrl

Returns:

  • (String)


287
288
289
# File 'generated/google/apis/logging_v1beta3/classes.rb', line 287

def request_url
  @request_url
end

#response_sizeString

Size of the HTTP response message in bytes sent back to the client, including response headers and response body. Corresponds to the JSON property responseSize

Returns:

  • (String)


304
305
306
# File 'generated/google/apis/logging_v1beta3/classes.rb', line 304

def response_size
  @response_size
end

#statusFixnum

A response code indicates the status of response, e.g., 200. Corresponds to the JSON property status

Returns:

  • (Fixnum)


298
299
300
# File 'generated/google/apis/logging_v1beta3/classes.rb', line 298

def status
  @status
end

#user_agentString

User agent sent by the client, e.g., "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)". Corresponds to the JSON property userAgent

Returns:

  • (String)


310
311
312
# File 'generated/google/apis/logging_v1beta3/classes.rb', line 310

def user_agent
  @user_agent
end

#validated_with_origin_serverBoolean Also known as: validated_with_origin_server?

Whether or not the response was validated with the origin server before being served from cache. This field is only meaningful if cache_hit is True. Corresponds to the JSON property validatedWithOriginServer

Returns:

  • (Boolean)


334
335
336
# File 'generated/google/apis/logging_v1beta3/classes.rb', line 334

def validated_with_origin_server
  @validated_with_origin_server
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



342
343
344
345
346
347
348
349
350
351
352
353
# File 'generated/google/apis/logging_v1beta3/classes.rb', line 342

def update!(**args)
  @request_method = args[:request_method] unless args[:request_method].nil?
  @request_url = args[:request_url] unless args[:request_url].nil?
  @request_size = args[:request_size] unless args[:request_size].nil?
  @status = args[:status] unless args[:status].nil?
  @response_size = args[:response_size] unless args[:response_size].nil?
  @user_agent = args[:user_agent] unless args[:user_agent].nil?
  @remote_ip = args[:remote_ip] unless args[:remote_ip].nil?
  @referer = args[:referer] unless args[:referer].nil?
  @cache_hit = args[:cache_hit] unless args[:cache_hit].nil?
  @validated_with_origin_server = args[:validated_with_origin_server] unless args[:validated_with_origin_server].nil?
end