Skip to content

Infra API v2 (Beta)

ErrorReports

Receive error logs from external sources to include them into our internal logging system

Report

Add new error report

Input: ErrorReportRequest

Field Type Rules Description
*tenant string The tenant the errorlog belongs to.
*report ErrorReport The report to set.

ErrorReport

Stores information on unhandled errors from external sources (i.e. frontend apps)

Field Type Rules Description
*app string Identifies the app throwing that error
uri string The uri where the error occured
user_data ErrorReport.UserData Optional userData information
*errors ErrorReport.Error repeated Contains n-errors

ErrorReport.Error

Contains information about the error that occured

Field Type Rules Description
*msg string The error message or description
stacktrace string The stack trace if there is one

ErrorReport.UserData

Holds information about the user

Field Type Rules Description
*user_agent string UserAgent of the user (browser version etc.)
*os string The operating system of the user

Jobs

Manage schedulable-job specs and jobs.

GetJobSpec

Return the job spec with the specified ID.

Output: JobSpec

Field Type Rules Description
tenant string output only The tenant the job spec belongs to.
id string output only The ID of the job spec.
job_type JobType output only The job type of the job spec.
display_name string output only The display name of the job spec.
If empty, clients should default to id for display purposes.
disabled bool output only Whether the job spec is disabled or not.
schedules Schedule output only
repeated
The schedules for this job spec.
Zero (enabled) schedules means no automatic runs, but a single
off-schedule run can still be scheduled via Create.
When determining the next due_time for this job spec,
all (enabled) schedules are queried and the soonest due_time wins.
allow_manual_jobs bool output only Whether jobs of this spec can be manually scheduled off-schedule via Create.
task_retries int32 output only How often (0 for never) to retry a job-run's task that has timed
out or failed in the errors-go/traits.RetryableTraits error categories.
timeout_task_runs float output only The maximum duration (in seconds) that a single task in a run of this job spec may take.
When elapsed, the job runner having started the task marks it for retry or aborts it, depending on task_retries.
timeout_job_preps_and_finalizings float output only The maximum duration (in seconds) that job preparation and finalization may take.
When elapsed, job preparation and finalization will be aborted and shortly after restarted, so a sufficiently generous timeout is advised.
retain_days int32 output only If greater than 0, jobs and their tasks will be purged from storage after that many days.
default_job_details google.protobuf.Struct output only
optional
The default job details, if any.
task_results_shrink_to string output only
repeated
The fields to retain for stored Task.results that the job_type produces.
If empty / null, all the Task.results fields are stored.
max_worker_pool_size int32 output only The maximum number of workers that executes tasks in parallel.

ListJobSpecs

Return job specs matching the specified filter criteria.

Input: JobSpecListRequest

Field Type Rules Description
*tenant string The tenant the job specs belong to.
filter JobSpecListRequest.Filter Filters to limit the response.

Output: JobSpecList

Field Type Rules Description
job_specs JobSpec output only
repeated
The requested job specs.

Get

Get the specified job.

Output: Job

Field Type Rules Description
*tenant string The tenant the job run belongs to.
*id string The ID of this job run within the tenant scope.
*job_spec string The ID of this job run's parent job spec in the same tenant scope.
state RunState output only The current state of this job run.
*due_time google.protobuf.Timestamp The originally-scheduled start time of this job run.
Jobs move from PENDING to RUNNING no earlier than due_time, and as-soon-as-possible right after due_time.
start_time google.protobuf.Timestamp output only The actual start time of this job run.
finish_time google.protobuf.Timestamp output only The finish time of this job run (only set upon completion).
auto_scheduled bool output only Whether this job was scheduled manually (false) or automatically (true).
details google.protobuf.Struct The job-spec-specific settings for this job run.
results google.protobuf.Struct output only The job-spec-specific outcome(s) for this job run.

List

Return jobs matching the specified filter criteria.

Input: JobListRequest

Field Type Rules Description
*tenant string The tenant the job runs belong to.
page_size int32 The maximum number of items to return. 0 for default.
page_token string The next_page_token value returned from the preceding list request, if any.
filter JobListRequest.Filter Filters to limit the response.
order_by string Comma separated list of fields to order by. Use - for descending order, e.g. "-start_time".

