Class ResourceReference
Defines a proto annotation that describes a string field that refers to an API resource.
Inheritance
System.Object
ResourceReference
Implements
System.IEquatable<ResourceReference>
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Google.Api
Assembly: Google.Api.CommonProtos.dll
Syntax
public sealed class ResourceReference : IMessage<ResourceReference>, IMessage, IEquatable<ResourceReference>, IDeepCloneable<ResourceReference>
Constructors
ResourceReference()
Declaration
public ResourceReference()
ResourceReference(ResourceReference)
Declaration
public ResourceReference(ResourceReference other)
Parameters
Type | Name | Description |
---|---|---|
ResourceReference | other |
Fields
ChildTypeFieldNumber
Field number for the "child_type" field.
Declaration
public const int ChildTypeFieldNumber = 2
Field Value
Type | Description |
---|---|
System.Int32 |
TypeFieldNumber
Field number for the "type" field.
Declaration
public const int TypeFieldNumber = 1
Field Value
Type | Description |
---|---|
System.Int32 |
Properties
ChildType
The resource type of a child collection that the annotated field
references. This is useful for annotating the parent
field that
doesn't have a fixed resource type.
Example:
message ListLogEntriesRequest { string parent = 1 [(google.api.resource_reference) = { child_type: "logging.googleapis.com/LogEntry" }; }
Declaration
public string ChildType { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Descriptor
Declaration
public static MessageDescriptor Descriptor { get; }
Property Value
Type | Description |
---|---|
MessageDescriptor |
Parser
Declaration
public static MessageParser<ResourceReference> Parser { get; }
Property Value
Type | Description |
---|---|
MessageParser<ResourceReference> |
Type
The resource type that the annotated field references.
Example:
message Subscription { string topic = 2 [(google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" }]; }
Declaration
public string Type { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Methods
CalculateSize()
Declaration
public int CalculateSize()
Returns
Type | Description |
---|---|
System.Int32 |
Implements
Clone()
Declaration
public ResourceReference Clone()
Returns
Type | Description |
---|---|
ResourceReference |
Implements
Equals(ResourceReference)
Declaration
public bool Equals(ResourceReference other)
Parameters
Type | Name | Description |
---|---|---|
ResourceReference | other |
Returns
Type | Description |
---|---|
System.Boolean |
Implements
System.IEquatable<T>.Equals(T)
Equals(Object)
Declaration
public override bool Equals(object other)
Parameters
Type | Name | Description |
---|---|---|
System.Object | other |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
System.Object.Equals(System.Object)
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 |
Overrides
System.Object.GetHashCode()
MergeFrom(ResourceReference)
Declaration
public void MergeFrom(ResourceReference other)
Parameters
Type | Name | Description |
---|---|---|
ResourceReference | other |
Implements
MergeFrom(CodedInputStream)
Declaration
public void MergeFrom(CodedInputStream input)
Parameters
Type | Name | Description |
---|---|---|
CodedInputStream | input |
Implements
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |
Overrides
System.Object.ToString()
WriteTo(CodedOutputStream)
Declaration
public void WriteTo(CodedOutputStream output)
Parameters
Type | Name | Description |
---|---|---|
CodedOutputStream | output |
Implements
Explicit Interface Implementations
IMessage.Descriptor
Declaration
MessageDescriptor IMessage.Descriptor { get; }
Returns
Type | Description |
---|---|
MessageDescriptor |