Class QuotaEvent.Builder
- java.lang.Object
-
- org.apache.beam.fn.harness.logging.QuotaEvent.Builder
-
- Enclosing class:
- QuotaEvent
public static class QuotaEvent.Builder extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description QuotaEvent.QuotaEventCloseablecreate()Puts the given values in the MDC as a quota event.QuotaEvent.BuilderwithFullResourceName(java.lang.String fullResourceName)QuotaEvent.BuilderwithMessageText(java.lang.String messageText)QuotaEvent.BuilderwithOperation(java.lang.String operation)QuotaEvent.BuilderwithQuotaName(java.lang.String quotaName)
-
-
-
Method Detail
-
withMessageText
public QuotaEvent.Builder withMessageText(java.lang.String messageText)
- Parameters:
messageText- Any additional description for the event.
-
withFullResourceName
public QuotaEvent.Builder withFullResourceName(java.lang.String fullResourceName)
- Parameters:
fullResourceName- The full path for the resource involved. For GCP, this would follow https://google.aip.dev/122#full-resource-names.
-
withQuotaName
public QuotaEvent.Builder withQuotaName(java.lang.String quotaName)
- Parameters:
quotaName- The full quota name. For GCP, this would look like: example.googleapis.com/quota/name
-
withOperation
public QuotaEvent.Builder withOperation(java.lang.String operation)
- Parameters:
operation- Name of the operation that generated this quota event, in snake-case.
-
create
@Nullable public QuotaEvent.QuotaEventCloseable create()
Puts the given values in the MDC as a quota event.- Returns:
- An AutoCloseable that removes the added values from the MDC, or null if the feature is disabled.
-
-