Class VisibilityRule (2.10.0)

public sealed class VisibilityRule : IMessage<VisibilityRule>, IEquatable<VisibilityRule>, IDeepCloneable<VisibilityRule>, IBufferMessage, IMessage

A visibility rule provides visibility configuration for an individual API element.

Inheritance

object > VisibilityRule

Namespace

Google.Api

Assembly

Google.Api.CommonProtos.dll

Constructors

VisibilityRule()

public VisibilityRule()

VisibilityRule(VisibilityRule)

public VisibilityRule(VisibilityRule other)
Parameter
NameDescription
otherVisibilityRule

Fields

RestrictionFieldNumber

public const int RestrictionFieldNumber = 2

Field number for the "restriction" field.

Field Value
TypeDescription
int

SelectorFieldNumber

public const int SelectorFieldNumber = 1

Field number for the "selector" field.

Field Value
TypeDescription
int

Properties

Descriptor

public static MessageDescriptor Descriptor { get; }
Property Value
TypeDescription
MessageDescriptor

Parser

public static MessageParser<VisibilityRule> Parser { get; }
Property Value
TypeDescription
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
TypeDescription
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
TypeDescription
string

Methods

CalculateSize()

public int CalculateSize()
Returns
TypeDescription
int

Clone()

public VisibilityRule Clone()
Returns
TypeDescription
VisibilityRule

Equals(VisibilityRule)

public bool Equals(VisibilityRule other)
Parameter
NameDescription
otherVisibilityRule
Returns
TypeDescription
bool

Equals(object)

public override bool Equals(object other)
Parameter
NameDescription
otherobject
Returns
TypeDescription
bool
Overrides

GetHashCode()

public override int GetHashCode()
Returns
TypeDescription
int
Overrides

MergeFrom(VisibilityRule)

public void MergeFrom(VisibilityRule other)
Parameter
NameDescription
otherVisibilityRule

MergeFrom(CodedInputStream)

public void MergeFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream

ToString()

public override string ToString()
Returns
TypeDescription
string
Overrides

WriteTo(CodedOutputStream)

public void WriteTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream