public sealed class VisibilityRule : IMessage<VisibilityRule>, IEquatable<VisibilityRule>, IDeepCloneable<VisibilityRule>, IBufferMessage, IMessageA visibility rule provides visibility configuration for an individual API element.
Implements
IMessageVisibilityRule, IEquatableVisibilityRule, IDeepCloneableVisibilityRule, IBufferMessage, IMessageNamespace
Google.ApiAssembly
Google.Api.CommonProtos.dll
Constructors
VisibilityRule()
public VisibilityRule()VisibilityRule(VisibilityRule)
public VisibilityRule(VisibilityRule other)| Parameter | |
|---|---|
| Name | Description |
other |
VisibilityRule |
Fields
RestrictionFieldNumber
public const int RestrictionFieldNumber = 2Field number for the "restriction" field.
| Field Value | |
|---|---|
| Type | Description |
int |
|
SelectorFieldNumber
public const int SelectorFieldNumber = 1Field number for the "selector" field.
| Field Value | |
|---|---|
| Type | Description |
int |
|
Properties
Descriptor
public static MessageDescriptor Descriptor { get; }| Property Value | |
|---|---|
| Type | Description |
MessageDescriptor |
|
Parser
public static MessageParser<VisibilityRule> Parser { get; }| Property Value | |
|---|---|
| Type | Description |
MessageParserVisibilityRule |
|
Restriction
public string Restriction { get; set; }A comma-separated list of visibility labels that apply to the selector.
Any of the listed labels can be used to grant the visibility.
If a rule has multiple labels, removing one of the labels but not all of them can break clients.
Example:
visibility:
rules:
- selector: google.calendar.Calendar.EnhancedSearch
restriction: INTERNAL, PREVIEW
Removing INTERNAL from this restriction will break clients that rely on this method and only had access to it through INTERNAL.
| Property Value | |
|---|---|
| Type | Description |
string |
|
Selector
public string Selector { get; set; }Selects methods, messages, fields, enums, etc. to which this rule applies.
Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
| 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 VisibilityRule Clone()Creates a deep clone of this object.
| Returns | |
|---|---|
| Type | Description |
VisibilityRule |
A deep clone of this object. |
Equals(VisibilityRule)
public bool Equals(VisibilityRule other)| Parameter | |
|---|---|
| Name | Description |
other |
VisibilityRule |
| Returns | |
|---|---|
| Type | Description |
bool |
|
Equals(object)
public override bool Equals(object other)| Parameter | |
|---|---|
| Name | Description |
other |
object |
| Returns | |
|---|---|
| Type | Description |
bool |
|
GetHashCode()
public override int GetHashCode()| Returns | |
|---|---|
| Type | Description |
int |
|
MergeFrom(VisibilityRule)
public void MergeFrom(VisibilityRule other)Merges the given message into this one.
| Parameter | |
|---|---|
| Name | Description |
other |
VisibilityRule |
See the user guide for precise merge semantics.
MergeFrom(CodedInputStream)
public void MergeFrom(CodedInputStream input)Merges the data from the specified coded input stream with the current message.
| Parameter | |
|---|---|
| Name | Description |
input |
CodedInputStream |
See the user guide for precise merge semantics.
ToString()
public override string ToString()| Returns | |
|---|---|
| Type | Description |
string |
|
WriteTo(CodedOutputStream)
public void WriteTo(CodedOutputStream output)Writes the data to the given coded output stream.
| Parameter | |
|---|---|
| Name | Description |
output |
CodedOutputStreamCoded output stream to write the data to. Must not be null. |