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
Name Description
other VisibilityRule

Fields

RestrictionFieldNumber

public const int RestrictionFieldNumber = 2

Field number for the "restriction" field.

Field Value
Type Description
int

SelectorFieldNumber

public const int SelectorFieldNumber = 1

Field 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()
Returns
Type Description
int

Clone()

public VisibilityRule Clone()
Returns
Type Description
VisibilityRule

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
Overrides

GetHashCode()

public override int GetHashCode()
Returns
Type Description
int
Overrides

MergeFrom(VisibilityRule)

public void MergeFrom(VisibilityRule other)
Parameter
Name Description
other VisibilityRule

MergeFrom(CodedInputStream)

public void MergeFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream

ToString()

public override string ToString()
Returns
Type Description
string
Overrides

WriteTo(CodedOutputStream)

public void WriteTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream