Class: Google::Apis::ServicecontrolV1::RequestMetadata

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

Overview

Metadata about the request.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ RequestMetadata

Returns a new instance of RequestMetadata



1607
1608
1609
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1607

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

Instance Attribute Details

#caller_ipString

The IP address of the caller. For caller from internet, this will be public IPv4 or IPv6 address. For caller from a Compute Engine VM with external IP address, this will be the VM's external IP address. For caller from a Compute Engine VM without external IP address, if the VM is in the same organization (or project) as the accessed resource, caller_ip will be the VM's internal IPv4 address, otherwise the caller_ip will be redacted to "gce-internal-ip". See https://cloud.google.com/compute/docs/vpc/ for more information. Corresponds to the JSON property callerIp

Returns:

  • (String)


1580
1581
1582
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1580

def caller_ip
  @caller_ip
end

#caller_networkString

The network of the caller. Set only if the network host project is part of the same GCP organization (or project) as the accessed resource. See https://cloud.google.com/compute/docs/vpc/ for more information. This is a scheme-less URI full resource name. For example: "//compute.googleapis.com/projects/PROJECT_ID/global/networks/NETWORK_ID" Corresponds to the JSON property callerNetwork

Returns:

  • (String)


1590
1591
1592
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1590

def caller_network
  @caller_network
end

#caller_supplied_user_agentString

The user agent of the caller. This information is not authenticated and should be treated accordingly. For example:

  • google-api-python-client/1.4.0: The request was made by the Google API client for Python.
  • Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62: The request was made by the Google Cloud SDK CLI (gcloud).
  • AppEngine-Google; (+http://code.google.com/appengine; appid: s~my-project : The request was made from the my-project App Engine app. NOLINT Corresponds to the JSON property callerSuppliedUserAgent

Returns:

  • (String)


1605
1606
1607
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1605

def caller_supplied_user_agent
  @caller_supplied_user_agent
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1612
1613
1614
1615
1616
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1612

def update!(**args)
  @caller_ip = args[:caller_ip] if args.key?(:caller_ip)
  @caller_network = args[:caller_network] if args.key?(:caller_network)
  @caller_supplied_user_agent = args[:caller_supplied_user_agent] if args.key?(:caller_supplied_user_agent)
end