Show / Hide Table of Contents

Class Usage

Configuration controlling usage of a service.

Inheritance
System.Object
Usage
Implements
IMessage<Usage>
IMessage
System.IEquatable<Usage>
IDeepCloneable<Usage>
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 Usage : IMessage<Usage>, IMessage, IEquatable<Usage>, IDeepCloneable<Usage>

Constructors

Usage()

Declaration
public Usage()

Usage(Usage)

Declaration
public Usage(Usage other)
Parameters
Type Name Description
Usage other

Fields

ProducerNotificationChannelFieldNumber

Field number for the "producer_notification_channel" field.

Declaration
public const int ProducerNotificationChannelFieldNumber = 7
Field Value
Type Description
System.Int32

RequirementsFieldNumber

Field number for the "requirements" field.

Declaration
public const int RequirementsFieldNumber = 1
Field Value
Type Description
System.Int32

RulesFieldNumber

Field number for the "rules" field.

Declaration
public const int RulesFieldNumber = 6
Field Value
Type Description
System.Int32

Properties

Descriptor

Declaration
public static MessageDescriptor Descriptor { get; }
Property Value
Type Description
MessageDescriptor

Parser

Declaration
public static MessageParser<Usage> Parser { get; }
Property Value
Type Description
MessageParser<Usage>

ProducerNotificationChannel

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.

Declaration
public string ProducerNotificationChannel { get; set; }
Property Value
Type Description
System.String

Requirements

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'.

Declaration
public RepeatedField<string> Requirements { get; }
Property Value
Type Description
RepeatedField<System.String>

Rules

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

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

Declaration
public RepeatedField<UsageRule> Rules { get; }
Property Value
Type Description
RepeatedField<UsageRule>

Methods

CalculateSize()

Declaration
public int CalculateSize()
Returns
Type Description
System.Int32
Implements
IMessage.CalculateSize()

Clone()

Declaration
public Usage Clone()
Returns
Type Description
Usage
Implements
IDeepCloneable<T>.Clone()

Equals(Usage)

Declaration
public bool Equals(Usage other)
Parameters
Type Name Description
Usage 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(Usage)

Declaration
public void MergeFrom(Usage other)
Parameters
Type Name Description
Usage other
Implements
IMessage<T>.MergeFrom(T)

MergeFrom(CodedInputStream)

Declaration
public void MergeFrom(CodedInputStream input)
Parameters
Type Name Description
CodedInputStream input
Implements
IMessage.MergeFrom(CodedInputStream)

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
IMessage.WriteTo(CodedOutputStream)

Explicit Interface Implementations

IMessage.Descriptor

Declaration
MessageDescriptor IMessage.Descriptor { get; }
Returns
Type Description
MessageDescriptor
Implements
IMessage.Descriptor
Back to top