Class Usage (2.2.0)

public sealed class Usage : Protobuf.IMessage<Usage>, Protobuf.IBufferMessage

Configuration controlling usage of a service.

Inheritance

Object > Usage

Namespace

Google.Api

Assembly

Google.Api.CommonProtos.dll

Constructors

Usage()

public Usage()

Usage(Usage)

public Usage(Usage other)
Parameter
NameDescription
otherUsage

Fields

ProducerNotificationChannelFieldNumber

public const int ProducerNotificationChannelFieldNumber = 7

Field number for the "producer_notification_channel" field.

Field Value
TypeDescription
Int32

RequirementsFieldNumber

public const int RequirementsFieldNumber = 1

Field number for the "requirements" field.

Field Value
TypeDescription
Int32

RulesFieldNumber

public const int RulesFieldNumber = 6

Field number for the "rules" field.

Field Value
TypeDescription
Int32

Properties

Descriptor

public static Protobuf.Reflection.MessageDescriptor Descriptor { get; }
Property Value
TypeDescription
Protobuf.Reflection.MessageDescriptor

Parser

public static Protobuf.MessageParser<Usage> Parser { get; }
Property Value
TypeDescription
Protobuf.MessageParser<Usage>

ProducerNotificationChannel

public string ProducerNotificationChannel { get; set; }

The full resource name of a channel used for sending notifications to the service producer.

Google Service Management currently only supports Google Cloud Pub/Sub as a notification channel. To use Google Cloud Pub/Sub as the channel, this must be the name of a Cloud Pub/Sub topic that uses the Cloud Pub/Sub topic name format documented in https://cloud.google.com/pubsub/docs/overview.

Property Value
TypeDescription
String

Requirements

public Protobuf.Collections.RepeatedField<string> Requirements { get; }

Requirements that must be satisfied before a consumer project can use the service. Each requirement is of the form <service.name>/<requirement-id>; for example 'serviceusage.googleapis.com/billing-enabled'.

Property Value
TypeDescription
Protobuf.Collections.RepeatedField<String>

Rules

public Protobuf.Collections.RepeatedField<UsageRule> Rules { get; }

A list of usage rules that apply to individual API methods.

NOTE: All service configuration rules follow "last one wins" order.

Property Value
TypeDescription
Protobuf.Collections.RepeatedField<UsageRule>

Methods

CalculateSize()

public int CalculateSize()
Returns
TypeDescription
Int32

Clone()

public Usage Clone()
Returns
TypeDescription
Usage

Equals(Usage)

public bool Equals(Usage other)
Parameter
NameDescription
otherUsage
Returns
TypeDescription
Boolean

Equals(Object)

public override bool Equals(object other)
Parameter
NameDescription
otherObject
Returns
TypeDescription
Boolean

GetHashCode()

public override int GetHashCode()
Returns
TypeDescription
Int32

MergeFrom(Usage)

public void MergeFrom(Usage other)
Parameter
NameDescription
otherUsage

MergeFrom(Protobuf.CodedInputStream)

public void MergeFrom(Protobuf.CodedInputStream input)
Parameter
NameDescription
inputProtobuf.CodedInputStream

ToString()

public override string ToString()
Returns
TypeDescription
String

WriteTo(Protobuf.CodedOutputStream)

public void WriteTo(Protobuf.CodedOutputStream output)
Parameter
NameDescription
outputProtobuf.CodedOutputStream