Class Usage (2.24.0)

  public 
  
 final 
  
 class 
 Usage 
  
 extends 
  
 GeneratedMessageV3 
  
 implements 
  
 UsageOrBuilder 
 

Configuration controlling usage of a service.

Protobuf type google.api.Usage

Implements

UsageOrBuilder

Static Fields

PRODUCER_NOTIFICATION_CHANNEL_FIELD_NUMBER

  public 
  
 static 
  
 final 
  
 int 
  
 PRODUCER_NOTIFICATION_CHANNEL_FIELD_NUMBER 
 
Field Value
Type
Description
int

REQUIREMENTS_FIELD_NUMBER

  public 
  
 static 
  
 final 
  
 int 
  
 REQUIREMENTS_FIELD_NUMBER 
 
Field Value
Type
Description
int

RULES_FIELD_NUMBER

  public 
  
 static 
  
 final 
  
 int 
  
 RULES_FIELD_NUMBER 
 
Field Value
Type
Description
int

Static Methods

getDefaultInstance()

  public 
  
 static 
  
 Usage 
  
 getDefaultInstance 
 () 
 
Returns
Type
Description

getDescriptor()

  public 
  
 static 
  
 final 
  
 Descriptors 
 . 
 Descriptor 
  
 getDescriptor 
 () 
 
Returns
Type
Description

newBuilder()

  public 
  
 static 
  
 Usage 
 . 
 Builder 
  
 newBuilder 
 () 
 
Returns
Type
Description

newBuilder(Usage prototype)

  public 
  
 static 
  
 Usage 
 . 
 Builder 
  
 newBuilder 
 ( 
 Usage 
  
 prototype 
 ) 
 
Parameter
Name
Description
prototype
Returns
Type
Description

parseDelimitedFrom(InputStream input)

  public 
  
 static 
  
 Usage 
  
 parseDelimitedFrom 
 ( 
 InputStream 
  
 input 
 ) 
 
Parameter
Name
Description
input
Returns
Type
Description
Exceptions
Type
Description

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

  public 
  
 static 
  
 Usage 
  
 parseDelimitedFrom 
 ( 
 InputStream 
  
 input 
 , 
  
 ExtensionRegistryLite 
  
 extensionRegistry 
 ) 
 
Parameters
Name
Description
input
extensionRegistry
Returns
Type
Description
Exceptions
Type
Description

parseFrom(byte[] data)

  public 
  
 static 
  
 Usage 
  
 parseFrom 
 ( 
 byte 
 [] 
  
 data 
 ) 
 
Parameter
Name
Description
data
byte []
Returns
Type
Description
Exceptions
Type
Description

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

  public 
  
 static 
  
 Usage 
  
 parseFrom 
 ( 
 byte 
 [] 
  
 data 
 , 
  
 ExtensionRegistryLite 
  
 extensionRegistry 
 ) 
 
Parameters
Name
Description
data
byte []
extensionRegistry
Returns
Type
Description
Exceptions
Type
Description

parseFrom(ByteString data)

  public 
  
 static 
  
 Usage 
  
 parseFrom 
 ( 
 ByteString 
  
 data 
 ) 
 
Parameter
Name
Description
data
Returns
Type
Description
Exceptions
Type
Description

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

  public 
  
 static 
  
 Usage 
  
 parseFrom 
 ( 
 ByteString 
  
 data 
 , 
  
 ExtensionRegistryLite 
  
 extensionRegistry 
 ) 
 
Parameters
Name
Description
data
extensionRegistry
Returns
Type
Description
Exceptions
Type
Description

parseFrom(CodedInputStream input)

  public 
  
 static 
  
 Usage 
  
 parseFrom 
 ( 
 CodedInputStream 
  
 input 
 ) 
 
Parameter
Name
Description
Returns
Type
Description
Exceptions
Type
Description

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

  public 
  
 static 
  
 Usage 
  
 parseFrom 
 ( 
 CodedInputStream 
  
 input 
 , 
  
 ExtensionRegistryLite 
  
 extensionRegistry 
 ) 
 
Parameters
Name
Description
extensionRegistry
Returns
Type
Description
Exceptions
Type
Description

parseFrom(InputStream input)

  public 
  
 static 
  
 Usage 
  
 parseFrom 
 ( 
 InputStream 
  
 input 
 ) 
 
Parameter
Name
Description
input
Returns
Type
Description
Exceptions
Type
Description

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

  public 
  
 static 
  
 Usage 
  
 parseFrom 
 ( 
 InputStream 
  
 input 
 , 
  
 ExtensionRegistryLite 
  
 extensionRegistry 
 ) 
 
Parameters
Name
Description
input
extensionRegistry
Returns
Type
Description
Exceptions
Type
Description

parseFrom(ByteBuffer data)

  public 
  
 static 
  
 Usage 
  
 parseFrom 
 ( 
 ByteBuffer 
  
 data 
 ) 
 
Parameter
Name
Description
data
Returns
Type
Description
Exceptions
Type
Description

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

  public 
  
 static 
  
 Usage 
  
 parseFrom 
 ( 
 ByteBuffer 
  
 data 
 , 
  
 ExtensionRegistryLite 
  
 extensionRegistry 
 ) 
 
Parameters
Name
Description
data
extensionRegistry
Returns
Type
Description
Exceptions
Type
Description

parser()

  public 
  
 static 
  
 Parser<Usage> 
  
 parser 
 () 
 
Returns
Type
Description

Methods

equals(Object obj)

  public 
  
 boolean 
  
 equals 
 ( 
 Object 
  
 obj 
 ) 
 
Parameter
Name
Description
obj
Returns
Type
Description
Overrides

getDefaultInstanceForType()

  public 
  
 Usage 
  
 getDefaultInstanceForType 
 () 
 
Returns
Type
Description

getParserForType()

  public 
  
 Parser<Usage> 
  
 getParserForType 
 () 
 
Returns
Type
Description
Overrides

getProducerNotificationChannel()

  public 
  
 String 
  
 getProducerNotificationChannel 
 () 
 

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 .

string producer_notification_channel = 7;

Returns
Type
Description

The producerNotificationChannel.

getProducerNotificationChannelBytes()

  public 
  
 ByteString 
  
 getProducerNotificationChannelBytes 
 () 
 

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 .

string producer_notification_channel = 7;

Returns
Type
Description

The bytes for producerNotificationChannel.

getRequirements(int index)

  public 
  
 String 
  
 getRequirements 
 ( 
 int 
  
 index 
 ) 
 

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

For Google APIs, a Terms of Service requirement must be included here. Google Cloud APIs must include "serviceusage.googleapis.com/tos/cloud". Other Google APIs should include "serviceusage.googleapis.com/tos/universal". Additional ToS can be included based on the business needs.

repeated string requirements = 1;

Parameter
Name
Description
index
int

The index of the element to return.

Returns
Type
Description

The requirements at the given index.

getRequirementsBytes(int index)

  public 
  
 ByteString 
  
 getRequirementsBytes 
 ( 
 int 
  
 index 
 ) 
 

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

For Google APIs, a Terms of Service requirement must be included here. Google Cloud APIs must include "serviceusage.googleapis.com/tos/cloud". Other Google APIs should include "serviceusage.googleapis.com/tos/universal". Additional ToS can be included based on the business needs.

repeated string requirements = 1;

Parameter
Name
Description
index
int

The index of the value to return.

Returns
Type
Description

The bytes of the requirements at the given index.

getRequirementsCount()

  public 
  
 int 
  
 getRequirementsCount 
 () 
 

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

For Google APIs, a Terms of Service requirement must be included here. Google Cloud APIs must include "serviceusage.googleapis.com/tos/cloud". Other Google APIs should include "serviceusage.googleapis.com/tos/universal". Additional ToS can be included based on the business needs.

repeated string requirements = 1;

Returns
Type
Description
int

The count of requirements.

getRequirementsList()

  public 
  
 ProtocolStringList 
  
 getRequirementsList 
 () 
 

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

For Google APIs, a Terms of Service requirement must be included here. Google Cloud APIs must include "serviceusage.googleapis.com/tos/cloud". Other Google APIs should include "serviceusage.googleapis.com/tos/universal". Additional ToS can be included based on the business needs.

repeated string requirements = 1;

Returns
Type
Description

A list containing the requirements.

getRules(int index)

  public 
  
 UsageRule 
  
 getRules 
 ( 
 int 
  
 index 
 ) 
 

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

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

repeated .google.api.UsageRule rules = 6;

Parameter
Name
Description
index
int
Returns
Type
Description

getRulesCount()

  public 
  
 int 
  
 getRulesCount 
 () 
 

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

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

repeated .google.api.UsageRule rules = 6;

Returns
Type
Description
int

getRulesList()

  public 
  
 List<UsageRule> 
  
 getRulesList 
 () 
 

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

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

repeated .google.api.UsageRule rules = 6;

Returns
Type
Description

getRulesOrBuilder(int index)

  public 
  
 UsageRuleOrBuilder 
  
 getRulesOrBuilder 
 ( 
 int 
  
 index 
 ) 
 

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

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

repeated .google.api.UsageRule rules = 6;

Parameter
Name
Description
index
int
Returns
Type
Description

getRulesOrBuilderList()

  public 
  
 List 
< ? 
  
 extends 
  
 UsageRuleOrBuilder 
>  
 getRulesOrBuilderList 
 () 
 

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

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

repeated .google.api.UsageRule rules = 6;

Returns
Type
Description
List < ? extends com.google.api.UsageRuleOrBuilder >

getSerializedSize()

  public 
  
 int 
  
 getSerializedSize 
 () 
 
Returns
Type
Description
int
Overrides

hashCode()

  public 
  
 int 
  
 hashCode 
 () 
 
Returns
Type
Description
int
Overrides

internalGetFieldAccessorTable()

  protected 
  
 GeneratedMessageV3 
 . 
 FieldAccessorTable 
  
 internalGetFieldAccessorTable 
 () 
 
Returns
Type
Description
Overrides

isInitialized()

  public 
  
 final 
  
 boolean 
  
 isInitialized 
 () 
 
Returns
Type
Description
Overrides

newBuilderForType()

  public 
  
 Usage 
 . 
 Builder 
  
 newBuilderForType 
 () 
 
Returns
Type
Description

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

  protected 
  
 Usage 
 . 
 Builder 
  
 newBuilderForType 
 ( 
 GeneratedMessageV3 
 . 
 BuilderParent 
  
 parent 
 ) 
 
Parameter
Name
Description
parent
Returns
Type
Description
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

  protected 
  
 Object 
  
 newInstance 
 ( 
 GeneratedMessageV3 
 . 
 UnusedPrivateParameter 
  
 unused 
 ) 
 
Parameter
Name
Description
Returns
Type
Description
Overrides

toBuilder()

  public 
  
 Usage 
 . 
 Builder 
  
 toBuilder 
 () 
 
Returns
Type
Description

writeTo(CodedOutputStream output)

  public 
  
 void 
  
 writeTo 
 ( 
 CodedOutputStream 
  
 output 
 ) 
 
Parameter
Name
Description
Overrides
Exceptions
Type
Description
Design a Mobile Site
View Site in Mobile | Classic
Share by: