Send feedback
Class AttributeContext.Types.Peer (2.15.0)
Stay organized with collections
Save and categorize content based on your preferences.
Version latest keyboard_arrow_down
public sealed class AttributeContext.Types.Peer : IMessage<AttributeContext.Types.Peer>, IEquatable<AttributeContext.Types.Peer>, IDeepCloneable<AttributeContext.Types.Peer>, IBufferMessage, IMessage
This message defines attributes for a node that handles a network request.
The node can be either a service or an application that sends, forwards,
or receives the request. Service peers should fill in
principal
and labels
as appropriate.
Inheritance
object >
AttributeContext.Types.Peer
Namespace
Google.Rpc.Context
Assembly
Google.Api.CommonProtos.dll
Constructors
Peer()
Peer(Peer)
public Peer(AttributeContext.Types.Peer other)
Fields
IpFieldNumber
public const int IpFieldNumber = 1
Field number for the "ip" field.
Field Value
Type
Description
int
LabelsFieldNumber
public const int LabelsFieldNumber = 6
Field number for the "labels" field.
Field Value
Type
Description
int
PortFieldNumber
public const int PortFieldNumber = 2
Field number for the "port" field.
Field Value
Type
Description
int
PrincipalFieldNumber
public const int PrincipalFieldNumber = 7
Field number for the "principal" field.
Field Value
Type
Description
int
RegionCodeFieldNumber
public const int RegionCodeFieldNumber = 8
Field number for the "region_code" field.
Field Value
Type
Description
int
Properties
Descriptor
public static MessageDescriptor Descriptor { get; }
Ip
public string Ip { get; set; }
The IP address of the peer.
Property Value
Type
Description
string
Labels
public MapField<string, string> Labels { get; }
The labels associated with the peer.
Parser
public static MessageParser<AttributeContext.Types.Peer> Parser { get; }
Port
public long Port { get; set; }
The network port of the peer.
Property Value
Type
Description
long
Principal
public string Principal { get; set; }
The identity of this peer. Similar to Request.auth.principal
, but
relative to the peer instead of the request. For example, the
identity associated with a load balancer that forwarded the request.
Property Value
Type
Description
string
RegionCode
public string RegionCode { get; set; }
The CLDR country/region code associated with the above IP address.
If the IP address is private, the region_code
should reflect the
physical location where this peer is running.
Property Value
Type
Description
string
Methods
CalculateSize()
public int CalculateSize()
Calculates the size of this message in Protocol Buffer wire format, in bytes.
Returns
Type
Description
int
The number of bytes required to write this message
to a coded output stream.
Clone()
public AttributeContext.Types.Peer Clone()
Creates a deep clone of this object.
Equals(Peer)
public bool Equals(AttributeContext.Types.Peer other)
Returns
Type
Description
bool
Equals(object)
public override bool Equals(object other)
Parameter
Name
Description
other
object
Returns
Type
Description
bool
Overrides
GetHashCode()
public override int GetHashCode()
Returns
Type
Description
int
Overrides
MergeFrom(CodedInputStream)
public void MergeFrom(CodedInputStream input)
Merges the data from the specified coded input stream with the current message.
Remarks
MergeFrom(Peer)
public void MergeFrom(AttributeContext.Types.Peer other)
Merges the given message into this one.
Remarks
ToString()
public override string ToString()
Returns
Type
Description
string
Overrides
WriteTo(CodedOutputStream)
public void WriteTo(CodedOutputStream output)
Writes the data to the given coded output stream.
Parameter
Name
Description
output
CodedOutputStream
Coded output stream to write the data to. Must not be null.
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-24 UTC.
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
Need to tell us more?
{"lastModified": "Last updated 2024-09-24 UTC."}
[[["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 2024-09-24 UTC."]]