Skip to content

Commit

Permalink
feat!: run the generator 2020/12 (#83)
Browse files Browse the repository at this point in the history
Signed-off-by: Grant Timmerman <timmerman+devrel@google.com>
  • Loading branch information
grant committed Jan 20, 2021
1 parent 0dfd79c commit d54cfbe
Show file tree
Hide file tree
Showing 8 changed files with 88 additions and 52 deletions.
38 changes: 25 additions & 13 deletions cloud/audit/v1/LogEntryData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export interface LogEntryData {
/**
* The severity of the log entry.
*/
severity?: number | string;
severity?: InsertID | number;
/**
* The span ID within the trace associated with the log entry, if any.
*
Expand Down Expand Up @@ -133,7 +133,7 @@ export interface ProtoPayload {
* The number of items returned from a List or Query API method,
* if applicable.
*/
numResponseItems?: string;
numResponseItems?: number;
/**
* The operation request. This may not include all request parameters,
* such as those that are too large, privacy-sensitive, or duplicated
Expand Down Expand Up @@ -279,7 +279,7 @@ export interface ServiceMetadata {
/**
* Unordered map of dynamically typed values.
*/
fields?: { [key: string]: { [key: string]: any } | null };
fields?: { [key: string]: { [key: string]: any } };
}

/**
Expand All @@ -299,7 +299,7 @@ export interface ThirdPartyClaims {
/**
* Unordered map of dynamically typed values.
*/
fields?: { [key: string]: { [key: string]: any } | null };
fields?: { [key: string]: { [key: string]: any } };
}

/**
Expand All @@ -312,7 +312,7 @@ export interface AuthenticationInfoThirdPartyPrincipal {
/**
* Unordered map of dynamically typed values.
*/
fields?: { [key: string]: { [key: string]: any } | null };
fields?: { [key: string]: { [key: string]: any } };
}

/**
Expand Down Expand Up @@ -397,7 +397,7 @@ export interface Metadata {
/**
* Unordered map of dynamically typed values.
*/
fields?: { [key: string]: { [key: string]: any } | null };
fields?: { [key: string]: { [key: string]: any } };
}

/**
Expand All @@ -412,7 +412,7 @@ export interface Request {
/**
* Unordered map of dynamically typed values.
*/
fields?: { [key: string]: { [key: string]: any } | null };
fields?: { [key: string]: { [key: string]: any } };
}

/**
Expand Down Expand Up @@ -495,7 +495,7 @@ export interface DestinationAttributes {
/**
* The network port of the peer.
*/
port?: string;
port?: number;
/**
* The identity of this peer. Similar to `Request.auth.principal`, but
* relative to the peer instead of the request. For example, the
Expand Down Expand Up @@ -575,7 +575,7 @@ export interface RequestAttributes {
/**
* The HTTP request size in bytes. If unknown, it must be -1.
*/
size?: string;
size?: number;
/**
* The timestamp when the `destination` service receives the first byte of
* the request.
Expand Down Expand Up @@ -671,7 +671,7 @@ export interface Claims {
/**
* Unordered map of dynamically typed values.
*/
fields?: { [key: string]: { [key: string]: any } | null };
fields?: { [key: string]: { [key: string]: any } };
}

/**
Expand Down Expand Up @@ -715,7 +715,7 @@ export interface ResourceOriginalState {
/**
* Unordered map of dynamically typed values.
*/
fields?: { [key: string]: { [key: string]: any } | null };
fields?: { [key: string]: { [key: string]: any } };
}

/**
Expand All @@ -730,7 +730,7 @@ export interface Response {
/**
* Unordered map of dynamically typed values.
*/
fields?: { [key: string]: { [key: string]: any } | null };
fields?: { [key: string]: { [key: string]: any } };
}

/**
Expand All @@ -744,7 +744,7 @@ export interface ServiceData {
/**
* Unordered map of dynamically typed values.
*/
fields?: { [key: string]: { [key: string]: any } | null };
fields?: { [key: string]: { [key: string]: any } };
}

/**
Expand Down Expand Up @@ -907,6 +907,18 @@ export interface Resource {
type?: string;
}

export enum InsertID {
Alert = "ALERT",
Critical = "CRITICAL",
Debug = "DEBUG",
Default = "DEFAULT",
Emergency = "EMERGENCY",
Error = "ERROR",
Info = "INFO",
Notice = "NOTICE",
Warning = "WARNING",
}

/**
* Cast a raw JSON object to a typed event (useful for IDE autocompletion).
* @param {object} json The JSON object
Expand Down
32 changes: 16 additions & 16 deletions cloud/cloudbuild/v1/BuildEventData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ export interface Options {
* requested. At present, the maximum disk size is 1000GB; builds that request
* more than the maximum are rejected with an error.
*/
diskSizeGb?: string;
diskSizeGb?: number;
/**
* A list of global environment variable definitions that will exist for all
* build steps in this build. If a variable is defined in both globally and in
Expand Down Expand Up @@ -275,7 +275,7 @@ export interface Options {
/**
* Requested hash for SourceProvenance.
*/
sourceProvenanceHash?: Array<number | string>;
sourceProvenanceHash?: Array<number | SourceProvenanceHashEnum>;
/**
* Option to specify behavior when there is an error in the substitution
* checks.
Expand Down Expand Up @@ -323,6 +323,12 @@ export enum RequestedVerifyOptionEnum {
Verified = "VERIFIED",
}

export enum SourceProvenanceHashEnum {
Md5 = "MD5",
None = "NONE",
Sha256 = "SHA256",
}

export enum SubstitutionOptionEnum {
AllowLoose = "ALLOW_LOOSE",
MustMatch = "MUST_MATCH",
Expand Down Expand Up @@ -371,7 +377,7 @@ export interface QueueTTL {
* to +315,576,000,000 inclusive. Note: these bounds are computed from:
* 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
*/
seconds?: string;
seconds?: number;
}

/**
Expand Down Expand Up @@ -407,7 +413,7 @@ export interface Results {
/**
* Number of artifacts uploaded. Only populated when artifacts are uploaded.
*/
numArtifacts?: string;
numArtifacts?: number;
}

/**
Expand Down Expand Up @@ -568,7 +574,7 @@ export interface StorageSourceObject {
* Google Cloud Storage generation for the object. If the generation is
* omitted, the latest generation will be used.
*/
generation?: string;
generation?: number;
/**
* Google Cloud Storage object containing the source.
*/
Expand Down Expand Up @@ -618,19 +624,13 @@ export interface FileHashElement {
/**
* The type of hash that was performed.
*/
type?: TypeEnum | number;
type?: SourceProvenanceHashEnum | number;
/**
* The hash value.
*/
value?: string;
}

export enum TypeEnum {
Md5 = "MD5",
None = "NONE",
Sha256 = "SHA256",
}

/**
* A copy of the build's `source.repo_source`, if exists, with any
* revisions resolved.
Expand Down Expand Up @@ -705,7 +705,7 @@ export interface ResolvedStorageSourceObject {
* Google Cloud Storage generation for the object. If the generation is
* omitted, the latest generation will be used.
*/
generation?: string;
generation?: number;
/**
* Google Cloud Storage object containing the source.
*/
Expand Down Expand Up @@ -804,7 +804,7 @@ export interface Step {
* only updated on build completion; step status is not updated in real-time
* as the build progresses.
*/
status?: number | string;
status?: StatusEnum | number;
/**
* Time limit for executing this build step. If not defined, the step has no
* time limit and will be allowed to continue to run until either it completes
Expand Down Expand Up @@ -875,7 +875,7 @@ export interface StepTimeout {
* to +315,576,000,000 inclusive. Note: these bounds are computed from:
* 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
*/
seconds?: string;
seconds?: number;
}

/**
Expand Down Expand Up @@ -916,7 +916,7 @@ export interface BuildEventDataTimeout {
* to +315,576,000,000 inclusive. Note: these bounds are computed from:
* 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
*/
seconds?: string;
seconds?: number;
}

/**
Expand Down
16 changes: 10 additions & 6 deletions cloud/firestore/v1/DocumentEventData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,15 @@ export interface OldValueField {
/**
* An integer value.
*/
integerValue?: string;
integerValue?: number;
/**
* A map value.
*/
mapValue?: MapValue;
/**
* A null value.
*/
nullValue?: number | string;
nullValue?: BytesValue | number;
/**
* A reference to a document. For example:
* `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
Expand Down Expand Up @@ -189,15 +189,15 @@ export interface MapValueField {
/**
* An integer value.
*/
integerValue?: string;
integerValue?: number;
/**
* A map value.
*/
mapValue?: MapValue;
/**
* A null value.
*/
nullValue?: number | string;
nullValue?: BytesValue | number;
/**
* A reference to a document. For example:
* `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
Expand Down Expand Up @@ -268,15 +268,15 @@ export interface ValueElement {
/**
* An integer value.
*/
integerValue?: string;
integerValue?: number;
/**
* A map value.
*/
mapValue?: MapValue;
/**
* A null value.
*/
nullValue?: number | string;
nullValue?: BytesValue | number;
/**
* A reference to a document. For example:
* `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
Expand Down Expand Up @@ -326,6 +326,10 @@ export interface GeoPointValue {
longitude?: number;
}

export enum BytesValue {
NullValue = "NULL_VALUE",
}

/**
* A DocumentMask object that lists changed fields.
* This is only populated for update events.
Expand Down
6 changes: 3 additions & 3 deletions cloud/storage/v1/StorageObjectData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export interface StorageObjectData {
* The content generation of this object. Used for object versioning.
* Attempting to set this field will result in an error.
*/
generation?: string;
generation?: number;
/**
* The ID of the object, including the bucket name, object name, and
* generation number.
Expand Down Expand Up @@ -117,7 +117,7 @@ export interface StorageObjectData {
* number is only meaningful in the context of a particular generation of a
* particular object.
*/
metageneration?: string;
metageneration?: number;
/**
* The name of the object.
*/
Expand All @@ -135,7 +135,7 @@ export interface StorageObjectData {
* Content-Length of the object data in bytes, matching
* [https://tools.ietf.org/html/rfc7230#section-3.3.2][RFC 7230 §3.3.2].
*/
size?: string;
size?: number;
/**
* Storage class of the object.
*/
Expand Down
Loading

0 comments on commit d54cfbe

Please sign in to comment.