Output: JobList

Field Type Rules Description
jobs Job output only
repeated
The requested jobs.
next_page_token string output only Token to retrieve the next page of results, or empty if there are no more
results in the list.

ListTasks

Return tasks matching the specified filter criteria.

Input: TaskListRequest

Field Type Rules Description
*tenant string The tenant the tasks belong to.
*job string The ID of the job the tasks belong to.
page_size int32 The maximum number of items to return. 0 for default.
page_token string The next_page_token value returned from the preceding list request, if any.
filter TaskListRequest.Filter Filters to limit the response.
order_by string Comma separated list of fields to order by. Use - for descending order, e.g. "-start_time".

Output: TaskList

Field Type Rules Description
tasks Task output only
repeated
The requested tasks.
next_page_token string output only Token to retrieve the next page of results, or empty if there are no more
results in the list.

Create

Create a single off-schedule job. This requires a JobSpec with allow_manual_jobs set to true.

Input: Job

Field Type Rules Description
*tenant string The tenant the job run belongs to.
*id string The ID of this job run within the tenant scope.
*job_spec string The ID of this job run's parent job spec in the same tenant scope.
state RunState output only The current state of this job run.
*due_time google.protobuf.Timestamp The originally-scheduled start time of this job run.
Jobs move from PENDING to RUNNING no earlier than due_time, and as-soon-as-possible right after due_time.
start_time google.protobuf.Timestamp output only The actual start time of this job run.
finish_time google.protobuf.Timestamp output only The finish time of this job run (only set upon completion).
auto_scheduled bool output only Whether this job was scheduled manually (false) or automatically (true).
details google.protobuf.Struct The job-spec-specific settings for this job run.
results google.protobuf.Struct output only The job-spec-specific outcome(s) for this job run.

Output: Job

Field Type Rules Description
*tenant string The tenant the job run belongs to.
*id string The ID of this job run within the tenant scope.
*job_spec string The ID of this job run's parent job spec in the same tenant scope.
state RunState output only The current state of this job run.
*due_time google.protobuf.Timestamp The originally-scheduled start time of this job run.
Jobs move from PENDING to RUNNING no earlier than due_time, and as-soon-as-possible right after due_time.
start_time google.protobuf.Timestamp output only The actual start time of this job run.
finish_time google.protobuf.Timestamp output only The finish time of this job run (only set upon completion).
auto_scheduled bool output only Whether this job was scheduled manually (false) or automatically (true).
details google.protobuf.Struct The job-spec-specific settings for this job run.
results google.protobuf.Struct output only The job-spec-specific outcome(s) for this job run.

Cancel

Cancel the specified (PENDING or RUNNING) job and all its PENDING and RUNNING tasks.

Delete

Delete the specified DONE or CANCELLED job and its tasks (if any) from storage.
(Jobs in other states should be Cancelled first, then waiting for a either of both, DONE or CANCELLED).

GetStats

Fetch current statistics and progress of the specified job and its tasks.

Output: JobStats

Field Type Rules Description
tasks_total int32 output only The total number of Tasks for the job.
tasks_pending int32 output only The number of Tasks in a RunState of PENDING.
tasks_running int32 output only The number of Tasks in a RunState of RUNNING.
tasks_failed int32 output only The number of Tasks in a RunState of DONE with their latest Task.Attempt noting an error.
tasks_succeeded int32 output only The number of Tasks in a RunState of DONE with their latest Task.Attempt noting no error.
tasks_cancelled int32 output only The number of Tasks in a RunState of CANCELLED.
job_percent_done int32 output only A convenience-summary percentage indicating the ratio of PENDING/RUNNING tasks to DONE/CANCELLED tasks, such that:
- 100 always means all tasks are DONE or CANCELLED,
- 0 always means no tasks are DONE or CANCELLED (or none even exist yet),
- 1-99 means a (technically slightly imprecise) approximation of the actual ratio.
job_percent_success int32 output only
optional
A convenience-summary percentage for the specified job such that:
- 100 always means "job fully successful" (all its tasks succeeded),
- 0 always means "job fully failed" (all its tasks failed),
- 1-99 means a (technically slightly imprecise) approximation of the actual success/failure ratio,
- null means the job is not yet in a state of DONE.
duration_total_minutes float output only
optional
The duration from start_time to finish_time, for non-PENDING/RUNNING jobs.
duration_prep_minutes float output only
optional
The duration of transitioning the job from PENDING to RUNNING (incl. invoking its task producer, storage etc).
duration_finalize_minutes float output only
optional
The duration of transitioning the job from RUNNING to DONE.

RetryTask

Retry a single task.

Input: JobTaskRequest

Field Type Rules Description
*tenant string The tenant the task belongs to.
*id string The ID of this task within the tenant scope.
*job string The ID of the job that this task belongs to.

Output: Task

Field Type Rules Description
tenant string output only The tenant the task belongs to.
id string output only The ID of this task within the tenant scope.
job string output only The ID of the job that this task belongs to.
state RunState output only The current state of this task.
start_time google.protobuf.Timestamp output only The time when this task was started.
finish_time google.protobuf.Timestamp output only The time when this task finished.
attempts Task.Attempt output only
repeated
All the attempts taken for this task (max 1 if not retryable).
details google.protobuf.Struct output only Details specific to the kind of the job.
results google.protobuf.Struct output only Results specific to the kind of the job.

EmptyTenantRequest

A google.protobuf.Empty-like (but tenant-carrying) convenience message commonly suitable for most job types requiring no special custom initialization parameterization.

Field Type Rules Description
*tenant string The tenant for which to initialize a job run.

JobListRequest.Filter

Field Type Rules Description
ids string repeated Select only jobs with any of these IDs.
specs string repeated Select only jobs based on any of those job specs.
job_types string repeated Select only jobs based on any of those job types.
states RunState repeated Select only jobs in any of these states.
auto_scheduled bool optional Select only jobs that have been automatically (true) or manually (false) scheduled.
due bool optional Select only jobs that are already (true) or not yet (false) due.

JobSpecListRequest.Filter

Field Type Rules Description
ids string repeated Select job specs with any of these IDs.
display_name string optional Select job specs with display names containing this sub-string (case-insensitive).
disabled bool optional Select only job specs that are disabled (true) or enabled (false).
allow_manual_jobs bool optional Select only job specs with the specified allow_manual_jobs setting.
schedules bool optional Select only job specs with enabled (true) or disabled / no (false) schedules.

JobType

Field Type Rules Description
prepare_job string output only The fully-qualified name of the initial, optional "prepare job" lifecycle event method.
prepare_tasks string output only The fully-qualified name of the mandatory "prepare tasks" job lifecycle event method.
run_task string output only The fully-qualified name of the mandatory "run task" job lifecycle event method.
finalize_job string output only The fully-qualified name of the optional "finalize job" job lifecycle event method.

Schedule

Field Type Rules Description
disabled bool output only Whether this job schedule is disabled or not.
rule string output only Scheduling rule as a crontab expression (see https://crontab.guru for examples).

Task.Attempt

Field Type Rules Description
time google.protobuf.Timestamp output only The time when this attempt was made.
error google.rpc.Status output only Error details in case of failure.

TaskListRequest.Filter

Field Type Rules Description
states RunState repeated Select only tasks with any of these states.
failed bool optional Select only DONE tasks that have failed with no-more-retries (true) or succeeded (false).

RunState

Name Number Description
RUN_STATE_UNSPECIFIED 0 Unspecified
PENDING 1 Pending
RUNNING 2 Running
CANCELLED 3 Cancelled
CANCELLING 4 Cancelling: only for Jobs, never for Tasks.
DONE 5 Done
FAILED 6 Failed

Uris

Provide well-known tenant-specific URIs.

GetCustomerPortal

Get the URI of the customer portal.

Input: UriRequest

Field Type Rules Description
*tenant string The tenant the URI belongs to.

Output: UriResponse

Field Type Rules Description
uri string The requested URI.

GetCustomerAgentPortal

Get the URI of the customer agent portal.

Input: UriRequest

Field Type Rules Description
*tenant string The tenant the URI belongs to.

Output: UriResponse

Field Type Rules Description
uri string The requested URI.

VerificationTokens

Manage verification tokens (e.g. for e-mail verification links).

Set

Create a new token. An existing token can not be modified.

Input: VerificationToken

Field Type Rules Description
*tenant string immutable The tenant the token belongs to.
*id string immutable The token identifier. This is the value to be given to an external consumer (e.g. in the form of an e-mail validation link).
payload google.protobuf.Struct This can be used to attach information to the token that remains invisible to an external consumer (e.g. a customer ID).

Output: VerificationToken

Field Type Rules Description
*tenant string immutable The tenant the token belongs to.
*id string immutable The token identifier. This is the value to be given to an external consumer (e.g. in the form of an e-mail validation link).
payload google.protobuf.Struct This can be used to attach information to the token that remains invisible to an external consumer (e.g. a customer ID).

Inspect

Check if a specific token exists and get its payload.

Input: VerificationTokenRequest

Field Type Rules Description
*tenant string The tenant the token belongs to.
*id string The token identifier.

Output: VerificationToken

Field Type Rules Description
*tenant string immutable The tenant the token belongs to.
*id string immutable The token identifier. This is the value to be given to an external consumer (e.g. in the form of an e-mail validation link).
payload google.protobuf.Struct This can be used to attach information to the token that remains invisible to an external consumer (e.g. a customer ID).

Redeem

Redeem a specific token and resume other processes waiting for this token.

Input: VerificationTokenRedeemRequest

Field Type Rules Description
*tenant string The tenant the token belongs to.
*id string The token identifier.

Delete

Delete a specific token.

Input: VerificationTokenRequest

Field Type Rules Description
*tenant string The tenant the token belongs to.
*id string The token identifier.

Shared Types

Amount

Field Type Rules Description
unit string The unit of the amount. E.g.'kWh' or 'PCS' for pieces.
units int64 The whole units of the amount.
For example if unit is "PCS", then 1 unit is one piece.
nanos int32 Number of nano (10^-9) units of the amount.
The value must be between -999,999,999 and +999,999,999 inclusive.
If units is positive, nanos must be positive or zero.
If units is zero, nanos can be positive, zero, or negative.
If units is negative, nanos must be negative or zero.
For example $-1.75 is represented as units=-1 and nanos=-750,000,000.

BankAccount

Information about a bank account.

Field Type Rules Description
*iban string The International Bank Account Number.
bic string The Bank Identifier Code.
account_holder string The name of the account holder.
bank string The name of the bank.

CustomerType

Represents the kind of the customer.

Name Number Description
CUSTOMER_TYPE_UNSPECIFIED 0 The customer type is unspecified.
PRIVATE 1 The customer type is private.
BUSINESS 2 The customer type is business.
BOTH 3 The customer type is private and business.

DateRange

Represents a range of dates.

Field Type Rules Description
*start google.type.Date The inclusive start date.
end google.type.Date The inclusive end date.
end_exclusive google.type.Date The exclusive end date.
time_zone string The time zone of the date range (defaults to Europe/Berlin).

DateTimeRange

Represents a range of date times.

Field Type Rules Description
*start google.protobuf.Timestamp The inclusive start date.
end google.protobuf.Timestamp The inclusive end date.

Decimal

Field Type Rules Description
units int64 The whole units of the amount.
nanos int32 Number of nano (10^-9) units of the amount.
The value must be between -999,999,999 and +999,999,999 inclusive.
If units is positive, nanos must be positive or zero.
If units is zero, nanos can be positive, zero, or negative.
If units is negative, nanos must be negative or zero.
For example $-1.75 is represented as units=-1 and nanos=-750,000,000.

Billing

Billing details.

Field Type Rules Description
*contact Contact The contact to send invoices to.
*payment_method PaymentMethod The payment method method.
bank_account BankAccount The bank account used if payment_method is DIRECT_DEBIT.

CommunicationChannel

Communication channel.

Name Number Description
COMMUNICATION_CHANNEL_UNSPECIFIED 0 Channel not specified.
LETTER 1 Send messages via letter.
EMAIL 2 Send messages via email.
SMS 3 Send messages via SMS.
MESSENGER 4 Send messages via messenger apps like WhatsApp.
PHONE 5 Communicate via telephone.

Contact

Contact details (postal, phone, etc.).

Field Type Rules Description
*person Person Information on how to address the contact.
postal_address PostalAddress The contact's postal address.
phone_number string The phone number of the contact.
Values are normalized into the form +123456789.
email string The email address of the contact.
careof Person A person that may receive communication in the name of the actual recipient (e.g. a "C/O" line added to the postal address).

Reading

Information about a reading.

Field Type Rules Description
*date google.type.Date The date when the reading was taken.
channel Reading.Channel How the reading was reported.
This is value is ignored when submitting via AddMine.
*values Reading.ValuesEntry repeated A map of values to submit with OBIS codes as the key.
ignore_plausibility_check_reason google.protobuf.StringValue If set the meter reading(s) will be saved, even if they're not plausible.
Specifies the reason why the plausibility check is to be ignored.

Reading.ValuesEntry

Field Type Rules Description
key string
value double

Reading.Channel

Name Number Description
CHANNEL_UNSPECIFIED 0 No channel specified.
PORTAL 1 Reported via end-user portal.
EMAIL 2 Reported via email.
LETTER 3 Reported via letter.
PHONE 4 Reported via phone call.
MSCONS 5 Reported via Metered Services Consumption report message.

Relocation

Information about the relocation of an contract.

Field Type Rules Description
*contract string The contract's ID this request is targeting.
*moveout_date google.type.Date The move-out date.
*movein_date google.type.Date The move-in date.
*delivery EnergyDelivery Which kind and amount of energy is to be delivered to where.
*use_new_address Relocation.UseNewAddress Use the new address as postal and billing address.
*meter string The ID of the meter at the new consumption point.
last_reading Reading The last reading at the old consumption point.
old_meter string The ID of the meter at the old consumption point.
Optional, must be set if a last reading is provided.

Relocation.UseNewAddress

Name Number Description
USE_NEW_ADDRESS_UNSPECIFIED 0 Use unspecified.
NO 1 Use not desired.
IMMEDIATELY 2 Use immediately desired.
ON_MOVE_IN 3 Use on moving in desired.

SalesInfo

Information on how a sale was made.

Field Type Rules Description
sales_partner_code string Direct sales partner code.
sales_partner_code_second string Second direct sales partner code.
campaign string Optional override for the default campaign.

ScheduledRequest

Reference to an entity with an optional scheduled starting date.

Field Type Rules Description
*id string The ID referencing the entity.
scheduled_date google.type.Date The scheduled starting date (earliest possible if unset).

TransitionType

Specifies modalities of a contract transition.

Name Number Description
TRANSITION_TYPE_UNSPECIFIED 0 The transition type is unspecified
MANUAL_TERMINATION 1 The customer terminates the prior contract.
VENDOR_TERMINATION 2 The vendor terminates the prior contract.
RELOCATION 3 The customer is going to or has recently moved to the new address.

Duration

Represents a coarse time duration (e.g., 2 months).

Field Type Rules Description
*units int32 The number of time units.
*type google.type.CalendarPeriod The type the units refer to (days, months, etc.).

EnergyDelivery

Describes which kind and amount of energy is to be delivered to where.

Field Type Rules Description
*energy_type EnergyType The kind of the energy.
*customer_type CustomerType The kind of the customer.
*address PostalAddress The address to deliver energy to.
annual_usage int32 The estimated power usage in kWh per year.
usage_type EnergyDelivery.UsageType The usage type for the delivered energy.
annual_usage_nt int32 The estimated off-peak power usage in kWh per year (DE: Niedertarifverbrauch).

EnergyDelivery.UsageType

Name Number Description
USAGE_TYPE_UNSPECIFIED 0 The consumption type is unspecified.
HOUSEHOLD_ELECTRICITY 1 The energy is used for household.
CHARGING_CURRENT 2 The energy is used for charging.
STORAGE_HEATER 3 The energy is used for a storage heater.
HEAT_PUMP 4 The energy is used for a heat pump.
HOUSEHOLD_ELECTRICITY_AND_STORAGE_HEATER 5 The energy is used for household with storage heater.
HOUSEHOLD_ELECTRICITY_AND_HEAT_PUMP 6 The energy is used for household with heat pump.

EnergyType

Represents the kind of the energy.

Name Number Description
ENERGY_TYPE_UNSPECIFIED 0 The energy type is unspecified.
ELECTRICITY 1 The energy type is electricity.
GAS 2 The energy type is gas.

FileContent

Field Type Rules Description
*mime_type string The media type / content type of the document.
*content bytes The raw data of the document.

AnnotationFilter

AnnotationFilter provides filter semantics for annotations.

Field Type Rules Description
*field string The annotation field path is a symbolic field path to target an annotation's field, for example:

"invoice.id", "is_consumption_based", ...
value google.protobuf.Value The value to match the annotation field's value.

DateFilter

DateFilter provides match semantics for date fields.

Field Type Rules Description
*date google.type.Date The date to filter for.
match_mode DateFilter.MatchMode The match mode to use. The default is EQUAL.

DateRangeFilter

DateTimeRangeFilter provides match semantics for date fields. The filter treats the start and end date as inclusive.

Field Type Rules Description
*start_date google.type.Date The start date to filter for.
*end_date google.type.Date The end date to filter for.

DateTimeFilter

DateTimeFilter provides match semantics for date time fields.

Field Type Rules Description
*time google.protobuf.Timestamp The date time to filter for.
match_mode DateTimeFilter.MatchMode The match mode to use. The default is EQUAL.

DateTimeRangeFilter

DateTimeRangeFilter provides match semantics for date time fields.

Field Type Rules Description
*start_time google.protobuf.Timestamp The start date time to filter for.
*end_time google.protobuf.Timestamp The end date time to filter for.

StringListFilter

Strings filter x IN and x NOT IN semantics.

Field Type Rules Description
*values string repeated The value to filter for.
negate bool If true the expression is negated.

StringScalarFilter

StringFilter provides match semantics for strings fields.

Field Type Rules Description
*value string The value to filter for.
match_mode StringScalarFilter.MatchMode The match mode to use.
negate bool If true the expression is negated.

DateFilter.MatchMode

Name Number Description
MATCH_MODE_UNSPECIFIED 0 The match mode is unspecified.
EQUAL 1 Filter only matches if the date is equal to the provided date.
BEFORE 2 Filter matches all dates that are before the provided date.
AFTER 3 Filter matches all dates that are after the provided date.
BEFORE_OR_EQUAL 4 Filter matches all dates that are before or equal to the provided date.
AFTER_OR_EQUAL 5 Filter matches all dates that are after or equal to the provided date.

DateTimeFilter.MatchMode

Name Number Description
MATCH_MODE_UNSPECIFIED 0 The match mode is unspecified.
EQUAL 1 Filter only matches if the date is equal to the provided date.
BEFORE 2 Filter matches all dates that are before the provided date.
AFTER 3 Filter matches all dates that are after the provided date.
BEFORE_OR_EQUAL 4 Filter matches all dates that are before or equal to the provided date.
AFTER_OR_EQUAL 5 Filter matches all dates that are after or equal to the provided date.

StringScalarFilter.MatchMode

Name Number Description
MATCH_MODE_UNSPECIFIED 0 The match mode is unspecified.
EXACT 1 Filter only matches if the field contains exactly the expected value.
PREFIX 2 Filter matches all fields that are prefixed with the given value.
SUFFIX 3 Filter matches all fields that are suffixed with the given value.
SUBSTRING 4 Filter matches all fields that contain the given value.

LetterAddress

Combines a name and a postal address.

Field Type Rules Description
*person Person The person being addressed.
careof string A person that may receive letters in the name of the actual recipient (e.g. a "C/O" line added to the postal address).
*postal_address PostalAddress The postal address.

MonthOfYear

Represents a month of a year.

Field Type Rules Description
month int32 Month of the year.
year int32 Year.

PaymentMethod

Possible methods for paying invoices.

Name Number Description
PAYMENT_METHOD_UNSPECIFIED 0 The payment method method is unspecified.
DIRECT_DEBIT 1 Money is automatically withdrawn from the specified bank account.
MANUAL_TRANSFER 2 The customer pays bills manually using money transfers.

Period

A period of time with inclusive start and inclusive and exclusive end time. If both (inclusive and exclusive) ends are specified, they must be consistent. If no end is specified, the period is considered unbounded on the end. If the time is unspecified it is considered to be 00:00:00.000000000 for the start (and exclusive end) and 23:59:59.999999999 for the inclusive end.

The following example represents a period of time from 2006-01-01 to 2006-01-31: { start_time: { hours: 0 minutes: 0 seconds: 0 nanos: 0 } start_date: { year: 2006 month: 1 day: 1 } end_time: { hours: 23 minutes: 59 seconds: 59 nanos: 999999999 } end_date: { year: 2006 month: 1 day: 31 } end_date_exclusive: { year: 2006 month: 2 day: 1 } end_time_exclusive: { hours: 0 minutes: 0 seconds: 0 nanos: 0 } }

Field Type Rules Description
start_time google.type.TimeOfDay The start time of the period (inclusive).
end_time google.type.TimeOfDay The end time of the period (inclusive).
start_date google.type.Date The start date of the period (inclusive).
end_date google.type.Date The end date of the period (inclusive).
end_time_exclusive google.type.TimeOfDay The end time of the period (exclusive).
end_date_exclusive google.type.Date The end date of the period (exclusive).
time_zone string The time zone of the period (defaults to Europe/Berlin).

Person

Information on how to address a person. A person can be either a natural person or a company with an optional contact Natural Person: Must provide firstname, lastname Company: Must provide company

Field Type Rules Description
salutation Person.SalutationForm The salutation of the person.
title string The title of the person.
firstname string The first name of the person.
lastname string The last name of the person.
birthday google.type.Date The birthday of the person.
company string The company name.

Person.SalutationForm

Name Number Description
SALUTATION_FORM_UNSPECIFIED 0 The salutation form is unspecified.
MRS 1 The salutation form is Mrs..
MR 2 The salutation form is Mr..
DIVERSE 3 The salutation form is Diverse.
FAMILY 4 The salutation form is Family.

PostalAddress

Represents a postal address, e.g. for postal delivery or payments addresses.

Field Type Rules Description
*region string The region the address is located in as a CLDR region code.
Example: DE for Germany
*postal_code string A postal code of the city (a city may have more than one).
Example: 76131 for Karlsruhe inner city
*city string The canonical name of the city (there may be more than one per postal code).
Example: Karlsruhe
street string The canonical name of the street.
Example: Kaiserstr.
house_number string The house number.
Examples: 32, 32a, 32/1
postbox_number string Postbox number in case address is a postbox.
district string Administrative division (i.e. Stadtteil).
additional_address_lines string repeated Additional address lines
Example: Appartment 104, Care of etc.

Price

Represents a price before and after taxes.

Field Type Rules Description
*net google.type.Money The price without VAT.
*gross google.type.Money The price including VAT.
unit string The unit the price is related to (e.g "kWh", "PCS", "month", etc.)

Quantity

Field Type Rules Description
unit string The unit of the quantity. E.g.'kWh' or 'PCS' for pieces.
units int64 The whole units of the quantity.
For example if unit is "PCS", then 1 unit is one piece.
nanos int32 Number of nano (10^-9) units of the quantity.
The value must be between -999,999,999 and +999,999,999 inclusive.
If units is positive, nanos must be positive or zero.
If units is zero, nanos can be positive, zero, or negative.
If units is negative, nanos must be negative or zero.
For example $-1.75 is represented as units=-1 and nanos=-750,000,000.

RecurringCost

Represents a price/cost that repeats at a fixed interval.

Field Type Rules Description
*price Price The price per interval.
*interval google.type.CalendarPeriod The interval at which the cost occurs (per day, month, etc.).

TenantScopedListRequest

Field Type Rules Description
*tenant string The tenant the list belongs to.
page_size int32 The maximum number of items to return. 0 for default.
page_token string The next_page_token value returned from a previous List request, if any.

TenantScopedResource

A tenant scoped resource.

Field Type Rules Description
*tenant string The tenant the resource belongs to.
*id string The ID of the resource.

TimeRange

A range of time with inclusive start, inclusive and exclusive end time. If both (inclusive and exclusive) ends are specified, they must be consistent. If no end is specified, the period is considered unbounded on the end.

Field Type Rules Description
start google.protobuf.Timestamp The inclusive start.
end google.protobuf.Timestamp The inclusive end.
end_exclusive google.protobuf.Timestamp The exclusive end.

File-level Extensions

Extension Type Base Number Description
throws string .google.protobuf.MethodOptions 76131 throws is used to document error messages that the method might return in status.details.

CalendarPeriod

A CalendarPeriod represents the abstract concept of a time period that has a canonical start. Grammatically, "the start of the current CalendarPeriod." All calendar times begin at midnight UTC.

Name Number Description
CALENDAR_PERIOD_UNSPECIFIED 0 Undefined period, raises an error.
DAY 1 A day.
WEEK 2 A week. Weeks begin on Monday, following
ISO 8601.
FORTNIGHT 3 A fortnight. The first calendar fortnight of the year begins at the start
of week 1 according to
ISO 8601.
MONTH 4 A month.
QUARTER 5 A quarter. Quarters start on dates 1-Jan, 1-Apr, 1-Jul, and 1-Oct of each
year.
HALF 6 A half-year. Half-years start on dates 1-Jan and 1-Jul.
YEAR 7 A year.

Date

Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following:

  • A full date, with non-zero year, month, and day values
  • A month and day value, with a zero year, such as an anniversary
  • A year on its own, with zero month and day values
  • A year and month value, with a zero day, such as a credit card expiration date

Related types are [google.type.TimeOfDay][google.type.TimeOfDay] and google.protobuf.Timestamp.

Field Type Rules Description
year int32 Year of the date. Must be from 1 to 9999, or 0 to specify a date without
a year.
month int32 Month of a year. Must be from 1 to 12, or 0 to specify a year without a
month and day.
day int32 Day of a month. Must be from 1 to 31 and valid for the year and month, or 0
to specify a year by itself or a year and month where the day isn't
significant.

Money

Represents an amount of money with its currency type.

Field Type Rules Description
currency_code string The three-letter currency code defined in ISO 4217.
units int64 The whole units of the amount.
For example if currencyCode is "USD", then 1 unit is one US dollar.
nanos int32 Number of nano (10^-9) units of the amount.
The value must be between -999,999,999 and +999,999,999 inclusive.
If units is positive, nanos must be positive or zero.
If units is zero, nanos can be positive, zero, or negative.
If units is negative, nanos must be negative or zero.
For example $-1.75 is represented as units=-1 and nanos=-750,000,000.

Scalar Value Types

.proto Type Notes C++ Java Python Go C# PHP Ruby
double double double float float64 double float Float
float float float float float32 float float Float
int32 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. int32 int int int32 int integer Bignum or Fixnum (as required)
int64 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. int64 long int/long int64 long integer/string Bignum
uint32 Uses variable-length encoding. uint32 int int/long uint32 uint integer Bignum or Fixnum (as required)
uint64 Uses variable-length encoding. uint64 long int/long uint64 ulong integer/string Bignum or Fixnum (as required)
sint32 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. int32 int int int32 int integer Bignum or Fixnum (as required)
sint64 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. int64 long int/long int64 long integer/string Bignum
fixed32 Always four bytes. More efficient than uint32 if values are often greater than 2^28. uint32 int int uint32 uint integer Bignum or Fixnum (as required)
fixed64 Always eight bytes. More efficient than uint64 if values are often greater than 2^56. uint64 long int/long uint64 ulong integer/string Bignum
sfixed32 Always four bytes. int32 int int int32 int integer Bignum or Fixnum (as required)
sfixed64 Always eight bytes. int64 long int/long int64 long integer/string Bignum
bool bool boolean boolean bool bool boolean TrueClass/FalseClass
string A string must always contain UTF-8 encoded or 7-bit ASCII text. string String str/unicode string string string String (UTF-8)
bytes May contain any arbitrary sequence of bytes. string ByteString str []byte ByteString string String (ASCII-8BIT)

Legend

*) required